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
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users