VoIPowering Your Office with Asterisk: Getting Free Long Distance

"Peering" with a centralized directory service is one way your Asterisk server can become a gateway to toll-free calling, worldwide.

 By Carla Schroder
Page of   |  Back to Page 1
Print Article

One of the big attractions to VoIP is the promise of free worldwide long distance. Call anywhere anytime over the Internet for nothing. What could be sweeter?

It's a pleasant dream, but the reality is that while you can escape the tyranny of long distance charges, it will still cost something. You have to pay for bandwidth and equipment, and invest some time and skill in running your Asterisk server. And the telcos are understandably unhappy at the idea of losing all that revenue, even as we still use their wires. I can't predict how they will ultimately react to the upheaval caused by VoIP and Asterisk, but something is going to change sooner or later.

Whatever the future brings, for now you can enjoy saving money and having greater flexibility by peering with other Asterisk servers. Suppose you have far-flung branch offices, or vendors or other business partners that you need to talk to a lot. You can set up your own private network of Asterisk servers and bypass the telcos entirely. In typical Asterisk fashion there are a number of ways to do this. We will look at two: using DUNDi, the Distributed Universal Number Discovery protocol, and using a central directory service like Free World Dialup. Today we'll learn how to use Free World Dialup. DUNDi is distributed protocol that eliminates the need for a central provider; we'll learn how to implement it next week.

Free World Dialup
Free World Dialup (FWD) is a free central directory service that lets you easily find and connect to other VoIP users. You may connect either with an IP phone, or your Asterisk server. FWD supports both voice and video transmissions.

Warning: The FWD Website has a rather irritating habit of opening every page in a new browser tab. On the other hand, you may like this. At any rate, you have been warned.

Connecting your Asterisk@Home server to use FWD is fairly simple. First you register for a FWD account, then configure your server, and then you're ready to make and receive calls. Remember, this is a VoIP service only—it does not give you access to the PSTN.

Setting up a FWD account
Registration is pretty simple, but there are a few little gotchas. The first one is finding the registration page—click the "Learn More" tab, then click the "Quick Start Guide" link. After you are signed up, click the "Extra Features" link in your account and activate IAX. This is how you set it up to use your Asterisk server. Keep hitting the "Submit" button until it says "Congratulations, your changes have been successful." For any changes you make anywhere in your account, be sure to look for a confirmation before moving on.

You may also want to fill out your user profile. This has useful options like opting out of marketing emails, and selecting whether you want your listing to be public, or unlisted.

Your password and login will be emailed to you, so you should change your password right away, since email is not secure.

Server Configuration
Fire up AMP. Start with Setup -> Trunks -> Add IAX2 Trunk. Under "General Setting", set "Outbound Caller ID" to your FWD number, or people will see only your extension number.

Now go to "Outgoing Settings." The "Trunk Name" can be anything; it should be descriptive so you know what it's for, like "FWD."

"PEER Details" are just like this example, except you must substitute your own username, which is your FWD number, and password:


"Incoming Settings" needs to have these entries:

USER Context: iaxfwd

USER Details


"Register String" is username:secret@iax2.fwdnet.net. Using our example from PEER details, it would be 123456:bar@iax2.fwdnet.net.

Click "submit changes", then go to Outbound Routing -> Add Route. Name it FWD.

Enter 393|X as the dial pattern, though this can be any number you like. 393 spells FWD on your dialpad. This is your Free World Dialup dialing prefix.

Select "IAX2/fwd" as the "Trunk Sequence," click "Submit Changes," then click the red APPLY changes bar at the top of the page.

Finally, make sure you have the FWD public key installed. Log into Asterisk server on the command line and take a look:

# ls /var/lib/asterisk/keys/
freeworlddialup.pub iaxtel.pub voicepulse01.pub

And there it is. If it isn't there, this means you have an old version of Asterisk@Home. Either upgrade, or get the key from downloads.fwdnet.net/freeworlddialup.pub.

Testing the new trunk
Try dialing some Free World Dialup numbers. Dial 393613 to hear an echo test, or 39355555 to connect to a live volunteer. Your welcome email may have other numbers you can try out.

Come back next week to learn how to set up peering without needing a central provider.

Asterisk: the Open Source PBX
On-Demand Webcast: Moving to VoIP: Should You Go It Alone?
My very own Linux Cookbook is designed for beginning-to-intermediate Linux system administrators and users
TCP/IP Network Administration, Third Edition is a great networking reference

This article was originally published on May 30, 2006
Get the Latest Scoop with Networking Update Newsletter