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 Asterisk 11 or earlier, upgrade to Asterisk 13 or 16.
  3. If the database or some of its tables use the "latin1" character set, change it to "utf8mb4".
  4. Make a note of the value of the "Log Facility" global configuration setting for use later in these instructions.
  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 running Debian, Devuan, or Ubuntu, do:
    • apt-get install libtext-levenshtein-perl libtext-levenshteinxs-perl
    • cpanm Crypt::JWT JSON~2.90 JSON::XS String::LCSS
  2. On all machines running CentOS, Fedora, or Redhat Enterprise, do:
    • cpanm Crypt::JWT JSON~2.90 JSON::XS String::LCSS Text::Levenshtein
  3. On all Asterisk machines, enable one touch recording by adding to /etc/asterisk/features.conf in the [featuremap] section:
    • automon = *2
  4. On all Asterisk machines, enable one touch recording by adding to /etc/asterisk/features.conf in the [applicationmap] section:
    • recording_toggle => *2,self,AGI(agi://127.0.0.1/recording?action=toggle)
  5. On all Asterisk machines, enable one touch recording by editing /etc/asterisk/sip.conf and duplicating the section(s) with the public IP address in the section name and adding ":5060" to the new section name. For example:
    • [12.34.56.78:5060]
    • host = 12.34.56.78
    • ...etc...
  6. On all machines, check out /opt/enswitch/4.1.
  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 all machines, do:
    • enswitch install enswitch
  10. On the primary database machine, do:
    • enswitch upgrade
  11. If the "Log facility" was set to syslog, edit /etc/enswitch/logs.ini on all machines, comment out the [trace] section and uncomment the [syslog] section. Wait one minute for this change to take effect.
  12. On all machines, do:
    • enswitch restart
  13. Test calls and the web interface.
  14. Busy lamps using enswitch_blfd has been removed and enswitch_messaged will be used instead. If enswitch_blfd is mentioned in the systemd, init or HA configuration of any server, remove it now.
  15. On the primary database machine, do:
    • enswitch after_upgrade
  16. Encrypt people passwords:
    • enswitch encrypt_people_passwords