Michael Lunsford
2005-Aug-10 06:49 UTC
[Asterisk-Users] SRV implementation supporting priority
Does anyone know when Asterisk is supposed to support prioritization of the SRV records returned. I think it's accepted that right now the Asterisk always just uses the first record returned regardless of priority. I also noticed, on register, that it queries for an A record first. If it gets a response, it will use that address to send the REGISTER. If it does not, then it will launch an SRV query and use it. If SRV is enabled, it should try to use that first. For example, the A record for acmemanufacturing.com may point to their web server and they wish to use the same domain for their sip services (ie. joeuser@acmemanufacturing.com). If they try to register joeuser@acmemanufacturing.com to their SIP provider, the asterisk will resolve the web server via A record and send the request there. Using 1.0.9
Eric Wieling aka ManxPower
2005-Aug-10 06:57 UTC
[Asterisk-Users] SRV implementation supporting priority
Michael Lunsford wrote:> Does anyone know when Asterisk is supposed to support prioritization of > the SRV records returned. I think it's accepted that right now the > Asterisk always just uses the first record returned regardless of > priority.I wonder if this is fixed in CVS-HEAD? I guess I could check the changelog. -- Eric Wieling * BTEL Consulting * 504-210-3699 x2120
At 9:49 AM -0400 on 8/10/05, Michael Lunsford wrote:>Does anyone know when Asterisk is supposed to support prioritization of >the SRV records returned. I think it's accepted that right now the >Asterisk always just uses the first record returned regardless of >priority. > >I also noticed, on register, that it queries for an A record first. If >it gets a response, it will use that address to send the REGISTER. If it >does not, then it will launch an SRV query and use it. If SRV is >enabled, it should try to use that first. For example, the A record for >acmemanufacturing.com may point to their web server and they wish to use >the same domain for their sip services (ie. >joeuser@acmemanufacturing.com). If they try to register >joeuser@acmemanufacturing.com to their SIP provider, the asterisk will >resolve the web server via A record and send the request there. > >Using 1.0.9Sounds like you've volunteered yourself to make a patch for multi-weight SRV lookup. :-) On your other comment: Recent CVS-HEAD code does NOT exhibit the characteristics you describe for SRV vs. A record lookup - it seems to work in an expected and standards compliant way (well, at least for the first SRV record.) I just tested it with a single "register" request, and here is the tethereal output after launch of Asterisk: 0.000000 my.domain.com -> ns.domain.com DNS Standard query SRV _sip._udp.example.com 0.203041 ns.domain.com -> my.domain.com DNS Standard query response SRV 0 0 5060 cookies.example.com 0.203572 my.domain.com -> ns.domain.com DNS Standard query A cookies.example.com 0.305008 my.domain.com -> ns.domain.com DNS Standard query response A 213.21.191.70 This domain (in my test environment) has an A record associated with the "example.com" record which is different than the A record associated with cookies.example.com. *CLI> show version Asterisk CVS-HEAD built by root@hello.domain.com on a i386 running OpenBSD on 2005-08-05 16:42:52 UTC JT
Michael Lunsford
2005-Aug-10 12:48 UTC
[Asterisk-Users] SRV implementation supporting priority
I would love to volunteer myself for the patch ... oh, if I could only write C :-) I will be more than happy to contribute to the discussions and design as well as provide testing for it. Regarding the A record lookup, I have upgraded to the latest dev and am seeing that the Asterisk does perform an SRV query first. Thanks, Michael> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of John Todd > Sent: Wednesday, August 10, 2005 12:53 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] SRV implementation supporting priority > > At 9:49 AM -0400 on 8/10/05, Michael Lunsford wrote: > >Does anyone know when Asterisk is supposed to support prioritizationof> >the SRV records returned. I think it's accepted that right now the > >Asterisk always just uses the first record returned regardless of > >priority. > > > >I also noticed, on register, that it queries for an A record first.If> >it gets a response, it will use that address to send the REGISTER. Ifit> >does not, then it will launch an SRV query and use it. If SRV is > >enabled, it should try to use that first. For example, the A recordfor> >acmemanufacturing.com may point to their web server and they wish touse> >the same domain for their sip services (ie. > >joeuser@acmemanufacturing.com). If they try to register > >joeuser@acmemanufacturing.com to their SIP provider, the asteriskwill> >resolve the web server via A record and send the request there. > > > >Using 1.0.9 > > Sounds like you've volunteered yourself to make a patch formulti-weight> SRV lookup. :-) > > On your other comment: Recent CVS-HEAD code does NOT exhibit the > characteristics you describe for SRV vs. A record lookup - it seems to > work in an expected and standards compliant way (well, at least forthe> first SRV record.) I just tested it with a single "register" request,and> here is the tethereal output after launch of Asterisk: > > 0.000000 my.domain.com -> ns.domain.com DNS Standard query SRV > _sip._udp.example.com > 0.203041 ns.domain.com -> my.domain.com DNS Standard query responseSRV> 0 0 5060 cookies.example.com > 0.203572 my.domain.com -> ns.domain.com DNS Standard query A > cookies.example.com > 0.305008 my.domain.com -> ns.domain.com DNS Standard query responseA> 213.21.191.70 > > This domain (in my test environment) has an A record associated withthe> "example.com" record which is different than the A record associatedwith> cookies.example.com. > > *CLI> show version > Asterisk CVS-HEAD built by root@hello.domain.com on a i386 runningOpenBSD> on 2005-08-05 16:42:52 UTC > > > JT > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users