Fritzbox and 3cx

3cx is a commercial PBX software solution (Private Branch Exchange, basically a phone switch). They offer a free self-hosted variant which they claim is free forever.

Highly configurable, it implements a fax server, answering machines, ability to forward calls between local extensions. And on top of this an Android app !

Benefit for me would be that I could finally implement blacklists to block unwanted callers from spamming me with their calls. Other benefit is that 3cx provides a custom subdomain for each private installation, taking care of matching it to my private (dynamic) IP, generating the required SSL certificates for it… so besides setting up the necessary port forwardings on my DSL router, nothing is needed to be able top connect to the 3cx system when on the road. This works in both directions: I can initiate calls through my usual providers, but on the other hand my mobile phone is ringing when getting phone calls at home.

The Fritzbox 7270 is quite an old model (12y old), but it is good enough. It provides DECT connectivity with FritzFon wireless phones. The old FritzOS6.x however only supports banning 6 phone numbers, by far not enough nowadays. Unfortunately, there are no further FritzOS updates available for the model.

3cx setup

I installed 3CX in a Proxmox VM based on a debian ISO image they provide. Some people claim that it’s also possible to run it inside a container, but I didn’t want to take the risk. Important: 3cx doesn’t officially support Proxmox, though they claim to support KVM…

Resource requirements are quite small - 4GB RAM and 2 cores are sufficient for my home infrastructure

Connecting to Telekom

  • Create new SIP trunk, choose Provider DE/Telekom
  • Authentication ID is the phone number (without the international extention)
  • Authentication password is the password to connect to the Telekom account on their website
  • Very important: toggle the connection type from “TCP” to “any” to also allow UDP connection. This seems to have been mandatory since 1 month (see https://www.andysblog.de/3cx-telekom-sip-trunks-registrieren-sich-nicht-mehr#more-20861)

This has to be repeated for each phone number (MSN) - declaring multiple MSNs within a single trunk didn’t seem to work.

Connecting Fritzbox to 3cx

See also https://www.andysblog.de/fritzbox-samt-mobilteile-als-dect-system-an-3cx-anbinden

In the Fritzbox, add new phone number

  • Phone number is the 3cx extension (e.g. 100)
  • Username and password are the credentials found on the provisioning tab when editing the user
  • Registrar is the IP of the 3cx system
  • Very important is to check the option “use own number for connection” - own number means the extension

One final culprit : the FritzBox has to be located inside the same network segment as the 3cx VM. It was first hidden by a masquerading firewall - no SIP connection could be established, and the IP of the firewall ended in the IP blocklist of the 3cx system !