[Freeswitch-users] Originate and bridge with lua

Nik Middleton nik.middleton at noblesolutions.co.uk
Wed Feb 18 11:26:48 PST 2009


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);

            }                       

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090218/999668e0/attachment-0002.html 


More information about the FreeSWITCH-users mailing list