cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1013
Views
1
Helpful
1
Replies

I need to send a DTMF string when I click a button

Patrick Curley
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

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

View solution in original post

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

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