[asterisk-users] Dial plan inquiry using GotoIf()
Jared Smith
jaredsmith at jaredsmith.net
Wed May 30 10:26:48 MST 2007
On 5/30/07, Steve Finkelstein <sf at stevefink.net> wrote:
> I'm looking for some rudimentary insight on GotoIf() which seems to be
> failing on me in my dial plan.
<snip>
> exten => s,4,GotoIf($[${CALLERID(number)} = "15552221313"]?15:5)
It's the quotes that are messing it up... what you probably want is:
exten => s,4,GotoIf($["${CALLERID(number)}" = "15552221313"]?15:5)
Also, the CallerID number probably doesn't have the 1 on the front
(depending on whether or not your upstream provider sends the 1).
> Also one last question. Say I need to add more numbers to block in the
> future, is there an easier way to do this than renumbering my entire
> macro? Renumbering everything is just begging for a typo which can
> effectively render my dial plan broken.
Yes, you can use the 'n' priority, and use labels to mark the
priorities you want to jump to from your GotoIf()s.
-Jared
More information about the asterisk-users
mailing list