Well, okay. We confess that today's creation doesn't quite measure up to the legendary Orgasmatron... but, look out Woody Allen, we're close. It's been a couple of years since we released our first preconfigured, turnkey Asterisk® install. Much has changed both in Asterisk and in the hardware and software environment since 2006. So today, to celebrate the six month anniversary of PBX in a Flash and the brand new PBX in a Flash 1.2 release, we're taking another stab at it. From the time you insert the CD 'til you have a functioning Asterisk PBX with all the bells and whistles imaginable... 15 minutes!
NOTE: This article and the Orgasmatron software have been updated. Click here to read the new article.
Coming January 19: Incredible PBX 11 & Incredible Fax for Asterisk 11 and FreePBX 2.11
Our approach today is a little different than the last time around. The processing overhead of CentOS 5.1 has made VMware problematic. Luckily, the price of hardware has dropped like a rock. So today we're comfortable recommending the best phone, the best PC, and the best provider on the planet. And you'll still have your arms and legs intact after you pay the piper. If you've been following along with our articles, you already know that we've identified what we believe to be the perfect Asterisk SIP phone, the Aastra 57i, and we've also identified a perfect small business/home computer on which to run a production Asterisk server for about 50 employees, the Everex gPC (aka "The WalMart Special"). Now that the second generation Everex gPC2 is readily available, we decided to preconfigure one of these systems from the ground up and then make a 2-disk ISO image backup of the whole system using Mondo. So, once you download the ISO images and burn your CDs, it's a 15-minute No-Brainer to install the entire image onto your own Everex gPC2. But you must have a gPC2 for this to work so accept no substitutes, and don't try this with any other hardware or you'll end up with an Electronic Brick instead of an Orgasmatron. The $199 gPC2 systems are available from WalMart and NewEgg among others.
We've preconfigured outbound and incoming trunks from some terrific providers as well as some extensions on your new system. So you literally can sign up for service with these providers, plug in your phones, and you can be in full operation in under an hour. Our only word of caution is not to use these ISO images on another type of computer. Everything has been specifically tailored to the stock gPC2 and chances are very good that the install would not proceed much past erasing and reformatting your hard disk on a different flavor machine. We also recommend that, if you want to add our recommended $25 extra gig of RAM to the gPC2, hold off on installing it until after you have loaded the new ISO image. So... what do you get with this preconfigured build?
In addition to all of the goodness of a stock PBX in a Flash 1.2 build including Asterisk 1.4 running under CentOS 5.1 with all the latest and greatest versions of FreePBX, Apache, MySQL, and PHP, you also get 10 preconfigured Nerd Vittles applications for openers:
- AsteriDex RoboDialer and Telephone Directory
- Telephone Reminders with Support for Recurring Reminders and Web-based TTS Reminder Messages
- NewsClips for Asterisk featuring Dozens of Yahoo News Feeds (TTS)
- Weather Reports by Airport Code (TTS)
- Weather Reports by ZIP Code (TTS)
- Worldwide Weather Forecasts (TTS)
- MailCall for Asterisk: Get Your Email By Telephone (TTS)
- TeleYapper 4.0 Message Broadcasting System
- CallWho for TTS Retrieval and Dialing of Entries in the AsteriDex Database (TTS)
- TFTP Server with preconfigured setups for 15 Aastra 57i SIP telephones
In addition, you get dozens of preconfigured telephony applications and functions that would take even an expert the better part of a year or two to build independently. And, unlike all of the other distributions, we build Asterisk from source so it's simple to modify and upgrade whenever you feel the need. Here's a short list of what you have to look forward to:
- Stealth AutoAttendant with Welcome and Application IVRs
- Key Telephone Support Using Park and Parking Lot
- Intercom/Paging Support
- Bluetooth Proximity Detection with Automatic Call Forwarding to Cell Phone
- Blacklisting with Web and Telephony Interfaces
- CallerID Name Lookups from 8 Providers
- Weekly Automated System Backups to a Flash Drive
- One Touch Day/Night Service
- Music on Hold
- Voicemail with Email Delivery of Messages and Pager Notification
- Voicemail Blasting
- Cell Phone Direct Dial
- Call Forward: All, Busy, No Answer
- Call Waiting
- Call Pickup
- Zap Barge
- Call Transfer: Attended and Blind
- Dictation Service with Email Delivery
- Do Not Disturb
- Phonebook Dial by Name
- Speed Dial
- Flite Text to Speech (TTS)
- Windows Networking with SAMBA
- Linux Firewall
- PBX in a Flash Software Update Service To Keep Your System Current
- One-Click Cepstral TTS Install with Allison... Just Type install-cepstral
Prerequisites. As mentioned, you'll need a $199 Everex gPC2 (WalMart or NewEgg ) to use this build. We also recommend an additional $25 gig of RAM for anything other than home use. We also recommend a 4GB USB flash drive on which to store automatic weekly backups of your new system. Finally, you'll need to cough up a whopping $5 to download the two-disk ISO image for this build. And, yes, we eat our own dog food. The ISO images you'll be downloading were captured as a backup on the flash drive of our gPC2 lab machine. If you use this special build, it seemed only fair that you cover the cost of the bandwidth to download it. As most of you know, we don't have the luxury of freeloading off SourceForge for our downloads. And we didn't want to impose upon our existing bandwidth providers to bring you this custom image. The good news is that, once you download the image from DreamHost, you are more than welcome to pass it along to one or more of your friends or business acquaintances at no charge. You can even do it electronically through the DreamHost Files Forever program. And, if you'd like to host this image for your fellow man at no cost, be our guest... and thank you! Bottom line: For about $250, you'll have the slickest, most reliable PBX on the planet with rock-solid weekly backups and, of course, the one-of-a-kind PBX in a Flash Software Update Service!
Getting Started. Once you have purchased your Everex gPC2, take it out of the box, plug it into your LAN with DHCP and DNS support and Internet connectivity. Having said that, we strongly recommend that you always keep your system running behind a NAT-based firewall/router. Almost any home router will do. Don't redirect any ports to the machine and don't turn the PC on just yet.
Download the two ISO images for the gPC2 from here. If you don't know how to create a CD from an ISO image, read that section from our article last week. In fact, read the whole article. It'll help you immensely down the road. Once you have the two CDs in hand, turn on the gPC2 and quickly insert Disk 1 into the CD/DVD drive and close the drive. If you don't see a Mondo Rescue screen within a minute or less, turn the machine off and then back on again. At the Mondo Rescue main screen, type nuke and press the Enter key. This will erase, repartition, and reformat your hard disk in case you didn't know. This is normal. If you get any kind of errors about incorrect drive or partition names, halt the install by pressing CTL-ALT-DEL and remove the CD. You'll need to install PBX in a Flash using our standard ISO which is available here. Otherwise, go have a cup of coffee and come back in about 12 minutes. When prompted, insert Disk 2 and press the Enter key to finish the install. When the CD ejects, remove it and your gPC2 will reboot after you type exit.
After the reboot finishes, type root at the login prompt for your username and password for your password. The IP address assigned by your DHCP server should appear near the top of the screen. Write it down. If there is no IP address, your machine does not have network connectivity or access to a DHCP server with an available IP address. Correct the problem and reboot.
Securing Passwords. We're going to change five passwords now. For the time being (until you've done some reading), think up one really difficult password (that you won't forget) and use it for all five passwords. At the root@pbx:~ $ command prompt, type the following commands and type in your new password when prompted. Don't forget your password or you'll get to put in your two CDs and start over.
/usr/libexec/webmin/changepass.pl /etc/webmin root yournewpasswordhere
Now, using a web browser, go to the IP address of your new PBX in a Flash server. Click Administration. Log in as admin:password. Then click Menu Config. Change Admin Pwd to a new password that you're NOT using elsewhere. Now click Update and then Done. Click Administration again and then Asterisk Mgmt (FreePBX). If you're prompted for username and password, use admin:password for now. After FreePBX loads, click Setup and then Administrators. In the far right column, click admin, fill in your new password, and click Submit Changes. Then do the same thing for maint. Finally, click on the orange Apply Configuration Changes button and then Continue with Reload. Whew!
Permanently Setting the IP Address. There are different schools of thought on whether to use a fixed or dynamic IP address. Most hardware-based routers support DHCP IP address reservations. The simplest way to permanently secure the existing IP address for your server is to reserve it on your router. If you'd prefer to assign your own IP address, we have included the deprecated netconfig utility which can be run after logging into your server as root. Sometimes you will need to run it once, enter your settings, reboot, and then repeat the drill. Then you should be all set.
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 (highly recommended). 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 (the size of a pack if cigs) known as a Sipura SPA-1001. It's under $60. Be sure you specify that you want an unlocked device, meaning it doesn't force you to use a particular service provider. Once you get it, plug the SPA-1001 into your LAN, and then plug your phone instrument into the SPA-1001. Your router will hand out a private IP address for the SPA-1001 to talk on your network. You'll need the IP address of the SPA-1001 in order to configure it to work with Asterisk. After you connect the device to your network and a phone to the device, pick up the phone and dial ****. At the voice prompt, dial 110#. The Sipura will tell you its DHCP-assigned IP address. Write it down and then access the configuration utility by pointing your web browser to that IP address.
Once the configuration utility displays in your web browser, click Admin Login and then Advanced in the upper right corner of the web page. When the page reloads, click the Line1 tab. Scroll down the screen to the Proxy field in the Proxy and Registration section of the form. Type in the private IP address of your Asterisk system which you wrote down previously. Be sure the Register field is set to Yes and then move to the Subscriber Information section of the form. Assuming you're using the preconfigured extensions starting with 701, do the following. Enter House Phone as the Display Name. Enter 701 as the User ID. Enter 1234 as the Password, and set Use Auth ID to No. Click the Submit All Changes button and wait for your Sipura to reset. In the Line 1 Status section of the Info tab, your device should show that it's Registered. You're done. Pick up the phone and dial 1234# to test it out.
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. 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. We think the best phone out there is the Aastra 57i for under $200. Another $100 buys you the Aastra 57i CT with a cordless DECT phone.
Configuring Aastra 57i SIP Phones. Your new system comes preconfigured to automatically configure up to 15 Aastra 57i phones. Plug each phone into your network and wait for it to boot. Once it boots, press the Option button, then Phone Status (3), then IP & MAC Address (1). Write down each phone's IP address and MAC address. Then press Done to exit from the menus.
Next, we need to tell your phone to use your new server as the TFTP server to obtain its setup. Press the Option button again, then Admin Menu (5). Type 22222 for the admin password and press Enter. Then choose Config Server (1), then TFTP Settings (2), then Primary TFTP (1), enter the IP address of your new server, and press Done a half dozen times.
Log back into your server. Switch to the TFTP directory: cd /tftpboot. You'll notice that there are config files for up to 15 phones. Simply choose the extension number you wish to use for each phone and rename the file from 701.cfg to the MAC address of each phone.cfg. Do NOT use hyphens in the MAC address. One final step and you'll be ready to load up your phones. We need to set the correct IP address to tell each phone where your server is located. So... issue the following command using the IP address of your new server instead of 192.168.0.123. Leave the rest of the command as it is!
sed -i 's|192.168.0.0|192.168.0.123|g' /tftpboot/aastra.cfg
Now restart each phone by pressing the Option button and then Restart Phone (6) and then the Restart button. Once the phone reboots, you can make a test call by dialing 1-2-3-4. You can get the latest news by dialing 5-1-1. Or get a weather forecast by airport code (6-1-1) or zip code (Z-I-P).
A Word About Ports. For the techies out there that want to configure remote telephones or link to a server in another town, you'll need to know the ports to remap to your new server from your firewall. Here's a list of the ports available and used by PBX in a Flash. We don't recommend exposing UDP 5038 which is used to communicate with Asterisk via the Asterisk Manager.
TCP 80 - HTTP (needed if you want to access the web sites on your new server from the Internet)
TCP 22 - SSH (needed if you want remote SSH access)
TCP 9001 - WebMin (needed if you want remote WebMin access, not recommended)
UDP 10000-20000 - RTP (needed for SIP communications)
UDP 5004-5037 - SIP (ditto)
UDP 5039-5082 - SIP (ditto)
UDP 4569 - IAX2 (needed for IAX communications typically between Asterisk servers)
Setting Up Trunks for Outgoing and Incoming Calls. If you want to communicate with the rest of the telephones in the world, then you'll need a way to route outbound calls (terminations) to their destination. And you'll need a phone number (DIDs) so that folks can call you. Unlike the Ma Bell world, you need not rely upon the same provider for both. And nothing prevents you from having multiple outbound and incoming trunks to your new PBX. At a minimum, however, you do need one outbound trunk and one inbound phone number unless you're merely planning to talk to other extensions set up on your system. We've actually put all the hooks in place to make it easy for you to interconnect to other Asterisk servers, but we'll save that for another day. For today, we want to get you a functioning system so that you can place outbound calls to anywhere in the world and can receive incoming calls from anywhere in the world. Thanks to our friends at Vitelity, this is not only an easy process, but it's also an incredible deal... but only for PBX in a Flash users.
Vitelity: The Best Provider and Pricing on the Planet. 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 before the end of June, and you can purchase a Tier A DID with unlimited incoming calls for just $3.79 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. You can't beat the price OR the call quality! Trust us. We've tried just about everybody. Update: This offer has been extended until July 15.
To sweeten the pot a bit more, we've preconfigured both inbound and outbound Vitelity trunks for you. For the vitel-inbound trunk, all you'll need to do is plug in your username, password, and host assigned by Vitelity and adjust the registration string to match your assigned username and password. In FreePBX, click Setup, Trunks, SIP/vitel-inbound and make the changes. Then adjust the vitel-outbound trunk to reflect your actual username in the fromuser and username entries, your real password in the secret entry, and the correct host provided by Vitelity for your outbound calls, and you're all set. In FreePBX, click Setup, Trunks, SIP/vitel-outbound and make the changes.
To test things out, pick up a phone configured on your system and dial an area code and number of someone in the United States or Canada. Now get someone to call you using your new number. Presto! You have inbound and outbound phone service.
An Alternate Outbound Calling Solution. As we said, it costs you almost nothing to add an alternate outbound calling solution to your new system. As luck would have it, adding a second outbound calling provider is now a breeze because AOL just entered the SIP terminations market with a product called AIM Call Out. We wrote about it recently, and you can read the article here. All you need is an AOL or AIM account name and $5 to get you started. The system you've just installed is preconfigured to use AIM Call Out. All you have to do is plug in your username and password, and you can immediately make calls to anywhere in the United States for under 2¢ per minute. Adding international calling is as easy as inserting the correct dial string. If you never use it, it doesn't cost you a dime. So $5 is mighty cheap insurance in our book.
First things first. Sign up for the service at this link. Your username will look something like this: email@example.com. You also will be assigned a password. Using your web browser, open FreePBX by pointing to the IP address of your new server and choosing Administration, then FreePBX. Type in admin as your username and the password you assigned to your system. From the main FreePBX menu, choose Setup, Trunks, and click on SIP/AIM in the far right column. Scroll down to the Peer Details section of the form and replace yourAIMpassword with your new password. Then replace yourAIMaccountname with your actual AIM account name. Now click the Submit Changes button and then Apply Configuration Changes and Continue with Reload.
Setting Up an Alternate DID for Incoming Calls. You also may want to consider a second phone number where people can call you. For example, if Grandma and Grandpa happen to be in another state and still have an old fashioned telephone, you might consider adding an additional DID to your system in their area code. They then can make a local call to reach you by dialing the local DID. On the les.net pay-as-you-go plan, it costs less than a dollar a month plus a penny a minute for the calls. Money well spent if we do say so... and you'll sleep better.
If this setup looks a bit complicated, don't be intimidated. Remember, we're connecting your PBX to the rest of the world so people can call you! With les.net, you have a choice of rate plans for most DIDs. You either can pay $3.99 a month for unlimited inbound calls with two concurrent channels or 99¢ per month and 1.1¢ per minute with four concurrent channels. Just visit their site and click Signup to register. Once you are registered, click Login and then Order DIDs. Pick a phone number. Then click Peers/Trunks and Create New Peer. Write down the Peer Name as you will need it in a minute to set up your connection. Choose SIP for Peer Technology, RFC2833 for DTMF Mode, G.711 for Codecs, Registration for Peer Type, enter the public IP address of your server for Peer Address, make up a secure password and write it down also, specify an Outbound CallerID for your calls, and check the 10-digit dialing box. Leave voicemail unchecked since you'll handle this on your end. Save your changes.
Now choose Your DIDs and click on the one you just ordered. We now need to tie the phone number to the Peer setup you just created above. Click on the DID and select the Route to Peer which you just created. Check the Send DID Prefix box and leave everything else blank. Click Save Changes and you're finished at the les.net end. Now let's set up your inbound DID trunk in Asterisk using FreePBX.
Log into FreePBX using a web browser. Click Setup, Trunks and then Add SIP Trunk. Fill in the CallerID and then drop down to the Outgoing Settings section of the form. For Trunk Name, use the Peer Name that you created above and wrote down. It ought to look something like this: 1092832198. For Peer Details, enter the following using the Peer Name and Password you assigned at les.net:
For Incoming Settings, use from-pstn for the User Context and enter the following User Details:
For the registration string, enter a string like the following using your Peer Name and Password:
Now click the Submit Changes button and then Apply Configuration Changes and Continue with Reload.
Choosing a Preferred Provider. Finally, you'll need to decide whether to use AOL or Vitelity as your primary terminations provider. HINT: Vitelity is less costly. So we've set them up as your primary terminations provider with AOL as the backup. This is handled in FreePBX in the Outbound Routes tab under the AllCalls entry.
A Word About Mondo Rescue. We would be remiss if we didn't mention what a fantastic open source product Mondo Rescue is. It's the sole reason that today's build was possible. Our special thanks go to the development team: Bruno Cornec, Andree Leidenfrost, and Hugo Rabson. It is the first (and only) backup software for Linux builds that actually works reliably. The best way to prove that for yourself is to download this build and try it for yourself on your Everex gPC2. It has much more flexibility than what you will experience, but that would take another dozen pages to explain. We'll save that for another day. In the meantime, if you'd like more information, visit the Mondo Rescue web site.
Where To Go From Here. Well, we've covered a good bit of territory today so we're going to save the really fun stuff for our next installment. In the meantime, you have a new phone system that works. And there are a number of PDF documents in the /root folder on your new system which are worth a read. Better yet, you can browse through all of the documentation which is available for PBX in a Flash by going here. You also can dial D-E-M-O on your new system and see just how powerful direct SIP connections can be to other Asterisk hosts (in this case, ours!)... at no cost. Finally, you can log into your server and type help-pbx for access to a treasure trove of additional features. Enjoy!
Some Recent Nerd Vittles Articles of Interest...