[Home]

Summary:ASTERISK-29191: tel: URI in Diversion header causes crash
Reporter:Mikhail Ivanov (mivanov@lanta-net.ru)Labels:
Date Opened:2020-12-02 08:23:02.000-0600Date Closed:2020-12-22 16:49:08.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip Resources/res_pjsip_diversion
Versions:16.15.0 Frequency of
Occurrence
Occasional
Related
Issues:
is related toASTERISK-29219 res_pjsip_diversion: Crash if Tel URI contains History-Info
Environment:Attachments:
Description:Asterisk crashed sometimes (randomly)
Comments:By: Asterisk Team (asteriskteam) 2020-12-02 08:23:03.998-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Mikhail Ivanov (mivanov@lanta-net.ru) 2020-12-02 08:27:33.495-0600

crashdump

By: Sean Bright (seanbright) 2020-12-02 10:37:15.109-0600

Diversion header in the response has a {{tel}} URI which causes the crash:

{noformat}
SIP/2.0 181 Call Is Being Forwarded
Via: SIP/2.0/UDP 192.168.51.205:5060;branch=z9hG4bKPjfec9fa52-fc33-4475-8f35-698aa568f3b0;received=192.168.51.205;rport=5060
From: <sip:74752429999@37.235.174.246>;tag=ebc0f9df-6d62-443d-9bfe-7b0dcc913905
To: <sip:74752718801@192.168.51.201>;tag=i801p0D659D0u8
Call-ID: d17fc6e4-278f-4613-9c4c-85840c517a0f
CSeq: 3552 INVITE
Contact: <sip:74752718801@192.168.51.201:5060>
Supported: replaces
Allow: INVITE, ACK, BYE, CANCEL, PRACK, REGISTER, INFO, REFER, NOTIFY, OPTIONS, UPDATE
Diversion: <tel:4952761626>;reason=no-answer;privacy=off
User-Agent: smg_pa_sip smg_pa_sip-3.10.1.22
Content-Length: 0
{noformat}

By: Kevin Harwell (kharwell) 2020-12-02 16:26:19.224-0600

[~seanbright] A most excellent find!

To easily replicate simply alter [this line|https://github.com/asterisk/testsuite/blob/master/tests/channels/pjsip/diversion/diversion_response_181/sipp/user2.xml#L15] in the associated testsuite test to contain a _tel_ URI and execute.