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
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?