Asterisk 18.0.1: wrong SIP Gateway displayed on incoming calls

Hi all,
I have an Asterisk Server behind a Fritz!Box.
All incoming lines from my provider are configured on the Fritzbox and set as SIP clients on the Asterisk like so:


port = 5060
bindaddr =
language = de
disallow = all
allow = alaw
allow = ulaw
allow = gsm
allow = g729

register => 626Cisco:[SECRET]@

type = peer
username = 626Cisco
secret = [SECRET]
host =
fromdomain =
fromuser = 626Cisco
nat = no
canreinvite = yes
insecure = port,invite

context = 10_SIP
type = friend
secret = [SECRET]
host = dynamic
nat = force_rport,comedia

On the Fritz!Box the MSN1 is bound to the extension “626”.
I spare out the rest, because the issue can be replicated by a single line object.
If I call from outside to the number of my MSN1 the call is routed to Asterisk and forwarded according to the dialplan:


;Incoming Call on MSN1 (xxxxx) 60 sec ring, than voicebox
exten => 626,n,dial(sip/10,60);
exten => 626,n,VoiceMail(9);
exten => 626,n,hangup();

The Fritz!Box has IP and the Asterisk
on the SIP Device registered with “10” this is displayed:

I can pickup the call, but I cannot call back if I miss, because the SIP Gateway is displayed from the Fritz!Box.
What do I need to change, that the caller is changed to

10 is broken if it is using the From address to determine the request URI to be used for transfers; it should be using the Contact address, which should always be the either the true address, or the externhost address.

Your From domain is being set by fromdomain, in the general section.

(Also, nat=no is almost certainly unnecessary, and inseure=port is probably unnecessary. canreinvite is now called directmedia.)

Ah, ok.
I missunderstood the “fromdomain” completely, as it somewhen back in my first steps was set this way, while troubleshooting the Fritz!Box connection.
I never changed it, and it never turned to be an issue as I am using SCCP devices mostly.
Now starting with some SIP devices it came up on a call back attempt.

So thanks for that!
After changing it to the correct ip (or better FQDN) of my asterisk, it works as expected.

For the other values I have to check later on.
It is a small home environment and used very rarly.