Hello,

do you have mhomed enabled? Are there routes from both IP addresses to the destination?

IIRC, not that long ago I pointed to some article about linux not ensuring what would be the local ip used for tcp connections when many interfaces are having routes to destination. I couldn't find it quickly now, though.

What you can try is to force advertised address with:

listen=tcp:1.2.3.4:5060 advertise 1.2.3.4:5060

Cheers,
Daniel

On 05/05/15 15:02, Mickael Marrache wrote:

Here, there are 2 interfaces but only the VIP should be used. Also, the INVITE exits the same interface it entered (i.e. the VIP) but exits with a different source port (because of the TCP connection).

 

I tried disabling double RR, I only see the VIP record route now, however I still see the top Via with the non-VIP interface although the INVITE is forwarded to the proxy using the VIP interface.

 

From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov
Sent: Tuesday, May 05, 2015 3:31 PM
To: Mickael Marrache; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Double record routes

 

That is normal behaviour if double RR is enabled in the RR module; two Record-Routes will be added if Kamailio is multihomed and the invite exits a different interface to the one it entered.

 

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/http://www.csrpswitch.com/

Sent from my BlackBerry.

From: Mickael Marrache

Sent: Tuesday, May 5, 2015 08:27

Reply To: Kamailio (SER) - Users Mailing List

Subject: [SR-Users] Double record routes

 

Hi,

 

We are adding TCP support to our load balancer and for some reason it adds two record route headers.

 

The instance have two IP addresses on which it binds: one if the VIP address and the second is the non-VIP address.

 

I explicitly set the tcp_source_ipv4 parameter with the VIP address so that it is used as source address for outbound TCP connection.

 

So, we get the following INVITE going from the load balancer to a proxy:

 

T 2015/05/05 12:08:49.715822 VIP:54667 -> PROXY:5060 [AP]

INVITE sip:123@mycompany.com SIP/2.0.

Record-Route: <sip:NONVIP;transport=tcp;r2=on;lr>.

Record-Route: <sip:VIP;transport=tcp;r2=on;lr>.

Via: SIP/2.0/TCP NONVIP;branch=z9hG4bK6f4.688efa90a17e02181ef7a11fecf8bb72.0;i=3.

Via: SIP/2.0/TCP 1.1.1.1:4598;received=2.2.2.2;branch=z9hG4bKmqFaCxNo6m3f5LW4;rport=40020.

 

You can see the INVITE is sent from the VIP address (as specified using the tcp_source_ipv4 parameter). However, the added Via corresponds to the non-VIP address. Also, you can see the two record route headers added for both addresses.

 

Any idea?

 

Thanks,

Mickael





_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com