[Freeswitch-users] Any alternative to repetitive lua session:ready() calls?

Adam Kelloway adam.kelloway at newpace.ca
Tue Mar 6 19:22:02 MSK 2012


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



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list