Menu

Record Voicemail Widget

Studio uses Widgets to represent various parts of Twilio's functionality that can then be stitched together in your Studio Flow to build out robust applications that require no coding on your part.

New to Twilio Studio? Check out our Getting Started guide!

The Record Voicemail Widget allows you to record voicemail audio from a caller and, optionally, transcribe it.

A rectangular widget titled "record_voicemail". Attached transition anchors read "recording complete," "no audio," and "hangup."

Optional configuration for Record Voicemail

While the Record Voicemail Widget doesn't require any configuration to work other than an entry transition, several optional configuration settings can help you customize the experience in your Studio Flow.

Name Description Supported Values Default
Stop recording after __ seconds of silence The number of seconds this Widget will wait when it detects silence from your caller before terminating the voicemail recording Any integer, representing seconds 5
Stop recording on keypress The phone key a user should press to stop recording their voicemail 0-9, #, * None
Max recording length Maximum length of a recording (in seconds) Any integer between 1 and 14,400, representing seconds 3600
Transcribe audio to text Turn this on to transcribe the caller's recording On / Off Off
Transcription callback URL Only available if transcription is enabled. The URL where Twilio should send the callback with transcription results Any accessible URL None
Trim Trim silence from the end of a recording Trim silence / Do not trim Trim silence
Play beep Play a beep to the caller before recording True / False True
Recording status callback The URL that should receive a callback with the recording, once complete Any valid URL or liquid template variable None

Studio does not automatically handle transcription processing, but you can specify the transcription callback URL and handle it yourself when the transcription is available. You may wish to use a Function to customize what happens once after a voicemail has been recorded.

Record Voicemail Transitions

These events trigger transitions from this Widget to another Widget in your Flow. For more information on working with Studio Transitions, see the Getting Started Guide.

Name Description
Recording complete The caller has finished recording their voicemail
No audio (applies only to legacy Twilio accounts) No voicemail is recorded due to silence from the caller
Hangup The caller terminated the call by hanging up

Record Voicemail Variables

If you wish to play back a voicemail later in the Studio Flow where you recorded the voicemail, you can access the audio file from a Say/Play Widget using the variable widgets.MY_WIDGET_NAME.RecordingUrl.

When the Record Voicemail Widget executes, it will have stored the following variables for use throughout your Studio Flow. When accessing these variables, make sure you replace MY_WIDGET_NAME with the name of your Widget. For more information on working with variables in Studio, see the Getting Started Guide.

Find definitions and examples for these variables at the Call Recording page.

Name Liquid Template Language
Account SID {{widgets.MY_WIDGET_NAME.AccountSid}}
API Version {{widgets.MY_WIDGET_NAME.ApiVersion}}
Call SID {{widgets.MY_WIDGET_NAME.CallSid}}
Call Status {{widgets.MY_WIDGET_NAME.CallStatus}}
Channels {{widgets.MY_WIDGET_NAME.Channels}}
Date Created {{widgets.MY_WIDGET_NAME.DateCreated}}
Date Updated {{widgets.MY_WIDGET_NAME.DateUpdated}}
Price {{widgets.MY_WIDGET_NAME.Price}}
Price Unit {{widgets.MY_WIDGET_NAME.PriceUnit}}
Recording URL {{widgets.MY_WIDGET_NAME.RecordingUrl}}
Recording Duration {{widgets.MY_WIDGET_NAME.RecordingDuration}}
SID {{widgets.MY_WIDGET_NAME.Sid}}
Source {{widgets.MY_WIDGET_NAME.Source}}
URI {{widgets.MY_WIDGET_NAME.Uri}}

Example: forward voicemail recordings

This Studio Flow takes an incoming phone call, prompts the caller to leave a voicemail, and then forwards the voicemail to a Twilio Function.

A Studio Flow that takes an incoming call, reads a greeting, records a voicemail, and sends the recording to a Function.

Learn more

Looking to learn how to record voicemails in Studio in a real-world example?

We can't wait to see what you build!

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more