(30039) 通话结束时间线通知
启用时间线功能后,通话结束时,PBX 会向第三方应用发送事件报告。
报告参数
| 参数 | 类型 | 说明 |
|---|---|---|
| type | Integer | 事件 ID。 |
| sn | String | PBX 序列号 (SN 码)。 |
| msg | Object <Detailed_Info> | 详情。 |
- Detailed_Info
-
参数 类型 说明 uid String 通话记录 (CDR) 的唯一 ID。 cdr_id String 具体通话阶段的 ID。 leg Integer 通话阶段的序号。 transaction_id String 通话阶段的 ID。 call_from String 主叫号码。 call_to String 被叫号码。 call_type String 通话类型。 Internal:内部。Inbound:呼入。Outbound:呼出。
status String 通话状态。 ANSWERED:已接NO ANSWER:未接BUSY:忙ABANDONED:放弃FAILED:失败VOICEMAIL:语音留言
time_start String 通话阶段的开始时间。 ring_duration Integer 通话开始到通话被应答的时间。 talk_duration Integer 通话被应答到通话结束的时间。 hold_duration Integer 通话中被保持的时长。 call_duration Integer 拨号开始到通话结束的时间。 src_trunk String 源中继的名称。 dst_trunk String 目标中继的名称。 did_number String 主叫拨打的 DID 号码。 dod_number String 呼出通话中显示的 DOD 号码。 event_list Array <Timeline_Event> 时间线事件列表,按事件发生时间升序排列。 - Timeline_Event
-
参数 类型 说明 event_id String 事件 ID。 event_name String 事件名称。 event_type String 事件类型。 event_ts String 事件发生时间。 event_content String 事件的详细信息。
报告示例
{
"type": 30039,
"sn": "3651D2032748",
"msg": {
"uid": "20261016150409C6FF1",
"cdr_id": "20261016150409-BC686",
"transaction_id": "31001",
"leg": 1,
"time_start": "2026/10/16 15:04:09",
"call_type": "Internal",
"call_from": "5555",
"call_to": "3021",
"src_trunk": "",
"dst_trunk": "",
"status": "ANSWERED",
"call_duration": 18,
"ring_duration": 6,
"talk_duration": 12,
"hold_duration": 0,
"did_number": "",
"dod_number": "",
"event_list": [
{
"event_id": "6850E1B1-22C000BF",
"event_type": "basic",
"event_name": "call_to",
"event_ts": "2026/10/16 15:04:10",
"event_content": {
"from": "5555",
"to": "3021",
"in": "web"
}
},
{
"event_id": "6850E1B1-22C009B1",
"event_type": "dial",
"event_name": "tried_contact",
"event_ts": "2026/10/16 15:04:12",
"event_content": {
"in": "desktop",
"to": "3021"
}
},
{
"event_id": "6850E1B1-22C011AF",
"event_type": "dial",
"event_name": "answered",
"event_ts": "2026/10/16 15:04:15",
"event_content": {
"device_remark": "LAPTOP-QOI5P2N4",
"to": "3021",
"in": "desktop",
"talk_duration": 12
}
},
{
"event_id": "6850E1B1-22C01BCB",
"event_type": "operate",
"event_name": "hangup",
"event_ts": "2026/10/16 15:04:27",
"event_content": {
"from": "3021",
"via_operate": "sip"
}
}
]
}
}