Thanks for the clarification, Alex. it confused me that there is no place to define xhttp port at the beginning , but now that i understand it i got it to work and am able to register over WSS

Get Outlook for iOS

From: sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Alex Balashov <abalashov@evaristesys.com>
Sent: Tuesday, August 30, 2022 2:11:34 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Websockets Configuration
 
Hi Mahmood,

xhttp doesn’t have a distinct socket; it rides on top of existing TLS (or, I suppose, insecure TCP) listeners:

https://www.kamailio.org/wikidocs/cookbooks/5.6.x/core/#listen

The Kamailio core detects that the incoming request is an HTTP request rather than a SIP request and sends the message to the event_route exposed by xhttp.

In general, the HTTP handling inside Kamailio mostly makes use of the existing SIP parser, since there two protocols are grammatically similar.

— Alex

> On Aug 30, 2022, at 3:38 AM, Mahmood Alkhalil <mahmood.alkhalil@outlook.com> wrote:
>
> Hi Alex,
>
> Thanks for the link, I've tried both of them, the old config which is 5 years old now is not working and i think it contains old config parameters that are not valid on latest Kamailio, the second file which is 17 months old which seems to be written with kamailio 5.x in mind seems ok but i cannot work out where is the websocket port number actually defined, would really appreciate a small guidance about that,
>
> Mahmood Alkhalil.
> From: sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Alex Balashov <abalashov@evaristesys.com>
> Sent: Monday, August 29, 2022 5:08 PM
> To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
> Subject: Re: [SR-Users] Websockets Configuration

> Hi,
>
> I think these will be useful to you:
>
> https://github.com/kamailio/kamailio/tree/master/misc/examples/webrtc
>
> — Alex
>
> > On Aug 29, 2022, at 9:04 AM, Mahmood Alkhalil <mahmood.alkhalil@outlook.com> wrote:
> >
> > Hi,
> >
> > I'm trying to configure kamailio to register users over websockets, but i am not able to find any working configuration around, am new to kamailio.
> >
> > as far as i understand now, xhttp will handle the HTTP GET requests, i am not sure how to configure xhttp port number, cannot find parameters in the module manual, i found multiple sample configs but none of them is working, am using JsSip client.
> >
> > if someone can guide me with a link to a working config and that i can start from.
> > __________________________________________________________
> > 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:
> >  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>
> __________________________________________________________
> 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:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> __________________________________________________________
> 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:
>  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/


__________________________________________________________
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:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users