通话记录添加
HTTP方法
POST
HTTP URL
/api/iot/callLog/create
Query参数
无
Path参数
无
Header参数
- Content-Type采用 application/json
Body数据
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| callerPhone | string | 是 | 主叫号码 |
| deviceId | string | 是 | 设备号, 可以是主叫设备,也可以是被叫设备 |
| calleePhone | string | 是 | 被叫号码 |
| ringingTime | string | 是 | 响铃时间,格式:yyyy-MM-dd HH:mm:ss |
| hangUpTime | string | 是 | 通话挂断时间,格式:yyyy-MM-dd HH:mm:ss |
| answerTime | string | 是 | 通话接听时间,格式:yyyy-MM-dd HH:mm:ss |
| direction | int | 是 | 电话方向, INCOMING = 1,OUTGOING = 2 |
| ringingDuration | int | 是 | 响铃时长,单们为 秒 |
| duration | int | 是 | 通话时长,单位为 秒 |
注: 在呼入时,calleeDeviceId为空则会报 312002;在呼出时,callerDeviceId为空则会报312002.
示例
{
"callerPhone": "1380013801001",
"calleePhone": "136865269185",
"deviceId": "DY09001104",
"direction": 1,
"ringingTime": "2021-10-25 18:15:00",
"hangUpTime": "2021-10-25 18:15:30",
"answerTime": "2021-10-25 18:15:10",
"ringingDuration": 10,
"duration": -1
}
HTTP响应
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 状态码,0为成功,非0为失败 |
| message | int | 对于状态码的简单描述 |
正常响应
{
"code": 0,
"message": "Success"
}
异常响应
通话记录添加失败
{
"code": 312001,
"message": "通话记录添加失败",
}
设备账号不能为空
{
"code": 312002,
"message": "设备账号不能为空",
}
设备账号还未录入
{
"code": 312003,
"message": "设备账号还未录入",
}
通话类型不符
{
"code": 312004,
"message": "通话类型不符",
}