Re: Could not relay BYE to wss client

James Browne via sr-users <[email protected]> Fri, 27 Mar 2026 18:57:42 +0000
Newsgroups gmane.comp.voip.ser
Message-ID <CAEpCD+rxfyp4WFg-QKghTD5qomrsjk3SXaG7Y7utmv6Y=LB--w@mail.gmail.com>
Hi
I've fought something similar in the past.
The clue I see is that your $nh(P) is logged as "ws", but I think that
it should be "wss" because you're using secure websocket (I'm guessing
from the port number 5443).
Take a look at core parameter tcp_connection_match and see whether
toggling it helps.

Also take a look at this. It describes the problem that I had over a
year ago, which is no longer a problem now because my users use WSS,
not WS and that commit (mentioned therein) helped.
https://lists.kamailio.org/mailman3/hyperkitty/list/[email protected]/thread/CBWZ34Y5QS3YRWIU3AO24U6AZSHYH2XJ/
It might help, and it's somewhat complicated.

One important thing that I learnt is that while a Via header field can
have WS or WSS in it, there's no such thing as "transport=wss"; always
"transport=ws" is used, regardless of whether it's secure. That's when
that tcp_connection_match parameter might be important.

James

On Thu, 26 Mar 2026 at 17:22, igor.goncharovsky--- via sr-users
<[email protected]> wrote:
>
> Hello,
>
> While developing config for WebRTC proxy. Issue I have - inability to forward BYE from UDP side to WebRTC. We have updated to 5.8.8 with no luck.Issue we have shown in log bellow: we have an error message that tells Via could not be built.
>
> Mar 20 18:42:17 pbxKamaTestSBC /usr/local/kamailio/sbin/kamailio[1390086]: DEBUG: call_1774014127984617813|BYE|<null><core> [core/msg_translator.c:1859]: check_boundaries(): no multi-part body
> Mar 20 18:42:17 pbxKamaTestSBC /usr/local/kamailio/sbin/kamailio[1390086]: WARNING: call_1774014127984617813|BYE|<null><core> [core/msg_translator.c:3036]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
> Mar 20 18:42:17 pbxKamaTestSBC /usr/local/kamailio/sbin/kamailio[1390086]: ERROR: call_1774014127984617813|BYE|<null><core> [core/msg_translator.c:2100]: build_req_buf_from_sip_req(): could not create Via header
> Mar 20 18:42:17 pbxKamaTestSBC /usr/local/kamailio/sbin/kamailio[1390086]: ERROR: call_1774014127984617813|BYE|<null>tm [t_fwd.c:484]: prepare_new_uac(): could not build request
> Mar 20 18:42:17 pbxKamaTestSBC /usr/local/kamailio/sbin/kamailio[1390086]: ERROR: call_1774014127984617813|BYE|<null>tm [t_fwd.c:1764]: t_forward_nonack(): failure to add branchest
>
> I have tried to display tcp connection id from within the branch, but with no luck. I have printed $nh(u) and $nh(P) before t_relay() and it shows the correct URI and transport to be used. TCP connection id also shows correct and connection alive for the moment of BYE sent. Is there any known issue in that part? What tools could be additionally used to debug it?
>
> $nh(u) and $nh(P):
> sip:10.15.151.59:43786;transport=ws ws
> connection id to 10.15.151.59:43786 is: 2
>
> # kamcmd ws.dump used_asc
> {
> connections: {
> 2: wss:10.15.151.59:43786 -> wss:10.1.97.53:5443 (state: OPEN,  last used 2s ago, sub-protocol: sip)
> 1: wss:10.15.151.59:43798 -> wss:10.1.97.53:5443 (state: OPEN,  last used 2s ago, sub-protocol: sip)
> }
> info: {
> wscounter: 2
> truncated: no
> }
> }
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the sender!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!