Getting Into VoIP

It all started with my new Magicjack. Plug this little gizmo into your PC and you get unlimited domestic calling, $40 for the first year and $20/year thereafter. That’s hard to pass up. But it also means that I now have three phone lines coming into the home office. So I either needed to get a bigger analog phone, or get into a PBX.


Here are the things I wanted my PBX system to do:

  • Answer two incoming POTS lines, one business line and one personal line.
  • Answer the Magicjack line, also as a POTS line. (Unfortunately, Magicjack does not yet allow users to access them as a VoIP provider without the use of the Magicjack hardware.)
  • Route these three lines to two existing analog phone lines in the house, and eventually to a SIP phone for the home office.
  • Route outgoing calls based on least cost. In particular, local calls should go out on the personal line (which has unlimited local calling), and long-distance on the Magicjack. “Local” in this case is loosely defined as area codes 619 and 858. I only dial 7 digits for 619 phone numbers, but I have to dial 1 + the area code to reach 858 numbers. Ideally least cost could be differentiated more granularly, as some 858 prefixes are probably toll calls and should go out on the Magicjack.
  • If possible, run in a virtual machine. The host is an old 2 GHz Pentium 4 with 1 GB of memory, running XP Professional.
  • If possible, cost nothing for software.
  • Oh yeah:  and deliver crisp, clear audio with no jitter, crackling, drop-outs, echo, or all those other annoying problems that have become so familiar with VoIP.

A quick aside for those who want to try this at home:  before doing anything else, I had to modify my existing phone wiring. I basically installed a multi-port phone jack at the point where the phone lines come into the house. The top ports of the jack are the incoming phone lines. The bottom ports feed back out to the existing analog phones. My PBX goes in between.

Choosing a VoIP PBX

A couple years ago, I needed to replace a small traditional PBX for a client. It quickly became apparent that a computer-based VoIP PBX would be significantly cheaper than buying a new traditional PBX. I eventually went with Trixbox, and it’s still working pretty good.

Trixbox is basically a pre-built ISO that installs the CentOS flavor of Linux, then sets up FreePBX, which is based on Asterisk. Trixbox has since gone commercial. While they still offer a free version, I decided this time to look at PBX in a Flash (PiaF). PiaF also uses CentOS, FreePBX, and Asterisk.

I’d seen mention of 3CX in some forums. Since I mostly use Windows boxes, the idea of a Windows-based PBX is appealing. I decided to look at 3CX.

Somewhere along the way I stumbled across sipXecs and spent some time looking at that as well. I’ve already blogged on that so I won’t spend any more time on that here.

Trying Out 3CX

It was pretty easy to get 3CX set up and running in a Windows virtual machine under Microsoft Virtual PC/Server. (That’s saying a lot compared to the hoops you have to jump through to run a Linux-based PBX in a virtual machine!) And once set up, there’s a lot to like:

  • Consistent user interface.
  • Decent documentation on how to set up Analog Terminal Adapters (ATAs) and phones.
  • Pretty easy to configure.
  • Caller ID was captured correctly (number only, no name)
  • Good voice quality, except with the Magicjack, which turned out to be a pretty universal problem.

However it didn’t take long before I started encountering some limitations:

  • Web access to voicemail, and fax service, are only available in the commercial edition.
  • Voicemails can be sent as email attachments, but the .wav files occupy about 1MB per minute.
  • Outbound call rules can only be set up based on number length, number starting with, or which extension is making the call. I did not see an obvious way to set up my least-cost dialing rules (although it might be possible to set up area codes with the “number starting with” option). My forum post on the topic yielded no solution.

I initially had some other issues, but they were mostly related to the Grandstream HT-503 ATAs that I started testing with. I wound up returning those ATAs when I was unable to get them to reliably deliver Caller ID.

Trying Out PBX in a Flash

PBX in a Flash (PiaF) has a great web site with loads of documentation and an active forum. PiaF uses FreePBX , which has its own site and forum. FreePBX is built around Asterisk, also with its own site and forum. This multi-level product can be a bit confusing at first, but ultimately it is one of its strengths. It wasn’t until I looked at sipXecs that I was reminded what it’s like to deal with “raw” open-source software. The great thing about PiaF and FreePBX is that these guys have tested a bunch of different versions of the software plus dozens of add-ons, have found combinations that work, and have created packages that install everything for you automagically (more or less).

Some of the other PiaF/FreePBX pluses:

  • Outbound calling rules are infinitely configurable through a kind of regular expression syntax. FreePBX can even pull in a pre-built list of local phone number prefixes.
  • The free version includes web access to email and fax service.
  • Voicemails sent as email attachments are compact–under 100K per minute.
  • Voice quality is good except with the Magicjack.
  • Lots and lots of add-ons are available. I may not need or use most of these, but it is nice to use a platform (Asterisk) that is so widely implemented and enhanced.

Of course, PiaF is not without its difficulties:

  • By far the biggest hassle is getting PiaF running well in a virtual machine. More on that in a separate blog post.
  • The PiaF/FreePBX user interface has improved greatly in the last couple years, but it’s still clear that PiaF incorporates programs by several different authors:  the “look and feel” is not consistent throughout.
  • You can’t entirely avoid knowing something about Linux. This could also be listed as a “plus” since learning Linux is probably a good thing. But it does make the install more difficult when you need to search Google every time you want to run some simple command (check the IP address of the computer, list files with their sizes, etc.).

General Findings and Moving Forward

After much testing, I’ve had to accept that the Magicjack may not work reliably with a VoIP PBX system. It seems that going from a VoIP device to analog and back to VoIP, with all those analog-to-digital transitions, may be too much too ask. I’ve moved Magicjack compatibility down the priority list. Hopefully Magicjack will eventually support a “BYOD” (Bring Your Own Device) solution so I can directly register the Asterisk server with Magicjack as a VoIP provider.

Running a PBX in a virtual machine is indeed a questionable endeavor. 3CX, the Windows-based PBX, seemed to run pretty well in virtual Windows client. But for some reason, getting a Linux-based PBX to run well in a virtual machine is more difficult. I’ll try running it virtually for a while, but I may wind up installing directly on a physical machine.

Both 3CX and PBX in a Flash have much to recommend them. I’ve decided to go with PiaF for now. For my own records, I need to document the steps that I took to get it all working. Hopefully by putting the information in a series of posts, it will help some of you out there as well. Here they are:

Setting Up PBX in a Flash, Part 1:  Configuring a Virtual Machine

Setting Up PBX in a Flash, Part 2:  Before Running FreePBX

Setting Up PBX in a Flash, Part 3:  Configuring FreePBX

Setting Up PBX in a Flash, Part 4:  Configuring a Linksys SPA-3102

Update 11/24/2008:  I ultimately converted to a physical machine, though the virtual machine was a great test bed and is probably a good alternative for production with the right host. See more here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.