public class CstaDevice
extends java.lang.Object
A CstaDevice Object includes the following information:
One CstaDevice Object is identified by its unique FQN number. The above information are updated automatically internally when Application sends requests to retrieve the information.
The CstaDevice Class also provides all the methods that can be performed on a Device, e.g. MakeCall, Set/Get Forwarding status, Set/Get DoNotDisturb status, etc.
Modifier and Type | Field and Description |
---|---|
CstaDeviceIdentifier |
deviceIdentifier
The DeviceIdentifier of this Device.
|
java.lang.String |
fqnDn
The device number in FQN format.
|
Constructor and Description |
---|
CstaDevice(java.lang.String fqnDn,
CstaSystem cstaSystem)
CstaDevice Constructor.
|
Modifier and Type | Method and Description |
---|---|
CstaCallLogResponseWithErrorCode |
CallLogDelete(CstaCallLogDeleteList recordList)
Call Log Delete.
|
CstaCallLogResponseWithErrorCode |
CallLogSnapshot()
Call Log Snapshot.
|
void |
initDoNotDisturbData()
Initialize the Do Not Disturb data.
|
void |
initForwardingData()
Initialize each forwarding type data to null.
|
boolean |
isInService()
Get the status of the Device.
|
CstaConnection |
JoinCall(java.lang.String joiningDevice,
CstaJoinCallParticipationType type)
Join Call (device-only) with default options.
|
CstaConnection |
JoinCall(java.lang.String joiningDevice,
CstaJoinCallParticipationType type,
CstaAutoOriginate autoOriginate)
Join Call (device-only) with all options, autoOriginate as enumeration.
|
CstaConnection |
JoinCall(java.lang.String joiningDevice,
CstaJoinCallParticipationType type,
java.lang.String autoOriginate)
Join Call (device-only) with all options.
|
CstaConnection |
MakeCall(java.lang.String calledDevice)
Do a CSTA MakeCall with default options.
|
CstaConnection |
MakeCall(java.lang.String calledDevice,
CstaAutoOriginate autoOriginate,
boolean voice,
boolean image,
boolean im)
Do a CSTA MakeCall with options except appCallbackID and appCallbackName, autoOriginate as enumeration.
|
CstaConnection |
MakeCall(java.lang.String calledDevice,
CstaAutoOriginate autoOriginate,
boolean voice,
boolean image,
boolean im,
java.lang.String appCallbackID,
java.lang.String appCallbackName)
Do a CSTA MakeCall with all options, autoOriginate as enumeration.
|
CstaConnection |
MakeCall(java.lang.String calledDevice,
java.lang.String autoOriginate,
boolean voice,
boolean image,
boolean im)
Do a CSTA MakeCall with options except appCallbackID and appCallbackName.
|
CstaConnection |
MakeCall(java.lang.String calledDevice,
java.lang.String autoOriginate,
boolean voice,
boolean image,
boolean im,
java.lang.String appCallbackID,
java.lang.String appCallbackName)
Do a CSTA MakeCall with options.
|
CstaConnection |
MakeCall(java.lang.String calledDevice,
java.lang.String appCallbackID,
java.lang.String appCallbackName)
Do a CSTA MakeCall with appCallbackID and appCallbackName with default options.
|
void |
removeForwarding(CstaForwardingType type)
Set Forwarding Data to null.
|
void |
setDNDSnoozeDuration(int DNDResume)
Set current DND snooze duration in SDK.
|
void |
setDoNotDisturbStatus(boolean status)
Set current DND status in SDK.
|
void |
setForwardingData(CstaForwardingData data)
Set the Forwarding Data.
|
void |
setInService(boolean inService)
Set the status of the Device.
|
void |
setMessageWaitingOn(boolean messageWaitingOn) |
void |
setNumberOfWaitingMessages(int numberOfWaitingMessages) |
java.util.List<CstaConnection> |
SnapshotDevice()
Do a Snapshot on the Device.
|
java.lang.String |
SnapshotDevice(java.lang.String aliRebidRequest)
A SnapshotDevice request to trigger the ALI re-bid
|
public java.lang.String fqnDn
public CstaDeviceIdentifier deviceIdentifier
public CstaDevice(java.lang.String fqnDn, CstaSystem cstaSystem)
A CstaDevice Object is always instantiated internally by CSTA SDK. The application shall never try to instantiate a new CstaDevice object. The application is able to retrieve the CstaDevice when adding it via CstaProvider.
fqnDn
- the serviceID in FQN format.cstaSystem
- the CstaSystem that is used internally.public CstaConnection MakeCall(java.lang.String calledDevice) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received.
The default options in the MakeCall request are:
calledDevice
- the called Device D2.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection MakeCall(java.lang.String calledDevice, java.lang.String autoOriginate, boolean voice, boolean image, boolean im) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received. The default options in the MakeCall request are:
calledDevice
- the called Device D2.autoOriginate
- currently is defined as String type, available options: doNotPrompt, prompt.voice
- support voice or not.image
- support image or not.im
- support im or not.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection MakeCall(java.lang.String calledDevice, CstaAutoOriginate autoOriginate, boolean voice, boolean image, boolean im) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received. The default options in the MakeCall request are:
calledDevice
- the called Device D2.autoOriginate
- defined as enum types: doNotPrompt, prompt.voice
- support voice or not.image
- support image or not.im
- support im or not.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection MakeCall(java.lang.String calledDevice, java.lang.String appCallbackID, java.lang.String appCallbackName) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received.
The default options in the MakeCall request are:
calledDevice
- the called Device D2.appCallbackID
- is the callbackID.appCallbackName
- is the callbackName.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection MakeCall(java.lang.String calledDevice, java.lang.String autoOriginate, boolean voice, boolean image, boolean im, java.lang.String appCallbackID, java.lang.String appCallbackName) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received.
calledDevice
- the called Device D2.autoOriginate
- currently is defined as String type, available options: doNotPrompt, prompt.voice
- support voice or not.image
- support image or not.im
- support im or not.appCallbackID
- is the callbackID.appCallbackName
- is the callbackName.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection MakeCall(java.lang.String calledDevice, CstaAutoOriginate autoOriginate, boolean voice, boolean image, boolean im, java.lang.String appCallbackID, java.lang.String appCallbackName) throws CstaException
The current CstaDevice D1 tries to call calledDevice(D2). If MakeCall is successful, a MakeCallResponse with valid CstaConnection D1C1 is received.
calledDevice
- the called Device D2.autoOriginate
- defined as enum types: doNotPrompt, prompt.voice
- support voice or not.image
- support image or not.im
- support im or not.appCallbackID
- is the callbackID.appCallbackName
- is the callbackName.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public java.util.List<CstaConnection> SnapshotDevice() throws CstaException
In the SnapshotDeviceResponse, it contains a list of Connections on this Device currently. If there is no call on the Device, an empty list is returned.
It is recommended to the Application to do a SnapshotDevice on the interested Devices when the application starts. It is helpful to show the status of each devices.
CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public java.lang.String SnapshotDevice(java.lang.String aliRebidRequest) throws CstaException
aliRebidRequest
- CstaException
public boolean isInService()
public void setInService(boolean inService)
inService
- the new status.public void setDoNotDisturbStatus(boolean status)
status
- the new status to be setpublic void setDNDSnoozeDuration(int DNDResume)
DNDResume
- the new snooze duration to be setpublic void initDoNotDisturbData()
public void setForwardingData(CstaForwardingData data)
data
- the new forwarding data.public void removeForwarding(CstaForwardingType type)
type
- the forwarding typepublic void initForwardingData()
public void setMessageWaitingOn(boolean messageWaitingOn)
public void setNumberOfWaitingMessages(int numberOfWaitingMessages)
public CstaConnection JoinCall(java.lang.String joiningDevice, CstaJoinCallParticipationType type) throws CstaException
JoiningDevice D3 wants to start a Continuous Silent monitor session on D1.
After Join, the CallID of D3 is a new one.
joiningDevice
- the device that wants to join, Device D3.type
- the participationType, could be active or silent.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection JoinCall(java.lang.String joiningDevice, CstaJoinCallParticipationType type, java.lang.String autoOriginate) throws CstaException
JoiningDevice D3 wants to start a Continuous Silent monitor session on D1.
After Join, the CallID of D3 is a new one.
joiningDevice
- the device that wants to join, Device D3type
- the participationType, could be active or silentautoOriginate
- currently is defined as String type, available options: doNotPrompt, promptCstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaConnection JoinCall(java.lang.String joiningDevice, CstaJoinCallParticipationType type, CstaAutoOriginate autoOriginate) throws CstaException
JoiningDevice D3 wants to start a Continuous Silent monitor session on D1.
After Join, the CallID of D3 is a new one.
joiningDevice
- the device that wants to join, Device D3type
- the participationType, could be active or silentautoOriginate
- defined as enum types: doNotPrompt, prompt.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaCallLogResponseWithErrorCode CallLogSnapshot() throws CstaException
CstaException
public CstaCallLogResponseWithErrorCode CallLogDelete(CstaCallLogDeleteList recordList) throws CstaException
CstaException