Initial investigations on hooking up Skype to SIP with Asterisk: NCH Uplink, ChanSkype, and PSGw

I’ve been playing around for the past couple of weeks with Skype-to-SIP adapters so that I could set up a Skype trunk with my home Asterisk server. No matter what your feelings on the proprietary Skype approach, it does deal with NAT quite well, and that may be important if you are on a single dynamic IP address connection. I’ve also been interested in integrating Skype into the Asterisk setup since the announcement of free outbound calling through the end of 2006. Although there are $1,000 Skype-to-PBX bridges, I am not interested enough in Skype connections to spend more money than my Asterisk server hardware cost. For my investigation, I looked at three “personal-scale” products:

All three products take the same approach. Each product is composed of a SIP interface component and a Skype client control component that uses the Skype API. When a call comes in to one half, it is directed to the other half, typically by redirecting the audio streams from the speakers through an operating system conduit. PSGw uses the term software audio cable, which is the best description.

Uplink Skype to SIP

NCH Swift Sound is an Australian company with expertise in computer-based audio and a few VoIP-related applications. Uplink’s installer offers you the Axon PBX, though it’s not necessary when you plan on using Asterisk. Uplink is a Windows application, and has a $40 price tag for license, though free downloads are available.

I already run one full-time PC for Asterisk, and I didn’t want another one just in case somebody decided to Skype me. My first approach was to try running Uplink in VMware, though I quickly abandoned that when it became clear just how much the VMware emulation layer would require in terms of resources. When the Windows VM needed CPU time, it dramatically affected performance of the applications running under Linux. The sound quality was awful, too. At first, I wondered if the sound quality was due to resource constraints on the shared system, so I ran Uplink on a separate machine. Although sound quality improved, the audio was still not anywhere near conversational quality. It was interrupted by frequent drops and hesitations. The only reason that I could make out what was coming through the telephone is that I had recorded the voice prompts myself.

To correctly get Skype to call out to a phone number, there’s a bit of phone number massaging required. Skype expects a call out number to be done in the international telephone style (+1415…), so you’ll need to add the plus sign on. To dial a skype user from the telephone keypad, you’ll also need to set up a mapping between a number and the name. Here’s some example dialplan code that does both. (Uplink is set up to register with the peer name “skype”.)
//Use “09” as a Skype outbound trunk
//Add leading “+” on to 1-NPA-NXX-XXXX number
// Map 09-888 to echo service
_09888 => {


  1. The easiest setup of the three applications I tested. Uplink installs like any other Windows application, and its configuration is well thought out. It also shows reasonable debugging information as it runs, so it’s pretty easy to see what’s going on inside.


  1. Windows-only solutions require a second box with Linux-based Asterisk systems. (This may be offset if you have a powerful enough machine to run VMware, but my VMware installation bogged down on a 1.6 GHz AMD Turion64 with 512 MB RAM.)
  2. Poor sound quality, regardless of whether Uplink runs in a VM or on an external machine.
  3. Poor call supervision. Frequently, Skype would stay connected even though Asterisk had sent a BYE message to the SIP side of Uplink. I had to fix this by hanging up in the Skype GUI.


Note: The following applies to an old version of ChanSkype. Last Wednesday, they released version 1.2, which could address one of my major concerns.

ChanSkype was announced in early October by a Brazilian company. The approach is perhaps the best of any of these products because it makes Skype instances appear as channels, rather than trying to control clients directly with a co-resident SIP gateway. It has the ability to use multiple Skype instances as outbound trunks from the same machine, which is a unique capability within the products that I looked at.

Configuration of ChanSkype was the most in-depth of any of the products. None of it is particularly hard, and the company provides quite good documentation. My two big challenges were the general configuration complexity, as well as the fact that the channel driver is provided as a 32-bit binary driver and can’t be dynamic linked into a 64-bit Asterisk.

The configuration complexity comes directly from the approach that the product takes. Several instances of the Skype client are each run by using VNC as the display. With several VNC instances running, each Skype client can function as an outbound trunk that is directly addressable by the channel driver. Unfortunately, even if you only want one Skype instance, it still requires VNC.

To set up outbound calling, you’ll need to add the plus sign on to the front of the number, as in the following dialplan code:
//Use “09” as skype trunk
_091X. => {

I had trouble with one-way audio during this test, though I believe that was due to NAT on my own network, and a SIP security device that I am using.


  1. ChanSkype had by far the best audio. The inbound audio when making a telephone call was nearly perfect, though it was hard to tell from the 15-second per-call limit that is embedded into the channel driver.
  2. Unlike the other two products, this one is capable of sending multiple Skype streams outbound because it runs multiple clients simultaneously. This is hard to test with a 15-second call limit, though.
  3. The best integration into the dialplan. Because ChanSkype is a channel driver, it’s easy to say Dial(Skype/skypeinstance/number) and let the channel driver figure out who’s free.


  1. This was the most complex configuration. Even if you only want one outbound Skype trunk, it requires running a VNC server for that client.
  2. If you run Asterisk on AMD64, there may be some extra work to get the 32-bit channel driver running. I run Asterisk on Gentoo, and found that recompiling Asterisk as a 32-bit application is sufficient because there is a wide range of compatibility libraries that can be used. (In talking with the company, I discovered they plan to release a 64-bit version.)
  3. ChanSkype doesn’t take inbound calls. If your purpose is to get cheaper outbound calling, this may not be a problem for you. (Note: ChanSkype 1.2, announced on October 25, lifts this limitation.)

Personal Skype Gateway (PSGw)

PSGw is one of the oldest Skype-to-SIP converters. Although it started on Windows, it was ported to Linux in July of this year. Because of my preference for a single-machine solution, I worked with the Linux version. Like ChanSkype, the Linux PSGw is distributed as a 32-bit application. On my system, however, there are repeated segmentation faults if it is run with 64-bit libraries.

PSGw requires a separate IP address from Asterisk to avoid port conflicts. I solved this with a secondary address on the main network interface, but this may not be possible if you don’t have enough routable IP addresses, or a way to keep the PSGw-to-Asterisk connection from going through a NAT. (At the Interop Labs earlier this year, we found that SIP and NAT don’t mix.)

Once I had successfully installed PSGw, it was easy to start. When I made my first call, PSGw mapped the call from SIP on to Skype and promptly died. As far as I can tell, the premature death was due to a library conflict. On Linux, the Skype API runs over D-Bus, and a key dynamic library used by PSGw is distributed as a 32-bit object. I was able to solve the problem by building a 32-bit chroot area, though that’s definitely not for the faint of heart. (To get Skype running in the 32-bit chroot, I needed to have a second, 32-bit version of the libraries it depends on, as well as the sound daemon used by KDE.)

Even once the 32-bit chroot was in place, there were problems with PSGw staying up if I permanently authorized PSGw to use the Skype API. To revoke the authorization, remove it from the config.xml file for the user you sign on as. Look for this line, and take out any programs that are authorized:


  1. By far the best call supervision. When Asterisk hung up, PSGw would terminate the Skype call. There was never a call leg that stayed up longer than its counterpart.


  1. Most complex setup on AMD64 due to the apparent requirement for a 32-bit chroot. (This isn’t documented anywhere, but the program crashed a lot until I put it into a 32-bit chroot.)
  2. Extremely poor call quality. I couldn’t tell that it was relaying human speech.

Closing thoughts

Based on my testing, ChanSkype seems like the most promising approach. I’ll try the recently-released 1.2 version, and report back.

In the future, it may be possible to use something likethe recently-announced Philips VOIP841, which would seem to offer the ability to be a Skype-to-analog converter that doesn’t require a computer. (Philips also announced Netgear would deliver a PC-less Skype phone.)

11 Responses to “Initial investigations on hooking up Skype to SIP with Asterisk: NCH Uplink, ChanSkype, and PSGw”

  1. Phil Wolff says:

    Fantastic post! May I have permission to repost it on Skype Journal as a guest blog? full credit and links back back, of course. skype me at evanwolf if you’d like to talk about it.

  2. Matthew Gast says:


    Absolutely! Go right ahead.

    Now you’re going to motivate me to do the second part of the investigation on the current version of ChanSkype. 🙂


  3. Sharad Ahlawat says:

    Hello, thank you for posting this comparison. I am using asterisk on gentoo and am trying to configure chanskype. How did you create the /dev/ivcsfifo* entries.

    Thanks in advance

  4. Don says:

    I haven’t been happy with chanskype…because right now when I hangup a call in asterisk the skype instance doesn’t hangup…it takes multiple vnc desktops…1 per every channel you want to run…And when you have a problem it takes a week to get a reply from someone…

  5. Jason says:

    Have you resolved the device creation /dev/ivcsfifo*? I installed the chan_skype and the device did not get created. I sent email to chanckype support. I have not got any response. How is the chanckype support? Or basically, you are on your own once you get the software.

  6. I am testing Uplink Skype2Sip with great success (V1.30).
    Uplink is on our Windows server and Asterisk on the Linux one.
    Instalation is straight forward.
    Sound quality is good for Skype to Skype (incoming & outgoing) and Skype Out using Linksys SPA942 SIP phones as Asterisk extentions. Skype In has not been tested yet.
    DTMF does not pass thru and it is a problem as far as Digital Receptionist is concerned on the Asterisk machine.

  7. Michael Martin says:

    Could you post more explicit configuration instructions for Asterisk newbies?

  8. Alex Ayala says:

    I tested Uplink Skype2Sip and had no problems at all. Tested the following:
    1) Sip Phone (Cisco) connected to Asterisk to Skype, sound quality was perfect.
    2) Skype into Sip Phone, same result
    3) Skype to Asterisk which route to a cell phone (going through a SIP Gateway), quality wasn’t as good as the other but I think thats because is doing alot of routing eheh..if I routed through PSTN using FXO Card I probably get a lot better sound.

    Since I’m using Freebsd I don’t have ChanSkype as an option.

  9. raj says:

    This blog gave a brief understanding of how to connect skypetosip.
    I have tested Uplink Skype2Sip and had no problems .Sound quality was good when i tried to connect x-lite sip phone to a skype user using asterisk.
    But iam wondering how could i call a sip phone from skype using asterisk.
    Please any pointers on this.

  10. z_smurf says:

    Regarding problems with missing /dev/ivcsfifo* entries.

    I found out that the reason for theese not being created comes from the script “ivcs_load” which fails to insmod ivcs.ko.

    I recompiled ivcs.ko with the same version of GCC as the kernel is compiled with, and now it works.

  11. Luca says:

    Another valid solution that supports up to 30 concurrent Skype calls is Skip2PBX (
    Fully support SIP with G711 Codec.
    Just for your info.

Leave a Reply