[SOLVED] Experiencing Janus Issues on Pioneer FreedomBox

FreedomBox info:

  • Behind NAT. FreedomBox is connected to router.
  • FreedomBox version:

You are running Debian GNU/Linux 12 (bookworm) and FreedomBox version 23.6.2. FreedomBox is up to date.

Experiencing Janus Issues on Pioneer FreedomBox

Hello everyone, I’ve recently installed Janus on my Pioneer FreedomBox and while the installation seemed to go without a hitch, I’ve been running into problems when trying to use it. I was wondering if anyone else has encountered this and could possibly offer some insight.

Installation and Setup

I followed these steps:

  1. Installed Coturn.
  2. Forwarded all of the required ports since my FreedomBox is behind NAT. I ran Diagnosis and received confirmation that everything had passed.
  3. Proceeded to install Janus.

The Issue

I’ve tried using Janus on two web browsers – Librewolf (Firefox) and Brave (Chromium) – but neither one is functioning correctly. Here’s what’s happening:

  • On Librewolf, I can initiate the default room, but when a second user tries to connect, they are also given the option to start a room, rather than entering the active one. This results in both devices being in seemingly separate rooms (or they possibly just can’t connect to each other).
  • On Brave, I can set a user name and get the option to start the room, but I can’t actually join it. An error message pops up that reads:

WebRTC error… Failed to construct ‘RTCPeerConnection’: ‘stun:example.com:3478?transport=tcp’ is not a valid stun or turn URL.

My Research

Upon seeing this error, I did a bit of online research and found a StackOverflow post mentioning that STUN addresses shouldn’t include query parameters, which seemingly invalidates the following URLs, which are mentioned in the Coturn app page:

  • stun:example.com:3478?transport=tcp
  • stun:example.com:3478?transport=udp

Extra sources:
Chromium bug report
Documentation for STUN syntax
Documentation for TURN syntax

Inspecting the HTML code for the Default Video Room showed that the STUN URL is being passed with query parameters in this line:

<body data-user-turn-config="{&quot;domain&quot;: &quot;example.com&quot;, &quot;uris&quot;: [&quot;stun:example.com:3478?transport=tcp&quot;, &quot;stun:example.com:3478?transport=udp&quot;, &quot;turn:example.com:3478?transport=tcp&quot;, &quot;turn:example.com:3478?transport=udp&quot;], ...

I could be wrong, but I believe this could be causing my problem with Brave, and maybe even Librewolf. Or maybe I’m experiencing two separate problems.

Final Note

I’ve confirmed that the Coturn server is accessible using stunclient and it’s reachable, so that doesn’t seem to be the problem.

So, has anyone else tried using Janus and managed to get it to work successfully? Any advice or guidance would be greatly appreciated!

1 Like

Thanks for reporting this. It seems to be a bug in how we generate our STUN URIs. I opened an issue for it:

2 Likes

I have posted a patch to fix the problem for Janus, Matrix Synapse and ejabberd. coturn: Fix incorrectly passing transport argument to STUN URIs (!2433) · Merge requests · FreedomBox / FreedomBox · GitLab I have not tested actual audio/video calls between clients. It would be great to have some testing done with the patch.

1 Like

Great news! Thanks for all the hard work.

Just to leave a record for the forum. I have tested Janus and it is working as expected.

Thank you very much for all the hard work!

2 Likes