[Freeswitch-users] Best way to bridge 2 calls with LCR?

Nicolas Brenner nicolas at medularis.com
Tue Jul 21 09:27:07 PDT 2009


That looks like a good way to go about it.

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.

Thanks!

Nicolas


On Tue, Jul 21, 2009 at 11:43 AM, Rupa Schomaker <rupa at rupa.com> wrote:

> 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...
>
> Anyway, to do this from the dialplan:
>
> remember that originate's usage is:
>
> -USAGE <call url> <exten>|&<application_name>(<app_args>) [<dialplan>]
> [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
>
> so, the first argument is the call url and the second would be an
> extension. so:
>
> 1) execute lcr for the first leg of the call
> 2) execute originate with:
>
> originate ${lcr_auto_route} extension
>
> extension just needs to match something in your dialplan.
>
> In extension, you'd do another lcr lookup and then bridge to that leg's
> ${lcr_auto_route} value.
>
>
>
> On Tue, Jul 21, 2009 at 10:35 AM, Nicolas Brenner <nicolas at medularis.com>wrote:
>
>> 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.
>> What I'd like to do now is apply lcr rules to these calls. I've come up
>> with 2 options so far:
>>
>> 1) call lcr through the socket twice (once for each phonenumber) and then
>> originate the calls through the socket too
>> 2) have a javascript file which runs the actions above, run the script
>> through the socket with 'jsrun'
>>
>> How would you do it?
>>
>> 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?
>>
>> Thank you very much for your help!
>>
>> Nicolas
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> -Rupa
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090721/191199b9/attachment-0001.html 


More information about the FreeSWITCH-users mailing list