Externhost not working anymore

Hi

I haven’t made any changes to my system, but a few days a go a friend emailed me and said my phone is constatntly engaged. I contacted my voip provider and they contacted me to say that asterisk was announcing itself bound to an internal IP address. They provided a screenshot and sure enough it is bound to 192.168.1.2.

I’ve had externhost set to my domain name for years and it’s always worked so I don’t know what happened. This seems to have come about after my internet went down a few days ago.

These are my settings:

type or paste code here[general]
alwaysauthreject=yes
canreinvite=yes
Qualify=yes
allowguest=yes
context=incoming
allowsubscribe=yes
dtmfmode=auto
allowoverlap=no
transport=udp
srvlookup=yes
limitonpeers=no
videosupport=yes
textsupport=yes
callevents=yes
notifyringing=yes
notifyhold=yes
registertimeout=60
limitonpeers=yes
call-limit=100
localnet=192.168.1.0/255.255.255.0
externhost=xxxx.net
mailbox=xxxx

Any ideas why this has stopped working?

Thanks

Nevermind. I found the issue. I had put my hostname mapped to 192.168.1.2 in my /etc/hosts file a few days ago to help setup a server and forgot to remove it. I wasn’t aware that asterisk would use that to resolve my externhost. Why doesn’t it just report whatever I put in there?

Asterisk should obey your resolv.conf with regard to how it resolves names.

But why is it resolving it at all? Why doesn’t it just report whatever I put in there?

Anyway, apart from that, is there a way to see what info asterisk reports to the outside world? When my voip provider contacted me they had a screenshot showing sip address, bind port and user-agent. How can I get to see that and any other relevant info that asterisk is responding with? I did look at nmap, but it doesn’t have a script for that sort of info.

Both sip channel drivers have CLI commands that will cause the actual protocol transmissions to be logged.

Thanks. sip show settings shows mi external IP so that’s ok.