<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 20, 2009, at 1:28 PM, Carlos S. Antunes wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello!<br><br>I am using Callcentric for my tests and have observed what appears to me <br>a possible bug in the way Freeswitch handles DNS SRV records.<br><br>Callcentric uses DNS SRV records as a way to direct traffic to their SIP <br>server. A 'srv' 'dig' of '_sip._udp.callcentric.com' returns:<br><br>_sip._udp.callcentric.com. 10025 IN SRV 20 7 5080 <br>alpha6.callcentric.com.<br>_sip._udp.callcentric.com. 10025 IN SRV 20 7 5080 <br>alpha7.callcentric.com.<br>_sip._udp.callcentric.com. 10025 IN SRV 20 7 5080 <br>alpha1.callcentric.com.<br>_sip._udp.callcentric.com. 10025 IN SRV 20 7 5080 <br>alpha3.callcentric.com.<br><br>Based on this information, Freeswitch appears to correctly round robin <br>all available IP addresses except in a particular situation: in the <br>middle of authorizations.<br><br></div></blockquote><div><br></div><div>very true, but i've been reading over the RFCs on this, and it seems that FreeSWITCH isn't doing anything incorrectly.</div><div><br></div><div>in RFC3263 (section 4), when talking about client usage of SRV:</div><div><span class="Apple-style-span" style="font-family: Arial, 'Times New Roman', Times, serif; font-size: 16px; line-height: 26px; "><pre><span class="Apple-style-span" style="font-family: Arial, 'Times New Roman', Times, serif; white-space: normal; "><pre><font class="Apple-style-span" face="Monaco" size="1"><span class="Apple-style-span" style="font-size: 9px;">The procedures here MUST be done exactly once per transaction, where transaction is as defined in [1]. </span></font></pre><pre><font class="Apple-style-span" face="Monaco" size="1"><span class="Apple-style-span" style="font-size: 9px;"><span class="Apple-style-span" style="font-family: Helvetica, 'Times New Roman', Times, serif; font-size: medium; line-height: normal; white-space: normal; ">[1] being RFC3261</span></span></font></pre></span></pre></span></div><div><br></div><div>in RFC3261 (section 8.1.3.5), when talking about 4xx responses:</div><span class="Apple-style-span" style="font-family: Arial, 'Times New Roman', Times, serif; font-size: 16px; line-height: 26px; "><pre><font class="Apple-style-span" size="1"><span class="Apple-style-span" style="font-size: 9px;">In all of the above cases, the request is retried by creating a new
request with the appropriate modifications. This new request
constitutes a new transaction and SHOULD have the same value of the
Call-ID, To, and From of the previous request, but the CSeq should
contain a new sequence number that is one higher than the previous.
</span></font></pre><div><font class="Apple-style-span" face="monospace, 'Times New Roman', Times, serif"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div></span><blockquote type="cite"><div>For example, in a registration, Freeswitch send a packet to <br>alpha1.callcentric.com. Callcentric then challenges Freeswitch with a <br>Proxy Authorization request. Freeswitch then sends the packet with the <br>requested credentials but not necessarily to alpha1.callcentric.com! In <br>many cases, instead of sticking to the 'challenging' server, Freeswitch <br>round robins and sends the second packet to, one of the other servers. <br>This continues for a little while and eventually, simply by luck, the <br>second packet is sent to the 'challenging' Callcentric server.<br><br>Shouldn't Freeswitch stick to the same server when challenged for <br>credentials?</div></blockquote><div><br></div>can you show anything in the RFCs that says so?</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div> Is this a bug? </div></blockquote><div><br></div>see above</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div>Is there a way to make Freeswitch behave <br>differently?<br></div></blockquote></div>disable-srv on the profile<div><br></div><div><br></div><div><br></div><div>All that said, if it has to be a "bug", then it seems to me that it's more of a "bug" in callcentric's service. They'd probably be better of actually prioritizing their SRV records. If they want load balancing and want to do checking for stale nonces, then they should be sharing nonces across all of their proxies or using a proper load balancer.<br><div><br></div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Raymond Chandler</div><div> <a href="http://freeswitchsolutions.com">http://freeswitchsolutions.com</a></div><div> <a href="http://cluecon.com">http://cluecon.com</a> </div><div> <a href="http://cudatel.com">http://cudatel.com</a></div></div></span></div><br><div></div></div></div></body></html>