Querying Outbound Call Results
Scenario
This interface is invoked to query the result of a specified outbound campaign task in a specified VDN.
Usage Description
- Prerequisites
- You have applied for a developer account.
- Restrictions
- vdnId must be correctly set for query.
- The VDN ID (vdnId) is correctly associated with the outbound campaign task ID (campaignId).
- Only the results of complete outbound calls can be queried.
- You are advised to preferentially use the interface for calling back outbound call results.
- It is recommended that the number of concurrent requests be less than or equal to 10 and the interval between concurrent batches be greater than 1 second.
Method
This interface supports only the POST method.
URI
https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/callresult/{campaignId}
In the URL, ip indicates the IP address of the CC-iSales server, and port indicates the HTTPS port number of the CC-iSales server.
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
vdnId |
Integer |
Yes |
VDN ID. The value is an integer ranging from 1 to 9999. |
2 |
campaignId |
Integer |
Yes |
ID of an outbound campaign task. |
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
Yes |
The value is fixed to application/json; charset=UTF-8. |
2 |
Authorization |
String |
Yes |
For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication. |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
sessionId |
String |
No |
ID of a subscriber, which is sent back to the subscriber in the outbound call result. The value can contain a maximum of 32 characters. |
2 |
customField |
String |
No |
User-defined field. |
3 |
pageSize |
Integer |
No |
Number of data records on each page in the pagination query result. Value range:
|
4 |
pageNum |
Integer |
No |
Current page number. |
5 |
showDetail |
Integer |
No |
Whether to display details.
The default value is 0. |
6 |
beginTime |
String |
No |
Start time. The format is YYYY-MM-DD. The start time must be earlier than the end time, and the interval between the start time and end time cannot exceed 30 days. When beginTime is specified, endTime must be specified. |
7 |
endTime |
String |
No |
End time. The format is YYYY-MM-DD. The start time must be earlier than the end time, and the interval between the start time and end time cannot exceed 30 days. When endTime is specified, beginTime must be specified. |
Response Description
No. |
Parameter |
Type |
Description |
---|---|---|---|
1 |
resultCode |
String |
Error code. The value 0200000 indicates success, and other values indicate failure. |
2 |
resultDesc |
String |
Description. |
3 |
returnCode |
String |
Error code. The value 0200000 indicates success, and other values indicate failure. |
4 |
returnDesc |
String |
Description. |
5 |
totalCount |
Integer |
Total number of outbound call results. |
6 |
data |
JSONArray |
Result in JSON format. For details, see Table 5. |
No. |
Parameter |
Type |
Description |
---|---|---|---|
6.1 |
campaignId |
String |
ID of an outbound campaign task. |
6.2 |
sessionId |
String |
ID of a subscriber. |
6.3 |
called |
String |
Called number. |
6.4 |
callTimeStr |
String |
Call time, in yyyy-mm-dd hh:mm:ss format. |
6.5 |
callStatus |
Integer |
Call result. The value 5 indicates that the call fails, and the value 6 indicates that the call is successful. |
6.6 |
failCode |
String |
Failure error code. |
6.7 |
resultCode |
String |
External result code corresponding to the failure cause code. The external result code can be customized. The failure cause code is associated with the external result code. |
6.8 |
vdnId |
Integer |
ID of the VDN to which an outbound number belongs. |
6.9 |
callId |
String |
Call record ID, which is used to associate with call data such as CDRs on the CTI platform. |
6.10 |
recordPath |
String |
Path of call recording files.
NOTE:
The value of this field is returned only when the connection is used (in SaaS networking). In other cases, this field is left empty. |
Triggered Event
None
Error Codes
No. |
Error Code |
Description |
---|---|---|
1 |
0200001 |
Parameter error. For details about the error, see resultDesc. |
2 |
0200007 |
The outbound campaign does not exist. |
3 |
0200008 |
The start time and end time must be specified or left empty at the same time. |
4 |
0200009 |
The format of the start time or end time is incorrect. |
5 |
0200010 |
The start time is later than or equal to the end time. |
6 |
0200011 |
The interval between the start time and end time exceeds 30 days. |
7 |
02000001 |
Empty parameter. |
8 |
02000002 |
The parameter contains invalid characters. |
9 |
02000003 |
The parameter length cannot exceed the maximum length. |
10 |
02000004 |
The parameter length cannot be less than the minimum length. |
11 |
02000005 |
The parameter length must be within the specified range. |
12 |
02000006 |
Incorrect parameter type. |
13 |
02000007 |
Incorrect parameter value. |
14 |
02000008 |
Parameter conversion error. Check the request parameters. |
15 |
02000009 |
Incorrect parameter combination. Check the request parameters. |
16 |
02000010 |
The hour and minute parameters must be set at the same time. |
17 |
02000011 |
The number of parameters cannot exceed the specified number. |
Example
- The following provides an example of the request body of this interface:
{ "sessionId": "1202_test013", "pageSize": 500, "pageNum": 1 }
- The following provides an example of the response body of this interface:
{ "resultCode":"0200000", "resultDesc":"Query Success!", "returnCode":"0200000", "returnDesc":"Query Success!", "totalCount": 2, "data": [ { "campaignId": "3", "sessionId": "1202_test013", "called": "60584", "callTimeStr": "2020-08-30 20:00:00", "callStatus": 6, "failCode": "0", "resultCode": "OB99999", "vdnId": 11, "callId": "0023-134864174", "recordPath": "Y:/1/11/20200830/3408/0949218.V3" }, { "campaignId": "3", "sessionId": "1202_test013", "called": "60584", "callTimeStr": "2020-08-30 20:05:00", "callStatus": 6, "failCode": "0", "resultCode": "OB99999", "vdnId": 11, "callId": "0023-134864893", "recordPath": "Y:/1/11/20200830/3408/0942113.V3" } ] }
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