[asterisk-bugs] [JIRA] (ASTERISK-23051) ARI: channel variables in JSON breaks passing parameters in JSON

Kinsey Moore (JIRA) noreply at issues.asterisk.org
Fri Jan 10 13:15:03 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213934#comment-213934 ] 

Kinsey Moore edited comment on ASTERISK-23051 at 1/10/14 1:14 PM:
------------------------------------------------------------------

Unfortunately, I don't think it can be as simple as suggested in the issue description given that swagger defines arrays as the only container type. Using a custom Variable swagger model with an array container might yield something like the following:

{noformat}
     { "endpoint": "SIP/200", ..... "variables":  { { "key": "name1", "value": "value1" }, { "key": "name2", "value": "value2" } } }
{noformat}

Edit: I take it back; this would rely on the same body trick as was just removed.
                
      was (Author: kmoore):
    Unfortunately, I don't think it can be as simple as suggested in the issue description given that swagger defines arrays as the only container type. Using a custom Variable swagger model with an array container might yield something like the following:

{noformat}
     { "endpoint": "SIP/200", ..... "variables":  { { "key": "name1", "value": "value1" }, { "key": "name2", "value": "value2" } } }
{noformat}
                  
> ARI: channel variables in JSON breaks passing parameters in JSON
> ----------------------------------------------------------------
>
>                 Key: ASTERISK-23051
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23051
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_ari
>    Affects Versions: 12.0.0
>            Reporter: Matt Jordan
>            Assignee: Kinsey Moore
>            Severity: Critical
>
> So, since the variables thing was added to the ARI call origination, it now acts differently from all the other calls.
> The other POST calls can all take their parameters as either url params or from an application/json body document.
> Unfortunately, the post body of the originate (POST /ari/channels) behaves differently; fields passed in the JSON object are treated as variable names, not as parameters.  For this one call, you must pass parameters in the URL.
> Ideally, this would have been just:
> {noformat}
>      { "endpoint": "SIP/200", ..... "variables":  { "name1": "value1", "name2": "value2"} }
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list