I am trying to create an Sip Proxy server.I have implemented the basic call flow for the call setup but after that when I want to send to send some messages like INFO Update or Bye the sio UA reply with 481 error .I am using Linphone as my UA.Also I want to know is any other way to tell Sip UA to send Intra frame . following is the dump from wireShark please help me on this problem ....
INVITE sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;branch=z9hG4bK.BCislbG05;rport
From: <sip:[email protected]>;tag=ib-gWexLD
To: sip:[email protected]
CSeq: 20 INVITE
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Content-Length: 212
Contact: <sip:[email protected]:5062>;+sip.instance="<urn:uuid:2cc4cd7f-6bc9-436c-a83e-cd5fd1ab7647>"
User-Agent: Linphone/3.7.0 (belle-sip/1.3.0)
v=0
o=clary 68 1084 IN IP4 192.168.0.106
s=Talk
c=IN IP4 192.168.0.106
t=0 0
m=audio 7690 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 4790 RTP/AVP 103
a=rtpmap:103 VP8/90000
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:[email protected]:5062>;tag=ib-gWexLD
To: <sip:[email protected]>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
Contact: <sip:[email protected]:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>";expires=3600
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Content-Length: 0
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
To: <sip:[email protected]>;tag=122vaclar
From: <sip:[email protected]:5062>;tag=ib-gWexLD
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Content-Length: 0
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.0.50:5062;rport=5062;branch=z9hG4bK.BCislbG05
From: <sip:[email protected]:5062>;tag=ib-gWexLD
To: <sip:[email protected]>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 20 INVITE
User-Agent: Test Sip Server
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,UPDATE
Contact: <sip:[email protected]:5062;transport=UDP>;+sip.instance="<urn:uuid:9e176788-7cef-408f-bae9-8733ffa2451b>"
Content-Type: application/sdp
Content-Length: 282
v=0
o=claryicon 1983 678901 IN IP4 192.168.0.50
s=-
i=Test sip Server
c=IN IP4 192.168.0.50
t=0 0
m=audio 21483 RTP/AVP 0
a=sendrecv
a=rtcp:21483
a=rtpmap:0 PCMU/8000
m=video 21483 RTP/AVP 96
a=sendrecv
a=rtcp:21483
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
ACK sip:[email protected]:5062;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.106:5060;rport;branch=z9hG4bK.MpKbnK6Bm
From: <sip:[email protected]>;tag=ib-gWexLD
To: <sip:[email protected]>;tag=122vaclar
CSeq: 20 ACK
Call-ID: BSEs~ww7v8
Max-Forwards: 70
INFO sip:[email protected];transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
To: <sip:[email protected]>;tag=122vaclar
From: <sip:[email protected]>;tag=ib-gWexLD
CSeq: 22 INFO
Call-ID: BSEs~ww7v8
Max-Forwards: 70
Content-Type: application/media_control+xml
Content-Length: 185
User-Agent: Test Sip Server
Allow: INVITE, ACK, BYE, CANCEL, INFO,OPTIONS, MESSAGE,UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
<?xml version="1.0" encoding="utf-8" ?><media_control> <vc_primitive> <to_encoder> <picture_fast_update></picture_fast_update> </to_encoder> </vc_primitive></media_control>
SIP/2.0 481 Call/transaction does not exist
Via: SIP/2.0/UDP 192.168.0.50:5062;branch=z9hG4bK.BCislbG05;rport
From: <sip:[email protected]>;tag=ib-gWexLD
To: <sip:[email protected]>;tag=122vaclar
Call-ID: BSEs~ww7v8
CSeq: 22 INFO
Thanks in advance anything would be fine ....
You really should read up on the subjects of SIP transactions and dialogs.
To identify a dialog, a SIP UA uses the Callid value, a local tag and a remote tag. When sending a request, the local tag goes in the from header and the remote tag in the to header (which is empty in an initial message).
For the UA receiving the request, the local tag is in the To header, and the remote tag is in the From header.
So, when in your case, the Linphone is trying to match the INFO request with a local tag of '122vaclar' and a remote tag of 'ib-gWexLD', but that dialog does not exist, since the dialog initially created had a local tag of 'ib-gWexLD'.
In your responses, you are also not consistent with the URIs in the from and to tags.
Furthermore, you are re-using the branch value in the INFO request. This is a transaction id and it should never be re-used.