Rebuild dialplan on every container start as a safety net
Devices/rooms trigger a dialplan rebuild themselves via the web admin now, but that only fixes the problem going forward — endpoints added before that fix (or by any future path that misses the call) stay registrable-but-uncallable with no obvious cause until someone thinks to run --rebuild-dialplan by hand. Call it unconditionally once Asterisk is up, before the PJSIP transport check. Cheap and idempotent — it just regenerates extensions.conf from the current pjsip.conf/rooms.conf state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015X1jRGHwrvovz2qkhKfDZi
This commit is contained in:
+10
@@ -479,6 +479,16 @@ for i in $(seq 1 60); do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Rebuild the dialplan from the current pjsip.conf/rooms.conf on every start.
|
||||
# Devices/rooms are meant to trigger this themselves when added via the web
|
||||
# admin, but this is a cheap safety net against any path that misses it
|
||||
# (or config restored/edited outside the web admin) — without it, endpoints
|
||||
# can register fine yet be uncallable ("extension not found in context
|
||||
# 'intercom'") with no obvious cause.
|
||||
if [[ -x /usr/local/bin/easy-asterisk ]]; then
|
||||
/usr/local/bin/easy-asterisk --rebuild-dialplan >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
# Verify PJSIP transports are listening. res_pjsip finishes binding its
|
||||
# transports a beat after "core show version" first responds, so a single
|
||||
# immediate check can catch it mid-startup and misreport TLS as down even
|
||||
|
||||
Reference in New Issue
Block a user