[sr-dev] Patch: Fix SRV lookups when dns failover is enabled

Øyvind Kolbu oyvind.kolbu at usit.uio.no
Tue Oct 8 03:15:58 CEST 2013


Ref the thread from september,
<http://lists.sip-router.org/pipermail/sr-users/2013-September/079760.html>

I've fixed SRV lookups to work when use_dns_failover is on and the
domain has no _sip._udp record. An example is cisco.com:

% host -t SRV _sip._udp.cisco.com
Host _sip._udp.cisco.com not found: 3(NXDOMAIN)
% host -t SRV _sip._tcp.cisco.com
_sip._tcp.cisco.com has SRV record 1 0 5060 vcsgw.cisco.com.
% host -t SRV _sips._tcp.cisco.com
_sips._tcp.cisco.com has SRV record 1 0 5061 vcsgw.cisco.com.

Currently attempting to call an uri at cisco.com will fail, unless
manually forcing the protocol.

While fixing the the issue I refactored a lot of code and fixed a plenty of
comments as the lookup code has clearly been copy pasted more than once.

Patch is attached and should probably be reviewed thoroughly as it touches
pretty core usage.

See some of you at Astricon tomorrow?

-- 
Øyvind Kolbu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refactor-srv-and-fix-dns-failover-srv.patch
Type: text/x-diff
Size: 19428 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20131008/2a48e1e2/attachment-0001.patch>


More information about the sr-dev mailing list