Decouple internal SIP messaging management from PSTN trunk installation
Messaging has no dependency on a PSTN trunk existing (no cost, no carrier, no DID), but the whole PSTN Trunk tab - including the messaging checkbox added last commit - was hidden behind pstn_installed(), which only becomes true once services/pstn-trunk.sh's dialplan is actually wired in. That meant enabling messaging required going through full SIP trunk/provider setup first for no real reason. Added a standalone "Internal SIP messaging" card that's always visible in the tab regardless of trunk status, backed by a new write_messaging() that only touches the messaging key (leaving tier/allowed_numbers/ personal_did untouched) and creates pstn-permissions.conf from scratch if it doesn't exist yet. Confirmed the systemd unit's ReadWritePaths and the group/chmod grants already covered this - both are set up whenever a base Asterisk install is detected, independent of pstn-trunk - so no permission-layer changes were needed, only the dashboard's own artificial UI gate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ho9mZgAkVpdz7S5wJkg8Nf
This commit is contained in:
@@ -1817,9 +1817,10 @@ no carrier SMS, no PSTN, no cost) is gated by a \`messaging=yes\` flag per
|
||||
extension in \`pstn-permissions.conf\`, independent of the PSTN calling
|
||||
tiers above — off by default, same "opt in" posture. Currently enabled for:
|
||||
${MESSAGING_EXTS:-none}. Live-editable any time via the Security
|
||||
Dashboard's "PSTN Trunk" tab (a checkbox per extension, right in the same
|
||||
table as the calling tiers) — no need to re-run this installer just to
|
||||
change who can message.
|
||||
Dashboard's "PSTN Trunk" tab, in its own always-available "Internal SIP
|
||||
messaging" card — no need to re-run this installer, and no dependency on
|
||||
this trunk (or any PSTN trunk at all) being installed, unlike the
|
||||
calling-permissions table below it in that same tab.
|
||||
|
||||
**Won't show up in Easy Asterisk's own web admin, by design** — same as
|
||||
the PSTN calling tiers, this is a permission this repo layers on top,
|
||||
|
||||
Reference in New Issue
Block a user