<div dir="ltr"><div>Thanks Joshua, yes it works by directly passing the variables to originate.<br><br></div><div>Thanks,<br></div>Nitesh<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 5, 2016 at 4:30 PM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nitesh Bansal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hello,<br>
<br>
I want to use ARI node client library to initiate a call, i'm using the<br>
sample code<br>
from the ari example 'bridge-move.js', the code is running fine.<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/ARI+and+Bridges%3A+Bridge+Operations#ARIandBridges:BridgeOperations-bridge-move.js" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/ARI+and+Bridges%3A+Bridge+Operations#ARIandBridges:BridgeOperations-bridge-move.js</a><br>
But now before initiating the call, I want to be able to add a 'Route'<br>
header in<br>
the outgoing call placed, I'm trying to achieve it by adding a channel<br>
variable, it seems<br>
that it isn't working, I don't see any route header added in the<br>
outgoing INVITE.<br>
<br>
This is my code in the originate function:<br>
channel.setChannelVar({variable : "SIPADDHEADER", value : "Route :<br>
</span><a href="mailto:nbansal@iptel.org" target="_blank">nbansal@iptel.org</a> <mailto:<a href="mailto:nbansal@iptel.org" target="_blank">nbansal@iptel.org</a>>"});<br>
</blockquote>
<br>
You need to pass in the variables to set on the originate itself using the variables argument, and not set it afterwards. This should work as you expect/need.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" rel="noreferrer" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" rel="noreferrer" target="_blank">www.asterisk.org</a><br>
<br>
<br>
_______________________________________________<br>
asterisk-app-dev mailing list<br>
<a href="mailto:asterisk-app-dev@lists.digium.com" target="_blank">asterisk-app-dev@lists.digium.com</a><br>
<a href="http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev" rel="noreferrer" target="_blank">http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev</a><br>
</font></span></blockquote></div><br></div>