This upgrade makes no changes to the cdrs, so "enswitch upgrade" should run quickly even on large systems.

Before upgrading

  1. Review the functional changes, and ensure that none will cause problems.
  2. If running MySQL 5.6 or earlier, upgrade to 5.7 or later.
  3. If running MySQL 8.x, check that its server configuration files do not include the "STRICT_TRANS_TABLES" value for the "sql_mode" option, because it will cause runtime failures in some Enswitch functionalities.
  4. If the database or some of its tables use the "latin1" character set, change it to "utf8mb4".
  5. 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

  1. On all machines, check out /opt/enswitch/4.2.
  2. On all machines, update the /opt/enswitch/current symlink.
  3. On all machines, do:
    • cpanm --force Module::Pluggable
    • enswitch install enswitch
    • enswitch upgrade_daemons
    • vi /etc/crontab /etc/cron.*/enswitch_*  # and change '/opt/enswitch/current/sbin' to '/opt/enswitch/current/bin', and remove any 'enswitch_' prefixes.
  4. On all machines running heartbeat, edit /etc/ha.d/haresources, change '/opt/enswitch/current/sbin' to '/opt/enswitch/current/bin', and remove any 'enswitch_' prefixes.
  5. On all machines running Debian, Devuan, or Ubuntu, do:
    • apt-get install libredis-perl
  6. On all machines running CentOS, Fedora, or Redhat Enterprise, do:
    • yum -y install perl-Redis
  7. 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:
    • yum install gnutls-devel libjpeg-devel libpng-devel zlib-devel # CentOS, RedHat, and Fedora machines
    • apt-get install libgnutls28-dev libjpeg-dev libpng-dev zlib1g-dev # Debian, Devuan, and Ubuntu machines

    The GnuTLS development files are needed by HTMLDOC version 1.8.30 or newer to properly handle links that use the HTTPS protocol when converting from HTML to PDF files. The other development libraries are needed for compiling HTMLDOC version 1.9.12 or newer, to get it properly handle JPEG, PNG and Zlib compressed files.

    Reinstall HTMLDOC to ensure that it detects and uses the previously installed development libraries, with this command:

    • enswitch install -u htmldoc

    Note: based on the detected operating system, the Enswitch installer will choose the HTMLDOC version to install that is known to be compatible with it.

  8. On the primary database machine, do:
    • enswitch upgrade
  9. On all Asterisk machines, edit /etc/asterisk/voicemail.conf and change the externnotify line to '/opt/enswitch/current/bin/externnotify'.
  10. Reboot all machines.
  11. Test calls and the web interface.
  12. On the primary database machine, do:
    • enswitch after_upgrade