bigbluebutton icon indicating copy to clipboard operation
bigbluebutton copied to clipboard

[Livekit][SIP] Dialin participant not audible if first user is muted

Open schrd opened this issue 1 month ago • 5 comments

Describe the bug I setup BBB 3.0.16 with Livekit and dialin. When the user who created the meeting is muted, he cannot hear dialin participants. When this user umutes himself he can hear the dialin participant. Edit: When all browser in the meeting are muted the dialin user cannot be heard

As we do not have freeswitch running on scalelite, I have freeswitch running on the BBB Server. The setup is the following:

  • Freeswitch listens on port 5060, the SIP trunk from the telephone network terminates there
  • livekit-sip listens on port 5062

I applied the following freeswitch config:

<!-- /opt/freeswitch/conf/sip_profiles/external/livekit.xml -->
<gateway name="livekit">
  <param name="proxy" value="${PUBLIC_IPV4_OF_BBB_SERVER}:5062"/>
  <param name="register" value="false"/>
  <param name="caller-id-in-from" value="true"/> <!--Most gateways seem to want this-->
  <param name="username" value="not-used"/>
  <param name="password" value="not-used"/>
</gateway>
<!-- /opt/freeswitch/conf/dialplan/public/my_provider.xml -->
<extension name="tuc_cucm">
 <condition field="destination_number" expression="^XXXXX">
   <action application="answer"/>
   <action application="sleep" data="500"/>
   <action application="play_and_get_digits" data="5 7 3 7000 # ivr/ivr-please_enter_pin_followed_by_pound.wav ivr/ivr-that_was_an_invalid_entry.wav pin \d+"/>
   <action application="transfer" data="SEND_TO_CONFERENCE XML public"/>
 </condition>
</extension>
<extension name="check_if_conference_active">
  <condition field="destination_number" expression="^SEND_TO_CONFERENCE$">
    <action application="log" data="forward to sofia/gateway/livekit/${pin}"/>
    <action application="bridge" data="sofia/gateway/livekit/${pin}"/>
  </condition>
</extension>

To Reproduce Steps to reproduce the behavior:

  1. Create a meeting
  2. Join a user. The user is muted
  3. Dialin to the meeting
  4. put some noise into the telephone
  5. the talking indicator for the telephone user indicates that the user is talking for ca. 1 second, but nothing can be heard
  6. after about one second the talking indicator does not show any voice activity on the dialin user despite hin creating noise
  7. When the Web user unmutes himself he can hear the dialup user and voice activity indicator works again.

It seems to work when more than one web participant is in the meeting.

Desktop (please complete the following information):

  • OS: Linux
  • Browser Firefox
  • Version 140.5 ESR

Additional context BBB built from source, bbb-webrtc-sfu is version 2.19.2

schrd avatar Nov 21 '25 13:11 schrd

I was able to reproduce this on our setup, with the same configuration. I also did:

  1. Create / Join a meeting muted
  2. Join via Dial In
  3. When joining, the talking indicator shows up for 1 second and then disappears
  4. Try to speak - can't hear the dial in user
  5. Unmute myself
  6. I can suddenly hear the dial in user again
  7. Mute myself again - Dial In user can still be heared

michelleDeko avatar Nov 21 '25 14:11 michelleDeko

Thank you for reporting! For completeness' sake, could you please link/point to the steps you followed for

I setup BBB 3.0.16 with Livekit and dialin.

antobinary avatar Nov 21 '25 16:11 antobinary

Thank you for reporting! For completeness' sake, could you please link/point to the steps you followed for

I setup BBB 3.0.16 with Livekit and dialin.

The idea was to let Freeswitch make all this IVR stuff. In addition to the two config files for freeswitch mentioned above, I changed the following config files:

  • enabled livekit as the default bridge for audio, video and screenshare in /etc/bigbluebutton/bbb-web.properties
  • set the Websocket URL for livekit in /etc/bigbluebutton/bbb-html5.yml (cluster setup)
  • changed the following config files:
     # /etc/bigbluebutton/livekit.yaml
     keys:
       aabbccdd: eeffgghh...
     webhook:
       api_key: aabbccdd
     rtc:
       interfaces:
         includes:
         - ens123
    
    # /etc/bigbluebutton/livekit-sip.yaml
    api_key: aabbccdd
    api_secret: eeffgghh...
    
    # /etc/bigbluebutton/bbb-webrtc-sfu/production.yml
    freeswitch:
      esl_password: xxxxxxxxxxxxxxxxxxxxxxxxxx
      sip_ip: aa.bb.cc.dd
    mediasoup:
      webrtc:
        - listenIps: aa.bb.cc.dd
          announcedIp: aa.bb.cc.dd
      plainRtp:
        listenIps:
        - ip: aa.bb.cc.dd
          announcedIp: aa.bb.cc.dd
      worker:
        rtcMinPort: 15000
        rtcMaxPort: 33000
    livekit:
      enabled: true
      key: aabbccdd
      secret: eeffgghh...
      rtcAgent:
        enabled: true
      sip:
        enabled: true
        requirePin: false
      dispatch:
        options:
          hidePhoneNumber: true
    

schrd avatar Nov 21 '25 22:11 schrd

The issue is not related to configuration nor setup here. For a dial-in call to be established, at least one audio track must be published in a LiveKit room (i.e.: it's not that the dial-in user is not audible - their call is not fully established yet).

prlanzarin avatar Nov 22 '25 02:11 prlanzarin

P.S.: FS as the call gateway setup is fine as described - it is the recommended way of handling dial-in currently, regardless of where it's running.

prlanzarin avatar Nov 22 '25 02:11 prlanzarin

Hi @prlanzarin , you noted this issue would be partially closed by https://github.com/bigbluebutton/bigbluebutton/pull/24270 . What part is not solved yet?

Ithanil avatar Dec 18 '25 12:12 Ithanil

@Ithanil #24270 actually closes the root issue here, so the "partially" there is misleading.

The only missing part here is helping @schrd figuring out DTMF termination in his local call gateway setup, which I didn't have the time to look into yet. Not strictly related to the original issue, though.

prlanzarin avatar Dec 18 '25 12:12 prlanzarin

It works now with a change in Freeswitch config. In /opt/freeswitch/conf/sip_profiles/external.xml there was <param name="dtmf-type" value="info"/> configured. Changing this to <param name="dtmf-type" value="rfc2833"/> solves this.

schrd avatar Dec 19 '25 13:12 schrd

It works now with a change in Freeswitch config. In /opt/freeswitch/conf/sip_profiles/external.xml there was <param name="dtmf-type" value="info"/> configured. Changing this to <param name="dtmf-type" value="rfc2833"/> solves this.

solved it for me as well

many thanks for finding the issue @schrd

Ithanil avatar Dec 19 '25 13:12 Ithanil

Thanks!

prlanzarin avatar Dec 19 '25 14:12 prlanzarin

Note to self:

  • Move https://mconf.notion.site/Docs-on-LiveKit-dial-in-23033ac02c6a8083afcad81fb9320644 into the official
  • Add local call gateway setup as an alternative to the external variant

prlanzarin avatar Dec 19 '25 14:12 prlanzarin

Sidenote: In this setup, caller_id_number appears as participant name as opposed to caller_id_name in a default BBB 3.0 setup with just FS. Also, when using a setup with FS it might still be interesting for handling the masking of the phone number, e.g.

    <!-- Empty caller ID will default to caller_id_number -->
    <action application="set_profile_var" data="caller_id_name=${regex(${caller_id_name}|^$|${caller_id_number})}"/>

    <!-- Masking the phone number in the list of participants. -->
    <!-- Instead of `01711233121` it will then show `xxx-xxx-3121`. -->
    <action application="set_profile_var" data="caller_id_name=${regex(${caller_id_name}|^.*([0-9-\/]{4})$|xxx-xxx-%1)}"/>
    <action application="set_profile_var" data="caller_id_number=${regex(${caller_id_number}|^.*([0-9-\/]{4})$|xxx-xxx-%1)}"/>

    <!-- If caller ID is still empty it will default to "Anonymous" -->
    <action application="set_profile_var" data="caller_id_name=${regex(${caller_id_name}|^$|Anonymous)}"/>
    <action application="set_profile_var" data="caller_id_number=${regex(${caller_id_number}|^$|Anonymous)}"/>

In that case one would use hidePhoneNumber: false for livekit-sip.

Ithanil avatar Dec 19 '25 14:12 Ithanil