Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasionally Jigasi stop forwarding SIP audio due to race condition #576

Open
ruozhen-vsee opened this issue Apr 21, 2024 · 0 comments
Open

Comments

@ruozhen-vsee
Copy link

This Issue tracker is only for reporting bugs and tracking code related issues.

Before posting, please make sure you check community.jitsi.org to see if the same or similar bugs have already been discussed. General questions, installation help, and feature requests can also be posted to community.jitsi.org.

Description


Occasionally Jigasi hit the issue that SIP audio stopped working and likely its due to:

When having two capture devices available, its possible that concurrent Jigasi SIP call causes DevicePreferences field ordered wrongly due to race condition. (loadDevicePreferences/saveDevice/writeDevicePreferences)

As a result, the non preferred noTransferData audio silence capture device will be wrongly picked as the preferred one and causes no audio issue. The noTransferData audio silence capture device will remain as the most preferred device until the race condition reset it, or restart the Jigasi server.

Current behavior


Jigasi stopped forwarding SIP audio data.

Expected Behavior


Jigasi should always successfully forward audio data.

Possible Solution


Proper fix probably require refractory the Devices.java class

Disable noTransferData audio silence capture device from AudioSilenceSystem is being used as a temp hack as its not needed for Jigasi SIP gateway mode.


 src/main/java/org/jitsi/impl/neomedia/device/AudioSilenceSystem.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/jitsi/impl/neomedia/device/AudioSilenceSystem.java b/src/main/java/org/jitsi/impl/neomedia/device/AudioSilenceSystem.java
index 48a0db72..b5bb41a7 100644
--- a/src/main/java/org/jitsi/impl/neomedia/device/AudioSilenceSystem.java
+++ b/src/main/java/org/jitsi/impl/neomedia/device/AudioSilenceSystem.java
@@ -64,6 +64,9 @@ protected void doInitialize()
         // capture device is required but no audio samples from it are necessary
         // such as negotiating signalling for audio but actually RTP translating
         // other participants/peers' audio.
+        System.out.println("AudioSilenceSystem Disable " 
+            + "AudioSilenceCaptureDevice:" + DataSource.NO_TRANSFER_DATA);
+        /*
         captureDevices.add(
             new CaptureDeviceInfo2(
                     "AudioSilenceCaptureDevice:" + DataSource.NO_TRANSFER_DATA,
@@ -73,6 +76,7 @@ protected void doInitialize()
                                 + DataSource.NO_TRANSFER_DATA),
                     DataSource.SUPPORTED_FORMATS,
                     null, null, null));
+                    */
 
         setCaptureDevices(captureDevices);
     }

Steps to reproduce


It's hard to reproduce, as it only happens when simultaneous requests come in.

Environment details


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant