Monday 8 November 2010

VoIP, Fritz! and FastWeb ADSL

Image: Michal Marcol / FreeDigitalPhotos.net

I wrote this blog since it took me weeks to find out what was wrong with the VoIP-settings on my Fritz!box. Maybe this blog can help others to save time and to get things working right away.

My situation:
Since two months I am connected to internet via Fastweb ADSL at home. Because we live too far away from "civilization" I only get a 2Mbps max connection, but the VoIP quality is good (if not downloading at the same time). Before we were connceted via a wireless 4Mbps connection via EOLO which indeed offered faster downloads but because the distance between my receiver and their antenna was approx 13km the VoIP quality was unacceptable (packet-losses and -delays causing stuttering and echo).

Fastweb was in fact the only one offering us ADSL, the Italian Telecom's daughter Alice did not want to supply it. But although the connection is slow, too slow for 2010, it is stable and, most important, VoIP quality is good.

Setting up the Fritz!box 7170 for FastWeb (Router)
Already for quite some time (dating back when we still lived in the Netherlands) I am using the Fritz!box 7170 WLAN ADSL-modem/router for routing internet in our home and for connecting my Siemens SX353 ISDN Exchange to internet (using VoIP). With both EOLO and FastWeb the internal ADSL-modem is not needed (FastWeb delivers their own modem you are obligated to use), so it's only used as a router and FON.


After FastWeb delivered the line and the modem it was up to me to set up the Fritz. Piece of cake as far as internet is concerned.

  1. connect a PC to the FastWeb-modem, wait for DHCP to receive all settings and then memorize: IP, subnet-mask, gateway and both DNS-servers;
  2. now disconnect the PC from the modem, and connect the Fritz!box to the FastWeb-modem, using PORT 1 of the Fritz!box (very important) and connect your pc to the Fritz!box via LAN2,3 or 4 or WLAN;
  3. Log into the Fritz!box (see their manual), go to Settings>Advanced Settings>Internet>Account Info and edit the settings: 
    • Connection: internet via LAN1 (and not via DSL)
    • Operating Mode: Establish own internet connection (NAT router with PPPoE or IP)
    • Account Information: No account information required (IP)
    • Connection Settings: here you fill in the information you memorized from your PC before (IP address, subnet mask, etc.)
    • You might wanna set your connection speed so the Fritz can prioritize traffic (no idea if this really works, I have the impression it doesn't)
    • Apply the settings and reboot the Fritz!box

The router is now ready to go, maybe you still need to set up your LAN: DHCP Server, WLAN (don't forget to protect it with WPA2) and so, but then you should be able to connect multiple computers (and printers, iPads, iPhones, etc) to the Fritz!box.
The (Italian) website VoceSuIP.com was pretty useful in the steps described until here. 

But then the problems started. 
Because FastWeb is not giving each customer (expensive) its own public IP-address but a static private IP-address (usually in the 10.x.x.x range) instead the VoIP-providers have difficulty finding the Fritz!box in case of an inbound call. Outbound calls are no problem, the Fritz connects to the right provider (based on the dialing rules) and the call can be set up. Basically the path between the Fritz, through the FastWeb router to the various providers is only kept "alive" (by FastWeb) for a few minutes after the Fritz!box connects (after a reboot for example). 
But after a while not using the line (not making a call) the FastWeb routers forget about it and the connection between Fritz and VoIP provider becomes one-directional (Senso Unico so to speak). The Fritz sees the VoIP-servers but not the other way around. So in case of an inbound call the VoIP-servers can't deliver it to the Fritz!box. There is a mechanism provided in the Fritz!box that should keep the connection alive (Settings>Advanced Settings>Telephony>Internet Telephony>Advanced Settings>Keep port forwarding of the Internet router enabled for Internet telephony), but playing around with it did not help.

We use/have five different phone-numbers, two Dutch, two Italian and one Swiss number with three different providers. If you want to know why ask me via twitter or email, I don't think that it's relevant here. Strangely enough my Dutch numbers (from MottoVoIP.nl) were functioning but my Italian and Swiss weren't. After some mails between first/second line support of my Italian VoIP provider EuteliaVoIP and me I was contacted directly by one of their technicians via phone. I explained everything I tried, he did some suggestions that unfortunately did not work until as a last resort he suggested to dive into the heart of the Fritz via Telnet and change a configuration file (I just cut about 2 weeks of testing, probing, evaluating log-files, him contacting AVM-Fritz, etc. short into 3 lines). So I did as he said, enabled the Telnet, went into the Fritz, found the configuration-file, edited the settings he advised to edit, saved the file, rebooted the device and YES!!! even after hours not using the phone inbound call was working. Thanks to his support and a this site I found when Googling part of his solution I managed to get it working. Thanks a lot M.and EuteliaVoIP! We went really deep into this subject, I know many support-/helpdesks that would have blamed the provider, the hardware or whatever.

The reason my Dutch number were working has probably to do with the fact they are registered first in my Fritz!box and the keep-alive function only works for the first number and not the other ones. The solution, provided by AVM-Fritz themselves to the engineer at Eutelia, is to edit one by one the TTL-time of each SIP-subscription in the voip.cfg file. Why AVM doesn't put this option under the advanced settings is unbelievable, I have been trying various combinations/options (together with the Eutelia-engineer) but only this one works.

Setting up the Fritz!box 7170 for FastWeb (voip.cfg)

  1. Enable Telnet on the Fritz!box by dialing #96*7* on a phone connected to the Fritz!box (I saw telnet enabled appearing in the display of my SX353);
  2. Start a Telnet-session from a pc to the Fritz!box (the password is the same you use to enter the Fritz' web-interface)
  3. Start the nvi-editor and open the voip.cfg file with the following command

    • nvi /var/flash/voip.cfg

  1. Careful the nvi-editor is a very basic one
    • use / to search for ttl move to the 30m and with i enter in edit mode and change 30m into 3m (reducing ttl from 30 minutes to 3 minutes);
    • ESC brings you back in command mode, search for all other subscriptions and for each and everyone change the ttl to 3m;
    • when done :w writes the changes and :q quits the editor
    • give the reboot command and wait for the Fritz! to reboot.
  2. and afterwards don't forget to switch telnet off with #97*8*
This was what worked for me! 

Unfortunately this did not solve the same issue (no inbound calls) I have with my Swiss SIP-Account. So I am now about to get in touch with my Swiss VoIP-Provider (sipcall.ch) to find out how to get things working. I'll keep you updated.

update 17.Nov.2010
It seems that SIPCALL.ch is not capable of solving the problem. I get a lot of standard questions to check this, to check that, but at the end of the day it still doesn't work. Strang though that both MottoVoIP and EuteliaVoIP work perfectly now... and although the Fritz will be far from perfect Sipcall can't keep on blaming it if the other SIPs work without problems.

update 2012/2013
I changed provider again (back to EOLO but now with a faster connection of 8/1Mbps) and installed a Fritz!Box 7390 which is a lot faster and more flexible (apart from the extra features)

To Be Continued

10 comments:

  1. are you happy with fastweb? when i lived in venice i used to call it slow web - but then, in amsterdam i've glass fiber, quite a difference.

    jonneke

    ReplyDelete
  2. I am in Italy too and frustrated that Fastweb allows only three wifi connections. I do not need VoIP. As you seem to expert on the subject, can you advise me whether it is possible to set up another wireless router to get around the limit?

    ReplyDelete
  3. @Jeremy Yes you can! for that reason I did not even take the Fastweb Wifi-Router. Directly to the Fastweb-modem I connected my AVM Fritz!box 7170, which I use for VOIP and Wifi Access. Since it's in the basement I had to add an extra Wireless Access Point on the 1st floor. Of course the WAP is connected via cable to the Fritz!box. You can buy any cheap Wifi-enabled router (50eur) and connect that to the Fastweb modem. ATTENTION: make sure you can disable the modem in this router, you only need routing functionality, NOT the ADSL-modem. Or any Wireless Access Point (mostly more expensive then Wifi-routers)

    ReplyDelete
  4. No wonder why you receive countless of feedbacks.
    business tampa fl

    ReplyDelete
  5. An fascinating discussion will probably be worth comment. I do believe that you simply write on this topic, may well often be a taboo subject but usually individuals are there are not enough to communicate on such topics. To another location. Cheers VoIP Phones Atlanta

    ReplyDelete
  6. design companies
    Our skilled team helps you take control of your market’s local internet search results.

    ReplyDelete
  7. What an unprecedented possibility mobile app design services
    see this here to remove all of your infinite problems in just glimpses!!

    ReplyDelete
  8. I think this is a charming issue, I expect you would surely post on it again sometime near the future. Thanks guys!
    brand agency

    ReplyDelete
  9. Hi to all, the blog has really the dreadful information I really enjoyed a lot.
    custom logo design company

    ReplyDelete
  10. This means you get CNC machining a completely assessed top quality, sturdy and enduring sterile medical product. RESOURCE CENTERBlog Learn injection molding ideas, how-to’s, and industry tendencies. When plastics are molded, there are gates that enable the compound to cross through the mildew cavities.

    ReplyDelete