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?
On Wed, 2008-09-10 at 18:10 +1000, 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?Yes, a while back I upgraded AEL to handle both ':' and '&' inside the hint parens. This should work on 1.4 on up. What version of asterisk are you using? 1.2? murf -- Steve Murphy Software Developer Digium -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3227 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080910/3b35467d/attachment.bin
> context BLF { > hint(Sip/1000) 1000 => NoOp(); > }; > > Works for meThanks Eric. I did not experience any problem in hint with SIP. The problem is if you use it with Custom. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3402 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080911/11eaae0c/attachment.bin
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