[Home]

Summary:ASTERISK-10505: srvlookup should be defaulted to "yes" in code and config example
Reporter:John Todd (jtodd)Labels:
Date Opened:2007-10-11 17:44:59Date Closed:2007-10-15 11:39:11
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:
Asterisk should default to looking up SRV records for SIP calls.  There isn't a clear reason why it is currently set to "no" as the default.  I would suggest that in the code (if no "srvlookup" line is specified) that the default be enabled, and that in the configuration file the setting be "yes" as a default as well.

****** ADDITIONAL INFORMATION ******

Most (>75% in my experience) SIP destinations are served only by SRV records, with no A records.  This means that every time I configure an Asterisk box (or tell someone how to configure it) that I have to remember to set this to "yes" otherwise most calls fail.  This makes creating instruction sets for other SIP projects difficult, as there is _always_ another step in telling people how to turn on SRV lookups.

The argument that "This takes additional DNS time" is somewhat spurious except in the most outrageous corner cases.  While it may be the case that DNS lookups take a few seconds, activating SRV records will not take a significantly longer time than doing an A record lookup.  This is because the bulk of the time spent in a DNS lookup is not requesting the actual A record from the remote server, but in fact is spent trying to contact and communicate with the intermediate DNS servers for the lower parts of the tree.  Once those records are cached, doing an SRV record lookup should be only as latent as the network between the two nameservers (resolver and authoritative system.)  In other words, it is not sppreciably different than doing an A record lookup on the same name, so why is this not active by default?

Given that the Internet is typically about 60ms wide these days for most transactions, this seems a fairly low post-dial-delay price to pay for the lack-of-pounding-my-head-on-the-table or complaints of "SIP doesn't work!  I tried user@domain.net and they have a SIP server but Asterisk said host not found."

And for those systems in which DNS lookups take too long with SIP SRV records, there is always the option of turning it off manually.
Comments:By: Digium Subversion (svnbot) 2007-10-15 11:35:00

Repository: asterisk
Revision: 85604

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r85604 | russell | 2007-10-15 11:35:00 -0500 (Mon, 15 Oct 2007) | 6 lines

Make the default for the srvlookup option to be yes.  It doesn't really make
sense for it to default to off.  The default configuration file has it on, and
proper RFC behavior, as indicated by a comment in the code, is for it to be on.
So, let's have it on by default to make lives easier.
(closes issue ASTERISK-10505, suggested by jtodd)

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-10-15 11:39:11

Repository: asterisk
Revision: 85605

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r85605 | russell | 2007-10-15 11:39:11 -0500 (Mon, 15 Oct 2007) | 14 lines

Merged revisions 85604 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85604 | russell | 2007-10-15 11:54:57 -0500 (Mon, 15 Oct 2007) | 6 lines

Make the default for the srvlookup option to be yes.  It doesn't really make
sense for it to default to off.  The default configuration file has it on, and
proper RFC behavior, as indicated by a comment in the code, is for it to be on.
So, let's have it on by default to make lives easier.
(closes issue ASTERISK-10505, suggested by jtodd)

........

------------------------------------------------------------------------