I’m running Asterisk 1.4 compiled from source on a SuSE Linux 10.0 machine. I have attempted to enable PrivacyManager but it seems to refuse to jump to n+101 even when receiving invalid input.
I tried to test this feature by calling into Asterisk from my old home phone (separate service and DID not associated with my new Asterisk/IAX provider) by disabling CID using *67 prior to the call. However, the phone company sends through the following CID info: “Name Unavailabl” when I use *67. Because the CID number is not blank PrivacyManager doesn’t run at all in this case.
To get around that problem I added some code to blank out the CID number and name if the “stricted” string was observed. Wiping out the CID info does cause PrivacyManager to execute. However, regardless of whether I simply wait for PrivacyManager to timeout, or whether I enter invalid phone numbers (i.e. too short or just press #), the app fails to jump to n+101 and instead continues through the normal path allowing users to access my main menu context.
I have pasted the relevant section from my incoming context as well as an excerpt from the logfile below. I have intentionally shortened my extension to just the area code here.
Please note that PrivacyManager does execute in priority 6 and the log clearly shows that it identified the input as being invalid. However the script continues at priority 7 rather than jumping to 107. Any suggestions as to what I might be doing wrong (or if this is a known bug in 1.4) would be appreciated.
Thanks,
Daniel
[incoming]
exten => 205,1,Answer()
exten => 205,2,SetMusicOnHold(native-classical-ulaw)
exten => 205,3,NoOp(“CID = ${CALLERID(all)}”)
exten => 205,4,Set(CALLERID(num)=${IF($["${CALLERID(num)}"=“stricted”]?${EMPTYSTR}:${CALLERID(num)})})
exten => 205,5,Set(CALLERID(name)=${IF($["${CALLERID(num)}"=“stricted”]?${EMPTYSTR}:${CALLERID(name)})})
exten => 205,6,PrivacyManager()
exten => 205,7,AGI(calleridname.agi)
exten => 205,8,Goto(main,s,1)
exten => 205,107,Goto(main,telemarketer,1)
-- Executing [205@incoming:1] Answer("IAX2/teliax-7", "") in new stack
-- Executing [205@incoming:2] SetMusicOnHold("IAX2/teliax-7", "native-classical-ulaw") in new stack
-- Executing [205@incoming:3] NoOp("IAX2/teliax-7", ""CID = "Name Unavailabl" <stricted>"") in new stack
-- Executing [205@incoming:4] Set("IAX2/teliax-7", "CALLERID(num)=") in new stack
-- Executing [205@incoming:5] Set("IAX2/teliax-7", "CALLERID(name)=Name Unavailabl") in new stack
-- Executing [205@incoming:6] PrivacyManager("IAX2/teliax-7", "") in new stack
== Parsing ‘/etc/asterisk/privacy.conf’: Found
– Playing ‘privacy-unident’ (language ‘en’)
– Playing ‘privacy-prompt’ (language ‘en’)
– Playing ‘privacy-incorrect’ (language ‘en’)
– Playing ‘privacy-prompt’ (language ‘en’)
– Playing ‘privacy-incorrect’ (language ‘en’)
– Executing [205@incoming:7] AGI(“IAX2/teliax-7”, “calleridname.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/calleridname.agi
calleridname.agi: CALLERID IS: unknown
calleridname.agi: Unable to parse phone number for NPA/NXX/station. Phone number is: unknown
– AGI Script calleridname.agi completed, returning 0
– Executing [205@incoming:8] Goto(“IAX2/teliax-7”, “main|s|1”) in new stack
– Goto (main,s,1)
– Executing [s@main:1] Answer(“IAX2/teliax-7”, “”) in new stack
– Executing [s@main:2] Set(“IAX2/teliax-7”, “RETRIES=0”) in new stack
– Executing [s@main:3] Goto(“IAX2/teliax-7”, “prompt|1”) in new stack
– Goto (main,prompt,1)
– Executing [prompt@main:1] Wait(“IAX2/teliax-7”, “2”) in new stack
– Executing [prompt@main:2] Playback(“IAX2/teliax-7”, “vm-extension”) in new stack
– Playing ‘vm-extension’ (language ‘en’)
– Executing [prompt@main:3] WaitExten(“IAX2/teliax-7”, “5”) in new stack
== Spawn extension (main, prompt, 3) exited non-zero on ‘IAX2/teliax-7’
– Hungup ‘IAX2/teliax-7’