<div dir="ltr"><div><div>session:execute(&quot;lua&quot;... = run as application in your session&#39;s thread (calling lua script will wait for completion).<br><br></div>api:execute(&quot;luarun&quot; ... = run in separate thread with no association to the session (calling lua script will continue executing in session&#39;s thread)<br><br></div>Alternatively, you can call a different lua script or module using &quot;require&quot;.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 8:24 AM, Денис <span dir="ltr">&lt;<a href="mailto:denis@ringme.ru" target="_blank">denis@ringme.ru</a>&gt;</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>
&gt; While reading documentation I saw that to call another lua script from<br>
&gt; inside a lua script we use ..<br>
&gt;<br>
&gt; api = freeswitch.API();<br>
&gt; reply = api:executeString(&quot;luarun another.lua&quot;);<br>
&gt;<br>
&gt; But we can also run another lua script using session:execute. I was<br>
&gt; 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>