跳转到主要内容

语音文件管理 - 获取语音文件

接口说明

客户主动拉获取通话记录语音文件列表的接口。

请求方式

POST,form-data格式

请求参数

参数名 类型 是否必须 说明
service string 是 App.Sip_Cdr.GetBillSip_Voice.GetAudioList
token string 是 通过授权接口获取的token
starttimefilename string 是否 (拔打)起始时间,格式:yyyy-mm-dd hh:mm:ss文件名
endtimevoicename string 是否 (拔打)结束时间语音名称,格式:yyyy-mm-dd hh:mm:ss支持模糊查询
syncflagstatus int 是否 获取记录类型:1、获取未查询过的记录(默认);2、获取已查询过的记录;3、获取0:启用、1:禁用、2:全部记录。
directionint是呼叫方向:1、呼入; 2、呼出;3、全部(默认)。
callmethodint是呼叫方法:0、不限;1、分机互拨;2、分机直拨(手拨);3、API呼叫(默认);4、API双呼;5、预测式外呼;6、IVR/群呼。
currentpage int 是否 页数,默认:1
itemsperpage int 是否 每页数量,默认:10,最小:1;最大:1000
extnumberstring是分机号,多个分机号用英文逗号隔开,传空值时为全部
destnumberstring是呼叫的目标号码,传空值时为全部
useridstring是自定义数据(员工ID),可为空值
memberidstring是自定义数据(会员ID),可为空值
extstring否自定义数据(扩展参数)
customuuidstring否自定义数据(客户ID)

接口请求示例(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 每页数量
—billsaudios array 记录数组
——id int 记录id
——extnumberfilename string 分机号
——destnumberstring目标号码
——disnumberstring显示号码
——starttimestring呼叫时间
——answertimestring应答时间
——endtimestring通话结束时间
——durationint呼叫等待时长
——billsecint通话时长
——directionstring呼叫方向
——callmethodint呼叫方式
——useridstring自定义参数(用户id)
——memberidstring自定义参数(会员id)
——chengshudustring自定义参数(成熟度)
——extstring自定义参数(扩展参数)
——customuuidstring自定义参数(客户id)
——recordfilenamestring通话记录文件名
——downloadipvoicename string 下载ip语音文件名称
——hangupdirectionmark intstring 挂断方向备注说明
——hangupcausestatus intstring 挂断原因状态
——userkeycreatetime string 用户按键创建时间
——customuuidupdatetime string 自定义参数
——taskidstring任务id
——roundstring任务轮次
——recordurlstring录音下载地址更新时间

Postman请求示例

c65b2c52d15ac1a4f5775e9b19f9cfe5.jpg