Stieneee / mumble-discord-bridge

A simple voice bridge between Mumble and Discord.
MIT License
149 stars 16 forks source link

Service won't connect to Mumble #64

Closed mwllgr closed 2 weeks ago

mwllgr commented 2 weeks ago

Hi,

the bridge is not connecting to my Mumble server and I haven't figured out why, yet. I am using the following docker-compose:

services:

  # Mumble server

  murmur:
    container_name: murmur
    image: mumblevoip/mumble-server:latest
    restart: unless-stopped
    ports:
      - "64738:64738/tcp"
      - "64738:64738/udp"
    environment:
       MUMBLE_CONFIG_SERVER_PASSWORD: "pass123"
       MUMBLE_CONFIG_WELCOME_TEXT: "Mumble Server"
       MUMBLE_CONFIG_USERS: "10"
       MUMBLE_CONFIG_BANDWIDTH: "128000"
       MUMBLE_CONFIG_OPUSTHRESHOLD: "0"
    volumes:
      - murmur:/data

  # Mumble-to-Discord bridge

  discord_bridge:
    container_name: murmur_discord
    image: stieneee/mumble-discord-bridge:next
    restart: unless-stopped
    environment:
      DEBUG: "9999"
      MUMBLE_ADDRESS: murmur
      MUMBLE_PASSWORD: pass123
      MUMBLE_INSECURE: "true"
      MUMBLE_USERNAME: Discord
      MUMBLE_CHANNEL: Root
      MODE: "auto"
      DISCORD_TOKEN: "xxxx"
      DISCORD_GID: "108205103000xxxxxxx"
      DISCORD_CID: "108205103000xxxxxxx"
      DISCORD_COMMAND: "phone"
      DISCORD_DISABLE_BOT_STATUS: "true"
    depends_on:
      - murmur

Are there any known issues as of right now? Tried the latest and the next tag of the image. The bot joins the Discord voice channel but never even logs any attempt of connecting to Mumble.

mwllgr commented 2 weeks ago

So some debugging in internal/bridge/bridge.go:

        // DISCORD Connect Voice
        log.Println("Attempting to join Discord voice channel")
        log.Println("1")

        if b.DiscordChannelID == "" {
                log.Println("Tried to start bridge but no Discord channel specified")
                return
        }
        log.Println("2")
        b.DiscordVoice, err = b.DiscordSession.ChannelVoiceJoin(b.BridgeConfig.GID, b.DiscordChannelID, false, false)
        log.Println("3")

Here, my log never prints out 3. Never done anything in Go so I don't really know how to continue here:

murmur_discord | 2024/09/04 23:07:12 Beginning auto mode murmur_discord | 2024/09/04 23:07:12 CREATE event registered murmur_discord | 2024/09/04 23:07:17 Trying to join GID xxxx and VID xxxx murmur_discord | 2024/09/04 23:07:17 Attempting to join Discord voice channel murmur_discord | 2024/09/04 23:07:17 1 murmur_discord | 2024/09/04 23:07:17 2

mwllgr commented 2 weeks ago

... increased log level:

murmur_discord  | 2024/09/04 23:09:28 Trying to join GID 1082051030004535366 and VID 1082051030004535370
murmur_discord  | 2024/09/04 23:09:28 Attempting to join Discord voice channel
murmur_discord  | 2024/09/04 23:09:28 1
murmur_discord  | 2024/09/04 23:09:28 2
murmur_discord  | 2024/09/04 23:09:28 [DG2] wsapi.go:671:ChannelVoiceJoin() called
murmur_discord  | 2024/09/04 23:09:28 [DG2] wsapi.go:718:ChannelVoiceJoinManual() called
murmur_discord  | 2024/09/04 23:09:28 [DG3] wsapi.go:555:onEvent() Op: 0, Seq: 5, Type: VOICE_STATE_UPDATE, Data: {"member":{"user":{"username":"aa","public_flags":0,"id":"10820441xxxx68","global_name":null,"display_name":null,"discriminator":"7276","clan":null,"bot":true,"avatar_decoration_data":null,"avatar":"f64b649092588523efaf4xxxx9cea"},"roles":["1082051951xxxx316"],"premium_since":null,"pending":false,"nick":null,"mute":false,"joined_at":"2023-03-05T21:28:08.832000+00:00","flags":0,"deaf":false,"communication_disabled_until":null,"banner":null,"avatar":null},"user_id":"10820441168xxxx8","suppress":false,"session_id":"25b7821c6298109c508b4933a8b835d5","self_video":false,"self_mute":false,"self_deaf":false,"request_to_speak_timestamp":null,"mute":false,"guild_id":"10820510300xxxx6","deaf":false,"channel_id":"1082051030xxxx370"}
murmur_discord  | 
murmur_discord  | 
murmur_discord  | 2024/09/04 23:09:28 [DG3] wsapi.go:555:onEvent() Op: 0, Seq: 6, Type: VOICE_SERVER_UPDATE, Data: {"token":"xxxx","guild_id":"10820510300xxxx6","endpoint":"frankfurt9188.discord.media:443"}
murmur_discord  | 
murmur_discord  | 
murmur_discord  | 2024/09/04 23:09:28 [DG2] wsapi.go:771:onVoiceServerUpdate() called
murmur_discord  | 2024/09/04 23:10:00 [DG3] wsapi.go:295:heartbeat() sending gateway websocket heartbeat seq 6
murmur_discord  | 2024/09/04 23:10:00 [DG3] wsapi.go:555:onEvent() Op: 11, Seq: 0, Type: , Data: null
mwllgr commented 2 weeks ago

Woah, my bad! Three hours of debugging to find out that I forgot a firewall rule - only the default HTTPS (443) TCP/UDP port was allowed (outgoing), so it couldn't connect to Discord's voice service.

Closing this ._.