<div dir="ltr"><div>You execute &quot;luarun script.lua argument1 argument2&quot;, and the script will be executed in its own thread. <br><br>You can execute luarun from a lua script too.<br><br></div>-giovanni<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 30, 2015 at 8:00 AM, Stanislav Sinyagin <span dir="ltr">&lt;<a href="mailto:ssinyagin@gmail.com" target="_blank">ssinyagin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">you can have an ESL listener, subscribing to the channel initiation<br>
event (CHANNEL_CALLSTATE or CHANNEL_ANSWER), or you can use the<br>
&quot;system&quot; application which would run a small shell script, and that<br>
script would start a process in background.<br>
<br>
The first option is much safer. In the second option, you need to<br>
watch out that the process UID and priority are not destroying the<br>
system.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Tue, Jun 30, 2015 at 7:11 AM, Yehavi Bourvine<br>
&lt;<a href="mailto:yehavi.bourvine@gmail.com">yehavi.bourvine@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt;   I would like to add a small functionality to our PBX: when someone calls<br>
&gt; an emergency number, in parallel to the call, an Email will be sent to our<br>
&gt; security personel, and a call will be initiated to the security center<br>
&gt; telling them that extension XXX called an emergency number.<br>
&gt;<br>
&gt; I would like this process to run in parallel to the original call. How can I<br>
&gt; do it?<br>
&gt;<br>
&gt; - I prefer calling a LUA script from the dialplan, but it will stall the<br>
&gt; user&#39;s call; can it be run in parallel?<br>
&gt; - If not, I&#39;ll probably use ESL.  What is the best event filter string to<br>
&gt; get informed only about call initiation?<br>
&gt;<br>
&gt;              Thanks! __Yehavi:<br>
&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><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" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Sincerely,<br><br>Giovanni Maruzzelli<br>Cell : +39-347-2665618<br></div>
</div>