> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vobiz.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Record XML Element – Call & Conference Recording | Vobiz

> Record calls or conferences with the Vobiz Record element and get a URL at your callback endpoint. Configurable format, max length, beep, and transcription.

The Record element records a call or conference and posts the URL of the recording to an action URL.

## Attributes

**`action`** *(string)* *Callback-retry configurable*

The URL to which recording parameters are sent. See the parameters table below for details. This attribute is required.

**Allowed values:** A fully qualified URL

**`method`** *(string)* *Callback-retry configurable*
HTTP method used to send the recording result to the action URL.

**Allowed values:** GET, POST

Defaults to POST.

**`fileFormat`** *(string)*
Specifies the file format of the recording.

**Allowed values:** mp3, wav

Defaults to mp3.

**`redirect`** *(boolean)*
If set to `true`, the action URL is not fetched; instead, the XML response is retrieved and executed after the recording completes. If set to `false`, the action URL is fetched and the response is executed immediately, without waiting for the XML response.

**Allowed values:** true, false

Defaults to false.

**`timeout`** *(integer)*
Maximum silence duration in seconds before the recording ends. The timeout does not set a total duration limit on the recording. For recordings that end due to timeout, the `RecordingEndReason` parameter sent to the action URL is `RecordingTimeout`.

**Allowed values:** integer > 0

Defaults to 60.

**`maxLength`** *(integer)*
Maximum length of the recording in seconds. When this limit is reached, the recording ends. For recordings that end due to the `maxLength` limit, the `RecordingEndReason` sent to the action URL is `maxLength`.

**Allowed values:** integer > 0

Defaults to 60.

**`playBeep`** *(boolean)*
If set to `true`, a beep plays before the recording begins.

**Allowed values:** true, false

Defaults to true.

**`finishOnKey`** *(string)*
Stops the recording when this key is pressed. For recordings that end this way, the `RecordingEndReason` sent to the action URL is `FinishedOnKey`.

**Allowed values:** Any digit, #, \*

Defaults to 1234567890\*#.

**`recordSession`** *(boolean)*
If set to `true`, the entire session is recorded, including multiple Play or Speak elements. The recording ends when the call is hung up. For recordings that end this way, the `RecordingEndReason` sent to the action URL is `HungUp`.

**Allowed values:** true, false

Defaults to false.

**`startOnDialAnswer`** *(boolean)*
If set to `true`, the recording starts when the call is answered. Use this for outbound calls where the Record element is nested inside a Dial element.

**Allowed values:** true, false

Defaults to false.

**`transcriptionType`** *(string)*
Specifies the type of transcription service to use.

**Allowed values:** auto, hybrid

Defaults to auto.

**Note:** Transcription is available at an additional cost. Refer to the pricing page for details.

* **auto:** Transcribes the recording using the default Vobiz transcription service.

  * **hybrid:** Transcribes the recording using the Vobiz transcription service for the most common languages and a third-party provider for all other languages.

**`transcriptionUrl`** *(string)* *Callback-retry configurable*
A URL to which the transcription is sent.

**Allowed values:** A fully qualified URL

**`transcriptionMethod`** *(string)* *Callback-retry configurable*
Specifies the HTTP method to use when requesting the transcriptionUrl.

**Allowed values:** GET, POST

Defaults to POST.

**`callbackUrl`** *(string)* *Callback-retry configurable*
A URL to which parameters are sent when the recording ends. Similar to the action URL, but the recording file is ready by the time this callback is made. The parameters sent to the callback URL are the same as those sent to the action URL.

**Allowed values:** A fully qualified URL

**`callbackMethod`** *(string)* *Callback-retry configurable*
Specifies the HTTP method to use when requesting the callbackUrl.

**Allowed values:** GET, POST

Defaults to POST.

## Parameters sent to the action URL

\| `RecordUrl` |
\| string |
\| The URL of the recording file. After receiving this parameter, you may need to wait a few seconds for the file to be available for download. Use the `callbackUrl` attribute to receive a notification once the file is ready. |
\| `RecordingDuration` |
\| integer |
\| The duration of the recording in seconds. |
\| `RecordingDurationMs` |
\| integer |
\| The duration of the recording in milliseconds. |
\| `RecordingStartMs` |
\| integer |
\| The timestamp when the recording started, in milliseconds. |
\| `RecordingEndMs` |
\| integer |
\| The timestamp when the recording ended, in milliseconds. |
\| `RecordingID` |
\| string |
\| A unique identifier for the recording. |
\| `RecordingEndReason` |
\| string |
The reason the recording ended. Possible values are:

* **RecordingTimeout:** The recording ended due to timeout.

  * **maxLength:** The recording reached the `maxLength` limit.

  * **FinishedOnKey:** The recording ended when `finishOnKey` was pressed.

  * **HungUp:** The recording ended when the call was hung up.

## Parameters sent to the callback URL

The parameters sent to the callback URL are the same as those sent to the action URL.

## Parameters sent to the transcription URL

\| `transcription` |
\| string |
\| The text of the transcription. |
\| `transcription_id` |
\| string |
\| A unique identifier for the transcription. |
\| `transcription_url` |
\| string |
\| The URL of the transcription file. |
\| `recording_id` |
\| string |
\| A unique identifier for the recording. |

## Examples

### Record a voicemail message

Speak a prompt, then record until the caller stays silent, presses a key, or hits `maxLength`. See [Record a voicemail](/xml/record/record-a-voicemail).

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Speak>Please leave a message after the beep. Press pound when finished.</Speak>
    <Record action="https://yourapp.com/voicemail" method="POST"
            maxLength="120" timeout="10" finishOnKey="#" playBeep="true"
            fileFormat="mp3"/>
    <Speak>Thank you. Goodbye.</Speak>
    <Hangup/>
</Response>
```

### Record the entire call session

Set `recordSession="true"` to capture the full call (including subsequent `Speak`, `Play`, and bridged audio). The recording ends when the call hangs up.

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Record recordSession="true" action="https://yourapp.com/recording" callbackUrl="https://yourapp.com/recording-ready"/>
    <Speak>This call is now being recorded for quality assurance.</Speak>
    <Dial><Number>14155551234</Number></Dial>
</Response>
```

### Record the answered leg of an outbound dial

Nest `Record` with `startOnDialAnswer="true"` so recording begins only once the called party answers.

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number>14155551234</Number>
    </Dial>
    <Record startOnDialAnswer="true" maxLength="600" action="https://yourapp.com/recording"/>
</Response>
```

## Webhook payload sent to the action URL

When the recording ends, Vobiz posts the standard call parameters plus the recording parameters. Note that the file may take a few seconds to become downloadable - use `callbackUrl` for a notification once the file is ready.

```http Recording finished on key theme={null}
POST /voicemail HTTP/1.1
Host: yourapp.com
Content-Type: application/x-www-form-urlencoded

CallUUID=xyz789&From=14155551234&To=14155559999&RecordUrl=https://recordings.vobiz.ai/rec-9a0e.mp3&RecordingID=9a0e0208&RecordingDuration=42&RecordingDurationMs=42120&RecordingStartMs=1716112335000&RecordingEndMs=1716112377120&RecordingEndReason=FinishedOnKey
```

## Edge cases and tips

* **`timeout` vs `maxLength`.** `timeout` ends the recording after a stretch of silence (default 60 s) and is *not* a total cap. `maxLength` is the hard ceiling on recording length (default 60 s). Set `maxLength` generously for voicemails so callers are not cut off mid-sentence. The `RecordingEndReason` parameter tells you which limit fired (`RecordingTimeout`, `maxLength`, `FinishedOnKey`, or `HungUp`).
* **`action` is required.** You must set an `action` URL to receive the recording. The recording file URL arrives in `RecordUrl`.
* **File availability lag.** After `RecordUrl` arrives at the action URL, the file may not be downloadable for a few seconds. Use `callbackUrl` (fired when the file is ready) to trigger downloads or processing.
* **`finishOnKey` defaults to all keys.** By default any of `1234567890*#` stops the recording. Narrow it (for example `finishOnKey="#"`) if callers might press other digits during their message.
* **`recordSession` vs a standalone `Record`.** Use `recordSession="true"` to capture the whole call for compliance; use a standalone `Record` element to capture a single message (voicemail) and then continue the flow.
* **Compliance.** Announce recording before it starts where required by law (for example, two-party-consent jurisdictions and TRAI rules in India). Use a `Speak`/`Play` before `Record` or set `playBeep="true"`.
