The contract with my Internet service provider includes a VoIP connection. Together with the FRITZ!Box 7270 all phone calls are done over the Internet, an additional conventional phone connection isn’t necessary anymore. One of the benefits of this is that you can connect to your registrar from everywhere in the world. But that’s theory, cause e.g. my provider doesn’t allow a connection if you are not in the network of the provider itself. Of course there are free services like sipgate or even Skype. There you could make free calls within the services itself, but as soon as you like to call a real phone number you have to pay. They are cheap, no question, but my contract includes a flat rate within Germany. That’s even cheaper. So what I like to do is to use my VoIP phone connection even when I’m not at home. In the following third part of the FRITZ!Box tuning series, I will explain how to achieve this. As already said in the first two post, where you at least should read the first one, I’m not responsible for anything happens to your FRITZ!Box after you have tried what is described here.
Adding a softphone to the FRITZ!Box
The FRITZ!Box fully supports softphones in its basic configuration. Adding new softphones is done in the web frontend in the extended configuration section. There is a wizard for this, where you have to answer some question about your new device. Select phone as device, LAN/WLAN (IP-Phone) for the connection type, choose a name and a password. You get a new internal phone number which usually starts at 620 for the first created device. The FRITZ!Box try’s than to connect to the new device. You can skip this for now. After that you have to select which official phone number the new device should use. This is important cause this will be displayed as the caller id when you make a call. Now you could choose if the new softphone should react on all incoming calls, regardless of the phone number called, or only on a specific one.
Configuring the client software
I will explain the client setup with the help of a free VoIP software called Telephone. It’s only available for Mac OS X, but there are many other VoIP clients out there which also works for other operation systems. After downloading and installing it you have to create a new account. Select a descriptive name for the account. For the domain use fritz.box, as username you have to use the internal number the FRITZ!Box selected above. Lets use 620 for now. The password is the one you chose previously. After the account is created, I had to select Substitute “00” for “+” in the advanced settings, cause the phone numbers in my address book are all saved with the international phone prefix of Germany which is +49. Assuming you are working in your home network right now, you should be able to connect with Telephone to your FRITZ!Box. Some simple tests like making an outgoing and incoming call with an additional mobile phone should verify a working setup. Some nice features like the Mac OS X Address Book integration, which also transfers incoming caller id’s to real names if they are found in the address book, making Telephone a really useful application. For further phone call management functionality on Mac OS X, I can advice you to take a look at the also free software Frizzix.
Allowing calls from everywhere
All the previously isn’t any magic, cause it uses build in support of the FRITZ!Box. But this article is about allowing connections to the VoIP part of the FRITZ!Box from everywhere. To make this happen we have to edit an internal configuration file of the FRITZ!Box. This time we aren’t change the ar7.cfg file, but a file called /var/flash/voip.cfg
. As the name suggest there is most of the VoIP configuration included. Use nvi to edit it and search for a section called extensions. There should be a newly created one which have a value extension_number with 620. Change the value reg_from_outside from no to yes. This section should then look like the following:
extensions { enabled = yes; username = "$$$$SSFSDFSOPKSFDOPK;LWE§REWSDFMKFSLDF3232SDFSDFSDF"; authname = ""; passwd = "$$$$DFS342ASDFSDFDSFDS§344WLKKHMSJHAJHASDAHQASLKADJSA"; extension_number = 620; reg_from_outside = yes; tx_packetsize_in_ms = 0; }
Save the file and reboot your FRITZ!Box by typing reboot
. Next we have to tell Telephone to use a proxy when connecting to the FRITZ!Box. Go to the advanced settings and add your DynDNS name, in this example it would be xtestx.dyndns.org, to the proxy field. That’s all. Now you should be able to make calls from every network you are currently logged in.
Conclusion
This simple change to the internal configuration of the FRITZ!Box allows you to use your VoIP account from everywhere over the world. As nice this feature is, I like to add some words of caution at the end. First you need a good download and especially a good upload connection speed in your home setup, cause all phone calls are routed over the FRITZ!Box. Secondly I didn’t know if VoIP transfers are encrypted in any way, so be aware that there is the possibility someone monitor your calls. And as last note you should understand that you opened a port on your FRITZ!Box for everyone, which in the case your password is stolen, could be abused. In the worst case someone use your account to SPAM other people or call expensive service numbers.
Great article thanks for posting!
Actually, the file is /var/flash/voip.cfg Typo or firmware difference? 😉
# find / -name ‘voip.cfg’
/etc/default.Fritz_Box_7270_16/avme/voip.cfg
/var/flash/voip.cfg
Whoops, seems I was fl[
u|a]shed somehow ;). Thanks for reporting, I updated the article.Chris
Sorry, I forgot to say thanks for sharing!
Yet one thing, you don’t have to restart the whole device, you only have to restart voipd daemon:
# voipd -s
# voipd
Hi, this doesn’t work for me. I cannot register with the fritzbox via the WAN. Thoug I can via fritz.box internally.
Do I need to forward ports? Or is this done automatically (opened UDP 5060?)?
Yes you can register from everywhere but you cannot call. RTP audio packets are conducted to LAN only (http://www.ip-phone-forum.de/showthread.php?t=202293&page=1). So you need to solve the RTP transfer yet.
Can I register 4-5 ATA-s with Fritz!box fon WLAN 7170 so I can call them locally instead using voipcheap or other betamax clones as gateway?
No real idea what you are talking about, but I guess this is more a question for the AVM support.
Chris
BTW I have these ATA-s on different locations.
did any1 actually get this working in the end WITH sound… i have it working fine makes the call etc, just no sound 🙁 …. from what i found searching google etc its something to do with RTC/SIP/passthrough on the initial connection?? but tried many things and cannot get the sound working 🙁
Very dumb question how to save the file when i have change it. What is the command.
:wq
ESC :wq RETURN
well not sure this will get read sadly, let alone responded to !
But AVM’s newest firmware release (5.22) have now made this feature available officially 🙂
with a proper settings in the GUI
althou i still have the same issue with no audio,
im wondering if its something that i have done via these hack(s) ??
Meanwhile many fritzbox firmware version have this switch in the UI.
As SIP might not be encrypted with a call from outside, I strongly recommend NOT to do this like explained here.
If I am on the road with my Mac, I use the Fritz VPN service, and the native macOS VPN client to VPN into my home. Then the telefon app work like in the local net, AND the traffic in encrypted via the VPN.