Asterisk call is opened but looses connection

I’ve been trying to get Asterisk up and running but so far not much luck, at least when I use NAT. It works fine within the network. The problem is when calling a user or voicemail the connection is opened but after a few seconds it is closed. For example the voicemail says: “You have eight new” and then the connection is gone. The Asterisk console shows the normal output for a few seconds more but then also exists the connection.

The internal ip is 192.168.1.90 and ports have been forwarded from the router to the Asterisk server

sip.conf:
[general]
nat = yes
externip =externip
fromdomain = subdomain.dyndns-ip.com
localnet = 192.168.0.0/255.255.255.0

[2000]
type = friend
secret = 1234
host = dynamic

Console output
– <SIP/2000-00000001> Playing ‘vm-youhave.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘digits/8.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-INBOX.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-messages.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-onefor.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-INBOX.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-messages.ulaw’ (language ‘en’)
– <SIP/2000-00000001> Playing ‘vm-opts.ulaw’ (language ‘en’)
[Dec 28 14:11:37] WARNING[2772]: chan_sip.c:3778 retrans_pkt: Maximum retries exceeded on transmission 063df149-e910-e011-9a9b-00248c541961@roel for seqno 5 (Critical Response) – See doc/sip-retransmit.txt.
– <SIP/2000-00000001> Playing ‘vm-helpexit.ulaw’ (language ‘en’)
[Dec 28 14:11:44] WARNING[2772]: chan_sip.c:3778 retrans_pkt: Maximum retries exceeded on transmission 043d9a4d-e910-e011-9a9b-00248c541961@roel for seqno 2 (Critical Response) – See doc/sip-retransmit.txt.
[Dec 28 14:11:44] WARNING[2772]: chan_sip.c:3805 retrans_pkt: Hanging up call 043d9a4d-e910-e011-9a9b-00248c541961@roel - no reply to our critical packet (see doc/sip-retransmit.txt).
== Spawn extension (default, 2999, 1) exited non-zero on ‘SIP/2000-00000001’

Tried a different version of Asterisk (latest)?

Any settings on your router affect the amount of time a connection can remain open?

Register a phone. Immediately make a call once it’s registered. How long does it last?

Do you have the qualify option turned on for that peer?

I didn’t try other versions of asterisk, the version I use is 1.6.2.11. It came with the AsteriskNow iso.

Registering a phone always works. That connection isn’t broken only the connection of the phone call. So, the duration of conversation is always about 2seconds whether I call immediately or an hour later.

There is no differce in the duration of the call when I switch the quality=yes / no

P.S. I’ll get back on the router settings. The network administrator needs to check this.

I think i found the problem. When monitoring the packages at the softphone pc i found this:
87 6.699104 AsustekC_54:19:61 Broadcast ARP Who has 192.168.1.90? Tell 192.168.1.99

I noticed the same thing when watching the the asterisk console with the sip debug on, the ip send is 192.168.1.90 instead of the externip.

What did do wrong in the configuration?

when running sip show settings, i get this

SIP address remapping: Disabled, no localnet list
Externhost:
Externip: 0.0.0.0:0
Externrefresh: 10
Internal IP: 81.93.63.50:5060
STUN server: 0.0.0.0:0

It seems the externip is not even set.