[Asterisk-Dev] GotoIf Question/Problem [reposted again]
Jared Smith
jsmith at drgutah.com
Thu Jan 15 10:28:53 MST 2004
On Thu, 2004-01-15 at 09:23, Steve Murphy wrote:
> I found that some anonymous callers were foiling the PrivacyManager by
> simply entering the 10-digit phone number they were dialing-- in other
> words, they blow it off and put in MY number. I find this somewhat
> offensive.
>
> So, I tried this:
>
> ---------------------Snippet from extensions.conf--
> exten => s,4,PrivacyManager
> exten => s,5,GotoIf($[${CALLERIDNUM}:7098568199]?telemarket|s|1:s|6)?
> ---------------------End of Snippet from extensions.conf--
>
>
> The messages output during a call:
>
> Executing PrivacyManager("Zap/1-1","") in new stack
> CallerID Present: Skipping
> Executing GotoIf("Zap/1-1", "7098568188:7098568199?telemarket|s|1:s|6")
> in new stack
> Goto (telemarket,s,1)
>
> I've tried a few different variations of the conditional. I've looked at
> the README.variables file,
> and tried these, none of which seem to work:
>
> exten => s,5,GotoIf(${CALLERIDNUM}=7098568199?telemarket|s|1:s|6)
> exten => s,5,GotoIf($[${CALLERIDNUM}=7098568199]?telemarket|s|1:s|6)
> exten => s,5,GotoIf($[${CALLERIDNUM}:7098568199]?telemarket|s|1:s|6)
>
> and none work. I reasoned that 10-digit phone numbers could exceed the
> capability of a 32-bit integer to represent, so I switched to string
> pattern match, but the message on the console seems to indicate that the
> expression is not being fully evaluated. The documenation for the
> number and string match evaluator says that the pattern should have
> been replaced with "0", and the "false" branch should have been taken...?
>
> What am I doing wrong??
I could be complete wrong here, but I think you need spaces around the
operators (such as the = sign) for it to work correctly...
Jared Smith
More information about the asterisk-dev
mailing list