Paris Stamatopoulos
2012-Jan-19  09:10 UTC
[asterisk-users] Asterisk rewrites "From" header when CALLERID(num-pres)=prohib_passed_screen is set
Hello all, 
We are testing Asterisk 1.8.8.1. In the following scenario, peer 54321 dials
12345:
INVITE sip:12345 at 10.1.1.88 SIP/2.0
Record-Route: <sip:10.1.1.86;lr=on;ftag=5ebe58983f6c0c84o3>
Via: SIP/2.0/UDP 10.1.1.86;branch=z9hG4bKa6c1.4be79d43.0
Via: SIP/2.0/UDP
192.168.4.80:5063;rport=5063;received=10.1.1.86;branch=z9hG4bK-ca013550
From: "54321" <sip:54321 at 10.1.1.86>;tag=5ebe58983f6c0c84o3
To: <sip:12345 at 10.1.1.86>
Call-ID: adc7c928-b6f6d534 at 10.1.1.86
CSeq: 102 INVITE
Max-Forwards: 69
Contact: "54321" <sip:54321 at 10.1.1.86:5060>
Expires: 240
User-Agent: Linksys/SPA942-6.1.5(a)
Content-Length: 399
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces
Content-Type: application/sdp
 
v=0
o=- 24058301 24058301 IN IP4 192.168.4.80
s=-
c=IN IP4 192.168.4.80
t=0 0
m=audio 16450 RTP/AVP 18 0 2 4 8 96 97 98 101
a=rtpmap:18 G729a/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/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:30
a=sendrecv
Peer 54321's caller ID will be blocked, since it enters the following
context:
[outgoing]
exten => _X.,1,Log(NOTICE, Test)
exten => _X.,n,Set(CALLERID(num-pres)=prohib_passed_screen)
exten => _X.,n,Set(CALLERID(name-pres)=prohib_passed_screen)
exten => _X.,n,Dial(SIP/${EXTEN}@Peer)
exten => _X.,n,Hangup()
When asterisk dials peer 12345, it rewrites the "From" header 
("asterisk" <sip:asterisk at 10.1.1.88>) instead of keeping it
intact. The "Remote-Party-ID" on the other hand, is correct.
INVITE sip:12345 at 10.1.1.87:5061 SIP/2.0
Via: SIP/2.0/UDP 10.1.1.88:5060;branch=z9hG4bK25e11cb8
Max-Forwards: 70
From: "asterisk" <sip:asterisk at 10.1.1.88>;tag=as6d2aa852
To: <sip:12345 at 10.1.1.87:5061>
Contact: <sip:asterisk at 10.1.1.88:5060>
Call-ID: 54deebbf2bb308740e6b9ca817e693a9 at 10.1.1.88:5060
CSeq: 103 INVITE
User-Agent: Asterisk 
Authorization: Digest username="asterisk",
realm="10.1.1.87", algorithm=MD5, uri="sip:12345 at
10.1.1.87:5061",
nonce="6dfc149a8a6801201ba2b28860d6df704f17daeb",
response="69d5626fcc5a24980bf641eb1f013813"
Date: Thu, 19 Jan 2012 08:57:15 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces
Remote-Party-ID: "54321" <sip:54321 at
10.1.1.88>;party=calling;privacy=full;screen=yes
Content-Type: application/sdp
Content-Length: 525
 
v=0
o=root 2107042325 2107042326 IN IP4 10.1.1.88
s=m1
c=IN IP4 10.1.1.88
b=CT:384
t=0 0
m=audio 12136 RTP/AVP 18 3 8 0 9 111 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
m=video 16724 RTP/AVP 34 98 99
a=rtpmap:34 H263/90000
a=rtpmap:98 h263-1998/90000
a=rtpmap:99 H264/90000
a=sendrecv
        
Please note that in sip.conf  we have set:
trustrpid = yes    
sendrpid = yes
Any input will be appreciated!
Regards, 
-effie
Stefan Schmidt
2012-Jan-19  10:12 UTC
[asterisk-users] Asterisk rewrites "From" header when CALLERID(num-pres)=prohib_passed_screen is set
Hello,
IMHO asterisk acts exactly as it should. How else do you think it should
it prevent sending out the callerid name or num when you set it to prohib?
Asterisk doesnt support the privacy header for outgoing calls so
changing the name and number is the only way to do this. Maybe you could
do this in your dialplan with SipAddHeader("Privacy: full") instead of
setting the prohib flag.
in the Remote-Party-ID header is a special privacy option which asterisk
sets when using this header so you will see the original values there
but privacy is also set to full.
best regards
steve
Am 19.01.12 10:10, schrieb Paris Stamatopoulos:> Hello all, 
> 
> We are testing Asterisk 1.8.8.1. In the following scenario, peer 54321
dials 12345:
> 
> INVITE sip:12345 at 10.1.1.88 SIP/2.0
> Record-Route: <sip:10.1.1.86;lr=on;ftag=5ebe58983f6c0c84o3>
> Via: SIP/2.0/UDP 10.1.1.86;branch=z9hG4bKa6c1.4be79d43.0
> Via: SIP/2.0/UDP
192.168.4.80:5063;rport=5063;received=10.1.1.86;branch=z9hG4bK-ca013550
> From: "54321" <sip:54321 at
10.1.1.86>;tag=5ebe58983f6c0c84o3
> To: <sip:12345 at 10.1.1.86>
> Call-ID: adc7c928-b6f6d534 at 10.1.1.86
> CSeq: 102 INVITE
> Max-Forwards: 69
> Contact: "54321" <sip:54321 at 10.1.1.86:5060>
> Expires: 240
> User-Agent: Linksys/SPA942-6.1.5(a)
> Content-Length: 399
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
> Supported: replaces
> Content-Type: application/sdp
>  
> v=0
> o=- 24058301 24058301 IN IP4 192.168.4.80
> s=-
> c=IN IP4 192.168.4.80
> t=0 0
> m=audio 16450 RTP/AVP 18 0 2 4 8 96 97 98 101
> a=rtpmap:18 G729a/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:2 G726-32/8000
> a=rtpmap:4 G723/8000
> a=rtpmap:8 PCMA/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:30
> a=sendrecv
> 
> Peer 54321's caller ID will be blocked, since it enters the following
context:
> 
> [outgoing]
> exten => _X.,1,Log(NOTICE, Test)
> exten => _X.,n,Set(CALLERID(num-pres)=prohib_passed_screen)
> exten => _X.,n,Set(CALLERID(name-pres)=prohib_passed_screen)
> exten => _X.,n,Dial(SIP/${EXTEN}@Peer)
> exten => _X.,n,Hangup()
> 
> When asterisk dials peer 12345, it rewrites the "From" header 
("asterisk" <sip:asterisk at 10.1.1.88>) instead of keeping it
intact. The "Remote-Party-ID" on the other hand, is correct.
> 
> INVITE sip:12345 at 10.1.1.87:5061 SIP/2.0
> Via: SIP/2.0/UDP 10.1.1.88:5060;branch=z9hG4bK25e11cb8
> Max-Forwards: 70
> From: "asterisk" <sip:asterisk at 10.1.1.88>;tag=as6d2aa852
> To: <sip:12345 at 10.1.1.87:5061>
> Contact: <sip:asterisk at 10.1.1.88:5060>
> Call-ID: 54deebbf2bb308740e6b9ca817e693a9 at 10.1.1.88:5060
> CSeq: 103 INVITE
> User-Agent: Asterisk 
> Authorization: Digest username="asterisk",
realm="10.1.1.87", algorithm=MD5, uri="sip:12345 at
10.1.1.87:5061",
nonce="6dfc149a8a6801201ba2b28860d6df704f17daeb",
response="69d5626fcc5a24980bf641eb1f013813"
> Date: Thu, 19 Jan 2012 08:57:15 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
> Supported: replaces
> Remote-Party-ID: "54321" <sip:54321 at
10.1.1.88>;party=calling;privacy=full;screen=yes
> Content-Type: application/sdp
> Content-Length: 525
>  
> v=0
> o=root 2107042325 2107042326 IN IP4 10.1.1.88
> s=m1
> c=IN IP4 10.1.1.88
> b=CT:384
> t=0 0
> m=audio 12136 RTP/AVP 18 3 8 0 9 111 101
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:9 G722/8000
> a=rtpmap:111 G726-32/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
> m=video 16724 RTP/AVP 34 98 99
> a=rtpmap:34 H263/90000
> a=rtpmap:98 h263-1998/90000
> a=rtpmap:99 H264/90000
> a=sendrecv
> 
>         
> Please note that in sip.conf  we have set:
> 
> trustrpid = yes    
> sendrpid = yes
> 
> Any input will be appreciated!
> 
> Regards, 
> 
> -effie
>  
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
F?r weitere Fragen stehen wir gerne unter voip at sil.at oder
059944 - 2440 zur Verf?gung.
Mit freundlichen Gr?ssen
-- 
Stefan Schmidt
Teamleiter VOIP // voip at sil.at // Tel 059944-2440//
-------------------------------------------------
SILVER SERVER GmbH // Lorenz-Mandl-Gasse 33/1 //
A-1160 Wien // Fax 059944-9000 // www.sil.at  //
-------------------------------------------------