How mahirgul/aipbx works
AiPBX is an Asterisk-based IP PBX management portal and unified communications platform. The main administrator workflow enters through the PHP portal, dispatches to routed controllers, and manages PBX configuration; the README identifies Asterisk as the telephony system. For AI calls, the local AI HTTP server dispatches call handling and model operations, with separate voice-request and cloud-language-model capabilities. The tree also shows chat, signaling, and network discovery services. Connections below are limited to README statements and source-index references or excerpts; several subsystem internals were not sampled, so their wiring is omitted.
Main entry points: server.py AI HTTP server · index.php Portal entry · calls.py Call orchestration · main.go Chat service
Components 21
Portal management
- Portal entry
web/index.php - Route table
web/src/routes.php - Controller base
web/src/core/BaseController.php - Plugin manager
web/src/core/PluginManager.php - Domain helpers
web/src/helpers.php - Portal database
PBX telephony
- Destination registry
web/modules/destinations/DestinationRegistry.php - Dialplan sync
web/src/sync - Asterisk PBX
AI voice services
- AI HTTP server
ai/aipbx_ai/server.py - Call orchestration
ai/aipbx_ai/calls.py - Voice requests
ai/aipbx_ai/voice_requests.py - Cloud language models
ai/aipbx_ai/cloud_llm.py - Model registry
ai/aipbx_ai/models.py - Audio processing
ai/aipbx_ai/wav.py
Communications services
- Chat service
chat/main.go - Chat handlers
chat/handlers.go - Chat storage
chat/storage.go - Signaling service
signaling/aipbx_signaling
Network services
- Network discovery
engine/aipbx_engine
Other components
- Administrator
Connections 17
- Administrator → Portal entry: uses
README.md - Portal entry → Route table: loads routes
web/index.php - Route table → Controller base: dispatches controllers
web/src/routes.php - Portal entry → Plugin manager: loads plugins
web/index.php - Controller base → Domain helpers: uses helpers
web/src/core/BaseController.php - Domain helpers → Portal database: accesses data
web/src/helpers.php - Destination registry → Dialplan sync: configures destinations
- Dialplan sync → Asterisk PBX: updates PBX config
- AI HTTP server → Call orchestration: dispatches calls
ai/aipbx_ai/server.py - AI HTTP server → Model registry: manages models
ai/aipbx_ai/server.py - AI HTTP server → Voice requests: handles requests
ai/aipbx_ai/server.py - Call orchestration → Cloud language models: uses language model
ai/aipbx_ai/calls.py - Call orchestration → Audio processing: processes audio
ai/aipbx_ai/calls.py - Voice requests → Cloud language models: uses language model
ai/aipbx_ai/voice_requests.py - Model registry → Audio processing: uses audio
- Chat service → Chat handlers: serves requests
- Chat service → Chat storage: uses storage