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