Skip to main content

Record

tip

Bandwidth will keep recordings for up to 30 days. After 30 days the recordings will be deleted from Bandwidth's servers.

The Record verb allows a segment of audio to be recorded during a call. At the end of the recording, a Record Complete event is generated.

This verb should probably be used if you are building a voice mail system or conference member introduction. For different use cases, you might want to take a look at StartRecording.

For a more detailed view of Recording, check the Recording Guide.

Text Content

There is no text content available to be set for the <Record> verb.

Attributes

AttributeDescription
recordCompleteUrl(optional) URL to send the Record Complete event to once the recording has ended. Accepts BXML, and may be a relative URL. This callback will not be sent if the recording ended due to the call hanging up.
recordCompleteMethod(optional) The HTTP method to use for the request to recordCompleteUrl. GET or POST. Default value is POST.
recordCompleteFallbackUrl(optional) A fallback url which, if provided, will be used to retry the Record Complete callback delivery in case recordCompleteUrl fails to respond.
recordCompleteFallbackMethod(optional) The HTTP method to use to deliver the Record Complete callback to recordCompleteFallbackUrl. GET or POST. Default value is POST.
recordingAvailableUrl(optional) URL to send the Recording Available event to once it has been processed. Does not accept BXML. May be a relative URL.
recordingAvailableMethod(optional) The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default value is POST.
transcribe(optional) A boolean value to indicate that recording should be transcribed. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. Default is false.
detectLanguage(optional) A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. If transcribe is not set to true, this flag is ignored. Default is false.
transcriptionAvailableUrl(optional) URL to send the Transcription Available event to once it has been processed. Does not accept BXML. May be a relative URL.
transcriptionAvailableMethod(optional) The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default value is POST.
username(optional) The username to send in the HTTP request to recordCompleteUrl, recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
password(optional) The password to send in the HTTP request to recordCompleteUrl, recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
fallbackUsername(optional) The username to send in the HTTP request to recordCompleteFallbackUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
fallbackPassword(optional) The password to send in the HTTP request to recordCompleteFallbackUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
tag(optional) A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared.

May be cleared by setting tag=""

Max length 256 characters.
terminatingDigits(optional) When pressed, this digit will terminate the recording. Default value is “#”. This feature can be disabed with "".
maxDuration(optional) Maximum length of recording (in seconds). Max 10800 (3 hours). Default value is 60.
silenceTimeout(optional) Length of silence after which to end the recording (in seconds). Max is equivalent to the maximum maxDuration value. Default value is 0, which means no timeout.
fileFormat(optional) The audio format that the recording will be saved as: mp3 or wav. Default value is wav.
recordingName(optional) A name to identify this recording. It will be returned in the Recording Available or Conference Recording Available event if specified.

To stop the recording, the user can press one of the terminatingDigits or stop talking for silenceTimeout seconds.

A maxDuration can be specified to stop recording after a specified period of time.

If the recordCompleteUrl attribute is specified, then the Recording Complete event is sent to the recordCompleteUrl and the BXML returned by that callback is executed next and all verbs following the <Record> tag will be ignored. If no recordCompleteUrl is specified, execution of verbs following the <Record> tag continues. The recording will still be available on the server.

If the recordingAvailableUrl attribute is specified, then the Recording Available event is sent to the URL once the recording is available for download. BXML returned in response to this callback will be ignored.

If the transcriptionAvailableUrl attribute is specified, then the Transcription Available event is sent to the URL once the transcription is available for download. BXML returned in response to this callback will be ignored.

Webhooks Received

WebhooksCan reply with more BXML
Record CompleteYes
Recording AvailableNo
Transcription AvailableNo

Examples

Record a Message

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence voice="bridget">Please leave your message after the beep.</SpeakSentence>
<PlayAudio>http://audio.url/beep.wav</PlayAudio>
<Record recordCompleteUrl="https://myapp.com/nextBXML" maxDuration="10"/>
<!-- Any verbs after this point would be replaced by those returned by the recordCompleteUrl -->
</Response>

Record with Transcription

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence>Please say your name</SpeakSentence>
<Record recordCompleteUrl="https://record.url.server/record" transcribe="true" transcriptionAvailableUrl="https://transcription.url.server/transcribe/"/>
</Response>