Upgrade from FreePBX-Distro-1.8xx.210.58 to FreePBX-Distro-2.210.62

 

About

FreePBX Distro ver. 1.818.210.58-1 is the last update available in the FreePBX-Distro-1.8xx.210.58 series. As the FreePBX-Distro-1.8xx.210.58 wiki page states, "This release is at end-of-life and does not have any upgrade path to a newer release track due to a limitation of Centos 5 to Centos 6 providing no upgrade path. Please use the FreePBX backup and restore module to backup your PBX and restore it on a newer track such as 2.210.62."

This page documents the steps needed to accomplish this migration and upgrade.

  • Tested with a migration from FreePBX Distro 1.818.210.58-1 32-bit to FreePBX Distro 2.210.62-6 32-bit using the ISO FreePBX-2.210.62-6-i386-Full-1363357527.iso

Install FreePBX-Distro-2.210.62 on a separate system

  • Download the FreePBX Distro 2.210.62-6 ISO file from the download page at http://schmoozecom.com/distro-download.php (e.g. 32-bit version is at http://downloads.freepbxdistro.org/ISO/FreePBX-2.210.62-6-i386-Full-1363357527.iso)

  • Ensure the version is the same bitness as the current installation to be upgraded

    • TODO: it is not known if an upgrade from a 32-bit source installation to a 64-bit destination installation works; testing below was done with a 32-bit to 32-bit migration

  • Install FreePBX Distro 2.210.62 on the new server following Installing FreePBX 10.13.66 Official Distro

    • Choose the option on the initial boot screen to install the Asterisk 1.8 version of the installation to make it as similar as possible to the PBX being upgraded

    • Perform the initial login to the web console and set the FreePBX administrator username, password and other details

    • Do not do any further configuration of the system at this time

Upgrade the current system to FreePBX-Distro-1.818.210.58-1 with the latest modules

  • Apply the update scripts listed in the FreePBX-Distro-1.8xx.210.58 wiki page to ensure the most current version available, FreePBX 1.818.210.58-1, is installed

  • If FreePBX-Distro-1.818.210.58-1 was already the installed version, check for and apply any FreePBX module updates using Admin > Module Admin. In particular, ensure the "Backup & Restore" module is up to date. As of 2013-06-01, the version of this module is 2.10.0.41.

Verification of desired version

cat /etc/asterisk/freepbxdistro-version
1.818.210.58-1

Quiesce the current system to be upgraded

  • Ensure the current system is in a maintenance window – the current server will be unavailable for normal use from this point on

  • Disable SIP and IAX trunks on the current system using Connectivity > Trunks > Disable Trunk to ensure the current FreePBX install does not try to connect to trunk providers after this point

  • Ensure that no files on the system can change after this point, such as new voicemail messages being left. The recommended option is to change the IP address of the old system to a new value to ensure it is not reachable at its old address but still available on the network.

Back up the current (old) system to be upgraded

Use the FreePBX Backup & Restore module to create a full backup of the current FreePBX configuration and files, including system audio and user voicemail. See Backup and Restore for details on the backup module's operation.

For example:

  • Create a new backup job called "freepbxmigrationbackup"

  • The items in the "Full Backup", "System Audio" and "Voice Mail" backup templates should all be included in this backup

  • Backup to the storage location "Local Storage (local)"

  • Do not define any schedule for the backup

  • Save the backup job

  • Select the new backup job "freepbxmigrationbackup" on the right and click the "and Run" button to run the backup immediately

Copy the newly created backup file /var/spool/asterisk/backup/freepbxmigrationbackup/(file).tgz on the old FreePBX system to an accessible network storage location, a USB stick, etc.

Old server hardware migration

  • The old server may have internal VoIP hardware that needs to be moved to the new server and configured there. This process is not covered in this wiki page.

Restore the FreePBX backup on the new system

On the new FreePBX system, restore the backup file.

Log into the FreePBX web console on the new system.

  • Admin > Backup & Restore

    • Restore

      • Browse... > select the freepbxmigrationbackup .tgz backup file created above

      • Go!

        • Select files and databases to restore:

          • /etc and all subdirectories/files: Enabled

          • /var and all subdirectories/files: Enabled

          • PBX Settings: Enabled

          • CDR's: Enabled

        • Restore

          • (Files and settings will be restored)

          • Observe the restore log for any error messages

          • Close the restore window when the restore is complete. The last line of the restore log should be "Done!"

Various restoration fixups and updates

Manual edits to reflect new database passwords

/etc/freepbx.conf manual restoration cleanup

  • The following error was seen in the restore log when doing a migration:

... Restoring files... /bin/tar: ./etc/freepbx.conf: Cannot open: File exists /bin/tar: Exiting with failure status due to previous errors ...
  • To fix this up, manually compare /etc/freepbx.conf on the new system to the same file on the old system and ensure it contains the same contents with the exception of AMPDBPASS line. The AMPDBPASS should be left at whatever randomly generated password was created when the new FreePBX Distro system was installed. Typically, the two freepbx.conf files will already be identical except for the password.

/etc/asterisk/cdr_mysql.conf password update

  • On the new server, edit the file /etc/asterisk/cdr_mysql.conf. Change the listed password in the "password = " line to be the same as the newly generated password listed in the /etc/freepbx.conf file on the new server.

Remove obsolete files on the new server

  • Delete the file /etc/asterisk/freepbxdistro-version on the new server which was placed there by the backup restore – this file is no longer used on the 2.210.62 version of FreePBX Distro, having been replaced by /etc/schmooze/pbx-version

Voicemail file timestamp restoration (optional)

  • The restoration of voice mailbox files doesn't preserve filesystem timestamps. Voicemails will still show in ARI with correct time the message was left but it is useful to have the file system timestamps match the time the message was left. To preserve these, use rsync to synchronize the /var/spool/asterisk/default folders from the old server to the new server. For example, run from the new server:

New system IP address change

  • Change the IP address of the new system to be the same as the original IP address of the old system (recommended)

  • Alternatively, if using a different IP address than before (the harder option), edit site DHCP settings (typically, DHCP option 66) and Endpoint Manager settings to reflect the new FreePBX Distro server IP address after performing validation, below

Migration validation, part 1 (basic functionality and data transfer)

Perform all these steps on the new server.

Restart FreePBX

  • Restart FreePBX on the new system with the command "amportal restart". Ensure the restart happens without any error messages displayed.

  • Expected output

Reboot the server

  • Reboot the new FreePBX Distro server to ensure it restarts OK and starts FreePBX on a reboot

Check CDRs

  • Log into the web console. Check call display records with Reports > CDR Reports. Ensure historical call record data is present.

Check extensions

  • Check Applications > Extensions to do a quick check that all extensions are present

Check voicemail

  • Do a quick check of /var/spool/asterisk/voicemail/default/(extension number) to ensure greetings and voicemail messages are present

  • Do a comparison of the number of files in the voicemail folders on the old and new servers. Run the following command on both old and new servers. The counts should match exactly.

  • Log into the end-user ARI web interface at http://(newserver)/recordings for a test user and confirm voice mail messages are present with the expected times. Play a test message to confirm audio contents.

Check phone registrations

  • Connectivity > OSS Endpoint Device List

    • "Current Managed Extensions" section

      • ensure all expected phones are listed and that the connectivity icon next to each is green, indicating phones have successfully registered with the new server (note: phones will only connect to the new server at this point if the new server is using the same original IP address of the old server)

Migrate /tftpboot files

Phone firmware and settings files in /tftpboot will be missing at this point and need to be restored. These may not be present on the old server but often are present. These files are managed by End Point Configuration Manger module,

Rsync transfer of /tftpboot files

  • Transfer the /tftpboot files from the old server to the new server. On the new server, run:

  • Verify the files are still owned by the "asterisk" user and "asterisk" group

Check for updated phone firmware files

  • Connectivity > OSS Endpoint Configuration

    • click "Check for Updates"

    • Download phone firmware updates if any are available

Regenerate phone configuration files using Endpoint Manager and test phone registration by rebooting all phones

  • Connectivity > OSS Endpoint Device List

    • Global Phone Options > "Rebuild Configs for All Phones" > enable the "Reboot Phones" option under this button

    • click the "Rebuild Configs for All Phones" button

  • All phones should reboot at this point

Migration validation, part 2 (phone TFTP configurations and registration)

  • Ensure phones reboot OK and come up normally with a successful registration to the new PBX and with the correct time

  • Check phone registrations in Connectivity > OSS Endpoint Device List as above to ensure all phones are listed with green connection icons after they reboot

  • Reset a test phone to its factory configuration and ensure it is configured correctly on a reboot using TFTP settings from the new server

Migration validation, part 3 (internal calls and voicemail)

Place a test internal call

  • Call from one internal extension to another and ensure the call works as expected

Test voice mail

  • Call from one internal extension to another. Leave a test voice mail message. Ensure the destination phone starts indicating a new message. Check the message from the destination phone and verify the message audio. Delete the test message.

 

Enable external trunks

  • At the point, the new system is ready to receive incoming external calls

  • On the new system, enable external SIP and IAX2 trunks that were previously disabled on the old FreePBX system

    • Connectivity > Trunks > Disable Trunk > Disabled: uncheck this option and Submit Changes > Apply Config each for trunk

  • At this point, the new system has gone live to external callers

Migration validation, part 4 (external trunk validation)

Validate trunk registration and peers

  • Reports > Asterisk Info

    • Sip Info

      • Check the Registry and Peers reports to ensure expected trunk registrations and peers are present

    • IAX Info

      • Check the Registry and Peers reports to ensure expected trunk registrations and peers are present

Validate incoming and external calling through external trunks

  • Place an external call through a SIP or IAX2 trunk and ensure this succeeds. The Asterisk live output console ("asterisk -r") can be used to view the call progress details.

  • Make a test incoming call through an external trunk. Ensure the system greeting, IVR, and so on are working as expected.

  • Confirm audio quality is as expected for external calls

Backup configuration of the new system and first backups

Migration backup job cleanup

  • Admin > Backup & Restore

    • Select the "freepbxmigrationbackup" backup job created on the old system to do the migration backup. Click the "Delete" button to remove it.

First backups of new server

No backup .tgz files were been transferred from the old server so the new server is without any backup history at this point. Do an initial manual backup of each backup job on the new server.

  • Admin > Backup & Restore

    • . Perform a manual backup of each backup job to create a backup file for each job by clicking the "and Run" button for each backup job.

The migration is complete at this point. The new server is now in production mode.

Next steps

Update the new FreePBX server with current patches

  • The "FreePBX Distro 2.210.62-6 ISO" image used to create the new server is not most recent code in the 2.210.62 track and the whole track has also reached end-of-life. Check the wiki page for this FreePBX Distro track and apply any pending updates or upgrade the whole system to a newer distribution track. The normal upgrade scripts described in the wiki can be used at this point to upgrade the system.

Old server decommissioning

  • Let a week or so pass to test the new server in nomal use

  • After it is known that no settings or files were missed or are still needed, securely wipe the old server to remove potentially sensitive voicemail files and other user data

Unable to render {include} The included page could not be found.