<p>It also doesn't work.<br>
So, it looks like that the presence of the 'listen' parameters only affects the Kamailio behavior. According to the LAN traces, when the "listen" parameters are NOT defined then Kamailio uses an "old" existing TCP connection.<br>
For example:</p>
<pre><code>Endpoint sends a REGISTER request:
EP(IP1:P1) -->Kamalio(IP2:5060), Kamalio(IP3:P2) -->Asterisk(IP4:5060) 

Asterisk creates a new TCP connection and sends OPTIONS. 
EP(IP1:P1) <--Kamailio(IP2:5060), Kamailio(IP3:5060) <--Asterisk(IP4:P3) 
</code></pre>
<p>where P1, P2, and P3 are the dynamically allocated IP ports.</p>
<p>When the "listen" parameters are defined I see something like that:</p>
<pre><code>REGISTER:
EP(IP1:P1) -->Kamalio(IP2:5060), Kamailio(IP3:P2) -->Asterisk(IP4:5060) 

Asterisk creates a new TCP connection and sends OPTIONS. Kamailio
tries to create a new connection to EP(IP1:P1) and fails to do it because 
P1 is a dynamically allocated port and nobody is listening on it. 
EP(IP1:P1)     X<--Kamalio(IP2:P4), Kamalio(IP3:5060) <--Asterisk(IP4:P3) 
</code></pre>

<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/2033?email_source=notifications&email_token=ABO7UZK4QNENR53G4XKIUVDQFZTBXA5CNFSM4IL4AQRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44UGWI#issuecomment-523846489">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZL6JVLA3XVRZZR5QMLQFZTBXANCNFSM4IL4AQRA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZLRJLQ5LXCDDE73AE3QFZTBXA5CNFSM4IL4AQRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44UGWI.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/2033?email_source=notifications\u0026email_token=ABO7UZK4QNENR53G4XKIUVDQFZTBXA5CNFSM4IL4AQRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44UGWI#issuecomment-523846489",
"url": "https://github.com/kamailio/kamailio/issues/2033?email_source=notifications\u0026email_token=ABO7UZK4QNENR53G4XKIUVDQFZTBXA5CNFSM4IL4AQRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44UGWI#issuecomment-523846489",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>