[Freeswitch-users] Kill lua script from CLI
anthony.minessale at gmail.com
Tue Jan 29 20:41:58 MSK 2013
Here is a trick you can do that kind of created itself through evolution.
Use the loopback channel to execute the script and name it a job name with
// Enter this from the cli (depending on where you call it from you may not
need to escape the commas but // from the cli you will for sure.
originate loopback/set:job=1234\,answer\,park/default/inline lua:loop.lua
switch_ivr.c:1801 Transfer loopback/set:job=loop.lua,answer,park-a to
inline[lua:loop.lua at default]
// now your script is running in the dummy channel and you can hang it up
whenever you want by killing the uuid or calling "hupall manager_request
hupall manager_request job loop.lua
+OK hangup all channels matching [job]=[loop.lua] with cause:
On Tue, Jan 29, 2013 at 9:14 AM, Steven Ayre <steveayre at gmail.com> wrote:
> No. LUA doesn't have any job control right now.
> Any scripts you have running should be looping checking a condition. For
> scripts run on calls only loop while session:ready(), you can then hangup
> the call (eg from cli) and that would break the loop and end the script.
> For ones started at startup you need to have them check for a stop event,
> there are examples around.
> On 29 January 2013 10:18, Carlo Dimaggio <jaasmailing at gmail.com> wrote:
>> Hi all,
>> is there any way to kill a lua script from FS CLI?
>> I have some scripts that loop internally and I want to stop them.
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> Official FreeSWITCH Sites
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
Anthony Minessale II
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users