Tony, you can try: while (var and session:ready) do ........ end On Thu, Jul 8, 2010 at 4:37 AM, Steven Ayre <steveayre@gmail.com> wrote:
session:ready - checks whether the session is still active (true anytime between call starts and hangup)
session:answered - checks whether the session is flagged as answered (true anytime after the call has been answered)
I don't think session:answered returns false after the call has hung up, while session:ready will. Also session:answered won't be true until the call is answered, but session:ready will be.
-Steve
On 8 July 2010 03:39, Tony Tin <tony.tin@noahmedia.com.hk> wrote:
sorry, one more question
how does session:ready compare to session:answered ?
Thanks
Tony
On Wed, Jul 7, 2010 at 8:15 PM, Brian West <brian@freeswitch.org> wrote:
Post your code for your while loop... sounds like you're not checking session:ready to see if its still true.
/b
On Jul 7, 2010, at 3:48 AM, Tony Tin wrote:
Hi,
I'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'm wondering whether this is a normal behavior. Thanks.
Regards, Tony
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Javier Aristizábal