FreePBX Module Generator

Introduction

To improve the process of module creation the FreePBX team has built a generator that provides a basic module skeleton to start from.

If this is a FreePBX development environment the module will be loaded into the development directory, usually /usr/src/freepbx

If this is a standard installation the module will be loaded into the standard module directory, usually /var/www/html/admin/modules

Authors

Luis Anghelo Abarca Villacis

Alberto Javier Santos Flores

J.P. Romero

James Finstrom

Andrew Nagy

 

Install

For those curious, the repository is located here: https://git.freepbx.org/projects/FL/repos/freepbx-module-generator/browse

 

cd /usr/src wget https://git.freepbx.org/projects/FL/repos/freepbx-module-generator/raw/dist/freepbxgenerator.phar?at=refs%2Fheads%2Fmaster -O freepbxgenerator.phar chmod +x freepbxgenerator.phar

This will download the module builder phar and make it executable

Use

Run the command

./freepbxgenerator.phar

Answer the questions

Do you want to create a FreePBX or a UCP 14+ module? [Both]   [0] FreePBX   [1] UCP 14+   [2] Both  > 2 What is your module's name (no spaces)? [helloworld] ariblacklist What is your module's version? [14.0.1] 15.0.1 What is your module's description? [Generated Module] Blacklist calls with ARI What is the license for this module? [AGPLv3]   [0] GPLv2   [1] GPLv3   [2] AGPLv3   [3] MIT  > 2 What type of module is this? [Connectivity]   [0] Admin   [1] Applications   [2] Connectivity   [3] Reports   [4] Settings  > 1

Confirm your information

The module skeleton will be created

The module has been fully installed into freepbx and is ready for development

image2018-2-22_19-0-10.png

 

image2018-2-22_19-0-43.png

 

 

 

 

You can cd to the module in the above case ariblacklist and the following structure will be in place

What's Next?

After you've setup your module you're probably asking yourself, "Okay, what now?". The best next step would be starting with FreePBX Development to get a general overview of functions and methods from within FreePBX

Another great place to start is by looking over the FreePBX Internals wiki pages. These pages should help give you a brief overview of FreePBX and deep dive into specific functions and methods

Return to Documentation Home I Return to Sangoma Support