var is_exit = false;
function on_dtmf(session, type, obj, arg){
try{
if (type == "dtmf"){
if (obj.digit == '*'){
is_exit = true;
return false;
}
}
} catch(e){
console_log("info","error read dtmf\n");
}
return true;
}
session.answer();
while (session.ready()){
console_log("info","starting record\n");
session.recordFile("/opt/freeswitch/recordings/test.wav", on_dtmf, "", 240, 500, 3);
console_log("info","finish\n");
session.streamFile("/opt/freeswitch/recordings/test.wav");
session.hangup();
}
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.
Please check it for me.
Thanks & Best regards,
Khue.