Help with HINT for somethings besides channels


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


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,

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?

Could you not put code into the h extension within the context to change the state again?

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 :smiley:

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.

Got it!
Let the testing begin.

Thank you dalenoll