<p> Attention is currently required from: Kevin Harwell. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16404">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16404/comment/61217677_f34801e0">Patch Set #2, Line 11:</a> <code style="font-family:monospace,monospace">ASTERISK-29622</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I ran Asterisk (18 at least) using the exact curl command on the issue, and it seemingly worked fine […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Hm... that's strange. I checked this asterisk-18.3.0 and current master branch.</p><p style="white-space: pre-wrap; word-wrap: break-word;">```<br>$ curl -s -X POST -u asterisk:asterisk 127.0.0.1:8088/ari/channels/externalMedia \<br>>  -H 'Content-Type: application/json; charset=utf-8' \<br>>  -d '{"app": "sdp", "external_host": "test.com:5060", "transport": "udp", "format": "ulaw", "connection_type": "client", "direction": "both", "encapsulation": "rtp"}'<br>{"message":"app cannot be empty"}</p><p style="white-space: pre-wrap; word-wrap: break-word;">$ asterisk -rx "core show version"<br>Asterisk 18.3.0 built by root @ 9d6bf8690382 on a x86_64 running Linux on 2021-04-16 05:16:08 UTC<br>```</p><p style="white-space: pre-wrap; word-wrap: break-word;">Have you run the curl command with -d option? Because if you parse the options to the url parameter, that is working.</p><p style="white-space: pre-wrap; word-wrap: break-word;">```<br>$ curl -s -X POST -u asterisk:asterisk 127.0.0.1:8088/ari/channels/externalMedia\?app=voipbin\&external_host=127.0.0.1:5090\&transport=udp\&format=ulaw</p><p style="white-space: pre-wrap; word-wrap: break-word;">{"id":"asterisk-call-5765d977d8-c4k5q-1630606830.44","name":"UnicastRTP/127.0.0.1:5090-0x7f79a0089780","state":"Down","caller":{"name":"","number":""},"connected":{"name":"","number":""},"accountcode":"","dialplan":{"context":"default","exten":"s","priority":1,"app_name":"AppDial2","app_data":"(Outgoing Line)"},"creationtime":"2021-09-02T18:20:30.533+0000","language":"en","channelvars":{"UNICASTRTP_LOCAL_PORT":"10656","UNICASTRTP_LOCAL_ADDRESS":"127.0.0.1"}}<br>```</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File res/ari/resource_channels.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16404/comment/8adf7b86_2b040393">Patch Set #2, Line 2192:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">      if (args->variables) {<br>             struct ast_json *json_variables;<br><br>            ast_ari_channels_external_media_parse_body(args->variables, args);<br>         json_variables = ast_json_object_get(args->variables, "variables");<br>              if (json_variables<br>                    && json_to_ast_variables(response, json_variables, &variables)) {<br>                 return;<br>               }<br>     }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'm missing something I think. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Because make the ast_ari_channels_external_media_parse_body() function before than parameter validation.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16404">change 16404</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/16404"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I49509c48a6cbc0fb4165bfa4f834b5e8b9ace20d </div>
<div style="display:none"> Gerrit-Change-Number: 16404 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sungtae Kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 02 Sep 2021 18:24:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>