更新时间:2024-05-16 GMT+08:00
分享

录音下载接口

前置条件

  • Gateway已经挂载文件服务器且打开了录音下载开关
  • CC-Gateway配置了映射关系
  • 配置文件中已配置挂载目录
  • 座席已签入

场景描述

下载文件服务器上的录音文件(不建议通过该接口下载超过30MB的录音文件)。

此处下载的数据中,包含个人数据,下载后务必谨慎处理,防止个人数据外泄滥用。

接口方法

设置成“GET”。该接口仅支持GET方法,不支持PUT、POST和DELETE等方法。

接口URI

https://ip:port/agentgateway/resource/recordfile/{agentid}?recordId= xxx&filetype=1

例:https://ip:port/agentgateway/resource/recordfile/102?recordId=y:/1/0/20181217/120/1524488.V3

其中,ip为CC-Gateway服务器地址,port为CC-Gateway服务器的HTTPS端口号。

表1 URI中携带的参数说明

序号

名称

参数类型

是否必选

说明

1

agentid

string

True

签入的座席id。

2

recordId

string

True

录音文件的路径和名称。

录音文件的路径和名称是在触发了AgentMediaEvent_Record时生成的,在fileName中返回。

录音文件路径格式详见下方说明。

3

filetype

string

False

录音文件类型:

1:座席通话录音

2:IVR留言录音或者第三方留言录音文件

说明:
  • 座席通话录音文件路径格式为:盘符:/vdn编号/目录号/****。例:y:/1/0/20181217/120/1524488.V3
  • IVR录音留言录音文件路径格式为:盘符:/vdn编号/record/****。例:y:/1/record/20190412/playvoice1551276018824.wav
  • 第三方留言录音文件路径格式为:盘符:/3rdfile/vdn编号/record/***。例:y:/3rdfile/1/record/20190408/515/1633022.V3

默认为座席通话录音

4

locationId

number

False

节点Id(CTI POOL模式下为必选),在触发了AgentMediaEvent_Record时生成。

日志中的方法名

downloadRecordFile

请求说明

  • 消息头
    表2 请求头参数说明

    序号

    名称

    参数类型

    是否必选

    说明

    1

    Content-Type

    string

    True

    消息主体编码方式,缺省值:application/json; charset=UTF-8

    2

    Guid

    string

    True

    静态鉴权(AUTHMODE = 1)签入接口返回的Guid;动态鉴权(AUTHMODE = 2)轮询事件接口返回的Guid。

  • 消息体

响应说明

该接口的响应说明体举例如下:

  • 下载失败时:

    消息头Content-Type: application/json;charset=UTF-8

    消息体示例请参见报文样例

    表3 消息体参数说明

    序号

    名称

    参数类型

    说明

    1

    message

    string

    描述

    2

    retcode

    string

    错误码。取值如下:

    0:成功

    非0:失败

    3

    result

    object

    预留字段

  • 下载成功时:

    消息头 Content-Type: application/octet-stream;charset=utf-8

    消息体 文件流

触发事件

  • 座席签入,调用录音下载接口。

错误结果码

  • 104-001
  • 104-005
  • 104-010

报文样例

  • 消息头
    Content-Type:application/json; charset=UTF-8
    Guid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • 请求参数

  • 响应参数
    {
        "retcode": "000-003",
        "message": "no right to invite resource",
        "result": ""
    }
分享:

    相关文档

    相关产品