This manual will guide you on every detail about how to install and use the LCR for FusionPBX native application.  If you want to have a quick setup, you may read the quick guide and later return here.


  1. LCR for FusionPBX installation
  2. LCR for FusionPBX configuration
  3. Maintenance Tasks

LCR for FusionPBX Installation

Before you start LCR for FusionPBX installation, you must satisfy the next requirements:

  • You need to have FusionPBX 3.6 or better installed with MySQL, MariaDB or PostgreSQL as database data storage.  If you don't know how to do this, OKay offers Linux consultant services.
  • You need to have PHPShadow extension installed. If you are using OKay's RPMs you can type yum install php-shadow-loader. If you prefer the manual installation, you can go to and follow the directions.
  • You need to have SSH access and to be able to write in /app directory where FusionPBX is installed.
  • You need to have access to FusionPBX as superadmin.
  • You need to download and get an LCR for FusionPBX license.
  • You must have installed the mod_lcr module. The installation procedure depends on how you installed FreeSWITCH: source, DEB's, RPM's.

When you satisfy these requisites, please follow the next steps:

  1. Go to app directory where FusionPBX is installed, for example: cd /var/www/html/fusionpbx/app. If you are using the default FusionPBX installation script, it is very likely the path is /var/www/fusionpbx/app.
  2. Copy LCR for FusionPBX in the server (by FTP or SCP), you can place it in /tmp directory
  3. Inside the app/ directory, execute the command tar -jxvf /tmp/lcr-crypted.tar.bz2
  4. Go into /var/www/html/app/lcr directory (or the right directory where you installed) and execute echo -n key > any_name.key command, where the key is your license number. Since version 1.0.1 license name can have any name with .key extension.
  5. Depending on which database you use, copy lcr.conf.xml.mysql, lcr.conf.xml.mariadb104 or lcr.conf.xml.pgsql file into autoload_configs directory (for example: /etc/freeswitch/autoload_configs/) cp lcr.conf.xml.mysql /etc/freeswitch/autoload_configs/lcr.conf.xml. Edit lcr.conf.xml file and change the DSN values with yours. The DSN values can be taken from the file /etc/fusionpbx/config.lua.
  6. Log into FusionPBX as superadmin and go to System->Modules menu, enable and start LCR module.
  7. Go to Advanced->Upgrade menu, select Schema and Menu Defaultsfusionpbx-upgrade
  8. Go to Advanced->Group Manager and review the LCR permissions, you should have it at least for the superadmin.
  9. Logout and login again into FusionPBX

LCR for FusionPBX Configuration

To configure LCR for FusionPBX, you need to understand the next concepts:

A Carrier is a company that provides VoIP services. For example To Call Me.
A Gateway is a SIP access definition (server, port, user, password, etc). A Carrier can have zero or more linked Gateways.
A Channel shows how many simultaneous communications a Carrier can do. This value is only useful to control outgoing calls.
The Codecs are set in a string (comma separated), they define the type of codec a Carrier has. Not all Carriers have the same codecs. If this string is empty, FusionPBX will send the default value set in System->Variables menu.
A Suffix adds a string before sending the dialstring to Carrier. Some Carriers need a suffix to give you service.
A Rate defines how much does it cost to connect to a destination if the digits match.


  1. Add all the needed Gateways. Go to Accounts->Gateways menu. Technical information for each Gateway must be acquired from your Carrier.
  2. Go to Apps->LCR menu and add a Carrier.FusionPBX add new Carrier
    Carrier' s name must NOT have spaces. The channel number must be a positive integer if you don't know this value uses a safe value. Select true for Enable field. Save the Carrier.
  3. Edit the new Carrier, you will see you can add new information.
  4. If your Carrier is for outgoing calls, link the Carrier.FusionPBX link Carrier
    Select the Gateway (prefix) you want to link. If your vendor needs a suffix, you can configure it here. Specify the Codec string, for example 729, GSM, PCMU; you can leave this parameter blank, the system will use codecs from FusionPBX. Select true to Enable field.
  5. Add a rate. You will see later how to upload a CSV file.FusionPBX add Rate
    FusionPBX add rate 2
    Specify which digit will identify this rate (rates are selected using the most exact match, a 1613 prefix will hit instead of a 1 prefix). Select if this rate will be for incoming, internal (for extension to extension, or from extension to an internal component, such as a conference hall) or outgoing call. Tell this rate cost and currency. Some vendors give a different rate for connection, if you don't know this data, you may let all " rate" fields with the same value. If you are using the original lcr.conf.xm file from LCR for FusionPBX, LCR Profile value must be "default"; LCR Profile is used to allow different rating lists.
  6. You can add rates using a CSV file. The file must have the next fields:
    Destination, Prefix, Connect Increment, Talking Increment, Rate, Currency, Connect Rate, Direction(inbound, outbound, internal), Start Date, End Date, Profile, Random (any value you want).

Repeat steps 2 to 6 for each Carrier you need to add.

Finally, you need to change routes to allow them to use LCR for FusionPBX. Go to Dialplan -> Outbound Routes menu and change dialplans from bridge soafia/gatewa/... to bridge lcr/default/.... Please read Freeswitch documentation if you are not familiar with dialplan syntax.

The configuration file has the nobill profile, that will route without billing. When you are done uploading all your rates, change your bridging statement to lcr/nobill/XXXXXXXX. Usually, lcr/nobill/$1, however, it depends on your dialplan.

Maintenance Tasks

Updating the rates

Updating the rates is maybe one of the most complex and longest tasks. The easiest way to do this is to download the rate list, modify it and upload it again (check the clear ALL rates before importing field).FusionPBX upload rates

LCR for FusionPBX update

You may follow the installation procedure for any update

About OKay

An IT Company whose mission is generating value with low cost of ownership.

We will offer you Linux based solutions that satisfy your needs. We focus on VoIP & Linux, but we are up for any other challenge you may want to bring.