similar to this topic I’m looking for an option to configure the SRV lookup in PJSIP.
For chan_SIP there is the autodomain option, which defines whether or not an additional lookup with the local domain is done. I’d very much like to set it to “no” in PJSIP, but I’m not able to find a similar configuration option.
PJSIP keeps making nonsensical DNS queries with my local domain appended like sipgate.de.home.lan. and _sips._tcp.sipgate.de.home.lan.
sipgate.de being my actual SIP provider domain
home.lan being my local LAN domain in which my Asterisk server is in with hostname asterisk.home.lan
Those requests naturally end in NXDOMAIN responses and do no harm, but they are annoying and do spam my DNS server.
autodomain in chan_sip doesn’t do that. It’s referring to local known SIP domains, not DNS resolution behavior. Instead the underlying system resolver can, while for PJSIP if the unbound resolver is in use it doesn’t. We actually have a feature request regarding adding support for behaving like this to the unbound one[1].
Thank you Joshua for your input.
I’m not aware of using the PJSIP resolver. I checked with module show if res_resolver_unbound is loaded, but it is not. I also checked my system for libunbound. It’s not installed. So, I believe my Asterisk is just using the system resolver. The resolv.conf of the system looks kinda simple
The nameserver directives contain the IPv4 and IPv6 addresses of my local DNS server. It’s also an Unbound instance, which contains the records of home.lan. and does the actual recursive resolving and caching. ndots is not set and should default to 1.
So, I’m a bit confused now. The system resolver should only append the search domain, if there are no dots in the name to look up. That is not the case for look-ups of any domain, including sipgate.de. Yet my DNS server log looks like this: