6 Mar
2012
6 Mar
'12
4:22 p.m.
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