From 402ff76f3f6cbb2d071793fa2bc5959ebab34460 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 4 Dec 2025 15:29:48 +0000 Subject: [PATCH] CRITICAL FIX: Asterisk Startup Failure - Easy Asterisk v1.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ROOT CAUSE: Script was disabling Stasis module along with optional modules (ARI, HTTP, etc.). Stasis is REQUIRED in Asterisk 20.x - it's the core message bus system. ERROR MESSAGE: "Stasis initialization failed. ASTERISK EXITING!" SYMPTOMS: - Asterisk exits with code 1 immediately after start - No certificate or PJSIP errors - Happens on fresh installs with Server Only option THE BUG: In repair_core_configs() line 1479: ```bash for conf in stasis ari http manager geolocation; do echo -e "[general]\nenabled = no" > "/etc/asterisk/${conf}.conf" done ``` This created /etc/asterisk/stasis.conf with "enabled = no" Asterisk 20.x cannot run without Stasis. THE FIX: 1. Removed 'stasis' from the disable loop 2. Created proper stasis.conf with [general] section only 3. Only disable optional modules: ari, http, manager, geolocation USER FIX (if already installed): ```bash sudo rm /etc/asterisk/stasis.conf sudo systemctl restart asterisk ``` IMPACT: - Fixes all Asterisk startup failures from v1.37/v1.37.1 - No changes to existing working installations - Critical for new server installations Version: 1.37.1 → 1.37.2 (hotfix) Resolves user-reported issue: Asterisk failing to start during installation --- easy-asterisk-interactive-v1.37.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/easy-asterisk-interactive-v1.37.sh b/easy-asterisk-interactive-v1.37.sh index 288ab5b..b18d01f 100644 --- a/easy-asterisk-interactive-v1.37.sh +++ b/easy-asterisk-interactive-v1.37.sh @@ -1,6 +1,11 @@ #!/bin/bash # ================================================================ -# Easy Asterisk - Interactive Installer v1.37.1 +# Easy Asterisk - Interactive Installer v1.37.2 +# +# CRITICAL FIX in v1.37.2: +# - FIXED: Stasis disabled causing Asterisk to fail on startup +# Stasis is REQUIRED in Asterisk 20.x - was being disabled with ARI/HTTP +# Now only disables optional modules: ari, http, manager, geolocation # # BUG FIXES in v1.37.1: # - FIXED: Function name bug (rebuild_pjsip_config → generate_pjsip_conf) @@ -47,7 +52,7 @@ PTT_CONFIG_FILE="${CONFIG_DIR}/ptt-device" CATEGORIES_FILE="${CONFIG_DIR}/categories.conf" ROOMS_FILE="${CONFIG_DIR}/rooms.conf" COTURN_CONFIG="/etc/turnserver.conf" -SCRIPT_VERSION="1.37.1" +SCRIPT_VERSION="1.37.2" # ================================================================ # 1. CORE HELPER FUNCTIONS @@ -1475,11 +1480,18 @@ load => app_dial.so load => app_page.so load => pbx_config.so EOF - - for conf in stasis ari http manager geolocation; do + + # Disable optional modules (NOT stasis - it's required in Asterisk 20.x) + for conf in ari http manager geolocation; do echo -e "[general]\nenabled = no" > "/etc/asterisk/${conf}.conf" done + # Configure Stasis properly (required core module) + cat > /etc/asterisk/stasis.conf << EOF +[general] +; Stasis is required for Asterisk 20.x core functionality +EOF + load_config local ice_config="# ICE disabled - LAN only" if [[ "$FQDN_ENABLED" == "y" ]]; then