Fritz!Box as Asterisk-Client


Since I like everything that is more open than just having Open in its name, (like Open Source or OpenVPN) I wanted to talk to my company via Internet. My first approach was to use Ekiga as a softphone on my Windows-PC connected via PPTP to our Server.
Indeed, it worked but a softphone is not really comfortable and you always need a headset and a running PC.

Then it came to my mind that I was doing VOIP-phone calls all over the time via my Fritz!Box and my account at the telephone company. So why not simply create a second VOIP-account on the box registering at the asterisk-server in the company?

It's a pity that the box does not offer VPN-functionality. But as I have a 24/7 homeserver running, I established the VPN connection over it.

If you have no homeserver, you may want to try mods like Freetz to establish a VPN-tunnel. (Just an idea, I did not try and maybe it does not work). You should not try to manage it without VPN since SIP-authentication is in plain text and if some hacker manages to read it, he can place free phone calls all over the world!

The following requires a VPN-connection to be established between your network and the net of the asterisk-server.


A SIP-account on the box is easily created. Use the local IP-address of your asterisk as SIP-server since the box won't be able to resolve names of the remote LAN. On the asterisk-side, the account gets a new SIP number. I did not specify an extension for it since for me it is not necessary that colleagues can call me at home at my extension. And I put a line callerid="Robert Loos" <15> in the definition of the phone in sip.conf, so if I call from home, the called party sees my normal extension and is not confused about unknown phone numbers.

Of course, if you really want, you can link your Fritz!Box to your office phone if you modify your office-extension to call both SIP-accounts in its dial-command: exten => 15,1,Dial(SIP/15&SIP/115) where 15 is the number of your office-phone's sip-account and 115 is the SIP-number of the Fritz!Box.

I have the Fritz!Box connected to a Gigaset-ISDN-base. If I wanted the phones to ring at extension 115, I had to add this as MSN in the Gigaset configuration menu, too.

So, with only few efforts, I can call anyone in my company for free from any phone in my home. I could even use my company's trunk line to make cheap long distance calls. In my company this works on a base of bilateral trust but it can easily be restricted if you put your Fritz-account in a context which is only allowed to call local extensions.
The gain for the company is that the Fritz!Box could be anywhere out in the world and people from there can make national calls for national charges.

The quality is surprisingly well if you note that there is only a 2Mbit Internet connection, even with additional web traffic there are only few short dropouts (which I would call dipouts as they are hardly noticeable and not disturbing). I did not try to use QOS up to now since it simply works as it is.


If you experience poor audio quality you may want to try a different codec. In my setup, G.726 (the "DECT"-codec) produced poor quality. GSM is supposed to use least bandwith but is not supported by Fritz!Box. I allowed alaw at asterisk's sip.conf and the quality is fine.

Dial out

To use the newly created SIP-account in the Fritz!Box for dial-out, you have to look up the account number in the IP-telephony-settings of the box. Here you see something like *127#. To call the colleague at extension 16 you have to dial *127#16# on the Gigaset. If you dialed only 16, the box would use your default account which would not know the phone number 16. Of course, you can add a corresponding entry in the phone book. I'm not sure what the terminal sharp is for but without it, it does not work.

Of course, this would not only work with a Fritz!Box but with any PBX with SIP-capabilities. Details may differ.