Merge dashboard Asterisk Admin, Extensions and PSTN Trunk into one tab
Three tabs listed the same extensions three different ways: Asterisk Admin as devices with category/status/transport, Extensions as a row of messaging checkboxes, PSTN Trunk as permission tiers with a duplicate Messaging column that wrote the same flag. Changing one extension meant knowing which of the three owned the setting you wanted. There is now one Extensions tab with one extensions table, merged from pjsip.conf (via /api/pstn-permissions, which always works) and /api/ea-devices where the Easy Asterisk container is reachable, keyed by extension so a row known to only one source still shows. Capabilities add columns rather than nav buttons: Category/Status/Transport are .ea-only, Tier/Approved-numbers are .pstn-only, and both classes start on <body> so nothing flashes before /api/ea-status and /api/pstn-status answer. Categories, Rooms, Groups, Concurrent-call caps and Personal numbers are cards under the same tab, gated the same way. Per-row Save picks its write path: tier + approved numbers + messaging via /api/pstn-permissions with a trunk installed, messaging alone via /api/pstn-messaging without one — which is what that endpoint has always been for. No backend changes; the standalone messaging-chips card and the duplicate Messaging column are both gone. Verified in Chromium against a fixture Asterisk config: full layout renders nine columns and six cards, the bare layout collapses to Ext/Name/Messaging with two cards, and both save paths write pstn-permissions.conf correctly (messaging-only leaves tier and allowed_numbers untouched). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NAddJGE1G6eGaPzmScG5Vh
This commit is contained in:
@@ -39,7 +39,7 @@ hardcoded to it — any provider supporting IP authentication works. Covers:
|
||||
- A configurable **inbound ring-group** (one extension or several), each
|
||||
member's live tier/approved-numbers checked per inbound call via an
|
||||
unrolled per-member dialplan block (no AGI needed).
|
||||
- **`services/security-dashboard.sh` integration** — a "PSTN Trunk" tab
|
||||
- **`services/security-dashboard.sh` integration** — its Extensions tab
|
||||
shows both concurrency caps and every extension (parsed from
|
||||
`pjsip.conf`) with its live tier and approved numbers, all editable with
|
||||
no restart. This is what makes the tier model and caps actually
|
||||
@@ -212,7 +212,7 @@ separately from that hourly check.
|
||||
admin-controlled approved-list in the pattern position and the live call
|
||||
data in the tested-string position — worth keeping that direction if this
|
||||
is ever refactored.
|
||||
- **Web UI — implemented.** `services/security-dashboard.sh`'s "PSTN Trunk"
|
||||
- **Web UI — implemented.** `services/security-dashboard.sh`'s Extensions
|
||||
tab lists every extension (parsed from `pjsip.conf`, the same marker
|
||||
format Easy Asterisk's own `rebuild_dialplan()` uses) with a tier dropdown
|
||||
and approved-numbers field, saving straight to `pstn-permissions.conf`.
|
||||
|
||||
@@ -2091,7 +2091,7 @@ access specifically:
|
||||
|
||||
Stored in \`config/asterisk/pstn-permissions.conf\`, read **live** by the
|
||||
dialplan via Asterisk's \`AST_CONFIG()\` on every call — editing this file
|
||||
(by hand, or via the Security Dashboard's "PSTN Trunk" tab, if that service
|
||||
(by hand, or via the Security Dashboard's Extensions tab, if that service
|
||||
is installed) takes effect on the next call, no restart needed. Re-running
|
||||
this installer in "update" mode never touches this file — only a "fresh"
|
||||
reinstall (with confirmation) or the web UI change it, the same protection
|
||||
@@ -2243,11 +2243,11 @@ Stored in \`config/asterisk/pstn-personal-dids.conf\` (DID -> owner, read live
|
||||
by the dialplan for inbound routing) and a \`personal_did=\` field per
|
||||
extension in \`pstn-permissions.conf\` (the outbound Caller-ID override) —
|
||||
both kept in sync automatically by the CLI installer and the Security
|
||||
Dashboard's "PSTN Trunk" tab, live, no restart needed.
|
||||
Dashboard's Extensions tab, live, no restart needed.
|
||||
|
||||
## Managing this from a web UI
|
||||
|
||||
If \`services/security-dashboard.sh\` is installed, its "PSTN Trunk" tab
|
||||
If \`services/security-dashboard.sh\` is installed, its Extensions tab
|
||||
shows the per-extension permission tiers, the outbound/inbound concurrency
|
||||
caps, and personal-number assignments, all editable live — no restart, no
|
||||
reinstall. Install/update it any time with \`sudo ./setup.sh
|
||||
|
||||
+355
-365
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user