[Freeswitch-users] session.cause and session.causecode
Francesco Facco de Lagarda
francesco at delagarda.com
Sun Jun 17 09:23:51 UTC 2018
This is what the log says:
2018-06-17 11:18:41.186422 [ALERT] stuff.js:74 ***********************
DIALING
2018-06-17 11:18:41.186422 [NOTICE] switch_channel.c:1104 New Channel
sofia/external/065551234 [411ac79d-e8e0-4f77-b51f-7da24a71ea32]
2018-06-17 11:18:45.606424 [NOTICE] sofia.c:8273 Hangup
sofia/external/065551234 [CS_CONSUME_MEDIA] [UNALLOCATED_NUMBER]
2018-06-17 11:18:45.626430 [NOTICE] switch_core_session.c:1683 Session 915
(sofia/external/065551234) Ended
2018-06-17 11:18:45.626430 [NOTICE] switch_core_session.c:1687 Close Channel
sofia/external/065551234 [CS_DESTROY]
2018-06-17 11:18:45.626430 [ALERT] stuff.js:74 ***********************
WAITING FOR SESSION READY ..
2018-06-17 11:18:45.626430 [ALERT] stuff.js:74 ***********************
DISCONNECT CAUSE :false:undefined
So this is what I want:
2018-06-17 11:18:45.606424 [NOTICE] sofia.c:8273 Hangup
sofia/external/065551234 [CS_CONSUME_MEDIA] [UNALLOCATED_NUMBER]
So why do I get:
False: undefined
from
console_log("notice", "************************* disconnect cause:" +
sessOut.cause + ":" + sessOut.causeCode);
From: Francesco Facco de Lagarda <francesco at delagarda.com>
Sent: domenica 17 giugno 2018 11:12
To: 'FreeSWITCH Users Help' <freeswitch-users at lists.freeswitch.org>
Subject: session.cause and session.causecode
'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/ae0bc2db/attachment.html>
More information about the FreeSWITCH-users
mailing list