Recently, we migrated both the midPhase and SingleHop phone systems to a VoIP solution powered by Digium and Asterisk. Matt asked me to write a short piece sharing the lessons I learned. Let me first say, if you are considering implementing VoIP – do it! Let me also say that I am by no means a telephony expert, so if you find any mistakes please let me know so I am not adding to the wide-spread confusion surrounding VoIP. Traditional (Nortel) PBX systems are not only incredibly expensive but they are not very flexible. A VoIP setup (based on Asterisk), is incredibly customizable because it’s based on open source software, standards, and hardware.
For those of you who have no idea what Asterisk is, Asterisk is an open source PBX, produced by Digium, supporting a wide range of VoIP protocols and telephony standards. And for those of you with no idea what a a PBX is. A PBX,private branch exchange, is essentially your own telephone company, that is of course connected to the public telephone network (PSTN) digitally (ISDN/DS1) or via POTS lines. You have probably all used a PBX at one point in the past whether or not you have realized it. A tell-tale give away is dialing a prefix (usally 9) to reach an outside line. This dialing prefix lets the PBX know that the number immediately following should be sent out over a trunk, and should not call a local extension. So what exactly is a PBX? The short answer is “a telephone system that provides lots of features any business would want: Auto-attendant (press 1 for sales etc), call queues, conferencing, switching between local extensions (transfers), switching to the PSTN (trunking), call routing, intercom, voicemail, etc.” The long answer is here: http://en.wikipedia.org/wiki/PBX Finally, for those of you that have no idea what VoIP is, stop reading this article now, and browse your way over to http://VoIP-info.org
Why Asterisk? Well, it’s free (http://www.gnu.org/philosophy/free-sw.html), it’s stable, it supports nearly every codec and protocol in telephony, it can interface with a wide variety of hardware, oh and
Mark Spencer = TEH MAN!!. =]
So, pretending to start from scratch. I brainstormed a list of questions that I had:
How many phones will there be? Extensions?
We have at least 30 employees in at least 3 facilities at any given time. So I rounded up figuring that we should support 50 phones, with room to expand. Most phones have 2 lines, thus two extensions. This comes in handy because we are able to place a client on hold and call someone in a different department using the second line.
How much bandwidth is required?
The rule of thumb is 64 Kbps Full Duplex?? (less if you are using a better compression/worse quality codec) per call. So 50 phones * 64Kbps/phone = 3.12500 Mbps. So, we need 1.5625Mbs upstream and 1.5625Mpbs downstream. This is only slightly more than a DS1 circuit so add in IP overhead and two load balanced T1′s is more than enough. Two T1′s was the original plan (and it worked fine) but we switched to 100Mbps metro-ethernet for various reasons. A single T1 is probably sufficient for most small businesses. A decent DSL connection would be sufficient for most home users. Also, it’s a good idea to allocate a private vlan for the VoIP gear and/or implement QoS. We do both, which allows all of our hardware phones to pull DHCP from the dhcp server in the “phone segment” and guarantee each phone a specific amount of bandwidth. Avoid any technologies that generate a lot of collisions (10BaseT, 802.11*), ie stick to FullDuplex 100BaseTX (FastEthernet).
Should the PBX be at the office or the data center?
Initially I wanted to have a PBX at the office and a PBX at the data center. That was scrapped in favor of keeping the PBX at the data center. It makes the most sense to keep the PBX as close as possible to the backbone internet connection. As long as your PBX can maintain less than 300ms of latency to the phones and VoIP providers you should not have any problems (this is where QoS helps, a lot, otherwise when you start downloading something your pipe becomes saturated and that latency grows quickly).
What hardware is required?
A decent machine (Pentium4 3.0 + 2048MB memory)
- Digital cards (to interface with DS1) TDM Wildcard
- Analog cards (to interface with POTS lines)
Phones – Polycom Soundpoint IP 500 and 650 series phones
We did not use any analog cards because we have a DS1 (more on this in a bit). Digium also makes Asterisk so (surprise!) their hardware works *excellent* with Asterisk.
There are a few phone options. We went with Polycom because they have an extremely manageable provisioning system and have many features. The other phone we considered was the Cisco 79xx phones, that we didn’t use because we are using Asterisk instead of the CCM. Note: Cisco phones are based on the SIP protocol and will work perfectly with Asterisk. However, to use all of the features the phone supports a CCM is required. Anyway, most techs have a Polycom Soundpoint 500 phone, the base model,supports 3 extensions, directory services, call fowarding, conferencing, a customizable interface, and many other features. The managers have Soundpoint 650 phones, which as I understand support all the same features the 500 series but also has HDVoice, a semi-color display, the embedded mircobrowser, and support for future expansion via USB. The reason managers have the high-end phones is mainly so they can keep an eye on the call queues via the micro-browser + custom CGI application that outputs queue status. And of course, most of us have soft phones at home and on our laptops. I found SJPhone works best in Mac OSX, and CounterPath softphones work best in Linux and Windows.
How does Asterisk handle outgoing calls?
The best answer is most likely VoIP. There are a few hundred (if not a million) providers out there that do SIP and/or IAX2 origination. The other option is to send calls out over the PSTN. The advantage to VoIP is that it is much less expensive. We use Voicepulse to make calls. Voicepulse provides redundant IAX2 trunks for a low cost with excellent sound quality (G.711U). Kudos to Voicepulse! We have a DS1 circuit that can also be used for origination, at additional cost to us.
How does Asterisk handle incoming calls?
The best answer is most likely the PSTN, though this depends on your sitation. We have a DS1 (PRI) connected to a TDM Wildcard (Digium), which is then interfaced with Asterisk. A PRI provides 24 analog channels (23 (b channels) may be used for voice, with the signaling done on the 24th (D channel)). Seeing as we primarily receive inbound calls let me explain a bit how this works. Our 800 provider (RESPORG) forwards calls to our toll-free number to our local phone number (DID). Calls to the DID propagate the PSTN to our PRI, which rings an available channel, which is answered by Asterisk. The call is handled according to the Asterisk dial plan. In our case all inbound calls are connected to an auto attendent that presents the caller with a few options and based on the provided input (1 for sales) the caller is connected to a call queue, where they sit on hold until an agent becomes available.
What software is required?
Asterisk. In addition to Asterisk the proper kernel modules to support the hardware. Also, interfaces can really make your life easy. If I had the know-how when I originally setup the PBX I would have configured everything manually (as that *always* provides the most flexibility), instead we went with AMP aka FreePBX. There are a few other options available, Digium now provides an enterprise class (they did not offer a GUI when the PBX was setup) GUI for use with the Asterisk Business edition and/or Asterisk Now. If you are looking for a GUI, call Digium, discuss their various options. They are a great company. The other option is fonality as they maintain a closed version of FreePBX with some additional functionality. If you are looking to try asterisk there’s a linux distro Asterisk@Home (based on Centos4) that has FreePBX with some additional features. I have not actually used Asterisk@Home but as I understand it can be used in a production environment or as a learning tool. Keep in mind with any new software there is going to be a learning curve, so use something watered down (Asterisk NOW or Asterisk@Home) until you understand all of the configuation options (I am still learning new ones!!).
How expensive is VoIP?
There is no right answer for this because it depends on inbound/outbound calls + volume. The only advice I have is to shop around until you find a good VoIP provider. Though I can almost indefinately say “less than traditional long distance”.
Will VoIP work with existing phones?
Yes and no. Without any hardware, no. Sipura makes a converter so you can use any phone with VoIP. I *really* like Polycom phones because they provide many features you would expect to find with a commercial PBX, and their provisioning methods.
What did I learn from experience, and not VoIP-info.org?
Use updated IOS code. Thats right! I spent two days trying to figure out a strange issue where the MWI would beep every 30 seconds. Eventually, with the help of a few friends, and many many packet captures, I was able to figure out that the ‘sip fixup’ feature of IOS was the problem (not the * or polycom configs). After upgrading to a verion of IOS with no known issues in ‘sip fixup’ MWI worked great.
Well, that’s it. I hope this helps someone out there considering switching to VoIP. If you still have questions, http://voip-info.org is a great resource as are the IRC channels #asterisk #freepbx (on freenode).
Thanks for reading