Updated on 2023-09-27 GMT+08:00

Downloading Video Files

Prerequisites

  • On the CC-Gateway, VIDEO_DOWNLOAD_FLAG and IF_SUPPORT_VIDEO have been set to ON, indicating that the video file download function and video event function have been enabled. The configuration file path is /home/elpis/tomcat/webapps/agentgateway/WEB-INF/config/basic.properties.
  • The agent has signed in.

Description

This interface is used to download video files generated during video calls in MCU recording mode. (You are not advised to use this interface to download video files larger than 200 MB.)

Interface Method

The request method must be set to GET. This interface supports only the GET method.

URI

https://ip:port/agentgateway/resource/recordfile/{agentid}/videofiledownload?conferenceId=xxx&recordId=xxx&fileType=xxx

In the URL, ip indicates the IP address of the CC-Gateway server, and port indicates the HTTPS port number of the CC-Gateway server.

Table 1 Parameters in the URI

No.

Parameter

Value Type

Mandatory (Yes/No)

Description

1

agentid

string

Yes

Agent ID. The value ranges from 101 to 59999.

2

conferenceId

string

Yes

Indicates the conference ID.

Example: 7a008307-34ad-435b-bccd-222be5ac5385

3

recordId

string

No

Indicates the video recording ID.

Example: 0a08082d-df1e-4c06-9a97-c7c6f7a4724e

NOTE:

If recordId is not specified, the video file corresponding to the first recording URL is downloaded by default.

4

fileType

string

Yes

File type. The options are as follows:

  • 0: HD file
  • 1: SD file
  • 2: videoAux

Method Name in Logs

downloadVideoFile

Request Description

  • Message header
    Table 2 Parameters in the request message header

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    Content-Type

    string

    Yes

    Coding mode of the message body. The default value is application/json; charset=UTF-8.

    2

    Guid

    string

    Yes

    GUID returned by the sign-in interface during static authentication (AUTHMODE is set to 1) or GUID returned by the polling event query interface during dynamic authentication (AUTHMODE is set to 2).

  • Message body

    None

Response Description

The following provides an example of the response message body of this interface:

  • If the download fails:

    Message header: Content-Type: application/json;charset=UTF-8

    For details about the message body example, see Example.

    Table 3 Parameters in the message body

    No.

    Parameter

    Value Type

    Description

    1

    message

    string

    Description.

    2

    retcode

    string

    Error code. The options are as follows:

    0: success

    Other values: failure

    3

    result

    object

    Reserved field.

  • If the download is successful:

    Message header: Content-Type: application/octet-stream;charset=utf-8

    Message body: file stream

Triggered Event

  • After an agent signs in, the video file download interface is invoked.

Error Code

  • 108-001
  • 108-002
  • 108-003
  • 108-004
  • 108-005
  • 108-006
  • 108-007
  • 108-008
  • 108-009

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter

    None

  • Response parameter
    {
        "retcode": "000-003",
        "message": "no right to invite resource",
        "result": ""
    }