Skip to content

NXCC API webhook

henryou edited this page May 17, 2024 · 1 revision

Call Record Callback

Request URL

  • Http interface address for call record push (configured in Call Center Settings)
  • Example: http://you.domain/cc/callback

Request Method

  • POST

  • Method:POST

  • Content-Type:application/json

  • Requires authentication: Yes

Parameters

Parameter Name Type Description
agentName String Customer service account, may be empty
agentNickName String Customer service nickname, may be empty
answered Boolean Whether the call was answered
answerTime Long Time when the call was answered (timestamp in milliseconds)
callDuration Integer Duration of the call
callee String Called number
caller String Caller number
callId String Call ID
direction Integer Call direction, 0: Inbound, 1: Outbound, 2: AICC
dtmfKeys String DTMF keys, separated by commas when multiple
endTime Long Time when the call ended (timestamp in milliseconds)
hangupBy Integer Party who hung up, 0: Agent hung up, 1: User hung up, 2: Unknown
hangupCode Integer Hangup reason code
callStatus String Call status
hangupReason String Hangup reason description
inQueueTime Long Time when the call entered the queue (timestamp in milliseconds)
leaveMsgUrl String Leave message URL
orderId String Order ID
other String Transparent information
intent String Intent name
outQueueTime Long Time when the call exited the queue (timestamp in milliseconds)
queueDuration Integer Queue duration (in seconds)
recordUrl String Recording URL
ringDuration Integer Ring duration (in seconds)
ringTime Long Time when the call rang (timestamp in milliseconds)
startTime Long Time when the call started (timestamp in milliseconds)
taskId String Task ID, displayed when direction=2 is AICC task information
totalCustomerPrice Double Cost

Push Example

curl POST '<client_server_address>/callback' \
--header 'token: <token>' \
--header 'Content-Type: application/json' \
--data-raw '{"agentName":"fang.cheng@nxcloud.com","answerTime":1691372192000,"callDuration":7,"callId":"b1920376-5e15-4f22-9996-6233f297685e","callee":"NX09445G000025@43.134.225.234:5060","caller":"85235757581","direction":2,"endTime":1691372213000,"intent":"转人工-成功","orderId":"ORDER_ID","other":"OTHER","startTime":1691372191000,"taskId":"1688363452814331904"}'

Hangup Code Meanings

Hangup Code Type Description
1000 Inbound Normal end
1001 Inbound Normal end - Agent hung up
1002 Inbound Normal end - User hung up
1003 Inbound Normal end - Voicemail
10031 Inbound Normal end - Voicemail - All agents busy
10032 Inbound Normal end - Voicemail - No agent online
1101 Inbound Missed call - Agent quickly hung up
1102 Inbound Missed call - User quickly hung up
1103 Inbound Missed call - User abandoned the queue
11031 Inbound Missed call - User abandoned the queue - All agents busy
11032 Inbound Missed call - User abandoned the queue - No agent online
1104 Inbound Missed call - User exceeded queue timeout
11041 Inbound Missed call - User exceeded queue timeout - All agents busy
11042 Inbound Missed call - User exceeded queue timeout - No agent online
1105 Inbound Missed call - No agent online
1106 Inbound Missed call - All agents busy
1107 Inbound Missed call - Blacklisted number
1108 Inbound Missed call - User canceled
2000 Outbound Normal end
2001 Outbound Normal end - Agent hung up
2002 Outbound Normal end - User hung up
2003 Outbound Normal end - Agent canceled
2101 Outbound Missed call - Agent quickly hung up
2102 Outbound Missed call - User quickly hung up
2103 Outbound Missed call - User rejected call
2104 Outbound Missed call - Timeout
2105 Outbound Missed call - Blacklisted number
2106 Outbound Missed call - Call restriction number
2107 Outbound Missed call - Call restriction (experience count)
2201 Outbound Unable to connect - Call refused
2202 Outbound Unable to connect - Temporarily unable to connect
2203 Outbound Unable to connect - Line busy
2204 Outbound Unable to connect - Call exception
2205 Outbound Unable to connect - Unable to connect
3000 AICC Normal end
3001 AICC Transfer to human successful - Agent hung up
3002 AICC Transfer to human successful - User hung up
3101 AICC Transfer to human failed - Agent quickly hung up
3102 AICC Transfer to human failed - User quickly hung up
3103 AICC Transfer to human failed - User abandoned the queue
3104 AICC Transfer to human failed - User exceeded queue timeout
31041 AICC Transfer to human failed - User exceeded queue timeout - All agents busy
31042 AICC Transfer to human failed - User exceeded queue timeout - No agent online
3105 AICC Transfer to human failed - No agent online
3106 AICC Transfer to human failed - All agents busy
3107 AICC Transfer to human failed - User canceled

Push Return Specification

NXCC determines the success of the push based on the HTTP response status code from the customer service.

Success: 200 OK

Failure: Others

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally