[index] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]
Interfacing with Skype
I've had mediocre success getting my cow-orkers to use my "work" Asterisk server. Sadly, many of them are stuck behind NAT at the office during the day which caused all sorts of problems trying to get SIP to pass through unruined. I was never able to get some of them successfully registered so deployment has always been incomplete within my group.
Compounding matters, many of the people who were unable to get SJPhone or X-Lite working have been quite happily using Skype to talk to each other and it was doubly-challenging to try to convince them to migrate to the Asterisk system. For the past six or seven months we've had half the people on Asterisk and half the people on Skype. Skype's ability to fall back to TCP when necessary, and it's slick and polished client (with IM facilities) is just too user-friendly to fight with some people.
Since it doesn't seem like we'll ever see a chan_skype for Asterisk, I set up what I think is the next best thing. A hardware Skype "ATA" interface which will let me route calls from Asterisk onto and from the Skype network. I was surfing the web one night and stumbled across an ad for an AU-600 Skype VoIP Gateway device. It's basically like a SIP ATA but it gives you an FXO and an FXS interface onto a Windows machine running the Skype client (via USB). For $50 I figured it was worth just picking one up to see if it would work.
I grabbed the AU-600 and bought a second FXO port for my Digium TDM400P and wired it up as a second incoming Zap channel on my Asterisk box. I have a headless XP box in the server room right next to the Asterisk box (I use it to run Quicken via RDC) which I used to host the Skype client software. The AU-600 is plugged in to the USB port on the XP box, and the FXS port on the AU-600 is plugged into the FXO port on my TDM400P. When I receive a call over skype, it "rings" my Zap/3 channel and I can route the call just like I would as if it were coming in from a normal PSTN line.
How's it work?
In practice I find that it's working just great. My Skype-using friends and colleagues have no idea that I'm routing though asterisk, and I get to use my nice Cisco 7960 to talk with them instead of some crappy PC headset. I set them up with speed dial numbers in the Skype client, which lets me call them over the Skype channel using the magic dialing sequence (configurable) in the AU-600.
I decided to use the convention of all Skype speed dial numbers being two digits. Then I set up the dialplan to use a dialing prefix of "8" to denote a Skype call. So from Asterisk I dial "8NN" to call Skype speed dial "NN". I had to embed some "w" waits into the dialplan to make the AU-600 happy.
What I did in the dialplan
; Incoming calls from Zap/3 which is my Skype FXO
[skypein]
exten => _.,1,NoOp(Incoming Call from Skype FXO ${CALLERID}
exten => _.,2,Set(CALLERID(number)=8${CALLERIDNUM})
exten => _.,3,Goto(default,200,1)
exten => h,1,HangUp()
; Route to Skype using AU-600 FXS
[skype]
exten => _8XX,1,NoOp(Outbound Skype Call ${EXTEN:1})
exten => _8XX,2,Dial(Zap/3/#w#w${EXTEN:1}w*)
Yeah, so it's ugly, but it works
It's $50 I wouldn't have had to spend if Skype were open. I'm not helping "the cause" of open VoIP by coddling my Skype-using friends. But damnit, I like being able to call to and from Skype without losing all my fun Asterisk features and hacks. With this rig-up of parts I can start ignoring the routing details with Skype just like I do with the PSTN now too. I'm quite happy with the solution.
© Copyright 1995-2008 David McNett. All Rights Reserved.
