<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 17, 2014 at 12:16 AM, Krandon <span dir="ltr"><<a href="mailto:krandon.bruse@gmail.com" target="_blank">krandon.bruse@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                    <span style="font-size:14px">I also wanted to add that I am now attempting to just throw channel variables in as a way to pass arguments since I cannot pass them directly to Stasis. When I attempt to originate a new call with /channels/ and then right after I get the ID, I try to /channels/{channelID}/variable?appargs=blah but get the error Channel not in Stasis application. I can see that it's sent from /res/ari/resource_channels.c in find_control (from ast_ari_channels_set_channel_var). I understand that, at that point in time, while executing other Asterisk Apps, Stasis does not "own" the channel (if I understand that correctly) - but </span><span style="font-size:14px">shouldn't it still be possible to set channel variables regardless of who owns the channel at the time the variable is attempting to be set? </span></div>
<span class="HOEnZb"><font color="#888888">
                <div><div><br></div><div>-- </div><div>KB<br></div><br></div></font></span></blockquote></div><br></div><div class="gmail_extra">A few things there:<br><br></div><div class="gmail_extra">(1) You can now originate a channel through ARI and provide your own ID - which makes it a bit easier to manage and track channels since you don't have to wait on the response to the request to know the handle.<br>
<br></div><div class="gmail_extra">(2) The body parameters of the originate POST request allow you to pass channel variables to the channel on creation. ARI will set those on the channel immediately after its creation.<br>
<br></div><div class="gmail_extra">(3) It is a little odd, but when you originate a channel, ARI does not necessarily own the created channel. If you spin it off into the dialplan, for example, it starts running dialplan - and isn't in a Stasis application. If you do originate it to a Stasis application, than I would expect you to be able to manipulate the channel once you get the StasisStart event for the channel.<br>
</div><div class="gmail_extra"><br clear="all"><br>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div><div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div>
</div></div>