Obtaining a Click-to-Dial Event (getClickToCallEvents)
Scenario
After a click-to-dial call is created for a customer, the third-party system polls this API to obtain the click-to-dial event. There are five types of events: call setup success event, call queuing event, call queuing timeout event, call release event, and call failure event. If a call setup success event is obtained, the connection between the agent and customer is normal and the call can be connected. If a call queuing event is obtained, the call is still in progress. If a call queuing timeout event or call failure event is obtained, the click-to-dial call fails. If a call release event is obtained, the call ends.
Method
GET
URI
https://Domain name/apiaccess/ccmessaging/v1/getClickToCallEvents (For example, the domain name is service.besclouds.com.)
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
channel |
String |
Yes |
Recipient channel type (WEB) |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
ccmessaging-token |
String |
Yes |
Value of ccmessaging-token generated by the applyToken interface |
2 |
x-app-key |
String |
Yes |
App key, which is the user ID and is configured on the API Fabric |
3 |
Authorization |
String |
Yes |
Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.) |
Response Description
- Status code: 200
No. |
Parameter |
Type |
Description |
---|---|---|---|
1.1 |
resultCode |
String |
Response result code |
1.2 |
resultDesc |
String |
Response result description If resultCode is 0, the description is Call in queue, Call connected, Call disconnected, Call queued timeout, Call failed, Call continue to poll events with unknown events, or ClickToCall polled without any events. |
1.3 |
eventId |
String |
Event ID |
1.4 |
content |
Object |
Event content |
1.4.1 |
causeDesc |
String |
Cause description |
1.4.2 |
causeId |
String |
Cause ID |
1.4.3 |
accessCode |
String |
Click-to-dial called party |
1.4.4 |
domain |
String |
WebRTC gateway domain name |
1.4.5 |
gwAddresses |
Array |
WebRTC gateway communication address and port number |
1.4.6 |
clickToCallCaller |
String |
Click-to-dial calling party |
- Status code: 400
Incorrect request. Check the request path and parameters.
- Status code: 401
Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.
- Status code: 404
The requested content is not found. Check the request path.
- Status code: 500
Business failure. Check the values of parameters in the request.
Error Codes
None
Example
- Request header
ccmessaging-token: x-app-key: Authorization:
- Request parameters
- Response parameters
{ resultCode: "0", resultDesc: "Call connected", "eventId": 168101, "content": { "domain": "xxx", "gwAddresses": ["xx1", "xx2"], "accessCode": "179080000537636", "clickToCallCaller": "AnonymousCard" } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot