mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-04 18:30:25 +00:00
If a hostname is specified for stunaddr in rtp.conf, periodic DNS resolution is enabled based on the TTL returned in the DNS results. If the TTL returned is 0, it means that the next time the IP address is needed, it must be looked up again. I.E. Don't cache. Historically (and incorrectly) however, res_rtp_asterisk stopped the periodic resolution and never re-resolved the hostname again. Besides what's mentioned in the user notes... * Additional debugging was added in various STUN/DNS functions. * The `rtp show settings` CLI command shows more detailed STUN info. * Some debugging was added to dns_core.c and dns_recurring.c. UserNote: A new `stunaddr_reresolve_ttl_0` parameter has been added to rtp.conf that allows control over what happens when a STUN server hostname lookup returns a TTL of 0. The values can be set as follows: - 'no': This is the historical (and current default) behavior of not doing any further lookups and continuing to use the last successful result until Asterisk is restarted or rtp.conf is reloaded. - 'yes': Use the last cached result for the current call but trigger re-resolution in the background for the benefit of future calls. If the result of the background lookup is a ttl > 0, periodic resolution will be restarted otherwise the next call will use the new cached value and will trigger a background lookup again. UserNote: A new CLI command `rtp resolve stun hostname` has been added that will force a resolution of the STUN hostname and (re)start periodic resolution if the result has a TTL > 0. Resolves: #1858