Websocket disconnects during call setup

404 views
Skip to first unread message

Maximilian Leonhard Dorn

unread,
Jan 7, 2021, 8:54:55 AM1/7/21
to SIP.js
Hello everyone,

We are currently using sip.js in a custom build software which handles multiple thousand calls a day. In some cases we recognized a strange pattern. During the establishment of some calls after the gathering of the ICE candidates the websocket is closed. sip.js immediately re-registers . And the call is established. In the established call we only hear one-way audio from that point on.
We do not know what causes the websocket closure at the beginning of the call.
Our registration server is a freeswitch 1.10.3 running on Debian 10.
The Application runs on an Ubuntu 18.04 in a Chrome 87.
We used sip.js 0.15 and 0.17 for the tests and did not spot any difference in described bahaviour.
Anyone ran into a similiar issue or knows what causes this?

Below is a part of the Errorlog we see in chrome:
(index):102 connected 
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.invitecontext.sessionDescriptionHandler | ICE candidate gathering complete
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket disconnected (code: 1006)
sip.js:10295 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket closed without SIP.js requesting it
LoggerFactory.print @ sip.js:10295
LoggerFactory.genericLog @ sip.js:10273
Logger.genericLog @ sip.js:10337
Logger.warn @ sip.js:10333
Transport.onClose @ sip.js:20895
(index):102 ended 
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | Attempting to transition status from 1 to 3
(index):102 unregistered 
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | trying to reconnect to WebSocket wss://vmfreeswitch01.voip-sys.de:18089 (reconnection attempt 1)
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | connecting to WebSocket wss://vmfreeswitch01.voip-sys.de:18089
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | Attempting to transition status from 0 to 1
sip.js:10299 Tue Dec 15 2020 10:18:21 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket wss://vmfreeswitch01.voip-sys.de:18089 connected

Slavik Bialik

unread,
Jan 8, 2021, 7:05:27 AM1/8/21
to SIP.js
I would also try to see the logs of the WebSocket server itself (FreeSWITCH / Kamailio?) ?
Maybe the websocket server is the one that disconnects your socket and not the browser. 
Because if you say that you have a multiple thousands calls per day, maybe it also suggests that you have a very big amount of concurrent websockets opened towards the server, and maybe the server has a difficulty to handle them all.

Reply all
Reply to author
Forward
0 new messages