It also doesn't work. 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. For example: ``` 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) ``` where P1, P2, and P3 are the dynamically allocated IP ports.
When the "listen" parameters are defined I see something like that: ``` 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) ```