[asterisk-users] GotoIf CALLERID(num)

Chad Wallace cwallace at lodgingcompany.com
Thu Dec 30 00:02:05 UTC 2010


On Wed, 29 Dec 2010 16:41:17 -0700
Joseph <syscon780 at gmail.com> wrote:

> No, it is not a space issue, I tried:
> 
> exten => s,3,GotoIf($["${CALLERID(num)}"="4715665"]?4:6)
> 
> but it still goes to priority "6"

Have you verified the value of CALLERID(num) by passing it to Verbose?
Could it be that there are blanks?  If you put this line in:

exten => s,3,Verbose(3,CALLERID(num) is :${CALLERID(num)}:);

...you would see if there are any blanks between the colons.  Then you
can match it exactly.


> On 12/29/10 16:23, Joel Maslak wrote:
> >Get rid of the spaces before and after the equal sign.
> >
> >On Wed, Dec 29, 2010 at 4:15 PM, Joseph <syscon780 at gmail.com> wrote:
> >> I'm testing GotoIf($["${CALLERID(num) but I'm missing something as
> >> it is not working:
> >>
> >> [office-open]
> >> exten => s,1,Wait(1)
> >> exten => s,2,Answer()
> >>
> >> ; for Caller ID is 471-5665, always signal congestion:
> >> exten => s,3,GotoIf($["${CALLERID(num)}" = "4715665"]?4:6)
> >> exten => s,4,Playtones(congestion)
> >> exten => s,5,Congestion(5)
> >>
> >> exten => s,6,SetMusicOnHold(default)
> >> ...
> >>
> >> but it always goes to "s,6"
> >>
> >> What am I missing?



More information about the asterisk-users mailing list