Showing posts with label voip. Show all posts
Showing posts with label voip. Show all posts

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

Saturday, 26 September 2009

VoIP of hoe kan het dat je ons kunt bellen op een Nederlands nummer in Italië?

Ik ben zojuist weer gebeld geworden op ons oude Nederlandse 045-nummer (regio Heerlen-Kerkrade dus). Leuk is altijd dat mensen verbaasd zijn dat we in Italië op ons oude nummer bereikbaar zijn (en dat dat ons vrijwel niets kost) terwijl menigeen in Nederland en Italië er al jaren gebruik van maakt, ongemerkt dan waarschijnlijk. Hoe kan dat nou???

even zo simpel mogelijk:
Internetbellen van KPN (of @home, of welke provider dan ook) wordt niet via de 2 oude draadjes van KPN gevoerd maar het gesprek wordt als kleine datapakketjes (zeg maar kleine MP3-bestandjes) op het internet gezet en verstuurd naar de andere kant.
Als beide partijen gebruik maken van internetbellen komt er geen conventionele telefooncentrale meer aan te pas, alles gaat in de vorm van datapakketjes en de modems van @home/KPN/XS4ALL/etc. zorgen voor het omzetten van spraak naar die pakketjes en weer terug. Dus, in JOUW modem wordt JOUW geluid (meestal spraak ;-) ) omgezet in pakketjes en via internet naar het modem van de ander gestuurd, daar wordt het dan weer in geluid omgezet.
Bel je met iemand die geen internetbellen heeft (of bel je naar een gsm) dan worden de pakketjes die in jouw modem zijn gemaakt via internet zo dicht mogelijk naar het netwerk van de ontvanger gebracht en daar worden ze dan door een modem omgezet in geluid geschikt voor het ouderwetse telefoonnetwerk of het gsm-netwerk.

Omdat geluid relatief weinig bandbreedte vraagt (3 min spraak kan in minder dan 1MB ) is het heel goedkoop en dus wordt internetbellen vaak heel goedkoop aangeboden, zo kun je vaak gratis bellen naar andere internetbellers (emailen en bestanden uitwisselen is toch ook gratis).

even een stapje ingewikkelder:
Maar hoe kan het dan dat wij op ons 045-nummer gebeld kunnen worden, we hebben hier in Italië immers geen abonnement bij KPN, @home, oid.
We hebben in 2007 ons KPN-abonnement in NL opgezegd en ik heb ons telefoonnummer overgezet (geporteerd) op VoIP (Voice over IP = geluid over internetprotocol). En dat heb ik niet gedaan (zoals vrijwel iedereen) bij mijn internetprovider maar bij een zogenaamde VOIP-provider. Nadeel van je eigen internetprovider is dat die je telefoonnummer koppelt aan je abonnement, wissel je van internetprovider dan loop je kans dat er iets mis gaat met de portering van je nummer, of ben je in ieder geval even wat minder goed bereikbaar.
Ik wil graag onafhankelijk zijn van mijn providers, dus gebruik ik geen email adres van hen (zoietsalsdit(at)home.nl), maar heb ik het domein sporck.it geregistreerd en maak ik mijn eigen email adressen aan (zoalsditdus(at)sporck.it). Zo ook met de telefoon, ik heb het telefoonnummer bij die VoIP-provider ondergebracht en ik kan onafhankelijk van plaats en internetprovider de telefoongesprekken ontvangen en voeren. Als je ons nummer belt dan gaan de datapakketjes via internet naar mijn VoIP-provider en die stuurt ze door naar mij. Is mijn modem thuis verbonden met internet dan rinkelt de telefoon in de kamer (in Italië).

maar het wordt nog mooier (en ingewikkelder):
Het protocol dat voor internetbellen meestal gebruikt wordt is het zogenaamde SIP-protocol, en om je aan te kunnen melden voor het kunnen voeren en ontvangen van gesprekken heb je maar twee (drie) dingen nodig:
1. het adres van de VoIP-server vd provider (bijv: sip.provider.nl)
2. een login en een wachtwoord
Normaliter voer je deze gegevens eenmalig in op je modem en vanaf dat moment kun je gesprekken voeren en ontvangen. Maar als ik die gegevens op mijn iPhone invoer in een SIP-programmaatje als fring kan ik ineens overal gebeld worden op ons Nederlandse 045-nummer op mijn iPhone, dus ook in de supermarkt, op het Lago Maggiore, op het vliegveld, of als ik in (bv) Nederland ben en op het WLAN van iemand terecht kan.



Nou gebruik ik het daar niet voor, maar het KAN wel!



En om het helemaal af/ingewikkeld te maken:
met het juiste modem kun je niet 1, niet 2, maar zelfs meerdere (in mijn geval een AVM Fritz!box 7170 voor 10 nummers) VoIP/SIP-accounts invoeren en ben je dus op meerdere nummers bereikbaar of kun je meerdere accounts gebruiken om te bellen. En zo zorg ik ervoor dat we zo goedkoop mogelijk bellen; zo bellen we vaste nummers in de meeste landen van de wereld gratis bellen mbv VoipBuster.
En natuurlijk heb ik ook een italiaans 'vast' VoIP-nummer uit de 0332-regio (Varese e.o.)...

en Skype dan?
Skype werkt alleen als je de software geïnstalleerd hebt en de PC hebt aanstaan, of een speciaal Skype-toestel koopt, maar dat is dan vrijwel hetzelfde als een SIP-toestel dat op zichzelf universeler is dan Skype.

Meer weten, zelf ook hebben???
mail me maar, maar kijk eerst vooral op sites van MottoVoIP (met name voor zakelijk gebruik) of BudgetPhone, of Google eens naar VoipBuster, Fring, enzo...!