<div dir="ltr">Hi all,<div><br></div><div style>I'm testing function "recordFile" with scripts:</div><div style><div>var is_exit = false;</div><div>function on_dtmf(session, type, obj, arg){</div><div> try{</div>
<div> if (type == "dtmf"){</div><div> if (obj.digit == '*'){</div><div> is_exit = true;</div><div> return false;</div>
<div> }</div><div> }</div><div> } catch(e){</div><div> console_log("info","error read dtmf\n");</div><div> }</div><div> return true;</div>
<div>}</div><div>session.answer();</div><div>while (session.ready()){</div><div style> console_log("info","starting record\n");</div><div> session.recordFile("/opt/freeswitch/recordings/test.wav", on_dtmf, "", 240, 500, 3);</div>
<div style> console_log("info","finish\n");</div><div> session.streamFile("/opt/freeswitch/recordings/test.wav");</div><div> session.hangup();</div><div>}</div><div><br></div>
<div style>I see that function "recordFile" return immediately when called, and, I didn't play file "test.wav". My FreeSWITCH receive incoming call from GMSC of operator.</div><div style><br></div>
<div style>Please check it for me.</div><div style><br></div><div style>Thanks & Best regards,</div><div style>Khue.</div></div></div>