Java Programmer's Guide and Reference


JtapiPeer class

The JtapiPeer object gets Provider objects, which represent connections to the CallPath Enterprise network of servers.

You can obtain the IBM CallPath Enterprise Toolkit for Java's JtapiPeer object through the JtapiPeerFactory.getJtapiPeer(String) method. If you specify ibmcpath.jar as the first JTAPI implementation in the CLASSPATH environmental variable, you can obtain this implementation by default without specifying the parameter on the method call. However, if you specify additional JTAPI implementations in the CLASSPATH, then you must also specify the following argument in the JtapiPeerFactory.getJtapiPeer() method call:

"com.ibm.telephony.callpath.CSAJtapiPeer"
Note:
For information about creating a JtapiPeer object in an applet, see JTAPI example.

Methods

The methods in JtapiPeer are:

These methods are described in the following sections.

String JtapiPeer.getName()

The getName() method returns the name of the Peer. For the IBM CallPath Enterprise Toolkit for Java, this is always:

com.ibm.telephony.callpath.CSAJtapiPeer

Provider getProvider(String)

The getProvider() method is used to get a Provider object. The IBM CallPath Enterprise Toolkit for Java's Provider object represents a subset of resources on a specific CallPath Enterprise Server. The subset of resources is identified by the login (designated as user in the Configurator) specified as part of the String object passed to getProvider(). For information about how to configure logins on the CallPath Enterprise Server, refer to the CallPath Enterprise Planning, Installation and Problem Determination Guide.

Note:
The IBM CallPath JTAPI implementation has been updated to support two different kinds of users, static and dynamic:

The application must supply at least two arguments in the String object; these arguments must be separated by a semicolon (;). See Table 1 for a description of the required and optional getProvider arguments.

Table 1. getProvider arguments
Argument Required/Optional Description
Service Name Required You must specify the Service Name, the name of the CallPath Enterprise Server with which the Provider is associated, as the first argument using the following format:

port number@TCP/IP host name of the system.

Note:
You do not have to specify the port number if the CallPath Enterprise Server is configured for port 7600.
login Required You must specify the login ID (designated as user in the Configurator) as the second argument using the following format:

login=user

The user defines the resources available to that provider.

passwd Optional Specify passwd, the user's password, as the third argument only if you have configured the user of the CallPath Enterprise Server to require passwords. If you specify this argument, it must be in the following format:

passwd=password

addresses Optional Specify addresses as the next argument if the user is a dynamic user (see above.) This allows you to specify addresses for a user that does not have its associated extensions preconfigured. The format for specifying addresses is:

addresses=address,address,...

acdaddresses Optional Specify addresses as the next argument if the user is a dynamic user (see above.) This allows you to specify ACDs for a user that does not have its associated ACDs preconfigured. The format for specifying acdaddresses is:

acdaddresses=acdaddress, acdaddress,...

Following are examples of getProvider(), first for a static user, then for a dynamic user:


For a static user:
String myArgs = new String("7600@cp01;login=george;passwd=gwc552");
Provider myProvider = getProvider(myArgs);

For a dynamic user:
String myArgs = new String("7600@cp01;login=george;passwd=gwc552;
addresses=1111,2222;acdaddresses=9999,9998;");
Provider myProvider = getProvider(myArgs);

String[] getServices()

The getServices() method returns an array of CallPath Enterprise Server names known to the JtapiPeer object. The IBM CallPath Enterprise Toolkit for Java's JtapiPeer builds this array by monitoring a TCP/IP port (default port 6789) for broadcast messages from any CallPath Enterprise Servers configured to broadcast on that port. For information about changing the default port number used by JtapiPeer, refer to the CallPath Enterprise Planning, Installation and Problem Determination Guide.

Note:
The getServices() method will not return an array if another program running on the same system is already monitoring this port for Java's JtapiPeer or a CallPath Enterprise Client is running on the same machine (this is a TCP/IP limitation). For example, another instance of the Java Virtual Machine is a JTAPI application using the IBM CallPath Enterprise Toolkit for Java's JtapiPeer.

For more information about the getServices() method, refer to the JavaSoft JTAPI 1.2 documentation.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]