NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
62 stars 20 forks source link

NethVoice: ICE ignore list is not in the correct format as a parameter for Janus #7023

Closed andrea-marchionni closed 1 week ago

andrea-marchionni commented 3 weeks ago

Janus is launched with a set of parameters from the unit including the list of interfaces to ignore in ICE negotiation. This.

The variable, containing the list, is not expanded:

[nethvoice5@ns8n4 state]$ podman exec -it janus bash

root@ns8n4:/# cat /proc/1/cmdline 
/usr/local/bin/janus--configs-folder=/usr/local/etc/janus--interface=lo--ice-ignore-list=${ICEIGNORE:=vmnet,tap,tun,virb,vb-}--stun-server=stun1.l.google.com:19302--rtp-port-range=21002-22001--cert-pem=/etc/certificates/NethServer.pem--cert-key=/etc/certificates/NethServer.key--debug-level=5 

This means that Janus tries to negotiate the ICE in all interfaces and if it finds one that does not have access to the internet for example, failing, it waits for the timeout to arrive to move on to the next one.

However, this causes the call to be dropped on the Asterisk side.

It should be like this:

root@ns8:/# cat /proc/1/cmdline 
/usr/local/bin/janus--configs-folder=/usr/local/etc/janus--interface=lo--ice-ignore-list=wg0,ens33,vmnet,tap,tun,virb,vb---stun-server=stun1.l.google.com:19302--rtp-port-range=21002-22001--cert-pem=/etc/certificates/NethServer.pem--cert-key=/etc/certificates/NethServer.key--debug-level=5
Amygos commented 1 week ago

Testing release: 1.0.2-testing.3

Amygos commented 1 week ago

Test Case: Verify Correct Expansion of ICE Ignore List in Janus

Description: Ensure Janus properly expands the ICEIGNORE variable during launch, preventing ICE negotiation on specified interfaces after installing the NethVoice module from the testing repository.

Pre-conditions:

Steps to reproduce:

  1. Access the Janus container using Podman:
    podman exec -it janus bash
  2. Check the command line of the Janus process:
    cat /proc/1/cmdline
  3. Verify the --ice-ignore-list contains the expanded interfaces list.

Expected behavior:

Post-conditions:

Amygos commented 1 week ago

Released 1.0.2