<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Kind of, all of those solutions consider the script exiting an
    'error'. I am looking for something that exits without considering
    it an error and thus does not emit an [ERR] log.<br>
    <br>
    On 3:59 PM, Peter Olsson wrote:
    <blockquote
cite="mid:%3C1FFF97C269757C458224B7C895F35F1504E178@cantor.std.visionutv.se%3E"
      type="cite">
      <pre wrap="">Maybe this is what you are looking for?

commit 09ad887948f7513725ca8b53bdfe721d9008e73b
Author: Anthony Minessale <a class="moz-txt-link-rfc2396E" href="mailto:anthm@freeswitch.org">&lt;anthm@freeswitch.org&gt;</a>
Date:   Fri Jan 27 19:03:04 2012 -0600

    FS-3841 --resolve ok return the string "die" or "exit" from hanguphook to cause an error or call s:destroy("any err message"); either should now halt the script


________________________________________
Fr&aring;n: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [<a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] f&amp;#246;r Adam Kelloway [<a class="moz-txt-link-abbreviated" href="mailto:adam.kelloway@newpace.ca">adam.kelloway@newpace.ca</a>]
Skickat: den 6 mars 2012 17:22
Till: FreeSWITCH Users Help
&Auml;mne: [Freeswitch-users] Any alternative to repetitive lua      session:ready() calls?

Hi there,

If I am running a lua script during a call, and the call terminates
(caller hangs up, for instance), the lua script continues to execute
while the session has already been terminated. This causes ERR entries
in the freeswitch log, which I would like to try and minimize. The only
way I can see doing this is to frequently call session:ready() before
doing anything that could break the script. Is there a better way to
exit a script cleanly, without having to add X number of session:ready()
calls scattered about the script? Currently, I only call it once (at the
beginning of the script). I tried using the hangup hook, but I'm not
sure how I can get it to immediately exit the script.

Thanks,

Adam

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>

!DSPAM:4f56388f32766945510869!



</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      Adam<br clear="all">
      -- <br clear="all">
      <table id="signature" style="font-size: 85%; color: rgb(61, 35,
        22);" border="0" cellpadding="1" cellspacing="0">
        <tbody>
          <tr>
            <td rowspan="2" align="center" valign="middle"><img
                moz-do-not-send="false"
                src="cid:part1.04020404.08020007@newpace.ca"
                alt="NewPace Logo" height="50" width="50"></td>
            <td rowspan="6" width="6px"><br>
            </td>
            <td><br>
            </td>
            <td rowspan="6" width="6px"><br>
            </td>
            <td><font style="font-weight: bold; font-size: 110%;">Adam
                Kelloway</font></td>
          </tr>
          <tr>
            <td rowspan="6" style="font-weight: bold; font-size: 100%;"
              bgcolor="#a8cf38" width="1px"><br>
            </td>
            <td>Software Engineer, NewPace</td>
          </tr>
          <tr>
            <td align="right">phone</td>
            <td>+1&nbsp;(902)&nbsp;406&#8211;8375&nbsp;&nbsp;x1031</td>
          </tr>
          <tr>
            <td align="right">email</td>
            <td><a href="mailto:Adam.Kelloway@newpace.com"
                style="text-decoration: none; color: rgb(61, 35, 22);">Adam.Kelloway@NewPace.com</a></td>
          </tr>
          <tr>
            <td align="right"><a
                href="aim:GoIm?screenname=Adam.Kelloway@newpace.com"
                style="text-decoration: none; color: rgb(61, 35, 22);">aim</a>/<a
                href="msnim:chat?contact=Adam.Kelloway@newpace.com"
                style="text-decoration: none; color: rgb(61, 35, 22);">msn</a></td>
            <td><a href="aim:GoIm?screenname=Adam.Kelloway@newpace.ca"
                style="text-decoration: none; color: rgb(61, 35, 22);">Adam.Kelloway</a>@NewPace.ca</td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>