Quantiphi Real-Time Call Analytics on the AWS Cloud

Quick Start Reference Deployment

QS

March 2021
Sanchit Jain, Quantiphi
Shivansh Singh, AWS Quick Start team

Visit our GitHub repository for source files and to post feedback, report bugs, or submit feature ideas for this Quick Start.

This Quick Start was created by Quantiphi in collaboration with Amazon Web Services (AWS). Quick Starts are automated reference deployments that use AWS CloudFormation templates to deploy key technologies on AWS, following AWS best practices.

Overview

This Quick Start reference deployment guide provides step-by-step instructions for deploying Quantiphi Real-Time Call Analytics on the AWS Cloud.

This Quick Start sets up Quantiphi Real-Time Call Analytics, used by organizations to improve and optimize remote support. It provides a dashboard for support agents that displays live call transcripts, keywords, and call metadata.

Amazon may share user-deployment information with the AWS Partner that collaborated with AWS on the Quick Start.

Quantiphi Real-Time Call Analytics on AWS

Quantiphi Real-Time Call Analytics on AWS transcribes live calls coming from an integrated PBX system. The transcription, and keywords and entities extracted from it, are displayed live to call center agents in a custom user interface. Entities include customer name, date of birth, customer ID, and callback phone number. The deployment also performs a post-call analysis to summarize a call. Agents can replay calls, download transcriptions and keywords, and jump to sections of a recording by choosing keywords. Call transcripts, keywords, and metadata are stored in Amazon DynamoDB tables, and can be used as resources later to perform further analytics.

AWS costs

You are responsible for the cost of the AWS services and any third-party licenses used while running this Quick Start. There is no additional cost for using the Quick Start.

The AWS CloudFormation templates for Quick Starts include configuration parameters that you can customize. Some of the settings, such as the instance type, affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you use. Prices are subject to change.

After you deploy the Quick Start, create AWS Cost and Usage Reports to deliver billing metrics to an Amazon Simple Storage Service (Amazon S3) bucket in your account. These reports provide cost estimates based on usage throughout each month and aggregate the data at the end of the month. For more information, see What are AWS Cost and Usage Reports?

Software licenses

This Quick Start does not require a license to deploy Quantiphi Real-Time Call Analytics.

Architecture

Deploying this Quick Start with default parameters builds the following Quantiphi Real-Time Call Analytics environment in the AWS Cloud.

Architecture
Figure 1. Quick Start architecture for Quantiphi Real-Time Call Analytics on AWS

As shown in the Figure 1, the Quick Start sets up the following:

  • Amazon Chime Voice Connector to receive calls from user private branch exchange (PBX) software.

  • Kinesis Video Streams to store call streams.

  • Amazon EventBridge to write messages to Amazon Simple Queue Service (Amazon SQS) queues when call begins and ends.

  • Amazon SQS queues to store messages that are read by AWS Lambda functions.

  • In the transcription queue:

    • AWS Lambda function to read audio streams from Kinesis Video Streams and initiate transcription.

    • Amazon Transcribe to transcribe call streams.

    • Amazon DynamoDB table to store transcriptions.

    • Amazon Simple Storage Service (Amazon S3) bucket to store MP3 files of call streams.

  • In the keyword-extraction queue:

    • AWS Lambda function to extract keywords and publish them to the Quantiphi web application.

    • DynamoDB table to store keywords.

    • API Gateway to manage access to the Quantiphi web application.

  • In the postcall metadata-extraction queue:

    • AWS Lambda function to extract metadata and publish it to the Quantiphi web application.

    • Amazon Comprehend to extract metadata.

    • DynamoDB table to store metadata.

    • API Gateway to manage access to the Quantiphi web application.

  • In the virtual private cloud (VPC):*

    • An Application Load Balancer to route traffic between Quantiphi web application nodes.*

    • 1-4 Amazon Elastic Compute Cloud (Amazon EC2) instances to host Quantiphi web application nodes. You choose the number of hosts during deployment.

  • AWS Identity and Access Management (IAM) to manage IAM roles and policies.

*The template that deploys the Quick Start into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Planning the deployment

Specialized knowledge

This deployment requires a moderate level of familiarity with AWS services. If you’re new to AWS, see Getting Started Resource Center and AWS Training and Certification. These sites provide materials for learning how to design, deploy, and operate your infrastructure and applications on the AWS Cloud.

This Quick Start assumes familiarity with the following AWS services:

AWS account

If you don’t already have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions. Part of the sign-up process involves receiving a phone call and entering a PIN using the phone keypad.

Your AWS account is automatically signed up for all AWS services. You are charged only for the services you use.

Technical requirements

Before you launch the Quick Start, review the following information and ensure that your account is properly configured. Otherwise, deployment might fail.

Resource quotas

If necessary, request service quota increases for the following resources. You might request quota increases to avoid exceeding the default limits for any resources that are shared across multiple deployments. The Service Quotas console displays your usage and quotas for some aspects of some services. For more information, see What is Service Quotas? and AWS service quotas.

AWS Quick Start configuration:

Resource This deployment uses

AWS Identity and Access Management (IAM) roles

11

VPCs

1

AWS Identity and Access Management (IAM) security groups

3

Elastic IP addresses

3-6, depending on the Linux bastion host configuration.

Auto Scaling groups

2

Application Load Balancers

1

Network Load Balancers

0

t2.medium instances

1-4, depending on the web application configuration.

t2.micro instances

1-4, depending on the Linux bastion host configuration.

Supported Regions

This Quick Start supports the following Regions:

  • US East (N. Virginia)

  • US West (Oregon)

This deployment includes Amazon Chime Voice Connector, which is not currently supported in all AWS Regions. Amazon Chime Voice Connector delivers a fault tolerant and highly available SIP-trunking service using three availability zones (AZs) in the US-East (N. Virginia) Region and 3 AZs in the US-West (Oregon) Region. For more information, see Amazon Chime Voice Connector FAQs.
Certain Regions are available on an opt-in basis. For more information, see Managing AWS Regions.

IAM permissions

Before launching the Quick Start, you must sign in to the AWS Management Console with IAM permissions for the resources that the templates deploy. The AdministratorAccess managed policy within IAM provides sufficient permissions, although your organization may choose to use a custom policy with more restrictions. For more information, see AWS managed policies for job functions.

Prepare for the deployment

Make sure that at least one Amazon EC2 key pair exists in your AWS account in the Region where the Quick Start is deployed. Save the key pair name, as you need it during deployment. To create a key pair, follow the instructions in Amazon EC2 key pairs and Linux instances. For testing or proof-of-concept purposes, we recommend creating a new key pair.

Deployment options

This Quick Start provides two deployment options:

  • Deploy Quantiphi Real-Time Call Analytics into a new VPC. This option builds a new AWS environment consisting of the VPC, subnets, NAT gateways, security groups, bastion hosts, and other infrastructure components. It then deploys Quantiphi Real-Time Call Analytics into this new VPC. To set up the networking and routing infrastructure, you only provide the CIDR block for the VPC that you want to create. However, you can configure instance types and software settings such as license keys, user names, and passwords, as discussed later in this guide.

  • Deploy Quantiphi Real-Time Call Analytics into an existing VPC. Provisions resources into your existing AWS VPC.

Deployment steps

Sign in to your AWS account

  1. Sign in to your AWS account at https://aws.amazon.com with an IAM user role that has the necessary permissions. For details, see Planning the deployment earlier in this guide.

  2. Make sure that your AWS account is configured correctly, as discussed in the Technical requirements section.

Launch the Quick Start

You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using this Quick Start. For full details, see the pricing pages for each AWS service used by this Quick Start. Prices are subject to change.

Each deployment takes about 40 minutes to complete.

  1. Sign in to your AWS account, and launch the AWS CloudFormation template.

Deploy Quantiphi Real-Time Call Analytics into a new VPC on AWS

View template

Deploy Quantiphi Real-Time Call Analytics into an existing VPC on AWS

View template

  1. Check the AWS Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This Region is where the network infrastructure for Quantiphi Real-Time Call Analytics is built. The template is launched in the us-east-1 Region by default.

  1. On the Create stack page, keep the default setting for the template URL, and then choose Next.

  2. On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. For details on each parameter, see the Parameter reference section of this guide. After reviewing and customizing the parameters, choose Next.

  3. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you’re finished, choose Next.

  4. On the Review page, review and confirm the template settings. Under Capabilities, select the two check boxes to acknowledge that the template creates IAM resources and might require the ability to automatically expand macros.

  5. Choose Create stack to deploy the stack.

  6. Monitor the status of the stack. When the status is CREATE_COMPLETE, the Quantiphi Real-Time Call Analytics deployment is ready.

  7. Use the values displayed in the Outputs tab for the stack, as shown in Figure 2, to view the created resources.

cfn_outputs
Figure 2. Quantiphi Real-Time Call Analytics outputs after successful deployment

Test the deployment

To test this Quick Start after deployment, the following items are required:

  • PBX software integrated with Amazon Chime Voice Connector.

  • An active call in the Quantiphi call transcription application.

View active call transcription

To view a live transcription of an active call, do the following:

  1. In the AWS CloudFormation console, choose the Outputs tab. Retrieve the URL in the Value column of the LoadBalancerDNSAddr key, as shown in Figure 3.

UI for Quantiphi Real-Time Call Analytics
Figure 3. Web application URL on the Outputs tab
  1. Navigate to the URL from step 1.

  2. On the Quantiphi dashboard, select Active Calls from the drop down list.

  3. A table of active calls displays. Choose the icon in the View column of an active call.

UI for Quantiphi Real-Time Call Analytics
Figure 4. Active calls table
The message “No Active Calls Found” displays if there are no active calls. An active call is required to test the deployment using these instructions.
  1. The live call transcription displays in the Transcription section of the dashboard. Keywords extracted from the call display in the Call Capture section, as shown in Figure 5.

UI for Quantiphi Real-Time Call Analytics
Figure 5. Transcription and keyword displays
  1. Once the call is ended, caller identification details display in the Identification section of the dashboard, as shown in Figure 6.

UI for Quantiphi Real-Time Call Analytics
Figure 6. Caller identification

View and download call transcription and keywords

  1. To view and download a transcription after a call, choose the download icon in the Transcription section.

UI for Quantiphi Real-Time Call Analytics
Figure 7. Download call transcription
  1. The transcription displays in the Transcription Details window. Choose Download CSV to download the transcription in a CSV file.

UI for Quantiphi Real-Time Call Analytics
Figure 8. Download CSV
  1. Choose the table icon in the Call Capture section to view and download keywords.

UI for Quantiphi Real-Time Call Analytics
Figure 9. Download keywords

Transcription replays

To replay a completed call, do the following:

  1. On the Quantiphi dashboard, select Completed Calls from the drop down list.

UI for Quantiphi Real-Time Call Analytics
Figure 10. Quantiphi dashboard
  1. A table of completed calls displays. Choose the icon in the View column of a completed call, as shown in Figure 11.

UI for Quantiphi Real-Time Call Analytics
Figure 11. Completed calls on the Quantiphi dashboard
  1. To play the call, choose the play icon in the Recording section or Begin in the Transcription section.

UI for Quantiphi Real-Time Call Analytics
Figure 12. Starting a playback
  1. The transcription and keywords of the playback display in the Transcription and Call Capture sections, respectively.

UI for Quantiphi Real-Time Call Analytics
Figure 13. Playback transcription and keywords
  1. You can move the playback head to play a different section of the call. Or, use the forward and backward controls to jump.

UI for Quantiphi Real-Time Call Analytics
Figure 14. Playback head and forward and backward controls
  1. You can choose a keyword in the Call Capture section to jump to the section of the audio containing the keyword.

UI for Quantiphi Real-Time Call Analytics
Figure 15. Jump to a sections of call audio by choosing keywords
To view and download the entire call transcription and keywords, see View and download call transcription and keywords.
  1. Click Cancel in the Transcription section to stop the transcription. The playback head will return to the beginning of the call.

UI for Quantiphi Real-Time Call Analytics
Figure 16. Cancel playback and transcription
  1. Click Redo in the Transcription or Call Capture sections to restart the playback and transcription from the beginning of the call.

UI for Quantiphi Real-Time Call Analytics
Figure 17. Redo playback and transcription from the beginning
  1. At the end of the transcription, the caller identification details display in the Identification section of the dashboard, as shown in Figure 18.

UI for Quantiphi Real-Time Call Analytics
Figure 18. Caller identification
  1. To go back, choose the left arrow button.

UI for Quantiphi Real-Time Call Analytics
Figure 19. Back

FAQ

Q. I encountered a CREATE_FAILED error when I launched the Quick Start.

A. If AWS CloudFormation fails to create the stack, relaunch the template with Rollback on failure set to Disabled. This setting is under Advanced in the AWS CloudFormation console on the Configure stack options page. With this setting, the stack’s state is retained, and you can troubleshoot the issue.

When you set Rollback on failure to Disabled, you continue to incur AWS charges for this stack. Ensure that you delete stack after troubleshooting.

For more information, see Troubleshooting AWS CloudFormation.

Q. I encountered a size-limitation error when I deployed the AWS CloudFormation templates.

A. Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template-size limitations. For more information, see AWS CloudFormation quotas.

Troubleshooting

Q. I encountered an error message that the maximum number of addresses has been reached.

A. This message is displayed when you reach the elastic IP address limit in your AWS account for a particular Region. Check your current limit and request a quota increase if necessary. For more information about AWS CloudFormation quotas, see AWS CloudFormation quotas.

Q. I encountered a "Received 1 FAILURE signal(s) out of 2. Unable to satisfy 50% MinSuccessfulInstancesPercent requirement" error in WebAppDeploymentStack when I deployed the AWS CloudFormation templates.

A. If you deployed the templates into an existing VPC, check that all outbound connections are enabled in the network access control list (ACL). If so, then find the event with the following parameters in WebAppDeploymentStack:

  • LogicalId: WebAppAutoScalingGroup

  • Status: CREATE_FAILED

  • Status reason: Received FAILURE signal with UniqueId <instance-id>

Use the configured bastion host to connect using SSH (Secure Shell) into the instance and check the /var/log/cfn-init.log file for more details.

For more information on how to use bastion hosts to connect using SSH to instances in a private subnet, see Securely Connect to Linux Instances Running in a Private Amazon VPC.

Parameter reference

Unless you are customizing the Quick Start templates for your own deployment projects, we recommend that you keep the default settings for the parameters labeled Quick Start S3 bucket name, Quick Start S3 bucket Region, and Quick Start S3 key prefix. Changing these parameter settings automatically updates code references to point to a new Quick Start location. For more information, see the AWS Quick Start Contributor’s Guide.

Launch into an existing VPC

Table 1. Keywords function configuration
Parameter label (name) Default value Description

Keywords function file name (KeywordsFileName)

kw_50_updated.txt

The file where keywords are stored.

Table 2. Web application configuration
Parameter label (name) Default value Description

Key pair name (KeyPairName)

quickstart-taskcat

Public/private key pair to securely connect to your instance after it launches.

CIDR block (CIDR)

0.0.0.0/0

CIDR to restrict access to the web application.

Application security group minimum capacity (MinCapacity)

1

Minimum number of web application hosts (1-4).

Application security group maximum capacity (MaxCapacity)

4

Maximum number of web application hosts (3-4).

Application security group capacity (DesiredCapacity)

2

Number of web application hosts to create (1-4).

Amazon EC2 instance type (WebAppInstanceType)

t2.medium

Amazon EC2 instance type for the web application instances.

Table 3. VPC configuration
Parameter label (name) Default value Description

VPC ID (VPCID)

Requires input

ID of the VPC (e.g., vpc-0343606e).

Private subnet 1 ID (SubnetID1)

Requires input

ID of the first private subnet into which Quantiphi will be deployed (e.g., subnet-a0246dcd).

Private subnet 2 ID (SubnetID2)

Requires input

ID of the second private subnet into which Quantiphi will be deployed (e.g., subnet-a0246dcd).

Application Load Balancer subnet IDs (SubnetIDs)

Requires input

Choose a minimum of two subnets. The Availability Zone where instance is created should match with at least one of the subnet’s Availability Zone you choose.

Bastion host security group ID (BastionSecurityGroupId)

Optional

The security group ID of bastion host instance.

Table 4. Quick Start configuration
Parameter label (name) Default value Description

Quick Start S3 bucket name (QSS3BucketName)

aws-quickstart

Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html.

NO_LABEL (QSTagValue)

qs-test

Tag value to be attached to resource names.

Quick Start S3 key prefix (QSS3KeyPrefix)

quickstart-quantiphi-realtime-analytics/

S3 key prefix that is used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you are customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). End with a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html.

Quick Start S3 bucket Region (QSS3BucketRegion)

us-east-1

The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.

Launch into a new VPC

Table 5. Keywords function configuration
Parameter label (name) Default value Description

Keywords function file name (KeywordsFileName)

kw_50_updated.txt

The file where keywords are stored.

Table 6. Web application configuration
Parameter label (name) Default value Description

Key pair name (KeyPairName)

quickstart-analytics

Public/private key pair to securely connect to your instance after it launches.

CIDR to limit the web app access (CIDR)

0.0.0.0/0

CIDR to restrict access to web application.

Application security group minimum capacity (MinCapacity)

1

Minimum number of web application hosts (1-4).

Application security group maximum capacity (MaxCapacity)

4

Maximum number of web application hosts (3-4).

Application security group capacity (DesiredCapacity)

2

Number of web application hosts to create (1-4).

Amazon EC2 instance type (WebAppInstanceType)

t2.medium

Amazon EC2 instance type for the web application instances.

Table 7. VPC configuration
Parameter label (name) Default value Description

Availability Zones (AvailabilityZones)

Requires input

List of Availability Zones to use for the subnets in the VPC.

VPC CIDR (VPCCIDR)

10.192.0.0/16

CIDR block for the VPC.

Public subnet 1 CIDR (PublicSubnet1CIDR)

10.192.10.0/24

CIDR block for public subnet 1, located in Availability Zone 1.

Public subnet 2 CIDR (PublicSubnet2CIDR)

10.192.11.0/24

CIDR block for public subnet 2, located in Availability Zone 2.

Private subnet 1 CIDR (PrivateSubnet1CIDR)

10.192.20.0/24

CIDR block for private subnet 1, located in Availability Zone 1.

Private subnet 2 CIDR (PrivateSubnet2CIDR)

10.192.21.0/24

CIDR block for private subnet 2, located in Availability Zone 2.

Table 8. Linux bastion configuration
Parameter label (name) Default value Description

Number of bastion hosts (NumBastionHosts)

1

Number of bastion hosts to create. The maximum number is four.

Bastion tenancy (BastionTenancy)

default

Bastion VPC tenancy (dedicated or default).

Enable banner (EnableBanner)

false

To display a banner when connecting to the bastion through SSH, choose true.

Bastion banner text (BastionBanner)

Blank string

Banner text to display at login.

TCP forwarding (EnableTCPForwarding)

false

To enable TCP forwarding, choose true.

X11 forwarding (EnableX11Forwarding)

false

To enable X11 forwarding, choose true.

Allowed bastion external access CIDR (RemoteAccessCIDR)

Requires input

Allowed CIDR block for external SSH access to the bastions.

Table 9. Bastion host instance configuration
Parameter label (name) Default value Description

Bastion AMI operating system (BastionAMIOS)

Amazon-Linux2-HVM

Linux distribution for the bastion instances AMI.

Bastion host instance type (BastionInstanceType)

t2.micro

Amazon EC2 instance type for bastion instances.

Table 10. Quick Start configuration
Parameter label (name) Default value Description

Quick Start S3 bucket name (QSS3BucketName)

aws-quickstart

Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html.

NO_LABEL (QSTagValue)

qs-test

Tag value to be attached to resource names.

Quick Start S3 key prefix (QSS3KeyPrefix)

quickstart-quantiphi-realtime-analytics/

S3 key prefix that is used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you are customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). End with a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html.

Send us feedback

To post feedback, submit feature ideas, or report bugs, use the Issues section of the GitHub repository for this Quick Start. To submit code, see the Quick Start Contributor’s Guide.

Quick Start reference deployments

GitHub repository

Visit our GitHub repository to download the templates and scripts for this Quick Start, to post your comments, and to share your customizations with others.


Notices

This document is provided for informational purposes only. It represents AWS’s current product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the License for specific language governing permissions and limitations.