Slider 2TryLearn MoreSlash your Phone bills - Slider Image

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

How to Change The Default Port on an AVM Fritz!Box to use with 3CX Phone System

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-Wlan-7170Fritz!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

Fritz!Box-Putty ConfigurationPutty Configuration

2. After starting the telnet session successfully you should have the output below:

Fritz!Box-putty-OutputPutty 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

Fritz!Box-Puttytelcommand 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”.
  • Line 182: voip_forwardrules =  “udp″.

Fritz!Box-Putty-DeafultDefault 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

Fritz!Box-Putty-ModModify 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-Notepad++ Custom SettingsFritz!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 5060 NATFritz!Box Fon WLAN 7170 – Port 5060 (TCP/UDP) assigned to 3CX Phone System

Now you can proceed and assign the rest of the ports needed by 3CX Phone System. The full list of ports to assign, can be found here.

By |April 28th, 2015|Comments Off on How to Change The Default Port on an AVM Fritz!Box to use with 3CX Phone System

Free for up to 1 year! Select preferred deployment:


for Linux on a $200 appliance or as a VM

Get the ISO


for Windows as a VM

Download the setup file

On the cloud

In your Google, Amazon, Azure account

Take the PBX Express