After digging into the code, I was able to find out the source and come up with a way on how to install and upgrade modules offline. Adding those details here if anyone else is looking for something similar.
Downloading the latest version of the module
The URL to download is of the following format:
You can easily generate the list of modules that are currently on your FreePBX using the command
fwconsole ma list
In my case, I had FreePBX installed on a system that has internet access, upgrade all the modules, captured the module names and the corresponding version. From that list, ran a batch download command to download the signed version of all the modules.
There are 2 ways I can think of installing the modules on a FreePBX that does not have internet access using the downloaded versions above:
- Using the “Upload Modules” option in the Module Admin - This would be very time consuming to do it manually for each module since there are many
- In order to make it quicker to upgrade, I am going to move all the downloaded modules into a folder
/var/www/html/cachedmodules/. Since the FreePBX already has a webserver, I can run the following command to upgrade the module:
fwconsole ma downloadinstall http://localhost/cachedmodules/<modulefilename>
Note: The sequence in which each module is installed/upgraded is important because there might be dependencies. I’ll be working on it and will share it here once I have it finalized.
If there is a better/easier way of doing it, I’d definitely be interested in knowing more.