Re: GJTAPI and JTAPI
Richard Deadman <[email protected]>
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <[email protected]> |
You might want to try using the JTAPI 1.3.1 jar file -- it can be found at https://sourceforge.net/project/showfiles.php?group_id=40963&package_id=89442 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 Nov 3 , Ian Lin <[email protected]> wrote: > > Hi all: > I am new for JTAPI and GJTAPI, I got the sample code from > <a href='http://java.sun.com/products/jtapi/jtapi-1.2/Overview.html'>http://java.sun.com/products/jtapi/jtapi-1.2/Overview.html</a> > And according to some search result from > <a href='http://sourceforge.net/forum/forum.php?thread_id=1068830&forum_id=131056,'>http://sourceforge.net/forum/forum.php?thread_id=1068830&forum_id=131056,</a> > so I modify the JtapiPeerFactory.getJtapiPeer(null) to > JtapiPeerFactory.getJtapiPeer("net.sourceforge.gjtapi.GenericJtapiPeer") > and peer.getProvider(null) to peer.getProvider("Emulator"); > > Sample code is listed below: > > import javax.telephony.*; > import javax.telephony.events.*; > import MyOutCallObserver; > > > /* > * Places a telephone call from 476111 to 5551212 > */ > public class Outcall { > > public static final void main(String args[]) { > > /* > * Create a provider by first obtaining the default implementation of > * JTAPI and then the default provider of that implementation. > */ > Provider myprovider = null; > try { > JtapiPeer peer = JtapiPeerFactory.getJtapiPeer > ("net.sourceforge.gjtapi.GenericJtapiPeer"); > myprovider = peer.getProvider("Emulator"); > } catch (Exception excp) { > System.out.println("Can't get Provider: " + excp.toString()); > System.exit(0); > } > > /* > * We need to get the appropriate objects associated with the > * originating side of the telephone call. We ask the Address for a list > * of Terminals on it and arbitrarily choose one. > */ > Address origaddr = null; > Terminal origterm = null; > try { > origaddr = myprovider.getAddress("4761111"); > > /* Just get some Terminal on this Address */ > Terminal[] terminals = origaddr.getTerminals(); > if (terminals == null) { > System.out.println("No Terminals on Address."); > System.exit(0); > } > origterm = terminals[0]; > } catch (Exception excp) { > // Handle exceptions; > } > > > /* > * Create the telephone call object and add an observer. > */ > Call mycall = null; > try { > mycall = myprovider.createCall(); > mycall.addObserver(new MyOutCallObserver()); > } catch (Exception excp) { > // Handle exceptions > } > > /* > * Place the telephone call. > */ > try { > Connection c[] = mycall.connect(origterm, origaddr, "5551212"); > } catch (Exception excp) { > // Handle all Exceptions > } > } > } > > And, I have downloaded the JTAPI class file(jtapi12-class.zip) and GJTAPI > class(gjtapi-1.7.jar), then I put these two jar(jtapi.jar, gjtapi-1.7.jar) > in C:\jdk1.3.1_13\lib folder. > Then I compiler the source above. > javac -classpath c:\jdk_1.3.13\lib\jtapi.jar;. Outcall.java > Compiler is ok, then > java -classpath c:\jdk_1.3.13\lib\jtapi.jar;c:\jdk_1.3.13\lib\gjtapi- > 1.7.jar;. Outcall > But error message displays > Exception in thread "main" java.lang.UnsupportedClassVersionError: > net/sourceforge/gjtapi/GenericJtapiPeer (unsupported major.minor version > 48.0)............. > Does anyone have the same experience with me? > Or do I make something wrong? > > Thanks in advance for your kindly reply. > > Ian > > =========================================================================== > 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".