From c2e02f78ae658db5497816380ff86c359fb842f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 13 Aug 2026 02:50:06 +0000 Subject: [PATCH] asterisk vendor: always append TURN port even when TURN_SERVER is host-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit entrypoint.sh's turn_server fallback only appended :TURN_PORT when TURN_SERVER was completely unset — a TURN_SERVER carried over from an older install (or set to a bare host by hand) passed straight through with no port, so the Sipnetic QR export's "st=turn:user:pass@host" field ended up missing the port entirely. Append it whenever the configured value has no colon at all, not just when it's empty. --- vendor/easy-asterisk/docker/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vendor/easy-asterisk/docker/entrypoint.sh b/vendor/easy-asterisk/docker/entrypoint.sh index 7bdf744..1b6030f 100755 --- a/vendor/easy-asterisk/docker/entrypoint.sh +++ b/vendor/easy-asterisk/docker/entrypoint.sh @@ -134,6 +134,15 @@ mkdir -p "$CONFIG_DIR" # Determine TURN/STUN server address turn_server="${TURN_SERVER:-${DOMAIN_NAME:-$local_ip}:${TURN_PORT:-3478}}" +# TURN_SERVER may be set (e.g. carried over in .env from an older install) +# to a bare host with no port — the fallback above only appends one when +# TURN_SERVER is unset/empty entirely. Append it here too so every client +# that reads this config (Sipnetic QR export, the web admin's own display) +# always gets a host:port it can actually dial, not a host that silently +# depends on the client guessing the default port. +if [[ -n "$TURN_SERVER" && "$TURN_SERVER" != *:* ]]; then + turn_server="${TURN_SERVER}:${TURN_PORT:-3478}" +fi cat > "$CONFIG_FILE" << EOF # Easy Asterisk Configuration (Docker) - $(date)