I use Asterisk 11 with FreePBX 12. Our SIP Provider is Telekom Germany. We have sometimes problems with incoming and outgoing calls. I hope I can explain it understandable.
For example, Asterisk sends a REGISTER to 126.96.36.199 (tel.t-online.de ), the message is answered with OK and the peer is registered.
Usually INVITES comes now from this ip address. All works fine. But sometimes INVITES comes from an other IP address, for example 188.8.131.52. This request Asterisk responds with 401 Unauthorized.
In the next register procedure REGISTER are sent to the new ip address and answered also with OK. But qualify OPTIONS are continue be sent to the old ip address. Incoming and outgoing calls are canceled. Outgoing calls are answered with Forbidden.
Even if the REGISTER procedure works with the new ip address, the peers are connected with the old address.
Waiting doesn’t help, only a „sip reload“ update the ip address of the peer.
What is the solution for this problem? How can asterisk update the peer?
The Asterisk is local behind a NAT with a firewall, following settings are used:
externhost with DynDNS
stun with stun.t-online.de
nat=yes srvlookup=yes allowguest=no trustrpid=no insecure=invite qualify=yes