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

Peter Olsson peter.olsson at visionutveckling.se
Tue Mar 6 19:33:17 MSK 2012


Maybe this is what you are looking for?

commit 09ad887948f7513725ca8b53bdfe721d9008e73b
Author: Anthony Minessale <anthm at freeswitch.org>
Date:   Fri Jan 27 19:03:04 2012 -0600

    FS-3841 --resolve ok return the string "die" or "exit" from hanguphook to cause an error or call s:destroy("any err message"); either should now halt the script


________________________________________
Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] f&#246;r Adam Kelloway [adam.kelloway at newpace.ca]
Skickat: den 6 mars 2012 17:22
Till: FreeSWITCH Users Help
Ämne: [Freeswitch-users] Any alternative to repetitive lua      session:ready() calls?

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

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

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

!DSPAM:4f56388f32766945510869!




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