<div dir="ltr"><div><div>AFAIK, It&#39;s part of the <a href="http://en.wikipedia.org/wiki/Round-robin_DNS">DNS load balancing</a> &quot;thingy&quot;. It&#39;s a feature not a bug.<br><br></div>You place a weight for connections per specific DNS.<br><br>Here are the records for nexmo:<br><br>$ dig srv _sip._<a href="http://udp.sip.nexmo.com">udp.sip.nexmo.com</a> +short<br>10 10 5060 <a href="http://sip1.nexmo.com">sip1.nexmo.com</a>.<br>20 10 5060 <a href="http://sip3.nexmo.com">sip3.nexmo.com</a>.<br>10 10 5060 <a href="http://sip2.nexmo.com">sip2.nexmo.com</a>.<br>20 10 5060 <a href="http://sip4.nexmo.com">sip4.nexmo.com</a>.<br><br></div>It&#39;s up to nexmo to handle this properly, because it&#39;s their settings.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 3:07 AM, Kurtis Heimerl <span dir="ltr">&lt;<a href="mailto:kheimerl@cs.berkeley.edu" target="_blank">kheimerl@cs.berkeley.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey FreeSWITCH Users,<div><br></div><div>Interesting issue here. We&#39;re connecting to Nexmo, a major SIP provider. They do load balancing of their SIP servers; a set of four IPs behind <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>. </div><div><br></div><div>I have a FS sip set up to register to their server. However, in INVITE, it seems to switch IPs. Basically it goes like this:</div><div><br></div><div>US -&gt; INVITE <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a> (IP1)</div><div>IP1 -&gt; 407 AUTH</div><div>US -&gt; INVITE <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a> (DIFFERENT IP2) nonce and auth stuff</div><div>IP2 -&gt; 904 FAIL</div><div><br></div><div>Here&#39;s my config:</div><div><div>&lt;include&gt;</div><div>  &lt;gateway name=&quot;<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>&quot;&gt;</div><div>    &lt;param name=&quot;username&quot; value=&quot;XXXXX&quot;/&gt;</div><div>    &lt;param name=&quot;password&quot; value=&quot;YYYYY&quot;/&gt;</div><div>    &lt;param name=&quot;from-user&quot; value=&quot;XXXXX&quot;/&gt;</div><div>    &lt;param name=&quot;from-domain&quot; value=&quot;<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>&quot;/&gt;</div><div>    &lt;param name=&quot;proxy&quot; value=&quot;<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>&quot;/&gt;</div><div>    &lt;param name=&quot;expire-seconds&quot; value=&quot;600&quot;/&gt;</div><div>    &lt;param name=&quot;register&quot; value=&quot;true&quot;/&gt;</div><div>    &lt;param name=&quot;retry-seconds&quot; value=&quot;30&quot;/&gt;</div><div>    &lt;param name=&quot;extension&quot; value=&quot;5000&quot;/&gt;</div></div><div>...</div><div><br></div><div>How do we stop this from happening? Setting from-domain and proxy to an IP behind their load balancer fixes it, but that&#39;s clearly suboptimal. Why is FS resolving the <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a> DNS twice?</div><div><br></div><div>Thanks!</div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>