Call Recording with Twilio Flex

Although call recording is not enabled in Flex by default, users have a number of options for adding and customizing call recording features. This guide gives examples of how users can enable call recording for all calls or enable on-demand recording from the Flex GUI.

Notice: Links to call recordings will automatically be appended to a task’s attributes. Any applications (including Twilio Marketplace add-ons) that consume the TaskRouter event feed have visibility into these task attributes, including the URL for any call recordings.

Record Calls

You can record incoming calls with Flex using the Actions Framework. In only a few lines of code, you can add commands to record the agent-leg of any conference call. Here’s an example of what this code might look like in your plugin:

flex.Actions.addListener("beforeAcceptTask", (payload) => {
payload.conferenceOptions.record = 'true';
payload.conferenceOptions.recordingStatusCallback = '';

This example tells Flex to modify the conferenceOptions before a task is accepted.

  • ...conferenceOptions.record = 'true' tells us to record the agent-leg of the conference call.
  • ...conferenceOptions.recordingStatusCallback = '...' tells us to reach out or call back to the url given when the call recording file has been processed, and is available for you.

For help adding this code to your hosted Flex instance, please see Creating Plugins for Twilio Flex.

Start and Stop Recording

Using the Recording Controls API, you can begin, pause, and stop recording a call at any time with a simple API request. We've created a guide to walk users through adding a button to the Flex UI to control call recording here: How to Control Recordings with Twilio Flex.

For more information on controlling call recordings, please see Getting Started with Call Recording Controls.

View, Download, and Delete Call Recordings

Call recordings are accessible via the Recordings Log section of the Console, and the REST API. You can see a list of your recordings, download them, and delete them from either of these resources. Recording files are kept in Twilio’s cloud storage until you delete them.

For more information, please see Downloading and Deleting Twilio Call Recordings

Legal Implications of Call Recording

If you choose to record calls, you need to comply with certain laws and regulations, including those regarding obtaining consent to record (such as California’s Invasion of Privacy Act and similar laws in other jurisdictions). Additional information on the legal implications of call recording can be found here.

Notice: Twilio recommends that you consult with your legal counsel to make sure that you are complying with all applicable laws in connection with communications you record or store using Twilio.

Related Topics

Have more questions? Submit a request
Powered by Zendesk