[Home]

Summary:ASTERISK-24043: ARI /continue fails to actually continue into the dialplan
Reporter:Krandon Bruse (krandonbruse)Labels:
Date Opened:2014-07-14 18:51:27Date Closed:2014-08-19 11:24:11
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_ari
Versions:12.4.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux Attachments:( 0) asterisk_console.log
( 1) dialplan_show_default.txt
( 2) stasis.log
( 3) stasis-continue.diff
Description:When using /continue (https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Channels+REST+API#Asterisk12ChannelsRESTAPI-continueInDialplan) the channel immediately hangs up/is destroyed.

Sample case #1 (working):

Call is originated with a POST to /channels with reference ID chanA and endpoint defined as a SIP call to a number (SIP/vendor/12565551323). Defined is the dialplan to drop the call into - default,1,1

In extensions.conf - default 1,1 is Stasis(app, args). Once the Stasis app issues the command /continue, Stasis receives a StasisEnd event - and the call resumes through the dialplan, as expected.

Sample case #2 (broken/not implemented):

Call is originated with a POST to /channels with reference ID chanB and endpoint defined as a SIP call to a number (SIP/vendor/12565551323). A context, priority and extension is NOT defined - instead the (Stasis)App and AppArgs are defined. The call gets dropped into the Stasis app as expected, as well as channeldestroyed events in the case that the initial outbound call fails (which does not happen in Case #1, as it never reaches dialplan, also to be expected but worth noting).

Stasis app then calls /continue with query arguments context=default&priority=1&exten=1. Asterisk immediately hangs up the call and the channeldestroyed and stasisend events are received instead of the expected "redirect" behavior.

This prohibits the ability of Stasis apps to throw calls into other extensions to be resumed by other stasis apps/any other use case.

Attached are full logs of the Asterisk output (with verbose 10 and debug 10) as well as the full Stasis dump (json decoded into little arrays)
Comments:By: Krandon Bruse (krandonbruse) 2014-07-17 07:26:09.767-0500

Been hacking away and have something that is at least working. Not sure if it's the best implementation or not, but working for us now.


By: Krandon Bruse (krandonbruse) 2014-07-17 07:32:01.857-0500

I am somewhat breaking the rules - I signed the license agreement but have not gotten accepted yet. However, since there was a bounty tied to it, I wanted to make sure it was resolved.

By: Rusty Newton (rnewton) 2014-07-17 09:36:27.432-0500

Hey Brandon!

No worries, simply re-attach the patch to the issue after Digium legal validates your license.

Feel free to go ahead and put the patch on Reviewboard. Here is a link to the [Code Review process|https://wiki.asterisk.org/wiki/display/AST/Code+Review].