How to Perform Full Migration from Elastix to Issabel

RoohAllah GodazgarIT Consultant
Network will always be everything !!
If you try to migrate from Elastix to Issabel, you will face a lot of issues. These problems are inevitable but fortunately, you can fix them. In the guide below, I will explain how I performed the migration while keeping all data and successfully transferring all configurations.

If you try to migrate from Elastix to Issabel, you may face a number of problems. Some of these are listed below:

  1. In the migration process, you may see failure logs in different steps; especially Asterisk database.
  2. After migration, you may face permissions errors.
  3. If you are using 3rd party add-ons, you may lose some data or face login problems.
  4. After migration, you will most likely face problems in SIP and Trunks registration.

These problems are inevitable but fortunately, you can fix them. 

In the following steps, I explain how to perform the migration, retain all of your data, as well as transfer all of your configurations.

Please be aware that this is NOT an "official" approach and I strongly suggest that you test it first.

Step 1: Know your system

Before starting to even think about migration, you should gather as much information about your Elastix server(s) as possible and have a complete perspective about your own scenario. Even if you already have full documentation about the configuration of your own system, check it out one more time to make sure that you haven’t missed anything.

Don't forget about your 3rd party add-ons too. How to revoke your licenses, where they get their data from and so on.

This specific step is not part of the migration process, but when you need to solve any possible post-migration problems, you should know your system head to toe.

Step 2: What you should backup

This step contains 6 different tasks that you MUST perform:

  • Backup or revoke all of your 3rd party add-ons, licenses and data:

If you are using 3rd party add-ons that require a license, read up about how to move your license in its documentation. For example, I’m using FOP2 and before deleting the OLD VoIP Server (Elastix), I ran the command below to test and revoke my license:

/usr/local/fop2/fop2_server --test
/usr/local/fop2/fop2_server --revoke

Note that some of these add-ons will ask you for your activation code; so make sure that you know how to achieve that as per the previous step.

Also, you should make sure that these add-ons are using Asterisk data. If they are using other data that Asterisk is not the owner of, you should back them up as well.

  • Backup your Elastix without “Monitors”, “Voicemails” and “Menus and Permissions”:

“Monitors” is your call recordings, so if you check this option, it may take a long time to complete the backup. You can also back them up manually.

  • “Voicemails” is the same as “Monitors”.

If you check “Menus and Permissions”, it will back up your users and groups. Now there is a high possibility that when you restore your backup in Issabel, you will lose your administrative access to this section; so don’t backup this section.

To backup your Elastix system, please proceed to “System > Backup/Restore” Section through its web interface:

Backup files are stored at “/var/www/backup/” so you can download them via FTP.

  • Backup your Sounds if you are using customize Sounds:

You may be using a customized sounds base on your language. If you want, you can download them from “/var/lib/asterisk/sounds/” via FTP.  You don’t need to backup system default sounds.

  • Backup your Recording files:

If you want to keep your recording files, you can download them via FTP from “/var/spool/asterisk/monitor/”

  • Backup your Voicemails:

Same strategy as recording files, but from this directory: “/var/spool/asterisk/voicemail/”

To speed up data transfer time, you can compress these directories and then download them.

  • Backup the asteriskcdrdb database:

Finally, if you want to keep your CDR Reports, you need to transfer this database, but there is a tiny problem. I don’t exactly know if that this is done purposely or not but in this database, you will find a lot of duplicate entries for “uniqueid” column in “cdr” tables! 

These duplicate entries create when you transfer a call from one extension to another. Based on this fact, when you restore your backup, you will see a FAIL status in front of “Restoring Asterisk DB”:

Restoring Asterisk DB... ERROR 1062 (23000) at line X: Duplicate entry ‘Y’ for key 'PRIMARY' FAIL

X is the first line that this duplication happened and Y is the value of uniqueid for that entry.

If you want, you can create a file like “sql.txt” in any directory and perform this command to see how many duplicate entries you may have in this column:

mysql -u root -p -e 'SELECT uniqueid, COUNT(1) as CNT FROM cdr GROUP BY uniqueid HAVING COUNT(1) > 1;' asteriskcdrdb > sql.txt

If there are no duplicated entries you will be fine and you can skip to the next step, but even one duplicate entry will cause the above error.

The only way to restore this database is to dump it from your old server (Elastix) and transfer that dump to your new server (Issabel) Then transfer its data to your database. To do that you can use the following command:

mysqldump –u root –p asteriskcdrdb > asteriskcdrdb_dump.sql

You will not see any progress bar and confirmation, so you can use the following command to check your dump status:

head -n 5 asteriskcdrdb_dump.sql

This command will have an output like this:

SQL dump fragment

-- MySQL dump 10.13Distrib 5.7.16, for Linux (x86_64)


-- Host: localhostDatabase: asteriskcdrdb

-- ------------------------------------------------------

-- Server versionyour-server-version

This database is included in our Elastix backup and you can find it in “mysqldb_asterisk.tgz” in the main .tar file but I recommend that you back it up manually.

After you’ve completed these tasks, copy them to a safe location outside your server. 

Now you can delete your Elastix, but if you have enough space to create your Issabel PBX, you may want to keep it a little longer in case something goes wrong. Do disconnect it from your network though.

Step 3: Installing Issabel PBX

To make sure that the migration will be successful, install your Issabel PBX exactly as your Elastix was installed, especially your passwords. You can configure your network with a different IP but if you want to register all your devices without changing their configuration, you can change the Issabel IP to your Elastix IP after you have disconnected Elastix from your network.

After Installation or during installation progress, create your route files if you have any.

If you want to update your system, you may do that before migration as well.

There is a tricky approach for your 3rd party add-ons. You should install some of them before migration and some of them after migration. This approach is not exact, but in my case, I installed FOP2 and CDR Report add-ons after migration.

Step 4: Migrate from Elastix

Upload your Elastix backup file, using the Issabel web interface:

Depending on your backup file size, this process may take some time to complete. Once done, you will see a “Migrate from Elastix” option as shown below:

When you press this bottom, the migration process will start. If you have any duplications as explained in step 2, you will see an output like this:


Openning backup file... OK

Elastix Version OK

FreePBX Version OK

Backing up actual configuaration to /var/spool/issabel_migration.1515629243... OK

Restoring Asterisk DB... ERROR 1062 (23000) at line 423: Duplicate entry '1506766190.1105' for key 'PRIMARY'


Restoring Asterisk files... OK

Restoring Web DBs... OK

Restoring Asterisk Sound files... OK

Restoring astdb... OK

Restoring MOH files... OK

Restoring Enpoint configs... OK

Restoring Faxes... OK

Restoring Emails... OK

Restoring Monitor files... FAIL

Restoring Voicemail files... FAIL

Updating IssabelPBX module: cidlookup


Updating IssabelPBX module: core


Updating IssabelPBX module: framework


Updating IssabelPBX module: fw_ari


Updating IssabelPBX module: pbdirectory


Updating IssabelPBX module: phpagiconf


Updating IssabelPBX module: printextensions


Updating IssabelPBX module: restart


Updating IssabelPBX module: speeddial


Updating IssabelPBX module: cidlookup


Updating IssabelPBX module: core


Updating IssabelPBX module: pbdirectory


If not, the 5th line will return a “Done” status.

If you face a log like mine and you want to restore your CDR reports, you should perform the next step, otherwise, skip it.

Finally, to ensure everything will work fine, reboot your server.

If anything is not working, go to “Unembedded IssabelPBX” and apply your settings from there.

Step 5: Restore your CDR reports

Upload asteriskcdrdb_dump.sql in any directory that you want and run the command below in that directory:

mysql –u root –p asteriskcdrdb < asteriskcdrdb_dump.sql

This command will copy all tables in your sql dump file to an asteriskcdrdb database. 

Please be aware that you do not need to drop this database and create it manually (this method is recommended in different sources); If you do, all relationships for this database will be lost!

Step 6: Restore your Monitors, Sounds and Voicemail files

To restore these files, simply copy your backup files to their designated path:

Monitors: /var/spool/asterisk/monitor/

Sounds: /var/lib/asterisk/sounds/

Voicemail: /var/spool/asterisk/voicemail/

After the transfer completed, you should change the owner of these files by the following command. Consider “test” as your main directory that you want to change ownership to:

chown –Rf asterisk:asterisk test

You don’t need to do this for all files and folders that you’ve transferred; only run them on subfolders. The “Rf” option that came after “chown” command, will change ownership of all files and folders inside your main file that you ran this command on, it to your specified owner as well.

Step 7: Test your system

Your migration is complete. To ensure that everything is working as it should, test all your communications. Test all your trunks for inbound and outbound calls, your scenario, internal calls and so on. It is most likely that you will face some problems with your trunks, so to solve them you can simply apply your configuration from “Unembedded IssabelPBX”.

Please note that I am not an asterisk expert or have a deep knowledge of SQL. I simply faced a condition that made me perform this migration, so if you find any mistakes, please notify me in the comments below. Also if you have a better approach to any of the steps, please share them with us.

You can read this article in the Persian language by clicking this link.

RoohAllah GodazgarIT Consultant
Network will always be everything !!

Comments (2)

bonjour !!!
j'essaye d'installer issabel ,pas de soucy au niveaux de l'install,par contre je n'arrive pas à faire des appels sortant alors que mon trunk est registred
est il possible de faire un tuto sur la config du trunk de la route sortante et entrante je tourne en rond ca magace.
merci !!!
RoohAllah GodazgarIT Consultant


bonjour !!!
j'essaye d'installer issabel ,pas de soucy au niveaux de l'install,par contre je n'arrive pas à faire des appels sortant alors que mon trunk est registred
est il possible de faire un tuto sur la config du trunk de la route sortante et entrante je tourne en rond ca magace.
merci !!!

Dear Sergio,
Would you please ask your question in English. I'm not familiar with French.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.