[asterisk-dev] [Code Review] If DNS is unavailable at start-up, update peer address so registration works when DNS comes back
Mike Myhre
digium at aeisecure.com
Wed Aug 3 11:56:04 CDT 2011
If Asterisk starts and no DNS is available, outbound registrations
will fail indefinitely. This patch copies the address from the
sip_registry struct, which will be updated, to the peer->addr when
necessary. If dnsmgr is enabled, the registration fails without the
patch because even though the address on the registry is updated via
dnsmgr, the address is just copied on the first try. Since we use
ast_sockaddr_copy, dnsmgr can't update the address that is copied to
the sip_pvt or peers.
Just thought I would throw in a comment regarding 1.6.2 in case you guys weren't aware. If DNS is enabled, and working, and internet connectivity is lost, the DNS lookups will timeout (30 second delay or more) and asterisk will go not responding during that time. In my case, there are POTS lines that are used for failover when the SIP lines go down and the DNS lookup attempts (for the SIP trunk peer) make it so you can't even answer the POTS line (it rings, but you pick up the phone and it won't bridge the call) because Asterisk is so bogged down. I have changed my SIP trunk peer to an IP address to work around the problem, but if they change their IP my service will go down.
This may have already been addressed in newer versions, or maybe there is a way to shorten the DNS timeout time to a couple seconds.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110803/85546a9a/attachment.htm>
More information about the asterisk-dev
mailing list