<div>Hi,</div><div><br></div><div>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.</div>
<div><br></div><div><br></div><div>////test.js</div><div>function on_hangup(session, how){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>console_log("notice","hangup!!!!!!!!!!!!!\n");</div>
<div>}</div><div><br></div><div> session = new Session("sofia/gateway/12voip-out/*********");</div><div><br></div><div>session.waitForAnswer();</div><div>session.execute("set","continue_on_fail=true");</div>
<div>var res=session.setHangupHook(on_hangup);</div><div>console_log("notice","res:"+res+"\n");</div><div>session.execute("speak", "This is an example of flite text to speech engine. We can test the work of hanguphook.");</div>
<div>session.execute("speak","you are calling from " + session.caller_id_num + " You are calling " + session.destination );</div><div>session.hangup();</div><div> </div>