Morning,

 

i had the same problem a while ago, reported the jira below and anthm made some changes tu mod_lua.

If you put “error()” as last command in your hangup handler (see http://wiki.freeswitch.org/wiki/Mod_lua#session:setHangupHook)

No error is dumped in the log.

Both ‘return “exit”’ and ‘return “die”’ leave an error in the logfiles.

A little bit misleading in my opinion, but if you know how to handle it…it works.

 

Tried 15mins ago with latest git FreeSWITCH Version 1.0.head (git-ea975c3 2012-02-28 19-21-04 -0500)

 

Regards

gw

 

Von: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] Im Auftrag von Adam Kelloway
Gesendet: Dienstag, 06. März 2012 18:36
An: FreeSWITCH Users Help
Betreff: Re: [Freeswitch-users] Any alternative to repetitive lua session:ready() calls?

 

Kind of, all of those solutions consider the script exiting an 'error'. I am looking for something that exits without considering it an error and thus does not emit an [ERR] log.

On 3:59 PM, Peter Olsson wrote:

Maybe this is what you are looking for?
 
commit 09ad887948f7513725ca8b53bdfe721d9008e73b
Author: Anthony Minessale <anthm@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@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] f&#246;r Adam Kelloway [adam.kelloway@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@freeswitch.org
http://www.freeswitchsolutions.com
 
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
 
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
 
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
 
!DSPAM:4f56388f32766945510869!
 
 
 

 

--
Adam
--

NewPace Logo

Adam Kelloway

Software Engineer, NewPace

phone

+1 (902) 406–8375  x1031

email

Adam.Kelloway@NewPace.com

aim/msn

Adam.Kelloway@NewPace.ca