I’m developing a multimedia application and using asterisk SIP server for session handling functions. To identify the session between two parties I tried to use call id property in SIP headers.
Unfortunately I found that the call id set by the caller is changed by Asterisk when it is received by callee.
Here is the INVITE message sent by calling application:
(Note that the call id is 23662)
<— SIP read from 10.8.155.27:12060 —>
'INVITE sip:102@10.8.155.27 SIP/2.0
Via: SIP/2.0/UDP 10.8.155.27:12060;rport;branch=z9hG4bK5449
From: sip:web@10.8.155.27;tag=27565
To: sip:102@10.8.155.27
Call-ID: 23662@10.8.155.27
CSeq: 20 INVITE
Contact: sip:web@10.8.155.27:12060
Max-Forwards: 70
User-Agent: Linphone-1.7.0/eXosip
Subject: Phone call
Expires: 120
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, REFER, SUBSCRIBE, NOTIFY, MESSAGE
Content-Type: application/sdp
Content-Length: 461
v=0
o=user3 123456 654321 IN IP4 10.8.155.5
s=A conversation
c=IN IP4 10.8.155.5
t=0 0
m=audio 7078 RTP/AVP 111 110 0 3 8 101
a=rtpmap:111 speex/16000/1
a=rtpmap:110 speex/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:3 GSM/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
m=video 6970 RTP/AVP 97 98 96
a=rtpmap:97 theora/90000
a=rtpmap:98 H263-1998/90000
a=fmtp:98 CIF=1;QCIF=1
a=rtpmap:96 MP4V-ES/90000
Here is the INVITE message forwarded by Asterisk to the callee. There the call id has been changed from ‘23662’ to ‘099ea28d4d286e0b625f4cca4d064796’.
INVITE sip:user2@10.8.155.27:10060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.8.155.27:5060;branch=z9hG4bK2a6bddff;rport
From: “web” sip:web@10.8.155.27;tag=as4baa305e
To: sip:user2@10.8.155.27:10060;transport=UDP
Contact: sip:web@10.8.155.27
Call-ID: 099ea28d4d286e0b625f4cca4d064796@10.8.155.27
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Tue, 23 Oct 2007 05:01:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 358
v=0
o=root 3075 3075 IN IP4 10.8.155.27
s=session
c=IN IP4 10.8.155.27
b=CT:384
t=0 0
m=audio 19470 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
m=video 18350 RTP/AVP 96
a=rtpmap:96 MP4V-ES/90000
a=sendrecv
Can this be prevented and have the same call id by doing any configuration to Asterisk?
I’ll be extremely pleased if you give any hint. Thanks.