[Asterisk-Users] Re: Why is the internet connection important to LAN and PSTN calls?

Benny Amorsen benny+usenet at amorsen.dk
Wed Apr 12 00:43:20 MST 2006


>>>>> "JT" == Joseph Tanner <joseph at thetechguide.com> writes:

JT> A slightly better (in my opinion) solution would be to code a pure
JT> caching dns server, whose sole purpose is to look up specific
JT> domains and resolve them to their ip address. It'll record the
JT> result, and will check every so often (once a minute, hour, day,
JT> whatever) and update its results. If it cannot get an answer, it
JT> keeps using the last known ip address. If anyone knows of a really
JT> bare-bones, standards-breaking dns server that would say, check a
JT> flat file database each time a request is made, we could run a
JT> daemon that would check the domains we need to resolve; if no
JT> answer is received, we just skip that line. That way the daemon
JT> will be sitting there waiting for a dns answer, and not asterisk.

PowerDNS can do this (serve from a flat file). If I had to do this I'd
probably go with SQLite, not a flat file backend, but either way it
would work.

PowerDNS can't do the first half, pre-query and put into the database,
but a simple script could do that with SQLite. Just make a loop that
hits one of your own recursive servers, fetching all the interesting
records, and then maybe have a delay of a second or two between
iterations. The delay isn't really necessary, serving from cache is
fast.


/Benny





More information about the asterisk-users mailing list