<p></p>
<p>As I understand haproxy protocol may be used only for <code>inbound</code> connections and can't be used for outbound connections.<br>
According to<code> lsof</code> output, problem connection is outbound</p>
<pre><code>[root@sbc-13 ~]# lsof -a -p  56907| grep 3931924
kamailio 56907 kamailio   58u     IPv4            3931924      0t0     TCP ip-100-85-118-66.us-west-1.compute.internal:sip->207.244.110.239:11495 (ESTABLISHED)
</code></pre>
<p>From point of view need to change <a href="https://github.com/kamailio/kamailio/blob/1f751775525fdcdb5a75b45fbf451e2bef3696ec/src/core/tcp_main.c#L1163-L1173">this block</a> to avoid enter when Kamailio try to create the outbound connection.</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/2658#issuecomment-789708947">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJWFN3LD2ITD7LM2MDTBYZRZANCNFSM4YRFWH2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZO4XU3RQUJUHTVYN43TBYZRZA5CNFSM4YRFWH22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF4JABEY.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/2658#issuecomment-789708947",
"url": "https://github.com/kamailio/kamailio/issues/2658#issuecomment-789708947",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>