Download Recording Files
Download recording files of Yeastar S-Series VoIP PBX.
Steps to download a recording file
- Get the recording name from
recording
parameter in New CDR. - Get the random string of recording file.
- Combine the random string with other parameters to form a download
link.Note: The random string is only valid for 30 seconds, and each random string can be used only once.
Request URL
{base_url}/{api_path}/recording/get_random?token={token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
recording | Yes | String | Recording filename. |
allowedip | No | String |
Specify the IP address which is allowed to download recording file. By default,
Valid values:
|
Response parameters
Parameter | Type | Description |
---|---|---|
status | String | Request result.
|
recording | String | Recording filename. |
random | String | A random string for recording file. Combine the random string with other parameters to form a download link. |
Examples
Request exampleGet the random string of recording files.
POST /api/v2.0.0/recording/get_random?token=1e3b3ebb6a974cb42ed31de5413df52d Content-Type:application/json; charset=utf-8 Host: 192.168.5.150 { "recording": "20191024012719-1571909237.191-4000-4001-Internal.wav" }
HTTP/1.1 200 OK Server: Boa/0.94.14rc21 Accept-Ranges: bytes Connection: close Content-Type: application/json Access-control-allow-origin: * Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE { "status": "Success", "recording": "20191024012719-1571909237.191-4000-4001-Internal.wav", "random": "2d2f919b742cc62f5e03c77351350f7c" }
Download Link Example
Use the API responded random as a component of a specified request address for downloading the recording file.Download link
format:
Download
link
example:https://{pbx ip}:{https port}/api/v2.0.0/recording/download?recording={recording}&random={random}&token={token}
https://192.168.5.150:8088/api/v2.0.0/recording/download?recording=20170901181806-1504261084.7-1001-1003-Internal.wav&random=120732c546381fb020f17fba676b0ea0&token=75c5891b32203d0615f9e3753a7cb779