My 10 year odyssey to my own PBX solution in the cloud
- How to save money by rolling your own -

Have you ever felt that you are paying too much for your terrestrial telecommunications service? Way back when the only game in town was your local bell's copper service to your dwelling and office. The Bells, in my case Verizon, had a monopoly on local phone service until the wireless cell providers, VoIP providers, and cable companies started to compete with them early last decade.  The wireless companies charged a premium (and still do) for their service. The cable companies charged about the same for phone service as the local bells with all long distance charges thrown in.  The VoIP providers, most notably Vonage, were the best deal if you discounted your Internet service charge, with a low fixed monthly charge.

I had a modest needs for phone service at the time: home, a fax, and a couple office lines.  We were paying close to $150/mo for service between copper charges, and long distance, voice mail, and all of the other "extra" charges that Verizon tacked on to the service. I needed to reduce this cost, and with the help of some free software, ingenuity and relentless need to get out from under the thumb of Verizon, I was eventually able to break free from their grip well before the current copper line cutting spree of today.

PBX 0.1 - my first experiment with VoIP

It started out as an experiment to test the current technology. Asterisk was the rage making a big splash and promising to revolutionize the market. I have created several iterations of my own home brewed PBX system over the years, and this was the first of many. This experiment started about 10 years ago in the 2004/5 time range. The first server was an test system with a cast off PC that I had sitting idle. I installed a fresh hard drive in it, and loaded it with a version of Linux, possibly Whitebox Linux, which was what I was using for servers at the time. I installed a 4 port POTS (plain old telephone service) telephone card in it, and connected it to my extra office phone line. I connected the system to my local network, and hooked a couple Grandstream 2000 phones to it. Thus began the experiment with how I could migrate away from Verizon, and onto my own system.  I setup extensions, Voicemail, ring groups, inbound and outbound call routing. I had my home office working on the new server with only a few minor hiccups.  I ran this server for about a year, and I was very satisfied with the performance once the wrinkles were ironed out.

PBX 1.0 - The production solution

Once I was convinced that I could make this work for my needs I started to make plans for the next iteration of the PBX. I made a small investment in the second system. I purchased a modest Dell workstation class machine with dual hard drives, that I mirrored in software. Not a server class system, but a respectable enough system that I was sure would last for several years.  I installed Linux on the system. Having installed Linux probably a couple hundred times by that point in my career, this was a simple task. I then downloaded and installed Asterisk using FreePBX.   I set configured the PBX, migrated the existing setup from the current server to it, and migrated the POTS line phone card over to the new hardware.  On a Saturday, I had migrated my old system off of the cast off PC to a more robust system with mirrored drivesI chose FreePBX since it was well known, seemed to be well maintained, and had an easy to use Web Interface to boot. At first I had a mix of POTS (2) and VoIP (Vonage, also 2) lines connected to the server via the POTS card. I was using 8 Grandstream 2000 VoIP phones in the house any my office.

While the Vonage lines had served me very well for several years, it was time to dip my toes into direct SIP access. I also had need for more lines, my wife was opening up her own practice, and required her own phone setup. Purchasing a second POTS line card seemed like a waste when I was keen on migrating to SIP. I found a great company called Flowroute which offered simple no-frills straight up SIP access. No fuss, just a straight up easy to useweb interface to manage my account. Pure simplicity. I got Flowroute connected to my PBX in 30 minutes with a test phone number, and I have never looked back.

PBX 2.0 - SIP

Migrating to SIP allowed me to further cut my monthly phone bill by 60% of what I had been paying, as well as add a new phone number.  It was about this time that I also migrated off of all copper and Vonage lines, and had a pure SIP setup.  I liked Vonage, they had really good service, but alas I could pay much less with a SIP only play. Vonage called me several times to try to regain my business, but I always asked, can you do SIP?  The answer was no, when the person on the phone knew what I was talking about.

The new server held up for several years, but my wife's office, which was not located with the server at the house, required some special networking.  How to hook up a remote phone to the PBX with out compromising security?  At the time I could see thousands of attempts a month at scanning my server from the Internet (the server had a live IP address). Most failed, but there were a couple that made it though.  This was somewhat eye opening. My Flowroute account was disabled after their fraud prevention algorithms detected unusual calling from my PBX. Someone has reached into my server and was routing calls though it. Yikes! I forget the country there were calling to but it was somewhere in South America. I quickly found my problem and corrected it. Thanks again to Flowroute with its easy to use web interface, I was able to recover quickly and I only lost about $5 in phone charges.  I reviewed my security settings on the server, the PBX as well as my Flowroute account and have not had a problem since.

So, back to the remote office. I setup a simple VPN between the office and the house which the phone could communicate over. My wife's office line worked at home, and in her office, so she could conduct business at either location. She could receive and dial out call with her office line as the caller ID.  Plus as a bonus we had 3 digit dialing between the two locations, so we could dial each other with out going out over the PTSN (Public Switch Telephone Network).

Best of all, the setup cost me under $20/mo for 5 phone numbers, with several hours of talk time.

This system ran for about 5 years with only the occasional problem. One problem was power. If the power went out in my neighborhood the cable service provider would stay up for about 2 hours before the local neighborhood head-end service units UPS would give out. After that the Internet would go dark.  Along with the kids convulsing on the floor from the effects of Internet withdrawal, I had no voice mail, inbound or outbound calls, and inbound calls got a fast busy.  I could fix the later problem, but the kids would have to get used to no Internet when the power was out for extended periods of time.

PBX 3.0 - To the cloud!

5 years is long time for a workstation class machine. The system ran 24/7/365 with only a handful of times when it was powered down completely due to a backup generator or UPS failure.  At 5 years the mirrored hard drives were giving me some errors occasionally requiring that they be manually re-synced.  It was time for a new PBX system.  My little PBX had grown, it served about 8 phone numbers, and a dozen voice mail boxes. Phone and fax lines for various family members, and charitable endeavors had been added over time.  The one charitable organization had 8 voicemail boxes with a automated attendant and menu tree for information, and instructions for our annual fund raiser.  The system would take more and more calls each year as the event approached.  So I needed something for my business, my wife's business, the home line (which was getting much less usage of late), the charity, and a fax line for my mom.

Local power outages were a big limitation of the current system. Buying new hardware was going to be expensive, and the economics remote hosting was such that moving into the cloud was the most cost effective way to go.

I had been an avid user of Amazon's AWS service since about 2008 or so, and I knew that the service would be stable enough for my PBX. But would the cheap, 'micro' instance be enough for my PBX needs?  I set off to try it out. I created a new server for my PBX in AWS using CentOS as the base OS (which is what I use for servers now a days), and installed the latest FreePBX on it. 

I had been using my Grandstream phones for several years now with out too many issues, with the exception of the power wall warts. The phones that were not on a POE connection, the wall warts started to die on a regular basis.  Fortunately I had several extra wall warts since most of the phones in the house were on a POE switch. So I was not in any immanent peril of losing voice service in the house, but it was time to think about the next generation VoIP phone.

I researched several phones, and had some great experience with the Digium phones (D40 & D50).  I will have to say that I both love these phones, and hate them all at once. They are top quality in terms of construction, voice quality, and ease of use.  They annoy the crap out of me in that you have license each one (even though it is free) specifically to your PBX (each new PBX!).  I use the speaker phone almost exclusively in my office, and it rivals the best Cisco speaker phones that I have used.  These are hands down one of the best phones I have used.  I mostly have the D40's, and one D50. I tried the D50 to have access to the extra functionality, speed dial, etc. However this functionality is so difficult to get setup in a non-Digium PBX that I gave up in frustration. I basically use the D50 as a D40, with all the extra stuff unused.

Digium seems unconcerned with the market outside of selling their own PBX solutions. And I guess that makes economic sense to them.  The phones are "open", but they do not make it easy for you to use them outside of Digium's own PBX solutions. There are lots of nifty features built into their PBX solutions, which I have used at client sites.  Once I got my phones setup they way I want them, I have left them that way, silently grumbling to myself about the lack of ease of use.  As a side note, I had to migrate my PBX in the cloud once, which required that I stop and restart the server. This caused me large amounts of pain with the Digium phones. The licenses were tied to local instance of the server (the ethernet MAC address to be exact) and I had to go though the process of re-licensing each phone though Digium's web site. What a colossal pain in the ass.  I can say with a fair amount of certainty that the next time I consider new phones, Digium will probably not be on the list, which is too bad, because they are great quality phones.

Now, back to the story at hand. Migrating to the cloud proved to be pretty painless.  I created a new server, installed FreePBX, uploaded my current config.  I was able to migrate one phone line at a time. During the migration I setup a trunk between the old server and the new server for the transition period.  I had to make sure that everything worked perfectly otherwise my wife would not be happy that her phone system was not functional.  Keeping your primary user happy is worth all of the extra effort!!!

One by one the phone numbers were transferred to the new system, and most of the Grandstream phones were retired and replaced with Digiums.  I have one Grandstream in use in my kitchen and the rest are in a box in case there is an emergency need for them.  I liked them, they were good sturdy phones.

Now if the power goes out at the house or the remote office, the phones will run as long as there is UPS power, and the cable modem is up. But Amazon has not lost power that I am aware of since I have hosted my system there.  I have only had to reboot the virtual server once to migrate it due to local AWS hardware issues. Amazon provided me ample notice that this was going to happen which allowed me to move the system at my leisure.  The system runs on a micro instance and is able to handle the call volume with no issues. The one caveat is that I have to make sure that software updates happen off hours. Running a "yum update -y" will cause some jitter on the phones calls if there are a lot of packages to update.  The system just runs, and I do not have to log into it very often.


Since I have migrated the system in the cloud, I have added one more personal, and business number to it. The current system has about 10 voice numbers, 2 fax lines, about 20 voicemail boxes, multiple ring groups, time of day rules, E911 for three locations, runs in in a micro VM at AWS, and costs me in total less then about $30/mo to run.  What a sweet deal!