5. API Reference¶
-
module
TurretApi¶ - Cpp
osxpert.turret.api- Java
com.unify.osx.turret.api
5.1. Constants¶
-
constant
Ok: i32¶ Action performed successfully
-
constant
InvalidArgument: i32¶ One of the provided arguments has invalid value. Please refer to the description of the called function for more information.
-
constant
InvalidSpeechUnit: i32¶ No speech unit exists with the provided id.
-
constant
WrongLoginState: i32¶ The requested action can not be performed in the current login state.
-
constant
CannotSendRequest: i32¶ The request could not be forwarded to an external component (System Manager or MLC)
The provided line is not available at the moment. Check connection to MLC.
-
constant
LineBusy: i32¶ The provided line is already in use for another call.
-
constant
SpeechUnitBusy: i32¶ The provided speech unit is already in use for another call.
-
constant
InvalidLine: i32¶ There is no line available with the provided line name.
-
constant
NoIncomingCall: i32¶ There are no incoming calls on any line on the profile.
-
constant
LineIsNotRinging: i32¶ No call can be picked up from the requested line as it is in idle state.
-
constant
SpeechUnitHasNoCall: i32¶ The requested action can not be performed because there is no call on the provided speech unit.
-
constant
NoFreeLineAvailable: i32¶ There are no free lines available to perform the requested action.
The specified action can not be performed
-
constant
NoConsultation: i32¶ There is no consultation
-
constant
LoginSuccessful: i32¶ The provided login data is correct, the login process has been finished, the software is ready for use.
-
constant
NoConnectionToSm: i32¶ Connection to the System Manager has been lost.
-
constant
AuthenticationFailed: i32¶ The provided username and/or password is incorrect.
-
constant
DatabaseError: i32¶ The requested action failed due to a System Manager database operation error.
-
constant
UnknownProfile: i32¶ No profile could be found with the specified name.
-
constant
LdapError: i32¶ There was an error during the ldap authentication.
-
constant
LicenseNotAvailable: i32¶ The request was refused by the License Server.
-
constant
LoadTLSCertError: i32¶ There was an error loading the certificate files for Thrift TLS notifications.
-
constant
InvalidRingTransfer: i32¶ No ring transfer could be found with the provided identifier.
-
constant
RingTransferIsOnlyForSignalization: i32¶ The specified ring transfer is only for signalization, state can not be changed.
-
constant
RingTransferIsAlreadyInThatState: i32¶ The specified ring transfer is already in the requested state.
-
constant
RingTransferIsMissingOnServer: i32¶ The specified ring transfer not exists on the server. Try refreshing the config or contacting the system administrator.
-
constant
RingTransferHasNoLocalInstance: i32¶ The specified ring transfer could not be activated because there this ring transfer is not configured on the controlled profile. Contact the system administrator.
-
constant
RingTransferControlledProfileLoggedOut: i32¶ The specified ring transfer could not be activated because the controlled profile is logged out.
-
constant
RingTransferKagConflict: i32¶ The specified ring transfer could not be deactivated because it is the last active ring transfer in a keep active group.
-
constant
RingTransferStateChangeTimeout: i32¶ The ring transfer state change request timed out.
-
constant
InvalidRingTransferSequence: i32¶ No ring transfer sequence could be found with the provided identifier.
-
constant
RingTransferSequenceIsOnlyForSignalization: i32¶ The specified ring transfer sequence is only for signalization, state can not be changed.
-
constant
RingTransferSequenceIsAlreadyInThatState: i32¶ The specified ring transfer sequence is already in the requested state.
-
constant
RingTransferSequenceIsNotInverting: i32¶ The specified ring transfer sequence cannot be deactivated directly because it is not configured for inverting behavior.
-
constant
RingTransferSequenceIsMissingOnServer: i32¶ The specified ring transfer sequence not exists on the server. Try refreshing the config or contacting the system administrator.
-
constant
RingTransferSequenceStateChangeTimeout: i32¶ The ring transfer sequence state change request timed out.
-
constant
InvalidInterfaceAction: i32¶ No interface action could be found with the provided api name.
-
constant
InterfaceActionIsOnlyForSignalization: i32¶ The specified interface action is only for signalization, state can not be changed.
-
constant
InterfaceActionIsAlreadyInThatState: i32¶ The specified interface action is already in the requested state.
-
constant
InvalidInterfaceActionState: i32¶ The requested state can not be set for the specified interface action.
-
constant
Unknown: i32¶ Unexpected error has occured
5.2. Type aliases¶
-
typedef
LineName= string¶
-
typedef
SpeechUnitId= i16¶
-
typedef
TurretErrorCode= i32¶
5.3. Enumerations¶
-
enum
TurretState¶ -
TurretState.Logout= 0¶ The turret is logged out
-
TurretState.ReceiveCallsOnly= 1¶ The turret is in Receive Calls Only mode
-
TurretState.Login= 2¶ The turret is logged in with a profile
-
TurretState.Unknown= 255¶
-
-
enum
BasicLineState¶ -
BasicLineState.Idle= 0¶ No activity on the line
-
BasicLineState.Ringing= 1¶ There is an incoming call on the line
-
BasicLineState.Connected= 2¶ The line is considered as connected
-
BasicLineState.Conversation= 3¶ There is an ongoing call on the line on this device
-
BasicLineState.ConversationByAnother= 4¶ There is an ongoing call on the line on another device
-
BasicLineState.PrivateHold= 5¶ The call on this line is put on hold by this device, and the conversation partner isn’t notified about this
-
BasicLineState.PrivateHoldByAnother= 6¶ The call on this line is put on hold by another device, and the conversation partner isn’t notified about this
-
BasicLineState.CommonHold= 7¶ The call on this line is put on hold by this device
-
BasicLineState.CommonHoldByAnother= 8¶ The call on this line is put on hold by another device
-
BasicLineState.Privacy= 9¶ The call is private for this device, and cannot be accessed by other devices
-
BasicLineState.PrivacyByAnother= 10¶ The call is private for another device, and cannot be accessed by this device
-
BasicLineState.SpeechMonitoring= 11¶ The line is assigned to a speech monitoring channel by this device, and is not present on any speech unit
-
BasicLineState.ConferenceHold= 12¶ This line is hosting a conference that is put on hold
-
BasicLineState.Inactive= 13¶ The line is unavailable due to connection error
-
BasicLineState.SpeechMonitoringByAnother= 14¶ The line is assigned to a speech monitoring channel by another device
-
BasicLineState.Announcement= 15¶ There is an active announcement on the line
-
BasicLineState.Preseized= 16¶ The line is reserved to be used by this device, and cannot be accessed by other devices
-
BasicLineState.PreseizedByAnother= 17¶ The line is reserved to be used by another device, and cannot be accessed by this device
-
BasicLineState.HostingQuickConference= 18¶ The line is the host of a quick conference
-
BasicLineState.HostingConsultation= 19¶ The line is the host of a consultation
-
BasicLineState.HostingPbxConference= 20¶ The line is the host of a PBX conference
-
BasicLineState.Unknown= 255¶
-
-
enum
RingTransferState¶ -
RingTransferState.Active= 0¶ The ring transfer state is active
-
RingTransferState.Inactive= 1¶ The ring transfer state is inactive
-
-
enum
RingTransferSequenceState¶ -
RingTransferSequenceState.Active= 0¶ The ring transfer sequence state is active
-
RingTransferSequenceState.Inactive= 1¶ The ring transfer sequence state is inactive
-
RingTransferSequenceState.PartiallyActive= 2¶ The ring transfer sequence state is partially (some of the ring transfers are in the required state, but not all of them)
-
-
enum
InterfaceActionStateValue¶ -
InterfaceActionStateValue.Active= 0¶ The interface action state is active
-
InterfaceActionStateValue.Inactive= 1¶ The interface action state is inactive
-
InterfaceActionStateValue.State_A= 2¶ The interface action state is ‘A’
-
InterfaceActionStateValue.State_B= 3¶ The interface action state is ‘B’
-
InterfaceActionStateValue.State_C= 4¶ The interface action state is ‘C’
-
InterfaceActionStateValue.State_D= 5¶ The interface action state is ‘D’
-
InterfaceActionStateValue.State_E= 6¶ The interface action state is ‘E’
-
InterfaceActionStateValue.State_F= 7¶ The interface action state is ‘F’
-
InterfaceActionStateValue.State_G= 8¶ The interface action state is ‘G’
-
InterfaceActionStateValue.State_H= 9¶ The interface action state is ‘H’
-
InterfaceActionStateValue.State_I= 10¶ The interface action state is ‘I’
-
InterfaceActionStateValue.State_J= 11¶ The interface action state is ‘J’
-
InterfaceActionStateValue.State_K= 12¶ The interface action state is ‘K’
-
InterfaceActionStateValue.State_L= 13¶ The interface action state is ‘L’
-
InterfaceActionStateValue.State_M= 14¶ The interface action state is ‘M’
-
InterfaceActionStateValue.State_N= 15¶ The interface action state is ‘N’
-
InterfaceActionStateValue.State_O= 16¶ The interface action state is ‘O’
-
InterfaceActionStateValue.State_P= 17¶ The interface action state is ‘P’
-
InterfaceActionStateValue.State_Q= 18¶ The interface action state is ‘Q’
-
InterfaceActionStateValue.State_R= 19¶ The interface action state is ‘R’
-
InterfaceActionStateValue.State_S= 20¶ The interface action state is ‘S’
-
InterfaceActionStateValue.State_T= 21¶ The interface action state is ‘T’
-
InterfaceActionStateValue.State_U= 22¶ The interface action state is ‘U’
-
InterfaceActionStateValue.State_V= 23¶ The interface action state is ‘V’
-
InterfaceActionStateValue.State_W= 24¶ The interface action state is ‘W’
-
InterfaceActionStateValue.State_X= 25¶ The interface action state is ‘X’
-
InterfaceActionStateValue.State_Y= 26¶ The interface action state is ‘Y’
-
InterfaceActionStateValue.State_Z= 27¶ The interface action state is ‘Z’
-
5.4. Structs¶
-
struct
LineStatesData¶ Contains the name of a line and the composite state of the line. Used for snapshots about lines, and notification about state changes of the line.
-
field
lineName: TurretApi.LineName¶ Unique name of the line
-
field
basicLineStates: set<TurretApi.BasicLineState>¶ Set of BasicLineStates of the line (as they are not all mutually exclusive)
-
field
-
struct
SubscriberInfo¶ Contains information required to be able to subscribe for notifications.
-
field
ipAddress: string¶ Specifies the notification receiver’s IP address
-
field
port: i32¶ Specifies the port the receiver is listening on
-
field
turretName: string¶ Notifications will contain this name for turret identification if the connecting client has to handle multiple turrets at the same time. This parameter is optional. If no turretName is provided, the notifications will be sent with an empty string as the name.
-
field
-
struct
RingTransferId¶ Contains information required to identify a ring transfer or a ring transfer sequence
-
field
apiName: string¶ The API name of the ring transfer
-
field
controlledProfileName: string¶ The name of the controlled profile
-
field
-
struct
InterfaceActionState¶ Contains information about an interface action’s state and the texts displayed on its button
-
field
state: TurretApi.InterfaceActionStateValue¶ The state of the ring transfer
-
field
labelText: string¶ The overriding text for ‘label’. Overriding means that it is an empty string in case of default text. It is optional only when used in setInterfaceActionState.
-
field
firstLineText: string¶ The text displayed on the first line. Overriding means that it is an empty string in case of default text. It is optional only when used in setInterfaceActionState.
-
field
secondLineText: string¶ The text displayed on the second line. Overriding means that it is an empty string in case of default text. It is optional only when used in setInterfaceActionState.
-
field
-
exception
TurretApiException¶ Exception type used to indicate that an error has occured.
-
field
ErrorCode: TurretApi.TurretErrorCode¶ Unique number indicating the error
-
field
ErrorAsString: string¶ Short description of the problem, useful for logging
-
field
5.5. Services¶
-
service
TurretRequestService¶ -
void
requestNotifications(TurretApi.SubscriberInfosubscriberInfo)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
subscriberInfo – SubscriberInfo IP address and port of the requesting client; Optionally contains turret display name
- Exceptions
ex –
Requests notifications about line state change, login state change, login errors and change on top of call queue.
-
list<TurretApi.LineName>
getAvailableLines()throws (TurretApi.TurretApiExceptionex)¶ - Exceptions
ex –
Requests and returns a list about the identifiers of the available lines.
TurretApi.TurretApiExceptionis thrown if the turret is logged out.
-
TurretApi.LineStatesData
snapshotLineRequest(TurretApi.LineNamelineName)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
lineName – Identifier of the requested line
- Exceptions
ex –
Requests the state of the line specified by lineName.
TurretApi.TurretApiExceptionis thrown if the turret is logged out or line name is invalid.
-
void
login(stringprofileName,stringpassword)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
profileName – Name of the profile
password – Profile’s password
- Exceptions
ex –
Requests the turret to log in with the specified profile name and password.
TurretApi.TurretApiExceptionis thrown if the turret is already logged in. A successful call of this function only means that the request is forwarded to the System Manager; The actual response will arrive in a login response notification (see onLoginResponse)
-
void
logout()throws (TurretApi.TurretApiExceptionex)¶ - Exceptions
ex –
Requests the turret to log out of the currently logged in profile.
TurretApi.TurretApiExceptionis thrown if the turret is already logged out.
-
void
makeCall(TurretApi.SpeechUnitIdsuId,stringnumber)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
number – Telephone number to call
- Exceptions
ex –
Requests the turret to dial the given number from the specified speech unit.
TurretApi.TurretApiExceptionis thrown if speech unit id is invalid, the speech unit is busy or there is no free line to initiate a call from.
-
void
makeCallFromSpecificLine(TurretApi.SpeechUnitIdsuId,TurretApi.LineNamelineName,stringnumber)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
lineName – Line identifier from which the call will be initiated
number – Telephone number to call
- Exceptions
ex –
Requests the turret to dial the given number from the specified speech unit using a certain line.
TurretApi.TurretApiExceptionis thrown if speech unit id or lineName is invalid, the speech unit or line is busy or the line is unavailable.
-
void
createConsultation(TurretApi.SpeechUnitIdsuId,stringnumber)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
number – Telephone number to call
- Exceptions
ex –
Request the turret to create a Consultation on
suIdby callingnumber. It is prerequisite that there is a line onsuIdand it isConnected.
-
void
transfer(TurretApi.SpeechUnitIdsuId)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
- Exceptions
ex –
Request the turret to execute Transfer on the given
suId. The line seized onsuIdmust have theHostingConsultationstate.
-
void
toggle(TurretApi.SpeechUnitIdsuId)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
- Exceptions
ex –
Request the turret to execute Toggle on the given
suId. The line seized onsuIdmust have theHostingConsultationstate.
-
void
pbxConference(TurretApi.SpeechUnitIdsuId)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Speech unit identifier
- Exceptions
ex –
Request the turret to create a PBX Conference (max. 3 participants) on the given
suId. The line seized onsuIdmust have theHostingConsultationstate. If the request was successful, the line on the givensuIdwill have theHostingPbxConferencestate.
-
void
answerCall(TurretApi.SpeechUnitIdsuId)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Receiver speech unit’s identifier
- Exceptions
ex –
Answers the incoming call with the highest priority in the call queue.
TurretApi.TurretApiExceptionis thrown if speech unit id is invalid or the speech unit is busy.
-
void
answerSpecificCall(TurretApi.SpeechUnitIdsuId,TurretApi.LineNamelineName)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Receiver speech unit’s identifier
lineName – Ringing line’s identifier which will be picked up
- Exceptions
ex –
Answers the incoming call on the line specified by lineName.
TurretApi.TurretApiExceptionis thrown if speech unit id or lineName is invalid, the speech unit is busy or there is no incoming call on the specified line.
-
void
disconnectCall(TurretApi.SpeechUnitIdsuId)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
suId – Receiver speech unit’s identifier
- Exceptions
ex –
Disconnects the call present on the speech unit specified by suId
TurretApi.TurretApiExceptionis thrown if the speech unit id is invalid, there is no ongoing call on the speech unit, or the turret is not logged in.
-
TurretApi.TurretState
getLoginState()¶ Requests the current login state of the turret
-
string
getVersion()¶ Requests the version of the turret software.
-
list<TurretApi.RingTransferId>
getAvailableRingTransfers()throws (TurretApi.TurretApiExceptionex)¶ - Exceptions
ex –
Requests the list of available ring transfers
-
TurretApi.RingTransferState
snapshotRingTransfer(TurretApi.RingTransferIdid)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
id –
- Exceptions
ex –
Requests the current state of the ring transfer
-
void
setRingTransferActive(TurretApi.RingTransferIdid,boolactive)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
id –
active –
- Exceptions
ex –
Sets the ring transfer’s state
-
list<TurretApi.RingTransferId>
getAvailableRingtransferSequences()throws (TurretApi.TurretApiExceptionex)¶ - Exceptions
ex –
Requests the list of available ring transfer sequences
-
TurretApi.RingTransferSequenceState
snapshotRingTransferSequence(TurretApi.RingTransferIdid)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
id –
- Exceptions
ex –
Requests the current state of the ring transfer sequence
-
void
setRingTransferSequenceActive(TurretApi.RingTransferIdid,boolactive)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
id –
active –
- Exceptions
ex –
Sets the ring transfer sequence’s state
-
list<string>
getAvailableInterfaceActions()throws (TurretApi.TurretApiExceptionex)¶ - Exceptions
ex –
Requests the list of available interface actions
-
TurretApi.InterfaceActionState
snapshotInterfaceAction(stringapiName)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
apiName –
- Exceptions
ex –
Requests the current state of the interface action including the displayed texts
-
void
setInterfaceActionState(stringapiName,TurretApi.InterfaceActionStatestate)throws (TurretApi.TurretApiExceptionex)¶ - Parameters
apiName –
state –
- Exceptions
ex –
Sets the interface action’s state The texts within InterfaceActionState are optional. The texts are not changed if they are not specified. The texts can be reset to their original value by setting an empty string.
-
void
-
service
TurretNotificationService¶ -
onewayvoid
onLineStatesChanged(stringturretName,TurretApi.LineStatesDatastates)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
states – Contains the name and the new state of the line.
Notifies about the change of state of the specified line.
-
onewayvoid
onCallDataChanged(stringturretName,TurretApi.LineNamelineName,stringpartyNumber,stringpartyName,stringcontactName)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
lineName – Name of the line.
partyNumber – Line number of the other party.
partyName – Name of the line as provided by the PBX, encoded in UTF-8.
contactName – Name of the calling party resolved from the contact list, encoded in UTF-8.
Notifies about the change of the possibly displayed name(s) of the line. Note: The turret’s GUI shows this information in the following way:
If
contactNameis not empty, then it is displayed.If
partyNameis not empty, then"{partyNumber} {partyName}"is displayed.In other cases, the
partyNumberis diplayed.
-
onewayvoid
onLoginStateChanged(stringturretName,TurretApi.TurretStatestate)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
state – New login state of the turret.
Notifies about the login state change of the turret software.
-
onewayvoid
onLoginResponse(stringturretName,TurretApi.TurretErrorCodeerrorCode,stringerrorDescription)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
errorCode – Error code (see Constants)
errorDescription – Short text description of the error
Notifies about an error during the login process
-
onewayvoid
onTopOfCallQueueChanged(stringturretName,TurretApi.LineNamelineName)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
lineName – Name of the line at the top of the call queue or an empty string if there is none.
Notifies a new incoming call having higher priority than the ones before, or if all incoming calls have been removed from the call queue
-
onewayvoid
onRingTransferStateChanged(stringturretName,TurretApi.RingTransferIdid,TurretApi.RingTransferStatestate)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
id – Identifier of the ring transfer
state – The new state of the ring transfer
Notifies a ring transfer state change.
-
onewayvoid
onRingTransferStateChangeError(stringturretName,TurretApi.RingTransferIdid,TurretApi.TurretErrorCodeerrorCode,stringerrorDescription)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
id – Identifier of the ring transfer
errorCode – Error code (see
TurretApi.TurretErrorCode)errorDescription – Short text description of the error
Notifies that a previous request to change the activation of a ring transfer has failed. (See
TurretApi.TurretRequestService.setRingTransferActive.)
-
onewayvoid
onRingTransferSequenceStateChanged(stringturretName,TurretApi.RingTransferIdid,TurretApi.RingTransferSequenceStatestate)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
id – Identifier of the ring transfer sequence
state – The new state of the ring transfer sequence
Notifies a ring transfer sequence state change.
-
onewayvoid
onRingTransferSequenceStateChangeError(stringturretName,TurretApi.RingTransferIdid,TurretApi.TurretErrorCodeerrorCode,stringerrorDescription)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
id – Identifier of the ring transfer sequence
errorCode – Error code (see
TurretApi.TurretErrorCode)errorDescription – Short text description of the error
Notifies that a previous request to change the activation of a ring transfer sequence has failed. (See
TurretApi.TurretRequestService.setRingTransferSequenceActive.)
-
onewayvoid
onInterfaceActionStateChanged(stringturretName,stringapiName,TurretApi.InterfaceActionStatestate)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
apiName – Identifier of the interface action
state – The new state of the interface action
Notifies a interface action state change (including changes in the overriding texts).
-
onewayvoid
onInterfaceActionKeyChanged(stringturretName,stringapiName,TurretApi.InterfaceActionKeyStatekeyState)¶ - Parameters
turretName – Identifier of the turret specified at notification subscription. It’s an empty string if no name was specified at subscription.
apiName – Identifier of the interface action
keyState – The key event
Notifies an interface action key event (press/release).
-
onewayvoid