User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
voip-flow.png

A Class 4 PBX? What it is? In short, a class 4 PBX is the one that interconnects different PBX. It is very common that this class of PBX doesn't have contact with end-users. The perfect example of class 4 PBX is the carrier that sells IP telephony companies the DID's (origination) and outgoing gateways (termination). There are more differences between a 5 class and a 4 class PBX, my article about that covers it.

For the sake of this article, let's pretend everybody knows what is a class 4 and a class 5 PBX. Let's discuss FusionPBX. FusionPBX, out of the box brings let's say, 90% of all the needs a class-5 PBX needs: voicemail, IVR menus, time conditions, queues, and a lot of more features that are useless if all you want is a class 4 PBX.

What Matters in a Class 4 PBX?

Fair question. In short, speed is what matters. Think of a class 4 PBX as a switch in an ISP. That switch is connected to more switches and it must be really fast. This is the same case.

Things to Disable in FusionPBX

Dialplans

Regardless of the version you are using, there is a bunch of dial plans you should get rid of right away. Do not delete them, just disable them. The following list is just a sample:

  • user record
  • redial
  • speed dial
  • agent status *
  • group intercept
  • page extension
  • eavesdrop
  • call privacy (maybe)
  • call return
  • extension queue
  • intercept extension *
  • dx
  • att transfer
  • * voicemail
  • * echo
  • is *
  • hold music
  • recordings
  • wake up
  • valet park *
  • operator *
  • call forward *
  • * clock *
  • * conference
  • call screen
  • the local extension (maybe)
  • voicemail

Any display that is not related to the routing should be disabled. Please note that the very first dial plans such as user exists, variables, and others they need to be enabled as they fill the system with very useful variables.

Modules

Did we say speed? Yes, you will need to disable many modules as you can. For starters, the following modules should be disabled:

  • mod_say_*
  • mod_conference
  • mod_voicemail*
  • mod_amd
  • mod_callcenter
  • mod_fifo
  • any codec module you won't use, starting with video codecs and codecs different than 711 and 729.

Useful modules are:

  • mod_bcg729
  • mod_lcr
  • mod_nibblebill (optional)

I highly recommend using my FreeSWITCH RPMs. The mod_lcr is patched to stop trying when a carrier answers with a 404 error code.

Specific FusionPBX Configurations

We haven't finished, we said speed and we are getting speed.

  • Since FusionPBX 4.5, there is a new caching engine called "file", that what it does is creating the XML files in the file system. I personally do not like it, especially when speed is important for us (there are more reasons I won't discuss here). Let's switch that to the original and trusty Memcached engine. This is a parameter you should change in the default settings. After changing that parameter you may want to modify your config.lua scrip or run the upgrade script (whatever you want). Memory access will always be faster than I/O, no matters if you are using an SDD hard disk.
  • Use tmpfs whenever you can. Especially for the operation databases from FreeSWITCH. I do recommend you read my articles regarding speeding up with tmpfs. After all, the RAM is always faster than the I/O of your hard disk.
  • Create a new group, I like to call it "trunk". And link there only the user menus and permissions your users will need. For starters, the Account->User and Application->CDR are some of them (enable the related permissions as well). Hide any class 5 related menu.
  • No registration at all! This is all about speed. You may want to disable the authentication in the internal profile, but hiding the credentials would be enough. Remember to add the CIDR field in each extension you configure, this is crucial.
  • Domains? Since you would be mapping the IP's to a specific extension, this is more a business call. You may want to create one domain per customer or not.
  • Define your billing scheme. The most common is by the minute, but if you want to be out-of-the-box, you could do it by-the-call or unlimited.
  • Get your carriers. I can only recommend myself, you may want to use To Connect Me which includes unlimited termination USA48 and provincial Canada within hired channels.
  • Use LCR for FusionPBX and Billing for FusionPBX. After all, this is a business. The LCR for FusionPBX will allow you to use always the cheaper route, and if it fails for a reason, it will fall back to your second-best route. The Billing for FusionPBX will allow you to bill your users.
  • You may want to use email as a login instead of a FusionPBX user.
  • Call center protection. You may want to be somehow flexible to allow people to use your trunks as a call center but to protect yourself so your carriers wouldn't ban you.
  • Turn on the ring-back right away, this will save you a lot of complaints.
  • Extensions should be created bypassing the RTP.
  • Move the database out of the main server. When you start, it won't make a difference, but as you get more and more calls, the database will grow and a query that delayed 0.005 seconds, it could delay now 1 or 2 seconds.
  • Create an archive database server and just keep the dial plans in the main one. The CDR is the part of the database that will grow all the time. You do not need to present a fast CDR, just keep them when someone needs them.

Should I use the same Server for Class 4 (Wholesale/Trunking) and Class 5 (End-user) Service?

Short answer no!

Long explanation. End-user services are CPU demandant. The RTP processing is very heavy, there is a lot of I/O and the users registering constantly distract the CPU. Better to slipt at least in two different servers.

Support

Too complex? Don't worry, you can always ask me to do this for you.

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.