# MikoPBX development

## MikoPBX development

- [MikoPBX development guide](https://docs.mikopbx.com/mikopbx-development/master.md): This guide helps you to create new modules for MikoPBX and understand its internal structure.
- [Prepare IDE and system tools](https://docs.mikopbx.com/mikopbx-development/prepare-ide-tools.md): How to organize workspace for MikoPBX extension developement.
- [Windows](https://docs.mikopbx.com/mikopbx-development/prepare-ide-tools/windows.md): How to organize workspace for MikoPBX extension developement.
- [Linux](https://docs.mikopbx.com/mikopbx-development/prepare-ide-tools/linux.md): How to organize workspace for MikoPBX extension developement.
- [Mac](https://docs.mikopbx.com/mikopbx-development/prepare-ide-tools/mac.md): How to organize workspace for MikoPBX extension developement.
- [How to start](https://docs.mikopbx.com/mikopbx-development/module-developement/template-module-structure.md): Clone the module template and prepare it for development.
- [Module anatomy](https://docs.mikopbx.com/mikopbx-development/module-developement/module-anatomy.md): The complete directory and file map of a MikoPBX module — every folder, the class it holds, and how the App / Lib / Worker tiers fit together.
- [module.json reference](https://docs.mikopbx.com/mikopbx-development/module-developement/module-json.md): Field reference for the module.json manifest, version constraints, and how dependencies actually work in MikoPBX.
- [Data model](https://docs.mikopbx.com/mikopbx-development/module-developement/data-model.md): Phalcon 5 models, table conventions, relationships and metadata in a MikoPBX module.
- [Module installer class](https://docs.mikopbx.com/mikopbx-development/module-developement/module-installer.md): The PbxExtensionSetup lifecycle: install, setup and uninstall an extension module.
- [Module main class](https://docs.mikopbx.com/mikopbx-development/module-developement/module-class.md): The ConfigClass-based hub: features, hooks, REST API methods, and PBX core interaction.
- [Hooks reference](https://docs.mikopbx.com/mikopbx-development/module-developement/hooks-reference.md): The complete verified catalog of MikoPBX module extension points (hooks): exact signatures, the interface that declares each constant, and the Core call site that fires them.
- [Recipes](https://docs.mikopbx.com/mikopbx-development/module-developement/recipes.md): Capability building blocks: the recipes that compose a MikoPBX module.
- [Workers and background processes](https://docs.mikopbx.com/mikopbx-development/module-developement/workers.md): Long-running background workers: Beanstalk and AMI patterns, registration and supervision via WorkerSafeScriptsCore.
- [Module interface](https://docs.mikopbx.com/mikopbx-development/module-developement/module-interface-empty.md): Building the admin-cabinet UI: controllers, forms, Volt views, providers and JS/CSS.
- [REST API in modules](https://docs.mikopbx.com/mikopbx-development/module-developement/rest-api-in-modules.md): Exposing a module REST API: the modern v3 attribute-routed pattern with auto-discovered #\[ApiResource] controllers, Processor + Action classes, and a DataStructure single source of truth that drives O
- [Translations](https://docs.mikopbx.com/mikopbx-development/module-developement/translations.md): Module localization: Messages files and the 29-language translation workflow.
- [Best practices](https://docs.mikopbx.com/mikopbx-development/module-developement/best-practices.md): Conventions, PHP 8.4 idioms, and anti-patterns to avoid when building MikoPBX modules.
- [Debuging](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging.md)
- [Configuring IDE](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging/configuring-ide.md)
- [Debug PHP-AGI](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging/debug-php-agi.md)
- [Debug PHP Worker](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging/debug-php-worker.md)
- [Debug PHP Script](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging/debug-php-script.md)
- [Debugging behind NAT](https://docs.mikopbx.com/mikopbx-development/module-developement/debuging/debugging-behind-nat.md)
- [Admin interface](https://docs.mikopbx.com/mikopbx-development/internal-structure/admin-interface.md): Architecture of the MikoPBX admin-cabinet web application.
- [API](https://docs.mikopbx.com/mikopbx-development/internal-structure/api.md): Overview of MikoPBX APIs and integration surfaces — REST API v3, AMI/AJAM, AGI, and the legacy module REST callback — with guidance on when to use each.
- [REST API](https://docs.mikopbx.com/mikopbx-development/internal-structure/api/rest-api.md): The MikoPBX PBXCoreREST API: v3 architecture, auth, routing and async processing.
- [AMI / AJAM](https://docs.mikopbx.com/mikopbx-development/internal-structure/api/ami-ajam.md): Interacting with Asterisk via AMI (TCP 5038) and AJAM (HTTP).
- [AGI](https://docs.mikopbx.com/mikopbx-development/internal-structure/api/agi.md): MikoPBX implementation of the PHP-AGI library and how to write AGI scripts that hook into the Asterisk dialplan from a module.
- [Core](https://docs.mikopbx.com/mikopbx-development/internal-structure/core.md): Architecture overview of the MikoPBX core engine: the six MikoPBX\ namespaces, the Phalcon 5 / SQLite / Redis platform, and the core data-model graph.
- [Licensing](https://docs.mikopbx.com/mikopbx-development/marketplace/licensing.md): How module licensing and the MikoPBX marketplace work, at a high level — the author-facing model for commercial modules and version-filtered distribution.
- [Forms](https://docs.mikopbx.com/mikopbx-development/cookbook/forms.md): Recipes for building module admin forms and data tables.
- [Create module form](https://docs.mikopbx.com/mikopbx-development/cookbook/forms/create-module-form.md): Step-by-step: build a settings form for your module.
- [Create datatable](https://docs.mikopbx.com/mikopbx-development/cookbook/forms/create-datatable.md): Step-by-step: build a server-paginated list grid backed by the v3 getList endpoint.
- [Add field into existing form](https://docs.mikopbx.com/mikopbx-development/cookbook/forms/add-field-into-existing-form.md): Inject a custom field into a core MikoPBX form from your module.
- [Asterisk](https://docs.mikopbx.com/mikopbx-development/cookbook/asterisk.md): Recipes for integrating modules with the Asterisk dialplan, AMI and configs.
- [Hook on incoming call](https://docs.mikopbx.com/mikopbx-development/cookbook/asterisk/hook-on-incoming-call.md): Run custom logic on an incoming call using dialplan generation hooks.
- [Interact with AMI](https://docs.mikopbx.com/mikopbx-development/cookbook/asterisk/interact-with-ami.md): Listen to live Asterisk events and send AMI commands from a module worker.
- [Modify extensions.conf](https://docs.mikopbx.com/mikopbx-development/cookbook/asterisk/modify-extensions.conf.md): Add custom contexts and dialplan rules to the generated extensions.conf.
- [Rights and auth](https://docs.mikopbx.com/mikopbx-development/cookbook/rights-and-auth.md): Recipes for authentication, ACL roles and per-role data filtering in modules.
- [External authentication](https://docs.mikopbx.com/mikopbx-development/cookbook/rights-and-auth/external-authentication.md): Integrate LDAP/OAuth login via the authenticateUser hook.
- [Limited rights](https://docs.mikopbx.com/mikopbx-development/cookbook/rights-and-auth/limited-rights.md): Define ACL roles, controller permissions and per-role data filtering so that module-managed users see only what their role allows.
- [Overview](https://docs.mikopbx.com/mikopbx-development/ai-assisted-development/ai-assisted-development.md): Using the /mikopbx-module AI skill to create, augment and optimize modules.
- [Using the skill](https://docs.mikopbx.com/mikopbx-development/ai-assisted-development/using-the-skill.md): How to drive the /mikopbx-module skill: prompting, the discovery dialog and recipe selection.
- [What it generates](https://docs.mikopbx.com/mikopbx-development/ai-assisted-development/what-it-generates.md): The files the /mikopbx-module skill produces, the post-generation checks it runs, and how to verify the output yourself.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://docs.mikopbx.com/mikopbx-development/master.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
