API CTI – Shuttle 2.4.0 onwards
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ event: 'ringing', queue: 'CC-SIPP', agentname: 'John Doe', agentnum: '1007', peer: 'SIP/john.doe', direction: 'inbound', uniqueid: '1437069264.914', context: 'from-sip', extension: '9999', trunk: 'SIP/demo.trunk-00000392', callernum: '998', ringing: true } |
Event Abandon
The abandon event is dispatched following a ring event on an agent for a queue call
Code Block | ||
---|---|---|
| ||
event.abandon = function(data) { console.log('abandon'); }; |
This is the data sample for abandon event
Code Block | ||||
---|---|---|---|---|
| ||||
Event Up
...
The up event is dispatched following an answer event on an agent for a queue call
Code Block | ||
---|---|---|
| ||
event.up = function(data) { console.log('up'); wakeup('http://localhost', data.peer, 'new_frame'); }; |
This is the data sample for up event
Code Block | ||||
---|---|---|---|---|
| ||||
{ event: 'up', queue: 'CC-SIPP', agentname: 'John Doe', agentnum: '1007', peer: 'SIP/john.doe', direction: 'inbound', uniqueid: '1437069264.914', context: 'from-sip', extension: '9999', trunk: 'SIP/demo.trunk-00000392', callernum: '998', holdtime: '2', ringtime: '0', up: true } |
Event Hang Up
Panel | ||
---|---|---|
| ||
event.hangup = function(data) { console.log('hangup'); wakeup('http://www.google.it', data.peer, 'new_tab'); }; |
...
Push the event into the Integration Realtime section of the Administrator
These data will populate the following section of xCALLY Realtime:
Panel | ||
---|---|---|
| ||
var pushevent = function(appname, data, reference, url) { data.time = new Date(); socket.emit('RealtimeCTI', { type: appname, channel: data, reference: reference, url: url }); }; |
where
appname: name of the Integration
data: object containing information about the call
reference: CTI creation id
url: the address of the CTI
Example
For each event you can define which action you want the integration to perform.
In this example we associate to the UP event the CTI opening to an Agent, if the call belongs to the Sales Queue.
We also pass to the Agent a custom variable called ordernumber that we have created into the Shuttle -> Settings -> Integrations -> Custom variables section.
...