Skip to contentSkip to navigationSkip to topbar
On this page

Turn on dual-channel recording


(warning)

Public beta

Flex Insights (also known as Historical Reporting) is currently available as a public beta release and the information contained in the Flex Insights documentation is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as generally available. Public beta products are not covered by a Twilio SLA.

Any reference to "Historical Reporting," "Flex Insights API," "Flex Insights Historical Reporting," or "Flex Insights Historical Reporting API" in the Flex Insights documentation refers to Flex Insights.


Overview

overview page anchor

With dual-channel recording, you can get a recording of your call with two distinct channels: a customer (caller) channel and an agent channel.

Dual-channel recording has many advantages over single-channel (mono) recordings, including:

  • Each party's audio is separated into its own track, so it's easier to analyze the content of a recording using transcription and keyword analysis.
  • During playback, the quality of the voice recording is better. In addition, customer and agent talks are represented by different colors in the Flex Insights Player , which makes it easier to understand the call recording.
  • Call center managers and quality supervisors can focus on a single channel (just the customer or just the agent) when analyzing calls.

Learn more about the benefits of dual-channel conference recording(link takes you to an external page).

(warning)

Legal implications of call recording

If you choose to record voice or video 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 in the "Legal Considerations with Recording Voice and Video Communications" Help Center article(link takes you to an external page).

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.

You can enable dual-channel recording for Flex in the following ways:

With dual-channel recording, the left channel is the customer channel, and the right channel is the agent channel. The agent channel typically includes a single contact center agent. If you listen to the recording with stereo speakers, the left speaker plays the left (customer) channel and the right speaker plays the right (agent) channel.


Turn on Dual-channel Recording for Conference

turn-on-dual-channel-recording-for-conference page anchor

We recommend you use Flex's native feature for dual-channel conference recording. When you turn on this feature, all new Conference Recordings are recorded in dual-channel format by default. The first channel of the Recording's media file contains the audio of the first Participant that joined the Conference. The second channel of the media file contains all other audio from the call.

Depending on your environment configuration or which region you operate in, dual-channel recording may not function as expected in your Flex instance. Make sure to review the Changelog entry(link takes you to an external page) to check whether any limitations of this feature apply to you.

To turn on dual-channel recording:

  1. Open Twilio Console.
  2. On the Flex Voice(link takes you to an external page) page, turn on the Call Recording toggle.
  3. On the Voice Settings(link takes you to an external page) page, turn on the Dual-channel Recording for Conference toggle.

Turn on authentication for media URLs

turn-on-authentication-for-media-urls page anchor

For the security of your recordings, consider turning on HTTP authentication on the Recording API endpoint. Your recording URLs are visible to any service that consumes TaskRouter events, including third-party applications installed using Twilio Marketplace Add-ons. Because of this, securing the endpoint is a good practice, unless your infrastructure requires this endpoint to be unsecured.

To turn on HTTP authentication:

  1. In Twilio Console, open the Voice Settings(link takes you to an external page) page.
  2. Turn on the Enforce HTTP Auth on Media URLs setting.

Install the Dual Channel Call Recording plugin

install-the-dual-channel-call-recording-plugin page anchor

You may need to use the pre-built Dual Channel Call Recording plugin instead of the Flex's native feature if any of the following apply to you:

  • You have an environment configuration that prevents you from using the native feature. See the Changelog entry(link takes you to an external page) for a list of limitations.
  • You operate in a region outside the US.
  • You want Flex to create a new recording when a call is transferred to another agent. The native feature records the entire Conference, including any transfers, as one recording.

To install the plugin:

  1. Go to the Plugin Library page for the Dual Channel Call Recording(link takes you to an external page) plugin.
  2. Click Install .
  • If you previously turned on Call Recording(link takes you to an external page) in the Flex Voice settings, turn it off before installing the plugin. Otherwise, you might get duplicate recordings.
  • If you've installed this plugin and perform a warm or cold transfer, two recordings may show. As a workaround, modify your plugin configuration to record from the customer perspective instead of the worker perspective, as shown in image below. Also, make sure you're using the latest version of the plugin.
    Shows how to set the channel attribute to customer.

Create a custom implementation

create-a-custom-implementation page anchor

If the available no-code options don't provide the solution you need, you may choose to create a custom implementation for dual-channel recording. In this case, you need to make sure your configuration can pass Flex Insights media metadata from Task attributes.

For Flex Insights to correctly process the dual-channel recording, you need to modify the Send To Flex widget and add some more info to its attributes. Flex adds the content of these attributes to the Task attributes when it creates the Task.

For complete information about required and optional configurations for this widget, see Send to Flex Widget.

Modifying Task attributes to include media metadata

modifying-task-attributes-to-include-media-metadata page anchor

By default, the Attributes field looks like this:

1
{
2
"type": "inbound",
3
"name": "{{trigger.call.From}}"
4
}

You need to modify it to add a conversations JSON object that contains the recorded media metadata.

1
{
2
"type": "inbound",
3
"name": "{{trigger.call.From}}",
4
"conversations": {
5
"media": [
6
{
7
"url": "https://api.twilio.com/2010-04-01/Accounts/{{widgets.CallRecording.AccountSid}}/Recordings/{{widgets.CallRecording.Sid}}",
8
"type": "VoiceRecording",
9
"start_time": "{{widgets.CallRecording.StartTime}}",
10
"channels": [ "customer", "others" ]
11
}
12
]
13
}
14
}

The media object requires the following properties:

KeyValue
urlThe URL of the recording. You don't need to append the ".wav" suffix.

Make sure you enter the correct widget name. This example uses CallRecording.

Note: Variable names are case-sensitive.
typeStatic value: "VoiceRecording".
start_timeFlex needs to know the start time of the recording to correctly calculate segment offsets in the conversation. The start time of the recording is accessible in liquid via the {{widgets.CallRecording.StartTime}} key. The start time should be defined in ISO 8601 format.
channelsThe order of channels in the recording.

Static value: ["customer", "others"].

For inbound calls, the first one is the caller (customer) and the second one is the rest of the Flex conference, e.g. agent.

Note: Providing incorrect values in the media object could introduce inconsistencies to metrics like conversation talk times in Flex Insights.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.