Creating a Binding Relationship Between an Access Code, Skill Queue, and IVR (createCalledRoute)
Scenario
Create a binding relationship between an access code, skill queue, and IVR.
Method
POST
URI
https://Domain name/apiaccess/rest/cc-management/v1/calledRoute/createCalledRoute. For example, the domain name is service.besclouds.com.
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
X-APP-Key |
String |
No |
App key field, which is the user ID. Contact the operation personnel to obtain the app key. |
2 |
Authorization |
String |
Yes |
Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.) |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1.1 |
accessCode |
String |
Yes |
Access code. The value contains a maximum of 32 characters. |
1.2 |
extCode |
String |
No |
Extended code. The value contains a maximum of 12 characters. To set an access code for multiple destination devices, you can configure extension codes. For example, if the access code is 12345, you can add extension code 1 for routing calls to skill queue A, and the extension code 2 to skill queue B. In this way, a customer can dial 123451 to directly access skill queue A. |
1.3 |
mediaTypeId |
Integer |
No |
Media type. The default value is 5. The options are as follows: 2: voice click-to-dial; 5: voice and video; 18: video click-to-dial; 19: video; 53: multimedia. Note: 1. When a skill queue (devicetype is 1) is transferred, the value of mediaTypeId is the same as that of mediaTypeId bound to the skill queue. If no skill queue is bound, the default value 5 is used. 2. The mapping between the media type (mediaTypeId returned by the access code query interface) to which the access code belongs and the input parameter mediaTypeId is as follows: 5 corresponds to 5 and 19. 53 corresponds to 53. 2 corresponds to 2 and 18. |
1.4 |
devicetype |
Integer |
Yes |
Device type. 1: skill queue 3: IVR Note: The IVR flow cannot be selected for the multimedia channel. |
1.5 |
deviceId |
Integer |
Yes |
Target device ID (skill queue ID or IVR ID). Note: When the skill queue (devicetype is 1) is transferred, the media type corresponding to deviceId must be the same as the input parameter mediaTypeId. |
Response Description
- Status code: 200
Table 3 Response body parameters No.
Parameter
Type
Mandatory or Not
Description
1.1
returnCode
String
No
Return code. The options are as follows: 0: success; other values: failure.
1.2
description
String
No
Description.
- 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: 403
Authentication fails.
- 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:
Content-Type:application/json Authorization:Bearer XXXXXXXXXXXXXXXXXXXXXXX X-APP-Key:XXXXXXXXXXXXXXXXXXXXXXX
Request parameters:
{ "accessCode": "9911411", "extCode": "11", "devicetype": 1, "deviceId": 1, "mediaTypeId": 19 }
Response parameters:
{ "returnCode": "0", "description": "data create success" }
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