[Home]

Summary:ASTERISK-24110: r-uri not being set based on the contact from 200ok
Reporter:Zane Conkle (zconkle)Labels:
Date Opened:2014-07-24 10:53:39Date Closed:2014-07-25 09:43:28
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:12.4.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In later versions since 12.0.0 something got changed to where the r-uri is no longer being set to the contact field. I have provided examples from 12.0.0 as well as 12.4.0

Below is the relevant part of 200ok then the ack from asterisk. See contact URI in 200ok -- it should be set as r-uri in ACK. However, the ack comes with the IP of kamailio instead of ip of the callee. Now, parallel forking is no longer possible because the ACK cannot be forked.

So asterisk should preserve the URI from contact and use it in ACK (and the other requests within dialog that will follow -- e.g., re-INVITEs, BYE).

R-URI NOT BEING PRESERVED (12.4.0):
{code}
U 2014/07/14 19:15:01.126266 85.48.139.250:5060 -> 85.48.139.246:5060
SIP/2.0 200 OK.
To: <sip:sip200@85.48.139.250>;tag=6b7202f2.
Via: SIP/2.0/UDP 85.48.139.246:5060;rport=5060;branch=z9hG4bKPj0d81ab52-928f-4fed-8ba3-1a56fd3544ed.
Record-Route: <sip:85.48.139.250;lr=on;ftag=747ed646-18c7-4efe-a1ac-0ffe5f664bff;did=bb.52e;nat=yes>.
CSeq: 1725 INVITE.
Call-ID: 5ba53c8f-eb30-4398-963f-0f8b25f95490.
From: "LEXCORP LLC" <sip:2148647128@85.48.139.246>;tag=747ed646-18c7-4efe-a1ac-0ffe5f664bff.
Contact: "sip200" <sip:sip200@192.168.0.103:5060;transport=udp;registering_acc=register_LEXCORP_net;alias=108.206.120.218~5060~1>.
User-Agent: Jitsi2.4.4997Mac OS X.
Content-Type: application/sdp.
...

U 2014/07/14 19:15:01.127007 85.48.139.246:5060 -> 85.48.139.250:5060
ACK sip:sip200@85.48.139.250:5060;transport=udp;registering_acc=register_LEXCORP_net;alias=108.206.120.218~5060~1 SIP/2.0.
Via: SIP/2.0/UDP 85.48.139.246:5060;rport;branch=z9hG4bKPj0770a0be-5fe3-445d-bcec-7ae6c9782584.
From: "LEXCORP LLC " <sip:2148647128@85.48.139.246>;tag=747ed646-18c7-4efe-a1ac-0ffe5f664bff.
To: <sip:sip200@85.48.139.250>;tag=6b7202f2.
Call-ID: 5ba53c8f-eb30-4398-963f-0f8b25f95490.
CSeq: 1725 ACK.
Route: <sip:85.48.139.250;lr;ftag=747ed646-18c7-4efe-a1ac-0ffe5f664bff;did=bb.52e;nat=yes>.
Content-Length:  0.
.
{code}

R-URI PRESERVED (12.0.0)

{code}
U 2014/07/14 20:01:07.278904 85.48.139.250:5060 -> 85.48.139.247:5060
SIP/2.0 200 OK.
To: <sip:sip200@85.48.139.250>;tag=6ce2e959.
Via: SIP/2.0/UDP 85.48.139.247:5060;rport=5060;branch=z9hG4bKPjb20875ed-2a5e-4515-b473-9bf462548f9d.
Record-Route: <sip:85.48.139.250;lr=on;ftag=d10eaeb0-d264-4ac8-8920-cbb33c8b123f;did=adc.08f2;nat=yes>.
CSeq: 31301 INVITE.
Call-ID: b37db403-941a-4105-be19-d39aecea98da.
From: "LEXCORP LLC" <sip:2148647128@85.48.139.247>;tag=d10eaeb0-d264-4ac8-8920-cbb33c8b123f.
Contact: "sip200" <sip:sip200@192.168.0.103:5060;transport=udp;registering_acc=register_LEXCORP_net;alias=108.206.120.218~5060~1>.
User-Agent: Jitsi2.4.4997Mac OS X.
Content-Type: application/sdp.
Content-Length: 189.
.


U 2014/07/14 20:01:07.279566 85.48.139.247:5060 -> 85.48.139.250:5060
ACK sip:sip200@192.168.0.103:5060;transport=udp;registering_acc=register_LEXCORP_net;alias=108.206.120.218~5060~1 SIP/2.0.
Via: SIP/2.0/UDP 85.48.139.247:5060;rport;branch=z9hG4bKPjd92ed3c8-3592-4778-b939-3eb9ff260adf.
From: "LEXCORP LLC " <sip:2148647128@85.48.139.247>;tag=d10eaeb0-d264-4ac8-8920-cbb33c8b123f.
To: <sip:sip200@85.48.139.250>;tag=6ce2e959.
Call-ID: b37db403-941a-4105-be19-d39aecea98da.
CSeq: 31301 ACK.
Route: <sip:85.48.139.250;lr;ftag=d10eaeb0-d264-4ac8-8920-cbb33c8b123f;did=adc.08f2;nat=yes>.
Content-Length:  0.
.
{code}
Comments:By: Joshua C. Colp (jcolp) 2014-07-24 14:19:55.118-0500

Please attach the respective configuration. If you have "rewrite_contact" set this is expected because the outgoing traffic is sent to the source and the Contact is effectively ignored.

By: Zane Conkle (zconkle) 2014-07-25 09:41:04.235-0500

That was the case Josh. I completely forgot about that option. I guess what got me is it was working fine in 12.0.0 and I hadn't changed anything. rewrite_contact must not have been implemented yet in 12.0.0. You can close/delete this issue.

By: Joshua C. Colp (jcolp) 2014-07-25 09:43:28.772-0500

The issue was actually that rewrite_contact was not obeyed at all times when it should have been. This was fixed in later versions.