Page tree
Skip to end of metadata
Go to start of metadata

This functionality was added in Framework 13.0.191 and allows you to define an updateURL for a 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.

During a "Check Online" procedure in FreePBX's Module Administration page FreePBX will look to see if any modules have an "updateurl" tag. If they do FreePBX will attempt to contact the updateURL server for a JSON file served over an HTTPS connection. It will then display this module upgrade to the end user. If the user decides to upgrade the module then FreePBX will attempt to download the module from the "location" key provided by the JSON file. Both the JSON file and the location provided by the location tag must be provided over a valid HTTPS connection.

This functionality was graciously contributed by miken32 (https://github.com/FreePBX/framework/pull/40)

Modifying module.xml

First you'll need to add your update url to the module.xml file. For more information on the module.xml format please see: module.xml

<updateurl>https://mycoolhostname.com/modules/mymodule.json</updateurl>

Setting up a remote json module structure

The FreePBX code requires an HTTPS link to be used for both the update URL JSON and the module download location itself. In these days of letsencrypt.org someone hosting their own server has no excuse not to run HTTPS.

On the remote server side you will need to define the module you host through JSON, the format is similar to in layout to module.xml:

{
    "rawname": "module",
    "repo": "local",
    "name": "Module",
    "version": "2.3",
    "publisher": "Publisher",
    "license": "GPLv3+",
    "licenselink": "http://www.gnu.org/licenses/gpl-3.0.txt",
    "changelog": "Some changes",
    "category": "Admin",
    "description": "A module",
    "depends": {
        "version": "13.0",
        "phpversion": "5.6"
    },
    "supported": {
        "version": "13.0"
    },
    "location": "https://download.example.com/modules/module-2.3.tgz",
    "md5sum": "55278ae5d4ab4aa7a7047076d07305b2",
    "packaged": "1486679131"
}
  • No labels