You execute "luarun script.lua argument1 argument2", and the script will be executed in its own thread.

You can execute luarun from a lua script too.

-giovanni

On Tue, Jun 30, 2015 at 8:00 AM, Stanislav Sinyagin <ssinyagin@gmail.com> wrote:
you can have an ESL listener, subscribing to the channel initiation
event (CHANNEL_CALLSTATE or CHANNEL_ANSWER), or you can use the
"system" application which would run a small shell script, and that
script would start a process in background.

The first option is much safer. In the second option, you need to
watch out that the process UID and priority are not destroying the
system.



On Tue, Jun 30, 2015 at 7:11 AM, Yehavi Bourvine
<yehavi.bourvine@gmail.com> wrote:
> Hi,
>
>   I would like to add a small functionality to our PBX: when someone calls
> an emergency number, in parallel to the call, an Email will be sent to our
> security personel, and a call will be initiated to the security center
> telling them that extension XXX called an emergency number.
>
> I would like this process to run in parallel to the original call. How can I
> do it?
>
> - I prefer calling a LUA script from the dialplan, but it will stall the
> user's call; can it be run in parallel?
> - If not, I'll probably use ESL.  What is the best event filter string to
> get informed only about call initiation?
>
>              Thanks! __Yehavi:
>



--
Sincerely,

Giovanni Maruzzelli
Cell : +39-347-2665618