[Freeswitch-users] collecting dtmf after bridge
Francesco Facco de Lagarda
francesco at delagarda.com
Mon Jul 9 08:04:19 UTC 2018
Please help..
I am trying to implement this scenario with js.
* Extension dials operator
* Operator answers
* According to extension's requests, operator dials a digit
* Request is executed.
My problem is that once the two sessions have been bridged, I cannot collect
any dtmf!
This is what I am doing:
Where AM I going wrong???
var opExt = "1000";
console_log(1,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n=============================
===========================================");
var dtmf = new Object( );
dtmf.digits = "";
if (session.ready()) {
var dtmf = {
digits : ''
};
var uuid = session.getVariable("uuid");
console_log(1, "Session UUID: " + uuid);
console_log(1,"answering session ..");
session.answer();
var uuid = session.getVariable("uuid");
console_log(1,"calling operator ..");
var opSession = new Session("{UUIDLegA=" + uuid + "}user/" + opExt);
if (opSession.ready()) {
console_log(1,"Op session ready! ... bridging ..");
bridge(session, opSession);
console_log(1,"waiting for digit ...");
while (opSession.ready()) {
opSession.collectInput( getDigit, dtmf, 0, 0);
switch(dtmf.digits) {
case "0" : //
// etc
}
}
}
}
console_log(1,"Hanging up sessions");
session.hangup();
opSession.hangup();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180709/b01fd91c/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list