Recording a Phone Call with Twilio

There are multiple ways to record phone calls made and received on your Twilio project:

Record a Two-way Call using the <Dial> TwiML Verb

Use this method if you want to record both sides of a conversation. This is how you would record a forwarded call, or any type of call based on <Dial>. For mono-channel recordings (both legs of the call on one channel), use "record-from-answer" or "record-from-ringing".  For dual-channel recordings (two legs of the call each in separate stereo channels), use "record-from-answer-dual" or "record-from-ringing-dual".

If you provide a recordingStatusCallback parameter, you will receive a webhook with all of the recording's details, as soon as the recording file is available for access. For more information, see our documentation on the <Dial> verb in TwiML.

Record an Outbound Call using Record=”true” in a REST API Request

You can append the parameter "Record=true" when making a POST request to tell Twilio to record an outgoing call via the REST API. By default, the recording will be single-channel (mono). For dual-channel recordings (two legs of the call each in separate stereo channels), append the parameter "RecordingChannels=dual".

If you provide a recordingStatusCallback parameter, you will receive a webhook with all of the recording's details, as soon as the recording file is available for access. For more information, see our documentation on placing an outgoing call with the REST API.

Record calls on your Elastic SIP trunk

Your Elastic SIP trunk can be configured to record all inbound and outbound calls that go over the trunk. Here are the steps to configure recording on your Trunk:

  1. Login to your account at www.twilio.com/console.
  2. Click Elastic SIP Trunking.
  3. Click Trunks, and then select the desired trunk to configure.
  4. From the "General" tab, select the desired Call Recording option, and then click Save.
    • Do not Record
    • Record from Ringing
    • Record from Answer

Record a Conference using <Conference record=”record-from-start”> TwiML

Use the attribute above if you want to record the entirety of your conference call. This type of recording will start only when a conference is bridged, i.e. when participants are able to talk to each other. If you’d like to start your recording as soon as the <Dial> starts, use one of the <Dial> recording parameters noted above. Note that it is possible to specify record on <Dial> as well as on <Conference>, which would incur two recording charges, and return two separate recordings.

If you provide a recordingStatusCallback parameter, you will receive a webhook with all of the recording's details, as soon as the recording file is available for access. For more information, see our documentation on the <Conference> noun in TwiML.

Record a One-way Call using the <Record> TwiML Verb

You can record a one-way (one party) call by using the <Record> verb in your TwiML file. This command is used to record one person talking, like in the case of a voicemail inbox, or for a phone poll or automated survey.

Make sure to specify an action url on the <Record>. Failure to do so will result in looping. If you also provide a recordingStatusCallback parameter, you will receive a webhook with all the recording's details, as soon as the recording file is available for access. For more information, see our documentation on the <Record> verb in TwiML.

How to view your recordings

You can view all your recordings in the Recordings Log section of the Console. You can also fetch recordings from your project via a GET request to the “Recordings” resource.

Related Topics

Have more questions? Submit a request
Powered by Zendesk