Hey FreeSWITCH Users,

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 sip.nexmo.com. 

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:

US -> INVITE sip.nexmo.com (IP1)
IP1 -> 407 AUTH
US -> INVITE sip.nexmo.com (DIFFERENT IP2) nonce and auth stuff
IP2 -> 904 FAIL

Here's my config:
<include>
  <gateway name="sip.nexmo.com">
    <param name="username" value="XXXXX"/>
    <param name="password" value="YYYYY"/>
    <param name="from-user" value="XXXXX"/>
    <param name="from-domain" value="sip.nexmo.com"/>
    <param name="proxy" value="sip.nexmo.com"/>
    <param name="expire-seconds" value="600"/>
    <param name="register" value="true"/>
    <param name="retry-seconds" value="30"/>
    <param name="extension" value="5000"/>
...

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 sip.nexmo.com DNS twice?

Thanks!