CRITICAL FIX: Set ENABLE_TLS="n" by default for LAN-only installs

ROOT CAUSE FOUND:
- install_server_only() was hardcoding ENABLE_TLS="y" (line 2039)
- install_full() wasn't setting ENABLE_TLS at all
- This caused devices to always use TLS/5061 even for LAN-only setups

FIXES:
1. install_server_only(): Changed ENABLE_TLS="y" to ENABLE_TLS="n"
2. install_full(): Added ENABLE_TLS="n" before configure_asterisk
3. Added debug output showing ENABLE_TLS and DOMAIN_NAME values in device summary

HOW IT WORKS NOW:
- Both install functions start with ENABLE_TLS="n" (LAN-only/UDP)
- Only setup_internet_access() sets ENABLE_TLS="y" (internet/TLS)
- Device configuration respects ENABLE_TLS value from saved config
- Device summary correctly displays UDP/5060 for LAN-only
- Device summary shows TLS/5061 only after internet/certs setup

This ensures devices use UDP transport for LAN-only installations
and TLS only when explicitly configured for internet calling.
This commit is contained in:
Claude
2025-12-03 16:30:58 +00:00
parent cd18ca5e5d
commit 74f9f63828
+4 -1
View File
@@ -683,6 +683,8 @@ EOF
if [[ "$USE_COTURN" == "y" ]]; then
echo " TURN: ${TURN_DOMAIN:-${DOMAIN_NAME:-$CURRENT_PUBLIC_IP}}:${DEFAULT_TURN_PORT}"
fi
echo ""
echo " Config: ENABLE_TLS=$ENABLE_TLS, DOMAIN_NAME=${DOMAIN_NAME:-<not set>}"
echo "════════════════════════════════════════════════════════"
}
@@ -2013,6 +2015,7 @@ install_full() {
install_dependencies
INSTALLED_SERVER="y"
INSTALLED_CLIENT="y"
ENABLE_TLS="n" # LAN-only by default, set to "y" only if internet/certs setup is run
configure_asterisk
configure_baresip
enable_client_services
@@ -2036,7 +2039,7 @@ install_full() {
install_server_only() {
print_header "Server Installation"
ASTERISK_HOST="127.0.0.1"
ENABLE_TLS="y"
ENABLE_TLS="n" # LAN-only by default, set to "y" only if internet/certs setup is run
install_asterisk_packages
configure_asterisk
open_firewall_ports