curl --request GET \
--url https://{host}/api/v1/cdrs/{uuid}/recording/audio \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/cdrs/{uuid}/recording/audio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/cdrs/{uuid}/recording/audio"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Download the recording
The audio itself, streamed, with Content-Disposition set so a browser saves it. Separate from /recording, which returns metadata for a list and is cheap; this streams megabytes. Supports Range requests so an audio player can seek without fetching the whole file. The stored path is confined to the recordings directory before being opened - it is written by our own code, but it reaches the filesystem here, and one traversal away is this endpoint serving arbitrary files to anyone with recordings:listen. The filename carries the call uuid rather than the caller’s number, because a filename survives being forwarded.
curl --request GET \
--url https://{host}/api/v1/cdrs/{uuid}/recording/audio \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/cdrs/{uuid}/recording/audio', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/cdrs/{uuid}/recording/audio"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.
Response
WAV audio
The response is of type file.