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.
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:
Learn more about the benefits of dual-channel conference 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.
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.
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 to check whether any limitations of this feature apply to you.
To turn on dual-channel recording:
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:
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:
To install the plugin:
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.
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:
Key | Value |
---|---|
url | The 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. |
type | Static value: "VoiceRecording" . |
start_time | Flex 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. |
channels | The 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.