Summary: | ASTERISK-25819: AMI hangup "cause" value ignored or overridden when channel is hungup during process of origination | ||
Reporter: | Dialapplet (Dialapplet) | Labels: | |
Date Opened: | 2016-02-29 05:24:05.000-0600 | Date Closed: | 2018-01-02 08:44:22.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/General |
Versions: | 11.21.2 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | When a channel is hung up from asterisk manager during a call and a cause code is specified all works fine. But, when I try to hung up a channel that is in process of origination, it is hung up with cause 19, ignoring the cause I put on the action.
For example: I do this orginate: {quote} Action: Originate Async: true Channel: SIP/100 ... {quote} The channel is created: {quote} Event: Newchannel Channel: SIP/100-00000005 Uniqueid: 1456738121.6 ... {quote} I do the hang up action with cause code 17 (When the phone is still ringing, just to reject the call): {quote} Action: Hangup Cause: 17 Channel: SIP/100-00000005 ActionID: Hangup-100 {quote} I receive the response: {quote} ActionID: Hangup-100 Response: Success Message: Channel Hungup {quote} But the hangup event doesn't contain cause code 17: {quote} Event: Hangup Cause: 19 Channel: SIP/100-00000005 Uniqueid: 1456738121.6 ... {quote} | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-02-29 05:24:06.504-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]. By: Dialapplet (Dialapplet) 2016-02-29 05:55:43.677-0600 I edited channel.c to output hangup cause on line 2841 and the output is the following: {quote} DEBUG\[7955\]: channel.c:628 ast_channel_softhangup_withcause_locked: Setting hangupcause of channel SIP/100-00000000 to 17 (is 16 now) DEBUG\[7955\]: channel.c:2662 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/100-00000000' DEBUG\[7980\]\[C-00000000\]: channel.c:2841 ast_hangup: Hanging up channel 'SIP/100-00000000' with cause '19' {quote} The hangup cause is overwritten in channel.cpp:5854 {quote} if (AST_CONTROL_RINGING == last_subclass) { ast_channel_hangupcause_set(chan, AST_CAUSE_NO_ANSWER); } {quote} By: Rusty Newton (rnewton) 2016-03-01 13:45:33.313-0600 Thanks and have you looked or tested to see if this issue is present in 13? By: Dialapplet (Dialapplet) 2016-03-02 02:33:02.000-0600 No, I didn't. We are working on a integration with version 13 but currently our software it's incompatible with the new changes since version 12 involving the AMI events By: Joshua C. Colp (jcolp) 2017-12-18 08:48:30.576-0600 Asterisk 11 is no longer supported so confirmation of this against 13 would be good. Things have changed there so it may no longer be applicable. By: Asterisk Team (asteriskteam) 2018-01-02 08:44:22.661-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 |