com.cisco.jtapi.extensions
Interface CiscoTerminalConnection

All Superinterfaces:
javax.telephony.callcontrol.CallControlTerminalConnection, CiscoObjectContainer, javax.telephony.TerminalConnection

public interface CiscoTerminalConnection
extends javax.telephony.callcontrol.CallControlTerminalConnection, CiscoObjectContainer

Introduction

The CiscoTerminalConnection interface extends the CallControlTerminalConnection interface with additional capabilities.

Applications can use the getReason method to obtain the reason for the creation of this Connection.


Field Summary
static int CISCO_SELECTEDLOCAL
          The call is selected.
static int CISCO_SELECTEDNONE
          The the call is not selected.
static int CISCO_SELECTEDREMOTE
          A passive TerminalConnection receives this select status if the call is selected by its shared line.
 
Fields inherited from interface javax.telephony.callcontrol.CallControlTerminalConnection
BRIDGED, DROPPED, HELD, IDLE, INUSE, RINGING, TALKING, UNKNOWN
 
Fields inherited from interface javax.telephony.TerminalConnection
ACTIVE, PASSIVE
 
Method Summary
 void addMediaStream(java.lang.String streamDN, java.lang.String callingPartyNumber)
          Adds a Media Stream to this call, using the CiscoTerminalConnection object that invoked this API.
 CiscoMonitorInitiatorInfo getCiscoMonitorInitiatorInfo()
          Returns CiscoMonitorInitiatorInfo.
 CiscoMonitorTargetInfo getCiscoMonitorTargetInfo()
          Returns CiscoMonitorTargetInfo.
 CiscoRecorderInfo getCiscoRecorderInfo()
          Returns CiscoRecorderInfo, which exposes the terminal name and address of the recorder.
 boolean getPrivacyStatus()
          Returns the privacy status of the call on the terminal.
 int getSelectStatus()
          Returns the select status of the call on the terminal.
 void playTone(int toneType, int toneDirection)
          This interface plays the specified tone to the specified party
 void removeMediaStream()
          Removes an active Media Stream from this call.
 void startRecording(int playToneDirection)
          Starts recording a call.
 void updateMonitorType(int monitorType, int toneDirection)
          Updates the monitorType of current monitoring session.
 
Methods inherited from interface javax.telephony.callcontrol.CallControlTerminalConnection
getCallControlState, hold, join, leave, unhold
 
Methods inherited from interface javax.telephony.TerminalConnection
answer, getCapabilities, getConnection, getState, getTerminal, getTerminalConnectionCapabilities
 
Methods inherited from interface com.cisco.jtapi.extensions.CiscoObjectContainer
getObject, setObject
 

Field Detail

CISCO_SELECTEDNONE

static final int CISCO_SELECTEDNONE
The the call is not selected.

See Also:
Constant Field Values

CISCO_SELECTEDLOCAL

static final int CISCO_SELECTEDLOCAL
The call is selected.

See Also:
Constant Field Values

CISCO_SELECTEDREMOTE

static final int CISCO_SELECTEDREMOTE
A passive TerminalConnection receives this select status if the call is selected by its shared line.

See Also:
Constant Field Values
Method Detail

getPrivacyStatus

boolean getPrivacyStatus()
Returns the privacy status of the call on the terminal. This interface returns True if Privacy is on and False otherwise. Always check the TerminalConnection privacy status before displaying any information about the call at an applcation Terminal implementation.


getSelectStatus

int getSelectStatus()
Returns the select status of the call on the terminal. Always check the select status of the TerminalConnection before performing any call-process operation for the call.

Returns:
One of:
  • CiscoTerminalConnection.CISCO_SELECTEDNONE
  • CiscoTerminalConnection.CISCO_SELECTEDLOCAL
  • CiscoTerminalConnection.CISCO_SELECTEDREMOTE

startRecording

void startRecording(int playToneDirection)
                    throws javax.telephony.InvalidStateException,
                           javax.telephony.PrivilegeViolationException,
                           javax.telephony.ResourceUnavailableException,
                           javax.telephony.InvalidArgumentException
Starts recording a call. The system delivers CiscoTermConnRecordingStartEv and CiscoTermConnRecordingTargetInfoEv to the call observer when this method is successful.

Pre-conditions

 ((this.getTerminal()).getProvider()).getState() == Provider.IN_SERVICE 
 this.getCallControlState() == CallControlTerminalConnection.TALKING 
 ((CiscoProviderCapabilities)(this.getTerminal().getProvider().getProviderCapabilities()).canRecord() == TRUE
 this.getConnection().getAddress().getRecordingConfig(this.getTerminal()) == CiscoAddress.APPLICATION_CONTROLLED__RECORDING
 

Parameters:
playToneDirection - Specifies whether to play a tone. Valid values are:
  • CiscoCall.PLAYTONE_NOLOCAL_OR_REMOTE
  • CiscoCall.PLAYTONE_LOCALONLY
  • CiscoCall.PLAYTONE_REMOTEONLY
  • CiscoCall.PLAYTONE_BOTHLOCALANDREMOTE
Throws:
javax.telephony.InvalidStateException - Either the Provider was not "in service" or the TerminalConnection is not in the "TALKING" state.
javax.telephony.PrivilegeViolationException - The application does not have the proper authority to invoke this method.
javax.telephony.ResourceUnavailableException - An internal resource that this method requires is not available.
javax.telephony.InvalidArgumentException - The value for playToneDirection is not valid.

getCiscoRecorderInfo

CiscoRecorderInfo getCiscoRecorderInfo()
Returns CiscoRecorderInfo, which exposes the terminal name and address of the recorder. The call control terminal connection must be in the talking state.

Returns:
CiscoRecorderInfo, or null if the call is not being recorded

getCiscoMonitorInitiatorInfo

CiscoMonitorInitiatorInfo getCiscoMonitorInitiatorInfo()
Returns CiscoMonitorInitiatorInfo. The application can use this method on the terminal connection of the monitor target to get information about the monitor initiator or determine that there is no monitor session.

Returns:
CiscoMonitorInitiatorInfo, or null if the call is not being monitored

getCiscoMonitorTargetInfo

CiscoMonitorTargetInfo getCiscoMonitorTargetInfo()
Returns CiscoMonitorTargetInfo. The application can use this method on the terminal connection of the monitor initiator to get information about the monitor target. This method returns null when called on a terminal connection of the monitor target or if there is no monitor session.

Returns:
CiscoMonitorTargetInfo or null

addMediaStream

void addMediaStream(java.lang.String streamDN,
                    java.lang.String callingPartyNumber)
                    throws javax.telephony.PlatformException,
                           javax.telephony.InvalidStateException,
                           javax.telephony.ResourceUnavailableException,
                           javax.telephony.InvalidArgumentException
Adds a Media Stream to this call, using the CiscoTerminalConnection object that invoked this API. A second, background call will be placed to the DN specified by the IVRDN parameter, and this call will be mixed in to the invoking CiscoTerminalConnection's Built-In-Bridge.

Parameters:
streamDN - A String object representing the DN of the endpoint that will be streaming media to this call. This is usually an IVR or CTI Port.
callingPartyNumber - A String object representing information that will be shown as the calling party number to the streamDN when the call is initially offered to it.
Throws:
javax.telephony.PlatformException - if the addMediaStream request takes too long and times out.
javax.telephony.InvalidStateException - if the state of the Call or CiscoTerminalConnection is not valid for a Media Stream to be added.
javax.telephony.ResourceUnavailableException - when the BIB resource of the invoking device cannot be allocated.
javax.telephony.InvalidArgumentException - when the streamDN is null
Since:
8.5

removeMediaStream

void removeMediaStream()
                       throws javax.telephony.InvalidStateException,
                              javax.telephony.ResourceUnavailableException
Removes an active Media Stream from this call. This will cut any audio currently playing, and begin the cleanup of the call to the streaming DN.

Throws:
javax.telephony.InvalidStateException - if the state of the Call or CiscoTerminalConnection is not valid for a Media Stream to be removed.
javax.telephony.ResourceUnavailableException - when the BIB resource of the invoking device cannot be allocated.
Since:
8.5

updateMonitorType

void updateMonitorType(int monitorType,
                       int toneDirection)
                       throws javax.telephony.ResourceUnavailableException,
                              javax.telephony.PrivilegeViolationException,
                              javax.telephony.InvalidPartyException,
                              javax.telephony.InvalidArgumentException,
                              javax.telephony.InvalidStateException
Updates the monitorType of current monitoring session. Pre-conditions:
  1. this.Connection().getCall().getProvider().getState() == Provider.IN_SERVICE
  2. this.Connection().getCall().getState() == Call.ACTIVE

Parameters:
monitorType - - Specifies the mode in which application wants monitoring to transition. Valid values are:
  • CiscoCall.SILENT_MONITOR
  • CisocCall.WHISPER_MONITOR
toneDirection - Specifies where to play a tone. Valid values are:
  • CiscoCall.PLAYTONE_NOLOCAL_OR_REMOTE
  • CiscoCall.PLAYTONE_LOCALONLY
  • CiscoCall.PLAYTONE_REMOTEONLY
  • CiscoCall.PLAYTONE_BOTHLOCALANDREMOTE
Throws:
javax.telephony.ResourceUnavailableException - - An internal resource that this method requires is not available.
javax.telephony.PrivilegeViolationException - - The application does not have the proper authority to invoke this method.
javax.telephony.InvalidPartyException - - Request is invoked on incorrect TerminalConnection.
javax.telephony.InvalidArgumentException - - The value for one or more parameters is not correct.
javax.telephony.InvalidStateException - - The state is not correct to invoke this method. TerminalConnection may not be in TALKING state or media is not established.
Since:
8.5(1)

playTone

void playTone(int toneType,
              int toneDirection)
              throws javax.telephony.InvalidStateException,
                     javax.telephony.InvalidArgumentException,
                     javax.telephony.PlatformException
This interface plays the specified tone to the specified party

Parameters:
toneType - - can be one of supported tones from CiscoTone
toneDirection - - can be either CiscoCall.PLAYTONE_LOCALONLY or CiscoCall.PLAYTONE_REMOTEONLY.
Throws:
javax.telephony.InvalidStateException
javax.telephony.InvalidArgumentException
javax.telephony.PlatformException
Since:
8.5