Fritz!Box, here's an Asterisk server

I have a Fritz!Box 6360 cable modem, and I believe this is the most common brand of cable or DSL modem supplied by German connectivity providers.

For some years now, our connectivity provider (which is also our telephony and television provider) has stopped providing a real telephone connection, and instead doing SIP between their systems and my cable modem, with analogue and ISDN sockets on the cable modem for plugging telephones into.

On the plus side (for the provider) this means our phone calls go over the same IP connection as our Internet data.

On the minus side (for us), if the Internet connection fails, we can't even phone the provider to make sure they know about it, unless we use a mobile phone.

So much for progress.

Anyway, the fact that the cable modem now speaks SIP means that:

  1. I can tell it to register to my Asterisk server and forward incoming calls to it
  2. I can create an account on it for my Asterisk server to connect to, so I can make outgoing calls from SIP phones

The first of these is not entirely obvious - there's a specific gotcha which makes the cable modem try to register to the Asterisk server with a username of the incoming caller ID if you don't know how to turn this off.

So, here are some notes on how to get these features working. Note they are written for a Fritz!Box 6360, running firmware version 85.06.53, in German. The same instructions may well work for other models, other firmware versions, and other languages, but this is the combination I have here, so it's all I can write about.

Fritz!Box -> Asterisk

Create a SIP account on your Asterisk server (it can be inside your own network, or out on the Internet; all that's needed is that the Fritz!Box can connect to it somehow).

  • use peer type "friend"
  • set the account to "dynamic"

Then create an account on the Fritz!Box to register to your Asterisk server:

  • Telefonie
  • Eigene Rufnummern
  • You should see listed here the number/s you have with your service provider
  • Click on Neue Rufnummer
  • Select as "Telefonie-Anbieter" SIP-Trunking mit Unterschiedlichen Rufnummern
  • Create a Rufnummer of your choosing (I use 6360, because that's what the cable modem is)
  • Set the same thing for Interne Rufnummer
  • Fill in the SIP credentials:
    • Benutzername: the account name you created on the Asterisk server
    • Kennwort: the account password
    • Registrar: the name (if resolvable by DNS) or the IP address of your Asterisk server
    • Proxy-Server: same as Registrar
  • Ensure that "Landesvorwahl" and "Ortsvorwahl" are both set to Keine
    • Without this, calls will come in to your Asterisk server with the username = incoming Caller ID, instead of the account username you set above, which means they always fail authentication
  • To get Caller ID passed through to Asterisk (so it can be shown on ringing telephones), select "Rufnummerunterdrücking" as CLIR über Displaynamen
  • Leave "Rufnummerübermittlung" as Deaktiviert

Click on Weiter and the Fritz!Box should register to your Asterisk server.

To get calls forwarded, you can now go to Telefonie - Rufbehandlung - Rufumleitung and create a Neue Rufumleitung

  • Select the destination number you want to forward calls for against Anrufe an eine Rufnummer
  • Assuming you want your normal telephone/s to ring as well as the call being passed through to Asterisk, enter the same destination number against Zielrufnummer eingeben
  • Select the SIP account number (6360 in the example above) for Abgangsrufnummer
  • Set ""Art der Rufunleitung" to Parallelruf
  • Click on OK

Repeat the above for each inbound number you have (I have 3 on my modem, because I used to have ISDN service, which in Germany comes with 3 numbers as standard).

Calls in to your numbers will now ring any telephones you have directly plugged in, and also be passed through to the Asterisk server, where you can do what you want with them in your dialplan. This is not a tutorial on how to write an Asterisk dialplan.

Asterisk -> Fritz!Box

To be continued…


Go up
Return to main index.