[Freeswitch-users] LUA: Independent control of each call leg.

Michael Collins msc at freeswitch.org
Fri Jul 31 11:53:40 PDT 2009


The level of control you need really isn't served by doing scripting from
the dialplan. I highly recommend using ESL and the event socket. It will
mean a bit of a paradigm shift in your coding, but with that shift comes a
lot of power and control over what you can do with the calls - really
limited only by your imagination.

-MC

On Fri, Jul 31, 2009 at 8:01 AM, peely <freeswitch at peely.com> wrote:

>
> Hi,
>
> I'm trying to develop an application using lua and need to control the
> inbound and outbound legs independently, even when they are switched
> together.
>
> I can initiate the outbound session but I can't seem to bridge without
> losing control of the script.
>
> For example, if I use:
>
>
>        local api = freeswitch.API();
>        inSession = session;
>        inSession:answer();
>        inSession:setAutoHangup(false);
>
>
>        egSession = freeswitch.Session("sofia/default/mynum at mydomain.com");
>        egSession:setAutoHangup(false);
>
>        if egSession:ready() then
>                api:execute("uuid_bridge",inSession.uuid .. " " ..
> egSession.uuid);
>        end
>
>        while egSession:ready() do
>                inSession:sleep(1000);
>        end
>
> Then I lose the script entirely, and if I use:
>
>        inSession:execute("bridge", "sofia/default/mynum at mydomain.com")
>
> Then I lose the ability to control the call whilst the outbound is in
> progress.
>
> Does anyone know a way I can allow ingress to egress calling whilst still
> maintaining script control mid-call? I also need to ingress to hear
> provisional speech during outbound connect. I've looked at conferencing but
> there seems to be quite a lot of automated messaging.
>
>
>
> Thanks,
>
>
> Neil.
>
> --
> View this message in context:
> http://www.nabble.com/LUA%3A-Independent-control-of-each-call-leg.-tp24744087p24744087.html
> Sent from the Freeswitch-users mailing list archive at Nabble.com.
>
>
> _______________________________________________
> 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/20090731/b354b6ef/attachment-0002.html 


More information about the FreeSWITCH-users mailing list