This group of APIs enable CTI (Computer Telephony Integration) functionality to be able to control end-user calls.
The APIs are authenticated using api tickets for Call Control (CALL_CONTROL) and also requires an end-user Cloud CTI API license.
Docs for this API can be found from https://www.setera.com/onecloud/enduser.html#tag/Call-Control
TABLE OF CONTENTS
- API features
- Enable Cloud CTI API for user
- Create Remote Call Control API ticket
- Example with Softphone
API features
- Make a call from device
- Terminate a call
- Hold call
- Send DTMF digits
- Move call
- Hold & Resume call
More API features can be found from the API documentation
Enable Cloud CTI API for user
- Login to Onecloud enduser portal with your own credentials
- Go to admin view and edit users
- Select user from the list and enable Cloud CTI API license under "Allowed applications". Call control API is also required.
- Save settings
Create Remote Call Control API ticket
- Login to Onecloud enduser portal with your own credentials
- Choose Home
- Choose Tickets
- Add Name to the API ticket and choose Call control and User info
- Click Create ticket
- Copy Token from new granted ticket
Example with Softphone
Fetch available devices for user
Query list of active user devices. This is done via User Device Information API: https://www.setera.com/onecloud/enduser.html#operation/getUserDeviceShortlist
Example request
curl -XGET 'https://onecloud.setera.com/api/device/info/v1/shortlist/setera.com/aki.huolman?t=970.VDplZTEwY2E3ZWE0YzZmZjY4'
Example JSON response
[{ "deviceId": "0.+35840XXXXXXX", "deviceType": "MOBILE", "deviceName": "+35840XXXXXXX", "deviceIcon": "DEFAULT" }, { "deviceId": "2.c688705a-c4e7-4195-8cf6-fd581744c695", "deviceType": "SOFTPHONE", "deviceName": "Setera OneCloud (Desktop)", "deviceIcon": "DEFAULT" } ]
Copy deviceId value for deviceType "SOFTPHONE". This value is needed in the next step where we initiate the call.
Make a call from Softphone
Check API docs from https://www.setera.com/onecloud/enduser.html#operation/makeCall
Example request
curl -XPOST 'https://onecloud.setera.com/api/call/control/v1/make/setera.com/aki.huolman/2.c688705a-c4e7-4195-8cf6-fd581744c695?t=970.VDplZTEwY2E3ZWE0YzZmZjY4' \ --header 'Content-Type: application/json' \ --data-raw '{ "destination": "tel:+358201500800", "userLine": { "type": "OFFICE_FIXED", "groupId": 0 } }'
Example response
{ "stateToken": 2132470538953411, "callId": "4c8aa092-d969-4e1d-8833-e88ef4dcbee3", "userId": "aki.huolman@setera.com", "remoteParty": { "partyId": "5732.970@fnr", "type": "FUNCTION_NUMBER_ID", "telUri": "tel:+358201500800", "displayName": null, "displayNumber": "358201500800" }, "participants": [], "conference": false, "historyInfo": { "subject": null, "acdSupport": null, "campOn": false, "initialParty": null, "previousParty": null, "previousRetargetReason": null }, "inbound": false, "status": "INITIATED", "event": null, "eventDescription": null, "duration": 0, "recordable": false, "recording": null, "recordingDuration": null, "externalRecording": null, "externalRecordingDuration": null, "externalRecordingPaused": null, "deviceIds": [ "2.c688705a-c4e7-4195-8cf6-fd581744c695" ], "actions": [] }
Screenshot from Softphone GUI