[asterisk-bugs] [JIRA] (ASTERISK-26716) ari: Channels with pre-dial handlers cannot be hung up via ARI

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Thu Jan 19 16:44:10 CST 2017


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

Richard Mudgett commented on ASTERISK-26716:
--------------------------------------------

[~tompaw] The https://gerrit.asterisk.org/#/c/4530/ patch will for the most part fix the problem documented by this issue.  We had earlier discussed that it wasn't possible for that patch to fix the problem.  However, I think that the missing log message forming that conclusion was because the debug message simply was not in the code at the time [^ari_h_error.txt] was captured.  Several of the debug log messages are missing line terminators in the log while the altered code in [^tmp_core.tar] has line terminators on all added debug messages.

I also managed to simulate the [^ari_h_error.txt] problem yesterday.  I initially set up the scenario but was not able to reproduce the problem even though it should have happened.  The key was finding out that you have to be using the timerfd timing module in that scenario for the problem to happen.  The timerfd module is the only timer that uses the alert-pipe with the channel read queue.  When the alert-pipe has fewer entries in it than the read queue you can get "stuck" local channels because the alert-pipe is the only trigger to read frames out of the local channel.  I normally use the DAHDI timer module because I have cards in my test box.

> ari: Channels with pre-dial handlers cannot be hung up via ARI
> --------------------------------------------------------------
>
>                 Key: ASTERISK-26716
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26716
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_stasis
>    Affects Versions: 13.13.1
>         Environment: - platform independent -
>            Reporter: Tom Pawelek
>            Assignee: Unassigned
>         Attachments: ari_h_error, ari_h_error.txt, tmp_core.tar
>
>
> A local channel with a pre-dial handler will fail to be properly hung up in 90% of the cases - Asterisk does not send BYE/CANCEL on .hangup()
> ; Original channel
> {noformat}
> ch = client.channels.originate(endpoint="Local/12345 at cont-test", app="ari-test")
> {noformat}
> ; Dialplan
> {noformat}
> [test-handler]
> exten => testcall,1,NoOp(foo)
> exten => testcall,n,Return()
> [cont-test]
> exten => _XXX.,1,Answer()
> exten => _XXX.,n,Dial(PJSIP/bar at pstn,,b(test-handler^testcall^1(foo)))
> {noformat}
> ; Attempt to hang up
> {noformat}
> client.channels.hangup(channelId=ch_id)
> {noformat}
> Only b( ) handlers cause the issue to appear, B( ) works perfectly fine.



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



More information about the asterisk-bugs mailing list