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

Content

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

Billing for FusionPBX Installation

Before you start Billing for FusionPBX installation, you must satisfy 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.
  • You need to have LCR for FusionPBX installed.
  • 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 a Billing for FusionPBX license.

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/app
  2. Copy LCR for FusionPBX in the server (by FTP or SCP), you can place it in /tmp directory
  3. Execute the command  tar -jxvf /tmp/billing-crypted.tar.bz2
  4. Go into /var/www/html/app/billing directory and execute echo -n key > any_name.key command, where key is your license number. Since version 1.0.1 license name can have any name with .key extension.
  5. Copy niblebill.conf.xml into autoload_configs directory (for example: /etc/freeswitch/autoload_configs/).cp niblebill.conf.xml /etc/freeswitch/autoload_configs/. Edit niblebill.conf.xml file and change the DSN values with yours.
  6. Log into FusionPBX as superadmin and go to System->Modules menu, enable and start Niblebill module.
  7. Go to Advanced->Upgrade menu, select Schema and Menu Defaultsfusionpbx-upgrade
  8. Review groups and menu permits
  9. Logout and login again into FusionPBX

Billing for FusionPBX Configuration

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

Profile
A Profile is used to define a billing. Each profile is identified by a unique label.
Billing Cycle
A Billing Cycle defines the billing day. Static charges will take place this day.
Billing Type
A billing type may be pre or post paid.
Amount
The specific amount, on post-paid profiles it establishes the maximum credit a profile may have. This value is zero for pre-paid profiles. You must define billing currency, the system will use external services to do the rating.
LCR profile
LCR profile is a pricing list. By changing this label, you may have more than one pricing list.
Refered
Referal fields let you reward your users just because they recommend your service.

After:

  1. Go to Apps->Billing menu and add a profile
  2. Fill the next information
    fusionpbx add new billingSelect FROM and TO depending who shall send the billing to who. Data will be taken according to information in Contacts application; you can go to App -> Contacts menu to fill information.
    In most cases, using billing per tenant is enough, but there are specific cases where an alternate code is required, especially if you need more than one billing profile per tenant; in this case, select the by-code option. The value entered in the Criteria Value field needs to be in place on all other FusionPBX items.
    Select the billing day cycle, to make things simple it is only allowed from 1 to 28.
    The Amount field is read-only, you must select the currency for billing. Once the currency is set, you won't be able to change it.
    Delay days field is not used.
    Balance is a read-only field.
    LCR profile field will tell the profile what pricing list to use. By default it is 'default', by adding a new profile means to modify file lcr.conf.xml.
    Referal fields are sued to reward your users because of recommendations.

Remember to fill the accountcode field with correct value when creating items in FusionPBX.

Maintenance Tasks

Crontab configuration

The following files can be edited and place into a crontab:

  1. billing_crontab_pyramid.php
  2. billing_crontab_lowbalance_email.php

Billing logic change

Sometimes, you may need to change billing logic (only in specific cases). You can edit the file resources/functions/ratings.php

Billing for FusionPBX update

You may follow the installation procedure for any update

Elsewhere External Places

About OKay

An IT Compnay 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.