This upgrade makes some changes to the cdrs table, and both "enswitch upgrade" and "enswitch after_upgrade" may take some tens of minutes to run on larger systems.

Enswitch 3.14 requires a 64 bit operating system. This is needed to run the new enswitch_messaged daemon. If using a 32 bit operating system, please re-install the operating system, or migrate to new machines.

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.13 to Enswitch 3.14

  1. Delete any unnecessary CDRs.
  2. 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.
  3. On all machines, check out /opt/enswitch/3.14. Note that 3.14 is no longer in the 'branches' subdirectory.
  4. On all machines, update the /opt/enswitch/current symlink. It should point to '3.14', rather than 'branches/3.14'.
  5. 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
  6. On all machines, do:
    • cpanm Digest::SHA
    • cpanm Protocol::WebSocket::Client
    • enswitch create_databases_ini
  7. On all web server machines running Debian, Devuan, or Ubuntu, do:
    • apt-get install mpg321
  8. On all web server machines running CentOS, Fedora, or Redhat Enterprise, do:
    • yum -y install mpg321

    [If the above fails, try the following commands instead]

    • yum -y install alsa-lib-devel libao-devel libid3tag-devel libmad-devel
    • enswitch install mpg321
  9. On all CentOS or Redhat Enterprise machines older than CentOS/RHEL 7 or Fedora machines older than 19, do:
    • cpanm Socket
  10. On the primary database machine, do:
    • enswitch upgrade
  11. On systems that do not use Heartbeat or Corosync with Pacemaker do on all Kamailio or OpenSIPS machines:
    • enswitch install enswitch_messaged

    On all Kamailio or OpenSIPS machines using systemd do:

    • systemctl start enswitch_messaged

    On all Kamailio or OpenSIPS machines using System V init scripts do:

    • /etc/init.d/enswitch_messaged start
  12. On systems using Heartbeat do on all Kamailio or OpenSIPS machines:
    • enswitch install enswitch_messaged-ha

    Edit /etc/ha.d/haresources and append

    enswitch_messaged
    to the line that contains the HA IP address:

    • vi /etc/ha.d/haresources

    On the active node of the HA pair do:

    • /etc/ha.d/resource.d/enswitch_messaged start
  13. On systems using Corosync with Pacemaker do on all Kamailio or OpenSIPS machines:
    • enswitch install enswitch_messaged-cp

    On systems using systemd do on the active node of the Corosync pair:

    • crm configure primitive enswitch_messaged systemd:enswitch_messaged op monitor interval="30s"
    • crm configure group enswitch ip kamailio enswitch_messaged enswitch_sipd enswitch_blfd
    • crm resource start enswitch_messaged

    On systems using System V init scripts do on the active node of the Corosync pair:

    • crm configure primitive enswitch_messaged lsb:enswitch_messaged op monitor interval="30s"
    • crm configure group enswitch ip kamailio enswitch_messaged enswitch_sipd enswitch_blfd
    • crm resource start enswitch_messaged
  14. On all Asterisk machines running Debian, Devuan, or Ubuntu, do:
    • apt-get install autoconf libspandsp2 libspandsp-dev libtool
  15. On all Asterisk machines running CentOS, Fedora, or Redhat Enterprise, do:
    • yum -y install spandsp spandsp-devel
  16. On all Asterisk machines, add to /etc/asterisk/features.conf:
  17. [applicationmap]
    recording_start => *1,self,AGI(agi://127.0.0.1/recording?action=start)
    recording_stop => *3,self,AGI(agi://127.0.0.1/recording?action=stop)
    
  18. On all Asterisk machines add to the [general] section in /etc/asterisk/sip.conf:
  19. sendrpid = pai
    snom_aoc_enabled = yes
    

    The "sendrpid" option allows telephones to receive an updated callerid after transfers. The "snom_aoc_enabled" option enabled Advice Of Charge (AOC). Some telephones may not accept SIP packets with AOC enabled.

  20. If Enswitch is configured to use the Digium fax driver, then on all Asterisk machines add the following line under the section [modules] in /etc/asterisk/modules.conf:
  21. noload => res_fax_spandsp.so
    
  22. If Enswitch is NOT configured to use the Digium fax driver, then on all Asterisk machines add the following line under the section [modules] in /etc/asterisk/modules.conf:
  23. noload => res_fax_digium.so
    
  24. On all Asterisk machines build the new res_fax_spandsp.so module by running:
    • enswitch install -u asterisk-11
  25. In Enswitch 3.14 it is recommended to use the new default fax driver spandsp. However, Hylafax and Hylafax Enterprise can still be used and therefore can be left enabled, if so desired. If not, then they can be disabled:

    On all Asterisk machines running Debian, Devuan, or Ubuntu, do:

    • /etc/init.d/hylafax stop
    • rm /etc/init.d/hylafax
    • update-rc.d hylafax remove

    On all Asterisk machines running CentOS, Fedora, or Redhat Enterprise, do:

    • /etc/init.d/hylafax stop
    • rm /etc/init.d/hylafax
    • chkconfig --del hylafax
  26. On all Kamailio machines, check if /etc/kamailio/kamailio.cfg uses a custom configuration include_file. If it does then in the custom configuration file add the following before the loose_route() line:
  27.                 if ( $hdr(AOC) != $null ) {
                            perl_exec( "Integrics::Enswitch::Kamailio::aoc_xml" );
                            remove_hf( "AOC" );
                            set_body( $avp(ENSWITCH-AOC-XML), "application/vnd.etsi.aoc+xml" );
                    }
    

    And wherever there is mention of 'is_method( "NOTIFY|SUBSCRIBE' (possibly with |UPDATE too), add |UPDATE and/or |INFO to make it:

    		is_method( "NOTIFY|SUBSCRIBE|UPDATE|INFO" )
    
  28. On all machines, do:
    • enswitch restart
  29. Go to System » Configuration on the web interface, and set "Message daemon IP address" to the IP address that other machines in the cluster will connect to. If using heartbeat on the Kamailio/OpenSIPS machines, enter the heartbeat service IP address. If using a single Kamailio/OpenSIPS machine, enter its primary IP address.
  30. Test calls and the web interface.
  31. On the primary database machine, do:
    • enswitch migrate_authorize
    • enswitch migrate_messages all
    • enswitch after_upgrade