Dear list,
I'm having an issue with our Kamailio setup.
I've installed two Kamailio servers with Corosync/Pacemaker. Kamailio1 has ip 10.254.254.5, Kamailio2 has ip 10.254.254.23. The VIP is 10.254.254.1. All is working well; clients can sent request to the VIP, and all traffic is sent via 10.254.254.1, and not the real ipI've configured the listen addressess:
mhomed = no listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060
I'm now trying to configure the server as a multihomed one. Both Kamailio have two NIC's. Kamailio1 also has ip X1, Kamailio2 has ip X2. The VIP is Y. Configuration is done as:
mhomed = yes listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060 listen = udp:Y:5060 listen = udp:X1:5060
When a UA sends an INVITE to for example 10.254.254.1, all responses (back) to UA are being sent with source address 10.254.254.1 (VIP), except for the ACK (and BYE). The ACK is sent via the real ip 10.254.254.23. I can resolve this by issuing a force_send_socket before t_relay in the config; but since it's multihomed, I have to build a lot of checks to find out the outgoing socket. Besides that, I want it to be possible to use both the real IP and the VIP as IP-address for the UA (for testing purposes). This won't work with force_send_socket.
Does anyone from the list know how I can solve this?
Thanks,
Regards,
Ronald
Hello,
On 12/12/13 13:57, Ronald Voermans wrote:
Dear list,
I'm having an issue with our Kamailio setup.
I've installed two Kamailio servers with Corosync/Pacemaker. Kamailio1 has ip 10.254.254.5, Kamailio2 has ip 10.254.254.23. The VIP is 10.254.254.1. All is working well; clients can sent request to the VIP, and all traffic is sent via 10.254.254.1, and not the real ipI've configured the listen addressess:
mhomed = no listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060
I'm now trying to configure the server as a multihomed one. Both Kamailio have two NIC's. Kamailio1 also has ip X1, Kamailio2 has ip X2. The VIP is Y. Configuration is done as:
mhomed = yes listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060 listen = udp:Y:5060 listen = udp:X1:5060
When a UA sends an INVITE to for example 10.254.254.1, all responses (back) to UA are being sent with source address 10.254.254.1 (VIP), except for the ACK (and BYE). The ACK is sent via the real ip 10.254.254.23. I can resolve this by issuing a force_send_socket before t_relay in the config; but since it's multihomed, I have to build a lot of checks to find out the outgoing socket. Besides that, I want it to be possible to use both the real IP and the VIP as IP-address for the UA (for testing purposes). This won't work with force_send_socket.
Does anyone from the list know how I can solve this?
force send socket is done only when there is a double record-routing situation. In this case no socket is forced and mhomed=yes gives the decision to the kernel routing table to select the socket, which I guess will find first 10.254.254.23 as having a route to where ACK or BYE has to be sent.
You can try to force the socket using the uri from the top Route header.
Might be good to enhance rr to do force socket even for one Route header, eventually controlled via a modparam .
Cheers, Daniel
Daniel,
Thank you for your answer. Configured the following (with mhomed=yes):
if ($(route_uri{uri.host}) == VIP_PROXY) { force_send_socket(VIP_PROXY); } else if ($(route_uri{uri.host}) == VIP_PROXY_PUB) { force_send_socket(VIP_PROXY_PUB); } else if ($(route_uri{uri.host}) == THIS_PROXY) { force_send_socket(THIS_PROXY); } else if ($(route_uri{uri.host}) == THIS_PROXY_PUB) { force_send_socket(THIS_PROXY_PUB); } t_relay(); ...
This solves the issue when using the VIP_PROXY(_PUB). However, the ACK always has two route headers when using the THIS_PROXY as ip address. In this case, the top route header is VIP_PROXY; the second one is THIS_PROXY. Hence, the solution above doesn't work, because the force_send_socket uses the top route header (which is VIP_PROXY).
Why is this different behavior when compared to mhomed=no?
Thanks,
Ronald Dear list,
I'm having an issue with our Kamailio setup.
I've installed two Kamailio servers with Corosync/Pacemaker. Kamailio1 has ip 10.254.254.5, Kamailio2 has ip 10.254.254.23. The VIP is 10.254.254.1. All is working well; clients can sent request to the VIP, and all traffic is sent via 10.254.254.1, and not the real ipI've configured the listen addressess:
mhomed = no listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060
I'm now trying to configure the server as a multihomed one. Both Kamailio have two NIC's. Kamailio1 also has ip X1, Kamailio2 has ip X2. The VIP is Y. Configuration is done as:
mhomed = yes listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060 listen = udp:Y:5060 listen = udp:X1:5060
When a UA sends an INVITE to for example 10.254.254.1, all responses (back) to UA are being sent with source address 10.254.254.1 (VIP), except for the ACK (and BYE). The ACK is sent via the real ip 10.254.254.23. I can resolve this by issuing a force_send_socket before t_relay in the config; but since it's multihomed, I have to build a lot of checks to find out the outgoing socket. Besides that, I want it to be possible to use both the real IP and the VIP as IP-address for the UA (for testing purposes). This won't work with force_send_socket.
Does anyone from the list know how I can solve this?
Thanks,
Regards,
Ronald
Perhaps you should set force send socket before loose_route(), so it will update it if needed.
Daniel
On 12/12/13 22:20, Ronald Voermans wrote:
Daniel,
Thank you for your answer. Configured the following (with mhomed=yes):
if ($(route_uri{uri.host}) == VIP_PROXY) { force_send_socket(VIP_PROXY); } else if ($(route_uri{uri.host}) == VIP_PROXY_PUB) { force_send_socket(VIP_PROXY_PUB); } else if ($(route_uri{uri.host}) == THIS_PROXY) { force_send_socket(THIS_PROXY); } else if ($(route_uri{uri.host}) == THIS_PROXY_PUB) { force_send_socket(THIS_PROXY_PUB); } t_relay(); ...
This solves the issue when using the VIP_PROXY(_PUB). However, the ACK always has two route headers when using the THIS_PROXY as ip address. In this case, the top route header is VIP_PROXY; the second one is THIS_PROXY. Hence, the solution above doesn't work, because the force_send_socket uses the top route header (which is VIP_PROXY).
Why is this different behavior when compared to mhomed=no?
Thanks,
Ronald
Dear list,
I'm having an issue with our Kamailio setup.
I've installed two Kamailio servers with Corosync/Pacemaker. Kamailio1 has ip 10.254.254.5, Kamailio2 has ip 10.254.254.23. The VIP is 10.254.254.1. All is working well; clients can sent request to the VIP, and all traffic is sent via 10.254.254.1, and not the real ipI've configured the listen addressess:
mhomed = no listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060
I'm now trying to configure the server as a multihomed one. Both Kamailio have two NIC's. Kamailio1 also has ip X1, Kamailio2 has ip X2. The VIP is Y. Configuration is done as:
mhomed = yes listen = udp:10.254.254.1:5060 listen = udp:10.254.254.23:5060 listen = udp:Y:5060 listen = udp:X1:5060
When a UA sends an INVITE to for example 10.254.254.1, all responses (back) to UA are being sent with source address 10.254.254.1 (VIP), except for the ACK (and BYE). The ACK is sent via the real ip 10.254.254.23. I can resolve this by issuing a force_send_socket before t_relay in the config; but since it's multihomed, I have to build a lot of checks to find out the outgoing socket. Besides that, I want it to be possible to use both the real IP and the VIP as IP-address for the UA (for testing purposes). This won't work with force_send_socket.
Does anyone from the list know how I can solve this?
Thanks,
Regards,
Ronald
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