Device SDK
This document holds the technical & environmental details required to enable bespoke applications to use Geomant’s Desktop Connect Device SDK a Javascript library, providing call and recording funtcionality for a given device.
Connection to the SDK
The SDK can be used by any web based application by including the Javascript reference
<script src="[Desktop Connect Host FQDN]/dc4crm/api/deviceAPI.js"></script>
Getting started
Context parameters need to be passed in order to connect succefully to Desktop Connect server, these paramters include the following
Name | Description |
---|---|
dchost | FQDN of of Desktop Connect Server e.g. dc.geomant.com |
secure | Flag indicating if Desktop Connect server is published over secure protocols e.g. https |
aesindex | The Avaya AES connection to be used when performing call monitoring and control feature, if not specified the default connection is used |
tenant | The Desktop Connect tenant identifier, if not specified the default tenant is used - tenant needs to have Desktop Connect Agent licenses enabled |
Connecting to Desktop Connect using the SDK library is done by creating a new DeviceAPI, passign the environment variables.
env = {
dchost: 'dc-test.geomant.com',
secure: 'True',
aesindex: 0,
tenant: 'A10011'
};
var sdk = new DeviceAPI(env);
///Subscribe to events
sdk.subscribe('onStart', onImplStarted);
sdk.subscribe('onCallIncoming', onImplCallAlerting);
sdk.subscribe('onCallDropped', onImplCallDropped);
///Build connection
sdk.start();
Call & recording methods
DeviceAPI provides the following call & recording capabilities
Name | Description |
---|---|
loginWithAgent | Start call observation for the specified station and performs Avaya agent login on the given station |
loginWithoutAgent | Start call observation for the specified station |
logout | Logout agent from station |
setAgentState | Change agent presence state |
makeCall | Start call observation for the specified station |
dropCall | Terminate an active call connection |
holdCall | Place active call on hold |
unholdCall | Resume talking on a call that is held |
answerCall | Answer a ringing call |
quickTransferCall | Peform a single step transfer for the current active call |
completeTransferCall | Perform a transfer between two active calls |
completeConferenceCall | Perform a conference between two active calls |
sendDTMF | Send DTMF tone over the PSTN |
startRecording | Request recorder server to record active call |
stopRecording | Request recorder server to stop active recording |
pauseRecording | Request recorder server to pause recording for the ongoing call |
resumeRecording | Request recorder server to resume recroding for the ongoing call |
tagRecording | Request recorder server associated provided information with the call in the recorder metadatabase |
loginWithAgent
Start call observation for the specified station and performs Avaya agent login on the given station.
Parameters | Description |
---|---|
station | Avaya station extension to be monitored |
password | Avaya Agent extension password |
agentid | Avaya Agent extension |
force | Flag indiciating to take over already logged in sessions |
loginWithoutAgent
Start call observation for the specified station.
Parameters | Description |
---|---|
station | Avaya station extension to be monitored |
force | Flag indiciating to take over already logged in sessions |
logout
Logout agent from station, this method takes no paramters, agent logged in using the Device API is logged out.
setAgentState
Use this method to change the agents presence state.
Parameters | Description |
---|---|
mode | Avaya presence mode: DEFAULT = Default presence mode, as indicated by the switch AUTO_IN = Auto available MANUAL_IN = Go to Wrapup after each call |
state | Avaya state AUX = Break ( also specify reasoncode) AVAILABLE = Ready state (also specify mode) ACW = Wrapup |
reason | Number between 0 - 99, Not ready reason code, that is sent to the Avaya switch, depending on the setup it's either a single or double digit code |
makeCall
Request a new call to be initiated by the server, providing call attached data
NOTE: If there is already an active call on the users station, the call needs to be placed on hold before the make call action can be succesfully undertaken
Parameters | Description |
---|---|
destination | The number to be dialed, with switch dialing rules applied |
uui | 96 character length user to user data that will be passed along with the call, when used with the Data Store API the ID of the data record needs to be added into this field |
sdk.makeCall('900441789387900','gds_000001233099923123');
dropCall
Terminate an active call connection
Parameters | Description |
---|---|
ucid | Universal Call Identifier of the call connection that is to be terminated |
holdCall
Place active call on hold
Parameters | Description |
---|---|
ucid | Universal Call Identifier of the call connection that is to be held |
unholdCall
Resume talking on a call that is held
Parameters | Description |
---|---|
ucid | Universal Call Identifier of the call connection that is to be resumed |
answerCall
Answer a ringing call
Parameters | Description |
---|---|
ucid | Universal Call Identifier of the call connection that is to be ringing and should be set to talking state |
quickTransferCall
Peform a single step transfer for the current active call
Parameters | Description |
---|---|
destination | The number to be dialed, with switch dialing rules applied |
uui | 96 character length user to user data that will be passed along with the call, when used with the Data Store API the ID of the data record needs to be added into this field |
completeTransferCall
Perform a transfer between two active calls
Parameters | Description |
---|---|
fromUcid | Universal Call Identfier of the first call participant - this call is on hold |
toUcid | Universal Call Identfier of the transfer to destianation - this call is on connected |
completeConferenceCall
Perform a conference between two active calls
Parameters | Description |
---|---|
fromUcid | Universal Call Identfier of the first call participant - this call is on hold |
toUcid | Universal Call Identfier of the transfer to destianation - this call is on connected |
sendDTMF
send DTMF tone over the PSTN
Parameters | Description |
---|---|
dtmf | Digit between 0-9 or *,# sign |
startRecording
Request recorder server to record active call.
Parameters | Description |
---|---|
tags | Upto seven name-value pair items that will be saved in the recording system, the name used needs to exists in the recorder custom metadata definition |
stopRecording
Request recorder server to stop active recording.
Parameters | Description |
---|---|
tags | Upto seven name-value pair items that will be saved in the recording system, the name used needs to exists in the recorder custom metadata definition |
pauseRecording
Request recorder server to pause recording for the ongoing call, this method takes no parameter, it pause the ongoing active call, if any.
resumeRecording
Request recorder server to resume recroding for the ongoing call, this method takes no parameter, it resumes the ongoing active call, if any.
tagRecording
Request recorder server associated provided information with the call in the recorder metadatabase.
Parameters | Description |
---|---|
tags | Upto seven name-value pair items that will be saved in the recording system, the name used needs to exists in the recorder custom metadata definition |
Call & recording events
DeviceAPI provides solicited events on call & recording events for the given device, subscription is required for each event.
///Subscribe to events
sdk.subscribe('onStart', onImplStarted);
sdk.subscribe('onCallIncoming', onImplCallAlerting);
sdk.subscribe('onCallDropped', onImplCallDropped);
Event | Description |
---|---|
onStart | Event tunneling has started, session is open for communication, for existing sessions with the same connection paramters synchronization is provided. |
stateChange | Provides notification on state update, notification |
onCallIncoming | Call is alerting at the observed station |
onCallDropped | Call has been terminated |
onCallInitiated | Call was initiated successfully, reached public network |
onOutboundCallRinging Initiated call reached the far end, and is ringing | |
onCallConnected Call is connected | |
onCallHeld | Call is in hold state |
onCallResume | Call has been retreieved from hold state |
onCallFailed | Failed to make a call |
onCallTransfer | Call is transfered |
onCallConferenced | Call is in conference |
started | Recording started for the observed station |
stopped | Recording stoppped for the observed station |
resumed | Recording resumed for the observed station and active call |
paused | Recording paused for the observed station and active call |
tagged | Custom data was written succesfully to the call recoder metadatabase |
onError | Error occured |
onStart
Event tunneling has started, session is open for communication, for existing sessions with the same connection paramters synchronization is provided.
Data | Optional | Description |
---|---|---|
buzzeasy | No | True if Buzzesy license is enabled for the user |
wallboard | No | True if Buzzesy license is enabled for the user |
version | No | Server WebSocket API version |
ctistate | No | State of the user NONE - No user logged in MONITOR_ONLY - Call observation started BUSY - User is on call ACW - Agent is in wrapup AUX - Agent is on break MANUAL_IN - Agent is available, will transition to wrapup after every ACD call AUTO_IN - Agent is available for calls |
reasoncode | Yes | Current break reason code of the agent if any |
agentid | Yes | Agent identifier associated witlogged in sessions |
station | Yes | User phone extension |
acrstate | Yes | Call recording state |
acrinum | Yes | Call recording unique identifier |
acrtype | Yes | Call recorder type (acr/verint) |
stateChange
Provides notification on state update, notification
Data | Optional | Description |
---|---|---|
workmode | No | CTI |
state | No | User state NONE - No user logged in MONITOR_ONLY - Call observation started BUSY - User is on call ACW - Agent is in wrapup AUX - Agent is on break MANUAL_IN - Agent is available, will transition to wrapup after every ACD call AUTO_IN - Agent is available for calls |
pending | No | Indicates if the state change is still pending |
reasoncode | Yes | Break reason code |
onCallIncoming
Call is alerting at the observed station
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
delivacd | No | Extension of the hunt group where the call was delivered |
delivering | No | Alphanumeric name of the huntgroup |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call talking |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"delivering":"General Inquiry",
"callid":"1398",
"party0":"36704553352",
"ptime0":"1586550554609",
"called":"3618863396",
"inbound":"true",
"uui":"",
"servertime":"1586550554609",
"callstarted":1586550554609,
"remotenumber":"36704553352",
"state":"ringing",
"ucid":"00001013981586550552",
"delivacd":"330245"
onCallDropped
Call connection is dropped
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
inbound | No | Flag, showing the direction of the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call before being disconnected talking/ringing |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"callid":"1400",
"remotenumber":"06704553352",
"called":"06704553352",
"inbound":"false",
"uui":"",
"servertime":"1586551495191",
"state":"talking",
"callstarted":1586551476579,
"ucid":"00001014001586551476"
onCallInitiated
Call was initiated successfully, reached public network
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
inbound | No | Flag, showing the direction of the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call initated |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"callid":"1399",
"remotenumber":"06704553352",
"called":"06704553352",
"inbound":"false",
"servertime":"1586551204174",
"state":"initiated",
"callstarted":1586551204174,
"ucid":"00001013991586551204"
onOutboundCallRinging
Initiated call reached the far end, and is ringing
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call ringing |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"callid":"1399",
"remotenumber":"06704553352",
"party0":"Unknown trunk",
"ptime0":"1586551207241",
"called":"06704553352",
"inbound":"false",
"uui":"",
"servertime":"1586551207241",
"state":"ringing",
"callstarted":1586551204174,
"ucid":"00001013991586551204"
onCallConnected
Call is connected
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
delivacd | No | Extension of the hunt group where the call was delivered |
delivering | No | Alphanumeric name of the huntgroup |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call talking |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"delivering":"General Inquiry",
"callid":"1398",
"party0":"36704553352",
"ptime0":"1586550554609",
"called":"3618863396",
"inbound":"true",
"uui":"",
"servertime":"1586550579585",
"callstarted":1586550554609,
"remotenumber":"36704553352",
"state":"talking",
"ucid":"00001013981586550552",
"delivacd":"330245"
onCallHeld
Call is in hold state
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
delivacd | No | Extension of the hunt group where the call was delivered |
delivering | No | Alphanumeric name of the huntgroup |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call held |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"delivering":"General Inquiry",
"callid":"1398",
"party0":"36704553352",
"ptime0":"1586550554609",
"called":"3618863396",
"inbound":"true",
"uui":"",
"servertime":"1586550691593",
"callstarted":1586550554609,
"remotenumber":"36704553352",
"state":"held",
"ucid":"00001013981586550552",
"delivacd":"330245"
onCallResume
Call has been retreieved from hold state
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
delivacd | No | Extension of the hunt group where the call was delivered |
delivering | No | Alphanumeric name of the huntgroup |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call talking |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"delivering":"General Inquiry",
"callid":"1398",
"party0":"36704553352",
"ptime0":"1586550554609",
"called":"3618863396",
"inbound":"true",
"uui":"",
"servertime":"1586550711191",
"callstarted":1586550554609,
"remotenumber":"36704553352",
"state":"talking",
"ucid":"00001013981586550552",
"delivacd":"330245"
onCallFailed
Failed to make a call
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
inbound | No | Flag, showing the direction of the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call held |
ucid | No | Universal Call Identifier |
"callid":"1401",
"remotenumber":"3",
"called":"3",
"inbound":"false",
"servertime":"1586551651618",
"state":"failed",
"callstarted":1586551651517,
"ucid":"00001014011586551651"
onCallConferenced
Call is in conferenced
Data | Optional | Description |
---|---|---|
called | No | Dialed number |
callid | No | Switch internal call identifier |
callstarted | No | Timestamp of call start |
delivacd | No | Extension of the hunt group where the call was delivered |
delivering | No | Alphanumeric name of the huntgroup |
inbound | No | Flag, showing the direction of the call |
party[0-9] | No | List of participants in the call |
ptime[0-9] | No | Connection timestamp of each participant int the call |
remotenumber | No | Remote party number undertaking the given action |
servertime | No | Timestamp of event |
state | No | State of the call talking |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"party1":"06704553352",
"callid":"1399",
"party0":"334725",
"ptime0":"1586551210864",
"called":"06704553352",
"inbound":"false",
"ptime1":"1586551210508",
"uui":"",
"servertime":"1586551210864",
"callstarted":1586551204174,
"remotenumber":"06704553352",
"state":"talking",
"ucid":"00001013991586551204"
onCallTransfer
Call is in transfered
Data | Optional | Description |
---|---|---|
called | No | Transfer from station |
calling | No | Transfer to destination |
parties | No | Number of devices actively participating in the call |
ucid | No | Universal Call Identifier |
uui | No | User to user information, 96 character long string |
"called":"330212",
"calling":"330211",
"parties":"3",
"UUI":"geo_00001014091586551778",
"ucid":"00001014091586551778"
started
Recording started for the observed station
Data | Description |
---|---|
inum | call recroding unique identifier |
type | call recorder type |
tags | call tags |
recdata | recording data details |
stopped
Recording stoppped for the observed station
Data | Description |
---|---|
inum | call recroding unique identifier |
type | call recorder type |
tags | call tags |
paused
Recording paused for the observed station and active call
Data | Description |
---|---|
inum | call recording unique identifier |
resumed
Recording resumed for the observed station and active call
Data | Description |
---|---|
inum | call recording unique identifier |
tagged
Custom data was written succesfully to the call recoder metadatabase
Data | Description |
---|---|
type | call recorder type tags - call tags |