Comprehensive collection of development examples for MikoPBX PBX system
Π ΡΡΡΠΊΠ°Ρ Π²Π΅ΡΡΠΈΡ | Documentation
This repository contains practical, production-ready examples covering all aspects of MikoPBX module development:
Modern patterns for building REST API endpoints with OpenAPI support
- Pattern 1 - Simple Callback - Basic approach
- Pattern 2 - Custom Controllers - Transitional
- Pattern 3 - Modern 2025 β Recommended
Working with Asterisk Manager Interface
- Basic AMI Usage - Connect, send commands, handle events
Extending MikoPBX admin panel
- Custom Forms - Add settings pages and forms
Creating translation modules
- How to Create Language Pack - Complete guide
Connecting MikoPBX with third-party services
- Coming soon...
Advanced call routing with Asterisk
- Coming soon...
Asynchronous tasks and processing
- Coming soon...
git clone https://github.com/mikopbx/MikoPBX-Development-Examples.git
cd MikoPBX-Development-Examples# For REST API development
cd REST-API/ModuleExampleRestAPIv3
# For web interface customization
cd WebInterface/ModuleExampleForm
# For AMI integration
cd AMI/ModuleExampleAmiCreate a ZIP archive from the module folder. Important: module.json must be in the root of the archive.
# Example: Create ZIP for ModuleExampleRestAPIv3
cd REST-API/ModuleExampleRestAPIv3
zip -r ModuleExampleRestAPIv3.zip . -x "*.git*" "*.DS_Store"Archive structure:
ModuleExampleRestAPIv3.zip
βββ module.json β Must be in root!
βββ Lib/
βββ Models/
βββ Messages/
βββ ...
- Navigate to Modules Marketplace
- Click Upload new module
- Select your ZIP file (e.g.,
ModuleExampleRestAPIv3.zip) - Click Turn it On
Note: Modules must be installed as ZIP archives via the web interface to be properly registered in the system.
Start here if you're new to MikoPBX development:
- WebInterface/ModuleExampleForm/ - Simple settings page
- AMI/ModuleExampleAmi/ - Basic AMI usage
- LanguagePacks/HowToCreateLanguagePack.md - Translation guide
Modern API with OpenAPI support:
- REST-API/ModuleExampleRestAPIv3/ β Start here
- Read REST-API/README.md
- Study the 7-phase pattern implementation
Working with PBX core:
- AMI/ModuleExampleAmi/ - Manager Interface basics
- Coming soon: Dialplan examples
- Coming soon: Event listeners
Complex integrations and patterns:
- Coming soon: CRM integration
- Coming soon: Queue processing
- Coming soon: AGI scripts
β WebInterface/ModuleExampleForm/
β REST-API/ModuleExampleRestAPIv3/ β
β LanguagePacks/HowToCreateLanguagePack.md
β Coming soon...
β Coming soon...
- MikoPBX: 2024.2.0 or higher
- PHP: 8.3+
- Development Tools: Git, text editor, SSH access
We welcome contributions! To add a new example:
- Fork this repository
- Create example in appropriate category folder
- Add README.md with:
- Clear description
- Installation instructions
- Usage examples
- Code comments explaining WHY
- Add translations (en + ru)
- Test with latest MikoPBX
- Submit pull request
Each example follows this structure:
ModuleExample/
βββ README.md # English documentation
βββ README.ru.md # Russian documentation (if applicable)
βββ module.json # Module metadata
βββ Lib/ # PHP classes
βββ Models/ # Database models
βββ Messages/ # Translations
βββ App/Views/ # Web interface templates
βββ public/ # Assets (JS, CSS)
- MikoPBX Core - Main repository
- Module Template - Boilerplate
- Development Docs - Full documentation
- Product Website - Product information
All examples are licensed under GPLv3 - see LICENSE
- Issues: https://github.com/mikopbx/MikoPBX-Development-Examples/issues
- Discussions: https://github.com/mikopbx/Core/discussions
- Documentation: https://github.com/mikopbx/DevelopementDocs
- Community: https://mikopbx.com/forum
- β REST API v3 - Modern attribute-based routing with OpenAPI
- β AMI Integration - Asterisk Manager Interface usage
- β Form Example - Custom settings page with validation
- β Language Packs - Complete translation module guide
Made with β€οΈ by MikoPBX Community