Whether you’re just getting started with VoIP telephony or want to kick the tires of the latest version of PBX in a Flash, this guide is for you. We’ll try to cover the basics as well as the fine points to get your PBX in a Flash system running on almost any platform. Let’s begin by telling you why we’re different and why it matters. PBX in a Flash is the only Asterisk® and FreePBX® aggregation in which most of the components are compiled as part of the installation procedure. There are lots of reasons why this matters. First, you get the very latest updates to the CentOS® 5.6 operating system. Second, you get your choice of numerous Asterisk versions including 1.4, 1.6.2, and 1.8. Third, you have a bloatware-free platform that will let you easily add and compile almost any Linux or Asterisk add-on in a matter of minutes but only if you need it. Fourth, you can adjust and fine-tune the existing PIAF setup to meet your own requirements any time you like. Finally, you’ll have access to the largest collection of free Asterisk utilities and add-ons anywhere on the planet. If you don’t need a particular function, don’t add it. If you do, it’s there for the taking and can be installed in minutes. And, for the newbies that just want a system that works, you can run the Incredible PBX script to generate a turnkey system that’s ready to plug in phones once you complete the PBX in a Flash installation. In less than 5 minutes, you’ll have over 50 Asterisk applications with free Google Voice calling in the U.S. and Canada.
Update: For the very latest news and additions to PBX in a Flash, see this more recent article.
Security Matters! In addition to offering incredible design flexibility, PBX in a Flash has another distinguishing feature which sets it apart. The number one goal of the PIAF Dev Team is and always has been rock-solid security. We always have strongly recommended that you install your server behind a very secure firewall. And PBX in a Flash has been engineered to sit behind most hardware-based firewalls with a Zero Internet Footprint™. This simply means it functions safely and reliably with no ports exposed to the Internet through your firewall. If you think that doesn’t matter, read the horror stories! And remember, it’s your phone bill.
Prerequisites. Because we always install the very latest CentOS and Asterisk components in real time, PBX in a Flash requires an Internet connection and a DHCP-generated IP address for the install to complete. So your particular hardware platform must include a network card for which CentOS 5.6 has a driver. It’s actually part of the kernel in Linux. The good news is that, even if your network driver is missing, we provide all of the tools you’ll need to compile the missing piece on the fly as part of the install. Just download the Linux driver from your manufacturer, copy the driver to a thumb drive, insert it into a USB slot on your server, drop down to the Linux command prompt and compile the driver, and then resume the install.
PBX in a Flash gives you a choice of ISOs and OpenVZ templates to make the installation easy on almost any platform whether it’s a dedicated or virtual machine. And we have 32-bit and 64-bit ISOs for CD-ROM installs as well as a USB thumb drive ISO that will work with almost any new hardware even if it’s lacking a CD-ROM and DVD drive.
You’ll need a monitor and keyboard to perform the install, but these can be removed once the system is in operation. Now let’s get started.
Choosing a Hardware Platform. Deciding whether to use your own server or rent space on someone else’s depends upon your own requirements and budget obviously. The advantages to a service such as RentPBX, which supports the PBX in a Flash project, are that they set up the system for you and at $19.95 a month are relatively inexpensive. You also don’t have to worry about adequate bandwidth to make calls. But, if you’re a tinkerer and you have an old PC lying around or don’t mind spending a couple hundred dollars to buy a refurbished Dell or Atom-based PC, then you may prefer the dedicated PC route. Keep in mind that you’ll need about 100 kbps of Internet bandwidth for each simultaneous SIP call handled by your server. Unless you’re building a system for more than a dozen users, the type of PC really won’t affect performance so long as there’s 512MB of RAM and 10GB of disk space on the system. Start your hardware search on the PBX in a Flash Forum. It regularly features low-cost refurbished servers and Atom PCs that make excellent PIAF servers.
ISO Setup Procedure. Once you have your hardware connected to a reliable Internet source, you’ll need to choose the appropriate ISO for your hardware. If you have a CD-ROM or DVD drive on your server, we’d recommend the 32-bit PIAF 220.127.116.11.2 ISO. Just download it from SourceForge or one of the PIAF mirror sites, burn it to a CD, and then boot your server from the CD. If your server lacks a CD-ROM and DVD drive, then download the 32-bit PIAF 18.104.22.168.2 Flash-Only ISO from SourceForge and copy it to a 1GB or larger thumb drive following the instructions in this Nerd Vittles tutorial. Then boot your server from the thumb drive. You’ll find OpenVZ and VMware templates on our download mirrors as well.
PIAF Installation Procedure. Once you’ve booted the PIAF installer, you’ll be prompted to choose an installation method. For most users, simply pressing the Enter key will get things started. Choose a keyboard and time zone when prompted and then enter a very secure root password for your new server. The installer then will load CentOS 5.6 onto your server. When complete, your server will reboot. Remove the CD or Flash Drive at this point, and you’ll be prompted to choose the version of Asterisk to install. The following Asterisk choices are available:
- PIAF-Purple – Asterisk 22.214.171.124 with FreePBX 2.8
- PIAF-Gold – Asterisk 126.96.36.199 with FreePBX 2.8
- PIAF-Silver – Asterisk 1.4.41 with FreePBX 2.8
- PIAF-Bronze – Asterisk 188.8.131.52 with FreePBX 2.8
You also have the option of exiting to the Linux command prompt to compile a network driver or to select a different version of Asterisk 1.8 to install. If you choose this option, you’ll be prompted to log into your server as root with the root password you chose previously. Then you can execute any series of Linux commands or issue one of the following commands to choose a specific release of Asterisk 1.8:
- piafdl -p beta_1870 (loads Asterisk 184.108.40.206)
- piafdl -p beta_1860 (loads Asterisk 220.127.116.11)
- piafdl -p beta_1850 (loads Asterisk 18.104.22.168)
- piafdl -p beta_1844 (loads Asterisk 22.214.171.124)
- piafdl -p beta_1843 (loads Asterisk 126.96.36.199)
- piafdl -p beta_1842 (loads Asterisk 188.8.131.52)
- piafdl -p beta_1841 (loads Asterisk 184.108.40.206)
- piafdl -p 184 (loads Asterisk 1.8.4)
- piafdl -p 1833 (loads Asterisk 220.127.116.11)
- piafdl -p 1832 (loads Asterisk 18.104.22.168)
If you compiled a network driver and wish to resume the installation process, just reboot the server. If you chose a specific flavor of Asterisk 1.8, simply accept the license agreement and the PIAF-Purple install will proceed.
The PBX in a Flash installer then syncs the time on your server to NTP, installs the latest yum updates for CentOS, installs the version of Asterisk you chose as well as FreePBX 2.8 and some other utilities including WebMin, Festival and Flite text-to-speech support for Asterisk. Finally, it patches your system to activate the IPtables firewall for both IPv4 and IPv6 as well as adding Fail2Ban monitoring for Asterisk, SSH, and your Apache web server. You then will be prompted to choose a master password for FreePBX and the other VoIP web utilities. Once your server reboots, you can log into the Linux CLI using your root password to obtain the IP address of your server. Or you can access the PIAF web GUI with a browser pointed to the same IP address. To access the FreePBX GUI, choose that icon from the Admin menu. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose in completing the PIAF install.
FreePBX Setup. FreePBX is installed with virtually all modules activated. Before you can actually make and receive calls, you’ll need to add one or more VoIP trunks with providers, create extensions for your phones, and add inbound and outbound routes that link your extensions to your trunks. If all of this sounds like Greek to you, then your next step should be to install Incredible PBX. It’s a 5-minute procedure that creates more than a dozen extensions and activates free inbound and outbound calling through Google Voice using a freely available Google Voice account. It also sets up default trunks for a number of terrific providers. All you have to do is sign up for accounts and plug in your credentials. Finally, Incredible PBX configures almost 50 Asterisk utilities that demonstrate the versatility of an Asterisk-based PBX. Here’s the unabridged feature list:
- Amazon S3 Cloud Computing
- Asternic CDR Reports
- Baseball Scores & Schedules
- CallerID Superfecta (FreePBX Module adds Names to CID Numbers)
- SIP Color Videophone Support
- CallWho for Asterisk
- Cepstral TTS for 32-bit, Asterisk 1.81 (/root/nv/install-cepstral)
- Preconfigured Email That Works with SendMail
- PIAF Endpoint Manager
- ENUMPLUS (Use FreePBX to configure)
- Extensions (16 preconfigured with random passwords)
- FAX with HylaFax & AvantFax (/root/incrediblefax.sh)
- FAX on Demand Server (Dial F-O-D)
- Festival Server and Festival TTS for Asterisk (festival –server &)
- Flite TTS for Asterisk
- FreePBX Backups
- Google Voice (preconfigured)
- Free Hamachi VPN (install-hamachi)
- Hotel-Style Wakeup Calls (FreePBX Module)
- Incredible Backups… and Restores
- ISN: FreeNum SIP Calling from Any Phone
- MeetMe Conference Bridge (just dial C-O-N-F)
- Mondo Full System Backups (install-diskbackup)
- Incremental Daily Backups (install-dailybackup)
- Munin Reports (install-munin)
- NewsClips from Yahoo
- ODBC Database Support
- New PBX in a Flash Registry (show-registry)
- PogoPlug Cloud Computing
- Reminders by Phone and Web
- SAMBA Windows Networking (setup-samba)
- SIP URI Outbound Calling (call any SIP URI worldwide for free)
- Free Skype Inbound & Outbound Calling (for personal use)
- SMS Messaging with Google Voice
- Stealth AutoAttendant
- TFTP Server (setup-tftp)
- Tide Reports with xTide
- Trunk Lister Script (/root/nv/trunks.sh)
- Trunks (Vitelity, Gtalk, SIPgate, IPkall, VoIP.ms, and ENUM)
- Twitter Interface (Make Free Calls and Send SMS Messages)
- Weather by Airport Code
- Weather by ZIP Code
- Worldwide Weather
Give Incredible PBX a try. You won’t be sorry. If you’d rather do it yourself, read on…
Astricon 2011. Astricon 2011 will be in the Denver area beginning Tuesday, October 25, through Thursday, October 27. We hope to see many of you there. Be sure to mention you’d like a free PIAF thumb drive. We hope to have a bunch of them to pass out to our loyal supporters. Nerd Vittles readers also can save 15% on your registration by using this coupon code.
Configuring FreePBX to Make Your First Call. There are four components in FreePBX that need to be configured before you can place a call or receive one from outside your PBX in a Flash system. So here’s FreePBX for Dummies in less than 50 words. You need to configure Trunks, Extensions, Outbound Routes, and Inbound Routes. Trunks are hosting provider specifications that get calls delivered to and transported from your PBX to the rest of the world. Extensions are internal numbers on your PBX that connect your PBX to telephone hardware or softphones. Inbound Routes specify what should be done with calls coming in on a Trunk. Outbound Routes specify what should be done with calls going out to a Trunk. Everything else is bells and whistles.
Trunks. When you sign up with most of the better ITHP’s that support Asterisk, they will provide documentation on how to connect their service with your Asterisk system. If they have a trixbox tutorial, use that since it also uses FreePBX as the web front end to Asterisk. Here’s an example from les.net. And here’s the Vitelity support page although you will need to set up an account before you can access it. We also have covered the setups for a number of providers in previous articles. Just search the Nerd Vittles site for the name of the provider you wish to use. You’ll also find many Trunk setups in the trixbox Trunk Forum. Once you find the setup for your provider, add it in FreePBX by going to Setup, Trunks, Add SIP Trunk. Our AxVoice setup (which is all entered in the Outgoing section with a label of axvoice) looks like this with a Registration String of yourusername:email@example.com:
And our Vitelity Outbound Trunk looks like the following (labeled vitel-outbound) with no registration string:
Extensions. Now let’s set up a couple of Extensions 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. To create extension 201 (don’t start with 200), click Setup, 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 … 1299864 [make this unique AND secure!]
dtmfmode … rfc2833
Voicemail & Directory … Enabled
voicemail password … 1299864 [make this unique AND secure!]
email address … firstname.lastname@example.org [if you want voicemail messages emailed to you]
pager email address … email@example.com [if you want to be paged when voicemail messages arrive]
email attachment … yes [if you want the voicemail message included in the email message]
play CID … yes [if you want the CallerID played when you retrieve a message]
play envelope … yes [if you want the date/time of the message played before the message is read to you]
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
Now create several more extensions using the template above: 202, 203, 204, and 205 would be a good start. Keep the passwords memorable. You’ll need them whenever you configure your phone instruments.
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. Incredible PBX automatically randomizes all of the extension passwords for you.
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 like this: 192.168.1.0/255.255.255.0 using your actual subnet, of course.
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. We’re going to skip that tutorial today. You can search the site for lots of information on choosing providers. Assuming you have only one or two for starters, let’s just set up a default outbound route for all your calls. Using your web browser, access FreePBX on your server and click Setup, Outbound Routes. Enter a route name of Everything. Enter the dial patterns for your outbound calls. In the U.S., you’d enter something like the following:
Click on the Trunk Sequence pull-down and choose your providers in the order you’d like them to be used for outbound calls.Click Submit Changes and then save your changes. Note that a second choice in trunk sequence only gets used if the calls fail to go through using your first choice. You’ll notice there’s already a 9_outside route which we don’t need. Click on it and then choose Delete Route 9_outside. Save your changes.
Inbound Routes. We’re also going to abbreviate the inbound routes tutorial just to get you going quickly today. 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 recommend you first build a Ring Group with all of the extension numbers you have created. Once you’ve done that, choose Inbound Routes, leave all of the settings at their default values and move to the Set Destination section and choose your Ring Group as the destination. Now click Submit and save your changes. That will set up a default incoming route for your calls. As you add bells and whistles to your system, you can move the Default Route down the list of priorities so that it only catches calls that aren’t processed with other inbound routing rules.
Activating Email. All that is required to get outbound mail working on servers where your provider does not block downstream email hosts is to make a simple change in /etc/asterisk/vm_general.inc. Modify the serveremail entry so that it looks like this: firstname.lastname@example.org. You’ll be in business once you restart Asterisk: amportal restart.
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. Scroll to the bottom of the General Settings screen after selecting it from the left panel. Plug in your email address, click Submit, and save your changes. Done!
Adding Plain Old Phones. Before your new PBX will be of much use, you’re going to need something to make and receive calls, i.e. a telephone. For today, you’ve got several choices: a POTS phone, a softphone, or a SIP phone. Option #1 and the best home solution is to use a Plain Old Telephone or your favorite cordless phone set (with 8-10 extensions) if you purchase a little device known as a Sipura SPA-3102. It’s under $70. Be sure you specify that you want an unlocked device, meaning it doesn’t force you to use a particular service provider. This device also supports connection of your PBX to a standard office or home phone line as well as a telephone.
Downloading a Free Softphone. Unless you already have an IP phone, the easiest way to get started and make sure everything is working is to install an IP softphone. You can download a softphone for Windows, Mac, or Linux from CounterPath. Or download the pulver.Communicator or the snom 360 Softphone which is a replica of perhaps the best IP phone on the planet. Here’s another great SIP/IAX softphone for all platforms that’s great, too, and it requires no installation: Zoiper 2.0 (formerly IDEfisk). All are free! Just install and then configure with the IP address of your PBX in a Flash server. For username and password, use one of the extension numbers and passwords which you set up with freePBX. Once you make a few test calls, don’t waste any more time. Buy a decent SIP telephone. Visit the PBX in a Flash Forum for lots of suggestions on telephones. Our personal favorite and the phone that PBX in a Flash officially supports is the Aastra 57i or 57iCT which also includes cordless DECT phone. Do some reading before you buy.
Where To Go From Here. The PBX in a Flash script repository at pbxinaflash.org also has gotten a facelift. That should be your next stop because it is the home of all the goodies that make PBX in a Flash shine. Tom King, the ultimate scripting guru, manages that site. So check it often. You’ll also find all of our Nerd Vittles Goodies work with this new release. Most of our original collection work flawlessly with Asterisk 1.4, 1.6.2, and 1.8 including AsteriDex, Yahoo News Headlines, Weather by Airport Code, Weather by Zip Code, Worldwide Weather Forecasts, Telephone Reminders, MailCall for Asterisk, and TeleYapper. Complete documentation for each application also is provided at the link above. And, if you have a DBT-120 Bluetooth adapter, you’ll be happy to learn that it works out-of-the-box with all versions of PBX in a Flash. Dust off our article on Proximity Detection, and you should be in business in under 10 minutes. Enjoy!
Originally published: Tuesday, June 14, 2011
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 and 60 free minutes 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 and you get a free hour of outbound calling to test out their call quality. 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! After the free hour of outbound calling, 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…