Summary: | ASTERISK-11829: PrivacyManager not detecting anonymous SIP calls | ||
Reporter: | Jaap Winius (jaap winius) | Labels: | |
Date Opened: | 2008-04-10 20:04:42 | Date Closed: | 2011-06-07 14:07:53 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_privacy |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | PrivacyManager is not detecting anonymous calls that come in on the SIP channel. Whenever anonymous calls come in on this channel, the CLI message "CallerID Present: Skipping" shows up and and my SIP phone simply rings anyway. I'm reporting this as a bug because I suspect that the cause is due to the fact that when there is no CID, the results are not always the same. For example, I see in my CDR database that when anonymous calls come in via the SIP channel, the clid field shows: "Anonymous" <anonymous> However, when anonymous calls came in though my old ISDN line (which I can't test anymore because it no longer exists), the clid field would show: CID withheld Although I'm not sure, I suspect that PrivacyManager may recognize the latter format, but not the former. ****** ADDITIONAL INFORMATION ****** Platform: Debian etch Asterisk version: 1.4.19~dfsg-0.5467 ITSP: XS4ALL in the Netherlands The server has two network interfaces -- one with a private net IP address and one with a public IP address. It runs an iptables firewall with masquerading. Relevant iptables configuration commands: ## Incoming traffic $IPT -t filter -A INPUT -i $IFEXT -p udp --dport 4569 \ -m state --state NEW -j ACCEPT $IPT -t filter -A INPUT -i $IFEXT -p udp --dport 5060 \ -m state --state NEW -j ACCEPT $IPT -t filter -A INPUT -i $IFEXT -p udp --dport 10000:20000 \ -m state --state NEW -j ACCEPT $IPT -t filter -A INPUT -i $IFEXT -p icmp --icmp-type ping \ -m state --state NEW -j ACCEPT ## Outgoing traffic $IPT -t filter -A OUTPUT -o $IFEXT -m state \ --state ESTABLISHED,RELATED -j ACCEPT ## Traffic to drop $IPT -t filter -A INPUT -i $IFEXT -p udp --dport 5060 \ -m udp -m string --string "Cirpack KeepAlive Packet" \ --algo bm -j DROP Relevant contents of /etc/asterisk/sip.conf: [general] port=5060 bindaddr=0.0.0.0 srvlookup=yes register => 0715122598:ms29ni04@sip.xs4all.nl/xs4all-in canreinvite=no [xs4all-kpn] type=friend context=xs4all-in username=0715122598 fromuser=0715122598 secret=ms29ni04 host=sip.xs4all.nl dtmfmode=inband qualify=yes disallow=all allow=gsm allow=ulaw allow=alaw insecure=invite Relevant contents of /etc/asterisk/extensions.conf: [general] autofallthrough=yes [globals] [xs4all-in] exten => xs4all-in,1,Goto(0715122598,1) exten => 0031715122598,1,Goto(0715122598,1) exten => 0715122598,1,PrivacyManager() exten => 0715122598,n,GotoIf($["${PRIVACYMGRSTATUS}" = "FAILURE"]?bad) exten => 0715122598,n,Dial(SIP/1000,20,w) exten => 0715122598,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail) exten => 0715122598,n(unavail),VoiceMail(1000@default,u) exten => 0715122598,n,Wait(1) exten => 0715122598,n,Playback(vm-goodbye) exten => 0715122598,n,Hangup() exten => 0715122598,n(busy),VoiceMail(1000@default,b) exten => 0715122598,n,Wait(1) exten => 0715122598,n,Playback(vm-goodbye) exten => 0715122598,n,Hangup() exten => 0715122598,n(bad),Playback(im-sorry) exten => 0715122598,n,Playback(vm-goodbye) exten => 0715122598,n,Hangup() Typical CLI output that results from an anonymous incoming SIP call looks like this: -- Executing [xs4all-in@xs4all-in:1] \ Goto("SIP/0715122598-081ea608", "0715122598|1") in new stack -- Goto (xs4all-in,0715122598,1) -- Executing [0715122598@xs4all-in:1] \ PrivacyManager("SIP/0715122598-081ea608", "") in new stack -- CallerID Present: Skipping -- Executing [0715122598@xs4all-in:2] \ GotoIf("SIP/0715122598-081ea608", "0?bad") in new stack -- Executing [0715122598@xs4all-in:3] \ Dial("SIP/0715122598-081ea608", "SIP/1000|20|w") in new stack -- Called 1000 -- SIP/1000-081ee868 is ringing == Spawn extension (xs4all-in, 0715122598, 3) exited non-zero \ on 'SIP/0715122598-081ea608' | ||
Comments: | By: Jason Parker (jparker) 2008-04-11 12:35:36 This is working as intended. The "problem" is that the provider is adding a Caller ID number (of "anonymous"), thus avoiding the check in app_privacy. If you don't want this behavior, you can check in the dialplan if the CID number is "anonymous" and set it to be empty before calling app_privacy. Alternatively, you could ask the provider to stop setting the Caller ID before sending the call to you. |