[asterisk-users] Dial plan inquiry using GotoIf()
Gordon Henderson
gordon+asterisk at drogon.net
Thu Jun 7 03:14:01 CDT 2007
On Wed, 6 Jun 2007, Mike Lynchfield wrote:
> yes on home pbx i love the s/CALLERID..
>
> maybe you should
>
> f($[${CALLERID(number)} = "15552221313"]?15:5)
>
> try to isolate string to strings.
>
> this is not good i think
>
> you need qhotes on the callerid part too if you evaluate to the "1555xxx"
>
> f($["${CALLERID(number)}" = "15552221313"]?15:5)
Just a note on dialplan programming here - I understand that the Jump to
n+101 is depreciated now, and keeping track of line numbers is something I
decided to give up on when I left BASIC programming on an Apple II, 25
years ago...
So from this:
exten => s,4,GotoIf($["${CALLERID(number)}" = "15552221313"]?15:5)
to this:
exten => s,n,GotoIf($["${CALLERID(number)}" = "15552221313"]?trapped)
(no need for the false jump here either)
and from this:
exten => s,15,HangUp
to this:
exten => s,n(trapped),Hangup
Always check the README.variables in the docs directory too.
Gordon
More information about the asterisk-users
mailing list