Skip to content

Comprehensive collection of MikoPBX development examples: REST API modules, AMI integration, web interface customization, language packs, and more

Notifications You must be signed in to change notification settings

mikopbx/MikoPBX-Development-Examples

Repository files navigation

MikoPBX Development Examples

Comprehensive collection of development examples for MikoPBX PBX system

Русская версия | Documentation

📚 What's Inside

This repository contains practical, production-ready examples covering all aspects of MikoPBX module development:

🔌 REST API Development

Modern patterns for building REST API endpoints with OpenAPI support

📞 AMI Integration

Working with Asterisk Manager Interface

🎨 Web Interface Customization

Extending MikoPBX admin panel

🌐 Language Packs

Creating translation modules

🔗 External Integrations

Connecting MikoPBX with third-party services

  • Coming soon...

📋 Dialplan Customization

Advanced call routing with Asterisk

  • Coming soon...

⚙️ Background Workers

Asynchronous tasks and processing

  • Coming soon...

🚀 Quick Start

1. Clone Repository

git clone https://github.com/mikopbx/MikoPBX-Development-Examples.git
cd MikoPBX-Development-Examples

2. Choose an Example

# For REST API development
cd REST-API/ModuleExampleRestAPIv3

# For web interface customization
cd WebInterface/ModuleExampleForm

# For AMI integration
cd AMI/ModuleExampleAmi

3. Create ZIP Archive

Create 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/
└── ...

4. Install via Web UI

  1. Navigate to Modules Marketplace
  2. Click Upload new module
  3. Select your ZIP file (e.g., ModuleExampleRestAPIv3.zip)
  4. Click Turn it On

Note: Modules must be installed as ZIP archives via the web interface to be properly registered in the system.

📖 Documentation by Topic

For Beginners

Start here if you're new to MikoPBX development:

  1. WebInterface/ModuleExampleForm/ - Simple settings page
  2. AMI/ModuleExampleAmi/ - Basic AMI usage
  3. LanguagePacks/HowToCreateLanguagePack.md - Translation guide

For REST API Development

Modern API with OpenAPI support:

  1. REST-API/ModuleExampleRestAPIv3/Start here
  2. Read REST-API/README.md
  3. Study the 7-phase pattern implementation

For Asterisk Integration

Working with PBX core:

  1. AMI/ModuleExampleAmi/ - Manager Interface basics
  2. Coming soon: Dialplan examples
  3. Coming soon: Event listeners

For Advanced Developers

Complex integrations and patterns:

  1. Coming soon: CRM integration
  2. Coming soon: Queue processing
  3. Coming soon: AGI scripts

🎯 Use Case Examples

"I want to add a custom settings page"

WebInterface/ModuleExampleForm/

"I need to build a REST API"

REST-API/ModuleExampleRestAPIv3/

"I want to translate MikoPBX to my language"

LanguagePacks/HowToCreateLanguagePack.md

"I need to process call events in real-time"

AMI/ModuleExampleAmi/

"I want to integrate with external CRM"

→ Coming soon...

"I need to customize call routing"

→ Coming soon...

🛠️ Requirements

  • MikoPBX: 2024.2.0 or higher
  • PHP: 8.3+
  • Development Tools: Git, text editor, SSH access

📝 Contributing

We welcome contributions! To add a new example:

  1. Fork this repository
  2. Create example in appropriate category folder
  3. Add README.md with:
    • Clear description
    • Installation instructions
    • Usage examples
    • Code comments explaining WHY
  4. Add translations (en + ru)
  5. Test with latest MikoPBX
  6. Submit pull request

🏗️ Project Structure

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)

🔗 Related Resources

📜 License

All examples are licensed under GPLv3 - see LICENSE

💬 Support

🌟 Featured Examples

  • 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

About

Comprehensive collection of MikoPBX development examples: REST API modules, AMI integration, web interface customization, language packs, and more

Resources

Stars

Watchers

Forks

Packages

No packages published