It's been another disappointing week for Asterisk with Digium's announcement1 that 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 Skype 2 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 . 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 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/[email protected]: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. 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 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.