Re: JTAPI 1.2 / XTAPI DTMF Tone detection
Richard Deadman <[email protected]> Wed, 7 Sep 2005 09:14:31 -0400
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <[email protected]> |
Kenny, javax.telephony.PhoneTerminal is in the extension package javax.telephony.phone, which is not supported by XTAPI. Richard -- Richard Deadman Deadman Consulting, Inc. Web Services, Policy Management, Java Telephony, Software Architecture mailto:[email protected] http://www.deadman.ca Office: 613-231-5112 Cell: 613-220-2469 On Sep 7 , Kenny Wong <[email protected]> wrote: > Hi All, > > I am having a problem with the creating a PhoneTerminal. > > I have coded as follows: > > Terminal terminal = myprovider.getTerminal("352"); > > ComponentGroup groups[] = null; > > > > if (terminal instanceof PhoneTerminal) { > > groups = ((PhoneTerminal)terminal).getComponentGroups(); > > .............. > > .............. > > } > > but the if statement is always returning false; hence the code will not > > reach the statement within the if scope. > > Thanks and please advise. > > Kenny > > > > On 8/29/05, Enrico Goosen <[email protected]> wrote: > > > > > > 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". > > > > > > > =========================================================================== > > 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". > > > > =========================================================================== 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".