IVR管理 - 查询IVR呼叫清单-v2
接口说明
对于需要播放不同ivr语音的不同号码,可以使用此接口批量呼出,单次提交不要超过5000个号码。
请求方式
POST,form-data格式
请求参数
| 参数名 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| service | string | 是 | App.Sip_Call.GetBatchCallList |
| token | string | 是 | 通过授权接口获取的token |
| batch_id | string | 是 | 批次ID,精确匹配。 |
| phone | string | 是 | 目标号码,精确匹配。 |
| calltype | string(JSON) | 是 | 呼叫类型,范围:ivr/call/tts |
| call_status | string | 否 | 呼叫状态:0待发送、1呼叫中、2成功、3失败 |
| customuuid | string | 否 | 自定义ID,最多64字节,精确匹配 |
| starttime | string | 是 | 创建起始时间,yyyy-mm-dd hh:mm:ss |
| endtime | string | 是 | 创建结束时间,yyyy-mm-dd hh:mm:ss |
| currentpage | int | 否 | 当前页 |
| itemsperpage | int | 否 | 每页数量 |
接口请求示例(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Call.GetBatchCallList',
'token' => 'ABCDEFG',
'batch_id' => '111111',
'phone' => 'abcdefg',
'starttime' => 'yyyy-mm-dd hh:mm:ss',
'endtime' => 'yyyy-mm-dd hh:mm:ss',
];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$curlError = curl_error($curl);
curl_close($curl);
var_dump($response);
?>
返回数据结构示例
{
"status": 0,
"desc": "success",
"result": {
"totalitems": 1,
"currentpage": 1,
"itemsperpage": 10,
"calls": [
{
"id": 12345,
"batch_id": "20261125103000123456",
"calltype": "tts",
"phone": "13900000001",
"disnumber": null,
"voicefile": "",
"voicetype": 2,
"text_content": "您好,您的预约即将开始。",
"language": "zh-CN",
"voice_name": null,
"userid": "u-1",
"memberid": "m-1",
"customuuid": "order-1",
"call_status": 0,
"retry_count": 0,
"calltime": null,
"endtime": null,
"response": null,
"createtime": "2026-11-25 10:30:00",
"updatetime": null
}
]
},
"reqtime": 1795602600,
"rsptime": 1795602600
}
返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | int | 返回码 200 成功 |
| msg | string | 返回提示信息 |
| data | object | 返回数据对象 |
| —desc | string | 请求提示信息 |
| —reqtime | int | 请求时间戳 |
| —rsptime | int | 返回时间戳 |