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"
The methods in JtapiPeer are:
These methods are described in the following sections.
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
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.
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.
|
| 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);
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.
For more information about the getServices() method, refer to the JavaSoft JTAPI 1.2 documentation.