[asterisk-dev] [Code Review] If DNS is unavailable at start-up, update peer address so registration works when DNS comes back

Simon Perreault simon.perreault at viagenie.ca
Tue Aug 2 10:41:31 CDT 2011


Not commenting on this patch (which looks good), but let me reassert something
that has been said multiple times:

The architecture of DNS in Asterisk is fundamentally broken.

What Asterisk needs to do is:
- Get rid of dnsmgr.
- Never store DNS resolution results in memory.
- Always perform a DNS query as late as possible (i.e. just before routing a SIP
message), use the resolution results for creating a socket, and discard them
right away.

For speed you just run a lightweight caching resolver (e.g. Unbound) on the
local machine or "close" on the network. It is not Asterisk's job to cache DNS
resolution results. That's reinventing the wheel, and making many mistakes while
doing so.

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the asterisk-dev mailing list