AWS Contact Center

Pause and resume call recording with a new API in Amazon Connect

Often, companies choose to record contact center calls for agent compliance, call quality, and training purposes. With Amazon Connect, call recordings are stored into an Amazon S3 bucket, which companies can view later to use for any of the above. However, when an agent handles sensitive customer information it is common practice to not record this portion of the call.

With today’s launch of Amazon Connect’s pause and resume call recording API, call center operators and agents can help support compliance with regulatory standards and by not storing sensitive data as part of a call recording. This blog post walks you through the capabilities of the new API. We will also provide an example of how to expose this pause and resume recording feature to agents in a contact control panel (CCP).

Example overview

Walkthrough

  1. The customer calls the business and is prompted to choose if call should be recorded.
  2. The customer is put into a queue and connected to an agent.
  3. The agent can start, pause, resume, and stop the call recording from the custom contact control panel by pressing buttons that trigger an Amazon API Gateway endpoint. This invokes an AWS Lambda function.
  4. The Lambda function processes the request and calls the Amazon Connect API to start, pause, resume, or stop the call recording.

 

Note: All resources must be created in US East (N. Virginia) Region.

Prerequisites

Deploying this example using an AWS CloudFormation template

This AWS CloudFormation stack creates an Amazon S3 bucket with the appropriate agent desktop and CCP file. A CloudFront distribution to serve the files from S3, an API Gateway deployment, and a Lambda function to start, pause, resume, or stop the call recording.


To deploy this AWS CloudFormation stack:

  1. Sign in to AWS CloudFormation in US East Region.
  2. Launch the AWS CloudFormation stack here: launch stack button.
  3. Enter the name you want to give under Stack Name, this has to be unique.
  4. Enter the name of a new S3 bucket that the template will create. This is where you will be storing the custom agent desktop files in Amazon CloudFront.
  5. Your entries should look similar to below picture.
  6. Click on the check box “I acknowledge that AWS CloudFormation might create IAM resources.”
  7. Click on the “Next” button.
  8. AWS CloudFormation template takes 15-30 minutes to create all the resources and should show the status as “CREATE_COMPLETE”. You might have to wait for another 15-20 min for Amazon CloudFront to complete its deployment of the agent desktop after the status “CREATE_COMPLETE”.

Deploy a sample contact flow to record calls

This contact flow asks you to press 1 to record calls or press 2 to not record the call.

  1. Download the contact flow JSON file to your local drive.
  2. Log in to your Amazon Connect instance as an administrator that can create and update contact flow.
  3. Choose Routing by clicking on the three arrowheads icon on the left bar and then click contact flows.
  4. Click on the Create contact flow button.
  5. Click on the drop-down arrow on the right and choose Import flow (beta).
  6. Click on Select and choose the JSON contact flow file that you downloaded.
  7. Name your contact flow and click Publish, it should look like the following.
  8. Assign this contact flow to a phone number under Routing, Phone number.

Launching the deployed agent desktop for Amazon Connect

  1. Continue on your AWS CloudFormation stack that you just created, choose “Outputs”.
  2. Click on the “Value” for “CloudfrontEndpoint”, which is a URL to your custom agent desktop.
  3. Add the domain portion of the URL in “Value” for “CloudfrontEndpoint” to your Amazon Connect instance following this instruction.
  4. The “Outputs” should look like the following:
  5. After launching the URL, you should see the custom agent desktop like this:
  6. Log in to your Amazon Connect instance as a user that can take call.

Testing the start/stop, pause/resume call recording API

The following API is used in the example

Two scenarios to show case all four call recording APIs

  • Pause and resume call recording when call recording has already started.
  • Start call recording when call recording has not started. Then stop call recording to disable call recording for the rest of the call.

Pause and resume call recording when call recording has already started

  1. Call into the phone number that has the above contact flow assigned.
  2. Press 1 to enable call recording and enter into queue.
  3. Have agent login to take the call.
  4. You should see the “Recording status” light is flashing red.
  5. Say something between the agent and caller so it will be recorded.
  6. Pause the recording using the button.
  7. Say something between agent and caller, this part of the conversation is not recorded.
  8. Resume the recording using the button
  9. Say something to wrap up the call as this part of the conversation should be recorded.
  10. End the call.
  11. Go to Amazon Connect console screen and go under Metrics and Quality -> Contact Search.
  12. Click on search to find your call and click on the playback button. You should hear hear silence where the recording was paused.

Start recording after taking the call

  1. Call into the phone number that has the above contact flow assigned.
  2. Press 2 to not record the call and enter into queue.
  3. Have agent login to take the call.
  4. You should see the “Recording status” light is not flashing red.
  5. Say something between the agent and caller and this part of the conversation is not recorded.
  6. Start the recording using the button.
  7. Say something between the agent and caller and this part of the conversation is recorded.
  8. Stop the recording using the Stop recording button.
  9. Say something between the agent and caller and this part of the conversation is not recorded.
  10. End the call.
  11. Go to Amazon Connect console screen and go under Metrics and Quality -> Contact Search.
  12. Click on search to find your call and click on the playback button for recording to hear the expected results. You should hear the portion of the recording where you start and stop it. You should not hear any silent before or after.

Conclusion

In this post you learned about the recording APIs available in Amazon Connect and launched an example stack using them. The example code used in this blog is posted in this repository for reference. You can now add call recording control logic into your business applications as agent perform certain tasks that require the call recording to pause and resume upon completion.