> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# Call recording

Voximplant allows users to record an audio or video call.

To start a call record, use the [call.record()](https://voximplant.com/docs/references/voxengine/call#record) method in your scenario. The record is saved in your Voximplant cloud or your [custom S3-compatible storage](/solutions/s3).

If you need to record video as well as audio, set the **video** parameter of the [call.record()](https://voximplant.com/docs/references/voxengine/call#record) method to **true**.

Refer to the code example below to understand how it works:

```javascript title="Record an audio or video call"
// start recording a call
call.record();
// start recording a call with video
call.record({ video: true });

```

Optionally, you can use [the Recorder module](https://voximplant.com/docs/references/voxengine/recorder) to record a call. However, the Recorder module supports only audio recording.

```javascript title="Recorder module example"
require(Modules.Recorder);

const recorder = VoxEngine.createRecorder();
call.sendMediaTo(recorder);

```

## Recorder parameters

You can pass one or several parameters to the [call.record()](https://voximplant.com/docs/references/voxengine/call#record) method or to the [Recorder module](https://voximplant.com/docs/references/voxengine/recorder) to customize your records.

Here are the most common parameters to customize:

* **expire**: specifies how long to store the record in the cloud. Can be set to 3 or 6 months, 1, 2, or 3 years
* **contentDispositionFilename**: specifies the record filename in the cloud
* **hd\_audio**: if true, the record is 192kbps/48KHz. The default value is 32kbps/8KHz
* **lossless**: if true, saves the record in the flac format
* **stereo**: specifies whether the record is stereo or mono

You can find the complete recorder parameters [here](https://voximplant.com/docs/references/voxengine/recorderparameters).

```javascript title="Pass parameters to a recorder"
// Example for the record method of the Call class function
call.record({ hd_audio: true });
// Example for the Recorder class
require(Modules.Recorder);
// ...
const recorder = VoxEngine.createRecorder({ hd_audio: true });
call.sendMediaTo(recorder);

```

<Info title="Recording format">
  Video calls can be recorded in the MP4 (H.264 codec) or in the WEBM (VP8 codec) formats. It depends on the SDKs that are making the call. If you are using the Web SDK, you can set the optional [H264first parameter](https://voximplant.com/docs/references/websdk/voximplant/callsettings#h264first) to **true**, so the MP4 format gets higher priority.
</Info>

## AWS S3-compatible storage

By default, all records are saved in the Voximplant cloud storage. You can use your own AWS S3-compatible storage to store your records. To do so, follow the [S3-compatible storage](/solutions/s3) integration guide.

## Recorder errors

When you try to access the existing records, you can get the following errors:

\| **Error** | **Description** |
\| 403 | The link to the record is broken (Invalid URI) |
\| 401 | Authorization failed |
\| 416 | Requested range not satisfiable |
\| 404 | File not found (e.g. the file is deleted) |

When you try to access the record in the S3-compatible storage, you can get another S3-specific errors.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="I recorded a call. How do I retrieve the record?">
    Subscribe to the [RecordStarted](https://voximplant.com/docs/references/voxengine/callevents#recordstarted) event and copy the **e.url** property to get the link to your record.
  </Accordion>
</AccordionGroup>