Hopefully the collective hive mind can help with this one, as I have little experience of using TCP in this manner and neither does a friendly Kamailio expert I know personally.
I'm replacing a closed box thing that accepts connections from various nodes over TCP. They send INVITEs and REGISTERs over that TCP socket and expect to receive inbound calls over the same established TCP socket.
Struggling to make Kamailio behave the same way, but it should be possible.
The first time it receives a message, I add the sender to the dispatcher as follows;
This works great, but despite setting the socket to use there, when a call later comes in and it's routed to one of the dispatcher nodes that's been added in this way it fails because Kamailio attempts to open a new connection to the IP / PORT rather than having kept the socket open from the earlier message and reusing the same connection/.
Any ideas? I get the feeling I'm missing something obvious!