API Server Event Interface

The Uptivity API Server can be utilized by any program that can communicate over HTTP. NICE Uptivity can broadcast events about known devices. Other applications can subscribe to those events to watch for state changes.

Events are different from API Responses. An event may be tied to an API response generated by an issued API command, or it may simply be a state change based on call activity or a Uptivity software client interacting with the API. For example, a program could be written to watch for events related to blackouts, chat, or NICE Uptivity On-Demand-initiated recording. The program monitoring these events could notify a supervisor or distribution group, log the events for later analysis, or other similar activities. For more information, see API Overview.

Event Interface

The Event Proxy is a standard blocking TCP server listening on port 5620. Usage is as simple as connecting to the port and sending a well-formatted XML request. See API Server Settings for more information on API Server configuration.

Messages that are sent should end with a carriage return / line feed character (\r\n or ASCII character #1310 [Hex $DA]) to signal the end of data transmission.

Request Command

This command must be sent by any client application to initiate event monitoring. The internal Uptivity APIClosedAn acronym for Application Program Interface. An API facilitates interaction between software components and specifies how they should interact. passes these events to the Event Proxy.

<REQUEST>

<REQUESTID>0</REQUESTID>

<TYPE>EVENTS</TYPE>

<EVENTCLASS>ALL</EVENTCLASS>

<EVENTVALUE></EVENTVALUE>

</REQUEST>

Request Result Schema

<RESULT>

<REQUESTTYPE>EVENTS</REQUESTTYPE>

<REQUESTID>0</REQUESTID>

<RESULTTYPE>API_OK</RESULTTYPE>

<RESULTCODE>20</RESULTCODE>

<RESULTMSG>API_OK</RESULTMSG>

<EVENTXREF>0</EVENTXREF>

<EVENTCLASS>ALL</EVENTCLASS>

<EVENTTYPE></EVENTTYPE>

</RESULT>

CALLSTART Event

The CALLSTART event signals that Uptivity has received a call start notification from a CTIClosedAn acronym for Computer Telephony Integration - any technology that allows interactions on both computer(s) and phone(s) to be integrated. or API source.

<CALLCOPYEVENT>

<EVENTCLASS>CALL</EVENTCLASS>

<EVENTTYPE>CALLSTART</EVENTTYPE>

<MODULE>Api</MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<GLOBALCALLID></GLOBALCALLID>

<DEVICEID>1111</DEVICEID>

<DEVICEALIAS></DEVICEALIAS>

<SYS_USER></SYS_USER>

<CRM_USER></CRM_USER>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<USER6></USER6>

<USER7></USER7>

<USER8></USER8>

<USER9></USER9>

<USER10></USER10>

<USER11></USER11>

<USER12></USER12>

<USER13></USER13>

<USER14></USER14>

<USER15></USER15>

<GROUP></GROUP>

<CALLINSTANCE></CALLINSTANCE>

<CALLDIRECTION>I</CALLDIRECTION>

<STATION></STATION>

<ISTRUNK></ISTRUNK>

<KEEPDAYS>30</KEEPDAYS>

<ARCHIVEACTION>-1</ARCHIVEACTION>

<STARTTIME>1/31/2011 2:39:49 PM</STARTTIME>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

CALLSTOP Event

The CALLSTOP event signals that Uptivity has received a call stop or call end notification from a CTI or API source.

<CALLCOPYEVENT>

<EVENTCLASS>CALL</EVENTCLASS>

<EVENTTYPE>CALLSTOP</EVENTTYPE>

<MODULE>Api</MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<DEVICEALIAS></DEVICEALIAS>

<SYS_USER></SYS_USER>

<CRM_USER></CRM_USER>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<USER6></USER6>

<USER7></USER7>

<USER8></USER8>

<USER9></USER9>

<USER10></USER10>

<CALLINSTANCE></CALLINSTANCE>

<USER11></USER11>

<USER12></USER12>

<USER13></USER13>

<USER14></USER14>

<USER15></USER15>

<GROUP></GROUP>

<KEEPDAYS>-1</KEEPDAYS>

<ARCHIVEACTION>-1</ARCHIVEACTION>

<GLOBALCALLID></GLOBALCALLID>

<DEVICEID>1111</DEVICEID>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

RECORDINGSTARTED Event

The RECORDINGSTARTED event signals that Uptivity is recording a call.

<CALLCOPYEVENT>

<EVENTCLASS>RECORD</EVENTCLASS>

<EVENTTYPE>RECORDINGSTARTED</EVENTTYPE>

<MODULE>Api</MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<DEVICEID>1111</DEVICEID>

<FILENAME>C:\Recordings\20110131\1111\1111-14-39-50.au</FILENAME>

<CHANNEL>1</CHANNEL>

<ERRORREASON>NONE</ERRORREASON>

<GLOBALCALLID></GLOBALCALLID>

<DEVICEALIAS></DEVICEALIAS>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<USER6></USER6>

<USER7></USER7>

<USER8></USER8>

<USER9></USER9>

<USER10></USER10>

<USER11></USER11>

<USER12></USER12>

<USER13></USER13>

<CALLINSTANCE></CALLINSTANCE>

<USER14></USER14>

<USER15></USER15>

<GROUP></GROUP>

<KEEPDAYS>30</KEEPDAYS>

<ARCHIVEACTION>-1</ARCHIVEACTION>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

RECORDINGSTOPPED Event

The RECORDINGSTOPPED event signals that Uptivity has stopped recording a call.

<CALLCOPYEVENT>

<EVENTCLASS>RECORD</EVENTCLASS>

<EVENTTYPE>RECORDINGSTOPPED</EVENTTYPE>

<MODULE></MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<GLOBALCALLID>000100000000092</GLOBALCALLID>

<DEVICEID>1111</DEVICEID>

<DEVICEALIAS></DEVICEALIAS>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<KEEPDAYS>30</KEEPDAYS>

<RECORDID>13101</RECORDID>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

RECORDINGUPDATE Event

The RECORDINGUPDATE event signals that Uptivity has saved a recording to the database.

<CALLCOPYEVENT>

<EVENTCLASS>RECORD</EVENTCLASS>

<EVENTTYPE>RECORDINGUPDATE</EVENTTYPE>

<MODULE></MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<GLOBALCALLID>000100000000092</GLOBALCALLID>

<DEVICEID>1111</DEVICEID>

<KEEPDAYS>30</KEEPDAYS>

<FILENAME>C:\Recordings\20110131\1111\1111-14-39-50.au</FILENAME>

<RECORDID>13101</RECORDID>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

RECORDINGPAUSED Event

The RECORDINGPAUSED event signals that Uptivity has paused recording a call.

<CALLCOPYEVENT>

<EVENTCLASS>RECORD</EVENTCLASS>

<EVENTTYPE> RECORDINGPAUSED</EVENTTYPE>

<MODULE>Api</MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<DEVICEID>1111</DEVICEID>

<FILENAME>C:\Recordings\20110131\1111\1111-14-39-50.au</FILENAME>

<CHANNEL>1</CHANNEL>

<ERRORREASON>NONE</ERRORREASON>

<GLOBALCALLID></GLOBALCALLID>

<DEVICEALIAS></DEVICEALIAS>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<USER6></USER6>

<USER7></USER7>

<USER8></USER8>

<USER9></USER9>

<USER10></USER10>

<USER11></USER11>

<USER12></USER12>

<USER13></USER13>

<CALLINSTANCE></CALLINSTANCE>

<USER14></USER14>

<USER15></USER15>

<GROUP></GROUP>

<KEEPDAYS>30</KEEPDAYS>

<ARCHIVEACTION>-1</ARCHIVEACTION>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

RECORDINGRESUMED Event

The RECORDINGRESUMED event signals that Uptivity has resumed recording a call after a pause.

<CALLCOPYEVENT>

<EVENTCLASS>RECORD</EVENTCLASS>

<EVENTTYPE> RECORDINGRESUMED</EVENTTYPE>

<MODULE>Api</MODULE>

<EVENTXREF>0</EVENTXREF>

<EVENTDATA>

<DEVICEID>1111</DEVICEID>

<FILENAME>C:\Recordings\20110131\1111\1111-14-39-50.au</FILENAME>

<CHANNEL>1</CHANNEL>

<ERRORREASON>NONE</ERRORREASON>

<GLOBALCALLID></GLOBALCALLID>

<DEVICEALIAS></DEVICEALIAS>

<GATE></GATE>

<ANI></ANI>

<DNIS></DNIS>

<AGENTID>16</AGENTID>

<USER1></USER1>

<USER2></USER2>

<USER3></USER3>

<USER4></USER4>

<USER5></USER5>

<USER6></USER6>

<USER7></USER7>

<USER8></USER8>

<USER9></USER9>

<USER10></USER10>

<USER11></USER11>

<USER12></USER12>

<USER13></USER13>

<CALLINSTANCE></CALLINSTANCE>

<USER14></USER14>

<USER15></USER15>

<GROUP></GROUP>

<KEEPDAYS>30</KEEPDAYS>

<ARCHIVEACTION>-1</ARCHIVEACTION>

<COREIDENT>1</COREIDENT>

</EVENTDATA>

</CALLCOPYEVENT>

See Also