[Freeswitch-users] Originate and bridge with lua
Nik Middleton
nik.middleton at noblesolutions.co.uk
Wed Feb 18 11:53:51 PST 2009
I'm trying to build an emergency broadcasting solution.
So I place a call, and have ivr in the lua script. But I also want to
give them the option of speaking to someone.
If they hit the option to speak to someone, while I can fire an event to
originate a call, I'm not sure how I could bridge the 2 call legs.
Regards,
-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Michael Collins
Sent: 18 February 2009 19:41
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] Originate and bridge with lua
Nik,
What are you building? I'm wondering if this is the correct approach
for your application. You might be better off using the even socket
and controlling your calls from a central point.
-MC
On Wed, Feb 18, 2009 at 11:26 AM, Nik Middleton
<nik.middleton at noblesolutions.co.uk> wrote:
> Hi Guys,
>
>
>
> It's not clear from the docs how I can originate a call from within an
lua
> script
>
>
>
> This what works in js,
>
>
>
> Question. How do I instantiate a new session, do I use the execute to
dial,
> and same for bridge?
>
>
>
> Regards,
>
>
>
> if (!first_session.ready())
>
>
>
> var new_session = new Session(tdial-string);
>
>
>
> if (!first_session.ready()) {
>
> disp_call(DROP)
>
> exit();
>
>
>
>
>
>
>
> new_session.answer();
>
>
>
> if (new_session.ready()) {
>
> bridge(first_session, new_session);
>
> }
>
> _______________________________________________
> 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
>
>
_______________________________________________
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
More information about the FreeSWITCH-users
mailing list