[Home]

Summary:ASTERISK-29447: Is the SIP response code accessible through the AMI
Reporter:Tom Thompson (TomThompson)Labels:
Date Opened:2021-05-24 04:35:48Date Closed:2021-06-07 12:00:00
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:18.4.0 Frequency of
Occurrence
Related
Issues:
Environment:anyAttachments:
Description:When a call is terminates only an ISDN cause code is visible in the Hangup event, even if the call is over SIP
In the Asterisk mapping of SIP->ISDN there is no 1-to-1 relationship between ISDN codes and SIP response codes. Many given ISDN cause codes can result from a number number of SIP responses. The original SIP response that terminated the call is not available in the Hangup.

Background:
Many  SIP providers do not adhere well to simple protocol "standards" , and if a call passes through a number or originating, transit and terminating providers, the level and accuracy of information provided back to the originator may be determined by the lowest-common-denominator in the chain. The result may be variable or inaccurate response codes.
As a provider of telephony systems in over 30 countries over the past 25 years, I have seen some pitiful national environments for accurate ISDN information. When SIP replaces or layer-on to good ISDN environments there is usually a further loss of data. In the formerly bad ISDN environments It can result in a digital telephony network that is little better than analogue.
However, any SIP environment, be it national or private, there are often idiosyncrasies  that can be accounted for and corrected if only the SIP response code was available.
Comments:By: Asterisk Team (asteriskteam) 2021-05-24 04:35:49.263-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. 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: Joshua C. Colp (jcolp) 2021-05-24 04:41:18.129-0500

Is this something you plan on working on? Generally feature requests, such as this, do not remain open on the issue tracker.

By: Joshua C. Colp (jcolp) 2021-05-24 04:44:52.774-0500

I should also add that you could probably combine UserEvent[1] and hangup causes[2][3] to send a specific event already, but I haven't tested it.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+ManagerAction_UserEvent
[2] https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause
[3] https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Function_HANGUPCAUSE

By: Tom Thompson (TomThompson) 2021-05-24 05:44:05.800-0500

Thank you Joshua
I had seen the HANGUPCAUSE details as a way of acquiring the 'tech' codes. I see too the UserEvent application could be used to stuff it back into the AMI.
However we are originating calls in the AMI using Originate and so these don't pass control to the originating extension in the dialplan unless the calls connect.
We had considered passing the outgoing leg to through a forwarding device in the dialplan that could relay the call as a dial, but we determined that this would be onerously convoluted and the performance overhead uncertain. Furthermore it would add a layer  of indirection to all calls, though we are needing the detailed SIP response info on a small % of calls only.  
We determined that as the information should be available to asterisk at the point of generating the Hangup event, this would be the simplest (and most obvious) source.
Our investigation of the source seems to bear this out.
We have done some internal experimentation with the source. I am happy to turn that over to you if given authority. Are you interested in seeing it?
Tom


By: Joshua C. Colp (jcolp) 2021-05-24 05:46:45.588-0500

Personally I'm not going to work on such a thing, but as it is this issue would be considered a feature request and closed out unless a patch is attached.

By: Tom Thompson (TomThompson) 2021-05-24 06:06:31.509-0500

Does that mean the best way to continue would be to close this and recreate an feature request with our current skunk offering. If so and there is a process to offer/suggest this as a feature request is available, please direct me to the appropriate documentation
TomThompson



























By: Joshua C. Colp (jcolp) 2021-05-24 06:11:42.245-0500

Features requests without patches are not accepted through the issue tracker. Features requests are openly discussed on the mailing lists, forums, and IRC [1]. Please see the Asterisk Issue Guidelines [2] for more information on feature request and patch submission.

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



By: Joshua C. Colp (jcolp) 2021-05-24 06:13:01.597-0500

If you have a patch then you can attach it here and the issue will remain open. That doesn't mean anyone will work on it, or continue to try to develop/get it into the tree.

By: Asterisk Team (asteriskteam) 2021-06-07 12:00:00.502-0500

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