[SR-Users] NAPTR/SRV lookups fail when use_dns_failover is enabled.

Jeremy Gadd jeremygadd at gmail.com
Fri Jan 20 17:47:19 CET 2017


Thanks for the response!

DNS lookups work in Kamailio as long as use_dns_failover is set to "off."
It's only when the failover is enabled that they break. I think this means
it's not a DNS issue, but something in Kamailio.

I should mention we're pointing to Verizon's services with many many
thousands of customers, so it's unlikely to be misconfigured DNS (unless
it's something local that only breaks when use_dns_failover is enabled?)

On Fri, Jan 20, 2017 at 12:37 AM, Carsten Bock <carsten at ng-voice.com> wrote:

> Hi,
>
> we have the following settings and those work fine for us (Kamailio 4
> and later):
>
> # Do SRV-Loadbalancing:
> dns_srv_lb=yes
> # Always prefer IPv6:
> dns_try_ipv6=yes
> # DNS-Based failover
> use_dns_failover=yes
> # Query NAPTR-Records as well (we use NAPTR, so the client can detect
> the outbound Proxy (P-CSCF), but internally we only use only
> SRV-records)
> dns_try_naptr=no
>
> Sounds to me, like a DNS problem, not a Kamailio problem.
>
> In our DNS Zone, we have the following, for example:
>
> wt                      1D IN A         84.46.93.82
> wt                      1D IN A         84.46.93.84
> wt-1            1D IN A         84.46.93.82
> wt-2            1D IN A         84.46.93.84
> wt              1D IN NAPTR 10 10 "s" "SIP+D2U"         ""
> _sip._udp.wt
>
> _sip._udp.wt    1D SRV 10 1 5060 wt-1
> _sip._udp.wt    1D SRV 20 1 5060 wt-2
>
> On Debian/Ubuntu, you can verify this with Sofia-SIP (apt-get install
> sofia-sip-bin):
>
> carsten at carsten-HP-EliteBook-840-G3:~$ sip-dig wt.ng-voice.com
> 1 1.000 udp 5060 84.46.93.82
> 2 1.000 udp 5060 84.46.93.84
>
> Thanks,
> Carsten
>
>
> 2017-01-19 22:58 GMT+01:00 Jeremy Gadd <jeremygadd at gmail.com>:
> > Hello, everyone!
> >
> > I'm trying to enable dns_srv_lb but I'm stuck just before I can get
> there.
> > If I don't enable use_dns_failover, lookups work and calls route but
> always
> > to the first host. We need to load balance, so that doesn't work very
> well.
> >
> > If I enable use_dns_failover, the lookups stop working completely and we
> get
> > a dns lookup failure like so:
> >  ERROR: tm [ut.h:296]: uri2dst2(): ERROR: uri2dst: failed to resolve
> > "redacted.hostname.here.com" :unresolvable A or AAAA request (-7)
> >
> > This works:
> > use_dns_cache=on
> > dns_use_search_list=no
> > dns_try_naptr=on
> > # use_dns_failover=on
> >
> > This breaks it:
> > use_dns_cache=on
> > dns_use_search_list=no
> > dns_try_naptr=on
> > use_dns_failover=on
> >
> > I have checked to see that use_dns_failover is compiled in:
> > version: kamailio 4.4.2 (x86_64/linux)
> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> > DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> > Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> > FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> > USE_DST_BLACKLIST, HAVE_RESOLV_RES
> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> > MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> > id: unknown
> > compiled with gcc 4.9.2
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
>
>
>
> --
> Carsten Bock
> CEO (Geschäftsführer)
>
> ng-voice GmbH
> Millerntorplatz 1
> 20359 Hamburg / Germany
>
> http://www.ng-voice.com
> mailto:carsten at ng-voice.com
>
> Office +49 40 5247593-40
> Fax +49 40 5247593-99
>
> Sitz der Gesellschaft: Hamburg
> Registergericht: Amtsgericht Hamburg, HRB 120189
> Geschäftsführer: Carsten Bock
> Ust-ID: DE279344284
>
> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> http://www.ng-voice.com/imprint/
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170120/f59f0dea/attachment.html>


More information about the sr-users mailing list