[SR-Users] Kamailio not using system resolver for hostname resolution (DMQ)?

Karsten Horsmann khorsmann at gmail.com
Mon May 25 18:27:04 CEST 2020


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 at 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 at sbcpub0-stage-lhe0-cn1:/root# systemctl restart kamailio
> root at 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 at 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 at 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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200525/d27d3e42/attachment.html>


More information about the sr-users mailing list