User Rating: 5 / 5

Star Active Star Active Star Active Star Active Star Active
fusionpbx-billing.png

For a long time, I have been working on the Billing/LCR for FusionPBX in-app software.

The LCR software has the main objective to help you to save money by selecting automatically the cheapest route depending on your destination. However, LCR is more than that. LCR allows you to have smart fault tolerance, it will always try the first best option, then the second-best option which is not always the same.

The BIlling software allows you to bill for your PBX use. You will be able to bill by the minute, by the call or a combination of both. It also allows you to deal with different currencies and

I am very proud to present version 1.2.0 with the following outstanding changes. 

Before I forget, you can download it from OKay's download area, or if you are a CentOS user, you can get the RPMs which does the installation process really easy.

Outstanding Changes

LCR: Priorities for Carriers and Gateways

You can create groups of carriers by assigning the same carriers. Let's say you have carriers that offer grey routes and carriers with premium rates. According to your policy, and for the sake of the economy, you want to try first all the grey routes regardless of the rate. LCR will then try all the grey routes before trying the best premium one.

LCR: Diversion Header Support

Some advanced carriers require the Diversion header before allowing you to do Caller ID spoofing. The LCR software is now able to send the correct header. You may require the additional Diversion for FusionPBX in-app.

LCR: Evaluate the Best Match of Each Carrier

This is a tricky one and it seems all the websites I was consulting about LCR have this problem. I think I figure it out.

The problem resides when you are using different carriers using different breakdowns and different rates. Let's do an example, let's say:

  • Carrier A:
    1: 0.01
    1613: 0.003
  • Carrier B:
    1: 0.0025
    1613700: 0.004
  • Carrier C:
    1: 0.009
    1613: 00.0033

If we want to call 1 613 700 9999, the default logic in most LCR software is to select the best fit. In this case, the best fit is Carrier B, however, it is not the cheapest option. The new LCR logic needs to evaluate the best fit of each carrier, not the general best fit. The best fit of each carrier gives route 1613 from Carrier A as the best option.

LCR: Importing Rates from CSV Revamped

Before 1.2.0 the importing rates from the CSV file were really ugly (but working). I have reworked that part to present it really beautifully using FusionPBX skin.

LCR: Importing VOIP MS Rates Online

Some carriers such as VoIP MS have an API where you can check the rate in real-time. Taking advantage of this, LCR for FusionPBX can update this carrier without importing the CSV manually.

LCR: SQL Queries Optimized

The LCR software uses the mod_lcr module from FreeSWITCH. If you take a look at the query, you will realize it is quite complex. It has three or four inner joins depending on the profile you are using. Adding the best match of each carrier policy stacks additional complexity. Without the proper optimizations, the query would take up to 30 seconds; by changing the query, I have figure out to make it run in less than half a second.

Billing: Minimum Top Up Amount

For whatever the reason is, you may want to specify the minimum top-up amount your customers need to pay. This value can be set as a general default setting or a plugin-specific default setting. If both settings exist, the system will require greater value.

Billing: Pay the Balance in Full

Postpaid customers can be forced to pay all the amounts of their balance.

Billing: Disabled Payment Buttons when Processing

Some users have been reporting that their customers got charged twice. After they kindly researched why that happens, it seems people click more than once on the paying button causing the browser to charge double. To void this scenario, the payment button gets disabled after the first click.

Billing: New Default Settings

We are following the FusionPBX naming convention. All the default settings with a dot are not deprecated. They do still work but if you have paypal.enabled and paypal_enabled, the second one will have priority. The dot default settings will be eliminated in 1.3.0 or 2.0 (depending on where we get first).

What New Features are Coming?

Although I can't promise that this will happen for sure. I have the following features in my sight:

  • IntraLATA Support for the LCR. Most carriers give you a flat rate to a given destination regardless of the caller ID. However, some other carriers can give you lower rates depending on the caller ID (also know as IntraLATA). This is very common in the USA. The idea is to let the LCR for FusionPBX to use IntraLATA and a flat rate rating list mixed, so you get the best of both worlds.
  • Different currencies for different carriers. Have you found a very cheap carrier that gives you prices in another currency different than the USD? If the answer is yes, at this moment you can't load its rates right away, you would need to convert the rates to USD (or the default rate of the other carriers) to let the LCR do a fair comparison. Because the rate of the currency versus the USD is variable always and because the VoIP profits are less than cents you can't afford always to absorb the variance on some currencies; therefore, this workaround would fail. The idea here is to allow the LCR to evaluate correctly the rate by converting it in real-time.
  • WHMCS Hookups: if you like me love WHMCS, you will realize that it is all about hookups to push information to external systems. The idea here is to allow WHMCS to push information into the FusionPBX to let it know about purchases and payments done.
  • More payment plugins.
  • Packages support. The idea here is to allow you to do some crazy packages like 5$ monthly for the first 100 minutes to the USA or Canada.
  • Balance transfer. Line some other companies, the idea here is allowing your customers to gift some balance to others.

If you feel you need some of this or another new capability, don't hesitate on contacting me, you could sponsor one and speed up the process.

P.D. Don't forget to support the open-source funding.

blog comments powered by Disqus

About

Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.