Verbs

<Record>

Record the caller's audio and post the recording to your server.

Example

<Response>
  <Say>Please leave a message after the beep.</Say>
  <Record maxLength="120" timeout="5" playBeep="true"
          action="https://app.example.com/voicemail"
          transcribe="true" transcribeCallback="https://app.example.com/transcript"/>
</Response>

Attributes

Attribute Default Behaviour
action current document URL URL that receives the recording result; the returned VoiceML replaces the rest of the document. When omitted, the current document URL is requested again — a voicemail document then replays its greeting and records again — so set action to end the flow (a document that says goodbye and hangs up is enough). When the caller hangs up during the recording, the action URL still receives the result and the call ends.
method POST HTTP method for the action request: POST or GET.
maxLength 3600 Maximum recording length in seconds.
timeout 5 Silence timeout — seconds of quiet that ends the recording.
finishOnKey 1234567890*# Any digit in this set ends the recording; the digit is reported in the Digits callback field.
playBeep true Plays a 500 ms 800 Hz beep before recording starts.
trim trim-silence trim-silence removes leading/trailing silence; do-not-trim keeps the raw take.
recordingStatusCallback unset URL that receives recording lifecycle events: in-progress, completed, absent.
recordingStatusCallbackMethod POST HTTP method for recording lifecycle callbacks.
recordingStatusCallbackEvent completed Comma-separated list of the lifecycle events to deliver: in-progress, completed, absent.
transcribe false true runs the configured speech recognizer over the finished recording and posts the transcript to transcribeCallback. Only recordings longer than 2 and shorter than 120 seconds are transcribed, so keep maxLength under 120 when the transcript matters. Skipped silently when no recognizer is configured for the account.
transcribeCallback unset URL that receives the transcript once recognition finishes. Always posted with the POST method.
recordingConfigurationId unset Accepted for compatibility and ignored — no effect.

Callbacks

action request

Field Description
RecordingSid Unique identifier of the recording.
RecordingUrl URL where the recording audio can be fetched.
RecordingDuration Length of the recording in seconds.
Digits The key the caller pressed to end the recording, when finishOnKey ended it.

transcribeCallback request

Field Description
TranscriptionSid Unique identifier of the transcription.
TranscriptionText The transcript text.
TranscriptionStatus completed or failed.
TranscriptionUrl / url URL where the transcript can be fetched; sent under both spellings.
TranscriptionType Always machine.
RecordingSid / RecordingUrl The recording the transcript was made from.
CallSid Unique call identifier, included with the standard call parameters. ForwardedFrom is always present and empty unless the call was forwarded.

Every callback also carries the standard call parameters (CallSid, AccountSid, From, To, CallStatus) and is signed with your account's API key.