SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How to Export Twilio Call Recordings with Associated Phone Numbers

Overview

Twilio users may need to export call recordings for their accounts or subaccounts, including metadata such as the originating and destination phone numbers. This article explains the available methods for exporting call recordings and retrieving associated phone numbers, suitable for both small and large volumes of recordings.

 

Environment

Twilio Console

 

What You Need To Know

Export Options

1. Using the Twilio REST API

  • The Twilio Recordings API allows you to list and download all call recordings for your account or subaccount.
  • Each recording resource includes a call_sid. You can use this call_sid with the Twilio Calls API to fetch call details, including the from and to phone numbers.
  • For bulk exports, you may need to write a script that:
    • Loops through all recordings,
    • Retrieves the associated call details,
    • Compiles the data (recording URLs, phone numbers, timestamps, etc.) into a CSV or other format.

Example Workflow

  1. List all recordings using the Recordings API.
  2. For each recording, use the call_sid to fetch call details.
  3. Download the recording file and save relevant metadata.

Tip: Twilio provides sample scripts and API documentation to help automate this process.

 

2. Manual Download via Twilio Console

  • For a small number of recordings, you can manually download files from the Twilio Console Recordings page.
  • Note: The Console does not support bulk export with phone number metadata; this must be done via the API.

 

Frequently Asked Questions

Can I export recordings for old calls?

Yes, as long as the recordings have not been deleted and are still available in your account, you can export both recent and older call recordings using the API.

Is there a way to include phone numbers in the export?

Yes. Use the call_sid from each recording to fetch the call details, which include the from and to phone numbers.

Is there a sample script available?

Twilio provides API documentation and sample code. If you need a specific example, you can request one from Twilio Support.

 

Conclusion

To export call recordings with phone numbers:

  • Use the Twilio REST API for bulk exports and metadata retrieval.
  • Use the Console for manual downloads of a small number of files.
  • For automation, combine the Recordings and Calls APIs in a script.

Below you will find references to useful documents:

If you need further assistance or a sample script, reach out to Twilio Support.

Have more questions? Submit a request
Powered by Zendesk