Hi all,
I am running 2 kamailio instances in kubernetes (daemonsets). kamailio act as webrtc server. all my webrtc clients are registered into kamailio. registration stored in location table (usrloc).
Issue: 1. Webrtc client registers to kamailio instance-1 2. I am trying to make outbound call and it was initated from kamailio-2 3. kamailio-2 looks up into location table in DB and finds the user 4. However, when it tries to send the call over websocket's tcp, it fails with the following message
4(197) WARNING: {1 102703821 INVITE 0396e8d0-edae-123e-738c-325f60cc5a45} <core> [core/msg_translator.c:3036]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Logically this is correct as the instance doesn't aware of the connection (kamcmd ws.dump does show the connection on kamailio-2 but it is seen in kamailio-1)
I need help to share this connection details between the instances so that any kamailio instance can make outbound call regardless of where it was registered.
Thank you for your help in advance.
Maharaja
Look at storing path information with your location data. This can be thought of like record-routing for registration. Proxies that handle the REGISTER request are recorded as path data, and then when routing the request the path can be followed ensuring that the same proxies are traversed.
Regards,
Kaufman
________________________________ From: Maharaja Azhagiah via sr-users sr-users@lists.kamailio.org Sent: Wednesday, August 6, 2025 5:38 PM To: sr-users@lists.kamailio.org sr-users@lists.kamailio.org Cc: er.maharaja@gmail.com er.maharaja@gmail.com Subject: [SR-Users] Webrtc connection failure on multiple kamailio server setup
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi all,
I am running 2 kamailio instances in kubernetes (daemonsets). kamailio act as webrtc server. all my webrtc clients are registered into kamailio. registration stored in location table (usrloc).
Issue: 1. Webrtc client registers to kamailio instance-1 2. I am trying to make outbound call and it was initated from kamailio-2 3. kamailio-2 looks up into location table in DB and finds the user 4. However, when it tries to send the call over websocket's tcp, it fails with the following message
4(197) WARNING: {1 102703821 INVITE 0396e8d0-edae-123e-738c-325f60cc5a45} <core> [core/msg_translator.c:3036]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Logically this is correct as the instance doesn't aware of the connection (kamcmd ws.dump does show the connection on kamailio-2 but it is seen in kamailio-1)
I need help to share this connection details between the instances so that any kamailio instance can make outbound call regardless of where it was registered.
Thank you for your help in advance.
Maharaja __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
If I understand issue correctly: You trying to call an endpoint from kamailio2 when it is registered on kamailio1. You have to send call from kamailio1, where it was registered and created socket connection to the server
On Thu, Aug 7, 2025, 14:57 Ben Kaufman via sr-users < sr-users@lists.kamailio.org> wrote:
Look at storing path information with your location data. This can be thought of like record-routing for registration. Proxies that handle the REGISTER request are recorded as path data, and then when routing the request the path can be followed ensuring that the same proxies are traversed.
Regards,
Kaufman
*From:* Maharaja Azhagiah via sr-users sr-users@lists.kamailio.org *Sent:* Wednesday, August 6, 2025 5:38 PM *To:* sr-users@lists.kamailio.org sr-users@lists.kamailio.org *Cc:* er.maharaja@gmail.com er.maharaja@gmail.com *Subject:* [SR-Users] Webrtc connection failure on multiple kamailio server setup
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi all,
I am running 2 kamailio instances in kubernetes (daemonsets). kamailio act as webrtc server. all my webrtc clients are registered into kamailio. registration stored in location table (usrloc).
Issue:
- Webrtc client registers to kamailio instance-1
- I am trying to make outbound call and it was initated from kamailio-2
- kamailio-2 looks up into location table in DB and finds the user
- However, when it tries to send the call over websocket's tcp, it fails
with the following message
4(197) WARNING: {1 102703821 INVITE 0396e8d0-edae-123e-738c-325f60cc5a45} <core> [core/msg_translator.c:3036]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Logically this is correct as the instance doesn't aware of the connection (kamcmd ws.dump does show the connection on kamailio-2 but it is seen in kamailio-1)
I need help to share this connection details between the instances so that any kamailio instance can make outbound call regardless of where it was registered.
Thank you for your help in advance.
Maharaja __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Hi Yuriy,
I understand if call goes out from kamailio1 where socket connection exists will work. But I am looking for a load balanced or high available solution where any of the instances could able to send the call out. Is it a possible scenario ?
No. WS is: - TCP based - TLS encrypted
By default you won't be able to migrate TCP sockets between different machines.
On Thu, Aug 7, 2025, 16:19 Maharaja Azhagiah via sr-users < sr-users@lists.kamailio.org> wrote:
Hi Yuriy,
I understand if call goes out from kamailio1 where socket connection exists will work. But I am looking for a load balanced or high available solution where any of the instances could able to send the call out. Is it a possible scenario ? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
As stated, use path to record the server that is handling the connection and route it from there.
1. User foo@domain sends REGISTER to server-a. 2. Server A saves register in a way that is accessible to both server and server B. Included in this is the path info. The record looks roughly like this (paraphrasing, so it might not be completely accurate): AoR: foo@domain Contact: foo@hostname;transport=wss Path: sip:server-a:5060 3. INVITE arrives on server-b for foo@domain. server-b checks the location and relays the INVITE with an RURI of foo@domain;transport=wss and sets the destination URI to sip:server-a:5060. Liekly you'll have server-b also insert itself via Record-Route as well. 4. server-a receives the request and relays it to the RURI
Regards, Kaufman ________________________________ From: Yuriy G via sr-users sr-users@lists.kamailio.org Sent: Thursday, August 7, 2025 9:23 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: er.maharaja@gmail.com er.maharaja@gmail.com; Yuriy G ovoshlook@gmail.com Subject: [SR-Users] Re: Webrtc connection failure on multiple kamailio server setup
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
No. WS is: - TCP based - TLS encrypted
By default you won't be able to migrate TCP sockets between different machines.
On Thu, Aug 7, 2025, 16:19 Maharaja Azhagiah via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> wrote: Hi Yuriy,
I understand if call goes out from kamailio1 where socket connection exists will work. But I am looking for a load balanced or high available solution where any of the instances could able to send the call out. Is it a possible scenario ? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.orgmailto:sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
You can also use the sipcapture module with sngrep:
https://voipembedded.wordpress.com/2021/03/22/troubleshooting-kamailio-encry...
Regards, Kaufman
________________________________ From: Ben Kaufman bkaufman@bcmone.com Sent: Thursday, August 7, 2025 9:36 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: er.maharaja@gmail.com er.maharaja@gmail.com; Yuriy G ovoshlook@gmail.com Subject: Re: [SR-Users] Re: Webrtc connection failure on multiple kamailio server setup
As stated, use path to record the server that is handling the connection and route it from there.
1. User foo@domain sends REGISTER to server-a. 2. Server A saves register in a way that is accessible to both server and server B. Included in this is the path info. The record looks roughly like this (paraphrasing, so it might not be completely accurate): AoR: foo@domain Contact: foo@hostname;transport=wss Path: sip:server-a:5060 3. INVITE arrives on server-b for foo@domain. server-b checks the location and relays the INVITE with an RURI of foo@domain;transport=wss and sets the destination URI to sip:server-a:5060. Liekly you'll have server-b also insert itself via Record-Route as well. 4. server-a receives the request and relays it to the RURI
Regards, Kaufman ________________________________ From: Yuriy G via sr-users sr-users@lists.kamailio.org Sent: Thursday, August 7, 2025 9:23 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: er.maharaja@gmail.com er.maharaja@gmail.com; Yuriy G ovoshlook@gmail.com Subject: [SR-Users] Re: Webrtc connection failure on multiple kamailio server setup
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
No. WS is: - TCP based - TLS encrypted
By default you won't be able to migrate TCP sockets between different machines.
On Thu, Aug 7, 2025, 16:19 Maharaja Azhagiah via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> wrote: Hi Yuriy,
I understand if call goes out from kamailio1 where socket connection exists will work. But I am looking for a load balanced or high available solution where any of the instances could able to send the call out. Is it a possible scenario ? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.orgmailto:sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!