Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-13 Thread Nir Simionovich
Ok, I'm now looking into implementing a similar thing with the "continue" request. The main issue that I'm seeing is this - the ast_findlabel_extension function, requires a channel and a callerid. I've tried ascertaining how i can obtain that information from within the ast_ari_channels_continue_i

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-12 Thread Nir Simionovich
Ok, I've opened an issue on JIRA ( https://issues.asterisk.org/jira/browse/ASTERISK-24412) with a small patch submission that will correct the issue at hand - for the originate requests at this point. Basically, before moving forward, I'd like to make sure I'm not off base with the implementa

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-11 Thread Nir Simionovich
So, here's what I thought - instead of modifying the existing JSON, changing from "int" to "string" in priority, I think the better way would be to add a new variable - "label". If defined, it will supersede the "priority". Judging from what I see in the code, the "arguments" from the JSON POST are

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-10 Thread Scott Griepentrog
Yes, that's the function that converts a label to a priority. You should be able to use that to enable label lookup from the rest api. On Fri, Oct 10, 2014 at 1:38 PM, Nir Simionovich wrote: > Well, > > Can I assume you are referring to the following section in the code > (pbx.c): > > 12371

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-10 Thread Nir Simionovich
Well, Can I assume you are referring to the following section in the code (pbx.c): 12371if (sscanf(pri, "%30d", &ipri) != 1) {12372 ipri = ast_findlabel_extension (chan, context ? context : ast_chan

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-09 Thread Scott Griepentrog
If you want to add the label option, my first thought would be to recommend you look at the implementation of ​app GoTo() for the api to lookup/specify a label. Then you would need to modify the channels.json in rest_api/api-docs to specify the new/different parameters to the rest methods, do a ma

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-09 Thread Nir Simionovich
"Forgive me father for I have sinned, it has been over 25 years since I've used GWBasic/Basica - please spare thy humble servant from doom, as I repent my sins and go back in time 25 years" :-) Now seriously, this may work nicely for classic dialplan, but for AEL that's a no go - don't even want t

Re: [asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-08 Thread Scott Griepentrog
The only two ARI methods I'm seeing where a priority is used are: 1) Channel origination (optionally sending channel to dialplan instead of into a Stasis app) 2) Channel continue (jump out of application into a specific point in dialplan) And yes, you are correct in pointing out that the continu

[asterisk-dev] Asterisk ARI improper usage pattern for channels REST API

2014-10-08 Thread Nir Simionovich
Hi Guys, While working on PHPARI, I've come to a realization that the channels REST API has a slight issue - primarily, its usage of the "priority" member in the REST API. Currently, the specification states that "priority" is either "int" or "long" (depending on the request). The problem