[SR-Users] Kamailio 5.0.4 WebSocket failover to secondary

James Aylett james.redwood99 at gmail.com
Thu Jan 18 10:52:55 CET 2018


Hello,

I am testing failover scenarios between two Active/Active kamailios for Sip
over WebSockets and WebRTC.

In my test scenario, I have setup the call through proxy-a, then stopped
the kamailio service so that the sip client reconnects to proxy-b. Dialogs
and registrations are shared across both instances using MariaDB and
Galera. When the SIP client reconnects to proxy-b, I send a BYE and see the
following errors in the logs:

Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: <script>:
Connection ID: 1
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: <script>:
WITHINDLG
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: <script>:
RELAY
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: WARNING: <core>
[core/msg_translator.c:2765]: via_builder(): TCP/TLS connection (id: 0) for
WebSocket could not be found
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: <core>
[core/msg_translator.c:1980]: build_req_buf_from_sip_req(): could not
create Via header
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: tm
[t_fwd.c:476]: prepare_new_uac(): could not build request
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: tm
[t_fwd.c:1732]: t_forward_nonack(): failure to add branches
Jan 18 09:12:36 webrtc-proxy-b /usr/sbin/kamailio[6975]: ERROR: sl
[sl_funcs.c:362]: sl_reply_error(): stateless error reply used: No error
(2/SL)

It seems that core/msg_translator.c is using the wrong WebSocket connection
ID (0 rather than 1). Is this a bug in Kamailio or a limitation that I do
not understand? I have assumed that the BYE is a new transaction for the
existing dialog so t_relay() should be able to forward the message. I can
provide config and any additional error logs if required.

Any help is much appreciated.

Thanks,

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180118/ee38fa2e/attachment.html>


More information about the sr-users mailing list