(V2) Querying Call Information in a Specified VDN
Scenario
This interface is invoked to query call information in a specified VDN based on the calling number, called number, and time segment.
In the V1 version, this interface provides only information about inbound calls. In the V2 version, the isCallIn parameter is added to query information about inbound or outbound calls.
Interface Method
This interface supports only the POST method.
URI
https://ip:port/rest/cmsapp/v2/openapi/vdn/querycalls
In the URL, ip indicates the IP address of the server where the CC-CMS is installed, and port indicates the HTTPS port number of the CC-CMS.
If the request is routed through the NSLB, set ip to the IP address of the NSLB server and port to the HTTPS port number of the CC-CMS service mapped on the NSLB.
Request Description
Parameter |
Mandatory |
Type |
Default Value |
Description |
---|---|---|---|---|
Content-Type |
Yes |
String |
None |
The value is fixed at application/json; charset=UTF-8. |
Authorization |
Yes |
String |
None |
For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication. |
Parameter |
Mandatory |
Type |
Default Value |
Description |
---|---|---|---|---|
ccId |
Yes |
Integer |
None |
ID of a call center. The value ranges from 1 to 65535. |
vdn |
Yes |
Integer |
None |
ID of a VDN. The value ranges from 1 to 5000. |
callerNo |
No |
String |
None |
Calling number. The value can be empty, indicating that all calling numbers are queried. The value consists of digits and must comply with the number rules. |
calleeNo |
No |
String |
None |
Called number. The value can be empty, indicating that all called numbers are queried. The value consists of digits and must comply with the number rules. |
beginDate |
Yes |
Long |
None |
Start time of a query period. The value is a timestamp in milliseconds. The time cannot be earlier than 00:00:00 of the previous day. |
endDate |
Yes |
Long |
None |
End time of a query period. The value is a timestamp in milliseconds. The time cannot be later than 23:59:59 on the current day. |
isCallIn |
Yes |
String |
None |
If the value is true, inbound call information is queried. If the value is false, outbound call information is queried. |
limit |
No |
Integer |
None |
Limit of records in a query result. The maximum value is 100. |
offset |
No |
Integer |
None |
offset is used to determine the start page of the query. The value range of offset is as follows: The value of offset is equal to limit x (page – 1). The value is greater than or equal to 0. page indicates the start page to be queried. |
Response Description
Parameter |
Type |
Description |
---|---|---|
resultCode |
String |
Query result. The options are as follows:
|
resultDesc |
Object |
Object in the returned result after a successful query. |
data |
Array <callinDetial> |
Object array in the returned result. For details about the parameters of this object, see Table 4. |
count |
Integer |
Number of data records that can be queried. |
Parameter |
Type |
Description |
---|---|---|
logDate |
Long |
Time when data is imported to the database. The value is a timestamp in milliseconds. |
callerNo |
String |
Calling number. |
calleeNo |
String |
Called number. |
callId |
String |
Call ID. |
callType |
Integer |
Call type. For details, see Description of Call Types. |
waitBegin |
Long |
Waiting start time in millisecond-level timestamp. |
ackBegin |
Long |
Response start time in millisecond-level timestamp. |
callBegin |
Long |
Start time of a call in millisecond-level timestamp. |
callEnd |
Long |
End time of a call in millisecond-level timestamp. |
vdn |
Integer |
ID of a VDN. |
leaveReason |
Integer |
Reason why a call is disconnected from a device. For details, see Table 1. |
mediaType |
Integer |
Media type. For details, see Table 1. |
subMediaType |
Integer |
Submedia type. For details, see Table 1. |
Error Codes
For details, see Error Code Reference.
Message Example
- Request header
Content-Type: application/json;charset=UTF-8 Authorization: ******************
- Request parameters
{ "ccId":1, "vdn":170, "callerNo": "12345", "calleeNo": "23131", "beginDate": "14511111111", "endDate": "14522222222", "isCallIn":"true" "limit": 10, "offset": 0 }
- Response header
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Date: Mon, 02 Jul 2018 02:43:03 GMT
- Response parameters
{ "resultCode":"0100000", "resultDesc":{ "data":[ { "logDate": "1615717765000", //Statistics collection time "callerNo": "1212", //Calling number "calleeNo": "12121212",//Called number "callId": "167789709-33", //Call ID "callType": "1",//Call type "waitBegin": "1615717765000",//Start time of call waiting "ackBegin": "1615717765000",//Time when a call is answered "callBegin": "1615717765000",//Start time of a call "callEnd": "1615717765000",//End time of a call "vdn": 170, //VDN ID "leaveReason": "1", //Reason why a call is disconnected from a device "mediaType":53, //Media type "subMediaType":1 //Submedia type } ], count: 5 } }
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