Home » Technology » Audio » Why Wait? Build Your Own Skype Gateway to Asterisk

The Most Versatile VoIP Provider: FREE PORTING

Why Wait? Build Your Own Skype Gateway to Asterisk

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

asterisk -rx "dialplan reload"

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

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

1. Start up X-Windows: xinit

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

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

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

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

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

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

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

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

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

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

cd /siptosis

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Special Thanks to Our Generous Sponsors

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

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

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

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

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

Some Recent Nerd Vittles Articles of Interest...

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


  1. One minor glitch – I Found that the rpm -ivh skype was complaining about libXss being needed.

    yum install libXScrnSaver.i386 seems to have fixed that….

    [WM: Our wget line should have taken care of that?? Did you combine the two lines in the script and remove the ↩ before executing the wget command? I actually like your method better so I have changed it now and removed:

    wget ftp://ftp.pbone.net/mirror/ftp.centos.org/5.2/↩


  2. Ward, this is great information, and I’ll bet you’re going to get a big jump in traffic to your site, because a lot of Asterisk users have been looking for a simple way to do this for quite some time. But there is a problem, if you are not running PBX in a Flash – on some CentOS-based systems, no version of Java is installed at all, and if you just do "yum install java" it installs an earlier version (1.4). Do you have any idea how someone would go about getting the prerequisite Java 1.5 installed on a system running CentOS 5.2, but that currently has no version of Java installed?

    [WM: Download the Java SE Development Kit 6u12 for Linux in the .rpm.bin flavor, chmod +x *.rpm.bin, run the executable and agree to the license. We’ve now added this into the body of the tutorial. It was a common problem. Thanks.]

  3. We are desperately waiting for the Digium Skype channel driver.

    We have looked at other ways of connecting to Skype and providing the ability for our teleconferencing service to have the ability to conference PSTN, VoIP(SIP) & Skype.

    However the main reason we are waiting for Digium to release this is because it will be fully supported. (Chat & Voice, and video in the future)

    And you know that they are going to iron out all the kinks to make it perform better than any other work around solution. (For teleconferencing we need the least CPU utilization)

    For PBX’s in Australia Gizmo is not really an option, because their servers are located in the US. Thus making the call route from AUS -> US -> AUS, and degrading the response time and quality.

    Clint Davis

    [WM: 😆 😆 😆 😆 😆 OK. Sorry. I’ve stopped laughing now. Here’s hoping you’re right about all of what you’ve said. Seeing is believing as they say. Footnote: Since our article, Digium has posted this update (the first in six months!) with some details about their offering.]

  4. Ward,

    I was very happy to get this one in my RSS feed. I have used skype for about 3 years now with excellent results. I am a recent PIAF/Asterisk user and have been desperately searching for skype integration into my new PIAF install.

    Thank you for doing this.

  5. Anyone know if this will work with Asterisk Based Switchvox? You can’t get access to the files in Switchvox – only the GUI.

    [WM: Without root access, I doubt you can get it going. You’ve got to get the siptosis code plus Skype plus Java installed somehow. You could certainly build it up on a separate machine and use it as a Skype gateway to Switchvox. That’s essentially what Gizmo5 is doing.]

  6. I got as far as the line
    rpm -ivh skype*
    And got this:

    # rpm -ivh skype*
    warning: skype- Header V3 DSA signature: NOKEY, key ID
    error: Failed dependencies:
    libXv.so.1 is needed by skype-

    Any idea what the problem might be? Thanks in advance.

    [WM: See the first comment above. Or reread the article. The fix now has been incorporated.]

  7. On some systems, xinit won’t start up without the existence of an xorg.conf configuration file for the display card and driver. We’ve amended the Activating Your Skype Gateway section of the tutorial above to include a generic one that should work fine on almost any current generation machine.

  8. Ward, thanks for the tip on xinit, but unfortunately even that isn’t doing the trick – after creating the /etc/X11/xorg.conf file I still get
    -bash: xinit: command not found
    So, I am stuck at this point in the instructions, unable to start xinit.

    [WM: If xinit can’t be found, then you haven’t successfully installed the X-Windows components listed in the article.]

  9. Ward, I was trying to set up SipToSis just a few days ago and didn’t get very far. I finally got it set up with the help of your tutorial and your SipToSis configs. Thanks!

    Not sure if other folks experienced this, but my Skype client kept crashing initially. Turns out my particular setup can’t receive calls with video. Disabling video on my end fixed it.

    Also, when I get a Skype call, the incoming caller ID is set to "SkypeCaller". Is there a way to get the caller’s Skype name displayed instead? I am not using PiaF, so not sure if that’s the cause of it.

  10. I just wanted to comment that I also had the problem of no xinit, and I triple checked to see that all of the software listed in the article had installed without errors. So I did a "yum list" and saw a package named xorg-x11-xinit.i386, which I suspected might give me the elusive xinit. After doing a "yum install xorg-x11-xinit.i386″ I typed xinit and was greeted with this message:

    # xinit

    xinit: No such file or directory (errno 2): no server "X" in PATH

    Use the — option, or make sure that /usr/bin is in your path and
    that "X" is a program or a link to the right type of server
    for your display. Possible server names include:

    Xorg X.Org displays

    giving up.
    xinit: Connection refused (errno 111): unable to connect to X server
    xinit: No such process (errno 3): Server error.

    I checked and /usr/bin is definitely in my path!

    What I am wondering is, do your PiaF systems ship with X-Windows and perhaps some sort of desktop environment already installed? If that’s the case, that would explain why some people are having problems and not others – I think if your CentOS installation is a basic "server" install – one intended to be administered remotely, such as via a ssh connection – it doesn’t include X-Windows or a desktop. This is the impression I get from certain pages I have Googled, feel free to correct me if I’m wrong.

    I’d be curious to know if everyone who has got this to run successfully has some sort of desktop such as KDE, Gnome, etc. installed, or if anyone has got this to work on a barebones CentOS server configuration (not PiaF), and if so, what they had to install that’s not listed in the article.

    [WM: Here’s a listing of installed modules on a PBX in a Flash system that you can compare.]

    libX11-devel.i386 1.0.3-9.el5 base
    libXScrnSaver-devel.i386 1.1.0-3.1 base
    libXTrap-devel.i386 1.0.0-3.1 base
    libXau-devel.i386 1.0.1-3.1 base
    libXaw-devel.i386 1.0.2-8.1 base
    libXcomposite.i386 0.3-5.1 base
    libXcomposite-devel.i386 0.3-5.1 base
    libXcursor-devel.i386 1.1.7-1.1 base
    libXdamage.i386 1.0.3-2.1 base
    libXdamage-devel.i386 1.0.3-2.1 base
    libXdmcp-devel.i386 1.0.1-2.1 base
    libXevie.i386 1.0.1-3.1 base
    libXevie-devel.i386 1.0.1-3.1 base
    libXext-devel.i386 1.0.1-2.1 base
    libXfixes-devel.i386 4.0.1-2.1 base
    libXfont-devel.i386 1.2.2-1.0.3.el5_1 base
    libXfontcache-devel.i386 1.0.2-3.1 base
    libXft-devel.i386 2.1.10-1.1 base
    libXi-devel.i386 1.0.1-3.1 base
    libXinerama-devel.i386 1.0.1-2.1 base
    libXmu-devel.i386 1.0.2-5 base
    libXp.i386 1.0.0-8.1.el5 base
    libXp-devel.i386 1.0.0-8.1.el5 base
    libXpm-devel.i386 3.5.5-3 base
    libXrandr-devel.i386 1.1.1-3.1 base
    libXrender-devel.i386 0.9.1-3.1 base
    libXres-devel.i386 1.0.1-3.1 base
    libXt-devel.i386 1.0.2-3.1.fc6 base
    libXtst-devel.i386 1.0.1-3.1 base
    libXv-devel.i386 1.0.1-4.1 base
    libXvMC.i386 1.0.2-2.1 base
    libXvMC-devel.i386 1.0.2-2.1 base
    libXxf86dga-devel.i386 1.0.1-3.1 base
    libXxf86misc-devel.i386 1.0.1-3.1 base
    libXxf86vm-devel.i386 1.0.1-3.1 base

    x3270.i386 3.3.4p7-3.el5.4 base
    x3270-text.i386 3.3.4p7-3.el5.4 base
    x3270-x11.i386 3.3.4p7-3.el5.4 base
    x86info.i386 1:1.20-1.26.fc6 base
    xfdesktop.i386 4.4.2-1.el5.centos extras
    xfwm4.i386 4.4.2-1.el5.centos extras
    xfwm4-themes.noarch 4.4.2-1.el5.centos extras
    xhtml1-dtds.noarch 1.0-7.1.1 base
    xjavadoc.i386 1.1-4jpp.1 base
    xjavadoc-javadoc.i386 1.1-4jpp.1 base
    xorg-x11-drv-i810-devel.i386 1.6.5-9.13.el5 base
    xorg-x11-drv-via-devel.i386 0.2.1-9 base
    xorg-x11-fonts-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-75dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-1-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-14-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-14-75dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-15-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-15-75dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-2-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-2-75dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-9-100dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ISO8859-9-75dpi.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-Type1.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-cyrillic.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-ethiopic.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-misc.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-syriac.noarch 7.1-2.1.el5 base
    xorg-x11-fonts-truetype.noarch 7.1-2.1.el5 base
    xorg-x11-proto-devel.i386 7.1-9.el5.centos base
    xorg-x11-resutils.i386 7.1-2.fc6 base
    xorg-x11-server-Xdmx.i386 1.1.1-48.41.el5_2.1 updates
    xorg-x11-server-Xephyr.i386 1.1.1-48.41.el5_2.1 updates
    xorg-x11-server-Xnest.i386 1.1.1-48.41.el5_2.1 updates
    xorg-x11-server-randr-source.i386 1.1.1-48.41.el5_2.1 updates
    xorg-x11-server-sdk.i386 1.1.1-48.41.el5_2.1 updates
    xorg-x11-twm.i386 1:1.0.1-3.1 base
    xorg-x11-util-macros.i386 1.0.2-4.fc6 base
    xorg-x11-xbitmaps.i386 1.0.1-4.1 base
    xorg-x11-xfs-utils.i386 1:1.0.2-4 base
    xorg-x11-xfwp.i386 1.0.1-3.1 base
    xorg-x11-xsm.i386 1.0.2-4.fc6 base
    xorg-x11-xtrans-devel.i386 1.0.1-1.1.fc6 base
    xscreensaver.i386 1:5.04-1.el5.centos extras
    xscreensaver-base.i386 1:5.04-1.el5.centos extras
    xscreensaver-extras.i386 1:5.04-1.el5.centos extras
    xscreensaver-extras-gss.i386 1:5.04-1.el5.centos extras
    xscreensaver-gl-base.i386 1:5.04-1.el5.centos extras
    xscreensaver-gl-extras.i386 1:5.04-1.el5.centos extras
    xscreensaver-gl-extras-gss.i386 1:5.04-1.el5.centos extras

  11. I did mine on a trixbox installation. It didn’t have KDE, Gnome or other X desktop software installed.

    Since I don’t have a monitor attached to my box, I used Xvnc instead. It is an X server that you can vnc to. Just do a "yum install -y vnc-server".

    In addition, you need to run desktop software on top of it. I used xfce, but KDE or Gnome would work to. For xfce, install the following with yum:


    yum will pull in other dependencies too. The fonts might be optional, but I installed them just in case.

    I also modified /etc/fonts/fonts.conf to include "/usr/share/X11/fonts/TTF" as a font directory.

    Modify ~/.vnc/xstartup to include the following:

    xfwm4 --daemon
    xfdesktop &
    xterm &
    exec xfce4-panel

    To start Xvnc, just run "vncserver". I believe it asks you for a password to use the first time around. Just enter one and use that for the vnc viewer later. After which, it should tell you what your DISPLAY variable is (used for X if you need it). This is also the same server value for connecting from your vnc viewer.

    Connect from a vnc viewer and an xterm should already be started. Continue at step 2 of the article from here on.

    Hope I didn’t miss anything.

    [WM: Big help! Thanks.]

  12. do I "have to" launch the SipToSis_Linux under the siptosis directory. I tried launching it form / with the following command:
    But it keeps looping and gives me errors, and force me to reboot the machine to stop it from looping. Does anyone have a good way of launching the service at boot?

    [WM: Keep an eye on this thread.]

  13. Okay, I finally have this running on an Elastix system. Here are some of the things I had to do, in no particular order:

    1) Install additional packages:

    yum install libXv.so.1
    yum groupinstall "X Window System"

    The first must be done before doing rpm -ivh skype* in your instructions.

    2) To start X server at bootup, went into /etc/inittab and changed the line id:3:initdefault: to id:5:initdefault:

    3) In /etc/X11/twm/system.twmrc I had to add the line
    after top comment section
    and then copy that file to /root/.twmrc
    This is because if you don’t have any other window manager X windows seems to use twc, and twc has a quirk where it won’t actually show the box that pops up when a call is placed or received until you click on it (until then it shows a grid outline), but if that box doesn’t show all sorts of weird and undesirable things happen. The "RandomPlacement" tells twm to just pick a place randomly and show the box!

    4) In order to get outgoing calls to work I did have to edit /siptosis/SipToSkypeAuth.props and change the last line from *,*,,calleeid to *,*,*,calleeid – I made sure that port 5070 is not open in the router so no one from outside my local network can misuse this. Sorry, but it’s the only thing that worked.

    5) This may be system-specific, but in the Skype client itself, I had to go into Options|Sound Devices and change the Sound Out setting to an actual hardware device instead of Default Device (I just picked the first one on the list).

    I also have a question – is anyone else having issues with touch tones not being able to activate an IVR selection? This works fine as long as I route it to an extension, and if the Skype caller uses their touch tone pad to hit some tomes I can hear them loud and clear, but when I route calls to an IVR they don’t do anything. I went to the SipToSis site and noted that in their forum they say that SipToSis Skype Gateway Bridge Update 20090217 includes this change: "Change (again) rfc2833 DTMF encoding for compatibility issues with some SIP servers." I just wondered if your download is based on that version or an earlier one (not that I would know if that would affect this issue), or if anyone else has had the touch tone issues and found a workaround?

  14. Me again – I think I have solved the touch tone problem and also have figured out how to start everything automatically at reboot. Once again this was on an Elastix box, so things may be different on other systems.

    To get the software to pass touch tones through to Asterisk (so you can direct Skype callers to an IVR) I had to change two options in /siptosis/siptosis.cfg:


    At least for me, this got incoming tones working reliably. Note that if you are using this for incoming calls from Skype users you may not know in advance, you might actually have to tell them (in the IVR recording) that they need to click on the "More" button, then "Toggle Dialpad" in order to make a selection.

    As for getting it to start up at reboot – the only way I could get it to do so was as part of the vnc server startup. So you do have to have a vncserver installed (I’m assuming that "yum install vncserver" would work, but it was already present on my system). So this is what I did:

    First I used Webmin (System|Bootup and Shutdown) to start vncserver at bootup – just check the box next to vncserver and click "Start on Boot"

    I then edited /root/.vnc/xstartup to make sure the following was at the end of the file (don’t duplicate the "twm &" line if it’s already in the file, and don’t include it at all if you are using some other window manager):

    twm &
    skype &
    sleep 5
    cd /siptosis
    ./SipToSis_linux >> /var/log/siptosis

    Note that I put in a five second delay to give Skype time to fully start before SipToSis_linux starts (don’t know if that’s necessary but seemed logical), and also, because when starting this way there’s no visible window for SipToSis, I send the output to a log file called /var/log/siptosis

    Since I don’t want that log file to just grow forever I used Webmin (System|Log File Rotation|Add a new log file to rotate) to rotate the log file. The settings I used were:

    Log file paths: /var/log/siptosis
    Ignore log file if missing? Yes
    Re-create log file after rotation? Yes, with mode 0644 and owned by user root and group root

    I left all other settings at the defaults, though you might want to do a daily rotation on a high traffic system (ours isn’t so I left it at weekly).

    After a reboot I could connect using a vnc client to port 5903 – I’m not exactly sure why 5903 rather than 5900, 5901, or 5902, but you can try ports starting at 5900 if it doesn’t work the first time. However, it appears you don’t actually have to have a VNC client connected for this to work – the main thing is that you must start the vnc client first, then let the vnc client’s xstartup script start up Skype and SipToSis. When I tried to start the latter two programs directly in a Webmin startup script it didn’t work. It goes without saying that if you do this you want to make absolutely, positively sure that the vnc server port is not accessible outside your local network, particularly since this stuff is running as root!!! It would probably be a good idea to protect access to the VNC server in some way (require a strong password or a SSH connection from the client) but at the moment I’m not sure how to change that.

    By the way, if Webmin doesn’t already have a Bootup and Shutdown action for vnc, I’d be suspicious that it had not installed properly, but if you think it has you could probably try using something as simple as "service vncserver start" for the bootup and "service vncserver stop" for the shutdown.

    [WM: Great tips. For another autostart solution that’s a little less complicated, see this thread.]

  15. Here’s a couple more hints (sorry about the numerous posts but I have to post these as I figure them out or I forget them!)

    I’m up to four changes in /siptosis/siptosis.cfg now:


    The first two I covered in my previous post. The third is needed because if you are on a Skype call and another comes in, and this setting is > 1, the first call will be put on hold and connect the second one put through. Since there’s probably no way for either of the parties to the first call to take it off hold, the effect from their standpoint is that the call was cut off! The fourth line is to stop the SipToSis program from printing ‘WARNING: file "users.db" not found: created new empty DB’ every time it starts.

    I do like the other autostart method shown, but for those who want to run vncserver (at least for a while) I forgot that I might have modified my /etc/sysconfig/vncservers file. The two uncommented lines I have are these:

    VNCSERVERARGS[2]="-geometry 800×600 -nolisten tcp -nohttpd -localhost"

    The first line may be part of the reason that the vncserver is on port 5903 – I think the port is 5900 + the screen number (but don’t quote me on that).

    But I do like bbhenry’s method (in the thread you posted) for once you know everything is working as it should be.

  16. One more small tidbit for you: If you add this line in /siptosis/siptosis.cfg …..

    from_url="SkypeCaller" <sip:Skype_Caller@>

    ….. when a call comes in from a Skype user to your Asterisk box it will show the Skype user name in the Caller ID Name field, and “Skype_Caller” in the Caller ID number field. I don’t know if any phone displays will barf on letters where numbers are “supposed” to go, but if that is an issue just change “Skype_Caller” to something numeric.

    [WM: Thanks very much for all of your work on this. We’ve now incorporated all of your config changes in the siptosis.tgz download.]

  17. Just tried installing the skype gateway on a clean install of PIAF 1.4_X64 today but am getting the following errors when trying to install the skype client:
    root@pbx:~/skype $ rpm -ivh skype*
    warning: skype- Header V3 DSA signature: NOKEY, key ID
    error: Failed dependencies:
    libXv.so.1 is needed by skype-
    libasound.so.2 is needed by skype-
    libasound.so.2(ALSA_0.9) is needed by skype-
    libasound.so.2(ALSA_0.9.0rc4) is needed by skype-
    root@pbx:~/skype $

    Any ideas? I followed the instructions listed but no joy. TIA.

    [WM: See this message thread on the PBX in a Flash forum.]

  18. Hi my question is will this slow asterisk down? if i do thiere upgrade will i have to reconfigure this again? linux and asterisk are always upgrading and dont want to be having to reconfigure all the time also want to know if this will take up alot of resources from the box? skype is very cheap….

    [WM: Will Skype slow down your Asterisk system? Good question. Kinda depends upon the horsepower of your system, the current load on your server, and the number of Skype calls going in and out. My best guestimate is that a Skype calls consumes slightly more processing resources than a SIP call using a compression codec. Best way to find out is obviously to try it. You can always disable it if performance becomes a problem.]

  19. Here’s another tip for setting up speeddials for Skype instead of creating extensions. All speeddials are stored in the internal db "sysspeeddials". Go into Asterisk CLI, type in "database put sysspeeddials ## SkypeID", where ## is the speeddial #. Precede the SkypeID with * or 8 or whatever code you use in the Skype Outgoing prefix. E.g. "database put sysspeeddials 99 *echo123″. Then use the regular speeddial code *0 followed by 99 will call the Skype echo123 test line.

  20. Don’t suppose anyone can offer some advice on how this will work if the Asterisk instance is running from a Xen Server VM? my concern is the audio device, as i dont know if Xen supports presenting Soundcards to guest Linux OS (CentOS)

    any tips would be greately appreciated.

  21. Ward – I just got around to trying this and the skype centos rpm is no longer available. Do you have any suggestions on how to get this working now?

  22. You guys make this too easy!!!! Thanks for all the great scripts and instructions.

    Some notes . . . if you are trying this (as of) January 2010 you might have to upgrade your Xorg server via yum. You might also need to alter the startup script to add credentials to it . . . "echo username password | skype –pipelogin &" if you are running the new beta version of skype (and as mentioned, the centos version is no longer there–just use the static compiled version on the site and as already mentioned copy the files as specified in the README file.)

  23. Hi there great guide 😀 however it has come to my attention that my pbx is running in a vmware environment on esxi and is without a sound card 🙁 is there anyway to make this work without one or am i gonna have to dig around for a physical box to reinstall on…

  24. I’m a little late to this and now I find that Skype has taken down the CentOS rpm. I tried the FC10 rpm but it complains about needing qt4-x11. I have the rpmforge repo enabled but can’t find qt4-x11. Any suggestions?

Comments are closed.