AiPBX

Spec 001: Custom Asterisk Dialplan & Context Injection


1. Problem & Goal (What & Why)

1.1 Problem Statement

AiPBX administrators frequently need to configure custom star codes, paging groups, supervisor whisper/spy codes, CRM webhooks, or direct Asterisk application routines (*80, *55, *700, DISA) without opening an SSH terminal or editing /etc/asterisk/extensions_*.conf files manually. Manual file modifications are prone to syntax errors and get overwritten or desynchronized during system updates.

1.2 Proposed Solution

Provide a dedicated Web Management UI under PBX → Custom Dialplan (/custom-dialplan) that allows administrators to define custom Asterisk contexts safely, validate syntax before saving, preview the compiled .conf file, and automatically link internal contexts to the PBX internal dialplan ([from-internal-pbx-ortak]).


2. User Stories & Acceptance Criteria (DoD)

User Stories

Acceptance Criteria (Definition of Done)


3. Technical Design (How)

3.1 Architecture Diagram

Dahili Arama (PJSIP/1001)
         │
         ▼
[from-internal-pbx-ortak]
         │
         ├── include => custom-dialplan-pbx ───► [custom-dialplan-pbx]
         │                                              ├── include => app-intercom (*80EXT)
         │                                              ├── include => app-supervisor-spy (*55EXT)
         │                                              └── include => app-group-paging (*700)
         ├── include => local-extensions
         └── include => outbound-routes

3.2 Database Schema

Table: pbx_custom_dialplans

3.3 Core Components

3.4 Security Circuit Breaker


4. Implementation Tasks & Verification