Call recordings
This section describes the REST API for call recordings. Use it to list, play, download, and delete the recordings of a specific call on VoiceAI Connect. The Session Recording Server (SRS) records calls through SIPREC, and VoiceAI Connect converts each recording to a stereo WAV file, with one side of the call on each channel.
The feature is applicable only to VoiceAI Connect Enterprise Version 3.26.4 and later.
The feature is applicable only when the AudioCodes SRS is used.
The REST API for call recordings is done over HTTPS and supports the following HTTPS method requests:
-
GET: This method lists the recordings of a call, plays or downloads a recording, or retrieves its waveform samples.
-
DELETE: This method permanently deletes a specific recording or all recordings of a call.
The REST API for call recordings requests is made from the REST client to VoiceAI Connect (server), using the resource URI /api/v1/recordings/. The REST requests can be done on the following REST resources:
|
REST Resource |
HTTP Request |
Description |
|---|---|---|
|
|
GET, DELETE |
Lists the recordings of the call, or deletes all of them. |
|
|
DELETE |
Deletes a specific recording of the call. |
|
|
GET |
Downloads a specific recording as a WAV file. |
|
|
GET |
Streams a specific recording for playback. |
|
|
GET |
Retrieves the waveform samples of a specific recording. |
This feature is applicable only to VoiceAI Connect Enterprise with call recording (SIPREC) deployed. If call recording isn't deployed, every call recording request returns 404.
VoiceAI Connect keeps recordings for the retention period of the account (by default, 30 days), and then deletes them automatically. The first play or download of a recording can take a few seconds, while VoiceAI Connect retrieves and converts it. Calls that failed or have a duration of zero have no recordings.
All call recording requests, including the DELETE requests, require the VAIC/CALLS/READ role. VoiceAI Connect records each download and deletion in the Activity Log.
In addition to the responses listed for each request, any call recording request can return one of the following HTTP status codes:
|
HTTP Status Codes |
Description |
|---|---|
|
400 Bad Request |
A parameter failed validation, or the recording ID is malformed. |
|
500 Internal Server Error |
An unexpected internal error occurred in VoiceAI Connect. |
|
502 Bad Gateway |
The recordings service rejected the credentials of VoiceAI Connect, or the audio stream failed before any data was sent. |
|
503 Service Unavailable |
The recordings service can't be reached, timed out, or returned another error (for example, a 5xx status code). |
Error responses have a JSON body with the statusCode, message, and error fields. Authentication and permission errors (401 and 403) have a JSON body with the statusCode, message, and timestamp fields instead.
GET /api/v1/recordings/{cdrId}
Description
Retrieves the list of recordings of a specific call (cdrId). Use the recording IDs in the response with the other call recording requests. The recording IDs are available only from this request. The durationSeconds field of each recording is calculated from its endTime minus its startTime.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
200: The list of recordings of the call is successfully retrieved
-
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
Response Example
[
{
"recordingId": "20260809_20260809-142035.011_..._386a78b28fff1f97_0",
"startTime": "2026-08-09T14:20:35.011Z",
"endTime": "2026-08-09T14:23:10.400Z",
"durationSeconds": 155.389
}
]
GET /api/v1/recordings/{cdrId}/files/{recordingId}/download
Description
Downloads a specific recording (recordingId) of a call as a stereo WAV file, which you can play in any media player. The response has the Content-Disposition: attachment header. VoiceAI Connect records each download in the Activity Log.
To download all recordings of a call, send one request per recording. To record the whole batch as one Activity Log entry, add the batchSize and batchLead query parameters to each request.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
|
|
String |
The ID of one recording of the call. To get the IDs, use 1 to 256 characters: letters, digits, and the characters |
Query Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
Integer |
(Optional) The number of recordings in the "download all" batch. A value less than 2 is handled as a single download. |
|
|
Boolean |
(Optional) Set to |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
200: The recording is successfully retrieved, as a WAV file (
audio/wav). The response includes theContent-Type,Content-Length,Accept-Ranges: bytes, andCache-Control: private, no-storeheaders. -
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
For example, the following curl command downloads a recording and saves it as recording.wav:
curl -H "Authorization: Bearer ACCESS_TOKEN" \ -o recording.wav \ "https://VAIC_HOST/api/v1/recordings/CDR_ID/files/RECORDING_ID/download"
GET /api/v1/recordings/{cdrId}/files/{recordingId}/play
Description
Streams a specific recording (recordingId) of a call for playback, for example, in an HTML audio element. The response has the Content-Disposition: inline header. The optional range header lets the player request part of the recording, so it can seek without downloading the whole file.
To save the recording as a file, use the download request instead.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
|
|
String |
The ID of one recording of the call. To get the IDs, use 1 to 256 characters: letters, digits, and the characters |
Request Headers
|
Header |
Type |
Description |
|---|---|---|
|
|
String |
(Optional) The byte range of the recording to return, in the standard HTTP |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
200: The whole recording is successfully retrieved (
audio/wav) -
206: The requested byte range of the recording is successfully retrieved, with a
Content-Rangeheader -
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
-
416: The
rangeheader is outside the recording
GET /api/v1/recordings/{cdrId}/files/{recordingId}/samples
Description
Retrieves audio samples of a specific recording (recordingId) of a call, for drawing the waveform of each side of the call. The VoiceAI Connect web interface uses these samples in the Recordings window.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
|
|
String |
The ID of one recording of the call. To get the IDs, use 1 to 256 characters: letters, digits, and the characters |
Query Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
Integer |
(Optional) The time between samples, in milliseconds. The minimum is 10. |
|
|
Integer |
(Optional) The maximum number of samples per channel. To stay under this limit, VoiceAI Connect increases the time between samples. |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
200: The waveform samples are successfully retrieved
-
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
Response Example
{
"requestedResolutionSeconds": 0.1,
"actualResolutionSeconds": 0.2,
"maxSamples": 1000,
"durationSeconds": 155.4,
"channels": [
{
"channel": 0,
"waveform": [
0.01,
0.12,
0.34
]
}
]
}
The resolution fields in the response (requestedResolutionSeconds and actualResolutionSeconds) are in seconds, although the resolutionMs query parameter is in milliseconds. A maxSamples value of 0 in the response means that there's no limit.
DELETE /api/v1/recordings/{cdrId}/files/{recordingId}
Description
Permanently deletes a specific recording (recordingId) of a call. The other recordings of the call aren't affected. VoiceAI Connect records each deletion in the Activity Log.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
|
|
String |
The ID of one recording of the call. To get the IDs, use 1 to 256 characters: letters, digits, and the characters |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
204: The recording is successfully deleted
-
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
You can't restore a deleted recording.
DELETE /api/v1/recordings/{cdrId}
Description
Permanently deletes all recordings of a specific call (cdrId) at once. VoiceAI Connect records each deletion in the Activity Log.
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
String |
The ID of the call's record (CDR), as shown in Call History. A call can have more than one recording. 1 to 128 characters: letters, digits, and the characters |
Request Body
None
Authentication
To use this API, define the application with the following policy:
Role: VAIC/CALLS/READ
For more information on assigning policies (roles and scopes) to users and applications, see Manage users.
Responses
Can return the following responses:
-
204: The recordings of the call are successfully deleted
-
401: Authentication failure (missing OAuth token or invalid token)
-
403: The application doesn't have permission for the requested operation
-
404: The call has no recordings, or the recording was deleted or has expired
You can't restore deleted recordings.