Home » Posts tagged 'piaf' (Page 16)
Tag Archives: piaf
If You Won’t Eat Your Own Dog Food, At Least Taste It
The last few weeks have certainly reinforced the notion that one should never ASS-U-ME anything unless you’re willing to learn the hard way when things go south. We’ve also uncovered a new twist to the Golden Rule: "He who has the gold makes the rules." In the Digium®-centric Asterisk® world, it goes something like this. When life is good, we reserve the right to cash in on the proceeds. When things go wrong, the Asterisk community needs to do better testing. It’s a free product, and you get what you pay for.
We wish we could say that our suggestion that Digium eat its own dog food before releasing new Asterisk versions to the public was well received. Quite the contrary, and we probably should have learned several years ago about the tenor of responses one could expect when suggestions were made to change the Digium Way of doing things. In the previous case, we had suggested that altering dialplan syntax and punctuation between Asterisk versions was counter-productive because it broke almost every existing Asterisk application. That was sloughed off as being someone else’s problem since the Digium developers could not possibly anticipate all of the problems that would be caused by changing verbs and syntax in the dialplan.
Think of what would happen if you moved the location of the brake pedal on every new car, and you get some idea of the scope of the problem for Asterisk application developers, assuming you still can find the ones that wrote your company’s application.
Testing Methodology… NOT! With the release of Asterisk 1.8.4, we suddenly encountered a new can of worms. Virtually all Cisco SIP and Polycom TLS phones no longer worked. Keep in mind that this is the only "fully supported" (whatever that means) version of Asterisk that is still available. In the case of the Cisco phones, Digium managers claimed that they didn’t have every piece of equipment on the planet so it wasn’t their fault. In the case of Polycom, it turned out that Digium’s multi-million dollar headquarters reportedly is chock full of Polycom phones, but they’re all plugged into a commercial PBX that didn’t have the problems engineered into Asterisk 1.8.4.
That brings us to the Hobson’s Choice now facing existing and would-be Asterisk users. Wouldn’t you think that a company that profits enormously off hardware and software sales because of their "free" Asterisk product would have some rudimentary test lab in place with a dozen or two phones from the major VoIP manufacturers so that new releases could be checked out before the production-ready release is distributed? Well, apparently not. Kinda reminds us of an old Huntsville comment about the Apollo moon missions. Would you want to fly to the moon in a spacecraft built by the lowest bidder? For Huntsville’s Digium Corporation, the question might be phrased a little differently. Why would any organization want to stake its livelihood on an untested Asterisk PBX?
Does free really matter if your phones don’t work?1
As one of Asterisk’s primary cheerleaders for many, many years, this latest revelation that there is an almost complete lack of testing before production versions of Asterisk are released is disappointing to us not to mention incredibly short-sighted on Digium’s part. Since Digium appears unwilling to actually use their own product internally, we’d like to propose a dog food alternative.
First, instead of more leather chairs for the new Digium headquarters2, how about a 200 square foot test lab in the attic with a few $250 Atom-based PCs and a couple of under $1,000 Dell servers running Proxmox and VMware virtual machines with a couple dozen flavors of Asterisk. Then add a dozen SIP phones from the leading VoIP providers as well as a few of the leading ATAs. $5,000 would easily cover the total cost of the lab. How do we know? Well, the PBX in a Flash Dev Team (with no VC funding) has had a similar setup in two locations for years. We even do testing for outside organizations from time to time. 🙂
Make Lemonade Out of Lemons. Better yet, if we were king, the testing facility would be moved front and center to the first floor behind a glass showcase so that every visitor could see that Digium was just as serious about testing its products as it was about its revenue-generating training room and its foosball table. Click on Tom Keating’s photo of the Digium facility for the corporate tour. Testing is a matter of corporate pride in most organizations, not something to be ashamed of… unless you don’t happen to do much of it. Indeed, the comments we’ve received from Paul Belanger suggest that at least some of the Digium folks have their hearts in the right place about all of this. And, just because some Asterisk developers are not on the corporate payroll, the buck clearly stops with Digium, The Asterisk Company, to make certain that the Asterisk product is rock-solid reliable before it goes out the door.
Second, build a checklist of functions that must pass muster before any new Asterisk version is released. Ever heard of a Digium card that didn’t work with a new Asterisk release? Didn’t think so. We’re guessing this is something more than coincidence. The overall software reliability of Asterisk affects Digium’s bottom line just like hardware reliability even if the software product is touted as being free. Digium profits from Asterisk hardware sales, Asterisk consulting, Asterisk training, Asterisk conventions, Asterisk support, and numerous Asterisk software add-ons that cost money. If the reliability of Asterisk goes down the tubes, so goes the commercial side of Digium’s business as well.
Third, don’t depend solely upon software-driven tests in checking out new releases. Nothing beats a human at the controls for a day to give new software a proper workout. Make calls from every phone to every other phone on the same and on a different network to verify call quality and reliability. Then do the same thing using POTS phones connected to ATAs. When all of that works, move on to a short list of major Asterisk features to make sure they remain stable. Sounds simple, doesn’t it? It is. We do it regularly with no profit motive at all. Here’s our short list of two dozen deal-breakers, and our readers can probably suggest a couple dozen more. We’ll add them to the list as they arrive. If you don’t want to design a system for testing, then feel free to use The Incredible PBX with our compliments. All of these turnkey features are available out of the chute, and you can install it from a thumb drive on almost any hardware.
Text-to-Speech Apps
Conferencing
Music on Hold
Call Transfers
Call Forwarding
Call Waiting
Call Pickup
Call Recording
Call Parking
Do Not Disturb
Voicemail
Caller ID
IVR Samples
Faxing
Video Calls
Queues
Ring Groups
Zap Barge
Intercom
AGI Scripts
Google Talk/Jabber/Jingle
SIP Server Connectivity
IAX Server Connectivity
VPN Server Connectivity
Here’s hoping that we all get something positive back from Digium management this time around. Hopefully, they’ll realize before it’s too late that their future really does depend upon a reliable Asterisk product. And, no, we’re not going to print any response suggesting that users turn back to Asterisk 1.4 and 1.6.2 when Digium and the Asterisk developers are on record as being unwilling to address a bug such as the one that occurred in Asterisk 1.8.4 if instead it had arisen in either of the older versions of Asterisk that are barely on life support.
Every organization has defining moments. This is an important one for Digium. Take responsibility for the quality of your product! And, rather than focusing upon whether to call the next version of Asterisk 1.10 or 2.0, spend the necessary time and money to get the Asterisk 1.8 house in order. Otherwise, the VC-funded office building may belong to another fish in the growing sea of VoIP providers one day soon. It’s worth remembering that Digital Research of CP/M fame3 as well as WordStar, Ashton-Tate, Lotus, and WordPerfect all were household names and seemingly invincible software development houses once upon a time. History has a way of repeating itself. Wonder why?
Continue reading Part I, Part III, and Part IV…
Originally published: Wednesday, June 1, 2011
Changes in PBX in a Flash Distribution. In light of the events outlined in our recent Nerd Vittles article and the issues with Asterisk 1.8.4, the PIAF Dev Team has made some changes in our distribution methodology. As many of you know, PBX in a Flash is the only distribution that compiles Asterisk from source code during the install. This has provided us enormous flexibility to distribute new releases with the latest Asterisk code. Unfortunately, Asterisk 1.8 is still a work in progress to put it charitably. We also feel some responsibility to insulate our users from show-stopping Asterisk releases. Going forward, the plan is to reserve the PIAF-Purple default install for the most stable version of Asterisk 1.8. As of June 1, Asterisk 1.8.4.1 is the new PIAF-Purple default install. Other versions of Asterisk 1.8 (newer and older) will be available through a new configuration utility which now is incorporated into the PIAF 1.7.5.6.2 ISO.
Here’s how it works. Begin the install of a new PIAF system in the usual way by booting from your USB flash drive and pressing Enter to load the most current version of CentOS 5.6. When the CentOS install finishes, your system will reboot. Accept the license agreement, and choose the PIAF-Purple option to load the latest stable version of Asterisk 1.8. Or exit to the Linux CLI if you want a different version. Log into CentOS as root. Then issue a command like this: piafdl -p beta_1842 (loads Asterisk 1.8.4.2), piafdl -p beta_1841 (loads Asterisk 1.8.4.1), piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 1.8.3.3), or piafdl -p 1832 (loads Asterisk 1.8.3.2). If there should ever be an outage on one of the PBX in a Flash mirrors, you can optionally choose a different mirror for the payload download by adding piafdl -c for the .com site, piafdl -d for the .org site, or piafdl -e for the .net site. Then add the payload switch, e.g. piafdl -c -p beta_1842.
Bottom Line: If you use the piafdl utility to choose a particular version of Asterisk 1.8, you are making a conscious decision to accept the consequences of your particular choice. We would have preferred implementation of a testing methodology at Digium before distribution of new Asterisk releases; however, that doesn’t appear to be in the cards. So, as new Asterisk 1.8 releases hit the street, they will be made available through the piafdl utility until such time as our PIAF Pioneers independently establish their reliability.
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…
- There’s been a lively debate about all of this in the Comments to the original article and on the PIAF Forum and the FreePBX Forum, three eyeopeners you won’t want to miss. [↩]
- Digium HQ photo courtesy of Tom Keating. Click on the photo for a tour. [↩]
- Gary Kildall flew his own airplane, too. He reportedly was off on a flying adventure while Bill Gates was meeting with IBM to seal the DOS deal. The rest, as they say, is history. [↩]
Skype + Asterisk (still) = Beautiful Music + Free Phone Calls
It's been a disappointing week for Asterisk® with Digium®'s announcement1 that Skype® for Asterisk will no longer be available for sale after July 26, 2011. While many suspected that Microsoft might have been behind the development, it turns out according to Skype2 that this had been in the works for several months so that the company could better focus its attention on Skype for SIP. The problem with that argument, of course, is that at least for now you can't make outbound calls to Skype users with Skype for SIP unless the Skype users happen to be paying for a Skype to Go DID. So where do we go from here?
Well, the good news is that Asterisk 1.8.4.1 now appears to qualify as a stable release with fixes to several nasty bugs which caused some Cisco and Polycom phones to no longer connect. And Skype still produces a client for Linux. And Greg Dorfuss still produces SipToSis, an amazing product that lets Asterisk systems communicate with Skype... in both directions.
The problem has been that the most current release of Skype for Linux required GLIBCXX_3.4.9 which is not part of the CentOS 5.x distribution even though it is available in current releases of Fedora. What you never, ever want to do is mix and match components from one Linux distribution in another. They don't call it Dependency Hell without reason. But, as luck would have it, there's always a guru somewhere that's smart enough to get all the pieces working together.
For those using Incredible PBX, today's your lucky day. We've written a little script that takes all the components outlined above and makes them play nice at least on most Atom-based computers. You still need a sound card that's compatible with CentOS 5.6, but once you're past that hurdle, it's smooth sailing to integrate Skype into your existing system. We'll leave it to you to sort out the licensing issues which do not appear to be problematic if your system is solely for personal use. After all, Skype still produces a Linux client for use on Linux systems, and that's what Incredible PBX happens to run on.
If you use the recommended hardware, today's setup procedure takes less than 10 minutes! Once it's complete, inbound and outbound Skype calling is totally transparent on your Incredible PBX. To reach a Skype number, just dial * plus the user's Skype name from any phone with an alphanumeric keypad. To place a Skype Out call (fees apply), dial 8 plus the user's area code and number. When your 500 million friends on Skype contact you using your Skype name, all of your Incredible PBX phones will ring just like any other inbound call. What's the difference in today's solution and Skype for Asterisk? For openers, today's solution is $66 cheaper. It's free! And, if you're an individual, you won't need Skype's commercial Business Control Panel to make calls. Functionally, the results with your Incredible PBX Skype implementation are identical.3
To make the Skype Magic work, you'll need three pieces of software in addition to The Incredible PBX obviously: Sun's 6u12 Java SE Development Kit, Skype's Static Edition for Linux plus an existing Skype account, and Greg Dorfuss' SipToSis product which manages the Skype Gateway to Asterisk.
As far as hardware is concerned, we're assuming you're using our recommended Acer Aspire Revo to host your Incredible PBX although most Atom-based PCs should work just fine. We don't recommend EEE PCs. With other hardware, your mileage may vary because CentOS 5.6 may or may not support your audio card and graphics mode with your video card. Both are required to get Skype working properly under X-Windows. If you have problems with some other type of hardware, take a look at the tips in our previous article on Setting Up a Skype Gateway to Asterisk as well as the comments.
Installing JDK. Using your favorite browser, go to Sun's 6u12 Java SE Development Kit website, choose Linux for the platform, and agree to the license. Click Continue. Download jdk-6u12-linux-i586-rpm.bin and copy it to the /root directory of your Incredible PBX. Next, make the file executable (chmod +x jdk-6u12-linux-i586-rpm.bin). Then run it: ./jdk-6u12-linux-i586-rpm.bin. Scroll down the wordy license agreement AGAIN and type yes. Java 1.6 then will be installed on your system. Check to be sure Java was properly installed with this command: rpm -q jdk.
Installing Skype and SipToSis. Now we're ready to load the remaining components. While still logged into your Incredible PBX as root, download and run the skype-setup script. NOTE: We recommend you make a good backup of your system before you begin!
cd /root
wget http://incrediblepbx.com/skype/skype-setup
chmod +x skype-setup
./skype-setup
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 Incredible PBX since we have to run Skype in graphics mode. This may look 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.
WARNING: Be sure that you use a dedicated Skype account on this server! Do not run the same Skype account on any other server or desktop, or it fails!
1. Start up X-Windows: xinit4
2. Start up Skype. While still logged into your server as root, issue the following commands:
skype.sh
Now you need to log in to Skype with your Skype name and password. In this latest version of Skype, we've noticed a quirk. Enter your password before you enter your username, or the system may not accept your username. If the screen appears frozen, press Ctrl-C and try it again. Be sure to set Skype to autologin whenever it is started. Then, in the Skype configuration option, set Skype to always run minimized. Save your settings.
Place a Skype Test Call5 to echo123 to be sure your audio settings are set correctly. Again, with the Aspire Revo, this won't be a problem assuming you have plugged in a microphone and speakers. These can be disconnected after you're sure things are working properly. HINT #2: Intel Atom-based motherboards are a piece o' cake!
Once you've got Skype working and all of the Skype settings configured above, shut down Skype.
3. Restart Skype in Background Mode: skype.sh &
Be sure to write down the PID for Skype in case you need to kill the job if something goes wrong. 🙂 If you forget the PID, you can obtain it with this command: pgrep skype. You can kill Skype with the following command using your actual PID instead of 12345: kill 12345.
4. Start up SipToSis: Press Enter if the command prompt doesn't reappear. Then...
cd /siptosis
./SipToSis_linux
A message from Skype will pop up asking if you want to authorize external use of Skype: yes. Important: Be sure to also select the Checkbox to save this setting for future connections!
5. Testing Skype. Go to a softphone (X-Lite recommended!) connected to an extension on your Incredible PBX and dial *echo123. You should be connected to the Skype Call Testing Service. Try *nerdvittles for the Nerd Vittles Demo.
Assuming you have a little money in your Skype Out account, 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.
Reboot your server when you're sure everything is working properly.
GUI Tips. Here are a few navigation tips for managing your Asterisk console on your Incredible PBX:
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 decipher your SipToSis PID: pgrep -f SipToSis. To kill SipToSis: kill pid# (that you wrote down). To kill Skype: kill pid# (that you wrote down). To restart Skype: skype.sh & 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 everything is working reliably, reboot your server again, log in as root, and issue the command: /root/skype-start. Place a test call again using a softphone on your Incredible PBX. If everything works fine, you now can add the skype-start command to your server's startup script, and you're all set.
echo "/root/skype-start" >> /etc/rc.d/rc.local
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. Do NOT expose UDP port 5070 to the Internet by opening a port on your hardware firewall. You do not need UDP 5070 exposed to the Internet to implement today's gateway solution for inbound or outbound Skype calling from your server!
Enjoy!
Originally published: Thursday, May 26, 2011
Changes in PBX in a Flash Distribution. In light of the events outlined in our recent Nerd Vittles article and the issues with Asterisk 1.8.4, the PIAF Dev Team has made some changes in our distribution methodology. As many of you know, PBX in a Flash is the only distribution that compiles Asterisk from source code during the install. This has provided us enormous flexibility to distribute new releases with the latest Asterisk code. Unfortunately, Asterisk 1.8 is still a work in progress to put it charitably. We also feel some responsibility to insulate our users from show-stopping Asterisk releases. Going forward, the plan is to reserve the PIAF-Purple default install for the most stable version of Asterisk 1.8. As of June 1, Asterisk 1.8.4.1 is the new PIAF-Purple default install. Other versions of Asterisk 1.8 (newer and older) will be available through a new configuration utility which now is incorporated into the PIAF 1.7.5.6.2 ISO.
Here's how it works. Begin the install of a new PIAF system in the usual way by booting from your USB flash drive and pressing Enter to load the most current version of CentOS 5.6. When the CentOS install finishes, your system will reboot. Accept the license agreement, and choose the PIAF-Purple option to load the latest stable version of Asterisk 1.8. Or exit to the Linux CLI if you want a different version. Log into CentOS as root. Then issue a command like this: piafdl -p beta_1841 (loads Asterisk 1.8.4.1), piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 1.8.3.3), or piafdl -p 1832 (loads Asterisk 1.8.3.2). If there should ever be an outage on one of the PBX in a Flash mirrors, you can optionally choose a different mirror for the payload download by adding piafdl -c for the .com site, piafdl -d for the .org site, or piafdl -e for the .net site. Then add the payload switch, e.g. piafdl -c -p beta_1841.
Bottom Line: If you use the piafdl utility to choose a particular version of Asterisk 1.8, you are making a conscious decision to accept the consequences of your particular choice. We would have preferred implementation of a testing methodology at Digium before distribution of new Asterisk releases; however, that doesn't appear to be in the cards. So, as new Asterisk 1.8 releases hit the street, they will be made available through the piafdl utility until such time as our PIAF Pioneers independently establish their reliability.
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...
- "Skype for Asterisk will not be available for sale or activation after July 26, 2011. Skype for Asterisk was developed by Digium in cooperation with Skype. It includes proprietary software from Skype that allows Asterisk to join the Skype network as a native client. Skype has decided not to renew the agreement that permits us to package this proprietary software. Therefore Skype for Asterisk sales and activations will cease on July 26, 2011. This change should not affect any existing users of Skype for Asterisk. Representatives of Skype have assured us that they will continue to support and maintain the Skype for Asterisk software for a period of two years thereafter, as specified in the agreement with Digium. We expect that users of Skype for Asterisk will be able to continue using their Asterisk systems on the Skype network until at least July 26, 2013. Skype may extend this at their discretion. Skype for Asterisk remains for sale and activation until July 26, 2011. Please complete any purchases and activations before that date. Thank you for your business." [↩]
- Skype is a trademark of Skype, Inc. "Skype made the decision to retire Skype for Asterisk several months ago, as we have prioritized our focus around implementing the IETF SIP standard in our Skype Connect solution. SIP enjoys the broadest support of any of the available signaling alternatives by business communications equipment vendors, including Digium. By supporting SIP in favor of alternatives, we maximize our resources and continue to reinforce our commitment to delivering Skype on key platforms where we can meet the broadest customer demand." [↩]
- Skype and this suggested implementation are intended for individual use. Your use is, of course, governed by the Skype Terms of Service. [↩]
- Starting xinit won't be a problem on the Aspire Revo. But, 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
EndSectionSection "Device"
Identifier "Card0"
Driver "vesa"
EndSectionSection "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[↩]
- If the 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! [↩]
Incredible PBX: Adding Google Calendars with Asterisk 1.8
One of the exciting new features in Asterisk 1.8 is external calendar integration including iCal, caldav, Microsoft Exchange, and ews. Hats off to Terry Wilson at Digium® for his great work on the calendaring API. Unfortunately, there hasn’t been much written about integrating the calendars into FreePBX®-based Asterisk® systems… until now. Because we’re all about free, our focus today will be Google Calendar integration, but we’ll provide you some links to get any of the other calendar types integrated into PBX in a Flash and Incredible PBX if that’s what floats your boat. In addition to being free, Google Calendar is one of the best calendaring apps on the planet. Its beauty lies in the incredible flexibility it provides for group scheduling and the sharing and transparent integration of dozens of calendars (both public and private) not to mention real-time updating with your favorite Android smartphones. Apple does much the same thing with iCal on the Mac and iPhone… for an annual fee.
The rainbow of colors you see in the left column of the screenshot above each represent a different calendar. All of the calendar entries from all of these calendars are integrated into the single calendar display on the right with a simple color scheme to identify where each calendar entry originated. As mentioned, these calendars can not only be from your friends and business associates, they also can be publicly available, read-only calendars for subject matter such as holidays, schedules of your favorite sports teams and rock bands, school calendars, etc. Take a look at iCalWorld to get a quick handle on what’s available. See also this Google resource.
The one bit of advice we would provide in setting up Google Calendar is don’t put all your eggs in one basket. Create separate calendars for different individuals and for different types of events. And don’t mix business with personal. Also keep internal business events separate from those that you might want to share with customers. Down the road, this facilitates sharing just the information of importance to different groups of friends and business associates. Bottom Line: Spend a little time thinking about organization of your calendars. It will pay off handsomely down the road.
Once you integrate Google Calendar into Incredible PBX, you can use it to alert you to upcoming appointments, to schedule and activate conference calls, and even to log the date, time, length, and recipient of all your outbound and/or incoming phone calls.
For today, we’ll get the software installed and functioning. And we’ll help you set up a simple reminder system based upon appointment entries in your Google Calendar. We’ll also give you some good reference materials so that you can experiment a bit on your own. In coming weeks, we’ll build a time slips system to keep track of all your phone calls.
Prerequisites. As mentioned, you’ll need a Gmail account as well as Asterisk 1.8 and PIAF-Purple with Incredible PBX 1.8 to follow along in today’s tutorial. All of the pieces are optional except for Asterisk 1.8 and a fairly current version of FreePBX, but we’ll leave that exercise for the pioneers. The script is licensed as GPL code so knock yourself out.
The Gotchas. Nothing is ever easy, is it? There always are a few surprises to worry about. Here’s the current short list for Asterisk Calendaring. When you schedule a meeting or appointment with Google Calendar, there is an option to set an alert to remind you of the meeting at any time you like on a per appointment basis. So, if you have a meeting 50 miles from home, you could set the alert for 90 minutes in advance while a meeting next door could be set with a 5 minute alert. All of that works fine in Google Calendar. Unfortunately, in Asterisk 1.8.4, there’s a math bug that subtracts the hour differential between your time zone and Greenwich Mean Time (GMT) from these alert times. If you happen to live in the GMT time zone, there’s no bug. However, those living on the East Coast of the U.S. will find their reminder calls arriving four hours too early. If you set an alert for 60 minutes before a scheduled meeting, Asterisk will call you 5 hours in advance. For our West Coast friends, it’s an 8 hour bug. Fortunately, the Asterisk Calendaring config file provides an option to override these alerts with a reminder call at a fixed number of minutes before each appointment. While it lacks the individual appointment flexibility to schedule alerts of different durations, it does work. So, for the time being, we’ll be using that.
Asterisk Calendar alerts also were supposed to be triggered only for events in which your Status has been set to Busy. A typical example would be a medical appointment. Instead, the alerts are generated for all calendar entries. So, if you’ve got 12 children and you’ve set all-day calendar entries to remind you of their birthdays each year, be forewarned that using your default Google Calendar will trigger a friendly reminder call at 11:50 p.m. on the night before each of your kids’ birthdays. Unless you and your spouse are both Night Owls, this might lead to some "WAF issues" if you get our drift. The workaround that we’ll implement today is to create a secondary appointments calendar and reserve it just to schedule meetings and appointments for which you wish to receive reminder calls at 10 minutes before each event. You can change the notification time to any fixed number of minutes desired. As we mentioned, one nice feature of Google Calendar is that entries on secondary calendars will automatically display on your main calendar. Just be sure to schedule the appointments on the correct calendar (we’ll show you how) if you want a reminder call.
Setting Up a Google Appointments Calendar. Before we get Asterisk configured for calendaring, let’s first set up your secondary Google appointments calendar. Log into the Gmail account that you either already use or will begin using for scheduling Calendar entries. Just click on the Calendar tab at the top of the screen and set up your default calendar if it doesn’t already exist. Once it’s set up, there will be a calendar list in the left margin under My Calendars. Just below your existing Calendar(s), there will be a Tasks entry, and below that will be an Add link to add a new calendar. Click on Add and fill in the main pieces of information as shown below. Use appointments for the name of the calendar and make sure you set the correct Time Zone for your hometown. Then save your entries by clicking the Create Calendar button.
Once you have created your new appointments calendar, we need one other piece of information to use it with Asterisk. Under My Calendars in the left margin, click on the down arrow beside appointments and choose Calendar Settings. That will bring up a form that looks like this:
The next to the last section of the form is entitled Calendar Address. You’ll see an entry to the right of the section title called Calender ID with a long alphanumeric string followed by @group.calendar.google.com. Write down the Calendar ID or copy it to clipboard. Don’t include @group.calendar.google.com! You can ignore the statement that the link is inoperative unless you make your calendar public. It actually works just fine with your Google credentials which we’ll configure as part of the Asterisk setup below.
Configuring Asterisk for Google Calendar Integration. PBX in a Flash and Incredible PBX come with most of the components you’ll need to get calendaring to work. However, there are a few missing pieces at the moment. These will require that Asterisk be recompiled, and we’ve built a little script to do all of it for you. Just log into your server as root and issue the following commands:
cd /root
wget http://incrediblepbx.com/setup-cal.sh
chmod +x setup-cal.sh
./setup-cal.sh
After you enter your Google credentials and Calendar ID, the script will temporarily shut down Asterisk, download the missing components for calendaring, recompile Asterisk, and customize the calendar setup with your Google credentials. Then the script will complete the setup and restart Asterisk. The whole process takes about 5 to 10 minutes.
Asterisk Calendar Configuration. Here are the pieces in the default Google Calendar config file that will be replaced with your personal settings:
[GoogleCalendar]
type = caldav
;url = https://www.google.com/calendar/dav/username@gmail.com/events/
url = https://www.google.com/calendar/dav/CalendarID@group.calendar.google.com/events/
user = username@gmail.com
secret = userpassword
refresh = 10
timeframe = 120
;
autoreminder = 10
;
channel = local/8005551212@from-internal
context = from-internal
extension = 225
waittime = 45
If you should ever need to make changes to these settings again, you’ll find the entries with your Google credentials at the end of the calendar.conf config file in /etc/asterisk. Remember to restart Asterisk after making any changes. The commented out URL entry is the one you’d use to access your main Google Calendar instead of the secondary appointments calendar we created above. If the GMT bug is ever fixed, this would be a step forward.
Extension 225 (C-A-L) is the extension that will be called to actually play back the reminder information. You’ll find this block of code at the top of extensions_custom.conf in the [from-internal-custom] context. You can make any adjustments you’d like. We simply set this up to give you a template to follow. As configured, the reminder will read you a summary, the starting time, location, and any description associated with each calendar entry. If you have a Cepstral voice in addition to Flite, just change the Flite entries to Swift. Then restart Asterisk: amportal restart.
Asterisk Calendar Test Drive. Asterisk keeps track of your scheduled events by checking your Google Calendar every 10 minutes. We recommend configuring reminders for calls 10 minutes before any scheduled event in the appointments calendar. What this means is you probably should never schedule an event expecting to get a reminder call if the event is less than about a half hour in the future. If you use a setting for the autoreminder time other than 10 minutes, this will obviously be different for you.
So let’s schedule an appointment for an hour from the current time. Click on the Calendar tab in Gmail. And then click on the down arrow beside the appointments calendar in the left column. Choose Create Event on this Calendar. You’ll get a form that looks like this. Click Save to store your new Calendar entry. Then go have a beer and wait for your call.
Where To Go From Here. We’ve just scratched the surface of what you can do with Asterisk 1.8 using Google Calendars. We recommend you now review the chapter in the new Asterisk Definitive Guide book that covers calendaring in some detail. It will give you a good handle on what’s possible. For a more technical discussion, take a look at this contribution from one of the PIAF Forum regulars. Amazing stuff! There’s also a good article in VoIP Today that’s worth a careful read. Be aware that, if you recompile Asterisk to add support for Microsoft Exchange, you probably will break the Google Calendar connection that we’ve outlined today. At least, we never have been able to get the two to coexist. If you have better luck, please post your results. The reason for the problem is that the Exchange connector depends upon neon-0.29 which is not yet part of CentOS 5.x. We’ll keep you posted on our progress. Enjoy!
Originally published: Monday, May 23, 2011
Changes in PBX in a Flash Distribution. In light of the events outlined in our recent Nerd Vittles article and the issues with Asterisk 1.8.4, the PIAF Dev Team has made some changes in our distribution methodology. As many of you know, PBX in a Flash is the only distribution that compiles Asterisk from source code during the install. This has provided us enormous flexibility to distribute new releases with the latest Asterisk code. Unfortunately, Asterisk 1.8 is still a work in progress to put it charitably. We also feel some responsibility to insulate our users from show-stopping Asterisk releases. Going forward, the plan is to reserve the PIAF-Purple default install for the most stable version of Asterisk 1.8. As of June 1, Asterisk 1.8.4.1 is the new PIAF-Purple default install. Other versions of Asterisk 1.8 (newer and older) will be available through a new configuration utility which now is incorporated into the PIAF 1.7.5.6.2 ISO.
Here’s how it works. Begin the install of a new PIAF system in the usual way by booting from your USB flash drive and pressing Enter to load the most current version of CentOS 5.6. When the CentOS install finishes, your system will reboot. Accept the license agreement, and choose the PIAF-Purple option to load the latest stable version of Asterisk 1.8. Or exit to the Linux CLI if you want a different version. Log into CentOS as root. Then issue a command like this: piafdl -p beta_1841 (loads Asterisk 1.8.4.1), piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 1.8.3.3), or piafdl -p 1832 (loads Asterisk 1.8.3.2). If there should ever be an outage on one of the PBX in a Flash mirrors, you can optionally choose a different mirror for the payload download by adding piafdl -c for the .com site, piafdl -d for the .org site, or piafdl -e for the .net site. Then add the payload switch, e.g. piafdl -c -p beta_1841.
Bottom Line: If you use the piafdl utility to choose a particular version of Asterisk 1.8, you are making a conscious decision to accept the consequences of your particular choice. We would have preferred implementation of a testing methodology at Digium before distribution of new Asterisk releases; however, that doesn’t appear to be in the cards. So, as new Asterisk 1.8 releases hit the street, they will be made available through the piafdl utility until such time as our PIAF Pioneers independently establish their reliability.
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…
Dear Digium: It’s Time to Start Eating Your Own Dog Food
Many years ago when Eric Schmidt headed up Novell, the company prided itself on being an organization that ate its own dog food before releasing code to the public. Microsoft has done much the same thing with new releases of Windows. And it’s not a surprise that the dogfood principle carried over to Google as well. The end result is that not only are products less buggy, but many of the day-to-day implementation issues already have been resolved long before the public ever touches a shipping product. Microsoft expanded on this by offering beta releases of code to thousands of "pioneers" that understood the risks of using untested software that still was under development. That brings us to Digium® and Asterisk® 1.8 which is quickly devolving into a perpetual beta release.
While we’ve never been invited to Digium’s headquarters for reasons that should be obvious when you read articles like this, the scuttlebutt always has been that Digium uses a commercial PBX internally to support its telecommunications needs. Indeed, most of the commercial resellers of Asterisk products market a far different flavor of Asterisk with dozens if not hundreds of patches that are not available to the general public. And one of the distinguishing features of PBX in a Flash always has been its update-fixes utility which incorporates dozens and dozens of patches into every version of Asterisk that is installed by end-users and developers alike. Some of this needs refinement if Asterisk 1.8 is going to have a chance of adoption in the commercial marketplace.
The root of the problem in the Asterisk world is that we now find ourselves with one and only one supported version of Asterisk: Asterisk 1.8. And it happens to be a version that few people actually use to run their businesses. The reason for this dilemma is that, other than security fixes, Digium now has dropped support for both Asterisk 1.4 and 1.6, the two products that most folks regard as the "stable releases" and deploy in production systems. So we’re left with a supported version of Asterisk that no one actually is using or selling for a production environment. Indeed, Digium, The Asterisk Company markets a commercial product based upon a completely different version of Asterisk!
The bottom line is, if Digium isn’t willing to stake its business on Asterisk 1.8, why should anyone else take the plunge? After all, who knows Asterisk better than The Asterisk Company? Suffice it to say Asterisk 1.8 is not getting the necessary testing that a product with an installed base in the millions deserves and, indeed, requires in order to flourish.
This ultimately leads to embarrassing situations such as the release of Asterisk 1.8.4 last week followed by the almost immediate discovery (worldwide) that Cisco phones no longer could connect to Asterisk servers. The response to complaints was that the necessary code wasn’t in the source tree. No kidding! As it has turned out, there wasn’t an available patch that worked either.
For a whole host of reasons, this should never have happened. If Digium and some of the lead developers used Asterisk 1.8 to run their businesses, we’re pretty sure we wouldn’t be writing this column. There are some other considerations that should be equally obvious. First, any regression testing methodology worth its salt should have caught this since Cisco phones registered properly with Asterisk 1.8.3.3 and prior versions. Second, major mistakes like this give a black eye to a promising product that for the most part has been incredibly stable since its initial release. Third, shipping a version like 1.8.4 instantly reduces the pool of users willing to try new releases because of the very real perception that with each new release comes a risk that Digium and the Asterisk developers have chosen to reinvent the wheel without telling anybody.
PBX in a Flash has become the de facto aggregation platform for those wanting to deploy a turnkey version of Asterisk 1.8 because it includes the very latest versions of CentOS 5.6, Asterisk 1.8, and FreePBX 2.8 plus all of the other necessary components to get up and running quickly. But, as we discovered the hard way last week, this also means that the latest, greatest release can also bring a whole host of problems just as quickly. So here’s what we’ve done to mitigate the damage. Later today we will introduce new PBX in a Flash 1.7.5.6.2 ISOs in 32-bit and 64-bit flavors that include a utility to select prior versions of Asterisk 1.8 to deploy rather than just the current release. Check back here or join us on Twitter for the actual release announcement. Of course, you still can choose from two versions of Asterisk 1.4 as well as the latest version of Asterisk 1.6.2 as well.
The 32-bit and 64-bit releases of PBX in a Flash 1.7.5.6.2 are now available on SourceForge and our other download mirrors.
By way of example, let’s assume you want to install Asterisk 1.8, but you also have an office full of Cisco phones so you’d prefer that your employees still have the ability to make and receive phone calls. Thus, you’d like to install Asterisk 1.8.3.3 instead of Asterisk 1.8.4. So here’s how to do it using PBX in a Flash 1.7.5.6.2. First, burn the ISO to a CD and begin the install on a dedicated server by booting from the ISO and pressing the Enter key. After choosing your keyboard, time zone, and root password, the installer will build you a base CentOS 5.6 system. When the system reboots, remove the CD. This will bring up the menu which ordinarily lets you choose the flavor of Asterisk you would like to install. Instead of choosing Gold, Silver, Bronze, or Purple, choose the last option which lets you drop down to the Linux command prompt. Log into your server as root using your new root password. Now issue the following command: piafdl -p 1833. When you press the Enter key, you’ll get a new PIAF-Purple install with Asterisk 1.8.3.3 instead of 1.8.4.
If you have an earlier PBX in a Flash ISO and would like to mimic this behavior to load Asterisk 1.8.3.3, here’s how. Install the CentOS portion of PBX in a Flash in the usual way. When your server reboots after removing the CD, choose the Linux CLI option from the PIAF flavors menu. Log in as root and issue the following commands:
cd /root
wget http://pbxinaflash.com/1833.sh
chmod +x 1833.sh
./1833.sh
There’s some added flexibility in the new PIAF 1.7.5.6.2 ISO as well. In the event we experience a problem with one of our mirrors, PIAF always has had the flexibility to retry downloads from another mirror. But now you also can force an install from a specific mirror site. For example, piafdl -c -p 1883 would force an install of Asterisk 1.8.3.3 from our .com site, piafdl -d -p 1883 would force an install of Asterisk 1.8.3.3 from our .org site, and piafdl -e -p 1883 would force an install of Asterisk 1.8.3.3 from our .net site. In addition, this added flexibility will let us offer newer releases for pioneers and older releases for those that need a specific function. Keep reading for more details…
For "the rest of the story," be sure to read the Comments including Digium’s response to this article.
Continue reading Part II, Part III, and Part IV…
May 21 Update: Because of the instability issues with Asterisk 1.8.4, we have backrevved PIAF-Purple, our Asterisk 1.8 flavor, to Asterisk 1.8.3.3. Cisco phones work; however, this does not fix a problem with Polycom phones. To address that, you will need Asterisk 1.8.3.2; however, that version was not as stable with Google Voice. So you now have the Hobson’s Choice of picking your poison. The default PIAF-Purple selection will get you Asterisk 1.8.3.3. Or you can drop down to the Linux CLI, login as root and issue: piafdl -p 184 (for Asterisk 1.8.4) or piafdl -p 1832 (for Asterisk 1.8.3.2). For the time being, a "stable version" of Asterisk 1.8 unfortunately isn’t in the cards.
June 1 Update: As of today, the new default PIAF-Purple is Asterisk 1.8.4.1.
Originally published: Monday, May 16, 2011
Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.
whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.
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…
Incredible Fax: Free Faxing Returns to Incredible PBX 1.8
It’s been a rocky road getting an open source (free) faxing alternative to work reliably with Asterisk® 1.8. To further complicate things, CentOS 5.6 was finally released which brought us a few more Asterisk 1.8 headaches and updates finally leading up to an all-new and nearly perfect PBX in a Flash 1.7.5.6 thanks in large part to Tom King. The new release also forced some under-the-covers modifications in Incredible PBX. Now you’re caught up on last week’s news. But what have we done for you lately?
Well, one alternative was to shift gears to the commercial Fax for Asterisk from Digium® which is supported in FreePBX 2.8 and 2.9 and includes one free license. But we’re open source fans and, of course, nothing beats free. Thanks to the efforts of a number of folks on the PBX in a Flash forums including our old pal, Joe Roper, there is an alternative that folks have been wrestling with for over two years. The combination of Hylafax, Avantfax, and IAXmodem is a compelling open source solution if you don’t need T.38-compatible faxing.1 The drawback has been the learning curve to install all the components and get them working reliably together. Well, for those using Incredible PBX 1.8 with PIAF-Purple and Asterisk 1.8, today we have a newly minted installation script that is simple enough that even a monkey can use it. If you know your own email address and your local area code AND you can find the Enter key on your keyboard, you are fully qualified to perform today’s installation. It’ll take you under 5 minutes! We’ve also got a nice little surprise for you toward the end of this article.
Prerequisites. You’ll first need to install the latest version of PBX in a Flash with the PIAF-Purple (Asterisk 1.8) payload. Then sign up for a free Google Voice account and install Incredible PBX 1.8. You’ll find complete installation instructions for everything here. Can you just wing it and run this installation script on a garden-variety Asterisk 1.8 machine? No. And the reason is that all of these components have dependencies which are too complex to cover in a 5-minute article. You might want to have a look at the A-Fax Project which is where we started. Suffice it to say, the combination of PIAF-Purple and Incredible PBX 1.8 provides the ideal platform on which to install Incredible Fax. If you prefer to do-it-yourself, by all means have at it. We lost about 10 years worth of hair even starting with the work of a dozen very talented Linux gurus who have been wrestling with this for over two years! But, hey, YMMV! We never claimed to be the sharpest tool in the shed. 😉
Installing Incredible Fax. Once you have your Incredible PBX 1.8 platform up and running, adding Incredible Fax is a stroll in the park. Just log into your server as root and issue the following commands. If you’ve downloaded Incredible PBX in the last few days, the script may already be on your system. In this case, just type /root/incrediblefax.sh to run it.
cd /root
wget http://incrediblepbx.com/incrediblefax.sh
chmod +x incrediblefax.sh
./incrediblefax.sh
After checking to make sure Incredible PBX 1.8 is installed, the script will prompt you to enter an email address where incoming faxes should be delivered. Then all of the necessary components will be installed after which the Avantfax install script will be run. With the exception of entering your local area code when prompted to do so, the correct response to every other question is to press the Enter key if you live in the U.S. or Canada. Don’t "improve" anything if you expect the end product to work reliably. For those outside North America, you’ll need to also make the usual adjustments to account for your country and city codes.
Avantfax has its own security model, but we’ve grown to appreciate the Apache authentication model which is built into PBX in a Flash so it’s been incorporated into Incredible Fax as well. When the install completes, just reboot your server to get everything working. On the PBX in a Flash web GUI, there will be a new Admin icon for Faxing. Or you can access Avantfax with a browser by going to http://serverIPaddress/avantfax. When prompted for your username and password, use maint and whatever your maint password happens to be. These can be reset with passwd-master. Literally everything has been preconfigured in Avantfax to get you going. Here’s a 3-minute video to show you how easy it is. Just don’t forget to reboot once the install completes.
If you want to be able to print to fax from Windows-based machines, then you’ll need to make one addition. Click on the small Toolbar icon in the upper right corner of the AvantFax home screen and choose New User from the pull-down Menu. For the user, enter Fax for the Name, fax for the Username, a secure password for Password, and an email address that is DIFFERENT from the one you used to set up Incredible Fax. Check the boxes for User Can Delete Faxes and User Can Fax From Any Modem. Finally, check the boxes for all four IAXmodems. Then click the Save button to add this new user.
A Word About Reliable Faxing. Suffice it to say that analog faxing over VoIP trunks is something less than ideal. If you want reliable analog faxing, then you’ll need a PSTN line from your favorite local telephone company. It doesn’t need any fancy add-ons like CallerID which doubles the price in many cities. Then you’ll need a properly configured analog telephone adapter (ATA) with at least one FXO port to support your Ma Bell phone line. Our favorite is the OBi110 which also can double as an additional Google Voice trunk for your PBX. But an SPA3102 will work equally well. It just costs more and gives you less.
Now that we’ve covered the obligatory warnings… will Incredible Fax work with a pure VoIP connection? Absolutely. We do it all the time. Is it flawless? No. Are there certain providers that are better than others? You bet. Do some providers not support faxing at all? Correct. Based on our 5+ years wrestling with this, here’s our recommendation. First, you’ll need a DID (i.e. phone number) from one of our recommended providers to handle inbound faxes. With the latest release of Asterisk 1.8, you no longer need a DID dedicated to faxing. In other words, you can use the same DID to receive incoming voice calls as well. The good news is that pay-as-you-go DIDs are dirt cheap. Some providers such as voip.ms offer DIDs for under $1 a month with 1¢ per minute calls. VoIP.ms also has unlimited inbound calling DIDs for under $4 a month. Other providers whose trunks we have found work reliably for VoIP faxing include Vitelity (see our special sign up deal below), Axvoice, Teliax, VoIPMyWay ($45 for first year with unlimited outbound and inbound calling with a local DID), and Future-Nine2. Google Voice trunks are hit and miss. We’re batting about .250 in our testing with Google Voice lines. Bottom Line: If VoIP faxing doesn’t work after you complete the install, it’s probably the fault of your VoIP trunk, not the setup. To make absolutely sure, connect a standard fax machine to an extension using an FXS telephone adapter and send a fax to that extension from the Avantfax web interface. You’ll find it works every time!
Configuring FreePBX for Incredible Fax. Here are the steps you’ll need to complete to get analog faxing working reliably with FreePBX. First, set up an account with one of the companies we’ve mentioned above. With voip.ms, create a subaccount on their site with credentials to use with the DID you purchased to link to that subaccount.
Unless you’re using today’s release of Incredible PBX, you’ll need to activate FreePBX’s Fax Configuration Module if you want to take advantage of Asterisk 1.8’s fax detection capabilities. It didn’t work reliably in previous Asterisk 1.8 releases. This module already is either available or already installed on your server. In the FreePBX GUI using a browser, choose Tools, Module Admin and then click on Fax Configuration. A drop-down list will provide several choices. Choose either Install or Enable depending upon the version of Incredible PBX you currently are running. Then click the Process button and finally Reload the settings when prompted.
Unless you installed Incredible PBX today, you’ll need to create a SIP trunk for your new provider in FreePBX using the credentials you set up on the provider’s web site. The VoIP.ms template now is included in Incredible PBX so you can just edit the existing one to add your credentials. And, at least with VoIP.ms, you can set the outbound CallerID to anything you like (as long as it’s legal). Unless you want a knock at your door, we wouldn’t recommend using the main number at the White House. Then put all of the settings below in the Outgoing Settings PEER Details where 1234567 is your main account number, subacctname is the name of the subaccount you created, and atlanta is your closest voip.ms server location:
username=1234567_subacctname
type=friend
trustrpid=yes
sendrpid=yes
secret=subacctpassword
nat=yes
insecure=port,invite
host=atlanta.voip.ms
fromuser=1234567_subacctname
disallow=all
context=from-trunk
canreinvite=nonat
allow=ulaw
For the registration string, it should look like the following. If you’re planning to only use the trunk for outbound faxing, then you can leave off the trailing DID number.
username:password@atlanta.voip.ms:5060/10-digit-DID
In addition to setting up the Trunk for your provider, you’ll also need to create an Outbound Route for sending faxes out through this trunk AND an Inbound Route to receive incoming faxes on the DID you purchased from your provider.
For the Outbound Route, we recommend setting the Dial Pattern with a prefix not otherwise used on your Incredible PBX so that you can make fax calls easily by dialing this prefix. For example, on our sample system, we used 7 so that fax calls could be made by dialing 7 plus a 10-digit number in the U.S. and Canada. Here’s how our Outbound Route for VoIP.ms looks in FreePBX, and the latest Incredible PBX release already has it in place as shown below:
For the Inbound Route, you want to specify the DID from your provider which must match the 10-digit number you affixed to the end of the trunk registration string above. If you don’t want to share this number for voice and fax calls, then simply direct these inbound fax calls to the Fax Custom Destination. Extension (329 spells F-A-X) also can be used to process incoming faxes and route them to your email address as well as the Avantfax web GUI.
Our experience suggests that using a single trunk for both voice and fax delivery is hit and miss so you may wish to consider adding an additional trunk just to support faxing. You’ll find the templates for adding a second Google Voice trunk in the /tmp directory, and complete instructions are available on the PIAF Forums. We’ve also provided preconfigured trunk settings for both Vitelity and VoIP.ms if you’d like to try those options as well. Just plug in your credentials and configure an inbound route to map incoming faxes to the Fax Custom Destination.
AvantFax in a Nutshell. Here’s a quick summary of the main features in the AvantFax web GUI. You can access the GUI by pointing a browser to the IP address of your server + /avantfax. After you enter your maint account name and maint password, the following screen will display with your Inbox. As noted, all of these incoming faxes also will be emailed to the account you set up when you ran the Incredible Fax install script.
The icons to the right of each thumbnail fax let you View, Rotate, Download PDF, Reply to Fax, Email PDF, Add a Note, Archive the Fax, and Permanently Delete the Fax.
At the top of the screen just to the right of Inbox is the option to Send a Fax. Here you’d specify the phone number to dial. Don’t forget the 7 and then a 10-digit number. Next you can attach a document from your local disk. Finally, fill in the blanks for the Fax Cover Sheet, and then click Send. Your fax will be on its way. You can monitor the progress of the fax transmission by clicking on Outbox. It’s also a good idea to fire up an SSH session to your server and run asterisk -rvvvvvvvvvv to monitor the first few calls to be sure all is well in Incredible FaxLand.
Where to Go Next. HylaFax and AvantFax are very mature open source products with a huge international following. We apologize for focusing primarily on U.S. and Canadian users today, but anything is possible with this software. The first piece you probably will want to tackle is adding Print to Fax capability on your Windows machine. The software you’ll need can be downloaded here. You’ll find excellent documentation on the setup by visiting the PBX in a Flash Forum. One little footnote for those using Windows 7. Microsoft and Apple are back to their old tricks so there are no Apple postscript print drivers in Windows 7. We’ve had equally good results using Dell’s 3100cn PS driver. Incidentally, there’s a similar print-to-fax utility for Mac OS X, but it’ll set you back $36. Here’s the link. HylaFax also maintains a terrific resource list for those that want additional goodies for PCs, Macs and Linux systems.
Originally published: Monday, May 2, 2011
Changes in PBX in a Flash Distribution. In light of the events outlined in our recent Nerd Vittles article and the issues with Asterisk 1.8.4, the PIAF Dev Team has made some changes in our distribution methodology. As many of you know, PBX in a Flash is the only distribution that compiles Asterisk from source code during the install. This has provided us enormous flexibility to distribute new releases with the latest Asterisk code. Unfortunately, Asterisk 1.8 is still a work in progress to put it charitably. We also feel some responsibility to insulate our users from show-stopping Asterisk releases. Going forward, the plan is to reserve the PIAF-Purple default install for the most stable version of Asterisk 1.8. As of June 1, Asterisk 1.8.4.1 is the new PIAF-Purple default install. Other versions of Asterisk 1.8 (newer and older) will be available through a new configuration utility which now is incorporated into the PIAF 1.7.5.6.2 ISO.
Here’s how it works. Begin the install of a new PIAF system in the usual way by booting from your USB flash drive and pressing Enter to load the most current version of CentOS 5.6. When the CentOS install finishes, your system will reboot. Accept the license agreement, and choose the PIAF-Purple option to load the latest stable version of Asterisk 1.8. Or exit to the Linux CLI if you want a different version. Log into CentOS as root. Then issue a command like this: piafdl -p beta_1841 (loads Asterisk 1.8.4.1), piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 1.8.3.3), or piafdl -p 1832 (loads Asterisk 1.8.3.2). If there should ever be an outage on one of the PBX in a Flash mirrors, you can optionally choose a different mirror for the payload download by adding piafdl -c for the .com site, piafdl -d for the .org site, or piafdl -e for the .net site. Then add the payload switch, e.g. piafdl -c -p beta_1841.
Bottom Line: If you use the piafdl utility to choose a particular version of Asterisk 1.8, you are making a conscious decision to accept the consequences of your particular choice. We would have preferred implementation of a testing methodology at Digium before distribution of new Asterisk releases; however, that doesn’t appear to be in the cards. So, as new Asterisk 1.8 releases hit the street, they will be made available through the piafdl utility until such time as our PIAF Pioneers independently establish their reliability.
Need help with Asterisk? Visit the PBX in a Flash Forum or Wiki.
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…
- Yes, we’re aware that HylaFax theoretically supports T.38 with the right hardware. Feel free to point us to someone who has it actually working with Asterisk 1.8. 🙄 [↩]
- Vitelity, Teliax, VoIPMyWay, and Future-Nine trunks require the following additional entries in your Inbound trunk settings: t38pt_rtp=no, t38pt_tcp=no, t38pt_udptl=no [↩]
FreePBX Backdoor Passwords Pose Asterisk Security Threat
Whether it’s forgetting to change a default password or not removing an additional password that you didn’t even know existed, some new revelations this week about FreePBX security are worth a minute of your time. There’s more disappointing news. The bad guys are getting smarter and much more dangerous.
If you’re new to Asterisk®, FreePBX® is the terrific, web-based graphical user interface that turns Asterisk into a user-friendly PBX that even mere mortals can use. It is bundled as part of every Asterisk aggregation including PBX in a Flash, trixbox, Elastix, and Asterisk Now. With the exception of PBX in a Flash, you may not know it’s there, but it is.
Years ago when FreePBX was in its infancy, the developers set up a way that administrators could still get into their system even if they forgot their administrator password. Typing admin:admin as the username:password combination basically gave you the keys to the castle in the default FreePBX install. That worked great in the days before folks exposed their systems to direct Internet web access which is a really BAD IDEA by the way.
Some of the aggregations shipped with a default username and password combination of maint and password. And for visually-impaired users, an automatic installer was crafted which set a default password of passworm. While users were encouraged to change these default passwords, many unfortunately didn’t heed the advice. According to one unnamed provider that recently saw a spike in illegal calling activity, his attempt to log in to some of his customer’s systems using password as the administrator password yielded a list of 50 vulnerable systems in under an hour!
And then there was this week’s Elastix revelation that the developers had embedded an additional backdoor password in their distribution that very few knew about… except the bad guys unfortunately. According to Xorcom:
It recently came to our attention that it is possible to login to the Elastix server unembedded FreePBX Web interface (http://address/admin) with user name ‘asteriskuser’ and password ‘eLaStIx.asteriskuser.2oo7’. The user name and password are the same user name and password used by FreePBX to access the ‘asterisk’ MySQL database. They are defined in the parameters AMPDBUSER and AMPDBPASS in the /etc/amportal.conf file.
What could possibly go wrong? Well, everything! Over the past few years, what typically happened with these vulnerable systems was that the buy guys obtained an extension password and began making free calls on your nickel until you checked your FreePBX call log or received your phone bill. That was then.
Here’s the latest bad guy scenario. The intruder logs into your FreePBX GUI using the default administrator password using a very sophisticated script which extracts all of your extension numbers, all of your trunk credentials, and, of course, all of your passwords. The script then hides a BOT on your server that "phones home" whenever any change is made in your account names or passwords. Finally, rather than using your server to make calls, the bad guys now use their own servers with your provider credentials to make free calls. So the first notice you receive of the intrusion is when your credit card is maxed out because you stupidly chose credit card auto-replenishment when you set up your VoIP account with your favorite provider.
SO… how do you fix it? Well, first you need to check whether your system is vulnerable. Using a browser, attempt to log into FreePBX at http://yourIPaddress/admin and use the following username:password combinations:
admin:admin
admin:password
admin:passworm
maint:admin
maint:maint
maint:password
maint:passworm
wwwadmin:password
wwwadmin:wwwadmin
wwwadmin:admin
asteriskuser:eLaStIx.asteriskuser.2oo7
Be aware that on some systems using Fail2Ban such as PBX in a Flash, three consecutive failed logins may lock you out of your system for a lengthy period of time. On these systems, we recommend you first stop Fail2Ban: service fail2ban stop. Don’t forget to restart it after your testing: service fail2ban start.
If you gain access to your system using any of the above credentials and the web interface your server is exposed to the Internet, then you’ve got a problem. Do NOT just change your password thinking all is well. As mentioned, your new credentials are likely being transmitted to the bad guys before you can say "I’m S-C-R-E-W-E-D." Instead, you should reformat your drive, contact all of your trunk providers and change your credentials. Then reinstall a NEW system using your new credentials AND new extension passwords. DON’T FORGET TO CHANGE YOUR DEFAULT PASSWORD! On PBX in a Flash and Incredible PBX systems, it’s easy. Just log into your server as root, enter the command passwd-master, and answer the prompts. Think up a very secure password… as if your bank account depended on it. It does! Finally, read our Primer on Asterisk Security. Be safe!
Originally published: Friday, April 15, 2011
Changes in PBX in a Flash Distribution. In light of the events outlined in our recent Nerd Vittles article and the issues with Asterisk 1.8.4, the PIAF Dev Team has made some changes in our distribution methodology. As many of you know, PBX in a Flash is the only distribution that compiles Asterisk from source code during the install. This has provided us enormous flexibility to distribute new releases with the latest Asterisk code. Unfortunately, Asterisk 1.8 is still a work in progress to put it charitably. We also feel some responsibility to insulate our users from show-stopping Asterisk releases. Going forward, the plan is to reserve the PIAF-Purple default install for the most stable version of Asterisk 1.8. Currently, we think that dubious title belongs to Asterisk 1.8.3.3 even though it has its own share of surprises. Other versions of Asterisk 1.8 (newer and older) will be available through a new configuration utility which now is incorporated into the PIAF 1.7.5.6.2 ISO.
Here’s how it works. Begin the install of a new PIAF system in the usual way by booting from the CD and pressing Enter to load the most current version of CentOS 5.6. When the CentOS install finishes, your system will reboot. Remove the CD, accept the license agreement, and choose the PIAF-Purple option to load the default version of Asterisk 1.8. Or exit to the Linux CLI if you want a different version. Log into CentOS as root with your root password. Then issue a command like this: piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 1.8.3.3), or piafdl -p 1832 (loads Asterisk 1.8.3.2). If there should ever be an outage on one of the PBX in a Flash mirrors, you can optionally choose a different mirror for the payload download by adding piafdl -c for the .com site, piafdl -d for the .org site, or piafdl -e for the .net site. Then add the payload switch of your choice, e.g. piafdl -c -p 184.
Bottom Line: If you use the piafdl utility to choose a particular version of Asterisk 1.8, you are making a conscious decision to accept the consequences of your particular choice. We would have preferred implementation of a testing methodology at Digium® before distribution of new Asterisk releases; however, that doesn’t appear to be in the cards. So, as new Asterisk 1.8 releases hit the street, they will be made available through the piafdl utility until such time as our PIAF Pioneers independently establish their reliability.
Need help with Asterisk? Visit the PBX in a Flash Forum or Wiki.
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…
Home Run: Asterisk Baseball Scores & Schedules with Gtalk
Last week we introduced the new Worldwide Weather Station for Asterisk® 1.8 using Google's new Google Talk Guru. And, as promised, today we bring you the first of several new Asterisk applications to retrieve sports scores and schedules from the convenience of your telephone. With Google Talk Guru, you can retrieve the latest Atlanta Braves info by issuing this Chat command: score braves. What you'll receive in reply using Google Chat within Gmail would look something like this:
Baseball:
Atlanta Braves 2 - Milwaukee Brewers 1
Next game: @ Milwaukee Brewers, 6 Apr 3:10am
mlb.mlb.com
With today's installation, you'll also be able to dial M-L-B (652) from any Asterisk extension and retrieve the latest score and next game schedule for any one of 10 Major League Baseball teams by pressing a single button. For example, to retrieve the latest Atlanta Braves score and next game schedule, press 2. To try out our demo, just dial 425-406-4532 from any phone in the U.S. Here's the entire list which you can modify to meet your own requirements:
0 - Yankees
1 - Mets
2 - Braves
3 - Reds
4 - Marlins
5 - Orioles
6 - Pirates
7 - Royals
8 - Dodgers
9 - White Sox
As was true with weather forecasts, retrieval of baseball scores and schedules using Google Talk Guru takes less than a second for almost any team. And, in addition to playing these scores and schedules over the phone using Asterisk 1.8, we've added the ability to also forward the results to your favorite email address. If you're already familiar with last week's installation procedure, then drop down to the Quick Installation topic. The whole drill should take you no more than a couple minutes. If you're new to all of this, keep reading.
How It Works. Here's a quick summary of how all this works. With the Google Talk Guru, you can send a query as a text message to guru@googlelabs.com. You then get a reply message in Google Talk with the answer to your query. What we've done is add this querying functionality to your Asterisk dialplan with some preassigned baseball teams to obtain the latest sports scores and schedules. Once the response arrives, we've added a PHP application that puts the text (as shown above) into something that's a little more TTS friendly for Flite and Cepstral. If you're curious about how to do all of this, take a look at the dialplan and PHP code in the links below. It's not hard, but it is tedious. One little typo and nothing works. Ask us how we know. 😉
Prerequisites. If you're new to all of this, here's a quick list of what you'll need. First, you'll need a PBX in a Flash server running the very latest Asterisk 1.8. We call it PIAF-Purple. Bidirectional Google chatting only works in the most recent releases of Asterisk 1.8 so, no, you can't wing it with an earlier release and expect a working system. Next you'll need to add Google Voice and Chat support. You can install these components yourself, or you can use Incredible PBX 1.8. The latest release as of today has this application preinstalled. If you dial 652 from an extension on your Incredible PBX and are prompted to choose a team for the latest score and schedule after hearing a list of the available teams, then your installation is complete even though it won't work until you invite yourself to chat with guru@googlelabs.com using the same Gmail account you're using for Google Voice on your Asterisk server. If dialing 652 doesn't work, then you'll need to add this application to your existing Incredible PBX 1.8 installation by following the simple steps below in addition to enabling chats with guru@googlelabs.com. Almost any other (current) Asterisk 1.8 server should work as well so long as you've installed FreePBX, PHP and the Flite or Cepstral voice synthesizer. But then you're on your own. If you're a nuts-and-bolts Asterisk guy, then you should be able to decipher what needs to be done by reading through this tutorial.
Quick Installation. Assuming you have all the prerequisites in place, today's installation is about a five minute chore. There are 3 easy steps:
(1) While signed in to Gmail with the same account credentials being used for Google Voice on your Asterisk server, activate chat temporarily and invite yourself to chat with guru@googlelabs.com. Run a test query using the Braves example above. IMPORTANT: Once it works, disable chat on your desktop, or Google Voice and Chat will no longer work with Asterisk!
(2) Download the Baseball Scores & Schedules application into the agi-bin directory on your Asterisk system. Here are the commands after logging into your server as root:
cd /var/lib/asterisk/agi-bin
wget http://nerd.bz/eimkfZ
tar zxvf nv-mlb-google.tgz
(3) While still logged in as root, switch to the /etc/asterisk directory and edit extensions_custom.conf with this command:
nano -w extensions_custom.conf
Search for 652 and delete any existing lines with that extension. Then cut-and-paste the following code inserting it just below the [from-internal-custom] context marker (but above any other context marker) or in the existing position if you deleted existing 652 lines. Use nano -w extensions_custom.conf to open the file, or word wrap will delete part of the cut-and-paste code! Once you've saved your changes, reload your Asterisk dialplan:
asterisk -rx "dialplan reload"
Customization. By default, the application is set to use Flite as the text-to-speech (TTS) engine. If you have installed Cepstral, you can change to Cepstral. In the /var/lib/asterisk/agi-bin directory, edit nv-mlb-google.php and change $ttspick = 0 to $ttspick = 1. Do not delete the trailing semicolon! If you want the sports scores and schedules also emailed to you when you dial them up, then insert your actual email address in the $email variable and set $emailscore = 1.
You need not use the 10 teams that are preconfigured in the application. You can choose your own. First, write down the names of the 10 teams you wish to use. Do NOT use city names! Make a backup of extensions_custom.conf: cp extensions_custom.conf ext_custom.bak. Then carefully edit /etc/asterisk/extensions_custom.conf using nano -w filename. Move down to the 652,3 and 652,5 lines and make the necessary changes using the teams you have chosen. Finally, move down to 652,50 and replace Yankees with your 0 choice, 612,52 Mets with your 1 choice, etc. Save your changes and reload your dialplan. NOTE: For multi-word teams such as White Sox, be sure to use an underscore between the words, NOT A SPACE, e.g. white_sox.
If you want to retrieve scores and schedules for more than 10 teams, the easiest solution is to clone all of the 652 dialplan code and renumber each occurrence of 652 to 653. HINT: Some 652 entries are actually embedded in the code as well as in the extension numbers. Be sure to renumber those entries as well. Use Ctrl-W to find each 652 occurrence in the new context, and you won't inadvertently miss one. That gets you 10 more teams. Repeat as desired. Note also that you need not announce 10 teams in the voice prompt unless you want to. If you only plan to follow 3 teams, then alter the initial voice prompt to only announce those teams. You do NOT need to delete the dialplan code that actually picks other teams. No one will ever know. 😉
Adding a Miscellaneous Destination. This step is optional. Access FreePBX with your browser, and choose Setup, Misc Destination. If it's not already there, add a new entry for MLBScores with 652 as the Dial entry. Save your entry and then click the Red Bar to reload Asterisk.
Taking Baseball Scores and Schedules for a Spin. Now we should be all set. Just pick up an extension on your system and dial 652. You'll be prompted to enter a one-digit code. Punch in 5 and check out the latest score and next game for the Baltimore Orioles. Enjoy!
Housekeeping 101. Temporary files in /tmp get cleaned up by Linux housekeeping automatically. Temporary files stored elsewhere don't unless you're using Incredible PBX. The weather scripts store .wav files with your requested weather forecasts in /var/lib/asterisk/sounds/tts. So, from time to time, make a mental note to remove all of these files with a command like this:
rm -f /var/lib/asterisk/sounds/tts/tts*
Or just log into your Asterisk® server as root and edit the following file: nano -w /etc/crontab. Move to the bottom of the file and insert the following code on a blank line:
01 0 * * * root rm -f /var/lib/asterisk/sounds/tts/tts* > /dev/null
This code will delete all of the TTS files in the tts folder every night. Now save your changes: Ctrl-X, Y, then Enter.
Best of Nerd Vittles Link. This application also will be available on our Best of Nerd Vittles site shortly. Enjoy!
Originally published: Monday, April 11, 2011
Need help with Asterisk? Visit the PBX in a Flash Forum or Wiki.
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...
Worldwide Weather Forecasts with Asterisk and Google Talk
Wouldn't it be nice if you could just describe your product and folks would know what you meant? Well, thanks to the lawyers, you can't. So, for all sorts of legal reasons, today's new product will not be called the Asterisk® Weather Station: Whole Earth Edition. Nor will it be called the Google® Weather Station even though we'll be using Google Lab's new Google Talk Guru. We've now written so many weather applications for Asterisk that we're thinking of changing our name to Willard Scott. Ooops! Can't do that either. And, yes, we used to have a Worldwide Weather application for Asterisk, but it died when Channel4.com discontinued providing weather data. The good news is that this forced us to take a look at Google's new Google Talk Guru which is nothing short of incredible. Weather reports are just the tip of the iceberg. We'll have an app to retrieve your favorite sports scores soon. To retrieve the latest Atlanta Braves info, just issue the Chat command: score braves. Here's the answer:
Baseball:
Atlanta Braves 2 - Milwaukee Brewers 1
Next game: @ Milwaukee Brewers, 6 Apr 3:10am
mlb.mlb.com
To give you some idea of performance, retrieval of a weather forecast using the Google Talk Guru takes less than a second for almost any location in the world. In addition to playing these forecasts over the phone using Asterisk 1.8, we've also added the ability to retrieve a forecast by phone and forward it on to your email address. Here's the result from weather paris:
Weather:
Paris, France
13°C, Clear
Wind: W 8 km/h
Hum: 53%
Mon: 6°C-14°C, Partly Cloudy
Tue: 7°C-18°C, Partly Cloudy
Wed: 8°C-23°C, Partly Cloudy
HINT: If you prefer zip codes or international postal codes, those all seem to return good results as well. We've tested U.S., Canada, and U.K. codes with no problems. Mexico, unfortunately, uses 5-digit codes just like the U.S. so those don't work. Now if we could just get rid of centigrade and kilometers for the metrically challenged, it would be almost perfect.
How It Works. Here's a quick summary of how all this works. With the Google Talk Guru, you can send a query as a text message to guru@googlelabs.com. You then get a reply message in Google Talk with the answer to your query. What we've done is add this querying functionality to your Asterisk dialplan with some preassigned cities to obtain weather forecasts. You can change them in any way you like. Once the response arrives, we've got a PHP application that puts the text (as shown above) into something that's a little more TTS friendly for Flite and Cepstral. Finally, we've added the option to email you the results as well as speaking them over the phone. If you're curious about how to do all of this, take a look at the dialplan and PHP code in the links below. It's not hard, but it is tedious. One little typo and nothing works. Ask us how we know. 😉
Prerequisites. If you've previously installed one of the Nerd Vittles Weather Applications or if you're using an older version of Incredible PBX 1.8 that doesn't include this app out of the box, then today's installation drill shouldn't take you more than 5 or 10 minutes. If you're new to all of this, then here's a quick list of what you'll need. First, you'll need a PBX in a Flash server running the very latest Asterisk 1.8. We call it PIAF-Purple. Bidirectional Google chatting only works in the most recent releases of Asterisk 1.8 so, no, you can't wing it with an earlier release and expect a working system. Next you'll need to add Google Voice and Chat support. You can install these components yourself, or you can use Incredible PBX 1.8. The latest release as of today has this application preinstalled. If you dial 612 from an extension on your Incredible PBX and are prompted to choose a city for your weather report after hearing a list of cities, then your installation is complete even though it won't work until you invite yourself to chat with guru@googlelabs.com using the same Gmail account you're using for Google Voice on your Asterisk server. If dialing 612 doesn't work or merely prompts for a number, you'll need to add this application to your existing Incredible PBX 1.8 installation by following the simple steps below in addition to enabling chats with guru@googlelabs.com. Almost any other (current) Asterisk 1.8 server should work as well so long as you've installed FreePBX, PHP and the Flite or Cepstral voice synthesizer. But then you're on your own. If you're a nuts-and-bolts Asterisk guy, then you should be able to decipher what needs to be done by reading through this tutorial.
Quick Installation. Assuming you have all the prerequisites in place, today's installation is about a five minute chore. There are 3 easy steps:
(1) While signed in to Gmail with the same account credentials being used for Google Voice on your Asterisk server, activate chat temporarily and invite yourself to chat with guru@googlelabs.com. Run a test query using one of the examples above. IMPORTANT: Once it works, disable chat on your desktop, or Google Voice and Chat will no longer work with Asterisk!
(2) Download the Google Worldwide Weather application into the agi-bin directory on your Asterisk system. Here are the commands after logging into your server as root:
cd /var/lib/asterisk/agi-bin
wget http://nerd.bz/fCcdOP
tar zxvf nv-weather-google.tgz
(3) While still logged in as root, switch to the /etc/asterisk directory and edit extensions_custom.conf with this command:
nano -w extensions_custom.conf
Search for 612 and delete any existing lines with that extension. Then cut-and-paste the following code inserting it below the [from-internal-custom] context marker (but above any other context marker) or in the existing position if you deleted existing 612 lines. Use nano -w extensions_custom.conf to open the file, or word wrap will delete part of the cut-and-paste code! Once you've saved your changes, reload your Asterisk dialplan:
asterisk -rx "dialplan reload"
Customization. By default, the application is set to use Flite as the text-to-speech (TTS) engine. If you have installed Cepstral, you can change the app to Cepstral quickly. In the /var/lib/asterisk/agi-bin directory, edit nv-weather-google.php and change $ttspick = 0 to $ttspick = 1. Do not delete the trailing semicolon! If you want the weather reports also emailed to you when you dial them up, then insert your actual email address in the $email variable and set $emailforecast = 1.
Worldwide Weather Forecasts for Asterisk is preconfigured for the following cities:
0 - Tokyo
1 - Washington
2 - Berlin
3 - Paris
4 - Honolulu
5 - London
6 - Moscow
7 - Sydney
8 - Toronto
9 - Zurich
You need not use the 10 cities that are preconfigured in the application. You can choose your own. First, write down the names of the 10 cities you wish to use. Do NOT add states or countries! Make a backup of extensions_custom.conf: cp extensions_custom.conf ext_custom.bak. Then carefully edit /etc/asterisk/extensions_custom.conf using nano -w filename. Move down to the 612,3 and 612,5 lines and make the necessary changes using the city names you have chosen. Finally, move down to 612,50 and replace Tokyo with your 0 choice, 612,52 with your 1 choice, etc. Save your changes and reload your dialplan. NOTE: For multi-word cities such as New York and San Diego, be sure to use an underscore between the words, NOT A SPACE, e.g. new_york.
If you want to retrieve weather forecasts for more than 10 cities, the easiest solution is to clone all of the 612 dialplan code and renumber each occurrence of 612 to 613. HINT: Some 612 entries are actually embedded in the code as well as in the extension numbers. Be sure to renumber those entries as well. Use Ctrl-W to find each 612 occurrence in the new context, and you won't inadvertently miss one. That gets you 10 more cities. Repeat as desired. Note also that you need not announce 10 cities in the voice prompt unless you want to. If you only plan to use 3 cities, then alter the initial voice prompt to only announce those cities. You do NOT need to delete the dialplan code that actually picks other cities.
Adding a Miscellaneous Destination. Access FreePBX with your browser, and choose Setup, Misc Destination. If it's not already there, add a new entry for WorldWideWeather with 612 as the Dial entry. Save your entry and then click the Red Bar to reload Asterisk.
Taking the WorldWide Weather Forecaster for a Spin. Now we should be all set. Just pick up an extension on your system and dial 612. You'll be prompted to enter a one-digit code. Punch in 5 and check out the weather forecast for good old London. Enjoy!
Housekeeping 101. Temporary files in /tmp get cleaned up by Linux housekeeping automatically. Temporary files stored elsewhere don't unless you're using Incredible PBX. The weather scripts store .wav files with your requested weather forecasts in /var/lib/asterisk/sounds/tts. So, from time to time, make a mental note to remove all of these files with a command like this:
rm -f /var/lib/asterisk/sounds/tts/tts*
Or just log into your Asterisk server as root and edit the following file: nano -w /etc/crontab. Move to the bottom of the file and insert the following code on a blank line:
01 0 * * * root rm -f /var/lib/asterisk/sounds/tts/tts* > /dev/null
This code will delete all of the TTS files in the tts folder every night. Now save your changes: Ctrl-X, Y, then Enter.
Best of Nerd Vittles Link. This application also will be available on our Best of Nerd Vittles site shortly. Enjoy!
Originally published: Tuesday, April 5, 2011
Need help with Asterisk? Visit the PBX in a Flash Forum or Wiki.
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...