通话记录回调

回调body参数

参数 类型 是否可空 描述
callId String false 通话标识
workflow int false 电话类型(1呼入2外呼直拨3双向回拨4自动外呼)
fromNumber String false 主叫号码
toNumber String false 被叫号码
relayNumber String false 中继号码
callStartTime date false 通话开始时间(例yyyy-MM-dd HH:mm:ss)
callEndTime date false 通话结束时间(例yyyy-MM-dd HH:mm:ss)
callDuration int false 通话总时长(秒)
callRecordUrl String true 通话录音地址
customerProvince String true 归属地-省
customerCity String true 归属地-市
routerId int true 路由id
routerName String true 路由名称
transferAgentFlag int true 是否转人工坐席(0否1是)
agentId String true 坐席ID
agentName String true 坐席名称
queueId String true 队列ID
queueName String true 队列名称
robotNames Array true 话术名称数组(["话术1","话术2"])
labelInfos Array true 普通标签数组(["水果","重"])
instances Array true 对话记录
instances[].callId String true 通话标识
instances[].instanceId int true 话术用例标识
instances[].robotId int true 机器人标识
instances[].robotDefId int true 机器人def标识
instances[].robotName String true 话术名称
instances[].dialogueStartTime date true 对话开始时间
instances[].dialogueEndTime date true 对话结束时间
instances[].dialogueDuration int true 对话总时长(秒)
instances[].dialogueRecordUrl String true 对话录音地址
instances[].dialogueRound int true 对话轮次
instances[].intentionLabelKey String true 意向标签标识
instances[].intentionLabelName String true 意向标签名称
instances[].labelInfoList Array true 标签信息
instances[].labelInfoList[].name String true 标签名称
instances[].dialogueContentList Array true 对话内容
instances[].dialogueContentList[].callId String true 通话标识
instances[].dialogueContentList[].instanceId int true 会话标识
instances[].dialogueContentList[].robotId int true 机器人ID
instances[].dialogueContentList[].robotDefId int true 机器人定义id
instances[].dialogueContentList[].dialogueRole int true 对话角色(1机器人2用户9系统)
instances[].dialogueContentList[].dialogueStartTime date true 对话结束时间
instances[].dialogueContentList[].dialogueContent String true 对话内容
instances[].dialogueContentList[].dialogueRecordUrl String true 对话录音地址
instances[].dialogueContentList[].matchType int true 匹配到的类型(1命中问题2命中回答分支3命中节点重复4命中全局配置10未命中)
instances[].dialogueContentList[].matchResult String true 匹配结果
instances[].dialogueContentList[].matchName String true 匹配名称
variables Array true 变量
variables[].variableName String true 变量名
variables[].variableValue String true 变量值
intentionLabelKey String true 意向标签标识
intentionLabelName String true 意向标签名称
allRecordUrl Array true 所有通话记录
allRecordUrl[].recordUrl String true 通话记录地址
allRecordUrl[].recordType String true 通话记录类型
adTaskId int true 外呼任务id
adTaskName String true 外呼任务名称
contactDetailRel Object true 联系人信息
contactDetailRel.name String true 名称
contactDetailRel.mobile String true 号码
contactDetailRel.companyName String true 公司
contactDetailRel.remark String true 备注
contactDetailRel.variates Object true 联系人变量信息
contactDetailRel.variates.key String true 联系人变量key
contactDetailRel.variates.type String true 联系人变量类型
contactDetailRel.variates.value String true 联系人变量值
callResult int true 振铃结果
calledResult int true 外呼结果 1-未接通 2-已接通
agentCallDuration int true 人工通话时长
hangupCause String true 外呼失败原因
hangupBy int true 通话挂断方 1: 客户 2: 坐席 3:系统 4: IVR 5: 外线
customerNumber String true 客户号码
remark String true 备注
taskContactBatchName String true 联系人名称
userAnsweredFlag int true 有效通话(0否1是)
userAnsweredCount int true 用户交互次数
userAnsweredEffectiveCount int true 用户有效交互次数
isFinalCall int true 最后一通通话标识 1-最后一次外呼 0-否
gender String true 性别,男性:male 女性: female 未知: unknown

回调示例

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "callId": "eff790c4-90a5-4453-990c-ff7d4aa30914",
    "workflow": 3,
    "fromNumber": "18920765651",
    "toNumber": "05388593211",
    "relayNumber": "05388593191",
    "callStartTime": "2021-05-29 10:23:43",
    "callEndTime": "2021-05-29 10:23:57",
    "callDuration": 14,
    "callRecordUrl": "https://tiao.com/7859ff65-0e6a-44e4-4ec2-1052f43f647a/cc_recordings/202105291ff7d4aa30914_eff790c4-90a5-4453-990c-ff7d4aa30914.mp3",
    "customerProvince": "天津",
    "customerCity": "天津",
    "routerId": 185,
    "routerName": "210528bbr",
    "transferAgentFlag": 0,
    "agentId": null,
    "agentName": null,
    "queueId": null,
    "queueName": null,
    "robotNames": [
        "F测试_英文1"
    ],
    "labelInfos": [
        "满意"
    ],
    "variables": [
        {
            "variableName": "2",
            "variableValue": "北京"
        }
    ],
      "instances": [
        {
            "callId": "eff790c4-90a5-4453-990c-ff7d4aa30914",
            "instanceId": 1622255025121140,
            "robotId": 25233,
            "robotDefId": 30724,
            "robotName": "F测试_英文1",
            "dialogueStartTime": "2021-05-29 10:23:43",
            "dialogueEndTime": "2021-05-29 10:23:57",
            "dialogueDuration": 13,
            "dialogueRecordUrl": null,
            "dialogueRound": 1,
            "intentionLabelKey": "C",
            "intentionLabelName": "C级(明确拒绝)",
            "labelInfoList": [
                {
                    "name": "水果"
                }
            ],
            "dialogueContentList": [
                {
                    "callId": "eff790c4-90a5-4453-990c-ff7d4aa30914",
                    "instanceId": 1622255025121140,
                    "robotId": 25233,
                    "robotDefId": 30724,
                    "dialogueRole": 1,
                    "dialogueStartTime": "2021-05-29 10:23:43",
                    "dialogueContent": "Many lessons are boring, and he is very tired after doing gym.",
                    "dialogueRecordUrl": null,
                    "matchType": null,
                    "matchResult": "",
                    "matchName": ""
                },
                {
                    "callId": "eff790c4-90a5-4453-990c-ff7d4aa30914",
                    "instanceId": 1622255025121140,
                    "robotId": 25233,
                    "robotDefId": 30724,
                    "dialogueRole": 2,
                    "dialogueStartTime": "2021-05-29 10:23:49",
                    "dialogueContent": "嗯。",
                    "dialogueRecordUrl": "https://tiao.com/7859ff65-0e6a-44e4-4ec2-1052f43f647a/cc_recordings/202105291ff7d4aa30914_eff790c4-90a5-4453-990c-ff7d4aa30914.mp3",
                    "matchType": 9,
                    "matchResult": "忽略",
                    "matchName": "忽略"
                },
                {
                    "callId": "eff790c4-90a5-4453-990c-ff7d4aa30914",
                    "instanceId": 1622255025121140,
                    "robotId": 25233,
                    "robotDefId": 30724,
                    "dialogueRole": 2,
                    "dialogueStartTime": "2021-05-29 10:23:56",
                    "dialogueContent": "是个英语。",
                    "dialogueRecordUrl": "https://tiao.com/7859ff65-0e6a-44e4-4ec2-1052f43f647a/cc_recordings/202105291ff7d4aa30914_eff790c4-90a5-4453-990c-ff7d4aa30914.mp3",
                    "matchType": 6,
                    "matchResult": "匹配到回答分支:【默认】",
                    "matchName": "默认"
                }
            ]
        }
    ],
    "intentionLabelKey":"C",
    "intentionLabelName":"C级(明确拒绝)",
    "allRecordUrl": [
        {
            "recordUrl": "https://tiao.com/7859ff65-0e6a-44e4-4ec2-1052f43f647a/cc_recordings/202105291ff7d4aa30914_eff790c4-90a5-4453-990c-ff7d4aa30914.mp3",
            "recordType": "ivr"
        }
    ],
    "adTaskId": 1762,
    "adTaskName": "测试外呼任务",
    "contactDetailRel": {
        "name": "zmh",
        "mobile": "18770915633",
        "companyName": "沃丰科技",
        "remark": "人美心善",
        "variates": [
            {
                "key": "name",
                "type": "text",
                "value": "zmh"
            },
            {
                "key": "age",
                "type": "number",
                "value": "18"
            }
        ]
    },
    "callResult": 1,
     "calledResult": 1,
     "agentCallDuration": 23,
    "hangupCause": "客户正忙",
    "hangupBy": 1,
    "customerNumber": 18770915633,
    "remark": "",
    "taskContactBatchName": "测试联系人",
    "userAnsweredFlag": 1,
    "userAnsweredCount": 2,
    "userAnsweredEffectiveCount": 0,
    "isFinalCall": 1,
    "gender": "male"
}