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 'links' the two calls so I can track it listening for events.</div>
<div><br></div><div>Thanks!</div><div><br></div><div>Nicolas</div><div><br></div><div><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 11:43 AM, Rupa Schomaker <span dir="ltr"><<a href="mailto:rupa@rupa.com">rupa@rupa.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">lcr api command doesn't really return a usable dialstring (it was originally done for debug purposes). I could add an "as xml" option if needed...<br>
<br>Anyway, to do this from the dialplan:<br><br>remember that originate's usage is:<br>
<br>-USAGE <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]<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'd do another lcr lookup and then bridge to that leg's ${lcr_auto_route} value.<br>
<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Jul 21, 2009 at 10:35 AM, Nicolas Brenner <span dir="ltr"><<a href="mailto:nicolas@medularis.com" target="_blank">nicolas@medularis.com</a>></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 class="h5">
I would like to originate 2 calls from FS and then bridge them. There's no incoming call so I think there's no dialplan involved.
<div><br></div><div>What I'd like to do now is apply lcr rules to these calls. I'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 'jsrun'</div><div><br></div><div>How would you do it?</div><div><br></div><div>For what I'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 "dialplan way" 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">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>