Home / Developers / Call Center API / Get a specific call detail record
CALL CENTER API · ENGLISH REFERENCE

Get a specific call detail record

Query an individual call detail record using its session identifier or correlation data.

API path/openapi/V2.0.8/getOneCdr

Common 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.

FieldTypeRequiredLength / constraintsDescription
seqStringNo0–20Message sequence number; currently not used by these request fields.
userDataStringNo0–60Customer-defined correlation data; truncated beyond 60 characters. Use letters, digits and the documented ASCII punctuation.

Query parameters

FieldTypeRequiredLength / constraintsDescription
sessionStringConditional—System-generated CDR session. At least one of session or userData must be non-empty.
agentStringNo1–7Agent staff number.
callerStringNo1–30Calling number.
numberXStringNo1–30Virtual number (X number).
calleeStringNo1–30Called number.
timeLengthMinIntNo—Minimum call duration.
timeLengthMaxIntNo—Maximum call duration.
startTimeIntNoUnix secondsStart of creation-time filter.
endTimeIntNoUnix secondsEnd of creation-time filter.

Request example

{
  "authentication": {
    "customer": "<CUSTOMER_ID>",
    "timestamp": "<REQUEST_TIMESTAMP>",
    "seq": "<UNIQUE_SEQUENCE>",
    "digest": "<COMPUTED_DIGEST>"
  },
  "request": {
    "seq": "<REQUEST_SEQUENCE>",
    "userData": "<REFERENCE>",
    "session": "<CALL_SESSION>",
    "agent": "",
    "caller": "",
    "numberX": "",
    "callee": ""
  }
}

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.

FieldTypeDescription
result.errorStringError code.
result.msgStringRequest result description.
data.seqStringMessage sequence number.
data.responseObjectCommand-level response.
data.response.seqStringEchoed request sequence.
data.response.userDataStringEchoed customer data.
data.response.resultObjectCommand result; inspect error.

CDR response

data.response.total contains the result count; data.response.cdr is the list of call records. The source uses timeLen, record_name and voiceSign in this endpoint.

FieldTypeDescription
keyStringCDR ID.
agentStringAgent staff number.
startTimeStringCall start time.
ringTimeStringRinging start time.
answerTimeStringCall answer time.
byeTimeStringCall end time.
callerStringCalling number.
numberXStringVirtual number (X number).
calleeStringCalled number.
feeStringCharge.
filenameStringRecording file reference.
resultString1 = answered; 2 = not answered; 3 = invalid/unassigned number.
areaStringProvince / region.
cityStringCity.
spNameStringCarrier.
keyPressStringAll keypad input, concatenated in order (e.g., 24).
callResultStringCall analysis result.
typeResultStringResult type.
errMsgStringError returned by the API route.
errMsgCNStringRoute error translated into Chinese.
trunkIndexStringTrunk ID.
trunkTypeString1 = SIP trunk; 2 = AG trunk.
trunkNameStringSIP trunk name or AG trunk username.
trunkPeerIPStringSIP peer details; blank for AG trunk.
trunkUsernameStringRegistered trunk username; blank for non-registered SIP or AG trunk.
releaseCauseStringRelease cause code.
releasePartStringParty that released the call.
record_nameStringRecording file name.
timeLenStringCall duration.
voiceSignStringRecording 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": "",
          "record_name": "",
          "timeLen": "",
          "voiceSign": ""
        }
      ]
    }
  },
  "logs": null
}

Recording access

Use the recording file reference from the CDR. Access requires the requesting IP to be allowlisted and the customer to be authorized. See Download or listen to recording.

Examples use placeholders. Request your approved connection details and credentials through ANNC onboarding.
WhatsApp