<div dir="ltr"><div><div>AFAIK, It's part of the <a href="http://en.wikipedia.org/wiki/Round-robin_DNS">DNS load balancing</a> "thingy". It'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's up to nexmo to handle this properly, because it'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"><<a href="mailto:kheimerl@cs.berkeley.edu" target="_blank">kheimerl@cs.berkeley.edu</a>></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'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 -> INVITE <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a> (IP1)</div><div>IP1 -> 407 AUTH</div><div>US -> INVITE <a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a> (DIFFERENT IP2) nonce and auth stuff</div><div>IP2 -> 904 FAIL</div><div><br></div><div>Here's my config:</div><div><div><include></div><div> <gateway name="<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>"></div><div> <param name="username" value="XXXXX"/></div><div> <param name="password" value="YYYYY"/></div><div> <param name="from-user" value="XXXXX"/></div><div> <param name="from-domain" value="<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>"/></div><div> <param name="proxy" value="<a href="http://sip.nexmo.com" target="_blank">sip.nexmo.com</a>"/></div><div> <param name="expire-seconds" value="600"/></div><div> <param name="register" value="true"/></div><div> <param name="retry-seconds" value="30"/></div><div> <param name="extension" value="5000"/></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'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>