This knowledge base will soon be replaced with https://help.sangoma.com/.
To ensure continued access to our resources, update your bookmarks or links to https://help.sangoma.com/.



Sangoma CX Technical Note - Downloading Call Recordings in Bulk (Formerly Sangoma Contact Center)

Edited: 08/10/2023
Access: Everyone
Supports: Business Voice, Business Voice+

( Sangoma Contact Center has been rebranded as Sangoma CX )

Introduction

The Call History report includes action buttons per call record to playback and download call recordings. Although very useful for day to day operations, this interface is not suitable to download call recordings in bulk.

To cover this need, the solution has an alternative method to download all or a subset of recordings that will also provide call metadata related to the file downloaded. This document provides detailed information about this capability.

Architecture

With the objective of simplifying the call recording bulk download process but making it also very flexible, the solution relies on a controlled read only access of AWS S3 Bucket that stores the call recordings of a tenant to a granted account provided by the customer.

Although Sangoma provides a command line executable named cx-cli to download these files, granting access to the S3 Bucket that stores the tenant call recordings allows customers third party tools choice to download the files, for example: Cyberduck (Mac), rclone (cross platform), S3 Drive (cross platform).

The metadata of each call including the path and filename of the call recording stored in the AWS S3 Bucket is included when a call history report is downloaded in.csv. The column titled “Call Recording Object Key” contains the full path and filename of the call recording in the S3 bucket and the file downloaded maintaining the same filename.

Missing image link-1

Requirements

The requirements to download recordings in bulk are:

  • Customers need to have their own AWS account. An AWS free tier is valid.
  • Customers will require to create a user in the AWS account:
  • This user needs to have the permission policy: AmazonS3ReadOnly
  • This user needs to have an Access Key created.
  • This user needs to have a Secret Access Key. Consider the Secret Access Key as the password used by the Access Key to validate.
  • Once the user is created, provide the following user information to Sangoma so access to the S3 Tenant Bucket can be granted:
  • AWS user ARN
  • AWS user Access key
  • To access the bucket you will need to use an application, cx-cli or a 3rd party tool, to download the files. The following information will be required by these tools:
  • Using cx-clli tool:
  • AWS User Access Key: this is the one provided to Sangoma by the customer
  • AWS User Secret Key: this is the one related to the user provided to Sangoma and created by the customer.
  • AWS S3 Bucket Name: this is the bucket that stores the call recordings. This information will be provided by Sangoma
  • AWS S3 Bucket Region: this is the AWS region of the bucket. This information will be provided by Sangoma
  • Export in csv of the call history report containing the calls data and call recordings path and filenames in the S3 Bucket to download.
  • 3rd Party Tools:
  • AWS User Access Key: this is the one provided to Sangoma by the customer
  • AWS User Secret Key: this is the one related to the user provided to Sangoma and created by the customer.
  • AWS S3 Bucket Name: this is the bucket that stores the call recordings. This information will be provided by Sangoma
  • AWS S3 Bucket Region: this is the AWS region of the bucket. This information will be provided by Sangoma
  • Subfolder: this information can be obtained by exporting a call history report with calls that have recordings. Check the entries that contain a file path in the column titled “Call Recording Object Key”. Take all the characters till the first “/” and including the “/”. For example: in tenant_13/freeswitch_server_3/2023-06/20/e60d6ed0-0f50-11ee-b6c3-355dd4dd481f.ogg the subfolder is tenant_13/

Considerations

  • Only the call recordings stored in the tenant’s AWS S3 Bucket can be downloading in bulk
  • Recordings are compressed and moved from a short term storage to the AWS S3 Bucket every day at 1:00 am EST. That means recordings of calls taking place in the day, won’t be available to be downloaded in bulk

The cx-cli Command Line Executable

Where to get the executable

The cx-cli executable is available for different platforms and can be downloaded from the following sources:

  • Mac OS:
  • amd64: https://cx-prod-resources.s3.amazonaws.com/cx-cli/latest/darwin_amd64.tar.gz
  • arm64: https://cx-prod-resources.s3.amazonaws.com/cx-cli/latest/darwin_arm64.tar.gz
  • Linux: https://cx-prod-resources.s3.amazonaws.com/cx-cli/latest/linux_amd64.tar.gz
  • Windows: https://cx-prod-resources.s3.amazonaws.com/cx-cli/latest/windows_amd64.zip

Once downloaded, decompress the zip file contents in a folder.

How to use it

Open a command prompt in your computer and get in the directory the zip file was decompressed.

The structure of the the cx-cli command line is:

cx-cli download recordings

[destination] [flags]

 

  • cx-cli : is the name of the executable.

 

  • download recordings : indicate the cx-cli what to do. These arguments are mandatory

 

  • : used to detail the path and filename of the exported call history report in .csv format that contains the list call recordings to download. This argument is mandatory

 

  • [destination] : this is the path we want to download the recordings. Please make sure the path provider exists. This argument is optional and if not provided will download the call recordings in the current directory.

 

  • [flags]   : the flags are always needed but can be provided as an environmental variable or as an argument. The flags are:

 

  • --aws-access-key-id : This is the AWS User Access Key of the user created by the customer and granted by Sangoma. Provided by the customer

 

  • --aws-secret-access-key string : This is the AWS Secret Access Key of the user AWS User Access Key provided in the previous flag. Provided by the customer

 

  • --aws-bucket : This is the AWS S3 Bucket name that stores the tenant recording. Provided by Sangoma

 

  • --aws-region : This is the AWS region of the S3 Bucket name that stores the tenant recording. Provided by Sangoma.

 

Example using the windows cx-cli:

 

cx-cli download recordings listen_calls_report_06-01-2023_06-30-2023.csv . --aws-bucket ap-tenant13-qoofrmag9y7abcd3fgh1j77est8789grause1a-s3alias --aws-region us-east-1 --aws-access-key-id EDONWUI6374H8SD83 --aws-secret-access-key oiP64S909374JWD8ishy839642ydyli/28642yUT73yw97ds

 

How to Create the User in AWS Account

 

This section provides the steps to create a user in the Customers AWS Account to validate access to the call recordings. Consider this section as a quick reference guide. Detailed information about how to create and administer users in AWS can be found in https://aws.amazon.com/ and many other resources are available on the Internet.

 

Please note Sangoma is not responsible or liable for any services provided by AWS. Sangoma won’t provide support to AWS services activated and used by customers.

 

This section does not explain how to create an AWS account. You can start this process in this URL https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all

 

following the steps provided by Amazon. AWS Free tier will require you to provide a credit card.

 

Steps:

 

  1. Once the AWS account is created, log in the AWS Console with a user granted to create and manage users.

 

  1. Search for the service IAM and click on it:

 

Missing image link-2

 

  1. The Identity and Access Management dashboard will open. Click in the Users menu entry.

 

Missing image link-3

 

  1. The IAM users list will be shown. Click the “Add users” button.

 

Missing image link-4

 

  1. Type the user name and click the Next button.

 

Missing image link-5

 

  1. Set the permissions of the user by:

 

  • Click on Attach policies directly.

 

  • Select the checkbox of the permission policy AmazonS3ReadOnlyAccess

 

  • Click the Next button.

 

Missing image link-6

 

  1. A summary screen will show up. Click the Create user Button.

 

Missing image link-7

 

  1. Back to the IAM users list screen, click on the user just created. The user configuration screen will be displayed. Keep the ARN, click on the Security Credential tab, new options will be displayed and click the button Create access key.

 

Missing image link-8

 

  1. The following screen will appear. Select “Other” use case and click the Next button.

 

Missing image link-9

 

  1. Provide a description tab that references what that user key will be used for and click the Create access key button.

 

Missing image link-10

 

  1. A Retrieve access keys screen will appear.

 

  • Keep the Access Key.

 

  • Keep the Secret Access Key.

 

  • Click the Done button.

 

Missing image link-11

 

  1. Provide the following information of the user to Sangoma to grant that user access to the bucket that stores the call recordings.

 

  • ARN.

 

  • Access key.

 

  1. Keep the following information of the user that will be required by cx-cli or 3rd Party tool to validate access to the AWS S3 Bucket that stores the call recordings:

 

  • Access key.

 

  • Secret access key.

 

  • Note: Wait for Sangoma to confirm the user has granted access to the bucket and provide the AWS S3 Bucket name and region that store the call recordings that will be also required by these tools.

 

 

 

up
22 users have voted.

Technical Support

If you have any technical questions or need to get in touch with Tech Support, please email us at service@sangoma.com to open a ticket.

Customers With Disabilities

Sangoma values its customers with disabilities. If you are in need of assistance with a Sangoma service or feature, please email service@sangoma.com.

Website Suggestion

Do you have a suggestion about our Knowledge Base website, let us know?