Step 1: Making a Hardware Selection
We’re going to assume that you need a VoIP telephony solution that will support an office of up to several dozen employees and that you have an Internet connection that will support whatever your simultaneous call volume happens to be. This is above and beyond your normal Internet traffic. To keep it simple, you need 100Kbps of bandwidth in both directions for each call.1 And you need a router/firewall that can prioritize VoIP traffic so that all your employees playing Angry Birds won’t cause degradation in VoIP call quality. Almost any good home router can now provide this functionality. Remember to disable ALG on your router, and it’s smooth sailing.
For computer hardware, you’ll need a dedicated machine. There are many good choices. Unless you have a burning desire to preserve your ties with Ma Bell, we recommend limiting your Ma Bell lines to your main number. Most phone companies can provide a service called multi-channel forwarding that lets multiple inbound calls to your main number be routed to one or more VoIP DIDs much like companies do with 800-number calls.
Any good dual-core Atom computer will suffice. You’ll find lots of suggestions in this thread. And the prices generally are in the $200-$400 range. For larger companies and to increase Asterisk’s capacity with beefier hardware, see these stress test results.
If your requirements involve retention of dozens of Ma Bell lines and complex routing of calls to multiple offices, then we would strongly recommend you spend a couple thousand dollars with a consultant. Some of the best in the business frequent the PBX in a Flash Forum, and they do this for a living. They can easily save you the cost of their services by guiding you through the hardware selection process. For business or for home, another alternative is available if you don’t want to babysit your own hardware. That’s a cloud-based solution such as RentPBX. For $15 a month, you don’t have to worry about electricity and a reliable Internet connection ever.
Choosing the Right Phones
If there is one thing that will kill any new VoIP deployment, it’s choosing the wrong phones. If you value your career, you’ll let that be an organization-driven decision after carefully reviewing at least 6-12 phones that won’t cause you daily heartburn. You and your budget team can figure out the price points that work in your organization keeping in mind that not everyone needs the same type of telephone. Depending upon your staffing, the issue becomes how many different phone sets are you and your colleagues capable of supporting and maintaining on a long term basis.
Using a browser, you can configure and reconfigure almost any VoIP phone or device on the market in a matter of minutes. So the question becomes which phones should you show your business associates. That again should be a decision by you and your management and budget teams, but collect some information from end-users first. Choose a half dozen representative users in your company and get each of them to fill out a questionnaire documenting their 10 most frequent daily phone calls and listing each step of how they process those calls. That will give you a good idea about types and variety of phones you need to consider for different groups of users. Cheaper rarely is better. Keep in mind that phones can last a very long time, even lousy ones. So choose carefully.
The phone brands that we would seriously consider include Yealink, Snom, Fanvil, HTek, Polycom and Cisco. Do you need BLF, call parking or multiple line buttons, a hold button, conferencing, speakerphone, HD voice, power over Ethernet support, distinctive ringtones for internal and various types of external calls, Bluetooth, WiFi, web, SMS, or email access, an extra network port for a computer, headset support, customizable buttons (how many?), quick dial keys, custom software, XML provisioning, VPN support? How easy is it to transfer a call? Do you need to mimic key telephones? Also consider color screens, touch screens, busy lamp indicators, extension modules (what capacity?). What do we personally use: Yealink’s T46G is our favorite, and we also have several Digium phones of various types, a couple of Aastra phones, a collection of Panasonic cordless DECT phones, a Samsung Galaxy S4 and Moto X connected through an OBi202 with an OBiBT Bluetooth Adapter, and a Samsung Galaxy S3 extension interconnected withVitelity’s vMobile service to provide transparent connectivity on both WiFi and cellular networks. You can read all about vMobile here. It is the future of VoIP telephony.
Step 2: Choosing VoIP Service Providers
One of the design differences between VoIP and the Ma Bell network that we’re all familiar with is that you no longer have to put all your eggs in one basket. The company or companies that you use to make outbound calls need not be the same as the ones you use to handle incoming calls. For home use, VoIP providers typically offer two types of plans: all-you-can-eat (which isn’t really) and pay-by-the-minute (which, in most cases, is priced by the fraction of the minute that you actually use the service). For business use, you have a choice of pay-by-the-trunk (each simultaneous call uses a trunk) and pay-by-the-minute (where you don’t have to manage your simultaneous calls). There was a third option over the past 5 years, and that was Google Voice which was free. But, good things don’t last forever, and Google is in the process of shutting down that service except for those that like making calls with a web browser.
For businesses, we strongly recommend that you stick with Ma Bell for your main business number only. That gets you listed in the phone book and provides 99.999% reliability for access to your business. Most phone companies can provide a service called multi-channel forwarding that lets multiple inbound calls to your main number be routed to one or more VoIP DIDs much like companies do with 800-number calls. For other business lines as well as home and SOHO setups, ditch Ma Bell as quick as you can. You’ll save boatloads of money. Give some thought to how much non-cellphone usage actually occurs in your situation. In many cases, you will find that pay-by-the-minute service for outbound calls is much less expensive than all-you-can-eat plans. Remember, there are no long term contracts on pay-by-the-minute services so try it and see what your usage habits actually are if you’re unsure. Keep in mind that acquiring inbound trunks for DIDs or phone numbers is almost always all-you-can-eat service ranging in price from $2-$8 a month. The PBX in a Flash Forum is chock full of recommendations. Just remember that, in doing your calculations, separate out the the time spent on incoming calls from the time spent placing outbound calls. Also keep in mind that redundancy is a luxury you never had in the Ma Bell days. Take advantage of it and sign up with multiple pay-by-the-minute providers for outbound (termination) service. You only pay for what you actually use. For inbound trunks, many providers offer failover service to different numbers if the primary connection dies. Even if the failover is to your cellphone, it beats missing the call. If international calling is a frequent part of your business or lifestyle, then spend some time exploring the options that are available. There are numerous all-you-can-eat solutions at incredibly affordable rates if you do your homework. Now let’s get started…
Step 3: Installing CentOS 6.5
Download CentOS 6.5 from here. If you’re building a system in the cloud or in a hosted environment, the base CentOS install usually has been done for you so you can skip this step.
If you’re using a dedicated PC or virtual machine with no operating system, boot from the CentOS 6.5 CD/DVD or ISO and go through the standard CentOS install procedure. Here are the CentOS 6.5 setup steps and entries that we recommend [in brackets] which will assure that your new server has wired network connectivity through DHCP and a non-LVM partition configuration which is easier to back up and restore. Don’t be intimidated by the list. The entire CentOS setup process only takes a minute or two.
Next, log in to your new server with your root credentials. First, check your disk partitioning to make sure everything looks okay: fdisk -l. Here’s what the partitioning looks like with a 20GB drive. For larger drives, your sda3 partition will obviously be larger.
Step 4: Installing PBX in a Flash
Now let us welcome you to the World of PBX in a Flash™. This is our best release ever whether you’re a total newbie or an experienced Asterisk developer. You can’t really appreciate what goes into an open source product like PBX in a Flash until you try doing it yourself. If you want to actually learn about Asterisk from the ground up using pure source code to customize your VoIP deployment, PBX in a Flash has no competition because your only other option is to roll your own starting with a Linux DVD. So our extra special kudos go to Tom King, who once again has produced a real masterpiece in that it is very simple for a first-time user to deploy and, at the same time, incredibly flexible for the most experienced Asterisk developer. The new PIAF3™ release not only provides a choice of Asterisk and FreePBX versions to get you started. But now you can build and deploy standalone servers for SugarCRM™, NeoRouter™ VPN, YATE™, FreeSwitch™, and OpenFire™ XMPP using the standard PIAF3 installer. So let’s get started.
First, let’s prepare your server for installation of PBX in a Flash 3. None of these commands will do any damage if your server happens to already be configured properly. The recommended platform is CentOS or Scientific Linux. Start here:
When the install begins, there’s a 5-10 minute process to reconfigure CentOS by adding over 500 applications to the base install. Be patient. When it completes, your server will reboot, and you’re ready to begin the PBX in a Flash installation process. Choose option A to continue with the installation. While PBX in a Flash supports a number of versions of Asterisk and FreePBX, we believe the combination of Asterisk 11 and FreePBX 2.11 is so compelling in terms of functionality, stability, and security that the other options are no longer worth considering. We wholeheartedly recommend choosing PIAF-Green with FreePBX 2.11 as your platform.
For today, we’re installing PBX in a Flash. So leave it highlighted, tab to OK, and press Enter.
Now pick your PIAF flavor, tab to OK, and press Enter. HINT: Green is the fourth option :)
The PIAF Configuration Wizard will load. Press Enter to begin.
Unlike any other aggregation, PIAF gives you the opportunity to fully configure Asterisk using make menuconfig if you know what you’re doing. For everyone else, type N and then confirm your choice. For the time being, type Y. When the menuconfig menu displays during the install, type X to save your settings and exit. No changes are required.
Next, you’ll need to choose your Time Zone again for PHP and FreePBX. Don’t worry if yours is missing. A new timezone-setup utility is also available to reconfigure this to any worldwide time zone once the install has completed.
Next, choose your version of FreePBX to install. As we said, we recommend FreePBX 2.11. Note that Incredible PBX 11 requires PIAF-Green and FreePBX 2.11.
Finally, you need to choose a very secure maint password for access to FreePBX using a browser. You can pick your own, or the installer will generate one for you. Don’t forget it.
The installer will give you one last chance to make changes. If everything looks correct, press the Enter key and go have lunch. Be sure you have a working Internet connection to your server before you leave.
In about 30-60 minutes, your server will reboot. You should be able to log in as root again using your root password. Because of a version update to PEAR that is not supported by FreePBX, you’ll need to issue the following commands to clean things up: [NOTE: This has been resolved in latest PIAF3 releases.]
We also strongly recommend that you immediately upgrade your version of Asterisk to the current release. If you’re using PIAF-Green with Asterisk 11, we have a script that will do the heavy lifting for you: [NOTE: This already has been addressed in latest PIAF3 release.]
Write down the IP address of your server from the status display (above) and verify that everything installed properly. Note that Samba is disabled by default. If you want to use your server with Windows Networking, run configure-samba once your server is up and running and you’ve logged in.
If you’re familiar with Asterisk and FreePBX, then you can take it from here. You now have a fully functioning platform on which to create your latest VoIP masterpiece. If you’re new to all of this, keep reading…
Step 5: Configuring PBX in a Flash
Most PIAF Configuration is accomplished using the FreePBX Web GUI. Point your browser to the IP address shown in thestatus display above to display your PIAF Home Page. Click on the Users tab. Click FreePBX Administration. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose in the Config Module phase of the PBX in a Flash installation procedure above.
Here’s a quick overview of what needs to happen before you can start making and receiving calls. You’ll need an account with at least one phone number for people to call you (known as a DID), and you’ll need an account to place outbound calls to plain old telephones throughout the world. Our Vitelity DID deal at the bottom of this article is a terrific service, and Vitelity also provides tremendous financial support to both the Nerd Vittles and PBX in a Flash projects. For outbound calling, you also can use Vitelity or choose from the provider recommendations on the PIAF Forum.
You’ll also need a softphone or SIP phone to actually place and receive calls. YATE makes a free softphone for PCs, Macs, and Linux machines so download your favorite and install it on your desktop. Phones connect to extensions in FreePBX to work with PBX in a Flash. Extensions talk to trunks to make and receive calls. FreePBX uses outbound routes to direct outgoing calls from extensions to trunks, and FreePBX uses inbound routes to route incoming calls from trunks to extensions to make the phones actually ring. In a nutshell, that’s how a PBX works. There are lots of bells and whistles that you can explore down the road. FreePBX now has some of the best documentation in the business. Start here.
To get a minimal system functioning to make and receive calls, here’s the 2-minute drill. Create at least one extension with voicemail. Next, configure a trunk to handle your outside calls. Then set up inbound and outbound routes to manage incoming and outgoing calls. Finally, add a telephone or softphone with your extension credentials.
If this sounds like Greek to you, then install Incredible PBX 11. It’s a 5-minute task. Incredible PBX does all the heavy lifting for you by configuring an extension, building dozens of trunks for the major SIP providers, and creating default routes to manage your calls. You also get a terrific collection of utility programs for Asterisk that handle everything from telephone reminders and wakeup calls to weather and news reports. To get started, log into your server as root and issue the following commands. Then jump to the Incredible PBX 11 tutorial and continue your journey there.
A Few Words About Security. PBX in a Flash has been engineered to run on a server sitting safely behind a hardware-based firewall with NO port exposure from the Internet. Leave it that way! It’s your wallet and phone bill that are at stake. If you’re running PBX in a Flash in a hosted environment with no hardware-based firewall, then immediately read and heed our setup instructions for Securing Your VoIP in the Cloud Server. DO NOT RUN PBX IN A FLASH IN THE CLOUD WITHOUT INSTALLING AND ACTIVATING THE IPTABLES FIREWALL. HINT: TRAVELIN’ MAN 3 WILL DO THE HEAVY LIFTING FOR YOU. We would encourage you to visit your PIAF Home Page regularly. It’s our primary way of alerting you to security issues which arise. You’ll see them posted (with links) in the RSS Feed shown above. If you prefer, you can subscribe to the PIAF RSS Feed or follow us on Twitter. For late-breaking enhancements, regularly visit the Bug Reporting & Fixes Topic on the PIAF Forum. Enjoy!