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;
jsonrpc_exec('{"jsonrpc": "2.0", "method": "dispatcher.add", "params": [5, "sip:$si:$sp;transport=tcp", 0, "socket=tcp:127.0.0.1:5776"], "id": 1}');
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!
Ross
Ross McKillop writes:
Any ideas? I get the feeling I'm missing something obvious!
Perhaps this could help:
https://www.kamailio.org/docs/modules/5.5.x/modules/nathelper.html#nathelper...
-- Juha
Any ideas? I get the feeling I'm missing something obvious!
Perhaps this could help:
https://www.kamailio.org/docs/modules/5.5.x/modules/nathelper.html#nathelper...
This involves adding additional data to the Contact URI which I want to avoid if possible.
Also, unless I misunderstand, it seems that the alias parameter is used to populate the $du which I can do effectively, it's the source that I'm having issues with or having it use an existing socket to that same destination.
Ross
Hi,
This is what you might be looking for:
http://www.kamailio.org/wiki/cookbooks/devel/core#tcp_reuse_port
Thanks, Carsten
Carsten Bock I CTO & Founder
ng-voice GmbH
Trostbrücke 1 I 20457 Hamburg I Germany T +49 40 524 75 93-40 | M +49 179 2021244 I www.ng-voice.com
Registry Office at Local Court Hamburg, HRB 120189 Managing Directors: Dr. David Bachmann, Carsten Bock
Ross McKillop ross@rsmck.co.uk schrieb am Mi., 10. Nov. 2021, 17:59:
Any ideas? I get the feeling I'm missing something obvious!
Perhaps this could help:
https://www.kamailio.org/docs/modules/5.5.x/modules/nathelper.html#nathelper...
This involves adding additional data to the Contact URI which I want to avoid if possible.
Also, unless I misunderstand, it seems that the alias parameter is used to populate the $du which I can do effectively, it's the source that I'm having issues with or having it use an existing socket to that same destination.
Ross __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: