Ok, if you want to do it from the socket api, then I need to make a &#39;as xml&#39; option to mod_lcr and give you lcr_auto_route as one of the nodes in the returned xml.  Then you can do your own substitution in the originate line...  In that case, you&#39;d call lcr twice and do:<br>
<br>originate lcr_auto_route1 &amp;bridge(lcr_auto_route2)<br><br>How soon do you need this?<br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 11:27 AM, Nicolas Brenner <span dir="ltr">&lt;<a href="mailto:nicolas@medularis.com">nicolas@medularis.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That looks like a good way to go about it.<br>
<br><div>How can I access channel variables through the socket using the api? I mean, how do I recover the value of ${lcr_auto_route}? I would need to add some other variables, like ignore_early_media=true and a uuid that &#39;links&#39; the two calls so I can track it listening for events.</div>

<div><br></div><div>Thanks!</div><div><br></div><font color="#888888"><div>Nicolas</div></font><div><div></div><div class="h5"><div><br></div><div><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 11:43 AM, Rupa Schomaker <span dir="ltr">&lt;<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">lcr api command doesn&#39;t really return a usable dialstring (it was originally done for debug purposes).  I could add an &quot;as xml&quot; option if needed...<br>

<br>Anyway, to do this from the dialplan:<br><br>remember that originate&#39;s usage is:<br>
<br>-USAGE &lt;call url&gt; &lt;exten&gt;|&amp;&lt;application_name&gt;(&lt;app_args&gt;) [&lt;dialplan&gt;] [&lt;context&gt;] [&lt;cid_name&gt;] [&lt;cid_num&gt;] [&lt;timeout_sec&gt;]<br><br>so, the first argument is the call url and the second would be an extension. so:<br>


<br>1) execute lcr for the first leg of the call<br>2) execute originate with:<br><br>originate ${lcr_auto_route} extension<br><br>extension just needs to match something in your dialplan.<br><br>In extension, you&#39;d do another lcr lookup and then bridge to that leg&#39;s ${lcr_auto_route} value.<br>


<br><br><br><div class="gmail_quote"><div><div></div><div>On Tue, Jul 21, 2009 at 10:35 AM, Nicolas Brenner <span dir="ltr">&lt;<a href="mailto:nicolas@medularis.com" target="_blank">nicolas@medularis.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
I would like to originate 2 calls from FS and then bridge them. There&#39;s no incoming call so I think there&#39;s no dialplan involved.
<div><br></div><div>What I&#39;d like to do now is apply lcr rules to these calls. I&#39;ve come up with 2 options so far: </div><div><br></div><div>1) call lcr through the socket twice (once for each phonenumber) and then originate the calls through the socket too</div>



<div>2) have a javascript file which runs the actions above, run the script through the socket with &#39;jsrun&#39;</div><div><br></div><div>How would you do it?</div><div><br></div><div>For what I&#39;ve read on the list, usually the recommended way is to stay away from javascript as much as possible because it is not as efficient as doing everything from the dialplan. Does this mean the first option is the best? or is there a &quot;dialplan way&quot; of doing it?</div>



<div><br></div><div>Thank you very much for your help!</div><div><br></div><font color="#888888"><div>Nicolas</div>
</font><br></div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">-Rupa<br>
</font><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-Rupa<br>