Hi George, 
 

you could set the used dns server in Kamailio to only one and setup an dnsmasq for example that is number one in /etc/resolve.conf. 

dnsmasq can handle /etc/hosts as source or you combine your dns domain with upstream dnserver (so dnsmasq ask for domain foo your server baa). 

If you turn on dns request logging in dnsmasq you see what your server is doing / asking for. 

Just as an tricky hack. I needed that for one carrier that used split brain dns in public. 

Cheers 
Karsten 


George Diamantopoulos <georgediam@gmail.com> schrieb am Di., 19. Mai 2020, 16:43:
Hello all,

I've come across this today when trying to setup DMQ replication:

root@sbcpub0-stage-lhe0-cn1:/root# systemctl restart kamailio
root@sbcpub0-stage-lhe0-cn1:/root# kamcmd dmq.list_nodes
{
        host: 172.30.154.189
        port: 5090
        resolved_ip: 172.30.154.189
        status: active
        last_notification: 0
        local: 1
}
root@sbcpub0-stage-lhe0-cn1:/root# getent hosts dmq-ng.services.domain.com
172.30.154.189  dmq-ng.services.domain.com
172.17.130.13   dmq-ng.services.domain.com

root@sbcpub0-stage-lhe0-cn1:/root# grep dmq-ng /etc/kamailio/*
/etc/kamailio/kamailio-module-params.cfg:modparam("dmq", "notification_address", "sip:dmq-ng.services.domain.com:5090")

In another case, where the resolving IPs for the DMQ service hostname were listed as A records in DNS, this worked as expected.
In this case, the second host of the DMQ group is not listed in dmq.list_nodes, despite its being set in /etc/hosts, as shown by the getent command.

Doesn't kamailio use nss for hostname resolution? Am I missing something else? Thanks!

BR,
George

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users