Archive Files to Amazon S3

Yeastar P-Series Software Edition supports archiving the system's call recordings and backup files to Amazon S3, either on a regular interval or at any time you want. This topic describes how to add Amazon S3 bucket as an archive server and schedule tasks to archive the desired files.

Requirements and restrictions

Requirements
  • PBX Firmware: Version 83.15.0.22 or later
  • PBX Plan: Enterprise Plan
Restrictions
  • Archive server: 10
  • Archive task: 200

Introduction

To archive PBX's call recordings and backup files to a specific bucket in Amazon S3, you need to complete the followings:
  1. Prepare an eligible account and bucket on AWS.
    • An IAM User account that meets the requirements listed below:
      • Full access to Amazon S3 resources to archive PBX files
      • An access key pair (including an access key ID and a secret access key) to authenticate file archiving requests from PBX
    • An S3 bucket to store archived PBX files
  2. Set up archive server and task on PBX.

When it is time to execute the archive task, PBX will use the access key pair of the IAM user to send file archiving requests to Amazon S3. If the requests are considered authentic, the specified files will be archived to the designated bucket in Amazon S3.

Step 1. Create an IAM user with full access to Amazon S3 bucket on AWS

  1. Log in to AWS Management Console.
  2. At the top of the console, search for IAM service and select Users.

    You are redirected to the IAM users page.

  3. Create an IAM user and grant the user full access to Amazon S3 bucket.
    1. At the top-right corner, click Create user.

    2. On the Specify user details page, enter a name in the User name field to help you identify the IAM user, then click Next.

    3. On the Set permissions page, grant the user full access to Amazon S3 buckets, then click Next.
      Note: You can grant permission to the user by adding the user to an existing group, creating a new group, or attaching permission policy directly to the user.

      In this example, we create a new group with full Amazon S3 access permission and add the user to the group, as the following figure shows.

    4. On the Review and create page, click Create user.

      The IAM user with full access to Amazon S3 bucket is created and displayed on the users list.

  4. Create an access key for the IAM user.
    1. On the users list, click on the newly created IAM user to enter the details page.

    2. In the Summary section, click Create access key.

    3. On the Access key best practices & alternatives page, select Third-party service, confirm your operation, then click Next.

    4. On the Set description tag - optional page, enter a description for the access key as needed, then click Create access key.

    5. In the Retrieve access keys page, copy and note down the values of Access key and Secret access key, then click Done.
      Important: For Secret access key, the value is shown only ONCE, so make sure that you save the credential in a secure location before clicking Done to close the window. We recommend that you click Download .csv file to save the credential file to your computer.

      The access key is created and displayed on the access key list.

Step 2. Create an Amazon S3 bucket on AWS

  1. On AWS Management Console, search for S3 service in the top-left search bar, then select Buckets.

  2. At the top-right corner, select the region in which you want to create an S3 bucket.
    Note: To minimize latency and costs and address regulatory requirements, choose a region that is closest to your PBX server.

  3. Create an S3 bucket.
    1. On the right of the page, click Create bucket.

    2. Check the region where the bucket will be created and specify a name for the bucket.

    3. Configure other settings according to your needs.
    4. At the bottom of the page, click Create bucket.

      The S3 bucket is created and displayed on the buckets list.
      Note: If you want to group the archived PBX files in Amazon S3, you can create folders in the bucket. In this way, you can specify PBX files to be archived to the designated folder in the follow-up settings.

Step 3. Add Amazon S3 bucket as archive server on PBX

  1. Log in to PBX web portal, go to System > Archive.
  2. Under the Archive Task tab, click Archive Server.

  3. Set up Amazon S3 bucket as an archive server.
    1. Click Add.
    2. In the pop-up window, complete the following settings.

      Setting Description
      Name Enter a name to help you identify the server.
      Server Type Select Amazon S3.
      Access Key ID Enter the access key that you have obtained from AWS.
      Secret Access Key Enter the secret access key that you have obtained from AWS.
    3. Click Save.

      The Amazon S3 bucket is added as an archive server and displayed on the archive server list.

  4. Click to close the window.

Step 4. Create a task to archive files to Amazon S3 on PBX

  1. Under Archive Task tab, click Add.
  2. Create a one-time or recurring archive task.

    Setting Description
    Name Enter a name to help you identify the task.
    File Type Select Recording Files or Backup Files as needed.
    Time Specify a time range of the files to be archived.
    Note: You can archive files for up to 31 days at a time.
    Sync Frequency Set how often to archive files to Amazon S3.
    Note: As large amounts of data will consume PBX's CPU resources, we recommend that you schedule archive tasks during off-peak hours.
    • Once: If you choose the option, the system will archive files immediately after you save the task.
    • Daily: If you choose the option, select a time from the drop-down list. The system will archive files at this time of the day.
    • Weekly: If you choose the option, choose a day of week and select a time from the drop-down list. The system will archive files at this time of the week.
    • Monthly: If you choose the option, choose a day and select a time from the drop-down list. The system will archive files on this day and time of the month.

    Archive Server Select the Amazon S3 bucket that you have added.
    Select Folder/Path Select the bucket or the folder in which you want to store archived files.
  3. Click Save.

Result

The specified files will be archived to the designated bucket or folder in Amazon S3 immediately or at the scheduled time.
Note: The system executes only one task at a time to avoid affecting system performance. If there are multiple tasks, they will be queued up one after another.
You can check the archive result in the following ways.
Check the archive result on PBX
On PBX web portal, go to System > Archive > Archival Logs. If the Result column of the task shows Succeeded, it indicates that the specified files have been successfully archived to Amazon S3.

Note: If the task is failed, the Failed to Archive File(s) event will be triggered; You can click to retry the task.

Check the archive result on AWS
On AWS Management Console, go to the created S3 bucket. If the specified files appear in the list, it indicates that the archive is successful.