3.9 makes some changes to the cdrcosts table, so "enswitch upgrade" may take some tens of minutes to run on larger systems.

Kamailio is now the recommended SIP registrar and proxy. If using OpenSIPS, please consider switching.

To upgrade from Enswitch 3.8 to Enswitch 3.9

  1. On all machines, do:
    • cpan Email::Sender
    • cpan Env::C
    • cpan MIME::Entity
    • cpan Term::ReadKey
  2. On all CentOS or Redhat Enterprise machines older than CentOS/RHEL 7 or Fedora machines older than 19, do:
    • cpan Socket
  3. On all machines, check out /opt/enswitch/branches/3.9.
  4. On all machines, update the /opt/enswitch/current symlink.
  5. On the primary database machine, do:
    • enswitch upgrade
  6. Determine whether OpenSIPS or OpenSER is in use, and if so then edit /etc/opensips/opensips.cfg or /etc/openser/openser.cfg and:

    After these lines:
    if ( ! www_authorize( "", "phones" ) ) {
    #route( 3 );
    
    Add this line, indenting as appropriate:
    perl_exec( "Integrics::Enswitch::OpenSIPS::failed_register" );
    

    After these lines:
    perl_exec( "Integrics::Enswitch::OpenSIPS::check_register" );
    if ( isflagset( 7 ) ) {
    
    Remove this line:
    sl_send_reply( "403", "Not allowed from this IP address" );
    
    Add these lines, indenting as appropriate:
    perl_exec( "Integrics::Enswitch::OpenSIPS::failed_register" );
    sl_send_reply( "403", "Not allowed" );
    

    After these lines:
    if ( $fU == "" || $fU != $au ) {
    #route( 3 );
    
    Add this line, indenting as appropriate:
    perl_exec( "Integrics::Enswitch::OpenSIPS::failed_register" );
    

    Before these lines:
    save( "location" );
    t_replicate( "sip:127.0.0.1:5080" );
    
    Add this line, indenting as appropriate:
    perl_exec( "Integrics::Enswitch::OpenSIPS::successful_register" );
    
    replacing OpenSIPS with OpenSER if necessary. If in doubt, read /opt/enswitch/current/install/etc/opensips/opensips.cfg to see the correct place and indenting.
  7. 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/digium/[\w\.]+$ /opt/enswitch/current/www/provision/digium/index.pl
  8. On all Asterisk machines, do:
    • rm -f /var/spool/hylafax/bin/notify
  9. On all machines, do:
    • enswitch restart
  10. Go to System » Configuration, and check that "Group for Hylafax" is set correctly.
  11. If you changed the hylafax group above, re-run "enswitch restart".
  12. Test calls and the web interface.
  13. On the primary database machine, do:
    • enswitch after_upgrade