Anyone?



On Apr 2, 2023 at 10:45 AM, <Joey Golan> wrote:

Hello,

I have 2 clients. 1 using websocket and 1 mobile using TLS.
Both can call each other perfectly. After 24-48 hours calls from mobile to websocket failed with an error message: TCP/TLS connection (id: 0) for WebSocket could not be found.
At the same time I can make calls from the websocket client to the mobile.

I know that the search of the connection is done by target address so I printed the addresses + ports and they are matched to the ones that appear on the ul.dump and ws.dump.

kamcmd ul.dump output:

Info: {

AoR: usrmt63ly_1040

HashID: 1830036546

Contacts: {

Contact: {

Address: sip:usrmt63ly_1040@example.com;transport=ws

Expires: 283

Q: -1

Call-ID: tvne1pskgkm2a01pnqm677

CSeq: 1060

User-Agent: JsSIP 3.9.0

Received: sip:10.218.51.86:24061;transport=ws

Path: <sip:10.218.154.228:50443;transport=ws;received=sip:10.218.51.86:24061;transport=ws;lr>

State: CS_NEW

Flags: 0

CFlags: 64

Socket: tls:10.218.154.228:50443

Methods: 7071

Ruid: uloc-61ebba84-64242101-89ba-1

Instance: <urn:uuid:7573726d-7436-116c-915f-313034304077>

Reg-Id: 1

Server-Id: 1642838660

Tcpconn-Id: 100420

Keepalive: 1

Last-Keepalive: 1680417282

KA-Roundtrip: 0

Last-Modified: 1680417282

}

}

}


kamcmd ws.dump

{

connections: {

100420: wss:10.218.51.86:24061 -> wss:10.218.154.228:50443 (state: OPEN,  last used 14s ago, sub-protocol: sip)

}

info: {

wscounter: 1

truncated: no

}

}



Call from mobile (TLS) to websocket: Failed with error message: TCP/TLS connection (id: 0) for WebSocket could not be found


30(35263) INFO: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} <script>: request_route: method [INVITE] from [sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:50909;transport=tls] to [sip:usrmt63ly_1040@example.com]

30(35263) INFO: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} <script>: [RELAY]: method [INVITE] from [sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:50909;transport=tls] to [sip:usrmt63ly_1040@example.com] socket [sip:10.218.51.86:24061;transport=ws]

30(35263) WARNING: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} <core> [core/msg_translator.c:2863]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found

30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} <core> [core/msg_translator.c:2040]: build_req_buf_from_sip_req(): could not create Via header

30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} tm [t_fwd.c:479]: prepare_new_uac(): could not build request

30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} tm [t_fwd.c:1759]: t_forward_nonack(): failure to add branches

30(35263) ERROR: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} sl [sl_funcs.c:418]: sl_reply_error(): stateless error reply used: No error (2/SL)

30(35263) NOTICE: {1 2563 INVITE 4248c155-cd92-49b8-b68a-eef5f2cb3e88} acc [acc.c:287]: acc_log_request(): ACC: call missed: timestamp=1680417920;method=INVITE;from_tag=e168ffa6-e577-48ec-b9c9-a73f5be318e8;to_tag=0c3e625e9f223a7ee2b093e8e31b2526-b7165bcb;call_id=4248c155-cd92-49b8-b68a-eef5f2cb3e88;code=500;reason=Server Internal Error;src_user=usrrcv4o4_1040;src_domain=example.com;src_ip=10.218.51.86;dst_ouser=usrmt63ly_1040;dst_user=usrmt63ly_1040;dst_domain=example.com



Call from websocket to mobile (TLS):


38(35271) INFO: {1 7488 INVITE urcnete8r71dpkhmngd8} <script>: request_route: method [INVITE] from [sip:usrmt63ly_1040@example.com] socket [sip:10.218.51.86:24061;transport=ws] to [sip:usrrcv4o4_1040@example.com]

38(35271) INFO: {1 7488 INVITE urcnete8r71dpkhmngd8} <script>: [RELAY]: method [INVITE] from [sip:usrmt63ly_1040@example.com] socket [sip:10.218.51.86:24061;transport=ws] to [sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:20674;transport=tls]

39(35272) INFO: {2 7488 INVITE urcnete8r71dpkhmngd8} <script>: onreply_route[MANAGE_REPLY] method [INVITE] code [100] from [sip:usrmt63ly_1040@example.com] to [sip:usrrcv4o4_1040@example.com]

39(35272) INFO: {2 7488 INVITE urcnete8r71dpkhmngd8} <script>: onreply_route[MANAGE_REPLY] method [INVITE] code [200] from [sip:usrmt63ly_1040@example.com] to [sip:usrrcv4o4_1040@example.com]

39(35272) NOTICE: {2 7488 INVITE urcnete8r71dpkhmngd8} acc [acc.c:287]: acc_log_request(): ACC: transaction answered: timestamp=1680417926;method=INVITE;from_tag=18q0p37nfo;to_tag=a88272a0-25ca-43c2-8ce9-8615831b7e9a;call_id=urcnete8r71dpkhmngd8;code=200;reason=OK;src_user=usrmt63ly_1040;src_domain=example.com;src_ip=10.218.51.86;dst_ouser=usrrcv4o4_1040;dst_user=usrrcv4o4_1040;dst_domain=10.218.51.86

38(35271) INFO: {1 7488 ACK urcnete8r71dpkhmngd8} <script>: request_route: method [ACK] from [sip:usrmt63ly_1040@example.com] socket [sip:10.218.51.86:24061;transport=ws] to [sip:usrrcv4o4_1040@example.com]

38(35271) INFO: {1 7488 ACK urcnete8r71dpkhmngd8} <script>: [RELAY]: method [ACK] from [sip:usrmt63ly_1040@example.com] socket [sip:10.218.51.86:24061;transport=ws] to [sip:usrrcv4o4_1040@example.com] socket [sip:10.218.51.86:20674;transport=tls]



Version: kamailio 5.6.2 (x86_64/linux)


What could be the reason for that?

Your help would be much appreciated.


Thanks,

Joey.