Home » Search results for 'ivr' (Page 23)

Search Results for: ivr

The Most Versatile VoIP Provider: FREE PORTING

Orgasmatron 5.2: The Secure Swiss Army Knife for Asterisk

It’s been an exciting couple of weeks watching the overwhelmingly positive response to our release of Orgasmatron 5.1. With this version, we introduced a new Asterisk® security model that took into account the ever-increasing security risks posed by exposing web and telephony servers to direct Internet access. The bottom line is this. If your telecom requirements still can be accomplished by placing a server securely behind a $35 hardware-based Internet firewall with no Internet exposure, then it makes absolutely no sense to dangle such a tempting target in front of the world’s most nefarious creeps.

News Flash: Incredible PBX 4.0 is now available with FreePBX 2.10 support!

Coming January 19: Incredible PBX 11 & Incredible Fax for Asterisk 11 and FreePBX 2.11

Our experience suggests that the only trade off with this new approach is the inability to receive anonymous SIP calls… a small price to pay considering the potential financial and computer risks involved. You still can place outbound VoIP calls as well as placing and receiving calls using any of the phone numbers registered on your new PBX in a Flash server. And, thanks to Google Voice, SIPgate, and IPkall, all inbound calls are free, and all outbound calls to numbers in the U.S. and Canada are free as well.

If a SIP URI and your own Freenum/ISN number are simply features you can’t live without, sign up for a voip.ms IAX account, and you’ll get a SIP URI for free. Inbound SIP URI and Freenum/ISN calls will set you back $1 for every 1,000 minutes billed in 6 second increments.

Or you can sign up for a free IP Freedom CallCentric account and configure a new SIP trunk in FreePBX by following these directions. Once configured, your new server SIP URI will be 1777xxxxxxx@in.callcentric.com where xxxxxxx is your assigned 7-digit CallCentric number.

Keep in mind that a new security vulnerability has been found with either Asterisk or FreePBX almost monthly. The chart below tells you why. With virtually limitless attack surfaces because of the number of interrelated components in CentOS, Asterisk, and FreePBX comes enormous and recurring potential for remote compromise of these systems. Rather than play this cat-and-mouse security game with the underworld, the Orgasmatron design changes the paradigm. It lets you use any (secure or insecure) version of Asterisk and FreePBX without worrying about any outside attacks. Do passwords on your new server matter? Not really… unless there is someone inside your firewall that you don’t trust. 🙄 Are we going to secure them anyway? Absolutely. But instead of the constant worry over new security vulnerabilities, Orgasmatron 5.2 lets you enjoy exploring the world of Asterisk and VoIP telephony with an incredibly rich feature set that you won’t find anywhere else, period! We’ll resist making any other device analogies, but the idea here is to protect the good guy (you!) while keeping the bad guys out. No penetration. No worries. Simple as that.

In our former life working for a living, we actually procured and managed multimillion dollar PBXs as part of our "other duties as assigned." Without qualification, we can tell you that the feature set that Orgasmatron 5.2 brings to the table for free runs circles around anything you could buy (then or now) in the commercial marketplace. And, at one time or another, we purchased every Nortel feature good money could buy. There’s one other difference. Orgasmatron 5.2 runs swimmingly on a $200 Atom-based PC that you can purchase at any Best Buy as well as hundreds of other stores including Amazon, NewEgg, and Buy.com. We paid more than $200 to provision an additional extension on our Nortel switch! You, of course, can add as many extensions as you like. De nada.

So, why a new version of Orgasmatron in only a few weeks? Well, it’s not security-related. In fact, there is nothing wrong with continuing on with Orgasmatron 5.1. Unfortunately, it relied exclusively upon SIPgate to make free Google Voice calls in the U.S. and Canada. And SIPgate required an invite using an SMS message from a U.S.-based cellphone. That pretty well knocked out all of our friends living outside the United States. Today’s version fixes that by letting anyone sign up for a free IPkall phone number in Washington state. All you need is a valid email address. The setup process is a bit more complex because IPkall doesn’t support registered connections to their servers. But we’ll walk you through the additional steps and, once completed, your server will be just as secure as the SIPgate approach we set up with Orgasmatron 5.1. And few, if any, Linux skills are required to set up or manage Orgasmatron 5.2. As we’ve noted previously, if you can handle slice and bake cookies, you’ve got the necessary skillset! Be aware this is about a one-hour project, and you need to track through the article carefully, or the entire house of cards comes down.

New Asterisk Security Model. Orgasmatron 5.2 maintains our design goal of running an absolutely secure Asterisk PBX from behind a hardware-based firewall with either NO INBOUND PORTS exposed to the Internet with SIPgate or an IP-address-restricted IAX port for IPkall. Don’t defeat this security mechanism by exposing additional ports on your PBX in a Flash server to Internet access. And choose your NAT-based firewall/router carefully. All of these devices are not created equally. Not only do some perform better than others, but certain models are notoriously bad at handling NAT-based routing tasks, a critical requirement in the Asterisk VoIP environment. In almost every case of problems with one-way audio, the real culprit can be traced back to a crappy router. For $35, you really can’t go wrong with the dLink WBR-2310. If you want traffic shaping functionality as well, take a look at dLink’s Gaming Router, our personal favorite.

As long as your router, Google Voice, SIPgate, and IPkall passwords are secure, you can sleep like a baby. We use an intermediate SIP provider for Google Voice to set up free outbound Google Voice calls in the U.S. and Canada because Google Voice actually places two calls to connect you to your destination. First, you get a call back. And then the party you’re calling is connected. The SIPgate or IPkall trunk is used by Google Voice to call you back so the inbound call is always free. We handle the interconnection magic with Asterisk transparently so your calls appear to be processed as if you were using a standard telephone to dial out. Just refrain from using extension 75 in Asterisk for personal conferencing!

The choice is yours. You can use SIPgate with no incoming ports exposed to your server from the Internet. Or you can use IPkall and map UDP port 4569 (IAX2) on your hardware-based firewall to the internal IP address of your new PBX in a Flash server. Even with the IPkall setup, we’ve locked down IPtables (our Linux firewall) to restrict IAX access to several specific IP addresses so your server remains absolutely secure. We’ve also included support for FonicaTec’s IAX offering for those that want a backup IAX provider. We’ll have much more to say about IPtables in coming weeks.

If you’ve already installed Orgasmatron 5.1 and it’s working for you, do you need to upgrade? NO. With the exception of the new IAX support for IPkall, the code in Orgasmatron 5.2 is identical.

We, of course, continue to recommend that you sign up with Vitelity so you have an alternate communications vehicle in the event of a problem with your free service. Vitelity also can provide 911 emergency service for your home or home office. You can save a little money while supporting the PBX in a Flash project by using the links at the end of this article.

Swiss Army Knife Inventory. There’s no need for a Swiss Army Knife if you don’t know what all the blades are for. So, for those that are wondering what’s included in the Orgasmatron 5.2 build, here’s a feature list of the components you get in addition to the base PBX in a Flash build with CentOS 5.4, Asterisk 1.4, FreePBX 2.6, and Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. Please note that A2Billing, Cepstral TTS, Hamachi VPN, and Mondo Backups are optional and may be installed using the scripts that are provided.

Prerequisites. Here’s what you’ll need to get started:

  • Broadband Internet connection
  • Rock-solid NAT router/firewall. Recommend: $35 dLink WBR-2310
  • $200 PC on which to run PBX in a Flash or a Proxmox Virtual Machine
  • Free Google Voice account (HINT: Under $2 on eBay)
  • Free SIPgateOne residential account (Use cell to get SMS invite) OR
  • Free IPkall IAX account

Learn First. Install Second. Even though the installation process is now a No-Brainer, you are well-advised to do some reading before you begin. VoIP PBX systems have become a favorite target of the hackers and crackers around the world and, unless you have an unlimited bank account, you need to take some time learning where the minefields are in today’s VoIP world. Start by reading our Primer on Asterisk Security. Then read our PBX in a Flash and VPN in a Flash knols. If you’re still not asleep, there’s loads of additional documentation on the PBX in a Flash documentation web site.

Today’s Drill. The installation process is straight-forward, but a little different than the Orgasmo 5.1 scenario because of the need to accommodate IPkall. Just don’t skip any steps. In a nutshell, here are the 6 Steps to Free Calling and an incredibly versatile, preconfigured Asterisk PBX:

1. Install the latest version of PBX in a Flash
2. Run the Orgasmatron 5.2 Installer
3. Configure a softphone or SIP telephone
4. Configure Providers for Orgasmatron 5.2
5. Enter your Google Voice and SIPgate/IPkall credentials
6. Change existing passwords to secure your system

Installing PBX in a Flash. Here’s a quick tutorial to get PBX in a Flash installed. We recommend you install the latest PIAF 1.6 beta on a new Atom-based PC. This beta is virtually identical to version 1.4 except it uses CentOS 5.4 instead of CentOS 5.2. This means it works better with newer hardware including Atom-based computers and newer network cards. Unlike other Asterisk aggregations, PBX in a Flash utilizes a two-step install process. The ISO only installs the CentOS operating system. Once installed, the server reboots and downloads a payload file that includes Asterisk, FreePBX, and many other VoIP and Linux utilities. We use the identical payload for versions 1.3, 1.4, 1.5, and 1.6 of PBX in a Flash. The beta label simply means we haven’t had time to sufficiently test CentOS. But this is not a Microsoft-style beta so fear not!

Download the 32-bit, PIAF 1.6 version from SourceForge, Vitelity, Cybernetic Networks, or AdHoc Electronics. The MD5 checksum for the file is e8a3fc96702d8aa9ecbd2a8afb934d36. Burn the ISO to a CD. Then boot from the installation CD and type ksalt to begin.

WARNING: This install will completely erase, repartition, and reformat ALL disks on your system! Press Ctrl-C to cancel the install.

On some systems you may get a notice that CentOS can’t find the kickstart file. Just tab to OK and press Enter. Don’t change the name or location of the kickstart file! This will get you going. Think of it as a CentOS ‘feature’. 🙂

At the keyboard prompt, tab to OK and press Enter. At the time zone prompt, tab once, highlight your time zone, tab to OK and press Enter. At the password prompt, make up a VERY secure root password. Type it twice. Tab to OK, press Enter. Get a cup of coffee. Come back in about 5 minutes. When the system has installed CentOS, it will reboot. Remove the CD promptly. After the reboot, choose A option. Have a 10-minute cup of coffee. After installation is complete, the machine will reboot a second time. Log in as root with your new password and execute the following commands:

update-scripts
update-fixes

When prompted, change the ARI password to something really obscure. You’re never going to use it! You now have a PBX in a Flash base install. On a stand-alone machine, it takes about 30 minutes. On a virtual machine, it takes about half that time.

NOTE: So long as your system is safely sitting behind a hardware-based firewall, we do NOT recommend running update-source on the Orgasmatron builds because of parking lot issues in the latest releases of Asterisk.

Running the Orgasmatron 5.2 Installer. Log into your server as root and issue the following commands to run the Orgasmatron 5.2 installer:

cd /root
wget http://pbxinaflash.net/orgasmo52.x
chmod +x orgasmo52.x
./orgasmo52.x

Have another 15-minute cup of coffee. It’s a great time to consider a modest donation to the Nerd Vittles project. You’ll find a link at the top of the page. When the installer finishes, READ THE SCREEN!

Now run passwd-master1. Set your FreePBX passwords to something very secure but different from your Linux root password.

Next, type status2 and press Enter. Write down the IP address of your new server.

If you’re using IPkall, now’s the time to log in to your hardware-based firewall/router and map UDP port 45693 to the private IP address that you just wrote down. This tells your firewall to pass all IAX2 traffic from the Internet directly to your new server. Don’t worry. We have severely restricted which IP addresses can actually send IAX data through the PBX in a Flash IPtables firewall which is an integral part of this build. And, remember, no hardware firewall adjustments are necessary if you’re using SIPgate instead of IPkall.

For good measure, we recommend you reboot your server at this point. The command to type is simple: reboot4

Configuring a SIP Phone. There are hundreds of terrific SIP telephones and softphones for Asterisk-based systems. Once you get things humming along, you’ll want a real SIP telephone, and you’ll find lots of recommendations on Nerd Vittles. For today, let’s download a terrific (free) softphone to get you started. We recommend X-Lite because there are versions for Windows, Mac, and Linux. So download your favorite from this link. Install and run X-Lite on your Desktop. At the top of the phone, click on the Down Arrow and choose SIP Account Settings, Add. Enter the following information using 82812661 as the password for extension 701 and the actual IP address of your PBX in a Flash server instead of 192.168.0.251. Click OK when finished. Your softphone should now show: Available.

Don’t Forget! After you change your extension passwords later in this tutorial, you will need to update the password entry in X-Lite, or you will no longer be able to place calls! In fact, you will get locked out of your server for 90 minutes after three failed password attempts. So put this on a sticky note so you don’t forget, or you’ll regret it in about 15 minutes.

Either a free SIPgate One residential phone number or an IPkall number is a key component in today’s project. And there’s really no reason you can’t use both if they’re available in your location. Do NOT use special characters in your provider passwords, or nothing will work! Continue reading whichever section below applies to you.

Configuring SIPgate. If you live in the U.S. and have a cellphone, we’d recommend the SIPgate option since no adjustment of your hardware-based firewall is required. Otherwise, skip to the IPkall setup below. Step #1 is to request a SIPgate invite at this link. You’ll need to enter your U.S. cellphone number to receive the SMS message with your invitation code. Don’t worry. You can erase your cellphone number from your account once it is set up. Once you receive the invite code, enter it and choose the option to set up a residential account. Next, choose a phone number and write it down. The area code really doesn’t matter because Google Voice is the only one that will be calling this number after we get things set up. For now, leave your cellphone number in place so that you can receive your confirmation call from Google Voice in the next step. After that, you’ll want to revisit SIPgate and remove all parallel calling numbers. Finally, click on the Settings link and write down your SIP ID and SIP Password. You’ll need these in a few minutes to configure PBX in a Flash. Now place a call to your new SIPgate number and make certain that your cellphone rings before proceeding.

Configuring IPkall. If you’ve opted to use IPkall, here’s the drill. First, you’ll need to register for a free IPkall number. This is actually a two-step process. Set it up as a SIP connection when you first register. Then we’ll change it to IAX once your new phone number is provided. So your initial IPkall request should look like this:

We recommend area code 425 for your requested number because IPkall appears to have lots of them. If they don’t have an available number, your request apparently goes in the bit bucket. You’ll know because IPkall typically turns these requests around in a few minutes. Don’t worry about the mothership entry. We’ll change it shortly. The other issue here is your public IP address. If you have a dedicated IP address, no worries. Just plug in the IP address for SIP Proxy. If it’s dynamic, then you’ll need to set up a fully-qualified domain name (FQDN) with a provider such as dyndns.com. Once you’ve got it set up, enter your credentials in the Dynamic DNS tab of your hardware-based firewall to assure that your dynamic IP address is always synchronized with your FQDN. Then enter the FQDN for your SIP Proxy address in the IPkall form. Be sure to make up a VERY secure password. Now send it off and wait for the return email with your new phone number.

When you receive your new phone number, you’ll need to revisit the IPkall site and log in with your phone number and the password you chose above. Make the changes shown below using your actual IPkall phone number instead of 4259876543:

It’s worth stressing that these settings are extremely important so check your work carefully. Be sure the IAX option is selected. Be sure there are no typos in your two phone number entries. And be sure your FQDN or public IP address is correct. Then save your new settings.

We’re going to be making some entries in FreePBX which is the web-GUI that manages PBX in a Flash. For now, we simply need to enter your new IPkall phone number so that incoming calls to your IPkall number will actually ring on your softphone. Later, we’ll make some further adjustments once we get Google Voice humming along.

Using a web browser from your desktop, log in to FreePBX 2.6 at the following link substituting your server’s private IP address for ipaddress: http://ipaddress/admin. You’ll be prompted for a user name (maint) and password (the one you just created with passwd-master).

When FreePBX loads, choose Setup, Trunks, ipkall (iax). In the USER Context field, enter your 10-digit IPkall phone number. Click Submit Changes, Apply Configuration Changes, Continue with Reload to save your settings.

TIP: Be aware that IPkall cancels an assigned phone number after 30 consecutive days of inactivity. If you will be using your number infrequently, it’s a good idea to schedule a Weekly Reminder to call the number with a prerecorded message. This will assure that your number stays functional.

Now let’s test your new phone number. Call your IPkall number from a cellphone or some other phone. Your softphone should ring. Answer the call, and be sure you have voice in both directions! Do not proceed without success here, or the rest of the adventure is a waste of your time.

Configuring Google Voice. Google Voice still is by invitation only so the first thing you’ll need is an invite. If you’re in a hurry, then stroll over to eBay where you’ll find lots of them for under $2. Once you have your invite in hand, click on the email link to set up your account. After you’ve chosen a telephone number, plug in your new SIPgate or IPkall number as the destination for your Google Voice calls and choose Office as the Phone Type. Trust us.

Google then will place a call to your number and ask you to enter a confirmation code that’s been provided. When your cellphone (SIPgate) or softphone (IPkall) rings, answer it and punch in the number. Wait for confirmation. Then hang up.

As we mentioned earlier, there’s no reason you can’t set up both SIPgate and IPkall forwarding numbers in Google Voice. Just repeat the drill with the other provider’s number if you wish to activate both numbers for use with Google Voice. They’re not both going to ring simultaneously as you will see in a minute.

While you’re still in Google Voice Settings, click on the Calls tab. Make sure your settings match these:

  • Call ScreeningOFF
  • Call PresentationOFF
  • Caller ID (In)Display Caller’s Number
  • Caller ID (Out)Don’t Change Anything
  • Do Not DisturbOFF

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.

Finally, place a test call to your new Google Voice number and be sure your cellphone or softphone rings. Don’t move forward until you’ve been able to successfully place a call to your phone by dialing your Google Voice number. Once this is working, revisit SIPgate and remove all parallel calling numbers including your cell number.

Adding Your Credentials to PBX in a Flash. We’re ready to insert your Google Voice credentials and SIPgate/IPkall number into PBX in a Flash. You’ll need four pieces of information: your 10-digit Google Voice phone number, your Google Voice account name (which is the email address you used to set up your GV account), your GV password (no spaces!), and your 11-digit SIPgate or IPkall RingBack DID (beginning with a 1). Don’t get the 10-digit GV number mixed up with the 11-digit SIPgate/IPkall RingBack DID, or nothing will work. 🙂

Log back into your server as root and issue the following command: ./configure-gv. Check your entries carefully. If you make a typo in entering any of your data, press Ctrl-C to cancel the script and then run it again!!

Configuring FreePBX. Now shift back to your Desktop and, using a web browser, log in to FreePBX 2.6 at the following link substituting your actual IP address for ipaddress: http://ipaddress/admin. You’ll be prompted for a user name (maint) and password (the one you just created with passwd-master). Depending upon which intermediate provider you’re using, do the following:

SIPgate Setup. When FreePBX loads, choose Setup, Trunks, sipgate. In Peer Details, replace both instances of sipID with your actual SipGate SIP ID. In Peer Details, replace sipPassword with your actual SipGate SIP Password. In Register String, replace sipID with your SipGate SIP ID, replace sipPassword with your SipGate SIP Password, and replace 3333333333 with your 10-digit SipGate Phone Number. When finished, the Register String should look something like the following:

7004484f0:B8TTW3@sipgate.com/4155201234

Click Submit, Apply Configuration Changes, Continue with Reload to save your changes.

SIPgate and IPkall Setup. While still in FreePBX with your browser, click Setup, Inbound Routes, gv-ringback. In DID Number, replace 3333333333 with your 10-digit SIPGate or IPkall Phone Number. In CallerID Number, replace 7777777777 with your 10-digit Google Voice Number.

Click Submit, Apply Configuration Changes, Continue with Reload to save your changes.

Securing FreePBX. You’re almost done. While still in FreePBX, choose each of the 16 preconfigured extensions on your new server and change the extension AND voicemail passwords. Here’s the drill: Setup, Extensions, 501, Submit. After changing secret and Voicemail Password, repeat with the next extension number instead of 501. Then Apply Config Changes, Continue when you’ve finished with all of them.

Now change the default DISA password: Setup, DISA, DISAmain, PIN, Submit Changes, Apply Config Changes, Continue.

Don’t forget to adjust your X-Lite password to match the password entry you made for extension 701!

Orgasmatron Test Flight. The proof is in the pudding as they say. So let’s try two simple tests. First, from another phone, call your Google Voice number. Your softphone should begin ringing shortly. Answer the call and make sure you can send and receive voice on both phones. Hang up. Now let’s place an outbound call. Using the softphone, dial your cellphone number. Google Voice should transparently connect you. Answer the call and make sure you can send and receive voice on both phones. If everything is working, congratulations!

Solving One-Way Audio Problems. If you experience one-way audio on some of your phone calls, you may need to adjust the settings in /etc/asterisk/sip_custom.conf. Just uncomment the first two lines by removing the semicolons. Then replace 173.15.238.123 with your public IP address, and replace 192.168.0.0 with the subnet address of your private network. Save the file and restart Asterisk with the command: amportal restart.

Choosing a VoIP Provider. For this week, we’ll point you to some things to play with on your new server. Then, in the subsequent articles below, we’ll cover in detail how to customize every application that’s been loaded. Nothing beats free when it comes to long distance calls. But nothing lasts forever. So we’d recommend you set up another account with Vitelity using our special link below. This gives your PBX a secondary way to communicate with every telephone in the world, and it also gets you a second real phone number for your new system… so that people can call you. Here’s how it works. You pay Vitelity a deposit for phone service. They then will bill you $3.99 a month for your new phone number. This $3.99 also covers the cost of unlimited inbound calls (two at a time) delivered to your PBX for the month. For outbound calls, you pay by the minute and the cost is determined by where you’re calling. If you’re in the U.S., outbound calls to anywhere in the U.S. are a little over a penny a minute. If you change your mind about Vitelity and want a refund of the balance in your account, all you have to do is ask.

The VoIP world is new territory for some of you. Unlike the Ma Bell days, there’s really no reason not to have multiple VoIP providers especially for outbound calls. Depending upon where you are calling, calls may be cheaper using different providers for calls to different locations. So we recommend having at least two providers. Visit the PBX in a Flash Forum to get some ideas on choosing alternative providers.

Kicking the Tires. OK. That’s enough tutorial for today. Let’s play. Using your new softphone, begin your adventure by dialing these extensions:

  • D-E-M-O – Nerd Vittles Orgasmatron Demo (running on your PBX)
  • 1234*1061 – Nerd Vittles Demo via ISN FreeNum connection to NV
  • 17476009082*1089 – Nerd Vittles Demo via ISN to Google/Gizmo5
  • Z-I-P – Enter a five digit zip code for any U.S. weather report
  • 6-1-1 – Enter a 3-character airport code for any U.S. weather report
  • 5-1-1 – Get the latest news and sports headlines from Yahoo News
  • T-I-D-E – Get today’s tides and lunar schedule for any U.S. port
  • F-A-X – Send a fax to an email address of your choice
  • 4-1-2 – 3-character phonebook lookup/dialer with AsteriDex
  • M-A-I-L – Record a message and deliver it to any email address
  • C-O-N-F – Set up a MeetMe Conference on the fly
  • 1-2-3 – Schedule regular/recurring reminder (PW: 12345678)
  • 2-2-2 – ODBC/Timeclock Lookup Demo (Empl No: 12345)
  • 2-2-3 – ODBC/AsteriDex Lookup Demo (Code: AME)
  • Dial *68 – Schedule a hotel-style wakeup call from any extension
  • 1061*1061 – PBX in a Flash Support Conference Bridge
  • 882*1061VoIP Users Conference every Friday at Noon (EST)


Click above. Enter your name and phone number. Press Connect to begin the call.


Homework. Your homework for this week is to do some exploring. FreePBX is a treasure trove of functionality, and the Orgasmatron build adds a bunch of additional options. See if you can find all of them. For starters, you’ll want to activate CallerID Lookups in FreePBX. Choose Setup, CID Superfecta, Default and enter the maint password you created with passwd-master. Then choose Tools, Module Administration, CallerID Lookup, Enable, Process and Save the Settings. Then edit each of the Inbound Routes and choose CallerID Superfecta as the CID Lookup Source. Save your changes. Finally, choose Setup, CallerID Lookup Sources, CallerID Superfecta and be sure your maint password created with passwd-master is correct here, too. If not, update it. For additional tips, visit the forums.

Be sure to log into your server as root and look through the scripts added in the /root/nv folder. You’ll find all sorts of goodies to keep you busy. s3cmd.faq tells you how to quickly activate the Amazon S3 Cloud Computing service. And, if you’ve heeded our advice and purchased a PogoPlug, you can link to your home-grown cloud. Just add your credentials to /root/pogo-start.sh. Then run the script to enable the PogoPlug Cloud on your server. All of your cloud resources are instantly accessible in /mnt/pogoplug. It’s also perfect for off-site backups!

Also check out Tweet2Dial which lets you use Twitter to make Google Voice calls, send free SMS messages, and manage your new Asterisk server. Don’t forget to List Yourself in Directory Assistance so everyone can find you by dialing 411. And add your new number to the Do Not Call Registry to block telemarketing calls. Or just call 888-382-1222 from your new number. Finally, try out the included Stealth AutoAttendant by dialing your own number and pressing 0 while the greeting is played. This will reroute your call to the demo applications option in the IVR.

Continue reading Part II.

Continue reading Part III.

Continue reading Part IV.

Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It’s the best Asterisk tech support site in the business, and it’s all free! We maintain a thread with the latest Patches for Orgasmatron 5.1 and 5.2. Please have a look. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of ordinary users just like you. So you won’t have to wait long for an answer to your questions.

Coming Attractions. In our next episode, we’ll walk you through the process of adding a second, third, fourth, and fifth Google Voice line to your server so that you’ll never run out of free calling on your server. Enjoy!



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.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…

  1. passwd-master is the PIAF utility for setting a master password for FreePBX access with the maint user account. []
  2. status is the PIAF utility program that displays the current status of most major applications running on your server. []
  3. Mapping a port on your firewall to a private IP address unblocks certain Internet packets and allows them to pass through your firewall directly to an IP device "inside" your firewall for further processing. []
  4. reboot is the Linux command for restarting your server. It’s functionally equivalent to shutdown -r now. []

Tweaking Asterisk for Free Google Voice Calling

Lips from Google Now that the Asterisk® and Google Voice marriage is finally underway, we wanted to step back today and revise the original methodology a bit to take advantage of some of the terrific comments which were offered in response to our last article. First, the good news. U.S. calls through Google Voice using Asterisk work! They sound great, and they're free. The not so good news was that the MeetMe conferencing trick to join your outbound call with the Google Voice click-to-dial return call from your destination worked great so long as a real person answered the phone. But, if an answering machine picked up or no one answered the call at all, there were problems because these calls already had been transferred to the MeetMe conference and there was no simple way to disconnect them. And the need for two DIDs to support a single Google Voice interface just seemed a bit wasteful.

9/1/2010 Update: A good bit has changed with Google Voice since this article was first published. For the definitive guide and installation procedure, we highly recommend The Incredible PBX and accompanying article which can be found at this link. Google Voice (and much more) already is included in our new PBX which is literally Plug-and-Play. If you prefer to roll your own, be sure to also have a look at this excellent update on the Michigan Telephone Blog.

Today we want to try to eliminate these two quirks while stiill providing a seamless interface between Google Voice and Asterisk. We also appreciate that thousands of you already have implemented the previous approach. So we want your transition to the new way of doing things to be as painless as possible. On the other hand, for frequent readers, we hope you'll bear with us as we repeat some of what already has been covered in previous articles so new visitors don't have to jump around between articles to get the complete picture of what we're trying to accomplish.

The objective remains the same. We want a methodology that lets us make outbound calls from any Asterisk phone using the Google Voice service to take advantage of free calling in the United States and Canada. And we want calls to our Google Voice number delivered to our Asterisk system for transparent call processing. Yes, SIP is still on our wish list for both outbound and inbound calls with Google Voice, but we'll make do with PSTN calls particularly while Google is footing the bill for all of the calls.

Update: There's now a turnkey Asterisk solution that implements Google Voice calling without getting your hands dirty. Check out our new Orgasmatron V.

Tweaked Design. Here's the new design. You obviously still need a free Google Voice account. If you don't have one, you can request an invite here. At last report, it's only taking a few days from application to invite which is really great news. Don't use a space in your Google Voice password! Once you have a Google Voice account and phone number (Google has reserved a million of them so... not to worry!), then you'll need a DID that provides unlimited, free incoming calls. Once you get your DID set up on your Asterisk system, we'll set up a forwarding phone number for this DID in your Google Voice account so that Google Voice calls can be connected to your Asterisk server.

For outbound calls, we'll combine a little dialplan voodoo with pygooglevoice to instruct Asterisk to place a click-to-dial call using your Google Voice forwarding number. Then we'll stuff in the destination U.S. phone number. When you dial GV-678-1234567 from any of your Asterisk phones, Asterisk will park your initial call in a reserved parking lot slot and then join the called party to the originally parked call. The entire procedure is virtually transparent both to the caller and the callee. And, unlike the MeetMe conference, the parking lot fades out of the picture as soon as the call is connected. Thus, if either party hangs up, the active channel for the call is terminated on your Asterisk server.

For inbound calls from your Google Voice number, we'll tweak the dialplan so that it can distinguish between a RingBack call that Google Voice initiated and a true inbound call. We'll peel off the real inbound calls and route them to a separate Inbound Route in FreePBX for processing in any way you desire.

Finally, for those that implemented the methodology in our previous article, we'll walk you through the steps to revise your existing setup to take advantage of these new tweaks. You can skip over the initial installation process if you already have gone through the Google Voice setup from our earlier article. Just skip down to Tweaking Previous Setups.

Special Thanks. At the outset, we again want to express our sincere appreciation to Jacob Feisley and Paul Marks for their pioneering work on a Python interface to Google Voice. We also stumbled upon another Python development project, Google Voice for Python. While we originally had planned to rely upon Jacob and Paul's script, we ultimately decided to implement pygooglevoice because of the additional flexibility it provided for down the road. With pygooglevoice, you not only can make Google Voice calls, but you also can send SMS messages with no muss or fuss. Jacob Feisley has now joined that project as well. So, our special tip of the hat goes to the entire Google Voice for Python development team. It's a terrific product as you will see.

Prerequisites. Today's setup requires a CentOS-based Asterisk aggregation with a current version of FreePBX. Be aware that today's solution requires Python 2.4 or higher and reportedly will not work with Python 2.3 found in some Linux distributions. We've tested everything with PBX in a Flash and, on that platform, you're good to go. The install script should work equally well with the other CentOS-based Asterisk aggregations, but we haven't tested them. Be our guest, and let us know if you encounter any problems. Finally, a word of caution. We don't ordinarily distribute solutions using development tools we don't use. Our knowledge of Python wouldn't fill a thimble. We've made an exception today because of the extraordinary interest in Google Voice by the Asterisk community. But, if something comes unglued, we can't fix it. So have a backup plan in place just in case. 🙂

Today's Drill. To get everything working today, there are six steps: (1) obtaining and configuring a DID to manage calls between Google Voice and Asterisk, (2) configuring a Google Voice forwarding number for this DID to manage your outbound and inbound calls, (3) configuring FreePBX to route all outbound calls with a GV prefix to your special Google Voice dialplan context, (4) configuring an inbound route to manage incoming calls from your Google Voice number, (5) setting up a series of Parked Call extensions, one of which will be used to manage your outbound Google Voice calls, and (6) running our install script which adds the dialplan code for Google Voice calling with your credentials and puts the Python application into place on your server. It sounds more complicated than it is. So hang on to your hat. Here we go!

Dedicated DID. Before you can use Google Voice with Asterisk, you'll need a DID that can be dedicated to your Google Voice interface to Asterisk. We'd recommend a free IPkall or SIPgate DID. To get started, use one of the links above to obtain and configure the DID. Temporarily point the DID to an extension on your Asterisk system that can be used to verify your requests for the number. Since all of these calls are free, the area code of the DID really doesn't matter because you're never going to publish the fact that it exists.

The easiest method for setting up the DID is to first create a SIP URI for the DID on your Asterisk system. Next route the SIP URI to an Inbound Route in FreePBX where you can manage the destination for calls to that DID. Initially, you want the destination to be an extension on your Asterisk system that you can answer to verify both the DID setup and the GV setup below. Finally, point the DID you obtained to the SIP URI defined above.

HINT: The entry in extensions_override_freepbx.conf would look something like this for a SIP URI called ipkall-1:

exten => ipkall-1,1,Goto(from-trunk,${DID},1)

Then you would create an inbound route named ipkall-1 using FreePBX and designate some existing extension on your server as the destination for these inbound calls.

When you set up the SIP forwarding for the DID at ipkall.com, you'd specify the SIP URI as:

ipkall-1@ipaddress_of_your-Asterisk_server

We've previously covered in detail how to do this so read the article if you need a refresher course. To reiterate, the area code of this DID really doesn't matter because you're never going to give out the number. So use one of the free sources and save yourself some money. The real trick is you want to use a DID with unlimited, free inbound calls. Both IPkall and SIPgate provide that functionality at no cost.

Google Voice Setup. Log into your Google Voice account and click Settings, Phones, Add Another Phone. Add the area code and phone number of your DID. Be sure the DID is pointed to an extension on your PBX that you can answer since you have to go through Google's confirmation drill to successfully register the number. After the DID is confirmed, be sure there's a check mark beside this Google Voice destination so that incoming calls to your GV number will be routed to your Asterisk server.

While you're still in the Google Voice Setup, click on the General tab. Uncheck Enable Call Screening. Turn Call Presentation Off. And set CallerID to Display Caller's Number. Be aware that IPkall DIDs only forward your IPkall number as the CallerID number while SIPgate DIDs reportedly forward the actual number of the person calling you. If this matters to you, then you may prefer the SIPgate DID option. Finally, uncheck Do Not Disturb. Now click the Save Changes button.

Integrating Google Voice into Asterisk with FreePBX. Open FreePBX with a web browser and choose Setup, Trunks, Add Custom Trunk. Insert your GV number in the Outbound CallerID field and add the following Custom Dial String on the form and Submit Changes and reload the dialplan:

local/$OUTNUM$@custom-gv

Next, choose Setup, Outbound Routes, Add Route and fill in the following entries on the form:


Route Name: GoogleVoice
Dial Pattern: 48|NXXNXXXXXX
Trunk Seq: local/$OUTNUM$@custom-gv

Inbound Routes. Next, we need two Inbound Routes to get everything working. In setting up your DID with IPkall or SIPgate, you already should have created one inbound route for that provider. It already should be routing calls to an extension on your PBX. Now we need to create a Custom Destination for this inbound route and then reroute these calls there. In that way, your RingBack calls will be routed to some special dialplan code that drops these calls into a custom parking lot where the RingBack call is married up to the extension from which you placed the original call. Then we need to create another inbound route to manage normal incoming calls that are forwarded to your PBX whenever someone dials your Google Voice number.

To begin, choose Tools, Custom Destinations, Add Custom Destination and add an entry like this and then click the Submit Changes button:

Custom Destination: custom-park,s,1
Description: Custom GV-Park

Next choose Setup, Inbound Route and click on the inbound route you created previously for IPkall or SIPgate. Change the destination for these calls to Custom Destination: Custom GV-Park.

Now click on Add Incoming Route and create a new route for your incoming Google Voice calls. Give it any description you like but, for the DID number, it must be gv-incoming. You can leave most of the other defaults. Just be sure you set a destination for your incoming calls from Google Voice. It could be an extension, ring group, IVR, or whatever best meets your needs. The important entry here is gv-incoming for the DID number. Click the Submit button to save your entries. Ignore the warning that you've entered an oddball DID. We know what we're doing. 🙂

Setting Up the Parking Lot. While still in FreePBX, we need to create or adjust your existing settings in Setup, Parking Lot. The parking lot is used by FreePBX to simulate old key telephones where you could place a call on hold and then someone else in the office could pick up the call by clicking on the blinking key on their phone. The Asterisk equivalent is to press the flash hook and dial your Parking Lot Extension which then places the call in a Parking Lot space and tells you what the space number is. Someone else then can dial the number of that space to pick up the call. Our little trick today works like this. When you place an outbound call through Google Voice, your extension will be dumped into a reserved parking lot space. When Google Voice initiates the RingBack call before connecting the destination number you've dialed, that call will be sent to the same reserved parking lot space. The two calls then are joined, and you'll hear the parking lot number followed by ring tones as your call is connected by GV to its final destination. Our special thanks to Richard Bateman for his comment on the previous article and this terrific tip! He wins an Atomic Flash installer from Nerd Vittles. In addition, A. Godong wins an Atomic Flash installer for his tip on consolidating two DIDs into a single DID to manage both inbound and outbound GV calls. Just send us your addresses.

Now, where were we? Most FreePBX systems have a default setup for the Parking Lot. What we need to do is be sure you have reserved one more space in the parking lot than you actually need for day to day operation of your PBX. We'll use the last parking lot space number to manage outbound calling through Google Voice. Our entries look like the following:

Enable Parking Lot Feature: checked
Parking Lot Extension: 70
Number of Slots: 5
Parking Timeout: 30 seconds
Parking Lot Context: parkedcalls

Destination for Orphaned Calls: Terminate Call: Hangup

If you use our setup above, the Magic Number is 75 which is the fifth slot in the Parking Lot. If you use a different Parking Lot extension or number of slots, here's how to calculate the Magic Number. Start counting the slots beginning with one more than the Parking Lot Extension. When you get to the last slot in the number of slots you've specified, that's your Parking Lot Magic Number. Write it down. You'll need it in a second when you run our GV installation script.

Save your entries and reload the Asterisk dialplan when prompted.

Integrating pygooglevoice. Now we're ready to complete the setup by running our revised script which loads pygooglevoice and sets up your dialplan in extensions_custom.conf. You'll need 5 pieces of information to run the script so write them down before you begin:

1. Your 10-digit Google Voice phone number
2. Your Google Voice email address
3. Your Google Voice password (no spaces!)
4. Your 11-digit RingBack DID (16781234567)
5. Your Parking Lot Magic Number

A word of caution: If you used a gMail address to set up your Google Voice account, it's possible to have different gMail and Google Voice passwords. For this to work, you'll need to enter your gMail password, not your Google Voice password (assuming they're different).

Now log into your Asterisk server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/gv/install-gv-new
chmod +x install-gv-new
./install-gv-new

Google Voice Speed Dials. For frequently called numbers, you can add speed dials by inserting entries in the [from-internal-custom] context of extensions_custom.conf that look like the example below where 333 is the speed dial number and 6781234567 is the area code and number to call. Be sure to reload your Asterisk dialplan to activate them.

exten => 333,1,Dial(local/6781234567@custom-gv,300)

Congratulations! You now have what we hope will be flawless and free U.S. calling on your Asterisk system using Google Voice. No gimmicks, no strings, no cost. Enjoy!

Finally, one additional word of caution. Both Google Voice and this call design are set up for a single call at a time. There are no safeguards to prevent multiple calls, but that may violate the Google Voice terms of service.

Asterisk 1.6 Solution. Several readers now have documented the procedure for implementing the Asterisk 1.6 bridge technology to make outbound Google Voice calls. You can read all about it here.

Tweaking Previous Setups. If you installed pygooglevoice using our previous tutorial, here's what you need to do. First, log into your Asterisk server as root and issue the following commands:

cd /etc/asterisk
nano -w extensions_custom.conf

Scroll to the bottom of the file by pressing Ctrl-W then Ctrl-V. Move up the file using up arrow until you reach [custom-gv]. Press Ctrl-K repeatedly to delete all of the lines in the [custom-gv] context. If you get to another line that starts with a label in brackets like [this], STOP deleting. Once you've deleted all of the lines in the [custom-gv] context, save the file: Ctrl-X, Y, and press Enter.

Now continue reading this article by jumping up to the Google Voice Setup topic. The Custom Trunk entry and the GoogleVoice outbound route will already be in your FreePBX system so there's no need to repeat those two steps. You will need to perform the remaining FreePBX steps beginning at the Inbound Routes topic and continuing on with Setting Up the Parking Lot. Finally, when you run the new installation script, it will detect that pygooglevoice is already on your system and will skip that step but will install the new custom contexts in extensions_custom.conf using your new settings. Enjoy!


Thought for the Day. Which is more arbitrary: (1) Apple snubs Google Voice or (2) Google Voice snubs SIP? Pays to look in the mirror occasionally.


Best Read of the Week. Memo to Steve Jobs and Apple: Stop Being A Jerk!



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.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

It’s TweedleD: Twitter & SMS Alerts with Every Asterisk Call

Twitter Direct Messages and SMS Instant Messages are great ways to send yourself important notes that you want to keep track of... privately. Today, we'll show you how to harness the power of Twitter and SMS to announce every call on your Asterisk® server with the name and number of the caller as well as the DID of the incoming call. Reconfiguring your Asterisk server takes less than 10 minutes. We think you'll find this to be the perfect complement to our free Urang II desktop screenpop utility.

Prerequisites. You'll need one of the Asterisk aggregations to get all of this working quickly. At a minimum, you need Asterisk 1.4 or 1.6, FreePBX, Apache, PHP 5, PHP/AGI, and SendMail or an equivalent. You'll also need a service that provides CallerID name lookups such as CallerID Superfecta. We're assuming you already have all of these components working including outbound email which is necessary to deliver the SMS alerts.

Overview. The design strategy for TweedleD is pretty straight-forward. When a call comes into your server, FreePBX should catch the call in an inbound route that looks for incoming calls on a particular DID. A CallerID Lookup source will be used in the Inbound Route to look up the name of the caller based upon their CallerID number. Then we will use a Custom Destination to route the call to a special Asterisk context which will run the TweedleD AGI script. This script actually sends out the Twitter Direct Messages as well as the SMS messages to your cellphone. Once the script completes its work, the context will send the call along to its final destination, e.g. an extension, a ring group, a day/night control, or an IVR.

NOTE: There is a 100-150 API calls per hour per IP address limit with the Twitter API. If you also are using one or more Twitter clients at your site, this is something worth keeping in mind if you have a busy phone system.

1. FreePBX Custom Context. The trick with designing FreePBX dialplans is to build them in reverse. So we'll start with the custom context and work our way back to the inbound route. First, log into your server as root and edit extensions_custom.conf in /etc/asterisk. At the end of the file, we want to create a new context that looks like this. We've provided several sample destinations at s,5 to show you the syntax. The first routes a call to an extension or ring group number. The second routes the call to Day/Night Control #1. And the third routes the call to an IVR. To find the correct IVR number or day/night control for what you want to do, review the IVR and app-daynight contexts in extensions_additional.conf to find the one you need. Obviously, you only use one s,5 line. Comment out the remaining ones as shown below. For Asterisk 1.6, replace the vertical bars in line s,3 with commas.

[custom-twitter]
exten=>s,1,Answer
exten=>s,2,Wait(1)
exten=>s,3,AGI(nv-twitter.php|${CALLERID(name)}|${CALLERID(num)})
exten=>s,4,NoOp(${CUSTOMDATA})
exten=>s,5,Dial(local/701@from-internal)
;exten=>s,5,Goto(app-daynight,1,1)
;exten=>s,5,Goto(ivr-6,s,1)
exten=>s,6,Hangup

2. Installing PHP/AGI Scripts. Next we need to install the script that actually generates the messages for Twitter and SMS. In addition, we'll install Justin Poliey's terrific twitter.lib.php which is a PHP implementation of the Twitter API that lets you do just about anything with Twitter that you could do with the Twitter API itself. For a good writeup on the capabilities of twitter.lib.php, see Antonio Lupetti's article. To install the necessary code, issue the following commands while still logged in as root:

cd /
wget http://bestof.nerdvittles.com/applications/TweedleD.tgz
tar zxvf TweedleD.tgz
rm TweedleD.tgz
cd /var/lib/asterisk/agi-bin

3. Configuring TweedleD. Now we need to configure the PHP script with your Twitter and SMS credentials so that TweedleD knows where to send the messages. Edit nv-twitter.php in the /var/lib/asterisk/agi-bin directory on your server: nano -w nv-twitter.php. You'll see a section of code near the top of the application that looks like this:

//-------- DON'T CHANGE ANYTHING ABOVE THIS LINE ----------------

$tweet = 0;
$username = "your-twitter-name";
$password = "your-twitter-password";
$user4msg = "recipients-twitter-name";

$sms = 0;
// $smsaddress = "1234567890@txt.att.net" ; // AT&T
// $smsaddress = "1234567890@message.alltel.com" ; // AllTel
// $smsaddress = "1234567890@messaging.nextel.com" ; // Nextel
// $smsaddress = "1234567890@messaging.sprintpcs.com" ; // Sprint
// $smsaddress = "1234567890@tmomail.net" ; // T-Mobile
// $smsaddress = "1234567890@vtext.com" ; // Verizon

$debug = 0;
$newlogeachdebug = 1;

$emaildebuglog = 0;
$email = "yourname@yourdomain" ;

//-------- DON'T CHANGE ANYTHING BELOW THIS LINE ----------------

There are four things you can enable and, depending upon what choices you make, you need to add your credentials for the various options. Let's go through them in the order they appear.

To enable Twitter Direct Messages, change $tweet=0 to $tweet=1. $username and $password are used to set your Twitter login credentials for your Twitter account. You must have one! $user4msg is the Twitter account name where the DMs should be delivered. They do not necessarily have to be delivered to your Twitter account although they can be. Be sure to preserve the quotes! And, remember, you can only send direct messages to people on Twitter that you are following, and they must be following you as well. If in doubt, attempt to send a direct message in Twitter to the desired recipient. Then you'll know for sure. TweedleD provides no error messages if things don't work. 🙁

To enable delivery of SMS messages to your cellphone, set $sms=1. TweedleD actually delivers SMS messages using email. Virtually all of the carriers provide an SMS-Email Gateway for this purpose. The trick is knowing the email domain for your desired carrier. The full list is available here. And here is an even newer Email to SMS Gateway list. In the script, we've provided samples for the major U.S. carriers so, if yours is in the list, just uncomment the appropriate line by removing the leading // on the line and replace 1234567890 with your 10-digit cellphone number.

If you want a debug log generated for each call, set $debug=1. The default is to overwrite the previous log (/var/log/asterisk/nv-twitter.txt) with each new call. If you'd prefer an ever-growing log, set $newlogeachdebug=0.

The debug log also can be emailed to you. Set $emaildebuglog=1 and enter your email address in $email.

When you've completed the configuration, save the file (Ctrl-X, Y, Enter) and reload the Asterisk dialplan: asterisk -rx "dialplan reload".

4. FreePBX Setup. Finally, we need to configure FreePBX to support TweedleD. We'll add a Custom Destination and then adjust our inbound route(s) to support the custom context we added in Step 1. Open FreePBX with a web browser and choose Admin, Tools, Custom Destinations, Add Custom Destination. For the Description, call it TweedleD. For the Custom Destination, enter the following: custom-twitter,s,1. Then click Submit. Now edit your Inbound Routes for the DIDs for which you wish to activate TweedleD. For each inbound route, make sure you have activated a CallerID lookup source and then set the destination to: Custom Destination: TweedleD. Save your changes and reload the dialplan.

Trying Out TweedleD. Now you're ready to place a test call. Just call into your system on one of the DIDs that has been configured for TweedleD. On the Asterisk CLI, you should see an entry that identifies the CallerID name and number of the caller. And, if you've activated delivery of notifications to Twitter and/or SMS, the messages will magically appear within seconds. Enjoy!


Tips of the Week. If you hurry, you can get 25GB of free, password-protected online storage with the new Microsoft SkyDrive offering. Or, for a free incoming call number for your Skype account, check this service out. A new precompiled version of Asterisk 1.6 for Mac OS X Leopard has been released. You can download it here. Finally, Sprint is offering a Netbook for 99¢ with any 2-year EVDO contract at Best Buy stores this week. Regular price for the Compaq Mini is $389.99. Add your cell phone or Asterisk DID to the DO NOT CALL Registry. Just call 888-382-1222 using the CallerID of the number to wish to block.


Sign of the Times. Before you get too comfortable with all your free Google apps, you might want to read this article. Despite assurances to the contrary from Google's President of Enterprise, it seems that the free version of Google Apps has quietly disappeared.

Update: Google Apps team invokes Brain Fart defense saying they momentarily forgot about "free" but it won't happen again. Heh, heh. Official Blog Posting.


VoIP Users Conference. Come join the fun. The VoIP Users Conference is held every Friday at noon, Eastern time. ISN: 8647*1061 (Hint: 8647 spells VOIP on your phone).


The World According to Twitter. Be on the lookout for David Pogue's new book, The World According to Twitter. It goes to press today! Incidentally, Pogue's books are just about the only reasonably priced tech books available for the Kindle, and they're all excellent.

Tomorrow's the Big Day. The last time this happened, it was a pretty quiet year. Just after noon tomorrow comes your once-in-a-lifetime moment when the time will officially be 12:34:56 7/8/9. The last time we had this much fun in our lifetime was... uh, about a year ago: 01:23:45 6/7/8. Can't wait for next year's thriller: 23:45:67 8/9/10. Ooops! That won't work on most clocks. Will it? Amazing what you can learn on Twitter. Isn't it? Thanks, @ejovi and @ev.



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.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

Introducing ISN: Free SIP Dialing From Any Asterisk Phone

Wouldn't it be nice to pick up any telephone on your Asterisk® system and place free SIP calls to anywhere in the world by dialing joe@sip.asterisk.com or any SIP URI? The problem, of course, is that most phones don't include alphanumeric keyboards much less the @ symbol. Well, not to worry. A group of Asterisk gurus headed up by John Todd came up with a clever plan using DNS that lets you dial any SIP URI using the 10 numeric keys plus the asterisk key on any standard telephone keypad. Today, we'll show you how to set up your Asterisk system to support ISN's (aka ITAD Subscriber Numbers).

Overview. In laymen's terms, the trick to ISN dialing is that we pass a number such as 1234*1061 to a DNS server that knows how to translate the numeric sequence into a SIP URI that looks like this: 1234@sip.pbxinaflash.com. In short, it takes the number after the asterisk and resolves it to a fully-qualified domain name which is preconfigured at freenum.org. And the result is inter-domain numeric SIP addressing using ordinary telephone instruments. For our recommended setup, you'll actually dial ISN numbers like this: **1234*1061. The leading asterisks will tell FreePBX to treat this as an ISN dial string.1

Prerequisites. We're assuming that you already have one of the FreePBX-enhanced Asterisk aggregations in place such as PBX in a Flash. If not, start there and then run the Orgasmatron Installer which provides all of the SIP URI functionality you'll need for this project. If you're not using PBX in a Flash, then review our tutorial on SIP URI's which will walk you through getting this functionality set up on your FreePBX-enhanced Asterisk server.

Adjusting Your Phones to Support ISN Dialing. We'll be using a somewhat different dial plan to make ISN calls so you'll probably have to adjust the default dialplan on your actual phones or ATA to get this to work. If you can place ISN calls with a softphone but you get a fast busy when you dial the same number on your hardware-based phones, then it's a dialplan problem. For Aastra phones, you can access the Aastra dialplan settings with a web browser. Just go to the IP address of the phone and login with admin:22222. Click on the Preferences option and you should see Local Dial Plan at the top of the page with an entry that looks like this: x+#|xx+*. Just change it to: x+#|xx+*|'*'xx+* and click the Save Settings button. No reboot of the phone is required. Notice that we've enclosed the asterisk in single quotes in the third option. That's the trick to getting Aastra phones to recognize * as part of an actual dial string. If you're using other phones, consult your user's guide for tips on modifying your dialplan to accommodate an asterisk as the first character in the dial string.

Enabling Outbound ISN Dialing. There are a number of ways to get ISN outbound dialing to work with Asterisk. We're going to show you a couple of methods. You can either set up a trunk and outbound route to handle the calls, or you can add an extension to your system which actual prompts for the ISN number when you dial that extension. There are also two ways to look up ISN numbers at freenum.org. The preferred method is using DNS queries with the new Asterisk ENUMLOOKUP function. An alternative method (which is especially useful with older versions of Asterisk that do not support ENUMLOOKUP) is to use FreeNUM's external public resolver to map ISN dial strings to SIP URIs. With PBX in a Flash and Asterisk 1.4.21.2 or later, both methods work.

Implementing the Trunk Method for ISN Dialing. With this option, you'll be able to pick up any (properly configured) phone on your Asterisk system and dial **1234*1061 to complete a free ISN SIP call. To set this up, we'll add a new trunk and outbound route in FreePBX. Then we'll insert a dialplan script in extensions_custom.conf to finish up. Once you reload your Asterisk dialplan, you'll be good to go.

Open FreePBX in a web browser, and choose Admin, Setup, Trunks, Add Trunk, Add Custom Trunk. Leave the General Settings blank for now. In the Dial Rules, insert X.*X. (be sure to include trailing period!) and, for the Custom Dial String, insert: local/$OUTNUM$@freenum. Click the Submit button to save your settings and reload the dialplan when prompted. Now add an Outbound Route called OutFreeNUM. For the Dial Pattern, use **|X.*X. with the trailing period again. For the Outbound Route Dial Pattern, you can get more elaborate so that you don't have to dial the ** prefix. Just be aware that this may not work with all handsets (including the Aastra's). It does work well with Zoiper softphones. Here's the dial pattern we actually use. With this dial pattern, you can dial most ISN numbers directly with no prefix, e.g. 16781234567*1061 works fine.

**|X.*X.
1NXXNXXXXXX*X.
NXXNXXXXXX*X.
XX*X.
XXX*X.
XXXX*X.
XXXXX*X.
XXXXXX*X.
XXXXXXX*X.

For the Trunk Sequence, choose local/$OUTNUM$@freenum. Save your entries and reload the dialplan once more.

Finally, log into your server as root and edit extensions_custom.conf in /etc/asterisk. At the bottom of the file, insert the following code:

[freenum]
exten => _X.,1,Set(TIMEOUT(absolute)=10800)
exten => _X.,2,NoOp(Number to Call: ${EXTEN})
exten => _X.,3,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)})
exten => _X.,4,GotoIf($["${isnresult}"=""]?6:5)
exten => _X.,5,Dial(SIP/${isnresult},40,r)
exten => _X.,6,Background(ss-noservice)
exten => _X.,7,Congestion
exten => _X.,8,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => T,1,Hangup

Make sure you eliminate the line-wrap on line 3 above. Then save the file and reload your dialplan: asterisk -rx "dialplan reload". Now place a test call by dialing: **1234*1061. If the call doesn't connect to Nerd Vittles' demo site, check the Asterisk CLI and fix any reported errors.

Implementing the Extension Method for ISN Dialing. With this option, you'll be able to pick up any phone on your Asterisk system and dial FREE (3733) to place an ISN call. You'll be prompted to enter the number using the following format: 1234*1061. Note that there are no leading asterisks with this method. Instead of using ENUMLOOKUP to find the ISN number, we'll use FreeNUM's external public resolver to do the ISN translation into a SIP URI.

Log into your Asterisk server as root and edit extensions_custom.conf in /etc/asterisk. At the bottom of the file, insert the following context:

[custom-freenum]
exten => s,1,Answer
exten => s,2,Wait(2)
exten => s,3,Background(pls-entr-num-uwish2-call)
exten => s,4,Read(NUM2CALL,beep,30)
exten => s,5,GotoIf($["foo${NUM2CALL}" = "foo"]?10)
exten => s,6,Set(TIMEOUT(absolute)=10800)
exten => s,7,Background(pls-hold-while-try)
exten => s,8,Dial(SIP/${NUM2CALL}@public.freenum.org,30,m)
exten => s,9,Congestion
exten => s,10,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => T,1,Hangup

Now move to the top of the file and insert the following line in the [from-internal-custom] context:

exten => 3733,1,Goto(custom-freenum,s,1)

Save the changes you've made to the file and then edit (or create, if necessary) sip_custom.conf and insert the following line:

promiscredir=yes

Save the file and then restart Asterisk: amportal restart. Now place a test call by dialing 3733. When prompted for the ISN number, enter 1234*1061 and press # to avoid the timeout delay. Be aware that on non-FreePBX systems, this code would go in sip.conf; however, that file gets overwritten with any FreePBX reload. Hence the reason that we've placed the code in sip_custom.conf.

Creating a SIP URI for Your Asterisk Server. Before you can receive any inbound calls with ISN dialing, you'll need at least one SIP URI for your Asterisk server. The format of a SIP URI is much like an email address: somename@yourdomain.dyndns.org or somenumber@yourdomain.dyndns.org. Step 1 is to register a fully-qualified domain name (FQDN) for your Asterisk server. Step 2 is to actually set up the SIP URI's on your server.

If you already have a registered domain, then we recommend you create a sip subdomain: sip.yourname.org. Then point that subdomain to the IP address of your Asterisk server. If your Asterisk server has a dynamic IP address, then register a subdomain with a service such as dyndns.org and point that domain at your Asterisk server. We've previously covered how to install software on your Asterisk server to make sure your FQDN always resolves to the correct dynamic IP address. Here's the link for DNS-O-Matic.

Once you have FQDN covered, you're ready to set up a SIP URI. With Orgasmastron builds of PBX in a Flash, the work already has been done for you. You should already have a SIP URI of mothership@yourFQDN. For everyone else, the drill involves moving a copy of the [from-sip-external] context into extensions_override_freepbx.conf in /etc/asterisk so that it can be edited without risking an overwrite from FreePBX. To find out the location of the [from-sip-external] context, issue the following commands while logged into your server as root:

cd /etc/asterisk
grep from-sip-external *

The result will look something like this:

extensions.conf:[from-sip-external]
extensions_override_freepbx.conf:[from-sip-external]
sip_general_additional.conf:context=from-sip-external

If the middle line is there, the context already has been copied over. Otherwise, list out the file showing [from-sip-external] which varies depending upon your version of FreePBX: cat extensions.conf. Now cut-and-paste the entire [from-sip-external] context into extensions_override_freepbx.conf. Then edit the override file and add an entry for each SIP URI you wish to create. The entries should be inserted just below the exten => s,1... line. Here are some samples:

exten => 16781234567,1,Goto(from-trunk,${DID},1)

This entry would let you control the routing of 16781234567 by creating a new incoming route in FreePBX with a DID entry of 16781234567. Then you can point the SIP URI to any FreePBX resource, e.g. an extension, ring group, IVR.

exten => e164,1,Goto(from-trunk,e164,1)

This entry would route e164@yourFQDN to the Inbound Route created for a DID number entry of e164.

exten => 18431234567,1,Goto(custom-windyhouse,s,1)

This entry would route incoming calls to 18431234567@yourFQDN to s,1 in a custom context called [custom-windyhouse] in extensions_custom.conf.

exten => 17065439876,1,Dial(SIP/17066313456@sip.otherdomain.com)


This entry would route incoming calls to 17065439876@yourFQDN to another SIP URI.

exten => 12021234567,1,Dial(local/12029876543@from-internal)

This entry would route incoming calls to 12021234567@yourFQDN to a cellphone at 12029876543 using your Asterisk dialplan to choose an appropriate trunk for the call.

exten => 18883331212,1,Dial(SIP/skype_joe@proxy01.sipphone.com)

This entry would route incoming calls to 18883331212@yourFQDN to a Skype user named joe using the free Gizmo5 gateway.

Once you've made all desired SIP URI entries, save the override file and reload your Asterisk dialplan.

Using the PBX in a Flash ITAD Number. So you're probably asking, "What's in this for me?" Well, a couple of things actually. First, if you're a PBX in a Flash user, we want you to join our free calling network. We already have reserved the 1061 ITAD number for our group. Just cut-and-paste the form below, fill in the blanks, and email it to us. We'll set up an ISN number for your server (one per customer, please) so that others can contact you without spending a dime. The other option is to obtain your own ITAD number for your organization and set it up on your own server. We'll get to that in a minute.

If you want to join our club (and we really don't mind if you're not using PBX in a Flash), then cut-and-paste the form below into your email and fill it out. And here's the email link. Once we receive your request, we'll set up an ISN number for you that matches your existing phone number. So, if your phone number is 16781234567, your new ISN number will be 16781234567*1061. Please include your international codes with your phone number. Before we activate your ISN number, we'll place a test call to your SIP URI to verify it's working. Please be sure it is before applying. 🙂

Name:
Mailing Address:
Phone Number:
SIP URI for Your Server: _____________@_____________________________
ISN Number (leave blank):
Publish Entry in Directory? Yes or No (choose one)

Obtaining Your Own ITAD Number. We know there are lots of you that prefer to do things yourself. And that's perfectly fine. We're going to quickly show you how. But, if you want to be included in the PBX in a Flash directory, please send us the form above with your own ISN contact number once you get things working.

To get your own ITAD number, visit this link and follow the instructions for requesting your own number. It's easy, but detail matters so do it right the first time! Within a few days, you'll get your shiny new number. And, in a few more days, freenum.org will notify you that your account has been established.

Setting Up An ISN Account at FreeNum.org. Once you receive your login credentials from FreeNUM, log in to your account. Leave the DNS Wildcard setting the way it is. All you have to do is insert your fully-qualified domain name in the FQDN placeholder. For example, if your FQDN were sip.big.edu, then the last part of the DNS entry should look like this:

sip:\\1@sip.big.edu!" .

Save your entry and wait an hour. Then test it by dialing your new ISN number or, after logging into your server as root, use a command like the following. Turn your SIP URI around from 6781234567*1061 so that it looks like this:

dig @freenum.org NAPTR 7.6.5.4.3.2.1.8.7.6.1061.freenum.org.



Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


Aretta Introduces Free NetPBX. In an industry first, Aretta Communications is rolling out a free Asterisk hosted solution known as NetPBX Free Edition. The only cost is for the minutes you use, and the free hosted service will support one inbound or outbound call at a time. Everything including the SIP trunking is preconfigured so the system is literally plug-and-play. We'll provide a more in-depth review once we've had some time to play.


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.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. The dial string has been modified a bit to mesh with special dial codes in FreePBX. See the comments for details. []

Googlified Messaging: Asterisk’s New Best Friend

Lips from GoogleWithin the past few months, we've added several hundred million free phone numbers to our Asterisk® PBX by creating a Skype Gateway as well as Gizmo Backdoor Dialing and ENUM interfaces that didn't cost us a dime. And, today, we turn our attention to Google's recent transmogrification of GrandCentral into Google Voice. More specifically, what we want to do is examine some ways to integrate the Google Voice feature set into our existing Asterisk implementations. The potential benefits are enormous. There's free calling in the U.S., free distribution of inbound calls to multiple phone numbers scattered around the country, free SMS messaging and delivery by email, free transcription of voicemail messages into text-based emails, free conferencing, and free GOOG-411, a voice-activated service that let's you find nearby businesses by saying where you are and what you're looking for. For today, we've set our sights on the Google Voice feature set which is easiest to integrate into existing Asterisk systems: free voicemail message transcription, free calling in the United States, and free GOOG-411 directory assistance. For lack of a better term, we call it... Googlified Messaging™. 😉

Update: The original SIP interface to Google Voice described in this posting no longer works. A new approach that really works is now available on Nerd Vittles at this link.

Integrating Google Voice into Asterisk. If there is a recurring theme to Google Voice, it's this. Google Voice was designed to be a user-friendly, interactive messaging system. Google didn't intend to provide a telephony toolkit for Asterisk developers, but they haven't blocked any functionality either. There's no SIP connectivity in Google Voice... at least that is obvious. Can you spell G-I-Z-M-O? Well, that was the first hint. But a simple call trace revealed a lot more. It appears the entire Google Voice platform is SIP-based which makes it a perfect fit with Asterisk.

Because of the Google Voice design, there's no simple way to use your Google Voice DID for incoming call distribution while also integrating voicemail transcription and outbound calling into your Asterisk dialplan. Why? Because you can't take advantage of the free voicemail transcription service with Asterisk if Google Voice is sending inbound calls all over the countryside. So the real key to unlocking the greatness of Googlified Messaging is having two Google Voice accounts so that each can be used for a dedicated purpose. The first account will be used for outbound functions and voicemail transcription while the second is used to manage and route incoming calls. This is important because, for security reasons, you don't want to reveal your Google Voice number that is being used for outbound calling. Why? Because it is a SIP connection, and your Google Voice phone bill is only protected by a 4-digit PIN. If Google hasn't learned about Fail2Ban, they will soon. As this is written, multiple Google Voice accounts aren't possible unless you had more than one GrandCentral account since only GrandCentral users currently are eligible for Google Voice accounts. But that, too, will change!

For today, let's put aside the incoming call routing and concentrate on the remaining Googlified Messaging functionality. We turn first to Google Voice's free transcription of voicemail messages into text-based messages for email delivery to your desktop PC or cellphone.

Voicemail Transcription Overview. We begin with a cautionary note. Google's new automated voicemail transcription service is absolutely incredible... even if it's not quite perfect. We've tried a couple of messages to evaluate the transcription accuracy, and we'll let you judge for yourself.

Actual Message: "Hi. I was just passing through the airport. I hadn't seen you in a couple years, and I thought you might wanna get together for a quickie. Give me a call."

Googlified Transcription: "hi i was just passing through the airport i hadn't seen you in a couple years and i thought you might wanna get together for a quickie give me a call"

As you can see, the accuracy was pretty good. But there are a couple of problems. First, there's no CallerID name associated with inbound calls. So, if the caller doesn't identify himself or herself (especially if the caller is using a pay phone), you're S.O.L. relying on the transcription. But the message and phone number were accurate. It probably would motivate you to quickly connect to your email account and actually listen to the voicemail to decipher the caller's identity and avoid a missed opportunity. 🙂

Actual Message: "Hi. I've read over your corporate acquisitions and merger paper, and it isn't quite accurate with regard to our position."

Googlified Transcription: "hi i have a red over your corporate acquisitions in merger paper and it is a quite accurate with regard to our position"

This second example is a bit more problematic. The same issues apply from the first example. Plus there's a new wrinkle that could be a show stopper: the Googlification of "isn't quite accurate" into "it is a quite accurate." You'd better hope there was more to the message than this before running off to present your paper. It also highlights the difficulty that automated systems have when deciphering conjunctions such as "isn't" which often are used in conversational speech.

Some might suggest that this demonstrates the Google developers actually have their priorities in order. Get the kinks out of the sex jargon before focusing on exciting subject matter such as conjunctions. 🙄

Bottom Line: Googlified Messaging may be a boon to your sex life, but don't stake your job security on it just yet. Also make certain that your voicemail announcement includes a very emphatic request that callers actually identify themselves and leave a callback number where they can be quickly reached.

Google Voice Design. To integrate free voicemail transcription into Asterisk, what we first must do is turn your Google Voice account into a glorified answering machine and message distribution system. When calls arrive on your Google Voice number, they will immediately trigger a greeting message that says something like this:

Thank you for calling Nerd Vittles. No one is available at the moment to take your call. After the tone, please identify yourself, leave a callback number, and a brief message. Your message will be transcribed and delivered to us. We will get back to you promptly. Please begin speaking after the tone.

Once a voicemail message is received, we want Google Voice to transcribe it and email us both the voicemail message and the transcribed text.

Google Voice Setup. Log into your Google Voice account and click Settings, General. In the Voicemail Greeting section of the form, record your greeting message as outlined above. In the Notifications section, identify the email and SMS addresses for delivery of your voicemail messages. In Voicemail Transcripts, check the option to transcribe voicemails. Now click on the Do Not Disturb check box to forward all inbound calls to voicemail.

FreePBX Setup. Obviously there are numerous ways to integrate this transcription service into Asterisk. If you're using FreePBX, here are a couple of simple ways. First, create a Miscellaneous Destination for Google Voice and provide your Google Voice number in the correct format to match your dialplan. Next, if you use a Ring Group to answer incoming calls, choose your new Google Voice Miscellaneous Destination as the "Destination if no Answer." If you're using an IVR to route calls, then perhaps you'll want to add an option to leave a voicemail and have it transcribed for delivery to your email account.

HINT: For rerouting of Asterisk calls to Google Voice, be sure to use an outbound trunk that supports CallerID pass-through. And configure the trunk with a blank CallerID value in FreePBX. Then the actual CallerID of the incoming call will be passed along to Google Voice and stored as part of the voicemail message.

Connecting the Dots. For the visionaries in the audience, you're probably wondering what it would take to add language translation to transcription. So were we. It raises some interesting questions, and some of our early adopters already have tried it. Suffice it to say, it doesn't work yet. But it wouldn't take much effort to run a transcribed message through Google Translate and spit out a Spanish, French, or German message on the other end. Or vice versa: transcribe a German message and translate it into English for email delivery in an English-speaking country. Exciting times, indeed. Stay tuned!

Free U.S. Calls with Google Voice. At least for now, calls through Google Voice to phone numbers in the United States are free. And the rates are quite reasonable to other countries. It's a penny a minute to Canada and two cents a minute to many other countries whose names don't include the word "island." There are several ways to terminate calls through Google Voice with Asterisk. Here's the only way we've found to place outbound calls and also preserve the message transcription functionality.

Log into your Asterisk server as root and edit extensions_custom.conf in the /etc/asterisk folder. In the [from-internal-custom] context, add one or more entries for people you wish to call. Be sure to make the following substitutions to match your Google Voice credentials:

999 - Extension number to call
9876543210 - Your Google Voice DID
8888 - Your Google Voice PIN
1234567890 - Phone number of person to call

And here's the default entry which should be one continuous entry on one line:

exten =>999,1,Dial(SIP/9876543210@216.239.37.15:5061
,30,mD(wwwwwwwwwwww*ww8888ww2ww1234567890#))

When you finish making all the extension entries desired, save the file. Then reload your Asterisk dialplan: asterisk -rx "dialplan reload"

Google Dialer for Asterisk. Another approach for outbound calling with Google Voice would be to create a simple dialer in your Asterisk dialplan. The idea here is that anyone can pick up a phone and dial *GV (which is *48) to place a call. They then will be prompted to enter the 10-digit number to call. This code would be inserted in the same [from-internal-custom] context, and remember to insert your actual Google phone number and PIN in the dial string and keep the entire Dial command on a single line (which we can't do in this blog's template). Reload the Asterisk dialplan when you're finished.

exten => *48,1,Answer
exten => *48,n,Wait(1)
exten => *48,n,Set(TIMEOUT(digit)=15)
exten => *48,n,Set(TIMEOUT(response)=20)
exten => *48,n,Playback(pls-entr-num-uwish2-call)
exten => *48,n,Read(NUM2CALL,beep,10)
exten => *48,n,Playback(pls-wait-connect-call)
exten => *48,n,Dial(SIP/9876543210@216.239.37.15:5061
,30,mD(wwwwwwwwwwww*ww8888ww2ww${NUM2CALL}#))
exten => *48,n,Hangup

Outbound Trunk Alternative. Since the original article was published, our British colleague, Joe Roper, suggested that we also include instructions for configuring Google Voice as a dial-out trunk (instead of an extension) in Asterisk. The advantage of this approach is that outbound calls can be dialed in the traditional way without interaction with voice prompts. The solution we will outline below lets you place a call from any Asterisk phone by dialing the GV prefix plus a 10-digit number. So, to place a call to President Obama in Washington through Google Voice, you'd dial 48-202-456-1111. Good luck with that, but here's how...

First, log into your Asterisk server as root and edit extensions_custom.conf again. This time, go to the very bottom of the file and add the following code using your Google Voice phone number and PIN. Remember to expand the two-line dial string so it fits on a single line with no spaces! Save your changes and reload the dialplan.


[custom-google-voice]
exten => _X.,1,Dial(SIP/9876543210@216.239.37.15:5061
,30,rD(wwwwwwwwwwwwww*www8888www2wwww${EXTEN}#))
exten => _X.,n,Hangup

Next, open FreePBX with a web browser and choose Setup, Trunks, Add Custom Trunk. Insert the following Custom Dial String on the form and Submit Changes and reload the dialplan:

local/$OUTNUM$@custom-google-voice

Finally, choose Setup, Outbound Routes, Add Route and fill in the following entries on the form:


Route Name: GoogleVoice
Dial Pattern: 48|NXXNXXXXXX
Trunk Seq: local/$OUTNUM$@custom-google-voice

Save your changes and reload the Asterisk dial plan one more time to complete the setup. Now you're all set to call the President whenever the urge strikes: 48-202-456-1111. And, remember, it's a free call... at least for now.

Homework. Google also has introduced a slick new directory assistance service which also is free. We'll leave it to you to take the lesson above and create a GOOG-411 entry in your dialplan. HINT: You choose option 3 instead of option 2 after entering your PIN in the Google Voice menu. Enjoy!

Chapter 2. Google Voice: Is the SIP and Asterisk Honeymoon Over?

Chapter 3. The Return of Googlified Messaging With Free U.S. Calling


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

Introducing PBX in a Flash 1.4: The Lean, Mean Asterisk Machine

It's almost spring. So what better time to introduce version 1.4 of PBX in a Flash. It's chock full of new telephony goodies to whet your appetite for Internet Telephony. Tom King has worked his usual Magic™ to come up with a pair of new ISOs that are nothing short of spectacular. Not only is PBX in a Flash leaner and meaner, but it's now incredibly flexible and even easier to use.

You don't get the kitchen sink in PBX in a Flash ISOs. Instead you get a rock-solid CentOS 5.2 operating system with the latest CentOS kernel on which to build an Internet telephony server that meets your specific needs. Want a 64-bit operating system? We've got it. Prefer to stick with a 32-bit operating system? We've got you covered there, too. Want to experiment with Asterisk® 1.6 and DAHDI? We've got it. Prefer to stick with Asterisk 1.4 and Zaptel for a production environment? No problem. Do you prefer LVM, ext3, or SATA RAID for your disk drives? Well, take your pick. PBX in a Flash 1.4 now supports all of them. For those with a physical handicap, you now can install the complete system with no user intervention by typing ksauto at the first prompt. And, for PBX in a Flash development partners, we've got a 2-CD install set that makes generation of multiple systems with minimal Internet access a reality.

A Better Mousetrap. Asterisk-based LAMP aggregations thankfully are more plentiful today, but we think we have a better mousetrap. Here are a few reasons why? First, PBX in a Flash is the only distribution that is totally source-based with Asterisk compiled from source as part of the install. What that means is when you purchase add-on hardware and it has a problem for some reason, all of the tools are already in place for you to contact the manufacturer or reseller and have them reconfigure or recompile whatever is necessary on your system to get you back in business quickly. It also means that most of our applications are compiled from source on your specific hardware which assures a more reliable and stable software platform on which to build your telephony system.

Second, we don't release PBX in a Flash ISOs every other week. We don't have to. Every time a new security patch is released for Asterisk, the "other guys" have to create a new RPM or ISO to support it. That means your system is vulnerable for weeks or months while that process is underway. In some cases, it means installing a new ISO and starting over. I wish I had a nickel for every time I reinstalled and basically started over with Asterisk@Home or trixbox. With PBX in a Flash, you simply type update-source at the command prompt and your system is brought current without missing a beat. The total downtime for your system is typically under 15 minutes!

Third, PBX in a Flash uses a two-step install process that all but eliminates the ISO obsolescence issues that have plagued other distributions. The PBX in a Flash ISO is used to install either the 32-bit or the 64-bit CentOS 5.2 operating system and kernel. When that process completes, the installer then searches multiple sites on the Internet for our "payload file" which contains the latest, greatest version of Asterisk which is compiled on-the-fly. The payload script also installs FreePBX and many of the customized features that make PBX in a Flash unique. If you need additional functionality, we have an entire web site, pbxinaflash.org, dedicated to add-on scripts. Most of these add-on scripts install without user intervention in under a minute. So... install what you need and skip the BloatWare. Using this design, most bugs are eliminated as well without your having to do much of anything. Translation: More time to enjoy your production-quality VoIP PBX... and less all-nighters!

So today we're proud to introduce the 1.4 release of PBX in a Flash for Linux, Windows, and Macs. It's still the Lean, Mean Asterisk Machine designed to meet the needs of hobbyists as well as business users. Text-to-speech works, Bluetooth works, faxing works. FreePBX 2.5 is rock-solid and much more secure.

And, speaking of security, PBX in a Flash is the only distribution that brings you multiple layers of security out of the box. There's the preconfigured Linux IPtables firewall. And, in addition, there's the latest and greatest version of Fail2Ban which blocks malicious intruders attempting to guess your passwords and break into your system. We also recommend adding a hardware-based firewall/router to block HTTP access to your system unless you really know what you're doing. Does all of this matter? Well, it's your phone bill. Here's a link to our article about a company that recently received an unexpected $120,000 phone bill in the mail. So you decide. If you read nothing else before embarking on your VoIP adventure, read our Primer on Asterisk Security!

As some of our regular readers know, we have been very concerned with the Asterisk development strategy that continues the process of regularly deleting commands and syntaxes with each major version change. Many of us rely upon these commands in building dialplans and vertical market applications for Asterisk so it causes real problems. PBX systems break that used to work. When that happens almost annually, it's a bad thing. One way that we hope to improve the dialogue with the developers is to make it easy for more people to experiment with Asterisk 1.6. Whether you choose our 32-bit or 64-bit ISO, you also have the option to install the latest release of Asterisk 1.6 and get you involved in this process. Otherwise, we might as well look forward to annual train wrecks because of the Asterisk design strategy. You can read all about it here and here.

Getting Started with PBX in a Flash 1.4. Begin by downloading either the 32-bit or 64-bit ISO image for PBX in a Flash. Don't worry. If you try to run the 64-bit install on a system that doesn't support it, it'll just sit there so you've got nothing to lose by trying the Ferrari first. As new locations for ISO downloads come on line, we will add them to the download list. Once you've got the ISO image in hand, use your favorite tool to burn it to a bootable CD. This next step is the most important. Do some reading!! There also are loads of helpful tutorials that are free for the downloading from our support site.

What About Hardware? If you're new to all of this, let us recommend you try either one of Dell's entry-level T100 or T105 PowerEdge servers or one of the newer Intel Atom-based small-footprint PCs or netbooks such as the Acer Aspire One. On sale pricing is typically around $300. You can save an additional 2% plus $5 by using our coupon link in the right margin. These systems are just about perfect for a home or small business telephony server.

Basic Install. Once you have your new system, just insert the CD containing the pbxinaflash.iso and then reboot the machine you wish to dedicate to PBX in a Flash. After reading this tutorial and the initial prompts and warnings, choose an option and press the <Enter key> to begin the installation. If you want to first check the media for corruption, type linux mediacheck and then press the <Enter> key. When prompted, be sure to choose the option that erases all existing partitions and uses the default partition layout. Then choose your time zone and leave the UTC system clock option unchecked. Next choose a root password for your new system. Make it secure, and write it down (not on your shoe). We plan to use this password for virtually everything on your new system. The install process begins. This includes MySQL, Apache, PHP, CUPS, Samba, WebMin, Subversion, SendMail, Yum, Bluetooth support, SSL, Perl, Python, the kernel development package, and much more. In about 15 minutes depending upon the speed of your PC, the machine will reboot. Be sure to eject the CD at this point. You now must have an Internet connection to complete the install so be sure you've plugged in a 10/100 cable if you haven't done so already.

After the reboot, the system will start up with CentOS 5.2, then download and install Asterisk and FreePBX, and search for the necessary installation script and payload file on pbxinaflash.net. If that site happens to be down, the script will go to pbxinaflash.com for the same payload file. Just to repeat, if you don't have Internet connectivity, then the installation cannot complete. When the installation finishes, reboot your system and log in as root. The IP address of your PBX in a Flash system will be displayed once you log in. If it's blank, type service network restart after assuring that you have Internet connectivity and access to a DHCP server that hands out IP addresses. Typing ifconfig should display your IP address on the eth0 port. Write it down. We'll need it in a minute.

Now that you've logged in as root, you should see the IP address displayed with the following command prompt: root@pbx:~/. If instead you see bash displayed as the command prompt and it's not green, then the installation has not completed successfully. This is probably due to network problems but also could be caused by the time being set incorrectly on your server. You can't compile Asterisk if the time on your computer is a date in the past! For this glitch you have to try again. If it's a network issue, fix it and then reboot and watch for the eth0 connection to complete. Assuming it doesn't fail the second time around, the installation will continue. Likewise, if you do not have DHCP on your network, the installation will fail because the PBX will not be given an IP address. Simply type netconfig, fill in the blanks and reboot.

Four Steps to Complete the Install. There are four important things to do to complete the installation. First, from the command prompt, run genzaptelconf. This sets up your ZAP hardware as well as a timing source for conferencing. If you're using additional hardware for your Asterisk system, we recommend removing the 56K modem when you install the cards. This will help avoid interrupt conflicts. Second, decide how to handle the IP address for your PBX in a Flash server. The default is DHCP, but you don't want the IP address of your PBX changing. Phones and phone calls need to know how to find your PBX, and if your internal IP address changes because of DHCP, that's a problem. You have two choices. Either set your router to always hand out the same DHCP address to your PBX in a Flash server by specifying its MAC address in the reserved IP address table of your router, or run netconfig at the command prompt and assign a permanent IP address to your server. Be aware that netconfig no longer is a part of CentOS 5.2. We added it back in as part of the install. If you update your CentOS configuration, you will need to reinstall it by running update-scripts, then update-fixes, and then install-netconfig. If you experience problems with the process, see this message thread on the forum. The third configuration requirement probably accounts for more beginner problems with Asterisk systems than everything else combined. Read the next section carefully and do it now!

Getting Rid of One-Way Audio. There are some settings you'll need to add to /etc/asterisk/sip_custom.conf if you want to have reliable, two-way communications with Asterisk: nano -w /etc/asterisk/sip_custom.conf. The entries depend upon whether your Internet connection has a fixed IP address or a DHCP address issued by your provider. In the latter case, you also need to configure your router to support Dynamic DNS (DDNS) using a service such as dyndns.org. If you have a fixed IP address, then enter settings like the following using your actual public IP address and your private IP subnet:

externip=180.12.12.12
localnet=192.168.1.0/255.255.255.0     

If you have a public address that changes and you're using DDNS, then the settings would look something like the following:

externhost=myserver.dyndns.org
localnet=192.168.0.0/255.255.255.0     

(NOTE: The first 3 octets in the above localnet entries need to match your private IP addresses!)

Once you've made your entries, save the file: Ctrl-X, Y, then Enter. Reload Asterisk: amportal restart. If you assigned a permanent IP address, reboot your server: shutdown -r now.

Be aware that some people experience problems with the externhost approach outlined above. If your provider only gives you a dynamic IP address, you still can use the externip approach above so long as you have a method to frequently verify your IP address. The approach we actually use on our home network is to run a little script every 5 minutes. If it finds that your outside IP address has changed, it will automatically update your sip_custom.conf file with the new address. To use our approach, create a file in /var/lib/asterisk/agi-bin names ip.sh. Here's the code:1

#!/bin/bash
# File to log the IP Address
IPFILE='/var/log/asterisk/externip'
# Your local lan ip block
localnet=192.168.1.0
# Nothing else needs to be changed.
if [ ! -f "$IPFILE" ]; then
echo "creating $IPFILE"
echo first_time_usage > $IPFILE
fi
lastip=`cat $IPFILE`
externip=$(curl -s -S --user-agent "PIAF 1.4"↩
http://myip.pbxinaflash.com | awk 'NR==2')
if [ $externip != $lastip ]; then
# Writes new IP address (if it has changed) to file.
echo "$externip" > $IPFILE
echo "externip=$externip" > /etc/asterisk/sip_custom.conf
echo "localnet=$localnet/255.255.255.0" >>↩
/etc/asterisk/sip_custom.conf
echo "srvlookup=yes" >> /etc/asterisk/sip_custom.conf
echo "nat=yes" >> /etc/asterisk/sip_custom.conf
asterisk -rx "dialplan reload" ;
else
exit 0;
fi
exit;

On line 5, enter the internal subnet for your server as the localnet entry. This is usually 192.168.0.0 or 192.168.1.0. YMMV!

Save the file and give it execute permissions: chmod +x /var/lib/asterisk/agi-bin/ip.sh. Then make asterisk the file owner: chown asterisk:asterisk /var/lib/asterisk/agi-bin/ip.sh.

Finally, add the following entry to the bottom of /etc/crontab:

*/5 * * * * asterisk /var/lib/asterisk/agi-bin/ip.sh > /dev/null

Getting Your Machine Up to Date. Tom King, one of our lead developers, has gone to great pains to make it easy for you to always have a current system. All you have to do is type a few commands, but you do have to type them. So do it now! After logging in as root, type update-scripts to get the latest PBX in a Flash scripts installed on your system. This doesn't run them, it merely makes them available for you to run them. Once you complete this step, you can always review the latest scripting options by typing help-pbx. Now run update-fixes to apply the latest patches to your PBX in a Flash system. When it completes, you're up to date. If you want the latest version of Asterisk, it's easy! Just run update-source. In the case of PBX in a Flash 1.4, you have the latest stable version of Asterisk 1.4 or 1.6... at least for today.

Activating Email Delivery of Voicemail Messages. We've previously shown how to configure systems to reliably deliver email messages whenever a voicemail arrives unless your ISP happens to block downstream SMTP mail servers. Here's the link in case you need it. As it happens, you really don't have to use a real fully-qualified domain name to get this working. So long as the entry (such as pbx.dyndns.org) is inserted in both the /etc/hosts file and /etc/asterisk/vm_general.inc with a matching servermail entry of vm@pbx.dyndns.org (as explained in the link above), your system will reliably send emails to you whenever you get a voicemail if you configure your extensions in FreePBX to support this capability. You can, of course, put in real host entries if you prefer. For 90% of the systems around the world, if you just want your server to reliably e-mail you your voicemail messages, make line 3 of /etc/hosts look like this with a tab after 127.0.0.1 and spaces between the domain names:

127.0.0.1     pbx.dyndns.org pbx.local pbx localhost.localdomain localhost

And then make line 6 of /etc/asterisk/vm_general.inc look like the following:

serveremail=voicemail@pbx.dyndns.org

Now issue the following two commands to make the changes take effect:

service network restart
amportal restart

The command "setup-mail" can be used from the Linux prompt to set the fully-qualified domain name (FQDN) of the mail that is sent out from your server. This may help mail to be delivered from the PBX. One of things mail servers do to reduce spam is to do a reverse lookup on where the mail has come from, checking that there is actually a mailserver at the other end. You can only do this if you have set up dynamic DNS or if you have pointed a hostname at your fixed IP address. Once you have done this, and assuming your ISP is cooperative, then you will receive your voicemails via email if you wish (this is set within FreePBX),and your PBX will email you when FreePBX needs an update. You set this feature in FreePBX General Settings.

If your hosting provider blocks downstream SMTP servers to reduce spam, here's a simple way to use your Gmail account (free!) as your SMTP Relay Host. Then you never have to worry about this again!

Setting Passwords and Other Stuff. Be aware that major security issues are reported from time to time with FreePBX. We strongly recommend that you not use FreePBX admin security alone to protect your system from a web attack. It may compromise root access to your entire server. For this reason, we recommend that you log in as root and immediately run passwd-master after completing the update-scripts and update-fixes scenario. This establishes Apache htaccess security on your FreePBX web interface. After running this conversion utility, you can only log into the FreePBX admin interface with the username maint (not admin) and the password which you establish when you run the utility.

Other passwords can be set in your system with these commands:

passwd... reset your root user password
passwd-maint... reset your FreePBX maint password
passwd-wwwadmin... for users needing FOP and MeetMe access
passwd-meetme... for users needing only MeetMe access
passwd-webmin... for users needing WebMin access to your server (very dangerous!)

There's also an Administration password that you can set in the KennonSoft UI that displays when you point your browser to the IP address of your server. Do NOT use the same password here that you use elsewhere as it is not overly secure.

Configuring WebMin. WebMin is the Swiss Army Knife of Linux. It provides TOTAL access to your system through a web interface. Search Nerd Vittles for webmin if you want more information. Be very careful if you decide to enable it on the public Internet. You do this by opening port 9001 on your router and pointing it to the private IP address of your PBX in a Flash server. Before using WebMin, you need to set up a username and password for access. From the Linux prompt while logged in as root, type the following command where admin is the username you wish to set up and foo is the password you've chosen for the admininstrator account. HINT: Don't use admin and foo as your username and password for WebMin unless you want your server trashed!

/usr/libexec/webmin/changepass.pl /etc/webmin root password

To access WebMin on your private network, go to http://192.168.0.123:9001 where 192.168.0.123 is the private IP address of your PBX in a Flash server. Then type the username and password you assigned above to gain entry. To stop WebMin: /etc/webmin/stop. To start WebMin: /etc/webmin/start. For complete documentation, go here.

Updating and Configuring FreePBX. FreePBX 2.5 is installed as part of the PBX in a Flash 1.4 implementation. This incredible, web-based tool provides a complete menu-driven user interface to Asterisk. The entire FreePBX project is a model of how open source development projects ought to work. And having Philippe Lindheimer's as the Captain of the Ship is just icing on the cake. All it takes to get started with FreePBX is a few minutes of configuration, and you'll have a functioning Asterisk PBX complete with voicemail, music on hold, call forwarding, and a powerful interactive voice response (IVR) system. There is excellent documentation for FreePBX which you should read at your earliest convenience. It will answer 99% of your questions about how to use and configure FreePBX. For the one percent that is not covered in the Guide, visit the FreePBX Forums which are frequented regularly by the FreePBX developers. Kindly post FreePBX questions on their forum rather than the PBX-in-a-Flash Forum. This helps everybody. Now let's get started.

NOTE: PBX in a Flash comes with the IPtables firewall enabled on your system. If this causes problems with access to the FreePBX repository (for loading the FreePBX updates below), you can easily (and temporarily) turn off the firewall. Type help-pbx for assistance. Don't forget to restart the firewall especially if your system has any Internet exposure!

Now move to a PC or Mac and, using your favorite web browser, go to the IP address you deciphered above for your new server. Be aware that FreePBX has a difficult time displaying properly with IE6 and IE7 and regularly blows up with older versions of Safari. Be safe. Use Firefox. From the PBX in a Flash Main Menu in your web browser, click on the Administration link and then click the FreePBX button. The username and password both default to admin. Click Apply Configuration Changes, Continue with Reload, and then Refresh your browser screen. Now click the Module Administration option in the left frame once FreePBX loads. Now click Check for Updates online in the upper right panel. Next, click Download All which will select every module for download and install. The important step here is to move down the list and Deselect Speed Dials and PHPAGI from the download and install options. Once these apps have been deselected, scroll to the bottom of the page and click Process, then Confirm, then Return once the apps are downloaded and installed, then Apply, then Continue with Reload. Now repeat the process once more and do not deselect the two applications, then Process, Confirm, Return, Apply Config Changes, and Continue with Reload. Finally, scroll down the Modules listing until you get to the Maintenance section. Click on each of the following and choose Install: ConfigEdit, Sys Info, and phpMyAdmin. Then click Process, then Confirm, then Return once the apps are downloaded and installed, then Apply, then Continue with Reload. All three of these tools now are installed in the Maintenance section of the Tools tab of FreePBX. One final step, and you're good to go. An update of FreePBX has been released. Click Check for Updates online. Then choose Download and Upgrade for the Core, FreePBX Framework, and System Dashboard modules. Then click Process, then Confirm, then Return once the apps are downloaded and installed, then Apply, then Continue with Reload. You now have an up-to-date version of FreePBX. You'll need to repeat the drill every few weeks as new updates are released. This will assure that you have all of the latest and greatest software. To change your Admin password, click on the Setup tab in the left frame, then click Administrators, then Admin in the far right column, enter a new password, and click Submit Changes, Apply Configuration Changes, and Continue with reload. We're going to be repeating this process a number of times in the next section so... when instructed to Save Your Changes, that means "click Submit Changes, Apply Configuration Changes, and Continue with reload."

Choosing Internet Telephony Hosting Providers for Your System. Before you can place calls to users outside your system or to receive incoming calls, you'll need at least one provider (each) for your incoming phone number (DID) and incoming calls as well as a provider for your outbound calls (terminations). We have a list of some of our favorites here, and there are many, many others. You basically have two choices with most providers. You can either pay as you go or sign up for an all-you-can-eat plan. Most of the latter plans also have caps on minutes so it's more akin to all-they-care-for-you-to-eat, and there are none of the latter plans for business service. In the U.S. market, the going rate for pay as you go service is about 1.5¢ per minute rounded to the tenth of a minute. The best deal on DIDs is from Vitelity. They charge $3.99 a month for a DID with unlimited, free incoming calls. There's a link to the Nerd Vittles discount on this service for PBX in a Flash users below.

Before you sign up for any all-you-can-eat plan, do some reading about the service providers. Some of them are real scam artists with backbilling and all sorts of unconscionable restrictions. You need to be careful. Our cardinal rule in the VoIP Wild West is never, ever entrust your entire PBX to a single hosting provider. As Forrest Gump would say, "Stuff happens!" And life's too short to have dead telephones, even if it's a rarity.

Setting Up 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:yourpassword@sip.axvoice.com:

allow=ulaw
authname=yourusername
canreinvite=no
context=all-incoming
defaultip=sip.axvoice.com
disallow=all
dtmfmode=inband
fromdomain=sip.axvoice.com
fromuser=yourusername
host=sip.axvoice.com
insecure=very
nat=yes
secret=yourpassword
type=friend
user=phone
username=yourusername

And our Vitelity Outbound Trunk looks like the following (labeled vitel-outbound) with no registration string:

allow=ulaw&gsm
canreinvite=no
context=from-pstn
disallow=all
fromuser=yourusername
host=outbound1.vitelity.net
secret=yourpassword
sendrpid=yes
trustrpid=yes
type=friend
username=yourusername

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]
Device Options
secret ... 1299864 < -- make this unique AND secure! dtmfmode ... rfc2833 Voicemail & Directory ... Enabled voicemail password ... 1299864 <-- make this unique AND secure! email address ... yourname@yourdomain.com [if you want voicemail messages emailed to you] pager email address ... yourname@yourdomain.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 simple. 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 because the SIP and IAX ports typically are exposed to allow connections to your providers. In addition to making up secure passwords, the latest version of FreePBX also lets 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. 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:

1NXXNXXXXXX
NXXNXXXXXX

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.

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.

A Word About Ports. For the techies out there that want "the rest of the story" to properly configure firewalls, here's a list of the ports available and used by PBX in a Flash:

TCP 80 - HTTP
TCP 9080 - Duplicate HTTP
TCP 22 - SSH
TCP 9022 - Duplicate SSH
TCP 9001 - WebMin
UDP 10000-20000 - RTP
UDP 5004-5082 - SIP
UDP 4569 - IAX2
UDP 2727 - Media Gateway

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 including AsteriDex, Yahoo News Headlines, Weather by Airport Code, Weather by Zip Code, Worldwide Weather Forecasts, Telephone Reminders, MailCall for Asterisk, and TeleYapper. We have not yet completed testing with Asterisk 1.6, but most should work. Complete documentation for each application also is provided at the link above. And, if you still have a DBT-120 Bluetooth adapter, you'll be happy to learn that it works out-of-the-box with PBX in a Flash on your new Everex Green PC. Dust off our recent article on Proximity Detection, and you should be in business in under 10 minutes. Enjoy!


Nerd Vittles Skype Gateway to Asterisk. If you haven't yet built your own Skype Gateway to Asterisk, you're missing a treat. To give you some idea of the flexibility of the gateway, pick up any Skype phone and call our Skype demo hotline: nerdvittles. It was a 5-minute project once the gateway was running.


Want a Bootable PBX in a Flash Drive? Our Atomic Flash bootable USB flash installer for PBX in a Flash has been quite the hit. Special thanks to all of our generous contributors! Atomic Flash provides all of the goodies in the VPN in a Flash system featured last month on Nerd Vittles. You can build a complete turnkey system using almost any current generation PC with a SATA drive and this USB flash installer in less than 15 minutes!

If you'd like to put your name in the hat for a chance to win a free one delivered to your door, just post a comment with your best PBX in a Flash story.2

Be sure to include your real email address which will not be posted. The winner will be chosen by drawing an email address out of a hat (the old fashioned way!) from all of the comments posted over the next several weeks.

And it still isn't too late to make a contribution of $50 or more to the PBX in a Flash project and get a free Atomic Flash installer delivered to your door as our special thank you gift. See this Nerd Vittles article for details.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. Join the following line to the original line of code whenever you encounter the ↩ character. []
  2. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []

Why Wait? Build Your Own Skype Gateway to Asterisk

Photo and Background Story courtesy of Skype JournalAs the world awaits the much-hyped Digium® commercial offering of a Skype for Asterisk® gateway, we began exploring existing alternatives last week that provide individuals1 the same functionality at what will no doubt be considerably less cost. The Gizmo5 offering is darn-near perfect for those that need a quick solution and don't mind spending $20 a year to let someone else wrestle with the technical complexities that invariably accompany maintenance of cross-platform gateways such as this one.

NOTE: Article has been updated. For the latest edition, follow this link.

We, of course, like the technical challenge that comes with the territory so today we turn our attention to Greg Dorfuss' SipToSis software which forms the lynchpin of Gizmo's offering and which lets any Asterisk user create much the same gateway at no cost other than the expense of any Skype Out calls you may choose to make. When we're finished, you'll be able to call any Skype user in the world from any extension on your Asterisk server by entering either a Skype username or any 10-digit telephone number preceded by an 8 to take advantage of SkypeOut calling rates. You'll also be able to receive incoming calls from any Skype user on any extension of your Asterisk system. In short, what you get is a transparent interface to several hundred million Skype users from your Asterisk server. And the time to set this up is less than 15 minutes assuming you already have one of the Nerd Vittles Orgasmatron Builds in operation. These are available for Dell PowerEdge servers, Everex gPC desktop systems and minis, and most of the new Atom-based systems. If you have a garden-variety FreePBX-based Asterisk server such as PBX in a Flash, trixbox, or Elastix, just add another 5 minutes to reconfigure a few things.

Prerequisites. For today's project, we're assuming you have an existing FreePBX-based Asterisk server with either CentOS 5.2 or the Fedora 10 Remix featured in our Atomic Flash build. You'll need both a keyboard and mouse! For inbound Skype calling to work with other implementations including generic PBX in a Flash systems, you'll need to create a SIP URI for your Asterisk server: mothership@127.0.0.1. We've previously explained how to set one up in this article. The Atomic Flash installer, VPN in a Flash build, and the Orgasmatron II and III builds include this SIP URI functionality out of the box. You'll also need Java 1.5. To see if it's included in your distribution, issue the following command: rpm -q jdk. Finally, we're assuming you already have an existing Skype account. If not, download the Skype software for your Mac or Windows PC, and sign up. Try out a demo from any Skype phone. Just call nerdvittles.

Installing JAVA. If your particular Asterisk distribution doesn't have JAVA 1.5 or higher installed (rpm -q jdk), here's how to do it. Go to Sun's Java SE Development Kit 6u12 website, choose Linux for the platform, and agree to the license agreement. Then click Continue. Download jdk-6u12-linux-i586-rpm.bin and copy it to your Asterisk server. Make the file executable (chmod +x jdk-6u12-linux-i586-rpm.bin) and then run it. Scroll down the wordy license agreement AGAIN and type yes. Java 1.6 then will be installed on your system. Whew!

Basic Installation. Now we're ready to get started. Log into your Asterisk server as root and issue the following commands.

cd /root
mkdir skype
cd skype
wget http://www.skype.com/go/getskype-linux-centos
#Atomic Flash builds including VPN in a Flash
#should skip the next 3 yum commands.
#Then pick up again after the next comment line.
yum install xorg-x11-server-Xvfb
yum install qt4
yum install xterm
#everyone continues on from here
yum install libXScrnSaver.i386
wget http://pbxinaflash.net/source/skype/siptosis.tgz
rpm -ivh skype*
cd /
tar zxvf /root/skype/siptosis.tgz

FreePBX Design. The FreePBX setup that we recommend goes something like this. For outbound Skype calls, you have two choices.

1. To place a call to a regular phone number using SkypeOut (which costs you money), you'll simply dial 8 plus the area code and number. Our foreign friends will have to adjust their dialplans and /siptosis/SkypeOutDialingRules.props accordingly. Today's setup assumes 10-digit phone numbers!

2. To place a call to a Skype username using a softphone that supports SIP URI dialing such as X-Lite, you simply precede the Skype username with an asterisk, e.g. *echo123 will connect you to the Skype Call Testing Service.

For incoming Skype calls, the default setup routes those calls to a SIP URI: mothership@127.0.0.1. Whether you point this URI to an extension, ring group, or IVR is up to you. In the default Orgasmatron and Atomic Flash builds, the mothership URI is pointed to the Stealth AutoAttendant, an IVR that plays a welcoming message and then transfers the call to a ring group if no digit is pressed by the caller.

Configuring FreePBX. To put this setup in place, use a web browser to access FreePBX on your Asterisk server. You'll need to create a Custom Trunk and then an Outbound Route.

1. Choose Setup, Add Trunk, Add Custom Trunk. Fill in the form so that it looks like the following using your own CallerID number obviously:

When you're finished, click the Submit Changes button and then reload the dialplan when prompted.

2. Next choose Setup, Outbound Routes, Add Route. Fill in the form so that it looks like this:

When you're finished, click the Submit Changes button. Be sure to move this new OutSkype route to the top position in your Outbound Routes listing in the right margin! Then reload the dialplan when prompted.

3. If you're not using one of our custom Asterisk builds, add a new DayNight Control 1 option while you're still in FreePBX. Just specify where you want calls routed for Day mode and Night mode. Then, here's the easy way to activate SIP URI support on your Asterisk/FreePBX server. Copy the [from-sip-external] context from the extensions.conf file in /etc/asterisk. Now copy the content into extensions_override_freepbx.conf. Be sure to preserve the context name in brackets! Now make it look like the following. The additions we're making are shown in bold below:

[from-sip-external]
;give external sip users congestion and hangup
; Yes. This is _really_ meant to be _. - I know asterisk whinges about it, but
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)
exten => mothership,1,Goto(app-daynight,1,1)
exten => pbxinaflash,1,Goto(app-daynight,1,1)
exten => e164,1,Goto(from-trunk,e164,1)
exten => fax,1,Goto(from-trunk,fax,1)

exten => s,n,Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,NoOp(Hangup)
exten => i,1,NoOp(Invalid)
exten => t,1,NoOp(Timeout)

Finally, reload your Asterisk dialplan, and we're finished with Asterisk and FreePBX setup:

asterisk -rx "dialplan reload"

Activating Your Skype Gateway. Now we're ready to place your Skype gateway in production. You'll need to perform these steps from the console on your Asterisk server since we have to run Skype in graphics mode. This may look a bit complicated. It's really not. It's just a bit tedious to figure out the sequence of steps, but we've done that part for you.

For those on a CentOS-based system, here are the steps:

1. Start up X-Windows: xinit

NOTE: If xinit won't start on your particular machine, you may need to create /etc/X11/xorg.conf. Here's a generic config file that should work fine for our purposes:

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
EndSection

Section "Device"
Identifier "Card0"
Driver "vesa"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600"
EndSubSection
EndSection

2. Next we need to start up Skype, log in, set it to autologin whenever we start it, and then in the Skype configuration, set it to run minimized: skype

NOTE: Place a Skype Test Call (echo123) to be sure your audio settings are set correctly. If a test call fails with a bad audio message, go into Options, Sound Devices and reconfigure your Audio settings until you can place the test call successfully. Otherwise, none of the rest will work! If you're using a Dell server such as the PowerEdge T100, you're probably S.O.L. without an advanced degree in Rocket Science.
HINT: Intel Atom-based motherboards are a piece o' cake!

3. Once you've got Skype working and all of the Skype settings configured above, shut down Skype.

4. Now start Skype again in background mode: skype &

5. Be sure to write down the PID for Skype in case you need to kill the job if something goes wrong. 🙂

6. You should have a command prompt back now. So issue these commands:

cd /siptosis
./SipToSis_linux

7. A message from Skype should pop up asking if you want to authorize external use of Skype: yes. Also be sure to mark the Checkbox to save this setting for future connections!

8. Now go to a softphone connected to an extension on your Asterisk server and dial *echo123

9. Go to any extension connected to your Asterisk server and dial 8 + your home phone number. This will place the outbound call through SkypeOut at 2¢ a minute.

Finally, here are a few navigation tips for managing your Asterisk console on CentOS systems:

1. Ctrl-Alt-F2 gets you a new login prompt for your server

2. Ctrl-Alt-F7 gets you back to the SipToSis/Skype session. You can kill SipToSis by holding down Ctrl-C for several seconds. To kill Skype: kill pid# (that you wrote down). To restart Skype: skype & and to restart SipToSis, just issue the command again: ./SipToSis_Linux

3. Ctrl-Alt-F9 gets you to the Asterisk CLI.

Automating the Skype Gateway Startup. Once you're positive everything is working reliably and you've rebooted and tried it again just to make certain there are no prompts, here's how to fire up your Skype gateway whenever you reboot your server.

Log into your server as root and issue the following commands:
cd /root
wget http://pbxinaflash.net/source/skype/start-skype
chmod +x start-skype
echo "/root/start-skype" >> /etc/rc.d/rc.local
reboot

For those using one of our Fedora 10 builds such as VPN in a Flash or the Atomic Flash installer, these systems have a full implementation of X-Windows and KDE. Just start the system in mode5 (graphics mode), log in, run Skype in one window and start up SipToSis in a terminal window using the commands in Step 6 above. Authorize external use of Skype when prompted.

Setting Up Speed Dials for Skype Friends. One of the wrinkles with Skype is that Skype uses names for its users rather than numbers. If you don't have a SIP URI-capable softphone, there's still an easy way to place calls to your Skype friends using FreePBX. Just add a Speed Dial number to your FreePBX dialplan. Choose Extension, then select the Custom type, provide an Extension Number which is the Speed Dial number (this could actually spell your friend's name using a TouchTone phone), enter a Display Name for your friend, and add an optional SIP Alias. Then insert the following in the dial field replacing joeschmo with your friend's actual Skype name. Save your entries and reload the dialplan when prompted.
SIP/joeschmo@127.0.0.1:5070

Security Warning. One final note of caution. Do NOT expose UDP port 5070 to the Internet unless you first secure this port with a username and password to avoid Internet intruders using your gateway as a free Skype dialing platform! You do not need 5070 exposed to the Internet to implement today's gateway solution for inbound or outbound Skype calling from your Asterisk server so we recommend you keep it securely behind at least one firewall.

Where To Go From Here. Well, those are the basics. You now can make one outbound Skype call at a time from your Asterisk server, and you can receive an inbound Skype call on any Asterisk extension when Skype users call your regular Skype name. If you want to start up your own business (like Gizmo5), then you'll need to do some tweaking. What you'll need is the STS Trunk Builder toolkit which is free, but proprietary. Enjoy!


Want a Bootable PBX in a Flash Drive? Our Atomic Flash bootable USB flash installer for PBX in a Flash has been quite the hit. Special thanks to all of our generous contributors! Atomic Flash provides all of the goodies in the VPN in a Flash system featured last month on Nerd Vittles. You can build a complete turnkey system using almost any current generation PC with a SATA drive and this USB flash installer in less than 15 minutes!

If you'd like to put your name in the hat for a chance to win a free one delivered to your door, just post a comment with your best PBX in a Flash story.2

Be sure to include your real email address which will not be posted. The winner will be chosen by drawing an email address out of a hat (the old fashioned way!) from all of the comments posted over the next several weeks.

And it still isn't too late to make a contribution of $50 or more to the PBX in a Flash project and get a free Atomic Flash installer delivered to your door as our special thank you gift. See this Nerd Vittles article for details.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest...

  1. Skype and this suggested implementation are intended for individual use. Your use is, of course, governed by the Skype Terms of Service. []
  2. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []

What PBX in a Flash Brings to the Asterisk Table

As 2008 comes to a close, PBX in a Flash celebrates its First Anniversary and continues to be the only Asterisk® distro that offers users a choice of Asterisk 1.4 or 1.6 in either 32-bit or 64-bit flavors. In addition, you can choose our Lean, Mean Asterisk Machine or a preconfigured turnkey implementation with every VoIP bell and whistle on the planet. It’s all about choice and flexibility, and we offer both. For a preview of coming attractions, see the end of this article or take a look at the screen capture below. But today we hand over the editorial reins to some of our PBX in a Flash users to express in their own words why they chose PBX in a Flash and what their return on investment has been. We think you’ll be surprised by some of the responses. We certainly were.

You Never Know How Things Will Work Out

During the time of PBXIAF 1.0, I had been working with Trixbox for about 6 months. By the time PBXIAF 1.1 came out, I had learned enough about the way Trixbox can’t be updated to develop a healthy appreciation for the PBXIAF “compile on site, update as prudent” approach.

I happen to be a techno-nut -– but that notwithstanding, our small business was experiencing telephonic growing pains. After 7 years in business, an opportunity to expand our private label help desk product was easily ready to overrun the terrible copper lines we had for telephone service.

Since it was obvious VoIP was the only way to go – we began to explore what was out there. Vonage was riding high, Packet8 and many other competitors all got us around the limited copper into the office, each one we looked at had their own special quirks. All of them were using analog telephone adapters (ATAs) and either regular or slightly customized Analog phones.

We began a year of exploration that started with the BigGreenBox – hoping to learn enough about VoIP and this strange creature called FreePBX to be able to use it. But, with time marching on, Packet8’s Virtual Office product was selected, and put into use in a 10-phone system.

Although pretty much always under development, the web application that was provided was a little twisted, but worked once you got over its way of looking at call flow – rudimentary ring groups could be arranged in such a way as to simulate queues provided nor more than 8-10 callers were on hold. And so it went for a good year. We definitely used all our creativity to connect various IVR’s ($15/month each) to give the caller a good experience, but we were already clearly operating at the very limits of flexibility and capacity for the Packet8 system.

The average telephone bill during this period was approximately $380 per month (about 1/3 of what copper lines had cost) and almost nothing in hardware ($1,000 in proprietary telephones and ATAs).

Then the balance was broken when Packet8 rather arbitrarily stopped supporting a type of IVR transfer that was crucial to our work flow. At the same moment, the unthinkable happened. The help desk grew a little more. Less flexibility + even more demands for non-achievable call flow changes was the death knell for Packet8 at our office.

During this same time we had deployed several ISOs of the GreenBox in the lab and with field technicians….Several ISO’s! In a very short time. So many ISO’s, so fast – and a complete reinstall to go with each one. Yikes. It had become apparent to me that my career would suddenly change from network engineering to “PBX Upgrade and Reconfigure Monkey” if we deployed that distribution. Also – the forums were unproductive and negative much of the time. There are ways to disagree and still remain civil. Then, I rediscovered Nerd Vittles. This was about the time PBXIAF 1.1 was released.

The difference in the environment and team spirit – even when disagreements occurred – is very palatable. The community is full of people who are so wonderfully giving of their experience. The difference in the distributions – well- they can be summed up in about 6 words. Ward Mundy, Tom King, and Joe Roper.

This trio has brought together a remarkable set of skills and disciplines that produced a really, really good distribution, not solely RPM-based so knuckleheads like me can follow simpler instructions. [Asterisk code is] updated and compiled right on the box – and fully scripted. Security flaws get fixed in hours – sometimes minutes (when they find them – there’s been so FEW), not DAYS like the other guys. And all of it is based on FreePBX, arguably the most evolved UI for managing Asterisk.

Together – they got stability, reliability, and repeatability, and decorated it with enough solid features and functions to be a platform whose feature-function-benefit points are all top notch. Linux, Asterisk, Mysql, Apache, Text to Speech (2 different flavors), Voice Reminders, Wake Up Calls, Weather Reports, Tide Reports, Email by Phone, Headline News by Phone, and scripts that make it all go together just the way it needs to be: “stable and reliable”.

PBX In a Flash is a gift – an opportunity for our technical staff to learn a new area of our field, with the camaraderie of some genuine experts in the arena. We are 8 people, doing the work of 12 – just like a million small businesses. As an old network guy – learning a new skill has been tremendously exhilarating. And this technology is so flexible that I’m continually exhilarated learning new things… and for a long time to come! The professional growth has been great for all of us.

Now, the money. Way back up in the top of this [post], I told you the phone bill with Packet8 was on a good month $380 with barely the [functionality] needed to do our professional best.

Today, thanks to PBXIAF, we run 6 queues every day, with tremendous customer and client satisfaction. We use every part of the system to provide our customers with the best telephone interaction experience they could get anywhere. While handling about 10% more traffic, and with far superior call handling and work flow support, our average phone bill is $120 month.

Here’s the good part. With the $260 a month being saved, the company was able to afford to bring in group medical insurance for all our employees. How’s that for positively impacting 8 people every single day of their lives?

Ward, Tom, Joe – I could never have done it without you.

–tshif

And then there was this testimonial from a venue that all of us are thinking about these days:

Our small public middle school in Washington, DC has to make every penny count. I’m in charge of our technology and its meager budget. This past summer we moved to a new and bigger building and needed to migrate our phone system. We had an existing NEC Aspire system with 15 extensions that worked just fine – nothing fancy – and it hooked up to a single POTS line.

At the new building we needed to double the size to 30 extensions. As the Aspire system used VOIP, it should just be a matter of buying the handsets and a little labor to configure them. Right? [Wrong!] $17,000 is what they wanted to hook up the existing equipment that we moved over and add the 15 new extensions. My response: "Hell no!"

I’d wanted an excuse to setup an Asterisk server for a while, but I had heard how complicated it was. School was close to opening. I had a lot of other things to take care of. And I needed a solution that would most likely work the first time. I found PiaF then read up on the wiki and Nerd Vittles. I ordered a set of Aastra 57i’s and a used Dell PowerEdge 2650. We decided to go "pure VOIP" for flexibility and signed up with Vitelity.com.

I followed the great step-by-step directions for PiaF. I wanted to set mine up inside a Virtual Machine which added some complexity, but I found lots of helpful users in the forums that had documented their experiences before me.

Now we’re 5 months in. The system has more capabilities than our old NECs. The sound quality is better, and it’s easier to use. I had some problems with my server crashing, but I was able to rebuild it on different hardware and transfer our entire configuration in about an hour. Now everything is great. I love that we’re implementing more open source tools, open standards, and aren’t limited to vendor BS when we’re ready to expand. Other schools thought we were "crazy" to setup our own system. Now they want all the details to try and do it themselves.

The best part, of course, is that our whole setup was under $7K. That’s a $10,000 savings. To translate that with regards to the school, that savings allowed us to buy and set up four desktop machines in each of ten classrooms. Now THAT is making a difference.

Thanks to the PiaF team and community!

–jcasimir

And then there’s this one:

TODAY I TOOK CONTROL OF MY VOIP…..

I’ve been a happy VOIP user for 4 years running on Vonage. Even got my son hooked up on Vonage while he was in the Army stationed in Japan. But, when the lawsuits loomed over Vonage’s head, I started looking for something else, and I found Nerd Vittles. WOW! Being kind of a gadget junkie to start with and always looking for something interesting to do with my PCs, I started with Trixbox from Ward’s "build" and fumbled along. When PIAF came along I naturally followed.

I have two important successes that have made me love this VOIP/PIAF stuff.

1) When my grandson was diagnosed with a heart condition my daughter and her husband were stuck in hospital emergency rooms for hours at a time. Being about 500 miles from both our family and the other grandparents, they had a very difficult time getting news out to us since hospitals usually restrict the use of cell phones and don’t allow long distance calls from their phones. That only leaves (yuck!) pay phones. In just a few minutes time, I was able to buy a local DID to the hospital and connect it to my PIAF. I then set up an IVR that gave them access to a DISA. That way they could call us using a local number or call through the DISA to contact the other grandparents. Keeping everyone informed really eases your mind when the grandkids are ill!

2) When I got tired of my wife continuing to ask me for phone numbers when calling our family and friends, I finally decided to set up an IVR for her. So far, both of our kids’ home and cell numbers (as well as my cell number) have kept her happy. When she asks for more I’ll just add them. So far the "Wife Acceptance Factor" is high and I’m having great fun. Hanging up on recognized telemarketers is great, the Callerid Superfecta works great, and I like getting the Weather Forecast from Allison.

The port from Vonage was completed today. I’m using Future-Nine as my primary provider. So, like I said, today is the day I took control of my VOIP.

–jeffmac

And, speaking of role reversal…

PIAF to the Rescue!!

Here is a twist for you.

First, the problem:

My company has a ShoreTel system in place, 48 extensions. They have 2 PRI’s bonded together with dynamic channel allocation. Eight channels are dedicated to the phones, the rest to the Internet. When we have more calls than 8, the system robs channels from the Internet, up to 23 channels max, and returns them as the call volume drops. This all works well.

Monday, a pole a few blocks from our office had the transformer catch fire, and the provider’s equipment was affected. We lost both Internet and phones for several hours. Much of our business is time critical. With no incoming phone calls and no email, we almost lost out on a chance to bid on a VERY large deal. Fortunately, the customer knew the L.A. branch number and after being unable to get in touch with us, he called L.A.

Anyway, now it is critical to management that this NEVER happen again.

The Solution:

Tuesday: I studied the issue and wrote a proposal.

Wednesday: I fired up a PIAF box, established a 10 channel SIP trunk group to the ShoreTel system, and got everything setup for intersystem routing, etc.

Thursday: I am picking up a pay-as-you-go service with 10 channels from a VOIP provider with a single DID and setting our Telco service for failover/rollover to the VOIP DID. I am then ordering a second Internet circuit, 2meg x 2meg, to bring in the SIP trunks from the provider. As soon as that is done, I will dual-home the mail server so that we can get and send email via both Internet providers.

The End Result:

If the primary connection fails, phone service rolls over to the DID from the VOIP provider, rolls into PIAF, and cross trunks to the ShoreTel – AUTOMATICALLY!! Email switches to the secondary MX record and keeps right on rolling. One change in the firewall for the public NAT address and gateway and Internet [and phone service] is back up and running.

THANK YOU Ward, Tom, Joe and gang for making this possible.

–Greg Keys

And, last but not least…

You made my Grandma Cry!

My wife and I are currently living in Germany, and we’ve been using a Skype-In number so our friends and family can call us. For my wife it is important that the solution just works like a regular phone and so I had setup a Siemens M34 to interface with our DECT phone and it worked, mostly, for a few days until the entire system needed to be restarted. For most of our family, this solution works. But my grandmother is living in a different area code and can’t afford to call us as often as she would like.

I stumbled upon the PBX in a Flash project a few weeks ago and, after I found two old Grandstream GXP-2000 in the company junk closet (we are an Internet startup – someone is always buying new toys), I installed PiaF 1.2 using VMWare. I set up a Vitelity DID, the CallerID Superfecta, the Callerid Creep Detector, experimented with ring groups, routing, IVRs and was so impressed that I knew our Skype-solution days were numbered.

Last night, I took the plunge, reformatted the Skype system, and deployed PiaF 1.3. The install was so fast and painless. I copied the old configuration information into the new system. And, my new PBX was up and running in under and hour.

I had so much time left on my hands that I figured I might as well experiment. I followed another Nerd Vittles tutorial and created a few cell phone extensions for my family back in the states. I went to Vitelity and purchased another DID. I recorded a quick message, setup an IVR, and a new corresponding route. That’s when the fun started.

I called my grandmother and told her: "Grandma, we’ve got a new telephone number. Will you please call me right back at…". She was a little surprised when I told her that the number was now going to be a local call for her. The real surprise came when she called the number and heard, "Hi Grandma, welcome to your phone system. For Martin and Ashlee, please press 1, for Rachel please press 2,…". By the time she pressed 1 and Asterisk was ringing our home ring group, she was in tears.

We talked for quite a while about our lives, the Olympics, the hurricane, and everything else. This morning when I got up, I checked the call logs and saw that she had systematically called every single IVR point after we got off the phone.

I didn’t deploy PiaF as a mission-critical business application yesterday–though that day will come for me, but I did what the open-source Internet ideology is all about in my mind. I used the knowledge and experience others have gifted the community to create a solution that fit my situation.

Thanks Again, PiaF Team, from the bottom of my heart!

–Martin Modahl

For those of you that still need a New Year’s Resolution, we hope our fans have given you some ideas. And, when my wife again asks why I continue to work for 5¢ an hour, I’ve got something great for her to read.

Thanks, everybody. You’ve made it all worthwhile.


Want a Bootable PBX in a Flash Drive? Early in 2009 to celebrate the beginning of Nerd Vittles’ Fifth Year, we’ll be introducing our bootable USB flash installer for PBX in a Flash with all of the goodies in the VPN in a Flash system featured a few weeks ago on Nerd Vittles. You can build a complete turnkey system using almost any current generation PC with a SATA drive and our flash installer in less than 15 minutes!

If you’d like to put your name in the hat for a chance to win a free one delivered to your door, just post a comment below with your best PBX in a Flash story.1

Be sure to include your real email address which will not be posted. The winner will be chosen by drawing an email address out of a hat (the old fashioned way!) from all of the comments posted over the next couple weeks. All of the individuals whose comments were used in today’s story will automatically be included in the drawing as well. Good luck to everyone and Happy New Year!!


Nerd Vittles Fan Club Map. We hope you’ll take a second and add yourself to our Frappr World Map. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don’t know the difference in the last two, here’s the best definition we’ve found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We’re always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you’re visiting.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…

  1. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []