<!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 text="#000000" bgcolor="#ffffff">
Lua script is not terminating immediately on hangup.<br>
This behavior allows user to finalize the script nicely (free
dynamically allocated resources, update logs, e.t.c)<br>
<blockquote type="cite">
  <div>maybe it will stuck in a few&nbsp;situation before it reach to
session:status check point.</div>
  <div><br>
  </div>
  <div>like GetDigit or something else? (sorry, I dont have FS right
now, need test it tomorrow)</div>
</blockquote>
I've never encountered such a problem. Usually GetDigit-like functions
have timeout parameter, so they don't block forever.<br>
Just check the session status often and it will work like a charm ;<br>
<br>
<br>
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
<blockquote
 cite="mid:314dc3f81002100800o41fd6561w394d5e83e69d3d80@mail.gmail.com"
 type="cite">
  <div>thx for reply,&nbsp;but shouldnt Lua script terminate when client
hangs up?</div>
  <div><br>
  </div>
  <div>maybe it will stuck in a few&nbsp;situation before it reach to
session:status check point.</div>
  <div><br>
  </div>
  <div>like GetDigit or something else? (sorry, I dont have FS right
now, need test it tomorrow)</div>
  <br>
  <div class="gmail_quote">2010/2/10 Nazim Agabekov <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:nazim.agabekov@gmail.com">nazim.agabekov@gmail.com</a>&gt;</span><br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div text="#000000" bgcolor="#ffffff">Hello,<br>
Can you pastebin your script?<br>
    <br>
    <a moz-do-not-send="true" href="http://pastebin.freeswitch.org"
 target="_blank">http://pastebin.freeswitch.org</a>
    <div>
    <div class="h5"><br>
    <br>
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
    </div>
    </div>
    <blockquote type="cite">
      <div>
      <div class="h5">
      <div>Hello,&nbsp;</div>
      <div>
      <div>i tried to use Lua script to replace xml macro in dialplan,</div>
      </div>
      <div>but I found out that Lua wont terminate if client hangup,</div>
      <div>,so the session is still on but client is already hangup,</div>
      <div>is there a way to avoid this ?</div>
      <div><br>
      </div>
      </div>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a moz-do-not-send="true"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true"
 href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
 target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true"
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
 target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
 target="_blank">http://www.freeswitch.org</a>
  </pre>
    </blockquote>
    <br>
    </div>
    <br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
    <a moz-do-not-send="true"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
    <a moz-do-not-send="true"
 href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
 target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
 target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
    <a moz-do-not-send="true" href="http://www.freeswitch.org"
 target="_blank">http://www.freeswitch.org</a><br>
    <br>
  </blockquote>
  </div>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
  </pre>
</blockquote>
<br>
</body>
</html>