[Freeswitch-users] hangup does not break the Lua loop

Javier Aristizábal javieraristizabal at gmail.com
Thu Jul 8 05:06:04 PDT 2010


Tony, you can try:

while (var and session:ready) do
     ........
end




On Thu, Jul 8, 2010 at 4:37 AM, Steven Ayre <steveayre at 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 at 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 at 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 at 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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100708/6a1053e9/attachment.html 


More information about the FreeSWITCH-users mailing list