Changing receiver IP on INVITE
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!
AFAIK, It's part of the DNS load balancing <http://en.wikipedia.org/wiki/Round-robin_DNS> "thingy". It's a feature not a bug. You place a weight for connections per specific DNS. Here are the records for nexmo: $ dig srv _sip._udp.sip.nexmo.com +short 10 10 5060 sip1.nexmo.com. 20 10 5060 sip3.nexmo.com. 10 10 5060 sip2.nexmo.com. 20 10 5060 sip4.nexmo.com. It's up to nexmo to handle this properly, because it's their settings. On Fri, Nov 21, 2014 at 3:07 AM, Kurtis Heimerl <kheimerl@cs.berkeley.edu> wrote:
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!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
ik
-
Kurtis Heimerl