Installation on Debian 12

Status
Not open for further replies.
Feb 1, 2017
29
2
3
107
Can I assume that installation on Debian 12 is not possible yet? I have attempted this and the script "finishes" but it doesn't work. There are no Freeswitch or PHP binaries, tables missing, etc.

Small snippet:

Code:
resources/finish.sh: 55: /usr/bin/php: not found
ERROR:  relation "v_domains" does not exist
LINE 1: insert into v_domains (domain_uuid, domain_name, domain_enab...
 
Feb 1, 2017
29
2
3
107
Just tried again on another instance of Debian 12, and it clearly says "Correct CPU and Operating System detected". It attempts to install PHP 8.1, which isn't available.
So no, not ready for Debian 12 yet.
 
Last edited:

Davesworld

Member
Feb 1, 2019
99
11
8
65
Just tried again on another instance of Debian 12, and it clearly says "Correct CPU and Operating System detected". It attempts to install PHP 8.1, which isn't available.
So no, not ready for Debian 12 yet.
I tried a clean install in a Virtual Machine and modified scripts to use PHP 8.2 by default as well as other tweaks. To do this you leave off the last command that is given from the && part of the fusionpbx download link and it will download the source to /usr/src. One can invoke the installer at any time by doing a cd to /usr/src/fusionpbx-install.sh/debian/ and invoking the install.sh script. The stuff that needs poring over and modification is in /usr/src/fusionpbx-install.sh/debian/resources/.

The existing installations I have, I upgraded and had to tweak a few things such as telling things to use PHP 8.2 (Yes, Fusinpbx works fine with PHP 8.2). I use the Signal wire binaries via account rather than building from source as the fusion installer does by default and the bookworm freeswitch packages are now available for those who have an account, the others doing a clean install, once the scripts are Bookwormized, it has no trouble compiling Freeswitch on Bookworm. Ioncube is not yet available for PHP 8.2. I just did a
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders
_lin_x86-64.zip and it is still the December 2022 version.
It runs fine without ioncube but ioncube is designed into the install for PHP protection so use your own judgement. I am currnetly running two installations of Fusionpbx successfully on Bookworm. The installer not including Debian Bookworm and lack of ioncube 8.2 are the current limiters. I had to modify at least several things to get it to download and use PHP 8.2 and change other places where the distribution version is called out in a script.

This is not the first time I have done Debian version upgrades with FusionPBX manually. My main daily instance was originally installed in November 2020. Most people are going to want to wait but a clean install on Bookworm is doable minus ioncube if one is willing to get their hands dirty.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
503
179
43
49
FreeSWITCH 1.10.10 was released today 14 Aug 2023 and should support Debian 12. PHP 8.2 is not recommended until ioncube supports it. So for right now PHP 8.1 is recommended. Keep in mind Debian 12 hasn't been tested a large amount and there could be problems with it for FreeSWITCH. At the moment I consider it untested so make sure to do testing calls and put it through multiple use cases before using it in production.
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
FreeSWITCH 1.10.10 was released today 14 Aug 2023 and should support Debian 12. PHP 8.2 is not recommended until ioncube supports it. So for right now PHP 8.1 is recommended. Keep in mind Debian 12 hasn't been tested a large amount and there could be problems with it for FreeSWITCH. At the moment I consider it untested so make sure to do testing calls and put it through multiple use cases before using it in production.
Thanks Mark. Hopefully ioncube will upgrade soon.
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
Just tried again on another instance of Debian 12, and it clearly says "Correct CPU and Operating System detected". It attempts to install PHP 8.1, which isn't available.
So no, not ready for Debian 12 yet.
PHP 8.1 Is available for Debian 12 on the external repository but there are some things I had to modify in order to have it do a clean Debian 12 install. I had to modify three files but I modify more do it puts in the desired admin password, the desired database password, and the desired domain as well as desired firewall rules. It's so nice to boot the first time and not have to change that stuff.
 
  • Like
Reactions: jh81

Davesworld

Member
Feb 1, 2019
99
11
8
65
FreeSWITCH 1.10.10 was released today 14 Aug 2023 and should support Debian 12. PHP 8.2 is not recommended until ioncube supports it. So for right now PHP 8.1 is recommended. Keep in mind Debian 12 hasn't been tested a large amount and there could be problems with it for FreeSWITCH. At the moment I consider it untested so make sure to do testing calls and put it through multiple use cases before using it in production.
Mark, I was able to modify three files minimum and specified the latest version of freeswitch which does support 12 as you thought. The only issue with 12 is on Debian's end in that they do not install rsylogd by default, they use the journal instead so it breaks fail2ban so rsyslog should be installed here. I know fail2ban as of .90 supports the journal backend but I am not sure if it is worth it. Personally I like having all the logs. Existing systems that I updated, I just kept the old logging system meaning that there actually ARE all the logs needed to allow fail2ban to start. In case anyone wonders, FusionPBX runs fine on Postrgesql 15. The surrey repos have PHP8.1 available for Debian 12 Bookworm because while FusionPBX works fine on PHP8.2 ioncube is still stuck at 8.1.
 
Last edited:

Davesworld

Member
Feb 1, 2019
99
11
8
65
@Davesworld what files did you modify? I would love to help test PhusionPBX on Debian 12 :)
On config.sh I upped the freeswitch version to 1.10.10. Not relevant for just 12 but on IPtables I added one line for port 10000 for Webmin, if they can have a VPN rule why not add a Webmin rule?. For php.sh I added a section identical to Bullseye for Bookworm starting at line 65, example below..At this point, the if statement for 8.2 is not necessary until Ioncube releases a version for 8.2. In the nginx folder I simply changed all references in fusionpbx to PHP8.1.

if [ ."$os_codename" = ."bullseye" ]; then
if [ ."$php_version" = ."8.1" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.2" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
if [ ."$os_codename" = ."bookworm" ]; then
if [ ."$php_version" = ."8.1" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.2" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
@Davesworld what files did you modify? I would love to help test PhusionPBX on Debian 12 :)
I should also mention that in config.sh I upped the database version to 15 and it works perfectly. I had existing instances that still had version 11 running and it did require me to use the updated modified pull and simply shutting off 11 and running 15 as they both cannot run at the same time on the same port. When 15 is running, it doesn't even see the existing freeswitch and fusionpbx databases. I used a restore.sh I found somewhere that takes the latest saved database in the backups folder and restored just fine to version 15. I modified this restore.sh for my saved database location, read below. The latest backup is early every morning so it's never that old. Once satisfied I simply apt purged the 11 programs.

On my existing machines which have seen at least two distro upgrades, I run /var/freeswitch on two mirrored BTRFS drives which I never partition on a clean install, just mount it and I also moved the backup folder into /var/freeswitch so it never gets wiped and it's nice to have voicemail saved too. You always want the latest database available so I modified more than I told you for just that purpose so out of the box it's where I want it to be. On the config.sh I also put the admin password and database password as well as the domain to save time.
 
Last edited:
  • Like
Reactions: jh81

OhSeeGee

New Member
Jan 15, 2022
12
1
3
Wishing I was in Jamaica
I know it's been mentioned before, but releasing an (official) VM with everything installed would make life easier for many people - certainly the beginners. I would be happy to do this (share the VM I built) - BUT, does this violate any license terms?

Now the FreeSWITCH download is behind a key-wall, I'm not sure if a VM would be acceptable...
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
I know it's been mentioned before, but releasing an (official) VM with everything installed would make life easier for many people - certainly the beginners. I would be happy to do this (share the VM I built) - BUT, does this violate any license terms?

Now the FreeSWITCH download is behind a key-wall, I'm not sure if a VM would be acceptable...
By default, the installer chooses to build from the source code so if your installation was built from the code you may be ok. The only concern is how it is set up and if the end-user will bother to re-configure it for themselves properly and securely.
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
FreeSWITCH 1.10.10 was released today 14 Aug 2023 and should support Debian 12. PHP 8.2 is not recommended until ioncube supports it. So for right now PHP 8.1 is recommended. Keep in mind Debian 12 hasn't been tested a large amount and there could be problems with it for FreeSWITCH. At the moment I consider it untested so make sure to do testing calls and put it through multiple use cases before using it in production.
As of August 24th 2023, Ioncube is available for PHP8.2.
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
Can I assume that installation on Debian 12 is not possible yet? I have attempted this and the script "finishes" but it doesn't work. There are no Freeswitch or PHP binaries, tables missing, etc.

Small snippet:

Code:
resources/finish.sh: 55: /usr/bin/php: not found
ERROR:  relation "v_domains" does not exist
LINE 1: insert into v_domains (domain_uuid, domain_name, domain_enab...
I created a patch that will make the up-to-date changes on the existing source as it stands for Debian 11 and the patch will convert it to 12 ready including more up-to-date versions of everything such as Frreeswitch 1.10.10, Postgresql 15, PHP 8.2, Ioncube which is now released for PHP 8.2, and Sofia version 1.13.16. I removed some cruft that goes back to unsupported Debian distros in PHP and IONcube. I had to zip it in order to upload it, the .diff file is inside.

Regardless of the version of Debian, I advise one to edit the config.sh to reflect the domain you will use so it doesn't populate the IP address instead as well as the admin password and database password you have already been using. This cuts down on a lot post install work.

Deposit the patch into the fusionpbx-install.sh directory and issue the command patch -p1 -F 60 -i FusionPBX-new.diff Yes, I know I probably do not need that many fuzz lines after -F but one can use just a few lines if even needed then.
 

Attachments

  • FusionPBX-new.zip
    2.6 KB · Views: 19
  • Like
Reactions: SIPVoIPDumMe

Davesworld

Member
Feb 1, 2019
99
11
8
65
For those who make a dedicated /var/lib/freeswitch partition and not format it, this version of the patch will put the backup into the freeswitch directory that I always save rather than in /var/backups. Other than that it is identical to the diff in the previous post.
 

Attachments

  • FusionPBX-new.altbackup.zip
    3.2 KB · Views: 3
  • Like
Reactions: SIPVoIPDumMe

markjcrane

Active Member
Staff member
Jul 22, 2018
503
179
43
49
IonCube did add support for PHP 8.2 but its not officially support or recommended until FusionPBX project is also ready for it. We will need to test PHP 8.2 with FusionPBX. Also need to get it working with the FusionPBX member features. So for the moment PHP 8.2 still not recommended until that work has been completed.

I've recently put my time on stabilizing the master branch after recent changes, support work, and making the install use PostgreSQL 16 by default. Not in a hurry to use PHP 8.2 because I have no particular reason to use it. We can't use PHP 8.2 new features for several years because the body of FusionPBX users will need to eventually move to it before we can adopt its new features. Recommend waiting on PHP 8.2 for a while we aren't ready for it yet.

PHP 8.2 comes with several deprecations
- https://kinsta.com/blog/php-8-2/

The FusionPBX official install by default install Debian 12, PostgreSQL 16, FreeSWITCH 1.10.10. and FusionPBX 5.1 release branch. PostgreSQL 15 and FreeSWITCH 1.10.10 were added to the install 3 weeks ago on 6 Sep 2023. Last week PostgreSQL 16 was released on 14th Sept 2023 and was committed in the FusionPBX install script on 21 September 2023.
- https://www.fusionpbx.com/download
 
Last edited:

Davesworld

Member
Feb 1, 2019
99
11
8
65
IonCube did add support for PHP 8.2 but its not officially support or recommended until FusionPBX project is also ready for it. We will need to test PHP 8.2 with FusionPBX. Also need to get it working with the FusionPBX member features. So for the moment PHP 8.2 still not recommended until that work has been completed.

I've recently put my time on stabilizing the master branch after recent changes, support work, and making the install use PostgreSQL 16 by default. Not in a hurry to use PHP 8.2 because I have no particular reason to use it. We can't use PHP 8.2 new features for several years because the body of FusionPBX users will need to eventually move to it before we can adopt its new features.

PHP 8.2 comes with several deprecation
- https://kinsta.com/blog/php-8-2/

Recommend waiting on PHP 8.2 for a while
I did notice in the installer that you chose to stay with 8.1 which is not old by a long shot. If one runs installs that were performed years ago and updates the version of Debian a few times, they will end up with an older version of PHP and Postgresql since the specialized repos can still contain the older versions for the newer distribution. I found that I had a current version of Debian and Freeswitch still running PHP 7.3. The only way I knew what to look for was when I started studying the install source. FusionPBX just kept updating with no complaints since it still ran off of the older versions of PHP and database.
 

SIPVoIPDumMe

New Member
Sep 23, 2023
3
1
3
https://www.fusionpbx.com/download
Work as expected with the following modification:
Bash:
sed -i -e"s/^\(domain_name=\)ip_address    \(.*#\)/\1$(hostname -f)\2/;"\
 -e"s/^\(system_username=\)admin        \(.*#\)/\1superadmin\2/;"\
 -e"s/\(system_password=\)random        \(.*#\)/\1mySuperSecretPasswd\2/;"\
 -e"s/^\(switch_source=\)true /\1false/;"\
 -e"s/^\(switch_package=\)false/\1true /;"\
 -e"s/^\(switch_token=\).\{28\}/\1pat_pay_wall_token/;"\
 /usr/src/fusionpbx-install.sh-master/debian/resources/config.sh
 

Davesworld

Member
Feb 1, 2019
99
11
8
65
https://www.fusionpbx.com/download
Work as expected with the following modification:
Bash:
sed -i -e"s/^\(domain_name=\)ip_address    \(.*#\)/\1$(hostname -f)\2/;"\
 -e"s/^\(system_username=\)admin        \(.*#\)/\1superadmin\2/;"\
 -e"s/\(system_password=\)random        \(.*#\)/\1mySuperSecretPasswd\2/;"\
 -e"s/^\(switch_source=\)true /\1false/;"\
 -e"s/^\(switch_package=\)false/\1true /;"\
 -e"s/^\(switch_token=\).\{28\}/\1pat_pay_wall_token/;"\
 /usr/src/fusionpbx-install.sh-master/debian/resources/config.sh
Definitely cuts a lot of post-install stuff. I only use a domain while making sure there is not a reverse DNS or a phony nonsense one. I once made the mistake of providing a reverse-dns and soon they were targeting by domain too.

I have the credentials I received from Signalwire so I was able to modify the installer to install packages and put my credentials in when adding the repo. Once it was stated that they prefer that by default it is built from source. I am a huge fan of the debian packaging system and prefer debian packages over building by source and plopping it into directories. I do have a vanilla instance with the default install that I can run on VirtualBox.
 
Last edited:

Anand

New Member
Aug 24, 2023
20
3
3
36
I installed FusionPBX on a fresh Debian 12 server yesterday, but I've encountered an issue where call details and call recording details are not being displayed after calls. Could you please confirm if FusionPBX is fully compatible and functioning correctly on Debian 12?
 
Status
Not open for further replies.