Home / Developers / Call Center API / Call result callback
CALL CENTER API · ENGLISH REFERENCE

Call result callback

Receive a call detail notification when a requested call finishes.

CallbackCustomer-configured receiving URL

Description

When a customer-requested call ends, the CCaaS platform sends call details to the configured customer server. Use userData to correlate the notification with the original request. The receiving URL is supplied by the customer and configured in the platform.

Notification fields

FieldTypeDescription
typeStringFixed value: billing.
startTimeStringCall start time.
ringTimeStringRinging start time.
answerTimeStringCall answer time.
byeTimeStringCall end time.
staffNoStringAgent staff number.
group1StringPrimary agent group.
group2StringSecondary agent group.
calleeStringCalled number.
numberXStringVirtual number (X number).
callerStringCalling number.
keyPressStringCustomer keypad input.
taskIDStringTask ID.
taskNameStringTask name.
recordFileStringRecording file reference.
serviceString1 — Manual dialing; 2 — Inbound call; 3 — Internal call; 4 — Automatic outbound call; 5 — Click-to-call; 19 — Voice verification code; 21 — Voice notification. 22 — API callback; 23 — Local call.
sessionStringCall identifier.
seqStringMessage sequence number.
userDataStringCustomer-defined returned data.
areaStringProvince or region.
cityStringCity.
timeLengthStringCall duration.
releaseCauseStringRelease cause code; see the release cause reference.
ivrStringIVR ID; present only when IVR push is configured.
ivrHistoryArrayIVR records; present only when IVR push is configured.
callResultStringAnalysis result code; see the call analysis reference.
typeResultStringsuccess = successful; fail = failed; leak = missed; illegal = error.
callStatusString1 = answered; 2 = not answered; 3 = invalid/unassigned number.
usageModeStringWEB = initiated on web; API = initiated via API; OTHERS = other.
labelArrayCustomer labels.
iccidStringSIM card identifier.
imeiStringInternational mobile equipment identifier.
deviceIDStringAndroid device ID.
deviceNameStringAndroid device name.
appVersionStringAndroid application version.
errMsgStringError returned by the API route.
errMsgCNStringAPI route error translated into Chinese.
trunkIndexStringTrunk ID.
trunkTypeStringAG trunk or SIP trunk.
trunkNameStringSIP trunk name or AG trunk username.
trunkPeerIPStringSIP peer information; blank for AG trunks.
trunkUsernameStringRegistered trunk username; blank for non-registered SIP trunks and AG trunks.
releasePartString0 = called party (default); 1 = calling party.
inQueueTimeStringTimestamp when the customer entered the call queue.
outQueueTimeStringTimestamp when the customer left the call queue.
fieldObjectCustom fields: each entry contains name and value.

Notification example

{
  "authentication": {
    "customer": "<CUSTOMER_ID>",
    "timestamp": "<REQUEST_TIMESTAMP>",
    "seq": "<UNIQUE_SEQUENCE>",
    "digest": "<COMPUTED_DIGEST>"
  },
  "notify": {
    "type": "billing",
    "startTime": "<YYYY-MM-DD HH:mm:ss>",
    "ringTime": "<YYYY-MM-DD HH:mm:ss>",
    "answerTime": "<YYYY-MM-DD HH:mm:ss>",
    "byeTime": "<YYYY-MM-DD HH:mm:ss>",
    "staffNo": "<STAFF_NO>",
    "group1": "",
    "group2": "",
    "callee": "",
    "numberX": "",
    "caller": "",
    "keyPress": "",
    "taskID": "",
    "taskName": "",
    "recordFile": "",
    "service": "",
    "session": "<CALL_SESSION>",
    "seq": "",
    "userData": "<REFERENCE>",
    "area": "",
    "city": "",
    "timeLength": "",
    "releaseCause": "",
    "ivr": "",
    "ivrHistory": [],
    "callResult": "",
    "typeResult": "",
    "callStatus": "",
    "usageMode": "",
    "label": [],
    "iccid": "",
    "imei": "",
    "deviceID": "",
    "deviceName": "",
    "appVersion": "",
    "errMsg": "",
    "errMsgCN": "",
    "trunkIndex": "",
    "trunkType": "",
    "trunkName": "",
    "trunkPeerIP": "",
    "trunkUsername": "",
    "releasePart": "",
    "inQueueTime": "",
    "outQueueTime": "",
    "field": {
      "reserve_1": {
        "name": "",
        "value": ""
      }
    }
  }
}

Acknowledgment and retry

Return HTTP 200 and the documented result object. The source specifies that non-200 responses are retried; if all 20 retries fail, the platform stops pushing.

{
  "result": {
    "error": 0,
    "msg": ""
  }
}
Examples use placeholders. Request your approved connection details and credentials through ANNC onboarding.
WhatsApp