[Freeswitch-users] Running LUA script asynchronously?

Giovanni Maruzzelli gmaruzz at gmail.com
Tue Jun 30 11:31:47 MSD 2015


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 at 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 at 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:
> >
> > _________________________________________________________________________
> > 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
>
> _________________________________________________________________________
> 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
>



-- 
Sincerely,

Giovanni Maruzzelli
Cell : +39-347-2665618
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150630/a207af97/attachment.html 


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