module.xml

What is module.xml

The module.xml file is the basic descriptor for each module. Used throughout FreePBX, it's primary usage is within Module Admin as when users navigate to Module Admin the module.xml file of each module is reloaded into the database

 

Module.xml Setup

Root Blocks

Every module.xml file starts off between <module></module> root tags

<module>   </module>

Rawname

The rawname tag is the raw name of the module. It MUST be unique from any other module

<module>     <rawname>joeshmoe</rawname> </module>

Repo

The repo tag is an internal tag used for the FreePBX repo. The options for this tag can be 'standard', 'extended', 'unsupported' or 'commercial'

Note: If you are developing a third-party module this can normally be excluded

<module>     <repo>standard</repo> </module>

Name

The name tag is the pretty name of the module displayed in Module Admin

Version

The version tag is the version of the module. If it changes between viewings of module admin then module admin will mark said module for an 'upgrade'

Note: Words like alpha/beta and rc are OK
Note: Modules are are considered 'core' normally match the version of FreePBX they were developed for. Eg. the module below was developed for FreePBX 2.11 

Type

The type tag is depreciated it has been replaced with the category tag starting in FreePBX 2.10. It was used in FreePBX 2.9 and lower to determine visual placement of the module within FreePBX. It had two options, either 'setup' or 'tools'

Category

The category tag is used to determine the visual placement of the module in the drop down category items in FreePBX 2.10+. Options are 'Admin', 'Applications', 'Connectivity', 'Reports', 'Settings', 'Other'.

Note: If a category is specified here but is not defined in FreePBX then the module will be place in the 'other' category

Publisher

The publisher tag is used as a vanity tag.

Description

The description tag is used to describe the module in module admin. Note that it's possible, but discouraged, to use HTML in the Description tag, by replacing < and > with &lt; and &gt;

Changelog

The changelog tag is used to describe changes to the module. This is only seen in module admin

Info

The info tag is used as an external reference to get more information about the module.

License

The license tag is used as the license descriptor. All licenses must be compatible with GPL in order to be contributed back to FreePBX.  You can define any license you want for your modules but in order for us to consider your module submissions, they must be licensed as GPL. Not all modules on the FreePBX Mirror servers and available via Module Admin are GPL, such as Commercial Modules distributed by the FreePBX team. 

License Link (Framework 12+)

It is used to display a clickable link to the license of a given module in Module Admin and to generate a LICENSE file which sits inside the given module folder. All licenses must be compatible with GPL in order to be contributed back to FreePBX.  Please note that the license link should be a plain text version of the license and not HTML or Markup. 

Location

The location tag is an internal FreePBX reference for where module admin should find the module when downloading it from the external repository server

Md5sum

The md5sum tag is an internal FreePBX reference used to compare the downloaded module to the external repository server

Sha1

The sha1 tag is an internal FreePBX reference used to compare the downloaded module to the external repository server

Menu Items

The Menu Item tag

Depends

The depend tag

Requirements

The requirements tag

Supported

The supported tag, used only in the FreePBX mirror server to determine what module to serve up to what FreePBX client. This will be the lowest possible supported FreePBX Framework version.

Popovers (Framework 2.11+)

The popovers tag.

NOTE: That if there are multiple forms on the page that is being displayed, you should add the popover-form class to the form which is being made available to the user via popovers such as

FileInclude (Framework 2.11+)

For more information about it's usage see Restricting Module Installation.

Commercial (Framework 13+)

Commercial modules have two sub tags, 'type' which can be 'free', 'paid' or 'upgradeable', and 'link' which should be a protocol-independent link (eg, it should start with two slashes, not with http or https)

When the commercial tag is present, a 'Buy' or 'Obtain' button appears in module admin, depending on the value of 'type'. When clicking on the button, a new window is opened with the target being link. 

Out of Box Experience (Framework 13+)

Any modules that wish to provide an Out of Box Experience page must provide an 'oobe' tag in their XML.  This is documented fully on the OOBE page - Out of Box Experience

Database (Framework 14+)

Database information. This let's FreePBX know how the database should be generated. The database structure is setup/executed before the install() function/install.php is run. For more information see: Database 13#Creating/Altering/UpdatingaDatabaseThroughmodule.xml(FreePBX14+)

Hooks (Framework 12+)

Hooking information to let FreePBX know that this module has functions/methods that need to hook into other modules. For more information on how this works see: BMO Hooks#GeneralModuleHooks

Methods

The methods tag helps FreePBX to prioritize function calls during certain processes. In the call below we are setting a priority of 480 to core's core_go_get_config function. This happens during reload where-as all other get_config functions are set at a default priority of 500

Update URL (Framework 13.0.191+)

This allows you to define an updateURL for this module. When "Check Online" is run Framework will reach out to the server defined in this URL to ask it for updates to this module. For more information about the Update URL and it's functionality see: Third Party Module Hosting

Return to Documentation Home I Return to Sangoma Support