On 30.01.23 08:45, Olle E. Johansson wrote:
Just curious, in most solutions using web sockets we reuse the existing client socket for outbound SIP messages and Kamailio never opens a web socket connection outbound, as most clients are just clients, not web servers. That’s propably why this was never a problem for anyone.
Indeed the websocket uri is useless for opening connections, the connection has to exists and matched based on peer ip/port, which should be discovered if proper request/reply handling (similar to nat traversal, with contact alias) is done.

Is there even code in Kamailio to open an outbound web socket?

Not for SIP traffic, in this case Kamailio can be only a server.

But there is a websocket client module for interacting with external apps, which can be also used by rtpengine module to connect to rtpengine app.

Cheers,
Daniel


/O

On 28 Jan 2023, at 10:35, Henning Westerholt <hw@gilawa.com> wrote:

Hello,
 
indeed Kamailio takes „ws“ as normal web socket, and “wss” as secure websockets. Compare e.g. to the pseudo-variables docs.
 
Maybe your Kamailio should insert the location entries with “;transport=wss”?
 
Cheers,
 
Henning
 
-- 
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
 
From: Karsten Horsmann <khorsmann@gmail.com> 
Sent: Friday, January 27, 2023 6:45 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] Re: transport=ws causing kamailio to use wrong listen socket
 
Hi Nathan,
 
 
I use secure websocket and it works with out an issue. Can you provide a bit more Information? Kamailio version an a bit of your config would help the list to figure out why it's not working for you. 
 
<nathan.bruning@talksome.com> schrieb am Fr., 27. Jan. 2023, 16:08:
Hi all,

We're hitting an issue while integrating secure websockets in our existing SIP infrastructure using Kamailio.

When the registration comes in, it causes an entry in our AOR table, with ";transport=ws" appended.
When we want to send a message to this client (using t_relay), kamailio seems to take 'ws' as being *unsecure* websockets. In turn, this makes Kamailio try to send out the message using a TCP listener - while it should have picked the TLS listener.

There are some remarks in the sources about ws vs. wss, so i'm struggling to figure out where things go wrong. I've also created github issue #3340 with more details.

Any help would be appreciated. If this turns out to be a Kamailio bug, i'm happy to provide a patch.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
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!
Edit mailing list options or unsubscribe:
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
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!
Edit mailing list options or unsubscribe:


__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
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!
Edit mailing list options or unsubscribe:
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com