[Home]

Summary:ASTERISK-28312: res_pjsip_diversion: Corrupted SIP Diversion field after handling a 302 redirect
Reporter:Alex Odrov (AlexOdrov)Labels:pjsip
Date Opened:2019-02-28 02:18:08.000-0600Date Closed:2019-03-04 05:49:32.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_diversion
Versions:13.24.1 16.2.0 Frequency of
Occurrence
Frequent
Related
Issues:
is related toASTERISK-28243 Corrupted SIP after handling a 302 redirect
Environment:VmWare virtual server with CentOS Linux release 7.6.1810 x86_64Attachments:( 0) debug_log_123456
( 1) dump_302.pcap
Description:After handling a 302 redirect, Asterisk starts sending corrupted SIP headers for the remainder of that call:
\000\000\000\000\000\000\000\000\000: <sip:0986010@10.200.32.222>;reason=unconditional
instead of
Diversion: <sip:0986010@10.200.32.222>;reason=unconditional

The same issue as ASTERISK-28243
Comments:By: Asterisk Team (asteriskteam) 2019-02-28 02:18:09.315-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: Alex Odrov (AlexOdrov) 2019-02-28 02:19:43.247-0600

Network dump of the issue

By: Alex Odrov (AlexOdrov) 2019-02-28 02:20:08.585-0600

Trace file

By: Joshua C. Colp (jcolp) 2019-02-28 05:18:34.792-0600

I've gone through both the packet capture and the debug log and I'm not seeing what you've stated. Can you specify where exactly it is within these?

By: Alex Odrov (AlexOdrov) 2019-02-28 05:24:24.318-0600

Packet capture - frame 19, message header after Allow field

Frame 19: 964 bytes on wire (7712 bits), 964 bytes captured (7712 bits)
Ethernet II, Src: Vmware_82:2a:18 (00:50:56:82:2a:18), Dst: Cisco_1a:8c:00 (00:21:56:1a:8c:00)
Internet Protocol Version 4, Src: 10.200.32.222, Dst: 10.199.251.2
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Session Initiation Protocol (200)
   Status-Line: SIP/2.0 200 OK
   Message Header
       Via: SIP/2.0/UDP 10.199.251.2:5060;rport=5060;received=10.199.251.2;branch=z9hG4bK3622178565
       Call-ID: 1_2384255746@10.199.251.2
       From: "0986011" <sip:0986011@10.200.32.222>;tag=4127690886
       To: <sip:0986010@10.200.32.222>;tag=89e5a007-a5f0-472b-a527-ba5118dd864c
       CSeq: 2 INVITE
       Server: Asterisk PBX 16.2.0
       Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
       \000\000\000\000\000\000\000\000E: <sip:0986010@10.200.32.222>;reason=unconditional
       Contact: <sip:10.200.32.222:5060>
...


By: Joshua C. Colp (jcolp) 2019-02-28 08:38:59.834-0600

Courtesy of [~seanbright] the problem is most likely the same underlying thing as https://gerrit.asterisk.org/c/asterisk/+/10652 and the fix would be similar.

By: Alex Odrov (AlexOdrov) 2019-03-01 00:09:08.514-0600

I've tested patch - works fine.
Thank you!

By: Friendly Automation (friendly-automation) 2019-03-04 05:49:33.460-0600

Change 11067 merged by Friendly Automation:
res_pjsip_diversion: Use static pj_str_t for Diversion header names

[https://gerrit.asterisk.org/c/asterisk/+/11067|https://gerrit.asterisk.org/c/asterisk/+/11067]

By: Friendly Automation (friendly-automation) 2019-03-04 06:15:26.644-0600

Change 11069 merged by Friendly Automation:
res_pjsip_diversion: Use static pj_str_t for Diversion header names

[https://gerrit.asterisk.org/c/asterisk/+/11069|https://gerrit.asterisk.org/c/asterisk/+/11069]

By: Friendly Automation (friendly-automation) 2019-03-04 06:17:25.830-0600

Change 11068 merged by Joshua Colp:
res_pjsip_diversion: Use static pj_str_t for Diversion header names

[https://gerrit.asterisk.org/c/asterisk/+/11068|https://gerrit.asterisk.org/c/asterisk/+/11068]