Keep getting 'Failed to perform async DNS resolution' error from pjsip/unbound resolver


Not sure why but I keep getting this error and pjsip can’t register if I specify as my provider:

ERROR[21495]: res_resolver_unbound.c:306 unbound_resolver_resolve: Failed to perform async DNS resolution of ‘’

This is followed by:

WARNING[25535]: res_pjsip_outbound_registration.c:796 schedule_retry: No response received from ‘’ on registration attempt to ‘’, retrying in ‘60’

(If I enter the IP, pjsip will try to register correctly.)

DNS resolution on the system seems to work fine. “host” and “dig” both return the correct IP for me. Other things I’ve tried:

  • adding an entry for in /etc/hosts but res_resolver_unbound seems to ignore it.
  • specifying Google’s nameserver in /etc/asterisk/resolver_unbound.conf (using the nameserver= option).
  • upping the debug logging in /etc/asterisk/resolver_unbound.conf but that doesn’t give me any more data (same with core set debug 65535 and core set verbose 65535).

At this point I’m out of ideas on how else to debug this and hoping somebody here is smarter than me.

Debian 9
Kernel: 4.19.0-2-amd64
Asterisk: 16.2.1~dfsg-1 (Debian-provided package)

Does it happen all the time? Is it sporadic?

Happens all the time. I’ve restarted Asterisk numerous times now and simply cannot get this error to go away. (Internet link has been reset in between as well.)

I think I’ve managed to work around the issue by blacklisting, I added this to modules.conf and now pjsip is able to register correctly using the DNS name:

noload =>