Question:
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()?
Answer:
MediaTermConnDtmfEv is notified to MediaCallObserver. (out of band DTMF should be configured.)
MediaTermConnDtmfEv is notified to MediaCallObserver. (out of band DTMF should be configured.)
Please refer - DTMF Tone Detection for related information.
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;
Comments
0 comments
Please sign in to leave a comment.