Migrating from FreePBX® 12/13/14 to 3CX
On this topic
In order to help you migrate to 3CX, we made an open source converter to convert a FreePBX ® 12/13/14 configuration / backup to a 3CX backup that you can import into a new installation. The converter runs as an online service on https://converter.3cx.com - you upload your backup, enter registration details, and get an email with links to your 3CX backup and license key.
Step 1: Take a backup in FreePBX®
To take a Backup on FreePBX® 12/13/14, log into the server as an administrative user and click on “Admin” > “Backup & Restore” on the menu, then click “New Backup” as shown below:
Give the backup a name under field “Backup Name”.
In the Items list, click the “+” button to add the following items:
- File: /var/lib/asterisk/astdb.sqlite3
- File: /etc/asterisk/extensions_additional.conf
- File: /etc/asterisk/sip_additional.conf
- File: /etc/asterisk/iax_additional.conf
- File: /etc/asterisk/manager.conf
- File: /etc/asterisk/voicemail.conf
- Directory: __ASTVARLIBDIR__/sounds/custom
- Directory: __ASTVARLIBDIR__/sounds/*/custom
- MySQL: Config server
Under the Backup Server section, pick a backup location for e.g set “This server” in the dropdown then drag-drop “Local Storage” from the “Available Servers” list to the “Storage Servers”.
Click “Save” and then “Save and Run”.
Once the Backup is completed popup shows “Backup successfully completed!”:
Open a file transfer client such as FileZilla Client or WinSCP, and open an SSH connection to your server.
Then browse to the backup location, which is by default /var/spool/asterisk/backup/NAME_OF_YOUR_BACKUP and download the *.tgz file located there:
Step 2: Upload backup to Converter
Now upload the backup on https://converter.3cx.com
- Browse to the TGZ file to upload and convert.
- Specify your extension length - Extensions length has to be standardized. If you select an Extension length of 4 digits, and have extensions with less digits, then it will make them 4 digits by adding zeros upfront. If you have an extension of more than 4 digits then it will be skipped and after the conversion is complete, the email will show a list of errors: “Extension 10000 was not imported due to length longer than dial plan size (5 vs 4). Recreate it manually or run the tool again and modify options.”
- Specify your email address.
- Click Upload.
- Now input your Registration Details to get a FREE 3CX license key
- Click Submit.
Your backup will now be scheduled for conversion and you will receive a confirmation email once this is done. The license key will be included in the email.
Note: Extensions numbers conflicting with system extensions are not imported (Fax, PIN protect, conference menu, and special menu). Other unsupported extensions types are not parsed.
Step 3: Install 3CX and Specify Backup File
Install 3CX. After the OS is installed, you will be prompted whether you want to setup a new PBX or restore one. Select “Restore” and specify the path to the restore file you downloaded.
The PBX will now be configured and you will be asked some questions as per the Administrator manual.
Once finished with the setup wizard and license is activated, you can then go through each node of the management console and configure them accordingly.
Step 4: Import DIDs
Once your PBX is configured, you can import DIDs & inbound rules. If you only have one trunk you can keep trunk number 10000 and import as is from the Inbound rules node / Import button.
If you have more trunks, you will then need to verify what is the internal trunk number by doing the following:
- Go in SIP Trunks node
- In the Search bar, type 10000 and wait a couple of seconds, the list will refresh showing only the one trunk matching this number
- Increment value by 1, and see which trunk matches, and so on
- Open the CSV in Notepad++ and adjust the “PORTS” column value which is set by default to  for all rules to the corresponding virtual number. Save
What is Restored
SIP and IAX extensions are restored, with:
- Extension number
- Name (Caller ID field will be split as First Name/Last Name in case it has one space, if none or more then all goes as First Name)
- Email, if voicemail feature was configured
- Outbound caller ID
- SIP ID
A random PIN number is generated for the voicemail of the extension, which will be enabled by default. The operator extension designated will be the first extension parsed. All extensions will be added to an ELASTIX default group, with the User’s role.
SIP trunks are restored, with their:
- Registrar Host
- Registrar Port if specified, otherwise 5060
- Main number
- Default Outbound Caller ID
- Number of maximum calls
A trunk virtual number will be created for each, starting from 10000.
The default route will be the operator extension.
In 3CX inbound rules have to be bound to a specific trunk, while in previous versions they were not. Therefore it can’t be restored blindly. We generate a CSV which includes all your DIDs and CIDs, with their route (if extension, IVR, or voicemail).
Trunk number is set to 10000 by default and needs to be adjusted manually before import.
DIDs shorter than 4 digits are not imported as this is the minimum length accepted by the system.
The following settings are restored from the outbound routes:
- First dial pattern, given that it has exact match prefix and prepend values only*.
- Up to 5 trunks sequence
- Position of the route
- Emergency route, if so an emergency number is added in PBX settings, but just the route 1 will be considered, and no append value.
*Outbound routes with complex dial pattern expressions with letters or symbols (dash, dot) will be ignored.
IVRs are restored with the below information:
- Timeout destination if Terminate, Extension, other IVR, VM of an extension. Others are replaced by Terminate call.
- Invalid input destination if Extension, or other IVR. Others are replaced by Repeat prompt.
- Menu options for digits 0 to 9, if Terminate, Extension, other IVR, VM of an extension
- Announcement + custom system recording associated
The system recording WAV file is converted automatically to the standardized audio format accepted by the system (WAV, Codec: PCM, Bit rate: 8Khz, Sample: 16bits, Mono).
All blacklisted numbers are restored, with their name and number.
The following feature codes are restored as dial codes:
- Dial voicemail
- Pick parked call
- Intercom prefix
- DND ON
- DND OFF
There are other things that will not be present in FreePBX® but should be present in 3CX.
Example: Tunnel Password, Default fax extension password, and provisioning subfolder name. Those are generated with random credentials.
The admin notification email will be the admin user email address set in the conversion form.
The admin password will be the md5 hash of your current password, as read from file /etc/asterisk/manager.conf, under “admin” / “secret” section.
FreePBX® is a Registered Trademark of Sangoma Technologies. This trademark is not affiliated with 3CX, its products, or its websites. Sangoma Technologies is not the source of, and does not sponsor or endorse, the products/services promoted here. 3CX is not associated with or sponsored by Sangoma Technologies.
All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.