[SR-Users] Kamailio behind HAProxy

Joey Golan joeygo at gmail.com
Sun Nov 8 16:30:56 CET 2020


Hello,
I have a kamailio server running behind HAProxy with proxy protocol v2 enabled.
In Kamailio I have set the parameter tcp_accept_haproxy=yes and loaded tcpops module.
UEs are registered using TLS and kamailio sees that the message has received from their real ip address + port and not HAProxy ip + port.
When UE A calls UE B, kamailio is trying to reach UE B using his real ip address and port instead of HAProxy IP address + port.

I know I can get the tcp ip and port of HAProxy using $tcp(c_si) and $tcp(c_sp) but I can’t make it work.
What is the right way to do this? How should I use these variables properly in order to establish the call successfully?

Thanks,
Joey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201108/ea81e6e1/attachment.htm>


More information about the sr-users mailing list