How can I record a phone call with Twilio?

There are three ways to record phone calls made and received on your Twilio account:

<Record> in TwiML

You can add the <Record> verb to the TwiML file that Twilio fetches after we connect your phone call. Use this approach if you want to record one person talking. This is how you would build a voicemail system, or a phone poll that asked users to record something.

For more information, see our documentation on the <Record> verb in TwiML.

<Dial record=”record-from-answer”> or <Dial record=”record-from-ringing”> in TwiML

You can append either value mentioned above¬†when you’re connecting a call via the <Dial> verb. Use this method if you want to record both sides of a conversation. This is how you would record a forwarded call, or record a conference call.

For more information, see our documentation on the <Dial> verb in TwiML.

Record=”true” in Outgoing API

You can append the parameter "Record=true" when making the POST request for Twilio to make an outgoing call via the REST API. Use this if you want to record the entirety of an outgoing call.

For details on how to use this parameter and proper formatting guidelines, see our documentation on placing an outgoing call with the REST API.

How to fetch your recordings

A URL pointing to the recording can be sent back to your app as soon as the recording is complete– just provide a URL which contains code to receive a request from Twilio. (The parameters where you’d provide that URL depends on the type of recording you’re making, see the documentation for specifics).

Alternatively, you can fetch recordings from your account via a GET request to the “Recordings” resource.