Important: On newer firmware versions this procedure is not possible anymore.
This guide provides step by step instructions on how to change the default VoIP forwarding rule (5060 UDP/TCP) assigned to the AVM Fritz!Box, in order to use it with 3CX Phone System. We provide this guide as is and is excluded from any further assistance through 3CX Support. We can not guarantee that the changes mentioned will not impact any other functions of the device, for example, the built in telefony service. By using this guide, you agree that the changes mentioned, are made solely at your own risk. This guide is provided as a technical showcase only for the AVM Fritz!Box.
Change the default SIP ports on AVM Fritz!Box device
By downloading and reviewing the settings of the AVM Fritz!Box in NotePad++, you can see the port 5060 UDP/TCP is used by the default rule, “voip_forwardrule”, so port 5060 needed by 3CX Phone System cannot be assigned as a custom forwarding rule.
Fritz!Box Fon WLAN 7170 Default Settings
In order to change this default rule that is using port 5060 UDP/TCP follow the steps below.
Enable port 23 (telnet) on Fritz!Box
The following change can not be made from the user interface and must be done through telnet (port 23).
By default telnet is disabled, to enable telnet:
- Connect an analogue phone device with Fritz! on port “Phone 1”
- Verify that the phone is connected (you should be able to hear the analogue tone)
- Dial #96*7*, wait for 3 seconds and hang up the phone to open port 23 (telnet)
(You can disable telnet by following the above steps and dialing #96*8*)
Important: Always make a backup of your settings before you make any changes.
To connect to the Fritz!Box, download and run Putty.
1. Configure Putty in order to start the telnet session with Fritz!Box Fon WLAN 7170. (The example below is shows the default IP 192.168.178.1)
2. After starting the telnet session successfully you should have the output below:
Putty Telnet CLI
3. Edit the file ar7.cfg which can be found under /var/flash/. You can edit the file by using nvi command :
- nvi /var/flash/ar7.cfg
command nvi /var/flash/ar7.cfg
4. While viewing the ar7.cfg file , scroll down (using the arrow key ↓) to find the entry’s bellow at 13%:
- Line 182: voip_forwardrules = “udp 0.0.0.0:5060 0.0.0.0:5060”.
- Line 182: voip_forwardrules = “udp 0.0.0.0:5060 0.0.0.0:5060″.
Default Fritz! Port Forwarding
- After finding the default rule that is using the port 5060 UDP/TCP, press “i” to enable editing
- Change the ports from 5060 to, for example, 4060
Modify the rule voip_forwardrules to use the port 4060
- Press “esc” to exit the input mode
- Type “:w” > Enter to save the changes
- Type “:q” > Enter to quit the nvi (edit) mode.
- Reboot Fritz!Box Fon WLAN 7170 by typing “reboot”
5. After rebooting the device you will be able to see, in the settings, that the default rule that was using the port 5060 UDP/TCP is now using the port 4050 UDP/TCP, as defined via the telnet session in the previous step.
Fritz!Box Fon WLAN 7170 Custom Settings – After Telnet session
6. Access AVM Fritz!Box user interface you can now assign Port 5060 (TCP/UDP) to point to your 3CX Phone System.
Fritz!Box Fon WLAN 7170 – Port 5060 (TCP/UDP) assigned to 3CX Phone System