<div dir="ltr"><div><div>session:execute("lua"... = run as application in your session's thread (calling lua script will wait for completion).<br><br></div>api:execute("luarun" ... = run in separate thread with no association to the session (calling lua script will continue executing in session's thread)<br><br></div>Alternatively, you can call a different lua script or module using "require".<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 8:24 AM, Денис <span dir="ltr"><<a href="mailto:denis@ringme.ru" target="_blank">denis@ringme.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 08.02.2015 08:43, John Nash wrote:<br>
> While reading documentation I saw that to call another lua script from<br>
> inside a lua script we use ..<br>
><br>
> api = freeswitch.API();<br>
> reply = api:executeString("luarun another.lua");<br>
><br>
> But we can also run another lua script using session:execute. I was<br>
> wondering what is the difference, which one should be preferred?<br>
<br>
</div></div>on api no session variables?<br>
imho - different array of variables.<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>