Designing a hosted PBX system

Some of the questions we get  in relation to lazy PBX are about the technology behind it.
I’m posting some insights into what’s under the hood.

we started with some basic requirements

  • It must be responsive.
  • It must be scalable.
  • It must be easy to extend.
  • It must be easy to support.
  • Hardware agnostic

Our choice was to firstly decouple the ‘front-end’ from the ‘back-end’.  In plain english we separated the ‘graphical PBX program’ from the actual PBX system.  So the lazyPBX application is built as a HTML5 application which communicates through an interface with the actual PBX application.

In fact what happens when you startup the lazyPBX application is

  1. the html web page loads
  2. the html web page loads the javascript application builds the ‘Graphica User Interface’ (GUI)
  3. the javascript application then remotely loads a json schema from the application server which describes the available ‘PBX library’ (including all parameters and rules etc.)

There are a couple of nice things about this;

Firstly because the GUI PBX builder application is completely separate, it does not require any updates when changes are made to core PBX functionality.

Secondly the separation of design means we have a clear API so any third party application (using any technology) can be easily created to interface with our  ‘PBX application’  in the future.

Thirdly the provision of the ‘PBX library’ through a schema ( the schema defines the blocks available, the parameters for the blocks, the rules for parameters and rules for connection) means the constructed call flow can be validated without bothering to communicate with the PBX application.

Furthermore the actual call handling PBX servers are separated from the application server to provide scalability.

When a new PBX is created the result is a json file (similar to the schema) which describes the PBX, this is then processed by the PBX app and translated to native PBX instructions.

The fig. below gives some insight into how communication works

Diagram of Lazy PBX architecture
LazyPBX architecture overview

Some of the actual technologies used in this application are

  • Apachedoing the web serving and some proxying
  • php5 – providing core web-app functionality API handlers, RPC handlers etc..
  • MySQL – database
  • JQuery – building javascript applications
  • Asterisk – most of the PBX call functionality
  • OpenSIPs – SIP routing
  • PowerDNS – Slave DNS servers

Leave a Reply