Hello,

 

I have a small question regarding the internal DNS resolver.

Here is my current Kamailio DNS configuration:

 

dns_try_naptr=on

use_dns_failover=yes

use_dns_cache=yes

 

I need the $HN variable inside my script and it appeared while testing that $HN(d) was null (and consequently $HN(f) was only containing the hostname part of the FQDN).

I know /etc/hosts file is bypassed when the DNS cache is activated, so I thought Kamailio was using the domain parameter set in the /etc/resolv.conf file in such cases in order to get the domain. But it was not.

 

I figured out Kamailio correctly retrieves the domain name as long as it is explicitly part of the /etc/hostname file.

Is my understanding correct or am I wrong somewhere? What if /etc/hostname does not contain the domain name but hostname only?

 

Thanks!

 

Cheers

Julien