Java Programmer's Guide and Reference


Call class

A Call object represents a telephone call. Each call can have no connections, or one or more connections. For example, a two-party call has two connections, and a conference call has three or more connections.

Methods

The IBM CallPath Enterprise Toolkit for Java's Call implements the core Call interface from the javax.telephony package, the CallControlCall interface from the javax.telephony.callcontrol package, and the CallCenterCall interface from the javax.telephony.callcenter package. By casting a Call as a CallControlCall or a CallCenterCall, an application can invoke any of the CallControlCall or CallCenterCall methods.

Table 4, Table 5, and Table 6 list the methods (and provide comments about those methods, where appropriate) included in the core Call class, the CallControlCall class, and the CallCenterCall class, respectively:

Table 4. javax.telephony.Call methods
Method Comments

void addObserver(CallObserver)


CallCapabilities getCapabilities(Terminal, Address)

Returns only the default CallCapabilities.

CallCapabilities getCallCapabilities(Terminal, Address)

Deprecated. Returns only the default CallCapabilities.

Connection connect(Terminal, Address, String)

The Terminal and Address cannot be dynamic. They must be part of the static list of Terminals and Addresses associated with the Provider. MethodNotSupportedException is thrown if the Terminal or Address is dynamic.

Connections[] getConnections()


int getState()


CallObserver[] getObservers()


Provider getProvider()


void removeObserver(CallObserver)



Table 5. javax.telephony.callcontrol.CallControlCall methods
Method Comments

Connection addParty(String)

This method is not supported. It throws MethodNotSupportedException.

void conference(Call)

The Terminal that is common between this Call and the other Call must be in the Provider's static list of Terminals. It cannot be a dynamic Terminal. InvalidArgumentException is thrown if a valid common Terminal is not found.

Connection[] consult(TerminalConnection, String)

The Terminal associated with the TerminalConnection must be in the Provider's static list of Terminals; it cannot be a dynamic Terminal. MethodNotSupportedException is thrown if the Terminal is a dynamic Terminal.

Connection consult(TerminalConnection)

This method is not supported. It throws MethodNotSupportedException.

void drop()

This method is not supported. It throws MethodNotSupportedException.

TerminalConnection getConferenceController()

This method will always return null.

boolean getConferenceEnable()


TerminalConnection getTransferController()

This method will always return null.

Address getCallingAddress()


Terminal getCallingTerminal()

This method is not supported. It throws MethodNotSupportedException.

Address getCalledAddress()


Address getLastRedirectionAddress()


Boolean getTransferEnable()


Connection offHook(Address, Terminal)

This method is not supported. It throws MethodNotSupportedException.

void setConferenceController (TerminalConnection)

This method is not supported. It throws MethodNotSupportedException.

void setConferenceEnable(boolean)


void setTransferController(TerminalConnection)

This method is not supported. It throws MethodNotSupportedException.

void setTransferEnable(Boolean)


void transfer(Call)

The Terminal that is common between this Call and the other Call must be in the Provider's static list of Terminals. It cannot be a dynamic Terminal. InvalidArgumentException is thrown if a valid common Terminal is not found.

Connection transfer(String)

This method is not supported. It throws MethodNotSupportedException.

Table 6 shows the standard javax.telephony.callcenter.CallCenterCall interface as well as the IBM extensions for enqueue(String, Date, ACDAddress), enqueue(String, Date), dequeue(), remove(), getScheduledTime(), getRemainingScheduledTime(), getCallCenterState(), getDestinationNumber(), addAgentProgressData(Object) and getKey().

Table 6. javax.telephony.callcenter.CallCenterCall methods
Method Comments

Connections[] connectPredictive(Terminal, Address, String)

This method is not supported. It throws MethodNotSupportedException.

Object getApplicationData()

The actual Object returned may not be the same physical Object used in setApplicationData(Object). Therefore, the following code may fail:

String myData = "This is my data";


myCall.setApplicationData(myData);
.
.
.

if (myCall.getApplicationData()
!= myData) { . . . }

Instead, the application should use the following comparison:


Object myNewData =
myCall.getApplicationData();


if (myData instanceof String)


{

if (((String) myNewData).equals
(myData)) { . . . }

}

Supported data object types are:

  • String
  • Integer
  • Long
  • Null
Note:
Application data set by a CallPath Enterprise application is returned as a String object.

CallControlTrunk[] getTrunks()


void setApplicationData(Object)

The Application Data object must be one of the following types:
  • String
  • Integer
  • Long
  • Null

Any other type of object throws a PlatformException.

void enqueue(String, Date, ACDAddress)

Schedules a CallCenterCall object for processing at the time and date provided in the Date variable. The Provider will queue the call and connect the destination party (String) with an agent logged into the ACDAddress provided.

This method requires the CallPath Web Connection.

void enqueue(String, Date)

Schedules a CallCenterCall object for processing at the time and date provided in the Date variable. The Provider will queue the call and connect the destination party (String) with an agent of the Provider's choice.

This method requires the CallPath Web Connection.

void dequeue()

Cancels a CallCenterCall scheduled to the Provider through the enqueue method. The Provider will remove the CallCenterCall from the list of scheduled callbacks and return the CallCenterCall state to IDLE from PENDING.

This method requires the CallPath Web Connection.

void remove()

Removes a scheduled call in the PENDING state and sets the CallCenterCall state to INVALID, thereby removing the CallCenterCall completely from the Provider's domain.

This method requires the CallPath Web Connection.

Date getScheduledTime()

Returns the Date object that was used to enqueue the CallCenterCall to the Provider.

This method requires the CallPath Web Connection.

long getRemainingScheduledTime()

Returns the time remaining, in seconds, before this CallCenterCall enqueued to the Provider will be serviced.

This method requires the CallPath Web Connection.

int getCallCenterState()

Returns the current state of the CallCenterCall object.

This method requires the CallPath Web Connection.

String getDestinationNumber()

Returns the destination party that was associated with the CallCenterCall when it was enqueued to the Provider.

This method requires the CallPath Web Connection.

void addAgentProgressData(Object)

This method throws InvalidArgumentException if Object is not an instance of the CallPath Enterprise implementation class: CallPathDialResults.

String getKey()

This method returns the CallPath Enterprise Server Call ID as a 12-character string.

For more information, refer to the JavaSoft JTAPI 1.2 documentation.


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