Reporting version 1.5.0 to mumble-server caused it to expect the newer
audio frame format (terminator bit on opus length varint). pymumble
1.6.1 does not implement this, so the server silently dropped every
UDPTunnel audio packet. Revert to native 1.2.4 -- audio works, only
side effect is a cosmetic ChannelListener warning.
Also remove --cprofile from docker-compose command.
- Update reported protocol version from 1.2.4 to 1.5.0 so modern
Murmur servers treat PyMumble as a compatible client
- Fix OS string to report actual platform instead of "PyMumble 1.6.1"
(was shown as [Invalid] by Murmur)
- Raise pymumble reconnect retry interval to 15s to prevent autoban
when running multiple bots from the same IP
- Enable TCP keepalive on control socket (10s idle) to prevent NAT
gateways from dropping long-lived connections
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two issues causing ~2min reconnect cycles:
1. pymumble captures threading.current_thread() as parent_thread at
init. Since we construct it in a run_in_executor thread, the parent
dies after _connect_sync returns, triggering pymumble's loop exit.
Fix: point parent_thread at threading.main_thread().
2. pymumble's init_connection() drops the control_socket reference
without closing it. The lingering TCP connection makes Murmur kick
the new session with "connected from another device". Fix: patch
init_connection to close the old socket before reconnecting.
asyncio's SSL memory-BIO transport silently drops voice packets even
though text works fine. pymumble uses blocking ssl.SSLSocket.send()
which reliably delivers voice data.
- Rewrite MumbleBot to use pymumble for connection, SSL, ping, and
voice encoding/sending
- Bridge pymumble thread callbacks to asyncio via
run_coroutine_threadsafe for text dispatch
- Voice via sound_output.add_sound(pcm) -- pymumble handles Opus
encoding, packetization, and timing
- Remove custom protobuf codec, voice varint, and opus ctypes wrapper
- Add container patches for pymumble ssl.wrap_socket (Python 3.13) and
opuslib find_library (musl/Alpine)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>