Skip to content

mikopbx/MikoPBX-Development-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

 
 
 

Contributors