语音文件管理 - 获取语音文件
接口说明
客户主动拉获取通话记录语音文件列表的接口。
请求方式
POST,form-data格式
请求参数
| 参数名 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| service | string | 是 | App. |
| token | string | 是 | 通过授权接口获取的token |
| string | |||
| string | |||
| int | |||
| currentpage | int | 页数,默认:1 | |
| itemsperpage | int | 每页数量,默认:10,最小:1;最大:1000 | |
接口请求示例(PHP)
<?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' => 'App.Sip_Cdr.GetBill',
'token' => 'ABCDEFG',
'starttime' => '2019-01-12 00:00:00',
'endtime' => '2020-12-12 00:00:00',
'direction' => 3
'syncflag' => 3,
'callmethod' => 0,
'currentpage' => 1,
'itemsperpage' => 10,
];
$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);
?>
返回数据结构示例
{
"ret": 200,
"data": {
"status": 0,
"desc": "获取成功"success",
"result": {
"totalitems": 8151,4,
"currentpage": 1,
"itemsperpage": 10,20,
"bills"audios": [
{
"id": 263056202,1897,
"companycode"createtime": "9513923"2026-09-09 11:32:59",
"direction"updatetime": "callout"2026-09-09 11:32:59",
"type"status": 0,
"filename": "callout"welcome.mp3",
"callmethod"voicename": "欢迎语音",
"mark": null
},
{
"id": 32,
"createtime": "2020-04-05 12:24:32",
"updatetime": "2020-04-05 12:24:32",
"status": 0,
"filename": "162729test_Telat3hari.mp3",
"voicename": "test",
"mark": null
},
{
"id": 30,
"createtime": "2020-04-05 12:24:32",
"updatetime": "2020-04-05 12:24:32",
"status": 0,
"filename": "d0bc00b05d3e.mp3",
"voicename": "apply_pass_voice2",
"mark": null
},
{
"id": 6,
"starttime"createtime": "2025-10-162020-04-05 17:31:13"12:24:32",
"answertime"updatetime": ""2020-04-05 12:24:32",
"endtime": "2025-10-16 17:31:21",
"duration": 8,
"billsec"status": 0,
"userid"filename": "0"pylv8-favv2.mp3",
"memberid"voicename": "0"apply_pass_voice",
"chengshudu"mark": "0",
"ext": "0",
"disnumber": "219513923001",
"destnumber": "81351111451",
"extnumber": "",
"recordfilename": "",
"downloadip": "",
"hangupdirection": 10040,
"hangupcause": 10020,
"uuid": "db4a44cc-aa72-11f0-ad78-1d7ff0749d07",
"userkey": "",
"customuuid": "76c33d997640d36b033d43b1d2d3964e",
"taskid": "",
"round": 0,
"recordurl": ""null
}
]
},
"reqtime": 1581502410,1788924914,
"rsptime": 15815024101788924914
},
"msg": ""
}
返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| result | objest | 返回的结果集 |
| —totalitems | int | 记录总数 |
| —currentpage | int | 当前页码 |
| —itemsperpage | int | 每页数量 |
| — |
array | 记录数组 |
| ——id | int | 记录id |
| —— |
string | |
| —— |
string | |
| —— |
||
| —— |
||
| —— |
string | |
| —— |
string | |
