Skip to content

Callbot API callList

Jcateye edited this page Dec 16, 2024 · 4 revisions

callbot-api

v1.0.0

Base URLs:

aibot外部接口v3.0/通话操作

鉴权方式

鉴权请查看文档https://github.com/nxtele/http-api-document/wiki/Callbot-API-authorization

POST 列出通话列表

POST /callcentre/api/v3/listCall

列出通话列表

返回响应码枚举值

返回响应码 错误原因
0 成功
1 通用错误
2 参数丢失
3 参数格式错误
4 参数值错误
4001 参数内容容量错误(数组元素过多)
5 服务器维护
5001 服务器内部错误
6 签名不正确
6001 签名错误丢失
6001 签名错误丢失
6002 账号不存在
6003 用户没有权限
7 系统正忙

Body 请求参数

{
  "productID": "callbot",
  "userTaskID": "string",
  "options": {
    "callID": [
      "string"
    ],
    "intentID": [
      "string"
    ],
    "intentName": [
      "string"
    ],
    "intentTag": [
      "string"
    ],
    "intentLevel": [
      0
    ],
    "turnTime": {
      "gt": 0,
      "lt": 0,
      "enable": true
    },
    "callDuration": {
      "gt": 0,
      "lt": 0,
      "enable": true
    },
    "callStatus": [
      1
    ],
    "startTs": 0,
    "endTs": 0
  },
  "page": 1,
  "size": 100
}

请求参数

名称 位置 类型 必选 说明
requestID header string 请求唯一id
uuid header string uuid,由被调用方给出
createTs header string 请求时间戳,(秒级)
sign header string 签名
algorithm header string 签名的算法:MD5或者SHA256,不填默认用MD5
Accept-Encoding header string 如果填了gzip,那么响应体将会压缩返回
body body object
» productID body string 产品id,定值"callbot"
» userTaskID body string 任务id,请求方的任务id(调用方生成并且保证唯一),建议使用uuid
» options body object 查询条件
»» callID body [string]¦null 通话id
»»» callingNumber string true none 主叫号码
»»» lineAddress string true none 线路IP
»» intentID body [string]¦null 意向标签id,后台意向标签id,可通过查询该任务所属话术模板的意向标签设置获取
»» intentName body [string]¦null 意向标签名,后台意向标签名,可通过查询该任务所属话术模板的意向标签设置获取
»» intentTag body [string]¦null 意向标签tag,用户自定义的意向标签tag
»» intentLevel body [integer] 意向优先级,后台意向优先级
»» turnTime body object¦null 对话轮次
»»» gt body integer 大于
»»» lt body integer 小于
»»» enable body boolean 使用对话轮次条件
»» callDuration body object¦null 通话时长
»»» gt body integer 大于
»»» lt body integer 小于
»»» enable body boolean 条件是否使用
»» callStatus body [integer]¦null 通话状态,通话订单所属的通话的状态。枚举值请参考《通话状态枚举值文档》
»» startTs body integer 通话拨打时间筛选开始时间,秒级时间戳,大于等于
»» endTs body integer 通话拨打时间筛选结束时间,秒级时间戳,小于
» page body integer 页码
» size body integer 页面大小

枚举值

属性
»» callStatus 1 准备通话
»» callStatus 2 调度中
»» callStatus 3 拨打中
»» callStatus 4 响铃中
»» callStatus 5 正在通话
»» callStatus 6 通话结束-完成通话
»» callStatus 8 通话结束-不合法号码
»» callStatus 9 通话结束-暂时无法接通
»» callStatus 10 通话结束-用户占线
»» callStatus 11 通话结束-用户忙线并拒接
»» callStatus 12 通话结束-用户拒接
»» callStatus 13 通话结束-用户拒接
»» callStatus 15 通话结束-tts合成失败
»» callStatus 16 通话结束-未知原因
»» callStatus 17 通话结束-黑名单号码
»» callStatus 18 通话结束-用户叫停
»» callStatus 21 通话结束-无效号码(号码检测非法,不满足当地号段)
»» callStatus 22 通话结束-响铃不接
»» callStatus 23 通话结束-拨打没响应
»» callStatus 24 通话结束-早媒体-语音信箱
»» callStatus 25 通话结束-响铃过长

返回示例

200 Response

{
  "retCode": 0,
  "retMsg": "string",
  "responseID": "string",
  "totalCount": 0,
  "callList": [
    {
      "orderID": "string",
      "userPhone": "string",
      "userName": "string",
      "sceneID": "string",
      "userTaskID": "string",
      "taskID": "string",
      "other": "string",
      "callInfoDetail": {
        "callID": "string",
        "callStatus": 1,
        "callStartTs": 0,
        "callAnswerTs": 0,
        "callEndTs": 0,
        "callDuration": 0,
        "callAudioUrl": "string",
        "hangupCause": "string",
        "termSipCode": "string",
        "intents": [
          {
            "intentID": null,
            "intentTag": null,
            "intentName": null,
            "intentLevel": null
          }
        ],
        "sms": [
          {
            "smsSendTs": null,
            "sysMessageID": null,
            "smsContent": null
          }
        ],
        "agent": {
          "agentName": "string",
          "agentGroup": "string",
          "agentCallStatus": "[",
          "agentCallElapsed": 0,
          "agentLabel": "string",
          "manualCallStart": 0,
          "manualCallAnswer": 0,
          "manualCallEnd": 0,
          "manualHangupBy": 0
        },
        "params": [
          {
            "name": null,
            "value": null
          }
        ]
      }
    }
  ]
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK 成功 Inline

响应的header

名称 类型 必选 说明
requestID string 与请求头一致
uuid string 与请求头一致
createTs string 响应时的秒级时间戳
sign string 生成方法与请求头sign生成算法一样,如果响应体是被压缩的,要解压后再验证签名。
algorithm string 与请求头一致,签名的算法:MD5或者SHA256,不填默认用MD5。

返回数据结构

状态码 200

名称 类型 必选 约束 说明
» retCode integer true none 响应码,0为成功,其余为失败
» retMsg string true none 响应消息
» responseID string true none 响应id,随机唯一id,用于请求追踪,定位问题时需要提供该次请求的responseID
» totalCount integer true none 通话总数
» callList [object] true none 返回订单列表
»» orderID string true none 订单id
»» userPhone string true none 手机号
»» userName string true none 用户名
»» sceneID string true none 话术模板id
»» userTaskID string true none 用户任务id
»» taskID string true none 任务id
»» other string true none 透传字段
»» callInfoDetail object true none 通话详细信息
»»» callID string true none 通话id
»»» callStatus integer true none 通话状态
»»» callStartTs integer true none 通话拨打时间戳
»»» callAnswerTs integer true none 通话接听时间戳,接听时间戳有值不代表通话被接听,请参照callStatus判断通话状态
»»» callEndTs integer true none 通话挂断时间戳
»»» callDuration integer true none 通话接听秒数
»»» callAudioUrl string true none 通话录音Url,通话录音url(有效期3个月),格式为wav,形如https://xxxx.wav
»»» hangupCause string true none 挂断原因
»»» termSipCode string true none sipCode
»»» intents [object] true none 意向,可通过查询该任务所属话术模板的意向标签设置获取
»»»» intentID string true none 意向标签id
»»»» intentTag string true none 意向标签tag,可通过查询该任务所属话术模板的意向标签设置获取
»»»» intentName string true none 意向标签名
»»»» intentLevel integer true none 意向优先级
»»» sms [object] false none 短信
»»»» smsSendTs integer true none 短信发送时间
»»»» sysMessageID string true none 短信发送id
»»»» smsContent string true none 短信发送内容
»»» agent object false none 坐席相关信息
»»»» agentName string true none 接听坐席名
»»»» agentGroup string true none 接听坐席组
»»»» agentCallStatus integer true none 坐席接听状态
»»»» agentCallElapsed integer true none 坐席接听时长
»»»» agentLabel string true none 坐席标签
»»»» manualCallStart integer true none 转人工开始时间戳
»»»» manualCallAnswer integer true none 转人工应答时间戳
»»»» manualCallEnd integer true none 转人工结束时间戳
»»»» manualHangupBy integer true none 被谁挂断了0:none,1:坐席挂断,2:用户挂断
»»» params [object] false none 变量
»»»» name string true none 变量名
»»»» value string true none 变量值

枚举值

属性
»» callStatus 1 准备通话
»» callStatus 2 调度中
»» callStatus 3 拨打中
»» callStatus 4 响铃中
»» callStatus 5 正在通话
»» callStatus 6 通话结束-完成通话
»» callStatus 8 通话结束-不合法号码
»» callStatus 9 通话结束-暂时无法接通
»» callStatus 10 通话结束-用户占线
»» callStatus 11 通话结束-用户忙线并拒接
»» callStatus 12 通话结束-用户拒接
»» callStatus 13 通话结束-用户拒接
»» callStatus 15 通话结束-tts合成失败
»» callStatus 16 通话结束-未知原因
»» callStatus 17 通话结束-黑名单号码
»» callStatus 18 通话结束-用户叫停
»» callStatus 21 通话结束-无效号码(号码检测非法,不满足当地号段)
»» callStatus 22 通话结束-响铃不接
»» callStatus 23 通话结束-拨打没响应
»» callStatus 24 通话结束-早媒体-语音信箱
»» callStatus 25 通话结束-响铃过长
»»» smsSendTs 0 未发送
»»» smsSendTs 1 已发送
»»» smsSendTs 2 发送成功
»»» smsSendTs 3 发送失败
»»» smsSendTs 4 点击成功
»»» agentCallStatus 1 拨打中
»»» agentCallStatus 2 响铃中
»»» agentCallStatus 3 接通
»»» agentCallStatus 4 完成通话
»»» agentCallStatus 10 通话完成-坐席繁忙
»»» agentCallStatus 12 通话完成-用户拒接

简介

短信

语音

云呼叫中心(NXLink)

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

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent(对外api)

Clone this wiki locally