[asterisk-users] Newbie AEL2: Syntax for Hint
Dave Fullerton
dfullertasterisk at shorelinecontainer.com
Thu Sep 11 08:24:38 CDT 2008
Lee, John (Sydney) wrote:
> I am struggling to find out how to code hint in AEL2.
>
> I did hint(Custom:light1) and it keeps complaining about the : (colon).
> It works fine for SIP device like hint(SIP/439).
>
> Anyone who has tried it before?
>
I just whipped this up to test and it works for me in 1.4.21.2:
context nightmode {
// When you dial 1000, toggle the state of Custom:nightmode
hint(Custom:nightmode) 1000 => {
NoOP(${DEVSTATE(Custom:nightmode)});
if (${DEVSTATE(Custom:nightmode)}==UNKNOWN ||
${DEVSTATE(Custom:nightmode)}==NOT_INUSE)
Set(DEVSTATE(Custom:nightmode)=BUSY);
else
Set(DEVSTATE(Custom:nightmode)=NOT_INUSE);
}
}
You'll need the DEVSTATE backport in order to use this example. See the
links at the bottom of this page:
http://www.voip-info.org/wiki/view/Asterisk+func+Devstate
-Dave
More information about the asterisk-users
mailing list