02-02-2017 03:09 PM
I have created a gadget using Finesse 10.5(1). What is the correct syntax to send a DTMF string?
I am trying to send the DTMF string while on a call. When I run this code nothing happens; not even an error in the web console.
This is what I have so far:
function testMe() {
m_dialogObject.diag = getActiveDialog();
if (m_dialogObject.diag==null){
clientLogs.log( "Null dialog");
return;
}
m_dialogObject.diag.sendDTMFRequest(user.getExtension(), 'SEND_DTMF(1)', {
success : SSTSuccess,
error: SSTError
});
}
SSTSuccess = function(rsp) {
clientLogs.log( "In test response success; status: " + rsp.status);
if ( rsp.status == '202' ) {
}
}
SSTError = function(rsp) {
clientLogs.log( "In test response error");
clientLogs.log( rsp );
}
Any thoughts are appreciated.
Solved! Go to Solution.
02-03-2017 11:30 AM
Hi Patrick,
Sorry, looks like the JSDoc is incorrect. I looked at the finesse.js file and saw the following:
sendDTMFRequest: function (mediaAddress, handlers, digit) {
...
}
where mediaAddress is the user's extension (user.getExtension() like you already have), handlers (just like what you have as well), then digit which is the number that is pushed.
I will open a doc defect for the incorrect JSDoc. I hope this helps.
Thanx,
Denise
02-03-2017 11:30 AM
Hi Patrick,
Sorry, looks like the JSDoc is incorrect. I looked at the finesse.js file and saw the following:
sendDTMFRequest: function (mediaAddress, handlers, digit) {
...
}
where mediaAddress is the user's extension (user.getExtension() like you already have), handlers (just like what you have as well), then digit which is the number that is pushed.
I will open a doc defect for the incorrect JSDoc. I hope this helps.
Thanx,
Denise
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide