How to enable p2p and show the remote address in Connection Stats Table?

Hi everyone,
In my setup, we are using Jitsi Meet for connecting the calls between 2 users. Two peers are connected under the same network/devices and run the application in localhost. But I am having issues while connecting P2P and it does not show P2P is true in the console log. In Connection Stats Table the value of all fields also returns a null value. But I enabled P2P in the config file.
p2p: {
enabled:true,
}
stunServers: [
{ urls: ‘stun:jitsi-meet.example.com:3478’ },
{ urls: ‘stun:meet-jit-si-turnrelay.jitsi.net:443’ }
]
Is this enough to enable p2p or whether I need to follow any other process for enabling it and get the value on the connection stats table while hovering GSM bars? Can anyone please give a solution to this issue.
connectionstatstable-image

Check your browser js console; do you see any errors?

Thanks for your reply @Freddie.
I checked the console and it shows web sockets are not enabled. But I uncommented the WebSocket in config.js and run the application in localhost. Even after enabling the WebSocket in config.js, the console shows that web sockets are not enabled and I am getting a null value in connection stats.

 // BOSH URL. FIXME: use XEP-0156 to discover it.
     bosh: '//jitsi-meet.example.com/http-bind',

// Websocket URL
     websocket: 'wss://jitsi-meet.example.com/xmpp-websocket'

Do a test with 3 participants, then take a screenshot of your console and share.

Thanks for your quick response.
I have tested with 3 participants in a different browsers and still getting the same issue.


Wait - you’re not hosting your own server?

We are using a customized server and I have tested with 3 participants in the customized server and shared the console log. In the Console log, WebSockets are enabled and while connecting the 3rd user, p2p gets closed and JVB is established. From this, Shall I finalize that the p2p connection is enabled when 2 users join the call and while 3 rd users join, it switching over to JVB?

You guys really shouldn’t open multiple threads on the same issue - it’s a waste of people’s time trying to navigate through multiple threads on the same issue from the same group.

1 Like

Sorry, We are closing the following post
How to enable p2p and show the remote address in Connection Stats Table? and tracking the issue from this post.

Yes, this is the expected behavior - P2P when it’s two participants and call goes over JVB once a 3rd participant joins. But you should see P2P in your connection stats when its the governing protocol. From your screenshot, your stats are not showing - which suggests to me that you have problems with colibri websockets. To confirm/rule that out, check to see if you get the dominant speaker indicator (blue bar around thumbnail) when one participant is speaking. Also, what kind of resolution are you seeing?

I do see in one of your screenshots though that you have alpha.jitsi.net as your backend server, so I’m a bit confused about your setup/claim that you’re hosting your own server. But it also seems like you have Jitsi deployed somehow - although it’s forwarding to a static page. Puzzling.

Now, we are checked P2P in our customized server. It’s able to see P2P in console log and remote address of connection stats table. Thanks for your reply. We are closing this post.