[Freeswitch-users] session.cause and session.causecode
Francesco Facco de Lagarda
francesco at delagarda.com
Sun Jun 17 09:12:29 UTC 2018
'Morning all
I can't get session.cause and session.causecode to work.
All I get is false for the code and blank for the cause!
Im running FS 1.6.20
This is a simplified version of my JS script
if (session.ready()) {
session.answer();
var dialedNum = "3332094333";
console_log("notice", "*********************** DIALING");
var sessOut = new Session("sofia/gateway/realtoneFXO/" +
dialedNum + "@192.168.0.216:5060");
console_log("notice", "*********************** WAITING FOR
SESSION READY ..");
if (sessOut.ready()) {
console_log("notice", "*********************** SESSION
READY");
bridge(session, sessOut);
} else {
console_log("notice",
"************************* disconnect cause:" + sessOut.cause + ":" +
sessOut.causeCode);
}
sessOut.hangup();
session.hangup();
console_log("notice", "*********************** CALL ENDED");
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180617/04c1a01b/attachment.html>
More information about the FreeSWITCH-users
mailing list