JTAPI 1.2 / XTAPI DTMF Tone detection
Enrico Goosen <[email protected]> Mon, 29 Aug 2005 09:27:59 -0600
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Hi all,
I'm new to JTAPI and I need help with DTMF tone detection.
I've got a simple class that makes a call to my mobile phone.
I get notified on call events:
Connection to Address: 0 is INPROGRESS
Connection to Address: 0833055676; is ALERTING
Connection to Address: 0 is CONNECTED
Connection to Address: 0833055676; is CONNECTED
When I receive the ConnConnectedEv I also enable DTMF:
...
mtc.setDtmfDetection(true);
...
and I check for MediaTermConnDtmfEv:
...
else if (evlist[i].getID() == MediaTermConnDtmfEv.ID) {
System.out.println("MediaTermConnDtmfEv");
/* Print out the DTMF digits */
char digit = ((MediaTermConnDtmfEv)evlist[i]).getDtmfDigit();
System.out.println("detected DTMF: " + digit);
TerminalConnection tc = ((TermConnEv)evlist
[i]).getTerminalConnection();
MediaTerminalConnection mtc = (MediaTerminalConnection)tc;
try{
// Echo out the same digit we detected
mtc.generateDtmf(digit + "");
}catch(Exception e){
System.out.println("Exception generateDtmf: " + e.toString
());
}
}
...
Somehow I'm not getting DTMF events.
My program doesn't detect when the call has been hung up by remote
terminal either.
Any help would be greatly appreciated.
Thanks,
Enrico
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JTAPI-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".