Skip to main content

<Record>

The <Record> verb records the voice of the caller and generates an audio file that can be downloaded via a URL.

<Record> Attributes

<Record> supports the following attributes that change its behavior:

AttributeAllowed ValuesDefault Value
actionrelative or absolute URLnone
methodGET, POSTPOST
timeoutinteger > 05 seconds
finishOnKeyany digit, #, or *1234567890*#
maxLengthinteger between 1 and 14400 (4 hours)3600 (1 hour)
playBeeptrue, falsetrue
historydisable, compact, fulldisable
recordingStatusCallbackrelative or absolute URLnone
recordingStatusCallbackMethodGET, POSTPOST
recordingStatusCallbackEventin-progress, completed, failedcompleted

action

The action attribute accepts a URL as its argument. The URL tells Voxtelesys where to make a POST or GET request after the recording ends.

If you do not provide an action URL, <Record> will finish and Voxtelesys will move on to the next VoXML verb in the document.

See additional parameters sent on the action webhook.

method

The method attribute accepts either GET or POST. This tells Voxtelesys whether to request the action URL via HTTP GET or POST, with POST as its default value.

timeout

The timeout attribute sets the number of seconds of silence for the <Record> verb to allow before ending the recording and setting its status to completed. Once the timeout is reached, the VoXML fetched from the action URL will be played, or the execution of the current VoXML will continue if no action URL is provided. The default value of timeout is 5 seconds. To disable this feature, set timeout to 0 seconds.

finishOnKey

The finishOnKey attribute accepts a list of characters that, when pressed, will end the recording, set its status to completed, and proceed with VoXML execution. More than one character can be specified. For example, if finishOnKey is set to 3#, both the digit "3" and the pound key "#" can be pressed to end the recording. By default, the value is 1234567890*#, which is all characters.

maxLength

The maxLength attribute is the maximum length of the recording, in seconds. The default is 3600 seconds (1 hour), the minimum is 1 second, and the maximum is 14400 seconds (4 hours). For example, if maxLength is set to 60 seconds, the recording will automatically end after 1 minute.

playBeep

The playBeep attribute accepts a boolean that determines whether to play a beep at the beginning of the recording. The default is to play the beep. If playBeep is set to false, then no beep will be played before the recording starts.

recordingStatusCallback

The recordingStatusCallback attribute accepts a relative or absolute URL. If a recordingStatusCallback is given, then an HTTP request will be sent to the specified URL with information for each recording status that is requested in recordingStatusCallbackEvent.

See additional parameters sent on the recordingStatus webhook.

recordingStatusCallbackMethod

The recordingStatusCallbackMethod attribute specifies which HTTP method to use when sending a callback to the recordingStatusCallback URL. The default is POST.

recordingStatusCallbackEvent

The recordingStatusCallbackEvent attribute accepts a list of events for which HTTP callbacks should be sent to recordingStatusCallback. To specify more than one event, separate each event name with a space. The default is completed, and the available events are:

  • in-progress: the recording has started.
  • completed: the recording has finished and has been uploaded.
  • failed: the recording failed to be uploaded and is not available.

history

The history attribute determines if the <Record> verb should be logged in the history array of the CDR. The default is to not log.

For <Record>, the compact and full values log the following payload to the history array respectively.

compact

{
"payload": {
"action": "/next"
}
}

full

{
"payload": {
"action": "/next",
"method": "POST",
"timeout": 5,
"finishOnKey": "#",
"method": "POST",
"maxLength": 60,
"playBeep": true,
"recordingStatusCallback": "http://example.com",
"recordingStatusCallbackMethod": "POST",
"recordingStatusCallbackEvent": "completed"
}
}

<Record> Webhooks

action Webhook

If you specify an action URL, Voxtelesys will send a webhook with the following additional parameters:

ParameterDescription
RecordingUrlThe URL of the recorded audio file
RecordingDurationThe duration of the audio recording.
DigitsThe DTMF characters that were used to end the recording, if applicable. If the recording ended on a hangup, then the value will instead be hangup.

recordingStatus Webhook

If you specify a recordingStatusCallback URL, Voxtelesys will send a webhook with the following additional parameters:

ParameterDescription
RecordingSidThe unique ID of the recording.
RecordingUrlThe URL of the recorded audio file
RecordingDurationThe duration of the audio recording.
RecordingStatusThe status of the recording. The possible values are in-progress, completed, and failed.
RecordingChannelsThe number of channels in the final recording file. For <Record>, only one channel is supported.
RecordingSourceThe method used to create this recording. For <Record>, this will always be RecordVerb.

The possible values for RecordingStatus are:

ValueDescription
in-progressThe recording has started.
completedThe recording has finished and has been uploaded.
failedThe recording failed to be uploaded and is not accessible.

<Record> Example

Simple Usage

<Response>
<Record/>
</Response>

Voicemail System

<Response>
<Say>Please leave a message at the beep and press "star" when finished.</Say>
<Record finishOnKey="*"/>
</Response>