Is it possible to manually set the hint status of a virtual extension via the dialplan?
I have an extension that turns my night mode on and off.
I would love to be able to manually set the hint to be able to turn on a light for night mode.
See http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+BristuffDevstate for more info on this.
Here is a part of my extensions.conf that uses this:
; Night Mode Activations
exten => 799,hint,DS/mmgc
exten => 799,1,Macro(open-close,mmgc,custom/moore-moore-now-open,custom/moore-moore-now-closed)
exten => 799,n,Playback(beep)
exten => 799,n,Hangup
exten => 799,hint,DS/mmgc
exten => 799,1,Macro(open-close,mmgc,custom/moore-moore-now-open,custom/moore-moore-now-closed)
exten => 799,n,Playback(beep)
exten => 799,n,Hangup
[macro-open-close]
exten => s,1,DBGet(nightmode=nightmode/${ARG1})
exten => s,n,NoOp(ARG1 ${ARG1} ARG2 ${ARG2} ARG3 ${ARG3})
exten => s,n,Set(OpenFile=${ARG2})
exten => s,n,Set(CloseFile=${ARG3})
exten => s,n,NoOp(Close file ${CloseFile}. Open file ${OpenFile}.)
exten => s,n,GotoIf(${nightmode}=1?s,Open:s,Close)
exten => s,n(Open),DBPut(nightmode/${ARG1}=0)
exten => s,n,Devstate(${ARG1},0)
exten => s,n,Playback(${OpenFile})
exten => s,n,Goto(Return)
exten => s,n(Close),DBPut(nightmode/${ARG1}=1)
exten => s,n,Devstate(${ARG1},2)
exten => s,n,Playback(${CloseFile})
exten => s,n(Return),NoOp
On my Polycom, I have a speeddial set up for 799. One press, and it turns night mode on and announces that, another press and it turns night mode off and announces that..
--
Lacy Moore
I'm the guy that doesn't give a damn about anyone's problems but my own...
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
