What a difference a year makes in the VoIP World! We now have a rock-solid, reliable Asterisk® 11 release and an equally stable FreePBX 2.11 on which to build state-of-the-art VoIP servers. If you’re new to the VoIP community, watch this video before you proceed.
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. The sad part is we and the CentOS™ development team are part of a dwindling few non-commercial entities that still are in the open source “business.” 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 PIAF 18.104.22.168.5 ISOs not only provide 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, and OpenFire™ XMPP using the 32-bit and 64-bit PIAF™ ISOs. So let’s get started.
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. If this works for you, then 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 one of our consultants. They’re the best in the business, 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. They also have turnkey phone systems using much the same technology as you’ll find in PBX in a Flash. You won’t hurt our feelings.
Choosing the Right PIAF Platform
We get asked this question about a hundred times a week on the forums so here goes. There are more than two dozen permutations and combinations of CentOS, Asterisk, and FreePBX to choose from when you decide to deploy PBX in a Flash. We always recommend the latest version of CentOS because it tends to be the most stable and also supports the most new hardware. You have a choice to make between a 32-bit OS or 64-bit. Our preference is the 32-bit platform because it is better supported. The performance difference is virtually unnoticeable for most VoIP applications. With Asterisk, we always recommend an LTS release because these have long-term support. That narrows your choices to Asterisk 1.8 or Asterisk 11. At this juncture, we think you’d be crazy to install anything other than Asterisk 11. It’s incredibly reliable and stable, and it will be supported for years to come. It also supports Digium Phones. The bottom line is that Asterisk 11 is the latest and greatest with the best feature set. If we were building a system for a commercial business, it would be our hands-down choice. In the PBX in a Flash world, we have colors for various versions of PBX in a Flash that support different versions of Asterisk. Asterisk 11.6 happens to be the latest PIAF-Green, and we recommend you install it with the latest version of FreePBX as well, 22.214.171.124
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.
Schmooze Com has released their commercial End Point Manager (EPM) at a price point of $39 per server. They’ve been using the application internally to support their commercial customers for over a year. Suffice it to say, it’s the best money you will ever spend. You can sign up for an account with Schmooze through our commercial support site and purchase the software now. You can review the Admin User Guide here. The beauty of this software is it gives you the flexibility to support literally hundreds of different VoIP phones and devices almost effortlessly. 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 processed 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 Cisco, Aastra, Snom, Digium, Mitel, Polycom, Yealink, and Grandstream. 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 Grandstream GXP2200, and a collection of Panasonic cordless DECT phones, a fax machine, and Samsung Galaxy Note II connected through an OBi202 with an OBiBT Bluetooth Adapter.
Installing PBX in a Flash
With the office politics out of the way, let’s get to the fun stuff.
- Download PIAF 126.96.36.199.5 ISO from SourceForge
- Burn the ISO to a USB Thumb Drive or a DVD using a Mac or Windows machine
- Boot dedicated server using PIAF Flash Drive or DVD
For most deployments, choose the default install by pressing Enter.
Leave the UTC System Clock option unchecked and pick your Time Zone. Tab to OK and press Enter.
Choose a very secure Root Password. Tab to OK and press Enter. Your server will whir away for 5-10 minutes installing CentOS 6.4. When the reboot begins, remove the DVD or USB thumb drive.
Log into your server as root from either the console or an SSH connection to the IP address displayed on your server. Unless you need to install custom hardware drivers, choose the first option to install PBX in a Flash.
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. You’ll note there’s a new color.
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.
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 to reconfigure this to any worldwide time zone once the install has completed.
Next, choose your version of FreePBX to install. If you plan to also install Incredible PBX and Incredible Fax:
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. 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.
Configuring PBX in a Flash
Most PIAF Configuration is accomplished using the FreePBX Web GUI. Point your browser to the IP address shown in the status 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.
If you’re new to Asterisk and FreePBX, here’s the one paragraph primer on what needs to happen before you can make free calls with Google Voice. You’ll obviously need a free Google Voice account. This gets you a phone number for people to call you and a vehicle to place calls to plain old telephones throughout the U.S. and Canada at no cost. 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 (like Google Voice) 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 your phones 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. You’ll need to set up at least one extension with voicemail, and we’ll configure a free Google Voice account for free calls in the U.S. and Canada. Next, we’ll set up inbound and outbound routes to manage incoming and outgoing calls. Finally, we’ll add a phone with your extension credentials.
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. 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, you also should regularly visit the Bug Reporting & Fixes Topic on the PIAF Forum.
Extension Setup. Now let’s set up an extension to get you started. A good rule of thumb for systems with less than 50 extensions is to reserve the IP addresses from 192.x.x.201 to 192.x.x.250 for your phones. Then you can create extension numbers in FreePBX to match those IP addresses. This makes it easy to identify which phone on your system goes with which IP address and makes it easy for end-users to access the phone’s GUI to add bells and whistles. In FreePBX 2.10 or 2.11, to create extension 201 (don’t start with 200), click Applications, Extensions, Generic SIP Device, Submit. Then fill in the following blanks USING VERY SECURE PASSWORDS and leaving the defaults in the other fields for the time being.
User Extension … 201
Display Name … Home
Outbound CID … [your 10-digit phone number if you have one; otherwise, leave blank]
Emergency CID … [your 10-digit phone number for 911 ID if you have one; otherwise, leave blank]
secret … 1299864Xyz [randomly generated]
dtmfmode … rfc2833
Voicemail Status … Enabled
voicemail password … 14332 [make this unique AND secure!]
email address … email@example.com [if you want voicemail messages emailed to you]
pager email address … firstname.lastname@example.org [if you want to be paged when voicemail messages arrive]
email attachment … yes [if you want the voicemail message included in email]
play CID … yes [if you want the CallerID played when you retrieve message]
play envelope … yes [if you want date/time of the message played before the message]
delete Vmail … yes [if you want the voicemail message deleted after it's emailed to you]
vm options … callback=from-internal [to enable automatic callbacks by pressing 3,2 after playing a voicemail message]
vm context … default
Write down the passwords. You’ll need them to configure your SIP phone.
Extension Security. We cannot overstress the need to make your extension passwords secure. All the firewalls in the world won’t protect you from malicious phone calls on your nickel if you use your extension number or something like 1234 for your extension password if your SIP or IAX ports happen to be exposed to the Internet.
In addition to making up secure passwords, the latest versions of FreePBX also let you define the IP address or subnet that can access each of your extensions. Use it!!! Once the extensions are created, edit each one and modify the permit field to specify the actual IP address or subnet of each phone on your system. A specific IP address entry should look like this: 192.168.1.142/255.255.255.255. If most of your phones are on a private LAN, you may prefer to use a subnet entry in the permit field like this: 192.168.1.0/255.255.255.0 using your actual subnet.
Adding a Google Voice Trunk. There are lots of trunk providers, and one of the real beauties of having your own PBX is that you don’t have to put all of your eggs in the same basket… unlike the AT&T days. We would encourage you to take advantage of this flexibility. With most providers, you don’t pay anything except when you actually use their service so you have nothing to lose.
For today, we’re going to take advantage of Google’s current offer of free calling in the U.S. and Canada through the end of 2013. You also get a free phone number in your choice of area codes. PBX in a Flash now installs a Google Voice module under FreePBX -> Connectivity that lets you set up your Google Voice account with PBX in a Flash in just a few seconds once you have your credentials.
A Word to the Wise: All good things come to an end… especially those that are free. So plan ahead with some alternate providers that keep your phones working should Google decide to pull the plug or change the terms with Google Voice.
Signing Up for Google Voice. You’ll need a dedicated Google Voice account to support PBX in a Flash. The more obscure the username (with some embedded numbers), the better off you will be. This will keep folks from bombarding you with unsolicited Gtalk chat messages, and who knows what nefarious scheme will be discovered using Google messaging six months from now. So keep this account a secret!
We’ve tested this extensively using an existing Gmail account rather than creating a separate account. Take our word for it. Inbound calling is just not reliable. The reason seems to be that Google always chooses Gmail chat as the inbound call destination if there are multiple registrations from the same IP address. So… set up a dedicated Gmail and Google Voice account2, and use it exclusively with PBX in a Flash. Google Voice no longer is by invitation only. If you’re in the U.S. or have a friend that is, head over to the Google Voice site and register. If you’re living on another continent, see MisterQ’s posting for some tips on getting set up.
You must choose a telephone number (aka DID) for your new account, or Google Voice calling will not work… in either direction. You also have to tie your Google Voice account to at least one working phone number as part of the initial setup process. Your cellphone number will work just fine. Don’t skip this step either. Just enter the provided confirmation code when you tell Google to place the test call to the phone number you entered. Once the number is registered, you can disable it if you’d like in Settings, Voice Setting, Phones. But…
IMPORTANT: Be sure to enable the Google Chat option as one of your phone destinations in Settings, Voice Setting, Phones. That’s the destination we need for PBX in a Flash to function with Google Voice! Otherwise, inbound and/or outbound calls will fail. If you don’t see this option, you may need to call up Gmail and enable Google Chat there first. Then go back to the Google Voice Settings and enable it. Be sure to try one call each way from Google Chat in Gmail. Then disable Google Chat in GMail for this account. Otherwise, it won’t work with PIAF.
While you’re still in Google Voice Settings, click on the Calls tab. Make sure your settings match these:
- Call Screening – OFF
- Call Presentation – OFF
- Caller ID (In) – Display Caller’s Number
- Caller ID (Out) – Don’t Change Anything
- Do Not Disturb – OFF
- Call Options (Enable Recording) – OFF
- Global Spam Filtering – ON
Click Save Changes once you adjust your settings. Under the Voicemail tab, plug in your email address so you get notified of new voicemails. Down the road, receipt of a Google Voice voicemail will be a big hint that something has come unglued on your PBX.
Configuring Google Voice Trunk in FreePBX. All trunk configurations now are managed within FreePBX, including Google Voice. This makes it easy to customize PBX in a Flash to meet your specific needs. Click the Connectivity tab in FreePBX 2.11 and choose Google Voice [Motif]. To Add a new Google Voice account, just fill out the form. NOTE: The form has changed from prior releases of FreePBX. Do NOT check the last box: Send Unanswered to GoogeVoice Voicemail, or you may have problems receiving incoming calls.
Google Voice Username is your Google Voice account name without @gmail.com. Password is your Google Voice password. NOTE: Don’t use 2-stage password protection in this Google Voice account! Phone Number is your 10-digit Google Voice number. Next, check only the first two boxes: Add Trunk and Add Outbound Routes. Then click Submit Changes and reload FreePBX. Down the road, you can add additional Google Voice numbers by clicking Add GoogleVoice Account option in the right margin and repeating the drill. For Google Apps support, see this post on the PIAF Forum.
Outbound Routes. The idea behind multiple outbound routes is to save money. Some providers are cheaper to some places than others. It also provides redundancy which costs you nothing if you don’t use the backup providers. The Google Voice module actually configures an Outbound Route for 10-digit Google Voice calling as part of the automatic setup. If this meets your requirements, then you can skip this step for today.
Inbound Routes. An Inbound Route tells PBX in a Flash how to route incoming calls. The idea here is that you can have multiple DIDs (phone numbers) that get routed to different extensions or ring groups or departments. For today, we’ll build a simple route that directs your Google Voice calls to extension 201. Choose Connectivity -> Inbound Routes, leave all of the settings at their default values except enter your 10-digit Google Voice number in the DID Number field. Enable CallerID lookups by choosing CallerID Superfecta in the CID Lookup Source pulldown. Then move to the Set Destination section and choose Extensions in the left pull-down and 201 in the extension pull-down. Now click Submit and save your changes. That will assure that incoming Google Voice calls are routed to extension 201.
IMPORTANT: Before Google Voice calling will actually work, you must restart Asterisk from the Linux command line interface. Log into your server as root and issue this command: amportal restart.
Eliminating Audio and DTMF Problems. You can avoid one-way audio on calls and touchtones that don’t work with these simple settings in FreePBX: Settings -> Asterisk SIP Settings. Just plug in your public IP address and your private IP subnet. Then set ULAW as the only Audio Codec.
General Settings. Last, but not least, we need to enter an email address for you so that you are notified when new FreePBX updates are released. In FreePBX 2.11, choose Admin -> Module Admin and click on the Upgrade Notifications shield on the right. Plug in your email address, click Submit, and save your changes. Done!
Setting Up a Desktop Softphone. PBX in a Flash supports all kinds of telephones, but we’ll start with the easy (free) one today. You can move on to “real phones” once you’re smitten with the VoIP bug. For today, you’ll need to download a softphone to your desktop PC or Mac.
The easiest way to get started is to set up a YATE softphone on your Desktop computer. Versions are available at no cost for Macs, PCs, and Linux machines. Just download the appropriate one and install it from this link. Once installed, it’s a simple matter to plug in your extension credentials and start making calls. Run the application and choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of your server, 201 for your account name, and whatever password you created for the extension. Click OK.
Once you are registered to extension 201, close the Account window. Then click on YATE’s Telephony Tab and place your first call. It’s that easy!
Monitoring Call Progress with Asterisk. That about covers the basics. We’ll leave you with a tip on how to monitor what’s happening with your PBX. There are several good tools within the FreePBX GUI. You’ll find them under the Reports tab. In addition, Asterisk has its own Command Line Interface (CLI) that is accessible from the Linux command prompt. Just execute the following command while logged in as root: asterisk -rvvvvvvvvvv.
What’s Next? We’ve barely scratched the surface of what you can do with PBX in a Flash. Log into your server as root and type help-pbx for a list of simple install scripts that can add almost any function you can imagine. And Incredible PBX 11 and Incredible Fax can be installed in under 2 minutes to provide you almost every Asterisk application on the planet. You can read the complete tutorial here. In addition, Travelin’ Man 3 can be installed as part of Incredible PBX for rock-solid Internet security. If you care about your wallet, add Travelin’ Man to your server!
New App of the Week. We’re pleased to introduce Trunk Failure Email Alerts for Asterisk supporting SIP, IAX2, and Google Motif trunks. Just insert your email address in this little script and run it every hour as a cron job. You’ll get an email alert whenever any of your VoIP trunks fail. Enjoy!
Originally published: Monday, October 28, 2013
Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.
whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.
New Vitelity Special. Vitelity has generously offered a new discount for PBX in a Flash users. You now can get an almost half-price DID from our special Vitelity sign-up link. If you’re seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. And, when you use our special link to sign up, the Nerd Vittles and PBX in a Flash projects get a few shekels down the road while you get an incredible signup deal as well. The going rate for Vitelity’s DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For PBX in a Flash users, here’s a deal you can’t (and shouldn’t) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls for just $3.99 a month. To check availability of local numbers and tiers of service from Vitelity, click here. Do not use this link to order your DIDs, or you won’t get the special pricing! Vitelity’s rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage and any balance is fully refundable if you decide to discontinue service with Vitelity.
Some Recent Nerd Vittles Articles of Interest…