<div dir="ltr">Here is a trick you can do that kind of created itself through evolution.<div><br></div><div style>Use the loopback channel to execute the script and name it a job name with a variable</div><div style><br></div>
<div style>// 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.</div><div style><br></div><div>originate loopback/set:job=1234\,answer\,park/default/inline lua:loop.lua inline<br>
</div><div><div><br></div><div>switch_ivr.c:1801 Transfer loopback/set:job=loop.lua,answer,park-a to inline[lua:loop.lua@default]</div></div><div><br></div><div><br></div><div><br></div><div style>// now your script is running in the dummy channel and you can hang it up whenever you want by killing the uuid or calling &quot;hupall manager_request job loop.lua&quot;</div>
<div style><br></div><div style><br></div><div>hupall manager_request job loop.lua<br></div><div>+OK hangup all channels matching [job]=[loop.lua] with cause: MANAGER_REQUEST<br></div><div><br></div><div><br></div><div><br>
</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 29, 2013 at 9:14 AM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@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">No. LUA doesn&#39;t have any job control right now.<div><br></div><div>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.</div>


<div><br></div><div>For ones started at startup you need to have them check for a stop event, there are examples around.<br><div><br></div><div>-Steve</div><div><br></div><div><br></div><div><br><div class="gmail_quote">
<div><div class="h5">
On 29 January 2013 10:18, Carlo Dimaggio <span dir="ltr">&lt;<a href="mailto:jaasmailing@gmail.com" target="_blank">jaasmailing@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font face="Arial">Hi all,<br>
        <br>
        <font size="-1"><font face="Arial">is there any way to kill a
            lua script from FS CLI?<br>
            <font size="-1"><font face="Arial">I have some scripts that
                loop internall<font size="-1"><font face="Arial">y and I
                    w<font size="-1"><font face="Arial">ant to stop
                        them.<br>
                        <br>
                        <br>
                        <font size="-1"><font face="Arial">Regards,</font></font><br>
                      </font></font></font></font></font></font></font></font></font></font>
  </div>

<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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://wiki.freeswitch.org" target="_blank">http://wiki.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" target="_blank">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>
<br></blockquote></div><br></div></div>
<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>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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://wiki.freeswitch.org" target="_blank">http://wiki.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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900
</div>