Monthly Archives: October 2006

Asterisk: Use Callthrough To Avoid Roaming Charges

I just figured out an easy way to avoid unnecessary roaming charges when being abroad with your mobile phone. All you need is a running Asterisk server and a prepaid card of the country you are in. It works like this:

1. Buy a local SIM card:

When abroad, you first buy a local prepaid SIM card for your mobile phone. That means that you get a phone number for the country you are in and you can already be reached for free (okay, you have to tell your friends your new number, of course). This is by now doable because in many countries the prices for prepaid SIM cards have dropped and especially the MVNOs offer in many countries prepaid cards with cheap national call rates.

2. Register with FreeWorldDialup (FWD)

Next to that, you need an account at FWD, a free internet SIP service. Also every other SIP provider works, which accepts calls from the “open” Internet. Normally, all the providers allowing you ENUM entries should work, too. At FWD, you get a virtual SIP number (i.e. 123456).

3. Locate a local access number

The guys from SIP Broker offer many local access numbers from different countries. Locate the number, which you can reach from your purchased prepaid card for the national (cheap) rate.

4. Let Asterisk do the rest

Now activate your new FWD number in Asterisk, specify all the details in the sip.conf as usual. Now the most important part: Create a kind of dial-in menu in your extensions.conf:

In this example, incoming calls to the FWD number are signaled at extension 4444 (only the most important parts of the dialplan are shown here):

;incoming calls are routet to “callin”
exten => 4444,1,Goto(callin,4222,1)

;creates a DISA menu with access to the options in “callinmenu”
exten => 4222,1,background(menu)
exten => 4222,n,DISA(no-password|callinmenu)
exten => 4222,n,Hangup

;the actual menu: pressing “1” gives you the mailbox, “2” lets you dial internal numbers, “3” lets you call normal numbers via “callthrough”

exten => 1,1,voicemailmain
exten => 1,n,Goto(callin,4222,1)

;internal calls
exten => 2,1,background(pls-entr-num-uwish2-call)
exten => 2,n,DISA(no-password|internal)
exten => 2,n,Goto(callin,4222,1)

;external calls via callthroughscript
exten => 3,1,Authenticate(1234)
exten => 3,n,Goto(callthrough,s,1)

;you enter the number here, pressing “*” during a conversation ends the call and you can dial a new number
exten => s,1,Set(NR=)
exten => s,2,Background(privacy-prompt)
exten => s,3,ResponseTimeout(10)
exten => s,4,WaitExten

exten => _X,1,Set(NR=${NR}${EXTEN})
exten => _X,2,Goto(s,3)

exten => *,1,Goto(s,1)

exten => #,1,Dial(SIP/${NR}@sipoutgoing,25,Hg)
exten => #,2,GotoIf($[${DIALSTATUS} = NOANSWER]?4)
exten => #,3,GotoIf($[${DIALSTATUS} = CONGESTION]?4:5)
exten => #,4,Playback(vm-nobodyavail)
exten => #,5,Goto(s,1)
exten => #,102,Playback(tt-allbusy)

exten => t,1,Playback(vm-goodbye)
exten => t,2,HangUp

4. Let’s use it

Now that everything is ready, you can try to use your own callthrough gateway. Dial with your mobile phone the local access number. At the prompt, enter *393 (to connect to FWD) followed by the FWD number (so in total *393123456). The call is now routed from your mobile phone to the local access number and via the FWD account you just created to your Asterisk server. The server picks up and you can for instance dial “3”. Now you have to authenticate yourself (in the example press “1234” as PIN) and then you can dial the number you want to reach. This second leg of the call goes now via your normal sip provider specified in Asterisk to its final destination.

Call For Free

By doing this, you can call home for as low as 17 cent per minute (15 cent from your mobile phone to the local access number, 2 cents per minute from the server to the destination, for instance). This is lower than the standard roaming charges (around 1,40 Euro per Minute). In some countries, there are prepaid cards that allow you to call for a fixed amount to national numbers. With this combination it is theoretically possible to call for free. As always, no warranty is given for this how-to.

If you don’t have an Asterisk server, this solution would also be possible with a calling card that has a local access number. However, all the calling card providers I used in the last few years were really unreliable and the quality of the calls was often really crappy. Here you can do everything (except for the local access number) on your own.

Commercial Night: We are s(th)inking!

Last Tuesday, there was the “Commercial Night” in Maastricht. In a cinema-like setting, funny commercials, which had been awarded with a “Cannes Lion“, were shown.

Commercial Night

But not only the commercials were funny. Also the flyer for the Commercial Night gave the economics or business students in the audience fantastic career perspectives by stating that “The evening is hosted by Tom Sligting, who studied commercial economics and worked for a couple of years in the marketing/commercial sector. Today, Tom works as a stand-up comedian […]”

Some of the commercials were really funny and I found them also on YouTube (no copyright infringement here because these are commercials and everyone should buy the advertised products!). So enjoy and please purchase all of the following products or services:

Writing a letter to the insurance:

Germans who don’t understand English very well:

A really short call:

A rabbit singing operas: