[Asterisk-Dev] GotoIf Question/Problem [reposted again]

Steve Murphy murf at e-tools.com
Thu Jan 15 09:23:49 MST 2004


Now, for the 3rd time, do I discover that having a period (.) all
by itself on a line is some sort of signal that your message is done...
and the rest of the message is truncated at that point. I hadn't
expected this!

I've been playing with the PrivacyManager feature, and am having a
problem with GotoIf.

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

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??


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20040115/f76e8b6b/attachment.htm

More information about the asterisk-dev mailing list