Query call detail records
Retrieve paginated call detail records using account, agent, service, date and other filters.
/openapi/V2.0.8/getCdrListCommon request fields
The authentication object is required. Use the account credentials provided during onboarding; see the API overview. Request seq and userData are separate from authentication.seq.
| Field | Type | Required | Length / constraints | Description |
|---|---|---|---|---|
| seq | String | No | 0–20 | Message sequence number; currently not used by these request fields. |
| userData | String | No | 0–60 | Customer-defined correlation data; truncated beyond 60 characters. Use letters, digits and the documented ASCII punctuation. |
Query parameters
| Field | Type | Required | Length / constraints | Description |
|---|---|---|---|---|
| page | Int | No | Default 1 | Page number. |
| size | Int | No | Default 500 | Rows per page. |
| taskID | Int | No | — | Task ID; source notes that task ID or task name must be supplied for task-specific queries. |
| agent | Array | No | 1–1000 | Agent staff numbers. |
| serviceType | Int | No | — | 1 manual, 2 inbound, 3 internal, 4 automatic outbound, 5 click-to-call, 7 recording, 9 transfer, 17 rental, 18 settlement, 19 voice verification code, 21 voice notification. |
| startTime | String | No | YYYY-MM-DD HH:mm:ss | Start time; defaults to current day if omitted. |
| endTime | String | No | YYYY-MM-DD HH:mm:ss | End time; defaults to current day if omitted. |
| caller | String | No | 1–30 | Calling number. |
| numberX | String | No | 1–30 | Virtual number (X number). |
| callee | String | No | 1–30 | Called number. |
| timeLengthMin | Int | No | — | Minimum call duration. |
| timeLengthMax | Int | No | — | Maximum call duration. |
| startKey | Int | No | — | Blank = unsorted; 1 enables sorting. For subsequent pages use the last returned key. |
| userDataList | Array | No | 1–1000 | Customer correlation-data values to match. |
Unencrypted request example
{
"authentication": {
"customer": "<CUSTOMER_ID>",
"timestamp": "<REQUEST_TIMESTAMP>",
"seq": "<UNIQUE_SEQUENCE>",
"digest": "<COMPUTED_DIGEST>"
},
"request": {
"seq": "<REQUEST_SEQUENCE>",
"userData": "<REFERENCE>",
"page": 1,
"size": 500,
"taskID": "",
"agent": [],
"serviceType": "",
"startTime": "",
"endTime": "",
"caller": "",
"numberX": "",
"callee": "",
"timeLengthMin": "",
"timeLengthMax": "",
"startKey": "",
"userDataList": []
}
}Optional encrypted request
The source describes an optional 16-character authentication.secretKey. When supplied, request is encrypted instead of an object, and the returned data is padded using PKCS5Padding, encrypted and Base64-encoded. Confirm the exact supported encryption implementation and secure key exchange with the ANNC implementation team.
{
"authentication": {
"customer": "<CUSTOMER_ID>",
"timestamp": "<REQUEST_TIMESTAMP>",
"seq": "<UNIQUE_SEQUENCE>",
"digest": "<COMPUTED_DIGEST>",
"secretKey": "<16_CHARACTER_KEY>"
},
"request": "<BASE64_ENCRYPTED_REQUEST>"
}Response envelope
The top-level result describes the request; data.response carries command-specific status and echoed correlation fields. logs may include debugging information when enabled.
| Field | Type | Description |
|---|---|---|
| result.error | String | Error code. |
| result.msg | String | Request result description. |
| data.seq | String | Message sequence number. |
| data.response | Object | Command-level response. |
| data.response.seq | String | Echoed request sequence. |
| data.response.userData | String | Echoed customer data. |
| data.response.result | Object | Command result; inspect error. |
CDR response fields
data.response.total reports the number of records; cdr is an array; page and size identify the page.
| Field | Type | Description |
|---|---|---|
| key | String | CDR ID. |
| agent | String | Agent staff number. |
| startTime | String | Call start time. |
| ringTime | String | Ringing start time. |
| answerTime | String | Call answer time. |
| byeTime | String | Call end time. |
| caller | String | Calling number. |
| numberX | String | Virtual number (X number). |
| callee | String | Called number. |
| fee | String | Charge. |
| filename | String | Recording file reference. |
| result | String | 1 = answered; 2 = not answered; 3 = invalid/unassigned number. |
| area | String | Province / region. |
| city | String | City. |
| spName | String | Carrier. |
| keyPress | String | All keypad input, concatenated in order (e.g., 24). |
| callResult | String | Call analysis result. |
| typeResult | String | Result type. |
| errMsg | String | Error returned by the API route. |
| errMsgCN | String | Route error translated into Chinese. |
| trunkIndex | String | Trunk ID. |
| trunkType | String | 1 = SIP trunk; 2 = AG trunk. |
| trunkName | String | SIP trunk name or AG trunk username. |
| trunkPeerIP | String | SIP peer details; blank for AG trunk. |
| trunkUsername | String | Registered trunk username; blank for non-registered SIP or AG trunk. |
| releaseCause | String | Release cause code. |
| releasePart | String | Party that released the call. |
| serviceType | String | Service type (see request enum). |
| timeLength | String | Call duration. |
| session | String | Unique CDR identifier. |
| userData | String | Returned customer data. |
| taskID | String | Task ID. |
| label | Object | Customer labels. |
| customer | String | Enterprise identifier. |
{
"result": {
"error": 0,
"msg": "Success"
},
"data": {
"seq": "<SEQUENCE>",
"response": {
"seq": "<REQUEST_SEQUENCE>",
"userData": "<REFERENCE>",
"result": {
"error": 0
},
"total": "1",
"cdr": [
{
"key": "",
"agent": "",
"startTime": "",
"ringTime": "",
"answerTime": "",
"byeTime": "",
"caller": "",
"numberX": "",
"callee": "",
"fee": "",
"filename": "",
"result": "",
"area": "",
"city": "",
"spName": "",
"keyPress": "",
"callResult": "",
"typeResult": "",
"errMsg": "",
"errMsgCN": "",
"trunkIndex": "",
"trunkType": "",
"trunkName": "",
"trunkPeerIP": "",
"trunkUsername": "",
"releaseCause": "",
"releasePart": "",
"serviceType": "",
"timeLength": "",
"session": "",
"userData": "",
"taskID": "",
"label": "",
"customer": ""
}
],
"page": 1,
"size": 500
}
},
"logs": null
}Encrypted response example
After decryption, data contains the same structure as the unencrypted response.
{
"result": {
"error": 0,
"msg": "Success"
},
"data": "<BASE64_ENCRYPTED_DATA>",
"logs": null
}Recording access
Use the returned recording reference and the authorized recording interface. Requesting IP allowlisting is required.