‘通话记录’报告

当通话结束后,PBX 向应用服务器实时发送通话详细记录(CDR)。

报告参数

名称 类型 描述
action String 通话事件。
timestart String 开始时间。
callfrom String 主叫号码。
callto String 被叫号码。
callduraction String 通话时长。
talkduraction String 接听时长。
srctrunkname String 源中继名称。
desttrunkname String 目的中继名称。
status String 通话状态。
type String 通话类型。
pincode Int 密码。
recording String 全局录音文件名。
didnumber String 来电用户拨打的号码。
agentringtime String 队列坐席从响铃到接听的时间。
sn String PBX 的 SN 码。

报告示例

分机 1001 呼叫分机 1005。

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260
Content-Type: application/json
Accept: application/json

{
    "action": "NewCdr",
    "callid": "1547391782.318",
    "timestart": "2019-01-13 23:03:02",
    "callfrom": "1001",
    "callto": "1005",
    "callduraction": "21",
    "talkduraction": "10",
    "status": "ANSWERED",
    "type": "Internal",
   "recording": "20180315201242-1521173562.46-203-201-Internal.wav",
   
    "sn": "369362089179"
}
分机 1005 呼叫外部号码 9283737733。
POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json

{
    "action": "NewCdr",
    "callid": "1547392142.330",
    "timestart": "2019-01-13 23:09:02",
    "callfrom": "1005",
    "callto": "9283737733",
    "desttrunkname": "SPS-6-36",
    "callduraction": "6",
    "talkduraction": "3",
    "status": "ANSWERED",
    "type": "Outbound",
   "recording": "20180315201242-1521173562.46-203-201-Internal.wav",
   
    "sn": "369362089179"
}
外部用户 1277378812 呼入分机 1005。
POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json

{
    "action": "NewCdr",
    "callid": "1547392256.333",
    "timestart": "2019-01-13 23:10:56",
    "callfrom": "1277378812",
    "callto": "1005",
    "srctrunkname": "SPS-6-36",
    "callduraction": "11",
    "talkduraction": "4",
    "status": "ANSWERED",
    "type": "Inbound",
    "didnumber": "1005",
   "recording": "20180315201242-1521173562.46-203-201-Internal.wav",
   
    "sn": "369362089179"
}