Re: [SR-Users] Double record routes
Hello, On 05/05/15 21:32, Mickael Marrache wrote: Hi, After making some tests, I found that if I configure the VIP interface before the non-VIP one, all works fine. listen=tcp:VIP:5060 listen=tcp:nonVIP:5060 Double RR is still enabled but only one RR header is added (with the VIP interface). Also, only one Via header is added (with the VIP interface). The incoming INVITE is forwarded using a random source port, not 5060. I assume it is the source port used to establish the TCP connection with the proxy (next hop from the load balancer). However, this port doesn't appear in the inserted RR and Via headers – don't know why. the source port you see in the network traffic is randomly allocated by OS/kernel. The addresses in the headers should be those where kamailio can receive traffic. If the port is 5060, it can be omitted, being the default value for sip. Cheers, Daniel -- 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 ___ 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
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.--AlexBalashov|Principal|EvaristeSystemsLLC303PerimeterCenterNorth,Suite300Atlanta,GA30346UnitedStatesTel:+1-800-250-5920(toll-free)/+1-678-954-0671(direct)Web:http://www.evaristesys.com/,http://www.csrpswitch.com/SentfrommyBlackBerry.From: Mickael MarracheSent: Tuesday, May 5, 2015 08:27To: sr-users@lists.sip-router.orgReply To: Kamailio (SER) - Users Mailing ListSubject: [SR-Users] Double record routesHi,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:1...@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
Re: [SR-Users] Double record routes
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-boun...@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 To: sr-users@lists.sip-router.org 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:1...@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
[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:1...@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
Re: [SR-Users] Double record routes
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-boun...@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 *To: *sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org *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:1...@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 ___ 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
Re: [SR-Users] Double record routes
Hi, After making some tests, I found that if I configure the VIP interface before the non-VIP one, all works fine. listen=tcp:VIP:5060 listen=tcp:nonVIP:5060 Double RR is still enabled but only one RR header is added (with the VIP interface). Also, only one Via header is added (with the VIP interface). The incoming INVITE is forwarded using a random source port, not 5060. I assume it is the source port used to establish the TCP connection with the proxy (next hop from the load balancer). However, this port doesn't appear in the inserted RR and Via headers - don't know why. Mickael From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla Sent: Tuesday, May 05, 2015 10:13 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Double record routes 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-boun...@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 To: sr-users@lists.sip-router.org 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:1...@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 ___ 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