HowTo: Replacing SkypeOut with Asterisk and a softphone.

There are many guides online that will tell you how to setup Asterisk with various services. What I never found, though, was a simple guide that showed how to use Asterisk to replace SkypeOut. Why would you want to do this? Maybe because you want to pay less, or you don't want to pay to make toll-free calls.

This guide presents you with everything you need to get up and running, and if you've got a Mac, this will take you 5 minutes or less, thanks to the efforts of, which has provided Mac binaries for Asterisk.

I assume that Asterisk is already installed and running (because I don't have the technical know-how to walk you through that one). If it's not, there are a hundred guides to get you started. I also assume that you're using X-Lite, although Windows users would be better off to use Firefly, from what I hear. Maybe I'll rewrite the guide when Firefly gets ported to Mac.

Everything was tested on an Apple 2005 15" PowerBook running Mac OS X 10.3.9 and 10.4, but that shouldn't change a thing since asterisk's configuration files are identical no matter what the operating system. I haven't tried AstWin yet, but I imagine that it's exactly the same Asterisk setup.

In addition to Asterisk and X-Lite (or any other softphone of your choosing), you must have an account with a VoIP provider. I suggest VoIPjet as they offer $0.25 of communications free-- which goes quite a long way since it's only $0.013/min-- without requiring anything more than a valid email address. You might also try nufone, although you're on your own for setting it up.

Use multi-tasking to your advantage. Since X-Lite is 10MB and AstWin is a whopping 120MB, why don't you start downloading them now while making your VoIP account? I'll walk you through getting an account with VoIPjet.

(If you're in a rush, or you've already read the HowTo, you can probably skip over my explacatory ramblings and just look at the areas in bold and in small print.)


First, go to and click on the "Instant IAX Test Account" image. Fill in the form, being careful to put in the proper email address. Note, although VoIPjet only accepts PayPal, you can still make an account with them for the free $0.25 credit. It won't let you talk more than 20 minutes, but at least in 20 minutes you can verify that Asterisk is working and decide if VoIPjet is for you.

On the next page, you'll be presented with some server details. Ignore them for the moment. Just click on the last link in order to validate your email address. Now, go check your email. If you haven't gotten a confirmation email yet, wait 10 minutes. Even in the day of instant information, things can take a little time. Once you've found the email, open it up and click on the validation link. Voila, you're ready to go.

That should take you to a new page verifying that your account has $0.25 in it. Click on the first link: "Click here to view instructions on setting up Asterisk to send calls to VoipJet". Leave this page open, we'll need it later. If you absolutely must close it, save the VoIPjet account number and secret.

Now that you've downloaded the programs and set up your VoIP account, go ahead and install everything before continuing to the next step.


Ready? Okay, let's go. We'll start with the config files. The three most important files are linked below. You can download them directly, and put them into your /etc/asterisk folder. If you're interested in knowing how I created them, I explain further down ALL configurations that I did.

WARNING: you should always backup your existing files as these will replace them and any configuration you might have already had will be lost. I like to rename the existing *.conf files *conf.working as it's easy to find something that worked before you started monkeying around with everything.

Copy these files into /etc/asterisk


After that, you must edit them just a tad bit. In extensions.conf, you have to change the account # and your caller ID number in the VoIPjet context (section).

exten => _1NXXNXXXXXX,1,SetCallerID(1234567890); Set your CallerID as a ten digit number like this. See our FAQ
exten => _1NXXNXXXXXX,2,Dial,IAX2/1234@voipjet/${EXTEN} ; NANPA
exten => _011.,1,SetCallerID(1234567890); Set your CallerID as a ten digit number like this. See our FAQ.
exten => _011.,2,Dial,IAX2/1234@voipjet/${EXTEN} ; WORLD
;Change, in the above two lines, 1234 to your account number!

So, if your regular telephone number were 1(800) 506-9511 and VoIPjet account # were 2905, you would put 18005069511 in place of 1234567890 and 2905 in place of 1234. This gives:

exten => _1NXXNXXXXXX,1,SetCallerID(18005069511); Set your CallerID as a ten digit number like this. See our FAQ
exten => _1NXXNXXXXXX,2,Dial,IAX2/2905@voipjet/${EXTEN} ; NANPA
exten => _011.,1,SetCallerID(18005069511); Set your CallerID as a ten digit number like this. See our FAQ.
exten => _011.,2,Dial,IAX2/2905@voipjet/${EXTEN} ; WORLD
;Change, in the above two lines, 1234 to your account number!

Likewise, you must change iax.conf. In iax.conf, find the section

; Calls through VoIPjet
secret= xxxxxxxxxxxxxxxxxxxxxxxxxx

Replace the "xxxxxxxxxxxxxxxxxxxx" with the code that VoIPjet gave you in the setup instructions.

X-Lite softphone

Download and install X-Lite.

X-ten has said that X-Lite is no longer being developed, thus there shouldn't be any new versions coming out.

X-Lite is a very annoying program to configure. Just copy the images below EXACTLY and you should be fine.

Preferences >> System Settings >> Network

Preferences >> System Settings >> SIP Proxy >> [Default]

Preferences >> Advanced System Settings >> SIP Settings



Run Asterisk. On Mac, this is as easy as downloading the Asterisk Launcher, from our friends at Just open it up and click "Start". Nothing to it.

For the other systems, follow the instructions for your platform. Odds are, you only have to type


at the command line. (If you want to see what's going on, you can type asterisk -c to have it run in console mode. )

Open up X-Lite. Click on the green telephone, dial 500 and then hit enter. If you get a message welcoming you to Asterisk, congratulations! You should now be able to dial any phone number in America by simply dialing it in X-Lite, and any overseas number by first dialling 011, then the country code. For instance, if you found this HowTo useful, and wanted to call me in France to thank me, you'd dial 01133613712856, where 011 is the VoIPjet prefix for international calling, 33 is France's country code, and the 613712856 is my phone number. (Well, almost. In Europe, they commonly add a leading 0 to numbers when calling from within the country. So my phone number is actually


(Slightly) Advanced: FWD and Toll-free Dialing

It bothers me that with SkypeOut and VoIPjet I have to pay for toll-free numbers as if they were normal ones, especially when calling customer or technical support and wait ingon-hold for hours. Fortunately, FWD lets you call American toll-free numbers for, well, free, along with many free numbers in other countries. This is a million times better than Skype, isn't it! So, let's get it all set up so you can make free toll-free calls.

Then, make an account with FWD. WARNING: Make certain that you write down your user ID before continuing, since this is your login ID. I have mixed reports about getting a confirmation email and once you continue there's no going back.

After you have your account number in hand, we need to enable account support for Asterisk. Visit the IAX activation page and click on the link "A: Visit this page and check the "Active" box"..." After that, click the "Active?:" checkbox and click "Submit". You should have a confirmation message saying that your account settings will be modified in 10 minutes.

Now let's configure Asterisk. Open back up iax.conf and extensions.conf.

At the top of extensions.conf (near line 44) fill in your account information in the following section starting with ;set IAX2 vars for FWD ; REPLACE THESE WITH YOUR SETTINGS. For instance, if you are Fred Flinstone and your FWD account number is 314152 and my password "circle", that gives:

FWDNUMBER=314152 ; your calling number
FWDCIDNAME="Fred Flinstone"; your caller id
FWDRINGS=xlite ; the phone to ring
FWDVMBOX=1000 ; the VM box for this use

At the bottom of extensions.conf (near line 356) uncomment (that is to say remove the ; at the beginning of the line) the following lines:

;include => fwd-inbound
;include => fwd-${FWDNUMBER}

Save and exit.

In iax.conf, find (near line 134) and uncomment the line register =>

Then fill in your FWD account number and password. For instance, still using account number 314152 and password "circle":

; To register using IAX with FWD, it must be enabled by visiting the URL
; Note that you need an extension in you default context which matches
; your free world dialup number. Please replace "FWDNumber" with your
; FWD number and "passwd" with your password.
register =>

A little further down in iax.conf (near line 198), again put in your FWD account information in the [fwd-123456] section. Make sure you replace 123456 with your account number in the [fwd-123456] section! Using the same example, username 314152 and passwd "circle":

[fwd-314152] ; outbound connections to FWD
callerid="Fred Flinstone"<314152>

Now shutdown Asterisk and restart it again. Let's test it. Call 393612 to have the time. If it works, great! Now call a toll-free number, I suggest dialing 18005069511 (AT&T automated responder for calling cards). If that works, you're in like Flynn. Now whenever you dial toll-free numbers it will automatically use FWD instead of VoIPjet.

If you want to add calling capabilities for other countries included in the list of toll-free numbers, just copy the line exten => _1800.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}*${EXTEN},60,r), paste it right after the exten => _1888 line, and adapt it to the new countries. (I don't know how. If I did, I'd tell you. Why don't you just give it the old Oxford try?)

Comments and Acknowledgements

Personally, I still keep Skype on my system, and only load up Asterisk when I want to make a phone call. IAX seems to be a pretty good protocol, but I've still had times when I could get out with Skype, but not with Asterisk. Furthermore, I really like the chat features, so I suggest keeping it on your system.

That's it, this is the end of the non-techie section. If you 're interested in learning how and my config files work, check back in a couple weeks.

A big thanks goes to Benjamin Kowarsch and the group whose patience and dilligence helped me set up Asterisk for the first time.

Questions? Comments? Send mail to:  . Or just got back to my blog.