[sr-dev] [kamailio/kamailio] [Feature Request]: Add **connection** IP and Port vars (specifically for tcp_accept_haproxy=yes) (#2103)
Joel Serrano
notifications at github.com
Fri Oct 18 16:08:34 CEST 2019
Hi @henningw,
AFAIK: As we are talking about TCP + Proxy Protocol here, this means that most likely the LB between Kam and the UAC only understands connections (pure TCP proxy). Although I have access to the UAC's IP:Port (which is the goal of tcp_accept_haproxy=yes, and this shouldn't change), if I have to send a msg to the UAC and I don't want to go directly (Kam->UAC) but I want to go via the LB where the request came from (KAM->LB->UAC) I need to send the msg to the IP:Port KAM received, and the LB will send that to the IP:Port it received.
For certain scenarios just using `force_rport()` works, but not for all.
Following previous example of:
UAC (1.1.1.1:45621) -> (2.2.2.2:5060) LB with Proxy Protocol (3.3.3.3:57482) -> (4.4.4.4:5060) Kamailio.
```
UAC: REGISTER ->
KAM: <- 200OK
```
Now I want to send an INVITE from Kam to UAC, for correct flow I would need to send it from Kam to LB:
`4.4.4.4:5060 -> 3.3.3.3:57482`
And LB would make the translation and send it to UAC:
`2.2.2.2:5060 -> 1.1.1.1:45621`
To be able to do this, I need a way to know that the connection came from `3.3.3.3:57482`. Does this make sense so far or am I fundamentally wrong?
RE: var naming --> I agree that $Ci and $Cp are more appropriate, I would also go with those. Thanks for suggestion!
RE: $Ri and $Rp --> I didn't _try_ these because according to docs they provide received _interface_ IP/Port, not received _source_ IP/Port.
Let me know what you think about this.
Thanks again!
Joel.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2103#issuecomment-543764153
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191018/c7eca072/attachment.html>
More information about the sr-dev
mailing list