[asterisk-bugs] [JIRA] (ASTERISK-25819) AMI Hangup ignores hangup cause

Dialapplet (JIRA) noreply at issues.asterisk.org
Mon Feb 29 06:04:56 CST 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229760#comment-229760 ] 

Dialapplet edited comment on ASTERISK-25819 at 2/29/16 6:04 AM:
----------------------------------------------------------------

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 overwrote in channel.cpp:5854
{quote}
if (AST_CONTROL_RINGING == last_subclass) {
    ast_channel_hangupcause_set(chan, AST_CAUSE_NO_ANSWER);
}
{quote}


was (Author: dialapplet):
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}

So I think that something involving the origination process is overriding the hangup cause

> AMI Hangup ignores hangup cause
> -------------------------------
>
>                 Key: ASTERISK-25819
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25819
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/General
>    Affects Versions: 11.21.2
>            Reporter: Dialapplet
>            Severity: Minor
>
> 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}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list