[Home]

Summary:ASTERISK-27949: res_pjsip_rfc3326: A lot of endpoints do not correctly handle two Reason headers
Reporter:Ross Beer (rossbeer)Labels:pjsip
Date Opened:2018-07-02 10:53:59Date Closed:2018-07-09 05:02:09
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_rfc3326
Versions:13.21.1 15.4.1 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-27554 res_pjsip_rfc3326: Order of 'Reason' headers break many endpoints
Environment:CentOS 7Attachments:
Description:A lot of endpoints such as Cisco, Grandstream and Yealink have an issue with multiple 'Reason' headers.

Removing the second Q.850 Reason header resolves the 'Answered Elsewhere' issue on all.

It's not possible to remove the Q.850 header totally as this is used to pass hangup reasons between asterisk servers and other SIP services.

Therefore a configurable option per endpoint would resolve this issue.
Comments:By: Asterisk Team (asteriskteam) 2018-07-02 10:54:01.258-0500

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].

By: Kevin Harwell (kharwell) 2018-07-02 14:05:31.857-0500

According to [rfc3326|https://tools.ietf.org/html/rfc3326] it appears multiple reason headers are allowed as long as they have different protocol values.

Are you saying Asterisk sends out multiple reason headers with the same protocol (although it appears it doesn't)? If so yeah that sounds like a bug. Otherwise, this feels like a feature request.

By: Ross Beer (rossbeer) 2018-07-03 05:30:00.566-0500

Asterisk is not doing anything wrong at all. It follows rfc3326 perfectly, however, the majority of phones have issues when there are two headers.

There should be a patch to help overcome this shortly.

By: George Joseph (gjoseph) 2018-07-05 07:21:23.293-0500

Are the phones expecting the specific string "Call completed elsewhere"?

I ask because we only send a "SIP" protocol reason code if the reason code is ANSWERED_ELSEWHERE so if we suppress the Q.850 Reason, then the phones won't get any reason at all for reasons other than ANSWERED_ELSEWHERE.

To fix this, I wanted to use the ast_str2cause() function to generate a "SIP" Reason header for all reason codes BUT it returns simply "Answered elsewhere" for the ANSWERED_ELSEWHERE code and I can't change that.  Also is getting more SIP reason headers going to confuse the phones further?

If we don't generate the extra SIP reason codes, should we suppress the Q.850 response ONLY for ASWERED_ELSEWHERE?  I.E.  Should the option be "suppress_q850_reasons" or "suppress_q850_answered_elsewhere_reason"?




By: Ross Beer (rossbeer) 2018-07-05 08:34:18.730-0500

I've tested with only setting the "SIP" reason header and the phones work correctly with only one Reason header or no header at all. Therefore I think the best option would be to suppress the Q.850 reason all of the time.

Due to the above, I believe the option should be "suppress_q850_reasons"

By: Friendly Automation (friendly-automation) 2018-07-09 05:02:11.780-0500

Change 9360 merged by Jenkins2:
res_pjsip:  Add 'suppress_q850_reason_headers' option to endpoint

[https://gerrit.asterisk.org/9360|https://gerrit.asterisk.org/9360]

By: Friendly Automation (friendly-automation) 2018-07-09 05:21:26.818-0500

Change 9359 merged by Joshua Colp:
res_pjsip:  Add 'suppress_q850_reason_headers' option to endpoint

[https://gerrit.asterisk.org/9359|https://gerrit.asterisk.org/9359]

By: Friendly Automation (friendly-automation) 2018-07-09 05:21:37.252-0500

Change 9358 merged by Joshua Colp:
res_pjsip:  Add 'suppress_q850_reason_headers' option to endpoint

[https://gerrit.asterisk.org/9358|https://gerrit.asterisk.org/9358]