[Home]

Summary:ASTERISK-19234: Asterisk changes "From" header to "asterisk" when CALLERID(num-pres)=prohib_passed_screen is set
Reporter:effie mouzeli (manji)Labels:
Date Opened:2012-01-23 10:09:58.000-0600Date Closed:2012-01-23 16:20:47.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:
Versions:1.8.8.2 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:In the following scenario, peer 54321 dials 12345:

INVITE sip:12345@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@10.1.1.86>;tag=5ebe58983f6c0c84o3
To: <sip:12345@10.1.1.86>
Call-ID: adc7c928-b6f6d534@10.1.1.86
CSeq: 102 INVITE
Max-Forwards: 69
Contact: "54321" <sip:54321@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

In the following context, we want to set privacy=full in Remote-Party-ID but keep the caller-ID in the "From" header:

[outgoing]
exten => _X.,1,Log(NOTICE, Test)
exten => _X.,n,Set(CALLER_NUMBER=${CALLERID(num)})
exten => _X.,n,Set(CALLER_NAME=${CALLERID(name)})
exten => _X.,n,Set(CALLERID(num-pres)=prohib_passed_screen)
exten => _X.,n,Set(CALLERID(name-pres)=prohib_passed_screen)
exten => _X.,n,Set(CALLERID(num)=${CALLER_NUMBER})
exten => _X.,n,Set(CALLERID(name)=${CALLER_NAME})
exten => _X.,n,Dial(SIP/${EXTEN}@Peer)
exten => _X.,n,Hangup()

When asterisk dials peer 12345, it rewrites the "From" header  ("asterisk" <sip:asterisk@10.1.1.88>), even though we specified the caller-ID. The "Remote-Party-ID" on the other hand, is correct.

INVITE sip:12345@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@10.1.1.88>;tag=as6d2aa852
To: <sip:12345@10.1.1.87:5061>
Contact: <sip:asterisk@10.1.1.88:5060>
Call-ID: 54deebbf2bb308740e6b9ca817e693a9@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@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@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

In sip.conf  we have set:

trustrpid = yes    
sendrpid = yes

I find odd the fact that asterisk sets the "From" header to "asterisk", even when we explicitly set CALLERID(name) and CALLERID(num). If I recall correctly, the RFCs do not say that changing the "From" header is mandatory in order to preserve privacy.
Comments:By: Richard Mudgett (rmudgett) 2012-01-23 11:58:42.081-0600

This was answered in the asterisk-users thread:
http://lists.digium.com/pipermail/asterisk-users/2012-January/269610.html