CallBack
当呼叫结束时,给指定的url发送一个json对象
POST
回调post一个json对象:
Parameters | Description |
---|---|
total_duration | 呼叫持续时间,单位毫秒 |
cause | 呼叫消息的最终响应代码 |
cause_text | 呼叫消息最终响应 |
connect_delay | 呼叫开始到接通的时间,单位毫秒 |
connect_duration | 呼叫通话持续的时间,单位毫秒 |
ringing | 呼叫收到 180 或者 183 信令的时间戳,13 位长,单位为毫秒,如果整个呼叫过程没有收到180 或者 183,值为空字符串 “” |
connected | 呼叫接通的时间戳,13 位长,单位为毫秒,如果整个呼叫过程未接通,值为空字符串 “” |
disconnected | 呼叫结束的时间戳,13 位长,单位为毫秒 |
from | sip消息的from字段,包括tag |
to | sip消息的to字段,如果接通会有相应的tag |
audio | 呼叫中的rtp 流信息,如下:
|
{
"audio" : [
{
"clock" : 8000,
"codec" : "PCMU",
"pt" : 0,
"rx" : {
"avg_bps" : 0,
"discard" : 0,
"dup" : 0,
"loss" : 0,
"reorder" : 0,
"total" : 0
},
"srtp" : "Not active",
"tx" : {
"avg_bps" : 62822,
"discard" : 0,
"dup" : 0,
"loss" : 0,
"reorder" : 0,
"total" : 8
}
}
],
"call_id" : "5e8e5682b1db4f57916c756e8f45eb52",
"cause" : 480,
"cause_text" : "Temporarily Unavailable",
"connect_delay" : 0,
"connect_duration" : 0,
"ringing" : "",
"connected" : "",
"disconnected" : "1694764203334",
"from" : "sip:1006@client.pbx.aiwcc.com",
"to" : "sip:1007@client.pbx.aiwcc.com",
"total_duration" : 509
}
{
"audio" : [
{
"clock" : 8000,
"codec" : "PCMU",
"pt" : 0,
"rx" : {
"avg_bps" : 59879,
"discard" : 1,
"dup" : 0,
"loss" : 21,
"reorder" : 0,
"total" : 428
},
"srtp" : "Not active",
"tx" : {
"avg_bps" : 63937,
"discard" : 0,
"dup" : 0,
"loss" : 0,
"reorder" : 0,
"total" : 457
}
}
],
"call_id" : "e2aa1447f8dc496f97060d238d61fc1e",
"cause" : 200,
"cause_text" : "OK",
"connect_delay" : 367,
"connect_duration" : 9135,
"ringing" : "",
"connected" : "1694764194562",
"disconnected" : "1694764203334"
"from" : "sip:1006@client.pbx.aiwcc.com",
"to" : "sip:*86@client.pbx.aiwcc.com",
"total_duration" : 9502
}