Asterisk behind Fritzbox

Thanks for your answer. I will try to explain my situation.

I have an Fritzbox 5490 (Fiber version) with integrated sip server. The Fritzbox has connectors for analog and ISDN phones. I’ve connected one analog phone to the box. (This phone has the internal number **1) On the Fritzbox I’ve also configured my sip provider, so I can make external calls.

The reason why I also want to use Asterisk behind the Fritzbox is to make automated calls. (I have a home automation system which should alert me with a phone call when a smoke alert is triggered) I’ve tried several other solutions (sipcmd etc), but none of them worked without problems, so I’m trying to this this using Asterisk.

So what I’am trying to do is configure Asterisk so it is able to send calls to my analog phone, and also make an external call over the Fritzbox if the analog phone is not picked up. This is why if configured the outbound route to route all calls to the Fritzbox. (I don’t need internal calls in Asterisk)

To test this I’ve setup an internal extension with number 2000 in Asterisk and connected a software sip phone to it. From this software phone I’am now trying to call the analog phone **1 connected to the Fritzbox. The other way (call the software sip phone from the analog phone) is already working.

This is why I’ve setup the connection to the Fritzbox using a trunk.

== >I’ve just found out that outbound calls work if I set the outbound route dial pattern to “+[0-9][0-9][0-9][0-9].”, so I just need to know how I can also route the **1 calls to the Fritzbox. At the moment I get the following log output in Asterisk when trying to call this number:

app_directed_pickup.c:302 pickup_exec: No target channel found for 1@from-internal.
app_directed_pickup.c:302 pickup_exec: No target channel found for 1@PICKUPMARK.

How can I route these calls also to the Fritzbox?