*67 Call Privacy issue

Status
Not open for further replies.

afshin

New Member
Oct 29, 2018
24
3
3
Hello everybody,

I have an issue with Call Privacy . When I place a call using *67 + 10 digits number to hide the caller ID , destination receives call with caller ID .

in log I have : Dialplan: sofia/internal/220@XXXXX Regex (PASS) [call_privacy] destination_number(*67514xxxxxxx) =~ /^\*67(\d+)$/ break=on-false

Do I need to change any default setting to make it work (hide the caller ID) ?

I appreciate any feedback .

Thanks
 

afshin

New Member
Oct 29, 2018
24
3
3
Hello DigitalDaz , thanks for prompt response . result generated by sngrep:

leg a : Phone to Fusionpbx

INVITE sip:*675149061121@pbx.telephone.com SIP/2.0
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-a0e4e47a;rport
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 101 INVITE
Max-Forwards: 70
Contact: "Alex" <sip:220@192.168.6.235:14188;transport=tcp>
Expires: 240
User-Agent: Cisco/SPA504G-7.6.2d
Content-Length: 399
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 3145999 3145999 IN IP4 192.168.6.235
s=-
c=IN IP4 192.168.6.235
t=0 0
m=audio 31114 RTP/AVP 0 2 8 9 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-a0e4e47a;rport=14188;received=166.48.219.187
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 101 INVITE
User-Agent: FreeSWITCH
Content-Length: 0

SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-a0e4e47a;rport=14188;received=166.48.219.187
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>;tag=Ht45B3Ha9ayca
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 101 INVITE
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="pbx.telephone.com", nonce="fc8ac02e-3dcf-11e9-9c6c-bfcca8e09087", algorithm=MD5, qop="auth"
Content-Length: 0

ACK sip:*675149061121@pbx.telephone.com SIP/2.0
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-a0e4e47a;rport
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>;tag=Ht45B3Ha9ayca
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 101 ACK
Max-Forwards: 70
Contact: "Alex" <sip:220@192.168.6.235:14188;transport=tcp>
User-Agent: Cisco/SPA504G-7.6.2d
Content-Length: 0

INVITE sip:*675149061121@pbx.telephone.com SIP/2.0
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-7e0551a6;rport
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 102 INVITE
Max-Forwards: 70
Proxy-Authorization: Digest username="220",realm="pbx.telephone.com",nonce="fc8ac02e-3dcf-11e9-9c6c-bfcca8e09087",uri="sip:*675149061121@pbx.telephone.com",algorithm=MD5,response="a2186f03561f2d9cb301ba3e630d8d80",qop=auth,nc=00000001,cnonce="db3c0961"
Contact: "Alex" <sip:220@192.168.6.235:14188;transport=tcp>
Expires: 240
User-Agent: Cisco/SPA504G-7.6.2d
Content-Length: 399
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER, UPDATE
Supported: replaces
Content-Type: application/sdp

v=0
o=- 3145999 3145999 IN IP4 192.168.6.235
s=-
c=IN IP4 192.168.6.235
t=0 0
m=audio 31114 RTP/AVP 0 2 8 9 18 96 97 98 101
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729a/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-7e0551a6;rport=14188;received=166.48.219.187
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 102 INVITE
User-Agent: FreeSWITCH
Content-Length: 0

SIP/2.0 183 Session Progress
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-7e0551a6;rport=14188;received=166.48.219.187
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>;tag=j3XyDy2D6KmZN
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 102 INVITE
Contact: <sip:*675149061121@192.95.252.102:5060;transport=tcp>
User-Agent: FreeSWITCH
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
Remote-Party-ID: "5149061527" <sip:5149061121@pbx.telephone.com>;party=calling;privacy=off;screen=no

v=0
o=FreeSWITCH 1551605402 1551605403 IN IP4 192.95.252.102
s=FreeSWITCH
c=IN IP4 192.95.252.102
t=0 0
m=audio 24510 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-7e0551a6;rport=14188;received=166.48.219.187
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>;tag=j3XyDy2D6KmZN
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 102 INVITE
Contact: <sip:*675149061121@192.95.252.102:5060;transport=tcp>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Session-Expires: 120;refresher=uas
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
Remote-Party-ID: "5149061527" <sip:5149061121@pbx.telephone.com>;party=calling;privacy=off;screen=no

v=0
o=FreeSWITCH 1551605402 1551605403 IN IP4 192.95.252.102
s=FreeSWITCH
c=IN IP4 192.95.252.102
t=0 0
m=audio 24510 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
ACK sip:*675149061121@192.95.252.102:5060;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.168.6.235:14188;branch=z9hG4bK-51cca0f1;rport
From: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
To: <sip:*675149061121@pbx.telephone.com>;tag=j3XyDy2D6KmZN
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 102 ACK
Max-Forwards: 70
Proxy-Authorization: Digest username="220",realm="pbx.telephone.com",nonce="fc8ac02e-3dcf-11e9-9c6c-bfcca8e09087",uri="sip:*675149061121@pbx.telephone.com",algorithm=MD5,response="a2186f03561f2d9cb301ba3e630d8d80",qop=auth,nc=00000001,cnonce="db3c0961"
Contact: "Alex" <sip:220@192.168.6.235:14188;transport=tcp>
User-Agent: Cisco/SPA504G-7.6.2d
Content-Length: 0

BYE sip:220@192.168.6.235:14188;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 192.95.252.102;rport;branch=z9hG4bKF7aX7B6XFpaHS
Max-Forwards: 70
From: <sip:*675149061121@pbx.telephone.com>;tag=j3XyDy2D6KmZN
To: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 1261168 BYE
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Content-Length: 0

SIP/2.0 200 OK
To: "Alex" <sip:220@pbx.telephone.com>;tag=7e21d4b4f284466ao0
From: <sip:*675149061121@pbx.telephone.com>;tag=j3XyDy2D6KmZN
Call-ID: 3827e1fc-cf3059c2@192.168.6.235
CSeq: 1261168 BYE
Via: SIP/2.0/TCP 192.95.252.102;branch=z9hG4bKF7aX7B6XFpaHS;rport=5060
Server: Cisco/SPA504G-7.6.2d
Content-Length: 0

leg b : Fusionpbx to GW

INVITE sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f SIP/2.0
Via: SIP/2.0/UDP 192.95.252.102:5080;rport;branch=z9hG4bKvvySN87UU144B
Max-Forwards: 68
From: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
CSeq: 1261163 INVITE
Contact: <sip:gw+4774c440-614d-4e5a-8773-7e9a4c159a8f@192.95.252.102:5080;transport=udp;gw=4774c440-614d-4e5a-8773-7e9a4c159a8f>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Privacy: id
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 270
X-FS-Support: update_display,send_info
Remote-Party-ID: "Telephone" <sip:5146000111@192.95.252.102>;party=calling;screen=yes;privacy=full

v=0
o=FreeSWITCH 1551598443 1551598444 IN IP4 192.95.252.102
s=FreeSWITCH
c=IN IP4 192.95.252.102
t=0 0
m=audio 31468 RTP/AVP 0 8 101 13
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20
SIP/2.0 100 Trying
CSeq: 1261163 INVITE
Via: SIP/2.0/UDP 192.95.252.102:5080;rport;branch=z9hG4bKvvySN87UU144B
From: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>
Content-Length: 0

SIP/2.0 183 Session Progress
CSeq: 1261163 INVITE
Via: SIP/2.0/UDP 192.95.252.102:5080;rport;branch=z9hG4bKvvySN87UU144B
From: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>;tag=1118261402758109
Contact: <sip:67.205.85.100;transport=udp>
Content-Type: application/sdp
Content-Length: 234

v=0
o=- 1516041391 1402757843 IN IP4 67.205.85.100
s=VoipSIP
c=IN IP4 67.205.85.100
t=0 0
m=audio 10876 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
SIP/2.0 200 OK
CSeq: 1261163 INVITE
Via: SIP/2.0/UDP 192.95.252.102:5080;rport;branch=z9hG4bKvvySN87UU144B
From: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>;tag=1118261402758109
Contact: <sip:67.205.85.100;transport=udp>
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REGISTER, INFO, NOTIFY, MESSAGE, SUBSCRIBE, REFER, PUBLISH, UPDATE
Content-Type: application/sdp
Content-Length: 210

v=0
o=- 1516041391 1402757844 IN IP4 67.205.85.100
s=VoipSIP
c=IN IP4 67.205.85.100
t=0 0
m=audio 10876 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
ACK sip:67.205.85.100;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.95.252.102:5080;rport;branch=z9hG4bKX5QjQ3rZraUQQ
Max-Forwards: 70
From: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>;tag=1118261402758109
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
CSeq: 1261163 ACK
Contact: <sip:gw+4774c440-614d-4e5a-8773-7e9a4c159a8f@192.95.252.102:5080;transport=udp;gw=4774c440-614d-4e5a-8773-7e9a4c159a8f>
Content-Length: 0

BYE sip:gw+4774c440-614d-4e5a-8773-7e9a4c159a8f@192.95.252.102:5080;transport=udp;gw=4774c440-614d-4e5a-8773-7e9a4c159a8f SIP/2.0
CSeq: 1 BYE
Via: SIP/2.0/UDP 67.205.85.100;branch=z9hG4bK181136991938281402767484
From: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>;tag=1118261402758109
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
To: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
Contact: <sip:67.205.85.100;transport=udp>
Content-Length: 0
Max-Forwards: 70

SIP/2.0 200 OK
Via: SIP/2.0/UDP 67.205.85.100;branch=z9hG4bK181136991938281402767484
From: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>;tag=1118261402758109
To: "Telephone" <sip:5146000111@192.95.252.102>;tag=pD509gXgp5B4a
Call-ID: d40a9692-b872-1237-3f98-7054d219bfc3
CSeq: 1 BYE
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Content-Length: 0
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
So this looks like it is an issue at carrier side.

In advanced gateway settings you could try putting pid in caller id settings, that will send a p-asserted header.

Don't forget to stop and start the gateway.
 

afshin

New Member
Oct 29, 2018
24
3
3
I confirm , there is no issue in carrier side , because I placed a test with another server ( based on Asterisk ) and No Caller ID as expected .
I also added pid to GW and restarted but no success .
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
You definitely need to talk with your carrier, asterisk id probably removing the callerid from the from header, the sip looked good, ask the carrier how they deal with withheld callerid. Moreover, the provider should be providing you this info when you sign up.
 

afshin

New Member
Oct 29, 2018
24
3
3
Thanks DigitalDaz , I have a resolution for my issue but maybe there is another better way to do it. I share my solution :

Right , Asterisk removes the callerid from the From Header . For Privacy call it sends out :

From: "Anonymous" <sip:anonymous@anonymous.invalid>

Carrier deal with the from header.

my GW is an NOREG and in advanced / Caller ID In From = True , It means, I am forcing the GW to send calls with my caller id in the From header , even I send out privacy=full in the header , it is ignored . Also I have to mention , if I remove the True in : Caller ID in From , I have NO CallerID .

At this point to resolve the issue I added a new outbound route with :

condition destination_number ^\*67(\d+)$(\d*)$
action set effective_caller_id_name=Anonymous
action set effective_caller_id_number=Anonymous

and make it global outbound route for all tenants . It does work properly for me , but maybe there is another way to manipulate the header somewhere else like call_privacy in dial plan manager.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
I still say really this is a carrier issue, for purposes of accountability, caller id should be getting passed somewhere eg in the frtom field and the carrier should be respecting privacy headers.
 

afshin

New Member
Oct 29, 2018
24
3
3
Do you have any idea why FusionPBX sends out GW id as : 4774c440-614d-4e5a-8773-7e9a4c159a8f ? Is ther any way to send a clean GW ip address ?

INVITE sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f SIP/2.0
To: <sip:15149061121@4774c440-614d-4e5a-8773-7e9a4c159a8f>
Contact: <sip:gw+4774c440-614d-4e5a-8773-7e9a4c159a8f@192.95.252.102:5080;transport=udp;gw=4774c440-614d-4e5a-8773-7e9a4c159a8f>
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
Though you may consider this unclean it is absolutely not, you can change the advanced settings in the gateway to something like 'extension in contact'. What you seem to have here is a non-compliant carrier. The whole idea of the contact address from a sip point of view is that this is where you are telling the carrier that you want them to send further sip messages to in this dialog. What is in it should be completely irrelevant, they should just follow the instruction you are giving them.
 

francois

New Member
Oct 3, 2019
26
9
3
56
For the record, I had the same problem here and I contacted my carrier.
They suggest to block the caller ID and not even send it to them.
Therefore the @afshin solution works perfectly for us.
 
Status
Not open for further replies.