开发者文档 开发者文档
帮助中心 (opens new window)
帮助中心 (opens new window)
  • 呼叫中心V6

    • 接口功能规范
    • 基础管理 API
    • 数据服务 API
    • 呼叫能力 (https)
    • 呼叫能力 (JS-SDK)
    • 呼叫能力 (UI电话条)
    • 呼叫事件 (TS)
    • 呼叫能力 (Andorid-SDK)
    • 呼叫能力 (iOS-SDK)
  • 外呼机器人V5
  • 语音类产品 API
  • 呼叫中心V6
智齿科技
2022-09-15
目录

呼叫能力消息格式

# 呼叫能力消息格式

# 消息格式

# ● 所有事件公共字段
字段 字段名称 字段示例说明
messageID 事件类型 本节介绍的所有事件类型中任意一种
creationTime 事件时间 1641361630895 (unix毫秒时间戳)
companyId 租户Id 30f80aa47cde4b10bd89484aeab63691 (租户Id)
referenceID 请求的序号 该事件是哪次请求产生的
attachedData 事件携带的随路数据 {"orderID":"ef3ed1a8d50558389a21300c70f21694"} 一般为业务数据
# ● 话务类事件公共字段
字段 字段名称 字段示例说明
callID 话务ID 4dce61ec399644029fab7e8251da9bf1332
partyID 通话通道ID 123e45670e89bN12d33a456L426655440000
callType 呼叫类型 Inbound:呼入; Outbound:呼出; Internal:内部; Consult:咨询
partyRole 通话通道参与方角色 Customer:客户;Agent:坐席; VirtualAgent:虚拟坐席;Supervisor:班长; ThirdPSTN:第三方
ANI PSTN发起方 13912345678(PSTN发起方,非PSTN为空)
DNIS PSTN接收方 40012345678(PSTN接收方,非PSTN为空)
# ● 坐席类事件公共字段
字段 字段名称 字段示例说明
agentID 坐席工号 1001 坐席工号
agentUUID 坐席的唯一标识 2631394bbea55c23ae06dbe9c0a23db4 (坐席生成的时候产生的唯一标识,不可改变)
thisDN 坐席使用的话机号码 1001(分机) 或者 13912345678(手机)
thisQueues 坐席登录的技能组 {"q8001","q8002"} 多技能组

# 话务相关

在CTI中,电话状态主要是参与终端Party的有限状态机。Party有5个状态: IDLE,Dialing,Ringing,Talk,Held. 如下图所示:
Party状态机

# ● 拨打电话
# 1.时序图

拨打电话时序图

# 2.EventDialing
  • Body

{

"messageID": "EventDialing",

"referenceID": 123456,

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID。

"partyID": "4dce61ec399644029fab7e8251da9bf1332", // 当前Party的唯一的UUID。

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Agent", // Unknown(0),Customer(1),Agent(2)

"thisDN": "A", // 座席外呼客户场景下,座席分机 1001

"thisDNRole": "Origination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),

"otherDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"otherDNRole": "Destination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),

"callType": "Outbound",

"makeCallType" :"Regular",  // Regular(1) : 常规操作;DirectAgent(2) : 座席直接在硬话机上拨号

"ANI": "01088886666", // 可选,通过PSTN才需要; ANI是PSTN的发起方

"DNIS": "13988886666", // 可选,通过PSTN才需要; DNIS 是PSTN的接收方,比如客户手机号码

"attachedData": { "campaignID" : "123","contactSN":"456"}, // 业务带过来的随路数据,在一通电话中的事件中都可以取得

"creationTime": 1637128329720,

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 3.EventRinging
  • Body

{

"messageID":"EventRinging",

"referenceID":123456,

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID。

"partyID": "123e45670e89bN12d33a456L426655440000", // 当前Party的唯一的UUID。

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Customer", // Customer(1),Agent(2)

"thisDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"thisDNRole": "Destination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),

"otherDN": "A", // 座席外呼客户场景下,座席分机 1001

"otherDNRole": "Origination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),

"callType": "Outbound",

"thisQueue": "",  // 呼入场景,坐席电话来自那个队列

"ANI": "01088886666", // 可选,通过PSTN才需要; ANI是PSTN的发起方

"DNIS": "13988886666", // 可选,通过PSTN才需要; DNIS 是PSTN的接收方,比如客户手机号码

"attachedData": {"campaignID" : "123","contactSN":"456"}, // 业务带过来的随路数据,在一通电话中的事件中都可以取得

"creationTime": 1637128329720,

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# ● 接听电话
# 1.EventEstablished 主叫
  • Body

{

"messageID":"EventEstablished",

"referenceID": 123457,

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID。

"partyID": "4dce61ec399644029fab7e8251da9bf1332", // 当前Party的唯一的UUID。

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Agent", // Customer(1),Agent(2)

"thisDN": "A", // 座席外呼客户场景下,座席分机 1001

"otherDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"callType": "Outbound",

"thisQueue": "",  // 呼入场景,坐席电话来自那个队列

"makeCallType" :"Regular",  // Regular(1) : 常规操作;DirectAgent(2) : 座席直接在硬话机上拨号


"ANI": "01088886666", // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显

"DNIS": "13988886666", // DNIS 是PSTN的接收方,比如客户手机号码

"attachedData": {"campaignID" : "123","contactSN":"456"},

"creationTime": 1637128329720,

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 2.EventEstablished 被叫
  • Body

{

"messageID":"EventEstablished",

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID

"partyID": "123e45670e89bN12d33a456L426655440000", // 当前Party的唯一的UUID

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Customer", // Customer(1),Agent(2)

"thisDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"otherDN": "A", // 座席外呼客户场景下,座席分机 1001

"callType": "Outbound",

"ANI": "01088886666", // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显

"DNIS": "13988886666", // DNIS 是PSTN的接收方,比如客户手机号码

"attachedData": { "campaignID" : "123","contactSN":"456"},

"creationTime": 1637128329720,

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# ● 挂断电话
# 1.EventReleased 主叫
  • Body

{

"messageID": "EventReleased",

"referenceID": 123458,

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID

"partyID": "4dce61ec399644029fab7e8251da9bf1332", // 当前Party的唯一的UUID

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Agent", // Customer(1),Agent(2)

"thisDN": "A", // 座席外呼客户场景下,座席分机 1001

"otherDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"callType": "Outbound",

"thisQueue": "",  // 呼入场景,坐席电话来自那个队列

"makeCallType" :"Regular",  // Regular(1) : 常规操作;DirectAgent(2) : 座席直接在硬话机上拨号

"ANI": "01088886666", // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显

"DNIS": "13988886666", // DNIS 是PSTN的接收方,比如客户手机号码

"attachedData": {"to_customer_ani":"","campaignID" : "123","contactSN":"456","retries": 1}, //to_customer_ani 客户侧中继号码; campaignID 活动ID; contactSN retries 重试次数

"billsec": 100, // 计费时长,计费时长按照秒来计算;

"answersec": 100, //接听时长,按照秒来计算

"startUepoch": 16371284166171234, // 这条腿的开始时间戳 微秒

"progressUepoch": 16371284166171234, // 这条腿的180/183 响铃 时间戳 微秒

"answerUepoch": 16371284166171234, // 这条腿的接听时间戳 微秒

"bridgeUepoch": 16371284166171234, // 这条腿的桥接时间戳 微秒

"lastHoldUepoch": 16371284166171234, // 这条腿最近一次Hold 时间戳 微秒

"endUepoch":16371284166171234, // 这条腿 结束的 时间戳 微秒

"hangupCause": "BY_AGENT", // 坐席挂: BY_AGENT  系统: BY_SYSTEM 其他: 参考FS

"earlyDetectCause": 105, //早期回铃音识别结果
// 0:未知; 102:用户拒接; 103:停机; 104:空号; 105:关机; 106:正在通话中; 107:无法接通; 
// 108:暂停服务; 109:用户正忙; 110:拨号方式不正确; 111:呼入限制; 112:来电提醒; 113:呼叫转移失败; 114:网络忙; 115:无人接听; 
// 116:欠费; 117:无法接听; 118:改号; 119:线路故障; 120:稍后再拨; 200:回铃音; 201:忙音; 300:彩铃
// 如果电话已接听的情况, 接听前的早期媒体一般为 200: 回铃音

"hangupDisposition": "recv_bye", // 挂机方向   话机挂: send_bye,send_cancel,send_refuse, FreeSwitch挂: recv_bye,recv_cancel,recv_refuse   

"creationTime": 1637128416617,

"recordedEarlymedia": true ,// 是否存在早期媒体录音

"recordUUID":"3519d6deb17e49f794df05c9044cee18",

"recordUrl":"https://Outbound-1256747917.cos.ap-beijing.myqcloud.com/recordings/20210207/1721/6ec0eb05420347d2aeeb9d5ea6a8e246.mp3"

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 2.EventReleased 被叫
  • Body

{

"messageID": "EventReleased",

"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID

"partyID": "123e45670e89bN12d33a456L426655440000", // 当前Party的唯一的UUID

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"partyRole": "Customer", // Customer(1),Agent(2)

"thisDN": "B", // 座席外呼客户场景下,客户的电话号码 13988886666

"otherDN": "A", // 座席外呼客户场景下,座席分机 1001

"callType": "Outbound",

"ANI": "01088886666", // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显

"DNIS": "13988886666", // DNIS 是PSTN的接收方,比如客户手机号码

"wrapUpDuration": 60, // 话后小接时长  缺省为0, 只有从队列分配过来的座席腿才有值

"attachedData": {"gender":0,"emotion_status":1,"campaignID" : "123","contactSN":"456","answerBusinessCode":"123","hangupBusinessCode":"123"},

"hangupCause": "BY_AGENT", // 坐席挂: BY_AGENT  系统: BY_SYSTEM 其他: 参考FS

"earlyDetectCause": 106, //早期回铃音识别结果
// 0:未知; 102:用户拒接; 103:停机; 104:空号; 105:关机; 106:正在通话中; 107:无法接通; 
// 108:暂停服务; 109:用户正忙; 110:拨号方式不正确; 111:呼入限制; 112:来电提醒; 113:呼叫转移失败; 114:网络忙; 115:无人接听; 
// 116:欠费; 117:无法接听; 118:改号; 119:线路故障; 120:稍后再拨; 200:回铃音; 201:忙音; 300:彩铃  
// 如果电话已接听的情况, 接听前的早期媒体一般为 200: 回铃音


"hangupDisposition": "recv_bye", // 挂机方向   话机挂: send_bye,send_cancel,send_refuse, FreeSwitch挂: recv_bye,recv_cancel,recv_refuse   

"billsec": 0, // 计费时长,计费时长按照秒来计算

"answersec": 100, //接听时长,按照秒来计算

"startUepoch": 16371284166171234, // 这条腿的开始时间戳 微秒

"progressUepoch": 16371284166171234, // 这条腿的180/183 响铃 时间戳 微秒

"answerUepoch": 16371284166171234, // 这条腿的接听时间戳 微秒

"bridgeUepoch": 16371284166171234, // 这条腿的桥接时间戳 微秒

"lastHoldUepoch": 16371284166171234, // 这条腿最近一次Hold 时间戳 微秒

"endUepoch":16371284166171234, // 这条腿 结束的 时间戳 微秒

"creationTime": 1637128416617,

"recordUUID":"3519d6deb17e49f794df05c9044cee18",

"recordUrl":"https://Outbound-1256747917.cos.ap-beijing.myqcloud.com/recordings/20210207/1721/6ec0eb05420347d2aeeb9d5ea6a8e246.mp3"

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ● 增加随路数据
# 1.EventAttachedDataChanged
  • 说明: 随路数据改变通知

  • Body


{
    "messageID":"EventAttachedDataChanged",
    "referenceID":200500, 
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "thisDN" : "C",                               // 给那个腿增加UserData
    "callType" : "Inbound",
    "ANI" : "01088886666",                // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS" : "18618256606",               // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData" :  { "orderID" : "123", "customerID" : "123","policyID" : "567","_key1" : "123", "_key2" : "123","_key3" : "567"},     //包括所有机器人出参
    "creationTime": 1637128416617
}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ● 单步转移
# 1.时序图

单步转移电话时序图

# 2.EventReleased
  • 说明: B 单步转移后, B收到 EventReleased
  • Body

{
    "messageID":"EventReleased",
    "referenceID":12346,                
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",                                 // 当前通话的唯一的UUID
    "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                                       // Customer(1) 客户 Agent(2) 人工座席
    "thisDN": "B",                                         // 坐席 B
    "otherDN": "A",                                        // 客户 A
    "thirdDN": "C",                                        // 转接方的电话号码
    "thirdDNRole": "TransferTo",                           //- TransferTo(13): 被转接者
    "callState":"Transferred",
    "callType": "Outbound",
    "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 3.EventRinging
  • 说明: 单步转移后, C收到 EventRinging
  • Body

{
    "messageID":"EventRinging",
    "referenceID":0,                
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",                                 // 当前通话的唯一的UUID
    "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                                       // Customer(1) 客户 Agent(2) 人工座席
    "thisDN": "C",                                         // 坐席 C
    "otherDN": "A",                                        // 客户 A
    "thirdDN": "B",                                        // 转接方的电话号码 B
    "thirdDNRole": "TransferBy",                           //- TransferBy(8): 发起转接者
    "callType": "Outbound",
    "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 4.EventEstablished
  • 说明: C 接听后, C收到 EventEstablished
  • Body

{
    "messageID":"EventEstablished",
    "referenceID":0,                
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",                                 // 当前通话的唯一的UUID
    "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                                       // Unknown(0),Customer(1)
    "thisDN": "C",                                         // 被转接坐席C
    "otherDN": "A",                                        // 转接以后的客户电话号码
    "callType": "Outbound",
    "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ● 保持电话
# 1.时序图

保持电话时序图

# 2.EventHeld
  • Body
{
    "messageID": "EventHeld",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // Hold发起者
    "callType": "Outbound",
    "ANI": "01088886666",                                  // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS": "18618256606",                                 // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 3.EventRetrieved
  • Body
{
    "messageID": "EventRetrieved",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // Hold发起者
    "callType": "Outbound",
    "ANI": "01088886666",                                  // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS": "18618256606",                                 // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# ● 静音和取消静音
# 1.时序图

静音和取消静音时序图

# 2.EventMuted
  • Body
{
    "messageID": "EventMuted",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // Mute发起者
    "otherDN": "A",                                         //客户
    "callType": "Outbound",
    "ANI": "01088886666",                                  // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS": "18618256606",                                 // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 3.EventUnmuted
  • Body
{
    "messageID": "EventUnmuted",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // 当前Party的唯一的UUID
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // Unmute发起者
    "otherDN": "A",                                         //客户
    "callType": "Outbound",
    "ANI": "01088886666",                                  // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS": "18618256606",                                 // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // 业务带过来的随路数据,在一通电话中的事件中都可以取得
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ● 发起咨询
# 1.时序图

发起咨询时序图

# 2.EventAttachedDataChanged
  • Body
{
    "messageID": "EventAttachedDataChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 咨询方
    "otherDN": "C",                                         //被咨询方
    "callType": "Outbound",
    "attachedData": {"consultStage":1},          // 咨询阶段 1: 咨询已开始
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
# 3.EventRinging
  • Body
{
    "messageID": "EventRinging",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",             // Customer(1),Agent(2)
    "thisDN": "C",               // 被咨询方
    "otherDN": "B",              //咨询方
    "otherDNRole": "ConsultBy",              // ConsultBy(9) : 发起咨询者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":"2","consulting":"true"},       // 咨询阶段 2: 被咨询方响铃
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 4.EventAttachedDataChanged
  • Body
{
    "messageID": "EventAttachedDataChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 咨询方
    "otherDN": "C",                                         //被咨询方
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":2},          // 咨询阶段 2: 被咨询方响铃
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 5.EventEstablished
  • Body
{
    "messageID": "EventEstablished",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                                         // 被咨询方
    "otherDN": "B",              //咨询方
    "otherDNRole": "ConsultBy",              // ConsultBy(9) : 发起咨询者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":"4","consulting":"true"},   // 咨询阶段 4: 被咨询方接听
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 6.EventAttachedDataChanged
  • Body
{
    "messageID": "EventAttachedDataChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 咨询方
    "otherDN": "C",                                         //被咨询方
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":4},          // 咨询阶段 4: 被咨询方接听
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# ● 咨询取消
# 1.时序图

咨询取消时序图

# 2.EventReleased
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                  // 被咨询方
    "otherDN": "B",              //咨询方
    "otherDNRole": "ConsultBy",              // ConsultBy(9) : 发起咨询者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":3,"consulting":"true"},          // 咨询阶段 3: 咨询已取消
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 3.EventAttachedDataChanged
  • Body
{
    "messageID": "EventAttachedDataChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole": "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 咨询方
    "otherDN": "C",                                         //被咨询方
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":3},          // 咨询阶段 3:咨询已取消
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# ● 咨询后取回
# 1.时序图

咨询后取回时序图

# 2.EventReleased
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                                         // 被咨询方
    "otherDN": "B",              //咨询方
    "otherDNRole": "ConsultBy",              // ConsultBy(9) : 发起咨询者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":5,"consulting":"true"},          // 咨询阶段 5:咨询已取回
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 3.EventAttachedDataChanged
  • Body
{
    "messageID": "EventAttachedDataChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 咨询方
    "otherDN": "C",                                         //被咨询方
    "callType": "Outbound",
    "callState": "Consult",
    "attachedData": {"consultStage":5},          // 咨询阶段 5:咨询已取回
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# ● 咨询后转移
# 1.时序图

咨询后转接时序图

# 2.EventReleased
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                                         // 被咨询方
    "thisDNRole":"ConsultBy", // ConsultBy 转接者
    "otherDN": "C",                                         //咨询方
    "callType": "Outbound",
    "callState":"Transferred",
    "attachedData": {"consultStage":6},          // 咨询阶段 6: 咨询后转接
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 3.EventPartyChanged
  • Body
{
    "messageID": "EventPartyChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                  // 咨询方
    "otherDN": "18688886666",    // 客户电话号码
    "thirdDN": "B",               //被咨询方
    "thirdDNRole": "TransferBy", //TransferBy(8) : 发起转接成功者
    "callType": "Outbound",
    "callState": "OK", // 当前双方通话为 OK
    "attachedData": {"consultStage":6},          // 咨询阶段 6: 咨询后转接; 咨询转接成功没有 consulting
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ● 咨询后会议
# 1.时序图

咨询后会议时序图

# 2.EventPartyAdded
  • Body
{
    "messageID": "EventPartyAdded",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                  
    "otherDN": "C",    // 被加入会议者
    "thirdDN": "B",    // 发起咨询会议者
    "thirdDNRole": "AddedBy", //AddedBy(3) : 加入会议者
    "callType": "Outbound",
    "callState": "Conference", // 当前会议中。 如果三方会议变两方, callState要变为 OK
    "attachedData": {"consultStage":7},          // 咨询阶段 7: 咨询后会议
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 3.EventPartyChanged
  • Body
{
    "messageID": "EventPartyChanged",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                  
    "otherDN": "18688886666",    // 客户电话号码
    "thirdDN": "B",    // 发起咨询会议者
    "thirdDNRole": "AddedBy", //AddedBy(3) : 加入会议者
    "callType": "Outbound",
    "callState": "Conference", // 当前会议中。 如果三方会议变两方, callState要变为 OK
    "attachedData": {"consultStage":7},          // 咨询阶段 7: 咨询后会议; 咨询会议成功没有 consulting
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 4.EventPartyDeleted
  • 说明: 会议后转接,三方通话变为两方通话
  • Body
{
    "messageID": "EventPartyDeleted",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                  
    "otherDN": "B",    // 退出会议者
    "thirdDN": "B",    // 踢出会议发起者
    "thirdDNRole": "DeletedBy", //DeletedBy(5) : 踢出会议发起者 AddedBy(3) : 加入会议者
    "callType": "Outbound",
    "callState": "OK", // 退出会议后。 三方会议变两方, callState要变为 OK
    "attachedData": {"consultStage":8},          // 咨询阶段 8: 会议后转接
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 5.EventPartyDeleted
  • 说明: 会议后取回,三方通话变为两方通话
  • Body
{
    "messageID": "EventPartyDeleted",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "B",                  
    "otherDN": "C",    // 退出会议者
    "thirdDN": "B",    // 踢出会议发起者
    "thirdDNRole": "DeletedBy", //DeletedBy(5) : 踢出会议发起者 AddedBy(3) : 加入会议者
    "callType": "Outbound",
    "callState": "OK", // 退出会议后。 三方会议变两方, callState要变为 OK
    "attachedData": {"consultStage":9},          // 咨询阶段 9: 会议后取回
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ● 发送dtmf
# 1.EventDtmfSent
  • 说明: 通知 坐席 DTMF按键已经发送给客户
  • Body:
{
    "messageID":"EventDtmfSent",
    "referenceID":211101,  
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",     // 主通话ID
    "companyId": "30f80aa47cde4b10bd89484aeab63691",
    "thisDN" : "B",                              // 坐席B发起 DTMF
    "otherDN" : "18688886666",                  // 客户腿 接收 DTMF
    "dtmfDigits":"1234#",   // dtmf按键
    "callType" : "Outbound",
    "creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
# ● 抢接电话
# 1.时序图

抢接时序图

# 2.EventRinging
  • Body
{
    "messageID": "EventRinging",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 抢接方
    "otherDN": "18688886666",    // 客户联系电话号码
    "thirdDN": "B",              // 被抢接方
    "thirdDNRole": "InterceptTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Outbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 3.EventReleased
  • 说明: 班长C 抢接失败
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 抢接方
    "otherDN": "18688886666",    // 客户联系电话号码
    "thirdDN": "B",              // 被抢接方
    "thirdDNRole": "InterceptTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Outbound",
    "attachedData": {"intercept_cause":1},          // 抢接失败原因 1:班长接听前失败 2 班长接听后桥接失败
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 4.EventEstablished
  • Body
{
    "messageID": "EventEstablished",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 抢接方
    "otherDN": "18688886666",    // 客户联系电话号码
    "thirdDN": "B",              // 被抢接方
    "thirdDNRole": "InterceptTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Outbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 5.EventReleased
  • 说明: 坐席B 被抢接后挂断
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "B",               // 被抢接方
    "otherDN": "18688886666",    // 客户联系电话号码
    "thirdDN": "C",  //抢接方
    "thirdDNRole": "InterceptBy",
    "callType": "Outbound",
    "attachedData": {},          // 
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ● 强插电话
# 1.时序图

强插时序图

# 2.EventRinging
  • Body
{
    "messageID": "EventRinging",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 发起强插班长分机
    "otherDN": "A",    // 客户联系电话号码
    "thirdDN": "B",              // 被强插坐席分机
    "thirdDNRole": "BargeinTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Inbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 3.EventReleased
  • 说明: 班长C 强插失败
  • Body
{
    "messageID": "EventReleased",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 强插方
    "otherDN": "18688886666",    // 客户联系电话号码
    "thirdDN": "B",
    "thirdDNRole": "BargeinTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Outbound",
    "attachedData": {"bargein_cause":1},          // 强插失败原因 1:班长接听前失败 2 班长接听后强插失败
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 4.EventEstablished
  • Body
{
    "messageID": "EventEstablished",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "C",               // 发起强插班长分机
    "otherDN": "A",    // 客户联系电话号码
    "thirdDN": "B",              // 被强插坐席分机
    "thirdDNRole": "BargeinTo",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者
    "callType": "Inbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 5.EventPartyAdded
  • Body


{
    "messageID": "EventPartyAdded",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
    "thisDN": "B",               // 被强插坐席视角     
    "otherDN": "C",                 // 会议新成员            
    "thirdDN": "C",                    // 发起强插者
    "thirdDNRole": "BargeinBy",  // BargeinTo(10): 被强插者; InterceptTo(11): 被强拆者; BargeinBy(12): 强插发起者;
    "callType": "Inbound",
    "callState": "Conference", // 当前处理会议中。 如果三方会议变两方, callState要变为 OK
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},      
    "creationTime": 1637128416617,
}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 6.EventPartyDeleted
  • 说明: 班长C挂断B,三方通话变为两方通话
  • Body
{
    "messageID": "EventPartyDeleted",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Agent",                // Customer(1),Agent(2)
    "thisDN": "C",                  
    "otherDN": "B",    // 退出会议者
    "thirdDN": "C",    // 踢出会议发起者
    "thirdDNRole": "DeletedBy", //DeletedBy(5) : 踢出会议发起者 AddedBy(3) : 加入会议者
    "callType": "Inbound",
    "callState": "OK", // 退出会议后。 三方会议变两方, callState要变为 OK
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ● 监听电话
# 1.时序图

抢接时序图

# 2.EventRinging
  • Body
{
    "messageID": "EventRinging",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Supervisor",             // Customer(1),Agent(2),Supervisor(8)
    "thisDN": "C",               // 班长C
    "otherDN": "B",              //被监听坐席
    "otherDNRole": "ObserveTo", // ObserveTo(14) : 被监听者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# 3.EventEstablished
  • Body
{
    "messageID": "EventEstablished",
    "callID" : "4dce61ec399644029fab7e8251da9bf1332",
    "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "partyRole":  "Supervisor",             // Customer(1),Agent(2),Supervisor(8)
    "thisDN": "C",               // 班长C
    "otherDN": "B",              //被监听坐席
    "otherDNRole": "ObserveTo", // ObserveTo(14) : 被监听者
    "thirdDN": "18688886666",    // 客户联系电话号码
    "callType": "Outbound",
    "creationTime": 1637128416617,
}
1
2
3
4
5
6
7
8
9
10
11
12
13
# ● 创建和销毁
# 1.EventCallCreated
  • 说明: 一通电话创建事件
  • Body

{
    "messageID": "EventCallCreated",
    "referenceID": 0, 
    "companyId": "30f80aa47cde4b10bd89484aeab63691",
    "callID": "callID 1",
    "thisDN": "A",                        
    "callType": "Outbound",
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},     //包括所有业务相关参数
    "creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
# 2.EventCallDeleted
  • 说明: 一通电话销毁事件
  • Body

{
    "messageID": "EventCallDeleted",
    "referenceID": 0, 
    "companyId": "30f80aa47cde4b10bd89484aeab63691",
    "callID": "callID 1",
    "thisDN": "A",      //电话创建的发起者
    "otherDN": "B",     // 电话创建的接收者
    "callType": "Outbound",
    "startUepoch": 1631763908786, // 第一条腿的开始时间戳 微秒
    "bridgeUepoch": 1631763948786, // 第一条腿 桥接时间戳 微秒
    "endUepoch":1631763948786, // 最后一条腿 结束的 时间戳 微秒
    "recordUUID":"3519d6deb17e49f794df05c9044cee18",
    "recordUrl":"https://Outbound-1256747917.cos.ap-beijing.myqcloud.com/recordings/20210207/1721/6ec0eb05420347d2aeeb9d5ea6a8e246.mp3",
    "attachedData": {"NoCallReasonCode":"1","customerID":"123","policyID":"567"},     //包括所有业务相关参数
    // 系统未应答的原因 NoCallReasonCode: 1 企业欠费   2 客户名单在黑名单; 如果有EventCallCreated, 则没有NoCallReasonCode
    "creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 3. 系统未应答的原因 NoCallReasonCode
  • 1 企业欠费
  • 2 客户名单在黑名单
  • 400 未知错误
# 4. EventCallInfo
  • Body

{
    "messageID": "EventCallInfo",
    "referenceID": 200100, 
    "callID": "callID 1",
    "thisDN": "C",                        // C  可以是超级管理员 100000000
    "parties":  [ {"thisDN":"A","DNRole":"Origination","createTime":1637128416617},{"thisDN":"B","DNRole":"Destination","createTime":1637128416617}],
    "callType": "Outbound",
    "ANI": "01088886666",                // ANI是PSTN的发起方,在VOIP网关中不能完全保证正确性,可能是乱显
    "DNIS": "18618256606",               // DNIS 是PSTN的接收方,比如客户手机号码
    "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},     //包括所有业务相关参数
    "creationTime": 1637128416617
}



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# 座席相关

座席的状态是一个典型的有限状态机。共有三个状态Logout,Ready,NotReady。如下图所示

座席状态机

# ● EventAgentLogin
  • Body

{

"messageID":"EventAgentLogin",

"referenceID":1001,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 坐席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 坐席UUID
"thisDN": "1001", // 座席电话号码 13988886666
"thisQueues": ["8001","8002"], // 队列的分机号码 8001
"phoneType":1, //设备类型 1: 网页电话 2: 微信小程序 3: PSTN 4: SIP话机
"agentState" : 2,   // agentState Ready(1),NotReady(2)
"attachedData": {  "orderID" : "123", "customerID" : "123"}, //可选 
"reasonCode":2, //   2:DoNotDisturb 勿扰 ; 4:AfterCallWork 话后小结; 11: Rest 小休  >11 and <99: 自定义 
"creationTime": 1637128416617

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# ● EventAgentReady
  • Body

{

"messageID":"EventAgentReady",
"referenceID":10002,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 坐席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 坐席UUID
"thisDN": "1001", //电话号码,分机号或者手机号码13988886666
"reasonCode":4, //   0: 其他原因 ;  4:AfterCallWork 话后小结; 
"thisQueues": ["8001","8002"] , 
"attachedData": { "orderID" : "123", "callID" : "81a3e101-9475-4ba1-bd38-6a7ca6c31ab5"}, //可选 
"creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ● EventAgentNotReady
  • Body

{

"messageID": "EventAgentNotReady",

"referenceID": 10003,

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"agentID": "1001", // 坐席工号可以为空字符串

"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 坐席UUID

"thisDN": "1001", //电话号码,分机号或者手机号码13988886666


"thisQueues": ["8001","8002"],

"reasonCode":4, //   2:DoNotDisturb 勿扰 ; 4:AfterCallWork 话后小结; 11: Rest 小休  >11 and <99: 自定义 

"attachedData": { "loginState" : "1", "customerID" : "123", "callID" : "81a3e101-9475-4ba1-bd38-6a7ca6c31ab5"}, //可选 只有ACW才需要前一个状态是 loginState: 1 在线 2: 勿扰

"creationTime": 1637128416617

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ● EventAgentLogout
  • Body

{

"messageID":"EventAgentLogout",

"referenceID":10005,

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"agentID": "1001", // 坐席工号可以为空字符串

"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 坐席UUID

"thisDN": "1001", //电话号码,分机号或者手机号码13988886666

"thisQueues": ["8001","8002"], 

"attachedData": { "orderID" : "123", "customerID" : "123"}, //可选

"creationTime": 1637128416617

}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ● EventDelayAfterCallWork
  • Body

{

"messageID":"EventDelayAfterCallWork",

"referenceID":123456,

"companyId":"30f80aa47cde4b10bd89484aeab63691",

"agentID": "1001", // 坐席工号可以为空字符串

"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 坐席UUID

"thisDN": "1001",

"callID": "4dce61ec399644029fab7e8251da9bf1332",

"partyId": "03734ec400281M11ec583fc70a80ff2603de",

"expirationTime": 1637128416617, //后处理 会自动结束的时间戳(毫秒)

"creationTime": 1637128416617

}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# 错误相关

# ● 错误码

通话相关错误码 为 1XXX

  • Unknown(1000)
  • AgentMonitoredBy(1001)
  • SupervisorMonitoring(1002)
  • SupervisorInCall(1003)
  • NotFoundCallID(1004)
  • InvalidCallType(1005)
  • InvalidAgentState(1006)
  • CallHasObserver(1007)
  • ConferenceToTransfer(1008)
  • TargetPartyIsSelf(1009)
  • HeldInProcess(1010)
  • NotFoundOtherParty(1011)
  • TargetPartyInCall(1012)
  • PartyIsObserver(1013)
  • NotFoundAgent(1014)
  • CustomerAddByConference(1015)
  • NotFoundParty(1016)
  • NotEnoughMeetmeRoom(1017)
  • InvalidParams(1018)
  • PBXError(1019)
  • CTIException(1020)
  • NotFoundChannel(1021)
  • SocketToJSon(1022)
  • MessageIDNotMatch(1025)
  • RegisterDNNotMatch(1026)
  • RequestTooFast(1027)

座席相关错误码为 2XXX

  • Unknown(2000)
  • NotFoundAgentID(2001)

班长相关错误码为 3XXX

  • Unknown(3000)
  • AgentIsInBargedInScene(3001)
  • AgentIsInMonitorScene(3002)
  • AgentIsInInterceptScene(3003)
  • AgentIsInConsultScene(3004)
  • AgentIsInConferenceScene(3005)
# ● EventPartyError
  • Body
{
    "messageID":"EventPartyError",
    "referenceID":1001,                  // 对应的事件是那个request发起的
    "companyId": "30f80aa47cde4b10bd89484aeab63691",                   // 租户ID
    "callID":"d24c627642c8498ebc071e79cede8321"
    "thisDN","1001"
    "errorCode": 1004,                     // 错误码
    "errorMessage" : "NotFoundCallID",    // 错误描述
    "request" :  "RequestMakeCall",  // 请求来源
    "creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
# ● EventAgentError
  • Body
{
    "messageID":"EventAgentError",
    "referenceID":1001,                  // 对应的事件是那个request发起的
    "companyId": "30f80aa47cde4b10bd89484aeab63691",                   // 租户ID
    "agentUUID": "fa9056d575295e8d89239ea8312d9b58",      // 坐席UUID
    "agentID":"1001", //工号
    "thisDN": "1001",
    "thisQueues": ["8001","8002"], 
    "attachedData": { "orderID" : "123", "customerID" : "123"}, //可选
    "errorCode": 2001,                     // 错误码
    "errorMessage" : "NotFoundAgent",    // 错误描述
    "request" :  "RequestAgentLogin",  // 请求来源
    "creationTime": 1637128416617
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
上次更新: 2022/9/13 下午3:14:30
最近更新
01
Android SDK
09-15
02
iOS-sdk
09-15
03
JavaScript-SDK API 设计
09-15
更多文章>
Theme by Vdoing
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式