[asterisk-dev] [Code Review] 3917: ARI: /channels/continue doesn't work on a channel originated to a Stasis application with no PBX

Jonathan Rose reviewboard at asterisk.org
Mon Aug 18 10:27:35 CDT 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 18, 2014, 10:27 a.m.)

Review request for Asterisk Developers.


Add comment explaining need for unlinking the stasis control.

Bugs: ASTERISK-24043

Repository: Asterisk


Steps for reproduction:

* one extension in dial plan
exten => 1000,1,NoOp(Show me something running in verbosity 3 please)

* Start a websocket listening for a stasis application
I use the websocket echo test to listen for application 'hello'

* Use the command POST /channels to call an endpoint and put it into stasis
I used the args endpoint='SIP/1601', app='hello', channelID='test'

* Use the POST /channels/{channelID}/continue command to make the channel
continue into the PBX I used the args channelID='test', context='default',
extension='1000', priority=1

* The channel should leave stasis and start a new life in the PBX. Or to
simplify, I should see a StasisEnd event on the websocket and I should see
extension 1000 executing on the SIP/1601-xxxxxxxx channel since I run at
verbosity 3.

Actual results prior to the patch:
* StasisEnd is received, but the channel never enters the PBX and I don't
see my NoOp application being ran.

The patch solves this problem by calling ast_pbx_run_args on the channel
before it would leave the stasis_app_exec function when there isn't a PBX
running on the channel and when the channel isn't hung up.

Patch: stasis-continue.diff submitted by Krandon Bruze

Diffs (updated)

  /branches/12/res/res_stasis.c 421079 

Diff: https://reviewboard.asterisk.org/r/3917/diff/


Ran through reproduction with and without patch to confirm that the issue existed and that the patch fixes the issue.


Jonathan Rose

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140818/d6829b9c/attachment.html>

More information about the asterisk-dev mailing list