What is the best way to install a custom built Asterisk 21 in FreePBX 17 part 2

Ok this is a repeat of

but this time I’m going to stick to the question.

There are 4 ways to do this:

  1. The “installation script” way mentioned here:

https://sangomakb.atlassian.net/wiki/spaces/FP/pages/230326391/FreePBX+17+Installation

followed by apt remove of the Asterisk 21 stuff followed by a manual compile and installation of Asterisk.

Pros: Includes all Sangoma repos
Pros: FreePBX can see that the repro-added stuff is gone and know it’s a custom-built Asterisk although I don’t know if it cares or does this.
Cons: Not sure what to remove, and FreePBX automatic updates might put all of the stuff back overwriting your own build

  1. The “hack way” which is doing the above, NOT running apt remove (but maybe running apt hold so that the upgrader is defeated if it tries to upgrade Asterisk in FreePBX) and just overwriting all the installed binaries with your own stuff.

Pros: Get all the Sangoma repos and so the modules will be installed and work.

Cons: FreePBX might reverse the apt hold and upgrade and overwrite your stuff or issue lots of angry error messages when it tries upgrading Asterisk and encounters the holds
Cons: No way to know if the manual install will -exactly- overwrite the Asterisk binaries that the repo brings down so you could have problems with your stuff being in different places than the repo’s binaries
Cons: Anyone looking at the system will think it’s Sangoma binaries instead of your custom ones because dpkg -l won’t show they have been altered

  1. The “modified installation script way” where you run the install script with the --noasterisk option

Pros: FreePBX supposedly knows it’s a custom-built Asterisk
Pros: Anyone looking a the system can see it’s custom built since dpkg -l won’t show asterisk installed
Cons: FreePBX might overwrite Asterisk during updates
Cons: Not known if there’s module issues installing certain modules
Cons: Not documented anywhere (unless you open the install script in an editor and look at it) and not known if this method will continue working in the future

  1. The Expert/manual way mentioned here:
    https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10682545/How+to+Install+FreePBX+17+on+Debian+12+with+Asterisk+21

Pros: FreePBX definitely knows it’s running on a custom-built Asterisk
Pros: Anyone looking at the system knows it’s hand-built (since dpkg -l won’t show any asterisk installed)
Pros: There won’t be any nonsense with FreePBX automatic updates overwriting Asterisk (I assume)
Cons: Limited selection of FreePBX modules included by default
Cons: Difficult to get the systemadmin module installed and working - and doing so is recommended against
Cons: Hard to put in specific commercial modules you buy
Cons: Maybe hard to register system? (I haven’t tried)

Every documentation anyone has created out on the Internet from static web pages to youtube videos seems to fall into one of these 4 categories - but there’s very little info on what works the best and what will handle FreePBX updates gracefully. And 2 of the “official” ways conflict with each other.

Just seeking clarification is all from what the FreePBX project leads recommend. Not a discussion of which way is “better”

Followup to this - if you do #1 the right way you essentially result in the same system as #3 with FreePBX 17

For FreePBX 16, #1 is equivalent to using the canned distro (since in FreePBX 16 there is no installation script) and removing Asterisk from it using apt remove. There is no equivalent to #3 for FreePBX 16.

Note that one of the cons for the #3 method is that a manual build of Asterisk with a custom module may introduce an interdependency in modules that may run into a default setting of FreePBX to not load that dependent module. (there’s about 5 modules that are restricted from loading by default in FreePBX) So go through the FreePBX config -thoroughly- once it’s running.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.