Did this topic get resolved? We're seeing the same occasional problem using LUA scripts where on occasion the hangup hook doesn't get called. Our app for this is the 24x7 emergency paging system for our customers - so we'd like to resolve! This in on our production system (which is very stable) - hence the out of date build: FreeSWITCH Version 1.0.trunk (16535). Thanks, Chris. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of xuyan yang Sent: Sunday, July 11, 2010 08:08 To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Unstable hangup hook in javascript Hi, I have tested the hangup hook function using the following javascript. During the speech in the call I hangup the call to see the result. Sometimes hangup function works, but sometimes it did not. The chance of fail is about 1 out of 10. I am running windows XP, FS git version cloned and compiled at end of Jun. Does anyone meet the same problem? Or do I make some mistake in the script? Thanks. ////test.js function on_hangup(session, how){ console_log("notice","hangup!!!!!!!!!!!!!\n"); } session = new Session("sofia/gateway/12voip-out/*********"); session.waitForAnswer(); session.execute("set","continue_on_fail=true"); var res=session.setHangupHook(on_hangup); console_log("notice","res:"+res+"\n"); session.execute("speak", "This is an example of flite text to speech engine. We can test the work of hanguphook."); session.execute("speak","you are calling from " + session.caller_id_num + " You are calling " + session.destination ); session.hangup();