Skip DNS caching if resolv result is empty, REF 14793
There are debug messages in Asterisk indicating that it is trying to send a Register SIP request to an unknown address:
"Processing response 503 from @�X ..."
Probably it happens because it uses an invalid address from DNS cache.
However, this fix doesn't fully solve the issue described in the ticket. It seems like if the first DNS request failed then it can not recover, unbound_resolver_resolve()->ub_resolve_async() returns empty results - still under investigation