This upgrade makes many changes to the CDR related tables, and other tables that often contain a large amount of data. The upgrade may take 1.5 to 3 hours per million records in the "cdrs" table, or longer, depending on the database server(s) resources. You can find the number of entries in the "cdrs" table by running on any Enswitch server:

  • enswitch sql "select count(*) as count from cdrs"

In order to speed up the upgrade you may wish to consider the following pre-upgrade actions, and decide which are appropriate for your system and data retention needs:

  • Delete older CDRs that are no longer needed.
  • Delete older call recordings that are no longer needed.
  • Truncate the "events" table. It stores the registration history of telephone lines.
  • Truncate the "queue_events" table. It stores the details of calls through queues which have event recording enabled.
  • Truncate the "statistics" table. It stores statistics on calls active on each Asterisk server every minute.

Before installing cpan packages check that there are no PERL environment variables set. If there are, packages may be installed into root's home directory and processes may not work when started on system boot. You should remove the variables from /root/.bashrc (or wherever set them) and then logout and login to the shell to clear the variables. To check for PERL environment variables run:

  • env | grep PERL

To upgrade from Enswitch 3.12 to Enswitch 3.13

  1. Delete any unnecessary CDRs.
  2. Ensure that all machines in cluster have a System -> Machines entry, including any heartbeat service IP address. It is critical that the hostname configured on each server match an entry in System -> Machines so that no call data records are lost during the upgrade, and system processes can run.
  3. If using database replication, check for the following lines in /etc/my.cnf or /etc/mysql/my.cnf and add them if missing. Restart the mysql server and check replication is working after making changes.
    • auto_increment_increment = 2
    • auto_increment_offset = 1 on the primary machine, and auto_increment_offset = 2 on the backup machine.
  4. On all machines, do:
    • cpanm Digest::Bcrypt
  5. On all CentOS or Redhat Enterprise machines older than CentOS/RHEL 7 or Fedora machines older than 19, do:
    • cpanm Socket
  6. On all machines, check out /opt/enswitch/branches/3.13.
  7. On all machines, update the /opt/enswitch/current symlink.
  8. Enswitch servers with a compiled HTMLDOC version older than 1.8.30 can skip this step and will continue working fine (check /usr/src/ and htmldoc --version). On all servers with a compiled HTMLDOC version 1.8.30 or newer do:
    • For CentOS, RedHat or Fedora: yum install gnutls-devel
    • For Debian or Ubuntu: apt-get install libgnutls28-dev

    This is needed to properly handle links that use the HTTPS protocol when converting from HTML to PDF files.

    Reinstall HTMLDOC to ensure that it detects and uses the previously installed GnuTLS development library to handle HTTPS links, with this command:

    • enswitch install -u htmldoc
  9. On the primary database machine, do:
    • enswitch upgrade
  10. On all web server machines, check whether the following line exists in /etc/apache2/sites-enabled/enswitch.conf or /etc/httpd/conf.d/enswitch.conf, and if not add it just above the other ScriptAliasMatch lines:
    ScriptAliasMatch ^/provision/snom/\w+.htm$ /opt/enswitch/current/www/provision/snom/index.pl
  11. On all machines, do:
    • enswitch restart
  12. Import Cisco SPA provisioning template with:
    • enswitch install_provisioning cisco_spa
  13. Test calls and the web interface.
  14. On the primary database machine, do:
    • enswitch after_upgrade