Help with HINT for somethings besides channels

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Help with HINT for somethings besides channels

Postby meneses » Fri Apr 27, 2012 6:28 am

Hello,

I can monitor a SIP channel using HINT using something like:

Code: Select all
1000,hint,SIP/1000


Cakewalk!

But I want to monitor a dialplan extension and for that I created a custom hint. When a call reach that extension I can set the "INUSE" state all right and the BLF light on my phones are working,

Code: Select all
exten => 1000,hint,Custom:1000
exten => 1000,1,Answer()
exten => 1000,n,Set(DEVICE_STATE(Custom:1000)=INUSE) ; the BLF lights are now ON!
exten => 1000,n,MusicOnHold() ; the device is put on hold
exten => 1000,n,Set(DEVICE_STATE(Custom:1000)=NOT_INUSE) ;this is not executed after hangup
exten => 1000,n,HangUp()


BUT, when I hangup the extension the BLF buttons won't go off. How can I set the state to "NOT_INUSE" after a call is finished?


Is it possible to monitor a diaplan extension? Maybe be something like this?

Code: Select all
1000,hint,local/1000 ; <- doesn't work btw
meneses
Oldsterisk
 
Posts: 52
Joined: Fri Jul 25, 2008 7:26 am

Re: Help with HINT for somethings besides channels

Postby dalenoll » Fri Apr 27, 2012 5:14 pm

Could you not put code into the h extension within the context to change the state again?
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help with HINT for somethings besides channels

Postby meneses » Fri Apr 27, 2012 7:47 pm

Yes I could, but I would have to put the code in the h extension of all contexts, wouldn't I?
This can be a real pain having multiples contexts and multiple extensions to monitor.

Am I complicating things?

thnx, btw :D
meneses
Oldsterisk
 
Posts: 52
Joined: Fri Jul 25, 2008 7:26 am

Re: Help with HINT for somethings besides channels

Postby dalenoll » Fri Apr 27, 2012 8:06 pm

Perhaps setting a channel variable with the extension number when you turn the light on and then calling a common macro in each h extension.

Sounds like some testing might be in order.
dalenoll
Oldsterisk
 
Posts: 267
Joined: Tue Sep 20, 2011 11:12 am
Location: Milwaukee, Wisconsin, USA

Re: Help with HINT for somethings besides channels

Postby meneses » Sat Apr 28, 2012 5:46 am

Got it!
Let the testing begin.

Thank you dalenoll
meneses
Oldsterisk
 
Posts: 52
Joined: Fri Jul 25, 2008 7:26 am


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 24 guests