General Explanation
Voicenter RealTime API uses events (in JSON format) to showcase the telephony activity of your account.
The events are sent via socket communication with Voicenter APIs and backbends.
You can use these event to create a popup or in case you are not using chrome browser the Real Time API will allow you to receive calling client's phone number in incoming calls.
This API suit for single page applications and using this API will allow you to do many other automated processes within your organization.
The Events SDK is used to communicate with Voicenter servers in order to receive real-
time data via sockets.
Underneath, the events SDK uses socket.io to send and receive events.
You can access our Voicenter Real time Events SDK library by pressing here or NuGet library for VoicenterEventsSDK.NET here.
Login type
To use the Realtime API, your organization will need to login to the service.
There are two types of connections to the service - User/Account.
User loginType
User - If you wish to receive events per user, you can use the credentials of each users
that can be obtained via Voicenter Cpanel interface.
User login Type example
let sdk = new EventsSDK({ loginType: 'user', email: '[email protected]', password: 'password', });
Account Login Type
If you wish to receive events of your entire account, you can use your account credentials or account token (provided by Voicenter).
Account login Type example
let sdk = new EventsSDK({ loginType: 'account', username: 'username', password: 'password', });
Account token loginType example
let sdk = new EventsSDK({ loginType: 'token', useLoginApi: true, token: 'token', });
HTML (WebSocket) connection example – Client Side
<html> <head></head> <body> Status: <span id="status-txt">Disconnected</span> <br/> <br/> <div id="response-body"></div> </body> </html> <!-- Events SDK --> <script src="https://cdn.voicenter.co/cdn/events-sdk/voicenter-events-sdk.umd.js"></script> <script> let sdk = new EventsSDK({ loginType: 'user', email: '[email protected]', password: 'password', }); sdk.init().then(function () { // Success login event sdk.on('loginSuccess', function (response) { document.getElementById("status-txt").innerHTML = "Connected"; }) // Extension event sdk.on('ExtensionEvent', function (response) { console.log(response); const cur = document.getElementById("response-body"); cur.innerHTML = cur.innerHTML + response.data.reason + "<br />"; }) // After logging in, receive all extensions statuses sdk.on('AllExtensionsStatus', function (response) { console.log(response); }) }); </script>
HTML sample project output example.
First glance of the initial page will reveal connection status and ongoing events of the user/account.
In order to view details of events, please go to your browser’s diagnostic tools. (Normally done by pressing the F12 key).
C# (WebSocket) connection example – Server Side
You can learn more from our demo GitHub repository.
using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using VoicenterRealtimeAPI; namespace ConsoleApp1 { class Program { static void Main(string[] args) { //Logger VoicenterRealtime voicenterRealtime = new VoicenterRealtime(); Logger.onLog += (object sender, VoicenterRealtimeLogger e) => { Console.WriteLine(e.message); }; //Listener VoicenterRealtimeListener socket = voicenterRealtime.Token("XXXXX").Init(); socket.OnEvent += OnEventHandler; socket.Listen(); Console.ReadLine(); } } }
This will the response after the connection:
RealTime API – Events Types
The Voicenter web socket server has the following types of events sent to your client in real
time.
While connected with the appropriate web socket containing the right permissions.
The data is sent in POST JSON format.
- Initial message
- loginSuccess
- loginStatus
- AllExtensionStatus
- QueueEvents
- ExtensionEvent
Initial message
This type of event will be sent in the initial login connection request.
The sent data in this event describes the initial socket settings.
Mainly for Voicenter use.
Field Name | Description | Type |
sid | Socket id - a unique code referring to this specific connection of socket that was established. | String |
Upgrades | The list of possible transport upgrades. | Array |
pingInterval | The Interval the of socket.io protocol. | Integer |
pingTimeout | The timeout Interval of the socket.io protocol. | Integer |
Initial message Response
{ sid: "WF-eNmG0VbGkSn1wbD3n", upgrades: [], pingInterval: 60000, pingTimeout: 180000 }
loginSuccess
This type of event will be sent in the initial login connection request in case of a successful connection only.
In case of wrong user name or password or token, you will receive a 401 (“Unauthorized”) or 500 (“Unexpected token”) http error.
loginSuccess parameters
Field Name | Description | Type |
errorCode | 0 - Connection was establishing successfully. | Integer |
errorDesc | “Ok” - Connection was establishing successfully. | String |
servertime | The Interval the of socket.io protocol. | Integer |
servertimeoffset | The timeout Interval of the socket.io protocol. | Integer |
loginSuccess parameters Example
{ errorCode: 0, errorDesc: "OK" servertime: 1597930812, servertimeoffset: 180, }
loginStatus
This type of event will be sent only in case of a successful connection.
The event describes the list of monitored queues on this active connection.
The list of monitored queues will only be sent if the login connection was made with account credentials or account token.
If the login connection type is by user credentials, only the user’s extension assigned queues will return.
loginStatus Parameters
Field Name | Description | Type |
errorCode | 0 – ok. no errors. | Integer |
errorDesc | “Ok” - Connection was establishing successfully. | String |
servertime | The Interval the of socket.io protocol. | Integer |
servertimeoffset | The timeout Interval of the socket.io protocol. | Integer |
Queues | A list of the monitored queues. | Array |
QueueID | Voicenter queue ID. | Integer |
QueueName | Voicenter queue name. | String |
Calls | A list of the current waiting calls in a specific queue. If there are no waiting calls in the specific queue the array will be empty. | Array |
CallerID | The caller caller ID. | String |
CallerName | The caller caller name. In Voicenter calls you can show a string value for a call. Not supported by all providers | String |
IvrUniqueID | The call unique Voicenter ID. | String |
Ivrid | The call unique Voicenter ID (same as the field described above). | String |
JoinTimeStamp | When the call was entered to the queue (epoch). | Integer |
loginStatus Example
["loginStatus", { "servertime":1597941727, "queues":[ { "Calls":[ { "CallerID":"0501234567", "CallerName":"John Doe", "IvrUniqueID":"2020082015645675456434324949c071d", "JoinTimeStamp":1597941709, "ivrid":"2020082015645675456434324949c071d" } ], "QueueID":12345678, "QueueName":"Queue1" }, { "Calls":[], "QueueID":12345679, "QueueName":"Queue2" } ], "errorCode":0 } ]
AllExtensionStatus
This type of event will be sent in case of a successful connection only.
The event describes the list of active monitored extensions on this active connection.
The list of monitored extensions will only be sent if the login connection was made with
account credentials or account token.
If the login connection type is by user credentials, the extensions list returns the current logged in user’s extension.
AllExtensionStatus Table
Field name | Description | Type |
errorCode | 0 – ok. no errors. | Integer |
errorDesc | “Ok” - Connection was establishing successfully. | String |
servertime | The Interval the of socket.io protocol. | Integer |
servertimeoffset | The timeout Interval of the socket.io protocol. | Integer |
extensions | A list of the monitored extensions. | Array |
userID | Voicenter user ID. The user that the extensions is assigned to. Each extension is assigned to a user. | Integer |
onlineUserID | The user ID of the user that is currently logged on to the extension. In case the representatives in your organization login in each shift to a different extension, this field will show the name of the representative that is currently working at the extension. | Integer |
userName | Voicenter user name. The user that the extensions is assigned to. | String |
number | Voicenter extension ID. | Integer |
extenUser | Sip username of the extension. | String |
representative | The user ID of the user that is currently logged on to the extension. In case the representatives in the organization login in each shift to a different extension, this field will show the name of the representative that is currently working at the extension. | Integer |
summery | In this array, we sent the name of the representative that is working with the extension. In case no representative made a login action to the extension, the name of the user that the extension is assigned to will be sent. Only the field which is sent in this array is “representative” with a String value. | Array |
representativeStatus | The current login status ID of the connected user. A value between 1-13 indicating the online user status. | Integer |
representativeUpdated | The time of the last user status change. | Integer |
lastCallEventEpoch | When was the last time a call was made in the extension, Epoch time. | Integer |
lastAnsweredCallEventEpoch | When was the last time a call was answered in the extension, Epoch time. | Integer |
lastHangupCallEpoch | When was the last time a call was ended in the extension, Epoch time. | Integer |
Calls | A list of the current active calls in the extension. If there are no dialing\ringing calls in the specific extension the list will be empty. | Array |
CallerID | The caller caller ID. | String |
CallerName | The caller caller name. In Voicenter calls you can show a string value for a call. Not supported by all providers. | String |
IvrUniqueID | The call unique Voicenter ID. | String |
Ivrid | The call unique Voicenter ID (same as the field described above). | String |
JoinTimeStamp | When the call was entered to the queue (epoch). | Integer |
AllExtensionStatus Example
["AllExtensionsStatus", { "servertime":1597945606, "extensions": [ { "calls":[], "userID":12345678, "userName":"Clark Kent", "number":9876543, "onlineUserID":12345678, "extenUser":"SIPSIP1", "summery": { "representative":"Clark Kent" }, "representative":0, "representativeStatus":2, "lastCallEventEpoch":1597933035, "lastAnsweredCallEventEpoch":1545243466, "representativeUpdated":0, "peerStatus":"OK" }, { "calls":[], "userID":12345679, "userName":"Lois Lane", "number":9876542, "extenUser":"SIPSIP2", "summery": { "representative":"Lois Lane" }, "representative":12345679, "representativeStatus":1, "lastCallEventEpoch":1597944981, "lastAnsweredCallEventEpoch":1597944981, "representativeUpdated":1597944933000, "peerStatus":"OK" } ], "errorCode":0 } ]
QueueEvent
This type of event describes call entering and exiting a queue.
It will only be sent if the initial socket login connection was made with account credentials or account token.
If the login connection type is by user credentials, this type of event will not be sent.
QueueEvent Parameters
Field name | Description | Type |
eventName | "queue". Indication of the event type. | String |
reason | The reason this event was sent. For queue event there can be these reasons: “JOIN” – A new call was entered to the queue and it is now waiting to be answered. “EXIT” – When a waiting call is answered in one of the extensions. “ABANDONED” - When a waiting call is not answered. Either the caller chose to end the call or the call waiting time in the queue had reached the maximum waiting time. | String |
servertime | The Interval the of socket.io protocol. | Integer |
servertimeoffset | The timeout Interval of the socket.io protocol. | Integer |
data | A list of the queue event details. | Array |
QueueID | Voicenter queue ID. | Integer |
QueueName | Voicenter queue name. | String |
Calls | A list of the current waiting calls in a specific queue. If there are no waiting calls in the specific queue the list will be empty. | Array |
CallerID | The caller caller ID. | String |
CallerName | The caller caller name. In Voicenter calls you can show a string value for a call. Not supported by all providers. | String |
IvrUniqueID | The call unique Voicenter ID. | String |
Ivrid | The call unique Voicenter ID (same as the field described above). | String |
JoinTimeStamp | When the call was entered to the queue (epoch). | Integer |
QueueEvent JOIN Example
A call is entering a queue
["QueueEvent", { "data": { "QueueID":1234567, "Calls": [ { "CallerID":"0501234567", "CallerName":"John Doe”, "IvrUniqueID":"2020082015645675456434324949c071d", "JoinTimeStamp":1598206105, "calldurationinterval":1598206105, "ivrid":"2020082015645675456434324949c071d" } ], "QueueName":"Queue1" }, "eventName":"queue", "reason":"JOIN", "servertime":1598206105, "servertimeoffset":180, "telephonyservertime":1598206105, "ivruniqueid":"2020082015645675456434324949c071d" } ]
QueueEvent EXIT Example
A call is answered by an extension (a call is exiting the queue)
["QueueEvent", { "data": { "QueueID":1234567, "Calls":[], "QueueName":"Queue1" }, "eventName":"queue", "reason":"EXIT", "servertime":1598206119, "servertimeoffset":180, "telephonyservertime":1598206119, "ivruniqueid":"2020082015645675456434324949c071d" } ]
QueueEvent ABANDONED Example
The caller chose to end the call before his call was answered
["QueueEvent", { "data": { "QueueID":1234567, "Calls":[], "QueueName":"Queue1" }, "eventName":"queue", "reason":"ABANDONED", "servertime":1598206251, "servertimeoffset":180, "telephonyservertime":1598206251, "ivruniqueid":"2020082015645675456434324949c0712" } ]
ExtensionEvent
This type of event describes call status(dialing\talking\hung-up) in the account extensions.
If the initial socket login connection was made with user credentials, only the user assigning extension\s will receive events.
If the initial socket login connection was made with account credentials or account token, all the extensions events will be sent.
ExtensionEvent Parameters
Field name | Description | Type |
eventName | "extension". Indication of the event type. | String |
reason | The reason this event was sent. “NEWCALL” – A new call is ringing or dialing from an extension. “ANSWER” – A call was answered at an extension. “HOLD” – A call was placed on hold. “UNHOLD” – A call is no longer on hold. “HANGUP” – When a call was ended. It is not necessarily means that the call was answered. “userStatusUpdate” – When the extension online user updated his\her user status(Login, Break, Logout, etc.) | String |
cause | This field will only be sent if the event “reason”= “HANGUP” and will indicate the cause of the hangup “Normal hangup” – If a call rang at an extension and the call was ended. It is not necessarily means that the call was answered. “Answered elsewhere” – If the call rang simultaneously at several extensions and was answered, an “HANGUP” event will send to the all other extensions who did not answered the call. “Call Rejected” – In case a leg1 click2call call was not answered. | String |
servertime | The Interval the of socket.io protocol. | Integer |
servertimeoffset | The timeout Interval of the socket.io protocol. | Integer |
Data | A list of the extension event details. | Array |
Calls | A list of the current active calls in the extension. If there are no dialing\ringing calls in the specific extension the list will be empty. | Array |
currentCall | The “currentCall” data indicate which call the current event relates to. In case there is more than one call on the extension, this array will indicate for which specific call this event is sent. For example, if the extension is talking at a particular moment with a caller and during that time another waiting call is entered. For the new entered call, a new event will be send. | Array |
answered | Whether the call was answered. 0 – Not answered. 1 – Answered. | Boolean |
callAnswered | Time in Epoch. When the call was answered. In call did not answered yet the sent value will be 0. | Integer |
callStarted | Time in Epoch. When the call was started. | Integer |
callername | What string value will appear at the extension. In Voicenter you can set a text value that will appear in when the call in ringing\dialing. This data will appear only in Voicenter extensions. | String |
callerphone | The caller or callee phone number. | String |
callstatus | What is the current call status? “Ringing”- In case of an incoming call, “Dialing”- In case of an Outgoing call, “Talking” – In case a call was answered at an extension, "Spying" - In case an extension is listening to another extension in the organization. | String |
customdata | In case custom variables were assigned to the call. | Array |
did | The phone number that the caller dialed to. This field will only send value in incoming calls. | String |
direction | The direction of the call: “Incoming”, “Outgoing”, “Spy” – In case, an extension is listening to another extension in the organization. “Click2call”. | String |
c2cdirection | This field will only be sent in case the call type consists of two parts (Leg1, Leg2). Two values are sent: 1 - Leg1. 2 - Leg2. | Integer |
ivrid | The call unique identifier. | String |
recording | The call recording data details. | Array |
Filename | The name of the call recording file. Will be sent if the call was supposed to be recorded. In case of an outgoing call, the data will be sent if the call was answered(it will not be sent in “NEWCALL” type event). | String |
IsMuted | Indicate whether the call recording was muted. With the Voicenter Mute API and softphone, representatives can pause the recording of the call and unpause it. 0 – The call was not muted. 1 – The call was muted. | String |
extenUser | The current extension SIP code. | String |
userID | Voicenter user ID. The user that the extensions is assigned to. Each extension is assigned to a user. | Integer |
onlineUserID | The user ID of the user that is currently logged on to the extension. In case the representatives in the organization login in each shift to a different extension, this field will show the name of the representative that is currently working at the extension. | Integer |
userName | Voicenter user name. The user that the extensions is assigned to. | String |
number | Voicenter extension ID. | Integer |
extenUser | The SIP user name of the relevant extension. | String |
representative | The user ID of the user that is currently logged on to the extension. In case the representatives in the organization login in each shift to a different extension, this field will show the name of the representative that is currently working at the extension. | Integer |
representativeStatus | The current login status ID of the connected user. A value between 1-13 indicating the online user status. | Integer |
representativeUpdated | The time of the last user status change. | Integer |
lastCallEventEpoch | When was the last time a call was made in the extension in Epoch time. | Integer |
lastAnsweredCallEventEpoch | When was the last time a call was answered in the extension in Epoch time. | Integer |
lastHangupCallEpoch | When was the last time a call was ended in the extension in Epoch time. | Integer |
callerID | For incoming calls, the caller caller ID. For outgoing calls the destination caller ID. This field will be send on “reason”= “HANGUP” calls. | String |
Ivruniqueid | The call unique identifier. This field will be send on “reason”:“HANGUP” calls. Same as the field – “ivrid”. | String |
queueID | Voicenter queue ID. This field will be sent only if the call was directed through Voicenter queue service. | Integer |
campaignID | Voicenter campaign ID. This field will be sent only if the call was made by Voicenter automatic dialer service. | Integer |
ExtensionEvent Examples
ExtensionEvent - Incoming NEWCALL
An incoming call is ringing at an extension – reason: NEWCALL
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"NEWCALL", "servertime":1606908124, "servertimeoffset":120, "calls":[ { "callStarted":1606908123, "calldurationinterval":1606908123, "callAnswered":0, "answered":0, "callername":"Test Voicenter", "callerphone":"0501234567", "callstatus":"Ringing", "customdata":{}, "direction":"Incoming", "ivrid":"202012021122010135330b4f77", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"0722776772" } ], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606908124, "lastAnsweredCallEventEpoch":1606847063, "lastHangupCallEpoch":1606905028, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606908123, "calldurationinterval":1606908123, "callAnswered":0, "answered":0, "callername":"Test Voicenter", "callerphone":"0501234567", "callstatus":"Ringing", "customdata":{}, "direction":"Incoming", "ivrid":"202012021122010135330b4f77", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"0722776772" } } } ]
ExtensionEvent - Incoming ANSWER
An incoming call is answered at an extension – reason: ANSWER
["ExtensionEvent", { "data": { "eventName": "extension", "reason": "ANSWER", "servertime": 1606908124, "servertimeoffset": 120, "calls": [{ "callStarted": 1606908123, "calldurationinterval": 1606908123, "callAnswered": 1606908134, "answered": 1, "callername": "Test Voicenter", "callerphone": "0501234567", "callstatus": "Talking", "customdata": {}, "direction": "Incoming", "ivrid": "202012021122010135330b4f77", "recording": { "Filename": "2020120-aws-0501234567-0722776772.mp3", "IsMuted": 0 }, "did": "0722776772" }], "userID": 7654321, "userName": "Clark Kent", "number": 1234567, "extenUser": "SIPSIP1", "summery": { "representative": "Clark Kent" }, "onlineUserID": 7654321, "representative": 7654321, "representativeStatus": 1, "lastCallEventEpoch": 1606908124, "lastAnsweredCallEventEpoch": 1606847063, "lastHangupCallEpoch": 1606905028, "representativeUpdated": 1606763622000, "currentCall": { "callStarted": 1606908123, "calldurationinterval": 1606908123, "callAnswered": 1606908134, "answered": 1, "callername": "Test Voicenter", "callerphone": "0501234567", "callstatus": "Talking", "customdata": {}, "direction": "Incoming", "ivrid": "202012021122010135330b4f77", "recording": { "Filename": "2020120-aws-0501234567-0722776772.mp3", "IsMuted": 0 }, "did": "0722776772" } } } ]
ExtensionEvent - Incoming HANGUP
An incoming call was ended after it was answered – reason: HANGUP
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"HANGUP", "cause": "Normal hangup", "callerID": "0501234567", "ivruniqueid": "202012021122010135330b4f77", "servertime":1606908139, "servertimeoffset":120, "calls":[], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606908139, "lastAnsweredCallEventEpoch":1606908139, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606908123, "calldurationinterval":1606908123, "callAnswered":1606908134, "answered":1, "callername":"Test Voicenter", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Incoming", "ivrid":"202012021122010135330b4f77", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"0722776772" } } } ]
ExtensionEvent - Click2call call Leg1 NEWCALL
An outgoing Click2call call. Leg1 – reason: NEWCALL
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"NEWCALL", "servertime":1606913080, "servertimeoffset":120, "calls":[ { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":0, "answered":0, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Dialing", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-SIPSIP1-972501234567.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"1" } ], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606913081, "lastAnsweredCallEventEpoch":1606908139, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":0, "answered":0, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Dialing", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"1" } } } ]
ExtensionEvent - Click2call call Leg1 ANSWER
An outgoing Click2call call. Leg1 – reason: ANSWER
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"ANSWER", "servertime":1606913082, "servertimeoffset":120, "calls":[ { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":1606913082, "answered":1, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-SIPSIP1-972501234567.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"1" } ], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606913081, "lastAnsweredCallEventEpoch":1606908139, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":1606913082, "answered":1, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"1" } } } ]
ExtensionEvent - Click2call call Leg2 NEWCALL
An outgoing Click2call call. Leg2 – reason: NEWCALL
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"NEWCALL", "servertime":1606913083, "servertimeoffset":120, "calls":[ { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":0, "answered":0, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-SIPSIP1-972501234567.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"2" } ], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606913083, "lastAnsweredCallEventEpoch":1606913082, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":0, "answered":0, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"2" } } } ]
ExtensionEvent - Click2call call Leg2 ANSWER
An outgoing Click2call call. Leg2 – reason: ANSWER
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"ANSWER", "servertime":1606913090, "servertimeoffset":120, "calls":[ { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":1606913090, "answered":1, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-SIPSIP1-972501234567.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"2" } ], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606913083, "lastAnsweredCallEventEpoch":1606913082, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":1606913090, "answered":1, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"2" } } } ]
ExtensionEvent - Click2call call Leg2 HANGUP
An outgoing Click2call call. Leg2 – reason: HANGUP
["ExtensionEvent", {"data": { "eventName":"extension", "reason":"HANGUP", "servertime":1606913094, "servertimeoffset":120, "callerID": "0501234567", "ivruniqueid": "20201200013quvnhxku5v", "cause": "Normal hangup", "calls":[], "userID":7654321, "userName":"Clark Kent", "number":1234567, "extenUser":"SIPSIP1", "summery":{ "representative":"Clark Kent" }, "onlineUserID":7654321, "representative":7654321, "representativeStatus":1, "lastCallEventEpoch":1606913083, "lastAnsweredCallEventEpoch":1606913082, "lastHangupCallEpoch":1606908139, "representativeUpdated":1606763622000, "currentCall": { "callStarted":1606913080, "calldurationinterval":1606913080, "callAnswered":1606913090, "answered":1, "callername":"0501234567", "callerphone":"0501234567", "callstatus":"Talking", "customdata":{}, "direction":"Click2Call", "ivrid":"20201200013quvnhxku5v", "recording": { "Filename":"2020120-aws-0501234567-0722776772.mp3", "IsMuted":0 }, "did":"", "c2cdirection":"2" } } } ]
A user status change – reason: userStatusUpdate
The representative change his\her online status to status “3” (Lunch).
The list of all available user statuses can be found in the Voicenter “Login\Logout” API documentation.
["ExtensionEvent", { "eventName": "extension", "reason": "userStatusUpdate", "servertime": 1606917164, "servertimeoffset": 120, "data": { "calls": [], "userID": 7654321, "userName": "Clark Kent", "number": 1234567, "extenUser": "SIPSIP1", "summery": { "representative": "Clark Kent" }, "onlineUserID": 7654321, "representative": 7654321, "representativeStatus": 3, "lastCallEventEpoch": 1606915860, "lastAnsweredCallEventEpoch": 1606915833, "lastHangupCallEpoch": 1606915860, "representativeUpdated": 1606917164000 } } ]