MikoPBX development
  • MikoPBX development guide
  • Prepare IDE and system tools
    • Windows
    • Linux
    • Mac
  • Modules developement
    • How to start
    • Data model
    • Module installer class
    • Module main class
    • Module interface
    • Translations(empty)
    • Debuging
      • Configuring IDE
      • Debug PHP-AGI
      • Debug PHP Worker
      • Debug PHP Script
      • Debugging behind NAT
  • Internal structure
  • Admin interface(empty)
  • API
    • REST API
    • AMI / AJAM
    • AGI
  • Core(empty)
  • Marketplace
    • Licensing (empty)
  • Cookbook
    • Forms
      • Create module form
      • Create datatable
      • Add field into existing form
    • Asterisk
      • Hook on incoming call
      • Interact with AMI
      • Modify extensions.conf
    • Rights and auth
      • External authentication
      • Limited rights
Powered by GitBook
On this page
  • What is it?
  • How to start module development
  • Get into the mikopbx internal structure
  • Modify your module
  • Make money or provide it for free

Was this helpful?

Edit on GitHub

MikoPBX development guide

This guide helps you to create new module for MikoPBX server and discover some internal structures

NextPrepare IDE and system tools

Last updated 4 years ago

Was this helpful?

What is it?

MikoPBX is an open-source GUI (graphical user interface) that controls and manages Asterisk (PBX). MikoPBX is licensed under GPL. MikoPBX is an entirely modular GUI for Asterisk written in PHP7 and Javascript. Meaning you can simply write any module you can think of and distribute it free of cost to your clients so that they can take advantage of beneficial features in The released firmware consists Linux operation system and all needing services like Asterisk, Nginx, PHP-FPM, iptables etc.

How to start module development

Firstly you should prepare your development environment according to. You will prepare your IDE, install some dependency and special tools to make your workspace well organized for the right developing process.

Next, you have to clone the template repository and rename folders, files and classes with a special script according to . Finally, you will have the new module with the right folder and classes structure.

It is ready to install on the MikoPBX and start the developing process.

Get into the mikopbx internal structure

Before starting development you have to deep into the MikoPBX internal structure. We provided some details about internal stricture, data models, models relationships in .

Also, we described , you can use int as a good example of how to develop a module interface. There is a lot of JavaScript code and PHP classes that organizes an user interaction.

Some actions require root access to system services. You can interact with them by the .

Modify your module

We advise starting development from a proper data structure. Every module has its own database. You should describe the structure of tables on models classes according to the Phalcon models . Describe every column with its type using metadata annotations and organize data relationships between other tables.

Next, you should change the installer class. It helps to prepare a real database with some data within the installation process. Read our instructions about it .

Make money or provide it for free

When you finished your module you can add it to the MIKO marketplace. We will spread it around all MikoPBX's customers.

The main module class helps you to interact with the MikoPBX classes. You can modify asterisk config files, add your own contexts to the extension.conf file, override any PJSIP parameters for peers and providers, add manager API accounts, add extra rules to iptables and fail2ban service's configuration files, add extra cron tasks, organize new REST API routes, make PHP workers. Start from of the main module class.

Develop and your module. Ask for help from our community. You are welcome to the big family!

If you want to earn some many we can add some licensing features to your module and raise money together. Read the licensing articles .

Asterisk
the
instructions
these instructions
the core description
the admin interface structure
MikoPBX REST API
documentations
here
the description
debug
here