ScopSERV Introduces New Telephony Import/Export Manager to Migrate Multi Tenants

ScopSERV Introduces New Telephony Import/Export Manager to Migrate Multi Tenants

Overview

In the past backing up and restoring a telephony configuration meant overwriting any existing telephony configuration.
While this is expected behaviour for a backup and restore it didn't offer any convenience for administrators wanting to consolidate multiple tenants from separate systems into a single ScopTEL installation.
The new Telephony Import/Export Manager allows administrators to log in to an upgraded ScopTEL system and Export any existing tenant into a file.
All Telephony configuration is Exported including Auto Attendants, Applications, Extensions, Lines, Schedules, APS objects... etc
VoIP Interfaces configured within the Global (All) Tenant are not Exported as these belong to the Global (All) Tenant. Therefore after the Import is completed the Mass Operations Tool in the Lines Manager can be used to reassign VoIP Interfaces to the Incoming/Outgoing Lines created by the Import.

The Export file can then be Imported to any upgraded ScopTEL server and this will automatically create a new Tenant in Telephony without overwriting any existing Telephony configuration.
On Import you first choose the Export file location using the Upload file button and select a valid Exported file from your workstation. Then click on Import.
Once you confirm the Import the system will automatically create a new tenant (ex. original name = test123, new tenant  = new_123 )
However, if a Tenant with the name new_123 already exists, the Import will delete the existing Tenant and import new data, so it necessary to validate existing Tenant names to avoid an existing Tenant from being overwritten.
Once you verify the Import you can Edit the new Tenant in the ScopTEL Tenant Manager and rename it BEFORE Importing any additional Tenant files.

Caveats

The Import does NOT backup CDR reports, sound files, voicemail, monitor files, MOH files.
These files must be manually copied to the destination system.
The server license on the Import server must support the additional Tenants these Imports will create.

Supported Import/Export Paths

  1. EL2-6 are End Of Life
    1. But Scopserv has added manual patch locations for C6 based systems so they can be easily migrated to an officially support Operating System.
  2. For EL7 systems we will maintain repositories for as long as possible but the Operating System End Of Life date must be respected and best practices observed
    1. scopserv_yum update or Packages Manager updates will install the new feature
  3. For Rocky 8 scopserv_yum update or Packages Manager updates will install the new feature if it's not already installed
wget --no-check-certificate -O /var/www/scopserv/telephony/config/params/import/export.php https://scm.scopserv.com/files/c/7/9/c7939f88e707640835f6b0dc07b8d766.phps
wget --no-check-certificate -O /var/www/scopserv/telephony/config/params/import/import.php https://scm.scopserv.com/files/1/e/d/1edeeae0fe8957fa894cd3c9da287653.phps
wget --no-check-certificate -O /var/www/scopserv/telephony/tools/import.php https://scm.scopserv.com/files/9/8/8/988dcd1b836f94a9ea4f8e4105a94068.phps
wget --no-check-certificate -O /var/www/scopserv/telephony/lib/Driver/sql.php https://scm.scopserv.com/files/a/d/2/ad297b28cd89281ef927dc87c4077aaa.phps


Tenant Export

After patching, login with an account that has access to the Tools|Import/Export Manager




Click on the Export tab then use the drop list selector to choose the Tenant for Export.
Click on the Export button to Export the selected Tenant and save the file to your workstation.
The file name can be any value when saved so long as the .jason extension is kept. Unique information for the tenant is baked into the file.




Tenant Import

Click on the Import tab, and to begin the Import click 'Choose file' and select the location from where it is saved in your workstation.




The Source file will now display tenant attributes.
Click on the Import button to complete the Tenant Import.




Tenant Manager

Rename the tenant as required with the Edit button and Save your changes.
Repeat the process any many times as the license permits.



Lines Mass Operations

The resulting Import will most likely be based on VoIP Interfaces previously belonging to the Global (All) Tenant so these interfaces won't be part of the original Export so each Error! would be expected.
Therefore the Incoming Lines and Outgoing Lines will need to have existing trunks on the Import server prior to assigning Trunks to the Incoming and Outgoing Lines using the Mass Operations tools.
If trunks exist to support these Imported Lines then use the Mass Operations tool to assign trunks and complete the Tenant Import.




Shell Scripts to Export and Import ACD Reports

CAVEAT: These scripts only export reporting data and NOT recording files. Call recordings must be copied from /var/spool/asterisk/monitor/ and uploaded to any server or drive replacement!


For C6 systems download the scripts first (For C7 and R8 scripts will be added by standard package updates):

wget --no-check-certificate -O /var/www/scopserv/telephony/scripts/scopserv_report_dump.sh https://scm.scopserv.com/files/7/c/6/7c6e09243202c17cae1c95614189d390.phps

wget --no-check-certificate -O /var/www/scopserv/telephony/scripts/./scopserv_report_restore.sh https://scm.scopserv.com/files/b/5/7/b5778e78cda9aa97684a26a2d3dd7f7d.phps

cd /var/www/scopserv/telephony/scripts/

chown -R scopserv_report_dump.sh
chown -R scopserv_report_restore.sh

chmod a+x  scopserv_report_dump.sh
chmod a+x  scopserv_report_restore.sh

Usage:
scopserv_report_dump.sh [OPTIONS]
Options:
--tenant=TENANT      Set the tenant name (default: 'default')
--database=DATABASE  Set the database name (default: 'scopserv')
--cdr                Dump CDR table
--acd                Dump ACD (queue_log) table
--cel                Dump CEL table
--all                Dump all tables (CDR, ACD, CEL)
--from=YYYY-MM-DD    Set start date for data filtering
--to=YYYY-MM-DD      Set end date for data filtering
--help               Display this help and exit

Examples:
  Dump all tables for the default tenant:
    ./scopserv_report_dump.sh --all

  Dump only the CDR table for tenant 'default':
    ./scopserv_report_dump.sh --tenant=default --cdr

  Dump CDR, ACD, and CEL tables for tenant 'default' on database 'scopserv_repl':
    ./scopserv_report_dump.sh --database=scopserv_repl --tenant=default --acd --cel --cdr

  Dump CDR, ACD, and CEL tables for tenant 'default' from 2021-01-01 to 2021-01-31:
    ./scopserv_report_dump.sh --tenant=default --acd --cel --cdr --from=2021-01-01 --to=2021-01-31

  Dump ACD table for tenant 'example' from 2022-05-01:
    ./scopserv_report_dump.sh --tenant=example --acd --from=2022-05-01

RESTORE
./scopserv_report_restore.sh
Usage: scopserv_restore.sh [OPTIONS]
Options:
--database=DATABASE Specify the database name (default: 'scopserv')
--filename=FILENAME Specify the filename for restore
--tenant=TENANT Specify the new tenant name (optional, defaults to original tenant)
--help Display this help and exit

Examples:
Restore from a specific dump file for the same tenant:
./scopserv_report_restore.sh --filename=default_cdr.sql

Restore from a specific dump file cdr data new tenant:
./scopserv_report_restore.sh --filename=default_cdr.sql --tenant=newtenant

Restore from a specific dump file acd data for a new tenant:
./scopserv_report_restore.sh --filename=default_queue_log.sql --tenant=newtenant

Restore from a specific dump file with a specified database:
./scopserv_report_restore.sh --filename=default_cdr.sql --database=another_db


    • Related Articles

    • ScopTEL IP PBX Software - Basic Installation Hierarchy for Telephony Server

      Basic Installation Hierarchy for Telephony Server Therefore the purpose of this document is to provide a visual walkthrough of a very basic but functional installation for one tenant. This tutorial does not include an overview of the overall network ...
    • Rocky 8 - ScopTel Installation Guide

      Automatic Installation Download the Rocky 8 Scopserv Installlation ISO from: https://download.scopserv.com/iso/scopserv-8.x86_64.iso Write the ISO to a bootable USB drive OR configure the Virtual Machine to boot from the ISO file path. Boot from the ...
    • Managing Tenants

      A Tenant is a segregated dial plan Container with segregated Reporting structures. Each Tenant can be regarded as its own Customer container without requiring a unique physical installation for each Customer. This feature allows public IP addresses ...
    • ScopTEL Telephony Feature List

      ScopTEL Telephony Feature List ScopTEL has many applications and many Enterprise PBX features. This is a list of PBX Features. Feature Name Extended Description Fax Server Fax to Email Email to Fax (Clientless) Per User Licensing Model Customizable ...
    • CentOS End Of Life. ScopTEL Migration to Rocky 8

      CentOS End of Life As announced in December of 2020, The CentOS Project has shifted focus from CentOS Linux to CentOS Stream. Here are the expected end of life (EOL) dates for our various releases. CentOS Linux 7 EOL: 2024-06-30 CentOS Linux 8 EOL: ...