[Home]

Summary:ASTERISK-28243: Corrupted SIP after handling a 302 redirect
Reporter:laszlovl (lvl)Labels:pjsip
Date Opened:2019-01-15 03:31:53.000-0600Date Closed:2020-01-14 11:13:33.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:16.1.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-28312 res_pjsip_diversion: Corrupted SIP Diversion field after handling a 302 redirect
Environment:Attachments:
Description:After handling a 302 redirect, Asterisk starts sending corrupted SIP headers for the remainder of that call.

This did not occur in 16.0.1 and is reproducible for me 95% of the time with a basic scenario of A calling B, B redirecting to C, and C answering.

A couple of examples of the SIP transmitted by Asterisk, taken directly from the console after "pjsip set logger on":

{quote}
SIP/2.0 200 OK
Via: SIP/2.0/UDP ip:8065;rport=8065;received=ip;branch=z9hG4bK1693.a19da1224aba5ecdfadfc7877b4ed0ed.0
Via: SIP/2.0/UDP ip;branch=z9hG4bK1693.19407339547949d0aa707e6d2062277c.0
Via: SIP/2.0/UDP ip:48708;rport=48708;received=ip;branch=z9hG4bKPjae31d1a5-ce0e-4075-9024-4ea10e2bf316
Record-Route: <sip:ip:8065;lr;ftag=d172a719-a571-41b4-ac0e-9426e6cdacfd;did=de9.8851>
Record-Route: <sip:ip;lr>
Call-ID: 85fc438f-e060-4235-a12b-8abf12d194ac
From: <sip:phone_17940_0@domain.com>;tag=d172a719-a571-41b4-ac0e-9426e6cdacfd
To: <sip:202@domain.com>;tag=b04b4eb8-e953-46a4-a00a-df91dadc8b14
CSeq: 4124 INVITE
Server: PBX
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE

{quote}

{quote}
SIP/2.0 200 OK
Via: SIP/2.0/UDP ip:8065;rport=8065;received=ip;branch=z9hG4bK4087.5f49d7eba2c76f74284867007fbcd30a.0
Via: SIP/2.0/UDP ip;branch=z9hG4bK4087.606cdb260641f1475c946106a64bc3e6.0
Via: SIP/2.0/UDP ip:41084;rport=41084;received=ip;branch=z9hG4bKPj07877751-1fc3-4870-96f5-3f07228810da
Record-Route: <sip:ip:8065;lr;ftag=64708ee0-bcd2-4baa-854a-2bc12b2f210e;did=88b.ab92>
Record-Route: <sip:ip;lr>
Call-ID: 007d3cb6-8304-4ae6-a3c7-f65a8e42a3d9
From: <sip:phone_17940_0@domain.com>;tag=64708ee0-bcd2-4baa-854a-2bc12b2f210e
To: <sip:202@domain.com>;tag=23944ff9-c67b-417f-8b60-f38295921932
CSeq: 1568 INVITE
Server: PBX
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
phone_179: <sip:~~s~~@domain.com>;reason=unknown
{quote}

{quote}
SIP/2.0 200 OK
Via: SIP/2.0/UDP ip:8065;rport=8065;received=ip;branch=z9hG4bK18d.87385f4d3e56bdb07d67390e49ebbd65.0
Via: SIP/2.0/UDP ip;branch=z9hG4bK18d.f9ad907dee3ca8576b87347a65443bf8.0
Via: SIP/2.0/UDP ip:45827;rport=45827;received=ip;branch=z9hG4bKPjbadc1081-ef39-4ef2-9fc3-332b35b57d4e
Record-Route: <sip:ip:8065;lr;ftag=ed214f4a-56ae-4285-a911-dfc79925f0d1;did=0e.0be2>
Record-Route: <sip:ip;lr>
Call-ID: 6f608fd0-1355-427a-9a81-e07997730698
From: <sip:phone_17940_0@domain.com>;tag=ed214f4a-56ae-4285-a911-dfc79925f0d1
To: <sip:202@domain.com>;tag=053682e9-3c8a-4be2-962e-4cb9d51779b9
CSeq: 15645 INVITE
Server: PBX
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
P
{quote}
Comments:By: Asterisk Team (asteriskteam) 2019-01-15 03:31:54.288-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Kevin Harwell (kharwell) 2019-01-16 12:38:11.323-0600

I'm not seeing any corruption when I run a redirect scenario (A calling B, B redirecting to C, and C answering).

Please attach a full Asterisk debug log [1] with SIP tracing enabled of the issue at the time of occurrence. Also please attach relevant configuration data used including your dialplan along with steps to reproduce.

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Asterisk Team (asteriskteam) 2019-01-31 12:00:01.087-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines