Is the web-socket on JVB only used to transfer SDP (or similar data) not video/audio stream?

I am reading this doc:

my first thought is that the jvb can use web-socket to relay the video/audio stream.

but when I read the first line again:
WebSockets can be used instead of WebRTC Data Channels for transport of Colibri client-to-bridge messages. This needs support from the bridge as well as the client.

it seems that the jvb only use the web-socket to transfer data (like SDP, offer and answer) not video/audio stream.

am I correct ?

Correct, we don’t transmit any media over websocket, just other data.

thanks. if the UDP is banned is there any other way to transmit the media ?

Yeah you can fallback to tcp by using a TURN server.

I am testing this way.
due to some reason, we have to set the port below 1024. but it report pair failed. (port 1024 is OK but 1023 fail)
do you think is it a ICE4j limitation or OS limitation ( jvb was running as root) ?

What was the error?

@bbaldino
JVB 2019-11-04 06:36:45.472 INFO: [162] org.ice4j.ice.ConnectivityCheckClient.log() Pair failed: 10.244.0.18:1023/tcp/host -> 172.26.122.1:9/tcp/host (stream.RTP)
JVB 2019-11-04 06:36:45.493 INFO: [162] org.ice4j.ice.ConnectivityCheckClient.log() Pair failed: 10.244.0.18:1023/tcp/host -> 172.26.122.17:9/tcp/host (stream.RTP)
JVB 2019-11-04 06:36:45.514 INFO: [162] org.ice4j.ice.ConnectivityCheckClient.log() Pair failed: 10.244.0.18:1023/tcp/host -> 172.16.106.189:9/tcp/host (stream.RTP)

JVB 2019-11-04 06:38:44.846 INFO: [128] org.ice4j.ice.ConnectivityCheckClient.log() Pair succeeded: 10.244.0.19:1024/tcp/host -> 10.244.0.1:51686/tcp/prflx (stream.RTP). Local ufrag cca381doqeo8qb
JVB 2019-11-04 06:38:44.846 INFO: [128] org.ice4j.ice.ConnectivityCheckClient.log() Pair validated: 172.26.122.25:1024/tcp/srflx -> 10.244.0.1:51686/tcp/prflx (stream.RTP). Local ufrag cca381doqeo8qb
JVB 2019-11-04 06:38:44.867 INFO: [128] org.ice4j.ice.ConnectivityCheckClient.log() Pair succeeded: 172.26.122.25:1024/tcp/srflx -> 10.244.0.1:51686/tcp/prflx (stream.RTP). Local ufrag cca381doqeo8qb
JVB 2019-11-04 06:38:44.867 INFO: [128] org.ice4j.ice.ConnectivityCheckClient.log() Pair validated: 172.26.122.25:1024/tcp/srflx -> 10.244.0.1:51686/tcp/prflx (stream.RTP). Local ufrag cca381doqeo8qb

here you can, port 1024 is working but 1023 not

Hmm, it looks like the in the failure case jvb is also seeing the discard port (9) as the remote port, which isn’t right–you can see there’s a proper port there in the working case.

hmmm. right. I need to investigate. this is automatically generated by remote

@lixiran1, have you figured the discard port problem out? Seeing almost the same thing except port 9 is provided for all client TCP candidates despite JVB harvester’s port being above 1023.

so what we do with media (video/audio/data), i am studying on jitsi-videobridge but still not found, can you guid me anything related jvb flow/ streaming class,… etc?

Media is transmitted over the network via a UDP socket. ice4j does most of the actual work there, the first entry point into jvb code is in IceTransport.

1 Like

Hello @bbaldino I was about to ask this question in the community. So Is it mandatory to enable sctp in jicofo.conf and in jvb.conf(bydefault enabled in both the files)? So I have two setups one is using docker-swarm and other is using k8s.

On docker-swarm, I have disabled sctp in jicofo.conf file and its working fine while on k8s it is not. I have enable sctp in jicofo.conf to make it work on k8s setup. Bridge started failed on k8s if sctp is not enabled. I can see the Websocket connection to jvb and xmpp under Networks.

config.js snippet

config.websocket = 'wss://example.com/xmpp-websocket';
config.openBridgeChannel = 'websocket';

It would be great if you can clear the doubts.

Are you trying to enable sctp or disable it? Someone wrote up a good summary on another post: Reverting from web sockets to data channels - #8 by Shmoop

1 Like

@bbaldino off topic, but somehow related I believe.
In-case of JVBs autoscale using AWS auto-scaling groups, what is the best option to update the colibri (JVB) websockets within nginx config on the fly ? if any.

You’ll need a script that auto-assigns the server id for the JVBs in the format referenced in the colibri block in nginx config.

Thanks @Freddie, updating JVB config is not an issue, However my challange is not the JVB, my challange is updating nginx config with the new JVB IP on the fly :

# colibri (JVB) websockets for jvb1
location ~ ^/colibri-ws/default-id/(.*) {
    proxy_pass http://127.0.0.1:9090/colibri-ws/default-id/$1$is_args$args;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    tcp_nodelay on;
}

This configuration here only works if the JVB is on the same server as JMS. For JVBs hosted outside the JMS, you can’t tag them as “default-id”. Check the link below:

This is just a sample @Freddie
Ofcourse you will be using different tag and IP address

@bbaldino would you please advise about the above?