呼叫事件 (TS)
# 呼叫事件 (TS)
# 消息格式
# ● 所有事件公共字段
字段 | 字段名称 | 类型 | 字段示例说明 |
---|---|---|---|
messageID | 事件类型 | String | 本节介绍的所有事件类型中任意一种 |
creationTime | 事件时间 | long | unix毫秒时间戳(毫秒):1641361630895 |
companyId | 租户Id | String | 30f80aa47cde4b10bd89484aeab63691 (租户Id) |
referenceID | 请求的序号 | long | 该事件是哪次请求产生的 |
attachedData | 事件携带的随路数据 | String | {"orderID":"ef3ed1a8d50558389a21300c70f21694"} 一般为业务数据 |
# ● 话务类事件字段
字段 | 字段名称 | 类型 | 字段示例说明 |
---|---|---|---|
callID | 话务ID | String | 通话唯一标识:4dce61ec399644029fab7e8251da9bf1332 |
partyID | 通话通道ID | String | 通话参与方唯一标识:123e45670e89bN12d33a456L426655440000 |
callType | 呼叫类型 | String | Inbound:呼入,Outbound:呼出,Internal:内部,Consult:咨询 |
partyRole | 通话参与方角色 | String | Customer:客户,Agent:座席,VirtualAgent:虚拟座席,Supervisor:班长,ThirdPSTN:第三方 |
ANI | PSTN发起方 | String | 13912345678(PSTN发起方,非PSTN为空字符串) |
DNIS | PSTN接收方 | String | 40012345678(PSTN接收方,非PSTN为空字符串) |
thisDN | 发起方电话号码 | String | 分机号或者手机号码 |
thisDNRole | 发起方角色 | String | Origination:发起者,Destination:被叫者,TransferBy:转接发起者,TransferTo:被转接者,ConsultBy:转接发起者 |
otherDN | 被叫电话号码 | String | 分机号或者手机号码 |
otherDNRole | 被叫角色 | String | Origination:发起者,Destination:被叫者,TransferBy:转接发起者,TransferTo:被转接者,ConsultBy:转接发起者 |
thirdDN | 三方/咨询者电话号码 | String | 分机号或者手机号码 |
thirdDNRole | 三方/咨询者角色 | String | Origination:发起电话者,Destination:接电话者,AddedBy:加入会议者,NewParty:被加入会议中者,DeletedBy:踢出会议者,DeletedParty:退出会议者,ObserveBy:监听者,TransferBy:发起转接成功者,ConsultBy:发起咨询者,BargeinBy:发起强插者,BargeinTo:被强插者,InterceptTo:被抢接者,TransferTo:被转接者,ObserveTo:被监听者,InterceptBy:发起抢接者,ConsultTo:被咨询者 |
makeCallType | 外呼类型 | String | Regular:电话条/接口外呼,DirectAgent:座席直接在硬话机上拨号 |
callState | 通话状态 | String | OK:呼入/呼出,Transferred:转移,Consult:咨询,Conference:会议 |
dtmfDigits | dtmf按键 | String | 通话中按键内容 |
billDuration | 计费时长 | int | 计费时长(秒) |
answerDuration | 接听时长 | int | 接听时长(秒) |
wrapUpDuration | 后处理时长 | int | 后处理时长(秒) |
startUepoch | 开始时间 | long | 当前参与方开始时间戳(微秒) |
progressUepoch | 振铃时间 | long | 当前参与方180/183响铃时间戳(微秒) |
answerUepoch | 接听时间 | long | 当前参与方接听时间戳(微秒) |
bridgeUepoch | 桥接时间 | long | 当前参与方桥接时间戳(微秒) |
lastHoldUepoch | 保持时间 | long | 当前参与方最近一次保持时间戳(微秒) |
endUepoch | 结束时间 | long | 当前参与方结束的时间戳(微秒) |
hangupCause | 挂断原因 | String | BY_AGENT:座席挂,BY_SYSTEM:系统,其他:参考FS |
earlyDetectCode | 早期回铃音识别结果 | int | 0:未知,103:停机,104:空号,105:关机,109:用户正忙,115:无人接听,119:线路拦截,200:已接听 |
hangupDisposition | 挂机方向 | String | 话机挂:send_bye/send_cancel/send_refuse;FreeSwitch挂:recv_bye/recv_cancel/recv_refuse |
recordedEarlymedia | 是否存在早期媒体录音 | boolean | |
bridgePartyId | 通话桥接参与方ID | String | 对应的是当前通话的另外一个partyID |
recordUUID | 录音地址ID | String | |
recordUrl | 通话录音地址 | String | |
system | 通话所在服务器地址 | String |
# ● 座席类事件字段
字段 | 字段名称 | 类型 | 字段示例说明 |
---|---|---|---|
agentID | 座席工号 | String | 1001 座席工号 |
agentUUID | 座席的唯一标识 | String | 2631394bbea55c23ae06dbe9c0a23db4 (座席生成的时候产生的唯一标识,不可改变) |
thisDN | 座席使用的话机号码 | String | 1001(分机) 或者 13912345678(手机) |
phoneType | 接听方式 | int | 1:网页电话,2:微信小程序,3:PSTN,4:SIP话机 |
agentState | 座席登录状态 | int | 0:离线,1:在线,2:勿扰 |
reasonCode | 勿扰状态 | int | 2:勿扰,4:话后小结,11:小休,12到99:自定义状态 |
previousState | 上一个状态 | int | 0:离线,1:在线,2:勿扰 |
previousStateTime | 上一个状态时间 | long | unix毫秒时间戳(毫秒):1641361630895 |
expirationTime | 后处理结束时间 | long | 后处理自动结束的时间戳(毫秒):1641361630895 |
# 话务相关
在CTI中,电话状态主要是参与终端Party的有限状态机。Party有5个状态: IDLE,Dialing,Ringing,Talk,Held. 如下图所示:
# ● 拨打电话
# 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
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",
"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
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
- 字段详情参考 话务类事件字段
# 4.EventOtherRinging
说明: 通知坐席端,客户的响铃事件(只用于JS-SDK/UI电话条对接)
Body
{
"messageID":"EventOtherRinging",
"referenceID":123456,
"callID": "4dce61ec399644029fab7e8251da9bf1332", // 当前通话的唯一的UUID。
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"partyRole": "Agent", // Customer(1),Agent(2)
"thisDN": "A", // 座席外呼客户场景下,座席分机 1001
"otherDN": "B", // 座席外呼客户场景下, 客户的电话号码 13988886666
"callType": "Outbound",
"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
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.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",
"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
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
- 字段详情参考 话务类事件字段
# 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
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",
"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 重试次数
"billDuration": 100, // 计费时长,计费时长按照秒来计算;
"answerDuration": 100, //接听时长,按照秒来计算
"startUepoch": 16371284166171234, // 这条腿的开始时间戳 微秒
"progressUepoch": 16371284166171234, // 这条腿的180/183 响铃 时间戳 微秒
"answerUepoch": 16371284166171234, // 这条腿的接听时间戳 微秒
"bridgeUepoch": 16371284166171234, // 这条腿的桥接时间戳 微秒
"lastHoldUepoch": 16371284166171234, // 这条腿最近一次Hold 时间戳 微秒
"endUepoch":16371284166171234, // 这条腿 结束的 时间戳 微秒
"hangupCause": "BY_AGENT", // 座席挂: BY_AGENT 系统: BY_SYSTEM 其他: 参考FS
"earlyDetectCode": 105, //早期回铃音识别结果
// 0:未知; 103:停机; 104:空号; 105:关机; 109:用户正忙; 115:无人接听; 119:线路拦截;
// 如果电话已接听的情况, 该值为 200: 已接听
"hangupDisposition": "recv_bye", // 挂机方向 话机挂: send_bye,send_cancel,send_refuse, FreeSwitch挂: recv_bye,recv_cancel,recv_refuse
"creationTime": 1637128416617,
"recordedEarlymedia": true // 是否存在早期媒体录音
}
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
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
- 字段详情参考 话务类事件字段
# 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
"earlyDetectCode": 105, //早期回铃音识别结果
// 0:未知; 103:停机; 104:空号; 105:关机; 109:用户正忙; 115:无人接听; 119:线路拦截;
// 如果电话已接听的情况, 该值为 200: 已接听
"hangupDisposition": "recv_bye", // 挂机方向 话机挂: send_bye,send_cancel,send_refuse, FreeSwitch挂: recv_bye,recv_cancel,recv_refuse
"billDuration": 0, // 计费时长,计费时长按照秒来计算
"answerDuration": 100, //接听时长,按照秒来计算
"startUepoch": 16371284166171234, // 这条腿的开始时间戳 微秒
"progressUepoch": 16371284166171234, // 这条腿的180/183 响铃 时间戳 微秒
"answerUepoch": 16371284166171234, // 这条腿的接听时间戳 微秒
"bridgeUepoch": 16371284166171234, // 这条腿的桥接时间戳 微秒
"lastHoldUepoch": 16371284166171234, // 这条腿最近一次Hold 时间戳 微秒
"endUepoch":16371284166171234, // 这条腿 结束的 时间戳 微秒
"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
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
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
- 字段详情参考 话务类事件字段
# ● 增加随路数据
# 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
2
3
4
5
6
7
8
9
10
11
12
13
14
- 字段详情参考 话务类事件字段
# ● 单步转移
# 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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",
"creationTime": 1637128416617
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
- 字段详情参考 话务类事件字段
# ● 强插电话
# 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
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
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
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- 字段详情参考 话务类事件字段
# 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
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
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
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
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
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
2
3
4
5
6
7
8
9
10
11
12
13
14
- 字段详情参考 话务类事件字段
# 座席相关
座席的状态是一个典型的有限状态机。共有三个状态Logout,Ready,NotReady。如下图所示
# ● EventAgentLogin
- Body
{
"messageID":"EventAgentLogin",
"referenceID":1001,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 座席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 座席UUID
"thisDN": "1001", // 座席电话号码 13988886666
"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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- 字段详情参考 座席类事件字段
# ● EventAgentReady
- Body
{
"messageID":"EventAgentReady",
"referenceID":10002,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 座席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 座席UUID
"thisDN": "1001", // 电话号码,分机号或者手机号码13988886666
"reasonCode":4, // 0: 其他原因 ; 4:AfterCallWork 话后小结;
"attachedData": { "orderID" : "123", "callID" : "81a3e101-9475-4ba1-bd38-6a7ca6c31ab5"}, //可选
"creationTime": 1637128416617
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
- 字段详情参考 座席类事件字段
# ● EventAgentNotReady
- Body
{
"messageID": "EventAgentNotReady",
"referenceID": 10003,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 座席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 座席UUID
"thisDN": "1001", //电话号码,分机号或者手机号码13988886666
"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
2
3
4
5
6
7
8
9
10
11
12
13
- 字段详情参考 座席类事件字段
# ● EventAgentLogout
- Body
{
"messageID":"EventAgentLogout",
"referenceID":10005,
"companyId":"30f80aa47cde4b10bd89484aeab63691",
"agentID": "1001", // 座席工号可以为空字符串
"agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // 座席UUID
"thisDN": "1001", //电话号码,分机号或者手机号码13988886666
"attachedData": { "orderID" : "123", "customerID" : "123"}, //可选
"creationTime": 1637128416617
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
- 字段详情参考 座席类事件字段
# ● 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
2
3
4
5
6
7
8
9
10
11
12
13
14
- 字段详情参考 座席类事件字段
# 错误相关
# ● 错误码
通话相关错误码 为 391XXX
- Unknown(391000)
- AgentMonitoredBy(391001)
- SupervisorMonitoring(391002)
- SupervisorInCall(393003)
- NotFoundCallID(391004)
- InvalidCallType(391005)
- InvalidAgentState(391006)
- CallHasObserver(391007)
- ConferenceToTransfer(391008)
- TargetPartyIsSelf(391009)
- HeldInProcess(391010)
- NotFoundOtherParty(391011)
- TargetPartyInCall(391012)
- PartyIsObserver(391013)
- NotFoundAgent(391014)
- CustomerAddByConference(391015)
- NotFoundParty(391016)
- NotEnoughMeetmeRoom(391017)
- InvalidParams(391018)
- PBXError(391019)
- CTIException(391020)
- NotFoundChannel(391021)
- SocketToJSon(391022)
- MessageIDNotMatch(391023)
- RegisterDNNotMatch(391024)
- RequestTooFast(391025)
- WrongPartyState(391026)
- NotSupportFunction(391027)
- InternalNotSupportFunction(391028)
- LinesConflict(391043)
- OtherLinesConflict(391044)
- LineNumberInterception(391046)
座席相关错误码为 391XXX
- Unknown(391000)
- AgentNotFound(391029)
- AgentHasLoggedOut(391031)
分机相关错误码
- ExtNotRegister(391032)
- DestExtNotRegister(391033)
- SipOffline(391034)
班长相关错误码为 391XXX
- Unknown(391000)
- AgentIsInBargedInScene(391035)
- AgentIsInMonitorScene(391036)
- AgentIsInInterceptScene(391037)
- AgentIsInConsultScene(391038)
- AgentIsInConferenceScene(391039)
# ● EventPartyError
- Body
{
"messageID":"EventPartyError",
"referenceID":1001, // 对应的事件是那个request发起的
"companyId": "30f80aa47cde4b10bd89484aeab63691", // 租户ID
"callID":"d24c627642c8498ebc071e79cede8321",
"thisDN":"1001",
"retCode": "391004", // 错误码
"errorMessage" : "NotFoundCallID", // 错误描述
"request" : "RequestMakeCall", // 请求来源
"creationTime": 1637128416617
}
1
2
3
4
5
6
7
8
9
10
11
12
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",
"attachedData": { "orderID" : "123", "customerID" : "123"}, //可选
"retCode": "391029", // 错误码
"errorMessage" : "NotFoundAgent", // 错误描述
"request" : "RequestAgentLogin", // 请求来源
"creationTime": 1637128416617
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
上次更新: 2024/2/22 15:58:46