Tony, you can try:<div><br></div><div>while (var and session:ready) do</div><div>     ........</div><div>end</div><div><br></div><div><br></div><div>  <br><div><div><br><div class="gmail_quote">On Thu, Jul 8, 2010 at 4:37 AM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com">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;">session:ready - checks whether the session is still active (true anytime between call starts and hangup)<br><br>session:answered - checks whether the session is flagged as answered (true anytime after the call has been answered)<br>

<br>I don&#39;t think session:answered returns false after the call has hung up, while session:ready will. Also session:answered won&#39;t be true until the call is answered, but session:ready will be.<br><br>-Steve<div>
<div></div><div class="h5"><br><br>
<br><br><div class="gmail_quote">On 8 July 2010 03:39, Tony Tin <span dir="ltr">&lt;<a href="mailto:tony.tin@noahmedia.com.hk" target="_blank">tony.tin@noahmedia.com.hk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

sorry, one more question<br><br>how does session:ready compare to session:answered ?<br><br>Thanks<br><font color="#888888"><br>Tony<br><br><br></font><div class="gmail_quote"><div>On Wed, Jul 7, 2010 at 8:15 PM, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</span> wrote:<br>


</div><div><div></div><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Post your code for your while loop... sounds like you&#39;re not checking session:ready to see if its still true.<br>



<br>
/b<br>
<div><div></div><div><br>
On Jul 7, 2010, at 3:48 AM, Tony Tin wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m writing dialplan with Lua script. There is a while loop in the dialplan, I found that the loop is not broke out even the call has been hung up. I&#39;m wondering whether this is a normal behavior. Thanks.<br>



&gt;<br>
&gt; Regards,<br>
&gt; Tony<br>
<br>
<br>
</div></div>_______________________________________________<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>
</blockquote></div></div></div><br>
<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>
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"><br>-- <br>Javier Aristizábal<br><br>
</div></div></div>