DNS Question


I have a simple question. When and how often does Asterisk resolve the IP address of the provider’s domain name? I had always made the assumption that Asterisk only does a single domain resolution once at start-up then caches the address. I am working with a client who is consistently receiving messages indicating all circuits are busy and other strange behavior. After some digging around I realized their ‘previous’ admin never configured DNS forwards on their Windows DNS server which means every DNS request was timing out before hitting their DSL router which then did a recursive DNS request to the provider’s DNS server. This lag was never noticeable until a few weeks ago when I suspect some additional load has been placed on the provider’s DNS server introducing additional latency.

This also made me wonder if I shouldn’t be advising clients to add the trixbox server address to the DNS forward and reverse look up zones when possible? Does Switchvox/Trixbox/Asterisk try to resolve its own hostname via DNS?

I should note the two may not be related. I am just curious how and why Asterisk works the way it does. Thank you for sharing your knowledge!


I think you are looking for this?

Taken from the TFOF

You can set qualify to yes, no, or a time in milliseconds. If you set qualify=yes,
PING messages will be sent periodically to the remote peers to determine whether
they are available and what the latency between replies is. The peers will respond
with PONG messages. A peer will be determined unreachable if no reply is received
within 2,000 ms (to change this default, instead set qualify to the number of milliseconds
to wait for the reply).
qualifyfreqok and qualifyfreqnotok
These two settings are used to determine how frequently Asterisk should ping a
peer when qualify is set. The qualifyfreqok setting determines how often to ping
the peer when it’s in an OK state, and qualifyfreqnotok determines how often to
ping the peer when it’s not in an OK state.
You can set qualifysmoothing to yes or no. If enabled, Asterisk will take the average
of the last two qualify times. This helps eliminate having peers marked as LAGGED,
especially on a lossy network.