cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1134
Views
0
Helpful
2
Replies

How to detect DTMF when sent by MediaTerminalConnection.generateDTMF()?

ashish.nijai
Level 1
Level 1

Hi,

I am developing module for sending DTMF to an extension using JTAPI when call is active.

I can send DTMF manually by pressing keypad of called terminal.

This DTMF is captured by MediaTermConnDtmfEv event and showed on console.

But when i send DTMF using MediaTerminalConnection.generateDTMF(), application is unable to capture DTMF via MediaTermConnDtmfEv event.

I can hear DTMF when sending DTMF manually by pressing keypad of called terminal and sending DTMF using MediaTerminalConnection.generateDTMF().

How we can detect DTMF when sent by MediaTerminalConnection.generateDTMF()?

Can anyone help me to overcome this problem?

Regards,

Ashish

2 Replies 2

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi Ashish,

MediaTermConnDtmfEv is notified to MediaCallObserver. (out of band DTMF should be configured.)

Please refer - DTMF Tone Detection for related information.

Thanks and Regards,

Geevarghese

Hi,

I did  same like post you menstioned.

See my code for catching DTMF

case MediaTermConnAvailableEv.ID:

  TerminalConnection tc = ((MediaTermConnAvailableEv) eventList[i]).getTerminalConnection();

        MediaTerminalConnection mtc = (MediaTerminalConnection)tc;

        try {

          mtc.setDtmfDetection(true);

        } catch (Exception excp) {

          excp.printStackTrace();

          // Handle exceptions

        }

  break;

  case MediaTermConnDtmfEv.ID:

        /* Print out the DTMF digits */

  logger.info("Print out the DTMF digits");

        char digit = ((MediaTermConnDtmfEv)eventList[i]).getDtmfDigit();

      

        System.out.println("detected DTMF: " + digit);

      break;

Can anybody tell what is wrong with the code?