<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=6481937" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/henningw">@henningw</a>,</p>
<p>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.</p>
<p>For certain scenarios just using <code>force_rport()</code> works, but not for all.</p>
<p>Following previous example of:</p>
<p>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.</p>
<pre><code>UAC: REGISTER ->
KAM: <- 200OK
</code></pre>
<p>Now I want to send an INVITE from Kam to UAC, for correct flow I would need to send it from Kam to LB:</p>
<p><code>4.4.4.4:5060 -> 3.3.3.3:57482</code></p>
<p>And LB would make the translation and send it to UAC:</p>
<p><code>2.2.2.2:5060 -> 1.1.1.1:45621</code></p>
<p>To be able to do this, I need a way to know that the connection came from <code>3.3.3.3:57482</code>.  Does this make sense so far or am I fundamentally wrong?</p>
<p>RE: var naming --> I agree that $Ci and $Cp are more appropriate, I would also go with those. Thanks for suggestion!</p>
<p>RE: $Ri and $Rp --> I didn't <em>try</em> these because according to docs they provide received <em>interface</em> IP/Port, not received <em>source</em> IP/Port.</p>
<p>Let me know what you think about this.</p>
<p>Thanks again!<br>
Joel.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2103?email_source=notifications&email_token=ABO7UZKGTOS2OUKSHHAW3RDQPG7OFA5CNFSM4JCA6F5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUS5OI#issuecomment-543764153">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPPGYA5NO6DHUSC5ATQPG7OFANCNFSM4JCA6F5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNVE6BNYPVTWRYVJ4DQPG7OFA5CNFSM4JCA6F5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUS5OI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2103?email_source=notifications\u0026email_token=ABO7UZKGTOS2OUKSHHAW3RDQPG7OFA5CNFSM4JCA6F5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUS5OI#issuecomment-543764153",
"url": "https://github.com/kamailio/kamailio/issues/2103?email_source=notifications\u0026email_token=ABO7UZKGTOS2OUKSHHAW3RDQPG7OFA5CNFSM4JCA6F5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUS5OI#issuecomment-543764153",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>