From 667367087b44762ad58568cb59a6df2a71deb02f Mon Sep 17 00:00:00 2001 From: Jan Kessler Date: Wed, 4 Dec 2024 12:46:13 +0100 Subject: [PATCH] add workaround for voice_bridge=99999 (test_voice_bridge) issue --- app/models/meeting.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/meeting.rb b/app/models/meeting.rb index 0fd6f83f..0ff0ea33 100644 --- a/app/models/meeting.rb +++ b/app/models/meeting.rb @@ -203,6 +203,7 @@ def self.find_or_create_with_server!(id, server, moderator_pw, voice_bridge = ni def self.allocate_voice_bridge(meeting_id, voice_bridge = nil) voice_bridge_len = Rails.configuration.x.voice_bridge_len use_external_voice_bridge = Rails.configuration.x.use_external_voice_bridge + test_voice_bridge = "99999" # default value in BBB, must be avoided # In order to make consistent random pin numbers, use the provided meeting as the seed. Ruby's 'Random' PRNG takes a 128bit # integer as seed. Create one from a truncated hash of the meeting id. @@ -225,6 +226,7 @@ def self.allocate_voice_bridge(meeting_id, voice_bridge = nil) end tries += 1 logger.debug { "Trying to allocate voice bridge number #{voice_bridge}, try #{tries}" } + next if voice_bridge == test_voice_bridge # avoid special voice bridge number _created, allocated_meeting_id = redis.multi do |transaction| transaction.hsetnx('voice_bridges', voice_bridge, meeting_id)