Skip to content

PNS API webhook

Linsenyin edited this page Jan 15, 2024 · 13 revisions

概要

  • 通话结果推送

请求URL

  • 通过提供URL,给研发人员进行配置

请求方式

  • Method: POST
  • Content-Type: application/json

重试规则

一般情况下,话单信息将在通话结束后推送回指定的地址。收到HTTP 200 OK代表已接受回执推送,本次请求将视为已完成。 如果收到HTTP ERROR信息,NXCLOUD将在60分钟内,每分钟重试推送。直到成功为止,如果超过60分钟仍然失败,则不再重复推送。

请求Body

{
    "id": 45,
    "businessId": "test_busi",
    "customerBindId": "1",
    "bindId": "69f1d1be1a82204c6049b4a2797ed0af",
    "callId": "1604763745256783872",
    "did": "85235757584",
    "caller": "85235757583",
    "callee": "85238533300",
    "callStatus": 1,
    "callStatusMsg": "",
    "duration": 6,
    "startAt": 1671440452,
    "answerAt": 1671440454,
    "hangupAt": 1671440460,
    "hangupCause": "",
    "hangupCode": 0,
    "hangup": 0,
    "recordFile": "https://remote.record.nxcloud.com/pns/20221219/228c76b1-a685-4b26-9e48-a8a1d14670d4.mp3",
    "extensionCaller": "100024",
    "extensionCallee": "100025"
}

回执结果说明

参数名 类型 说明
id int64 话单ID
businessId string 业务id
customerBindId string 客户绑定id
bindId string 绑定id
callId string 呼叫id
did string did号码
caller string 通话双方-主叫号码
callee string 通话双方-被叫号码
callStatus int64 通话状态信息,0:未知,1:正常结束,2:异常结束
callStatusMsg string 通话状态具体原因(由fs提供)
duration int64 通话耗时,单位为秒
startAt int64 通话开始时间戳,单位为秒
answerAt int64 通话接听时间戳,单位为秒
hangupAt int64 通话挂断时间戳,单位为秒
hangupCause string 挂断原因。参考 https://www.nxcloud.com/document/nxphone/hang-up-explained
hangupCode int64 错误原因的q850描述。参考 https://www.nxcloud.com/document/nxphone/hang-up-explained
hangup int64 挂断方 0-主叫挂断,1-被叫挂断
recordFile string 通话状态录音文件
extensionCaller string 主叫的分机号,如果无分机号,则为空
extensionCallee string 被叫的分机号,如果无分机号,则为空

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally