Archival Notice
This guide was written for legacy enterprise VoIP deployments of Issabel PBX 4 (based on Elastix and CentOS 7). Please note that CentOS 7 has reached End of Life (EOL), and modern open-source PBX architectures have largely transitioned to containerized Asterisk or cloud-hosted SIP trunks. Please verify official vendor repositories before running automated installer scripts in production.
When deploying open-source Unified Communications and VoIP PBX platforms like Issabel PBX (the open-source continuation of Elastix), understanding how the automated installation script provisions your operating system is critical for enterprise security and stability.
Rather than running installer scripts blindly, conducting a structural teardown allows sysadmins to verify package sources, review firewall modifications, and understand underlying database initializations.
In this guide, I will analyze the official Issabel PBX netinstall.sh architecture, exploring how it builds Yum package manifests, initializes MariaDB, manages Asterisk runtime environments, configures amportal, and renders interactive ncurses terminal dialogs.
Prerequisites
To explore this architecture, you need a CentOS 7 virtual machine and familiarity with Bash scripting, systemd service management, and Asterisk PBX directory structures.
Step 1: Structuring the Yum Package Manifests
The core of the Issabel netinstall script relies on dynamically generating two large package manifest files (inst1.txt and inst2.txt) in /tmp.
The first manifest installs foundational OS utilities, Python libraries, Perl modules, and database engines. The second manifest installs specific Asterisk versions (asterisk11, asterisk13, or asterisk16), Dahdi hardware drivers, and Issabel framework modules.
# Snippet of dynamic manifest generation function
function generate_files
{
cat > /tmp/inst1.txt << "EOF"
acl
apr
audit
basesystem
bash
bind-libs-lite
chrony
curl
epel-release
firewalld
httpd
mariadb-server
openssh-server
php
postfix
python
sudo
systemd
yum
EOF
cat > /tmp/inst2.txt << "EOF"
asterisk$ASTVER
asterisk$ASTVER-devel
asterisk-codec-g729
asterisk-perl
asterisk-sounds-en-gsm
dahdi-linux
issabel-system
issabel-framework
issabel-pbx
issabel-security
issabel-reports
EOF
}
Step 2: Repository Provisioning and Commercial Addons
Once the package manifests are constructed, the script injects official Issabel repositories into /etc/yum.repos.d/. This configures base, updates, extras, and commercial addon mirrors.
# /etc/yum.repos.d/Issabel.repo
[issabel-base]
name=Base RPM Repository for Issabel
mirrorlist=http://mirror.issabel.org/?release=4&arch=$basearch&repo=base
gpgcheck=0
enabled=1
gpgkey=http://repo.issabel.org/issabel/RPM-GPG-KEY-Issabel
[issabel-extras]
name=Extras RPM Repository for Issabel
mirrorlist=http://mirror.issabel.org/?release=4&arch=$basearch&repo=extras
gpgcheck=1
enabled=1
gpgkey=http://repo.issabel.org/issabel/RPM-GPG-KEY-Issabel
Interactive Addons Selection
The script uses dialog to render interactive checklists allowing administrators to toggle optional modules like Sangoma Wanpipe drivers or Community Realtime Block Lists (PacketBL) to defend against automated SIP brute-force attacks.
function additional_packages
{
ADDPKGS=""
OPTS=$(dialog --backtitle "$BACKTITLE" --no-tags \
--checklist "Choose additional package(s) to install:" 0 0 0 \
1 "Issabel Network Licensed modules" on \
2 "Community Realtime Block List" on \
3 "Sangoma wanpipe drivers" off \
3>&1 1>&2 2>&3)
}
Step 3: OS Environment and User Group Settings
Before installing Asterisk packages, the script ensures that the system environment is properly configured. It creates a dedicated asterisk user and group to prevent the PBX from running under root privileges.
function settings
{
# Disable SELinux during base installation
setenforce 0
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
# Create unprivileged Asterisk group and user
/usr/sbin/groupadd -f -r asterisk
if ! grep -q asterisk: /etc/passwd ; then
/usr/sbin/useradd -r -g asterisk -c "Asterisk PBX" -s /bin/bash -d /var/lib/asterisk asterisk
fi
}
Step 4: Executing Mass Package Installation (Yum Gauge)
To provide visual feedback during mass RPM installation, the script implements a custom yum_gauge function. It iterates through the space-separated package lists from /tmp/inst1.txt and /tmp/inst2.txt, calculating percentage progress and piping output directly into an ncurses progress bar.
function yum_gauge
{
PACKAGES=$1
TITLE=$2
YUMCMD=$3
dialog --backtitle "$BACKTITLE" --title "$TITLE" --gauge "Installing..." 10 75 < <(
n=$(echo $PACKAGES | wc -w);
i=0
for p in $PACKAGES
do
PCT=$(( 100*(++i)/n ))
cat <<EOF
XXX
$PCT
Installing "$p"...
XXX
EOF
rpm --quiet -q $p
if [ $? -ne 0 ] || [ "$YUMCMD" = "update" ]; then
yum $BETAREPO --nogpg -y $YUMCMD $p &>/dev/null
fi
done
)
}
Step 5: Post-Installation Initialization and Database Setup
After all packages are installed, the script enters its post-installation phase. It enables MariaDB, configures root database credentials, backs up existing iptables rules, opens HTTPS port 443, and patches Asterisk configurations.
function post_install
{
# Enable and start MariaDB
systemctl enable mariadb.service
systemctl start mariadb
# Set temporary database credentials
mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Randompassword')"
# Backup iptables and configure firewalld
cp -a /etc/sysconfig/iptables /etc/sysconfig/iptables.org-issabel-$(/bin/date "+%Y-%m-%d-%H-%M-%S")
systemctl enable httpd
systemctl disable firewalld && systemctl stop firewalld
# Patch Asterisk modules configuration
echo "noload => cdr_mysql.so" >> /mnt/sysimage/etc/asterisk/modules_additional.conf
mkdir -p /var/log/asterisk/cdr-csv
mv /etc/asterisk/extensions_custom.conf.sample /etc/asterisk/extensions_custom.conf
# Enforce proper ownership across Asterisk directories
/usr/sbin/amportal chown
}
Step 6: Final Cleanup and Administrative Passwords
In the final phase, the script invokes issabel-admin-passwords --init to prompt the sysadmin for secure web UI and FreePBX administrative passwords, cleans up temporary /tmp manifests, and initiates a system reboot.
function cleanup
{
rm -f /tmp/inst1.txt
rm -f /tmp/inst2.txt
/usr/sbin/amportal chown
}
Architecture Teardown Complete
By analyzing the netinstall script architecture, you gain complete visibility into how Issabel PBX configures your underlying operating system, ensuring you can maintain, secure, and troubleshoot your enterprise VoIP infrastructure with absolute confidence!