[Freeswitch-users] api:execute vs session:execute

Christopher Rienzo cmrienzo at gmail.com
Mon Feb 9 16:38:30 MSK 2015


session:execute("lua"... = run as application in your session's thread
(calling lua script will wait for completion).

api:execute("luarun" ... = run in separate thread with no association to
the session (calling lua script will continue executing in session's thread)

Alternatively, you can call a different lua script or module using
"require".

On Mon, Feb 9, 2015 at 8:24 AM, Денис <denis at ringme.ru> wrote:

>
> On 08.02.2015 08:43, John Nash wrote:
> > While reading documentation I saw that to call another lua script from
> > inside a lua script we use ..
> >
> > api = freeswitch.API();
> > reply = api:executeString("luarun another.lua");
> >
> > But we can also run another lua script using session:execute. I was
> > wondering what is the difference, which one should be preferred?
>
> on api no session variables?
> imho - different array of variables.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.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/20150209/184f0dc1/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list