[asterisk-bugs] [JIRA] (ASTERISK-26716) Channels with pre-dial handlers cannot be hung up via ARI
Tom Pawelek (JIRA)
noreply at issues.asterisk.org
Sat Jan 14 18:21:11 CST 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-26716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=234631#comment-234631 ]
Tom Pawelek commented on ASTERISK-26716:
----------------------------------------
I managed to capture a debug log showing the behavior. In this case, I originate a "pstn" Local channel, which executes a Dial(PJSIP/foo,,b(fix-cli)). The fix-cli subroutine is required, because this channel is inside a stasis bridge which overwrites is native CLI.
Upon sending a .hangup() instruction, only ;1 leg of the Local channel hangs up. The PJSIP (;2) never sends a BYE/CANCEL and as you can see continues with the call a few seconds later. Logs below:
# ARI Call:
client.channels.hangup(channelId=ch_id)
# Debug:
[2017-01-14 09:32:46] DEBUG[2887] channel.c: Soft-Hanging (0x20) up channel 'Local/13051002000-18001002000 at cont-fas-00000054;1'
[2017-01-14 09:32:46] DEBUG[2887] res_ari.c: Examining ARI response:
204 No Content
[2017-01-14 09:32:46] DEBUG[2887] http.c: HTTP keeping session open. status_code:204
[2017-01-14 09:32:46] DEBUG[2893] bridge_channel.c: Setting 0x7f4970085560(Local/13051002000-18001002000 at cont-fas-00000054;1) state from:0 to:1
[2017-01-14 09:32:46] DEBUG[2893] bridge_channel.c: Bridge cid-836297: pulling 0x7f4970085560(Local/13051002000-18001002000 at cont-fas-00000054;1)
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket string of length 691
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket text frame, length 691
[2017-01-14 09:32:46] VERBOSE[2893] bridge_channel.c: Channel Local/13051002000-18001002000 at cont-fas-00000054;1 left 'simple_bridge' stasis-bridge <cid-836297>
[2017-01-14 09:32:46] DEBUG[2893] bridge_channel.c: Bridge cid-836297: 0x7f4970085560(Local/13051002000-18001002000 at cont-fas-00000054;1) is leaving simple_bridge technology
[2017-01-14 09:32:46] DEBUG[2893] bridge_native_rtp.c: Bridge 'cid-836297' can not use native RTP bridge as two channels are required
[2017-01-14 09:32:46] DEBUG[2893] bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
[2017-01-14 09:32:46] DEBUG[2893] bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
[2017-01-14 09:32:46] DEBUG[2893] bridge.c: Bridge technology softmix does not have any capabilities we want.
[2017-01-14 09:32:46] DEBUG[2893] bridge.c: Chose bridge technology simple_bridge
[2017-01-14 09:32:46] DEBUG[2893] bridge.c: Bridge cid-836297 is already using the new technology.
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket string of length 697
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket text frame, length 697
[2017-01-14 09:32:46] DEBUG[2893] stasis/control.c: 1484404357.679, cid-836297: Channel leaving bridge
[2017-01-14 09:32:46] DEBUG[2893] stasis/app.c: bridge 'cid-836297': is 2 interested in mg-bridges
[2017-01-14 09:32:46] DEBUG[2893] stasis/control.c: reason: Channel was departed from bridge
[2017-01-14 09:32:46] DEBUG[2891] stasis/control.c: 1484404357.679: Channel departing bridge
[2017-01-14 09:32:46] DEBUG[2891] bridge.c: Waiting for 0x7f4970085560(Local/13051002000-18001002000 at cont-fas-00000054;1) bridge thread to die.
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket string of length 702
[2017-01-14 09:32:46] DEBUG[1317] res_http_websocket.c: Writing websocket text frame, length 702
[2017-01-14 09:32:46] DEBUG[2891] stasis/app.c: channel '1484404357.679': is 1 interested in mg-bridges
[2017-01-14 09:32:46] DEBUG[2891] channel.c: Hanging up channel 'Local/13051002000-18001002000 at cont-fas-00000054;1'
# Few seconds later:
[2017-01-14 09:33:07] DEBUG[1256] res_pjsip_session.c: Received response
[2017-01-14 09:33:07] DEBUG[1256] res_pjsip_session.c: Response is 183 Session Progress
[2017-01-14 09:33:07] DEBUG[1256] res_pjsip_session.c: Received response
[2017-01-14 09:33:07] DEBUG[1256] res_pjsip_session.c: Response is 183 Session Progress
[2017-01-14 09:33:07] VERBOSE[2892][C-00000054] app_dial.c: PJSIP/flowroute-00000081 is making progress passing it to Local/13051002000-18001002000 at cont-fas-00000054;2
# ^^ ZOMBIE
> 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: Tom Pawelek
>
> 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