Brian J. Murrell
2008-Oct-17 14:19 UTC
[asterisk-users] srv records not being honoured properly
Given the following SRV records: _sip._udp.tollfree.sip-happens.com. 38400 IN SRV 10 0 5060 sometimes.sip-happens.com. _sip._udp.tollfree.sip-happens.com. 38400 IN SRV 20 0 5070 ares.sip-happens.com. Why is asterisk (1.4.17) not honouring the priority and not failing over to using other records when a connection fails? For a given call to tollfree.sip-happens.com ares.sip-happens.com was chosen and tried before sometimes.sip-happens.com and additionally, when the connection to ares.sip-happens.com was being refused there was no roll-over to sometimes.sip-happens. Here's what asterisk did: -- Executing [s at macro-enumdial:23] Dial("SIP/anonymous-b5e02fd0", "SIP/18771234567 at tollfree.sip-happens.com.||") in new stack -- ast_get_srv: SRV lookup for '_sip._udp.tollfree.sip-happens.com.' mapped to host ares.sip-happens.com, port 5070 -- Called 18771234567 at tollfree.sip-happens.com. [Oct 17 10:15:46] NOTICE[4973]: chan_sip.c:2920 auto_congest: Auto-congesting SIP/tollfree.sip-happens.com.-081ddc28 -- SIP/tollfree.sip-happens.com.-081ddc28 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) And here's the packet trace: 10:15:16.612062 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:16.652721 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:17.613997 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:17.654697 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:18.611068 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:18.652786 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:20.614106 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:20.654785 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:24.614115 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:24.658934 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:32.615275 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:32.668930 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 10:15:48.614675 IP 67.193.213.184.5060 > 209.9.237.93.5070: SIP, length: 855 10:15:48.655403 IP 209.9.237.93 > 67.193.213.184: ICMP 209.9.237.93 udp port 5070 unreachable, length 556 So, as you can see, the priority was not honoured, nor was the alternate SRV record used when there was a connection failure. Maybe that's because it was looking for a lower priority. Is SRV handling in Asterisk just broken? Or is this a known and fixed bug? b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20081017/19ec1861/attachment-0001.pgp
Brian J. Murrell wrote:>Given the following SRV records: > >_sip._udp.tollfree.sip-happens.com. 38400 IN SRV 10 0 5060 sometimes.sip-happens.com. >_sip._udp.tollfree.sip-happens.com. 38400 IN SRV 20 0 5070 ares.sip-happens.com. > >Why is asterisk (1.4.17) not honouring the priority and not failing over >to using other records when a connection fails? > > >Because Asterisk does not support that. The only thing that Asterisk does is use the first SRV entry but it pays no attention to priorities or weights. It does not care about other SRV entries either. This is how things have been as long as I can remember. I am not sure about version 1.6 though. Andres http://www.neuroredes.com>------------------------------------------------------------------------ > >_______________________________________________ >-- Bandwidth and Colocation Provided by http://www.api-digital.com -- > >asterisk-users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Brian J. Murrell
2008-Oct-17 15:40 UTC
[asterisk-users] srv records not being honoured properly
On Fri, 2008-10-17 at 10:32 -0500, Andres wrote:> > Because Asterisk does not support that.Which is just another way of saying Asterisk is broken then. SRV records have requirements for their correct use. If those requirements are ignored, that is a broken implementation.> The only thing that Asterisk > does is use the first SRV entryFirst in terms of what was returned, not sorted by priority and weight, right?> but it pays no attention to priorities > or weights. It does not care about other SRV entries either.Tsk tsk tsk.> This is > how things have been as long as I can remember.Wonderful. Nothing like half implementing standards. b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20081017/d6bd4161/attachment.pgp
Eric "ManxPower" Wieling
2008-Oct-17 16:18 UTC
[asterisk-users] srv records not being honoured properly
It should be fairly easy to write an AGI script that does the SRV query, do whatever you want with the response, set a channel variable with the results and use that in your dialplan. Brian J. Murrell wrote:> On Fri, 2008-10-17 at 10:32 -0500, Andres wrote: >> Because Asterisk does not support that. > > Which is just another way of saying Asterisk is broken then. SRV > records have requirements for their correct use. If those requirements > are ignored, that is a broken implementation. > >> The only thing that Asterisk >> does is use the first SRV entry > > First in terms of what was returned, not sorted by priority and weight, > right? > >> but it pays no attention to priorities >> or weights. It does not care about other SRV entries either. > > Tsk tsk tsk. > >> This is >> how things have been as long as I can remember. > > Wonderful. Nothing like half implementing standards.-- Consulting and design services for LAN, WAN, voice and data. Based near Birmingham, AL. Now accepting clients worldwide. Contact me for Tellabs echo canceling systems. Also see http://www.fnords.org/skillslist.html
Brian J. Murrell
2008-Oct-17 16:22 UTC
[asterisk-users] srv records not being honoured properly
On Fri, 2008-10-17 at 11:18 -0500, Eric "ManxPower" Wieling wrote:> It should be fairly easy to write an AGI script that does the SRV query, > do whatever you want with the response, set a channel variable with > the results and use that in your dialplan.Maybe. If I were an AGI hacker. But really, should I (and every other Asterisk user) have to? b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20081017/12615d94/attachment.pgp
Maybe Matching Threads
- Odd Samba 4 ("4.2.0pre1-GIT-b505111"; actually only using client) behaviour #2 - "accept: Software caused connection abort".
- DISA -> macro = congestion
- Setting up Security Groups
- e164.org and tollfree ENUM records
- idmap_rid problem - winbindd_sid_to_uid: Could not get uid for sid