[asterisk-users] Possible to light up a LED on Snom phones?
Sune Kloppenborg Jeppesen
jaervosz at gentoo.org
Thu Feb 22 16:25:48 MST 2007
On Thursday 22 February 2007 23:01, Norbert Zawodsky wrote:
> This sounds interesting. If it's not too complicated for you ....
This should get you going:
in extensions.conf:
[macro-F_Toggle_status] ; $ARG1 db family $ARG2 db key $ARG3 Device to change
status
;http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+BristuffDevstate
exten => s,1,Answer()
exten => s,n,Set(status=${DB(${ARG1}/${ARG2})})
exten => s,n,GotoIf($["${status}" = "closed"]?opening|1:closing|1)
exten => opening,1,Set(status=open)
exten => opening,n,Set(DB(${ARG1}/${ARG2})=${status})
exten => opening,n,DevState(${ARG3},2)
exten => opening,n,Hangup()
exten => closing,1,Set(status=closed)
exten => closing,n,Set(DB(${ARG1}/${ARG2})=${status})
exten => closing,n,DevState(${ARG3},0)
exten => closing,n,Hangup()
Then using the value ARG3 from above:
[hint]
exten => _${ARG3},hint,DS/${ARG3}
Remember to substitute the actual variables as you can't use variables with
hints.
Otherwise check the URL above for more info.
HTH
--
Sune Kloppenborg Jeppesen (Jaervosz)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20070222/44893d25/attachment.pgp
More information about the asterisk-users
mailing list