[Home]

Summary:ASTERISK-24412: [patch]Incomplete channel originate/continue handling with ARI
Reporter:Nir Simionovich (GreenfieldTech - Israel) (greenfieldtech)Labels:
Date Opened:2014-10-12 17:47:19Date Closed:2015-01-07 12:56:17.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_ari_channels
Versions:SVN 12.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ari_channels_label_1.diff
( 1) ari_channels_label_2.diff
Description:Per a discussion on the dev mailing list, stg has confirmed that currently the ARI framework will not accept dialplan labels, as part of the JSON body or the request.

This is turn causes a severe issue when working with labels, or even worse, when working with AEL.

I'm attaching a patch that will enable the functionality, by adding a simple "label" parameter to the request body. The patch currently resolves the "originate" method - not the "continue" method.
Comments:By: Nir Simionovich (GreenfieldTech - Israel) (greenfieldtech) 2014-10-12 17:49:54.487-0500

This code should be regarded as testing code. From my testing, it does what it is supposed to do, however, requires additional review to make sure I'm not breaking something that I don't see right now.

By: Nir Simionovich (GreenfieldTech - Israel) (greenfieldtech) 2014-10-13 05:36:21.794-0500

Mental note to self - Coding at midnight requires proper liquids, preferable, a Single Malt. Have no idea why I created the first patch, when I looked at it today it just seemed all wrong!

So, now the patch changed the "priority" variable in the JSON body from 'int' to 'string'. Once inside the resource, the priority is converted to a 'long int' using atol(). If the conversion is 0, then the input is a label, and we extrapolate the priority for it.

Smaller, tighter, makes more sense :-)

Would appreciate some review.

By: Scott Griepentrog (sgriepentrog) 2014-10-14 10:50:35.563-0500

For review, go ahead and post it to http://reviewboard.asterisk.org - you should have access to it with the same account credentials you use here.

By: Rusty Newton (rnewton) 2014-10-14 17:10:55.258-0500

Yup reviewboard is the route for review and feedback. See the [Code Review|https://wiki.asterisk.org/wiki/display/AST/Code+Review] process.

Edit this issue and add the reviewboard URL once you have it. Thanks!

By: Nir Simionovich (GreenfieldTech - Israel) (greenfieldtech) 2014-10-14 23:21:26.162-0500

Done

By: Richard Mudgett (rmudgett) 2014-10-21 13:37:13.847-0500

Review is now at: https://reviewboard.asterisk.org/r/4101/