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 126.96.36.199 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!
chmod +x 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:
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...
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.
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!
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 188.8.131.52 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 184.108.40.206.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 220.127.116.11), piafdl -p 184 (loads Asterisk 1.8.4), piafdl -p 1833 (loads Asterisk 18.104.22.168), or piafdl -p 1832 (loads Asterisk 22.214.171.124). 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.
New Vitelity Special. Vitelity has generously offered a new discount for PBX in a Flash users. You now can get an almost half-price DID and 60 free minutes from our special Vitelity sign-up link. If you're seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. And, when you use our special link to sign up, the Nerd Vittles and PBX in a Flash projects get a few shekels down the road while you get an incredible signup deal as well. The going rate for Vitelity's DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For PBX in a Flash users, here's a deal you can't (and shouldn't) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls for just $3.99 a month and you get a free hour of outbound calling to test out their call quality. To check availability of local numbers and tiers of service from Vitelity, click here. Do not use this link to order your DIDs, or you won't get the special pricing! After the free hour of outbound calling, Vitelity's rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage and any balance is fully refundable if you decide to discontinue service with Vitelity.
Some Recent Nerd Vittles Articles of Interest...
- "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:
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Viewport 0 0
Viewport 0 0
- 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! [↩]