Hi,
I'm trying to use one Kamailio instance as load balancer for multiple
Kamailio instances. The load balancer only performs NAT handling and
dispatching of messages. The other instances handle registrations, routing,
RTP proxy, authentication, etc.
When a REGISTER request is received by the load balancer, a Path header is
added to the request which is then forwarded to one of the registrars. The
registration request is successfully handled and the Path header is saved in
database. All subscribers register through the load balancer.
When an INVITE is received from one subscriber by the load balancer, a
Record-Route header is added by the load balancer which then forwards the
INVITE to one of the other instances. The selected instance authenticates
the subscriber, looks for the callee using the REGISTRAR module, adds a
Record-Route header, adds a Route header according to the Path header
associated with the callee, and forwards the INVITE to the load balancer.
The load balancer performs loose routing (removing the Route header), adds
another Record-Route header, and forwards the INVITE to the callee using the
right transport address (indicated by the received parameter present in the
Route header). The flow is right for the INVITE and its replies. However,
when the caller sends the ACK, the route set is: load balancer, proxy, load
balancer - without any information about how to reach the callee. Therefore,
when the ACK reaches the "second" load balancer, the latter forwards it
according to the RURI which is the Contact URI present in the 200 OK (which
is not routable because of the NAT). I expected Kamailio to reuse the
information that was present in the Path header to route the ACK correctly.
What am I doing wrong?
Thanks,
Mickael
Show replies by date