Creating a VOIP PBX telephone server with Asterisk and FreePBX

One of my current projects is the configuration of a new telephone server running Asterisk and FreePBX.

The copper landline telephones of our past have been mostly replaced by cell phones, and to a lesser extent, Voice over IP (VOIP) technology, which uses Session Initiation Protocol to connect desk telephone to a server running the Asterisk PBX software, whether it be local or external. Consumers typically order 1 or 2 VOIP “landlines,” but business offices still have a large number of desk telephones still in use.

I come to Asterisk VOIP from the the perspective of an old web hosting guy. So to me, Asterisk for telephone servers is analogous to an Apache web server for web pages, or to a qmail/vpopmail toaster for email.

There are several subsystems that work together to create a telephone server:

  • The server’s operating system, typically Linux for a VOIP server.
  • The Asterisk VOIP server and associated plugins.
  • The FreePBX web interface program.
  • An external “trunk” that completes telephone calls at a service provider over the Internet.
  • A set of “routes” that determine how calls are directed between local telephones, or to one or more external termination providers based on least-cost routing.
  • A set of extensions, which include extension numbers, passwords, voicemail boxes, and rules on things like call forwarding.
  • A set of Inbound Voice Routing (IVR) rules that create voicemail menu choices by touchtone.
  • A set of recordings used by the mailboxes and IVRs.

I have the luxury of having an existing system to which I can refer. The existing system uses CentOS, Asterisk, and Elastix HTML GUI.

Although the original server was deployed 9 years ago, the desk phones in the office have all been replaced recently with Cisco SP504G phones.

After surveying options in the marketplace, it was clear that this private little PBX server with 20 clients was only costing C$50/mo. in recurring telecom, vs C$450 for an outsourced solution, based on a few quotes from vendors. So a new build would have to take place.

There are several ways to set up, including virtual appliance images and several installation ISOs that can create a pre-packaged server with much of the configuration work pre-done.

A package called the “FreePBX Distro” is actually a re-packaging of CentOS 7, with Asterisk, plugins, and FreePBX GUI all automatically installed.

There is still a significant amount of work to do, but so far I have been able to configure a “backhaul” connection uses IAX2 between the server and a service provider that will terminate (complete) calls to the outside world. I was able to connect a Cisco SP504G desk phone to make a SIP connection to an extension account on the telephone server, and I was able to make a phone call using that desk telephone to a cell phone answered by a colleague.

More work ahead, especially in terms of the creation of IVR rules and recordings. I plan to test the server with a test phone number, then when it is ready, switch over the main number and all of the desktop phones over a weekend.

Even in an age where office workers use their cell phones for most calls, an Asterisk telephone server can allow for the forwarding of calls based on a touch tone menu to an extension or department that can forward to an outside telephone line.