Liever in het Nederlands? Klik hier.
Fritz box nice-to-knows
Use nvi instead of vi.
When editing .cfg files in the fritz box, vi is not an option. Instead use "nvi". This is a script made by AVM. It will copy the data in the .cfg to a normal format, allow you to edit it, and write it back in the special format that is needed.
Adjusting the used codecs in your fritz!box. < tip
First thing to do is switch-on telnet by dialing #96*7* Attention: This makes the webinterface display the message: "The modifications to your FRITZ!Box are not supported by the manufacturer." or in the newer firmware "Changes not supported by manufacturer". The message does not bother me.
You will need putty or a dosbox to make a telnet connection to your fitz!box.
The file you need to edit is
/var/flash/voip.cfg. It can be edited using
The interesting lines are:
use_audiocodecs = yes;
Additionally you will need to restart the voipd deamon. This can be done using these commands:
voipd -s (to stop)
Wireshark / ethereal
After the change wireshark traces show this (g729 is missing; old screenshot):
The old list, seen with wireshark, before changing the no to yes looked like this.
You can make a packet trace using your fritz box. Copy and past this link to you browser and things will get clear.
How codec sellection works in VoIP?
A SIP invite contains a part called the "media description". In this part the the initiating party gives it's list of preferred codecs in order of frefference. The receiving party receives this list and comparis it to it's own list. If the first codec in the invite message is supported by the receiver, this will be used. If not, the next in the list will be sellected. In the SIP reply messge will be a 200 OK containing a list of codecs that are mutually supported. These will be in the same order as in the invite.
This means that for receiving or making a call, different codecs could be used if the preference order is different. The initiating party is sending the invite. For receiving a call you will receive the invite.
Why change this?
Because you experience bad audio quality and have seen in settings > telephony > internet telephony > voice transmission that you are using G.729a as a codec. This is a 8 Kbit codec and you probably would prefer G.711 which is a 64Kbit codec and delivers better audio.
Yup. I use two VoIP providers. Voipbuster for outgoining and incomming calls and Budgetphone for incomming calls only. Only budgetphone gave me the codec issue. Why? I'll show you.
Here are the two media description parts of a SIP Invite comming into my fritz box.
First from an invite from budgetphone. G.729 is at the second place and G.711 is at the 4th.
Update Juli 2008: Budgetphone has changed their settings. PCMA and PCMU are the first two in their list. I do not know when this was changed.
And from an invite from voipbuster. G.711 is at the first place.
Which codec has which name?
These are the most important codecs that I've seen. There are many more and the fritzbox supports many more. This site shows a more complete list.
Adjusting your fritz!box firewall.
No changes to the firewall can be made via the GUI. The only way is to use the telnet tool again. In /var/flash/you can find a file called ar7.cfg. This file can be edited using again nvi.
In this change I've blocked ICMP traffic from a certain host.
ar7cfgchanged is the command that you need to enter after the change to apply the new settings.