Thank you very much for the offer, but I don't want to bother you with this.<br>
<br><div>I can just parse the string returned by lcr and get the gateway, that's all I really need to create my complete originate command.</div><div><br></div><div>I am using the socket api because it is easier for me to understand how to do it, nevertheless I'd really like to know how to do it with the dialplan.</div>
<div><br></div><div>What I don't understand very well about using the dialplan for this, is how to do the first originate command (which I need to do using the socket api). What puzzles me is that according to the originate syntax, I need to use an extension or call an application, yet for the first call I would have to use a dummy extension as I only need to hit the dialplan section that calls lcr once to originate the first call with an extension that hits the section of the dialplan where lcr gets called again and the calls get bridged.</div>
<div><br></div><div>I'm thinking something like this:</div><div><br></div><div>1) call originate from socket api to hit dialplan section that does all the work (this originate command is what I don't understand, is there another way of "hitting the dialplan" besides calling originate?)</div>
<div><br></div><div>2) hit dialplan section which calls lcr for first number and bridges to an extension</div><div><br></div><div>3) the extension calls lcr fir the second number and originates the second call</div><div><br>
</div><div>On steps 2 and 3 I could just use set data to set the additional variables I need. The first step is what troubles me.</div><div><br></div><div><br></div><div>Thank you!</div><div><br></div><div><br></div><div>
Nicolas</div><div><br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 12:54 PM, 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;">
Ok, if you want to do it from the socket api, then I need to make a 'as xml' 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'd call lcr twice and do:<br>
<br>originate lcr_auto_route1 &bridge(lcr_auto_route2)<br><br>How soon do you need this?<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Jul 21, 2009 at 11:27 AM, Nicolas Brenner <span dir="ltr"><<a href="mailto:nicolas@medularis.com" target="_blank">nicolas@medularis.com</a>></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 'links' 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><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" target="_blank">rupa@rupa.com</a>></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'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>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>
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" 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" 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>-Rupa<br>
</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></div>