I know this is a tired topic… outgoing calls are fine, incoming calls drop after 32 seconds.
I was able to solve the problem by changing my External address in NAT settings under Asterisk SIP settings to my external IP address instead of my dynamic DNS address (12345.deployments.pbxact.com). The problem is I have a dynamic IP address, so I can’t leave that as an IP address.
I thought the point of having a dynamic DNS address was so I could put that in the external address field. Am I mistaken? Will the external address auto-update if the external IP address changes?
(Oh, and yes, the dynamic DNS domain resolves to the correct external IP address, the same as the IP entered in “external address” that works.)
Yes, by definition , if your address is dynamic it means it changes,
You need a ‘dynamic DNS’ service that updates your ‘name’ to your changing IP address, but by nature, your underlying A record will take it’s TTL (time to live) to propagate around the internet which depending on the NS resolver the client uses, expect many minutes, If you want that not to happen, you need to get a static IP, there is no other resolution
The point of dynamic DNS is to work around the use of a low grade consumer quality internet service, but there are various levels of such service. Good ones will stick on the same address unless, you disconnect from them for an extended period. Some may not survive a short disconnection. Some may change the address at intervals (possibly to discourage the use of servers). And some may change the address each time a TCP or UDP session starts.
I understand the limitations of dynamic DNS as opposed to a static IP.
What I don’t understand is why I cannot use my dynamic dns hostname in the external address field.
Edit: To clarify, this isn’t a TTL problem. The DNS is resolving correctly, but the audio on inbound calls drops after 30 seconds if I don’t use the IP address as the "external address. "
Here’s a capture with pjsip logging enabled. I think I cut it at the beginning and end correctly. But I didn’t try to remove any of the chatter in the middle between all my extensions, etc.
Yes. It is behind a firewall that is forwarding all UDP and TCP traffic coming in on ports 5060,5061,10000-60000 to the local Freepbx server internal IP address.
I’m guessing that 75890157.deployments.pbxact.com is also your host name and has an entry in /etc/hosts mapping it to 127.0.0.1. This overrides the dynamic DNS value, causing the bad Contact header.
If this is indeed the case, either change the dynamic DNS name (which does correctly map to your Fuse IP address) or the local hostname, so they don’t conflict. Otherwise, provide details about /etc/hosts or other location that is causing the bad mapping.
At some point I must have been confused about hostname, thinking it needed to be the FQDN the machine is reachable at (which is the dynamic DNS name). After reading more, I think I understand what I did wrong.
After changing the machine hostname and restarting, it appears to be working properly. Thanks!