Hi, >-----Original Message----- >From: ext Inca Rose [mailto:incar...@gmail.com] >Sent: Saturday, April 04, 2009 12:24 AM >To: sofia-sip-devel Mailing List >Subject: [Sofia-sip-devel] How sofia select the IP for Via and >Contact on a multi home device > >I found something very strange the other day. >There are 2 IP on the device, Sofia sends the message from IP 1 but >fill the Via and COntact with IP 2. >The problem is that IP 2 is not connected to anything. >Why this happens ?
It's a long-standing problem. Basically, the code selecting the contact does not make any good guesses which interface the request will go to. It even used to confuse between IPv4 and IPv6 addresses! Looking up the default route would be a good heuristic. The full solution would be in rewriting the transport code to never bind the UDP socket to "any", and try all available per-interface bindings starting from the one with the default route. Some resolver affinity would also help, I think: send the requests through the interface to where DNS responses arrive. >Where to look for the code to understand what is going on >behind the scenes? It's between tport, nta, and nua outbound, I believe. Best regards, Mikhail ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel