Skip to content
ViciDial AI ViciDial AI ViciDial AI

The VICIdial Community Blog

ViciDial AI ViciDial AI ViciDial AI

The VICIdial Community Blog

  • Home
  • Vicidial Hosting
  • Home
  • Vicidial Hosting
Close

Search

  • Home
  • Vicidial Hosting
Subscribe
Stacked horizontal strata representing software layers, with the Asterisk layer highlighted.
InstallationVICIdial

VICIdial Scratch Install on AlmaLinux 9 with Asterisk 18

By sundaram
February 9, 2023 4 Min Read
0

With CentOS 7 heading toward end of life, AlmaLinux 9 is the sensible target for a scratch install. This walks through the whole build on a hosted server where you cannot boot the ViciBox ISO.

Budget two to three hours. The Asterisk compile is the long part.

Prerequisites

  • AlmaLinux 9 minimal, root or sudo access
  • A public IP, and at least 4 GB RAM / 2 cores for a small install
  • SELinux and firewalld will be adjusted as we go

1. Base System

dnf -y update
dnf -y install epel-release
dnf config-manager --set-enabled crb

crb (CodeReady Builder) replaces what was PowerTools on 8, and several Asterisk build dependencies live there.

Set SELinux to permissive. VICIdial’s perl scripts and Apache paths do not play well with enforcing mode:

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config

Set the hostname and timezone — time sync problems are a classic VICIdial failure:

hostnamectl set-hostname dialer1
timedatectl set-timezone America/New_York
dnf -y install chrony
systemctl enable --now chronyd

2. Dependencies

dnf -y install gcc gcc-c++ make patch wget curl subversion git \
  ncurses-devel libxml2-devel libtermcap-devel openssl-devel \
  newt-devel kernel-devel sqlite-devel libuuid-devel \
  jansson-devel libedit-devel bzip2 unzip sox mpg123 lame \
  perl perl-CPAN perl-DBI perl-DBD-MySQL perl-Time-HiRes \
  perl-Net-Telnet perl-Switch perl-Term-ReadLine-Gnu \
  perl-libwww-perl perl-Crypt-Eksblowfish perl-MD5 \
  httpd php php-mysqlnd php-cli php-gd php-mbstring \
  mariadb-server mariadb screen

3. MariaDB

systemctl enable --now mariadb
mysql_secure_installation

Tune for a dialer. Create /etc/my.cnf.d/vicidial.cnf:

[mysqld]
max_connections = 400
key_buffer_size = 512M
table_open_cache = 2048
query_cache_size = 0
query_cache_type = 0
tmp_table_size = 256M
max_heap_table_size = 256M
open_files_limit = 65535
lower_case_table_names = 1

Adjust key_buffer_size to roughly a quarter of RAM on a dedicated database box.

systemctl restart mariadb

Create the database and users:

CREATE DATABASE asterisk CHARACTER SET utf8mb4;
CREATE USER 'cron'@'localhost' IDENTIFIED BY '1234';
GRANT ALL PRIVILEGES ON asterisk.* TO 'cron'@'localhost';
CREATE USER 'custom'@'localhost' IDENTIFIED BY 'custom1234';
GRANT SELECT,INSERT,UPDATE,DELETE ON asterisk.* TO 'custom'@'localhost';
FLUSH PRIVILEGES;

Change these before the box sees production traffic — they are the published defaults.

4. Perl Modules

VICIdial needs several modules not packaged in EPEL:

cpan -i Net::Telnet
cpan -i Time::HiRes
cpan -i Net::Server
cpan -i Mail::Sendmail
cpan -i Term::ReadKey
cpan -i Spreadsheet::WriteExcel
cpan -i Spreadsheet::ParseExcel
cpan -i Text::CSV_XS
cpan -i Crypt::Eksblowfish::Bcrypt

Answer yes when CPAN offers to configure automatically on first run.

5. Supporting Applications

cd /usr/src

# asterisk-perl
wget http://download.vicidial.com/required-apps/asterisk-perl-0.08.tar.gz
tar xzf asterisk-perl-0.08.tar.gz
cd asterisk-perl-0.08 && perl Makefile.PL && make && make install
cd /usr/src

# sipsak — used by VICIdial's SIP checks
wget http://download.vicidial.com/required-apps/sipsak-0.9.6-1.tar.gz
tar xzf sipsak-0.9.6-1.tar.gz
cd sipsak-0.9.6 && ./configure && make && make install

Verify:

/usr/local/bin/sipsak --version

6. DAHDI and Asterisk 18

DAHDI is only required if you have PRI or analogue hardware, but VICIdial’s timing historically depended on dahdi_dummy. On a pure-SIP virtual server you can skip it; Asterisk 18 uses internal timing via res_timing_timerfd.

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
tar xzf asterisk-18-current.tar.gz
cd asterisk-18.*/
contrib/scripts/install_prereq install
./configure --libdir=/usr/lib64 --with-jansson-bundled
make menuselect

In menuselect, under Resource Modules, make sure res_timing_timerfd is enabled. Under Codec Translators, enable what your carriers use. Save and exit, then:

make -j$(nproc)
make install
make samples
make config
ldconfig

Confirm:

asterisk -rx "core show version"

7. astguiclient

cd /usr/src
svn checkout svn://svn.eflo.net:3690/agc_2/trunk astguiclient
cd astguiclient
perl install.pl

The installer asks a series of questions. The answers that matter:

  • Web directory: /var/www/html
  • Asterisk sounds: /var/lib/asterisk/sounds
  • Recordings: /var/spool/asterisk/monitorDONE
  • Database host: localhost, database asterisk, user cron

It writes /etc/astguiclient.conf, copies the web files, and offers to load the schema. Say yes.

If the schema did not load:

mysql -u cron -p1234 asterisk < /usr/src/astguiclient/extras/MySQL_AST_CREATE_tables.sql

8. Apache and PHP

systemctl enable --now httpd

In /etc/php.ini:

max_execution_time = 330
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 32M
date.timezone = America/New_York
systemctl restart httpd

Timezone must match the OS and database timezones or you will see the “time synchronization problem” warning in the admin interface.

9. Crontab

VICIdial runs on cron. Copy the sample:

crontab /usr/src/astguiclient/docs/crontab.sample
crontab -l

Check that these exist, they are the ones people miss:

* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl
* * * * * /usr/share/astguiclient/AST_conf_update.pl
0 1 * * * /usr/share/astguiclient/AST_DB_optimize.pl

10. First Start

/usr/share/astguiclient/ADMIN_keepalive_ALL.pl
screen -ls

You should see screens for ASTfastlog, ASTVDauto, ASTVDadapt, ASTupdate and others. Missing screens mean a perl dependency failed — check /var/log/astguiclient/ for the specific module name.

Then browse to http://your-ip/vicidial/admin.php and log in with 6666 / 1234.

Immediately change that password, set Admin → Servers → Asterisk Version to 18.X, and add your conference ranges under the server entry.

Post-Install Checklist

  • asterisk -rx "core show version" returns 18.x
  • All expected screens running
  • Admin login works and the server row shows a current timestamp
  • Timezone identical across OS, PHP and MariaDB
  • Default passwords changed
  • Firewall restricted to your carrier IPs

From here, add a carrier, create a phone, and place a test call before loading any leads.

Tags:

almalinuxasterisk 18astguiclientcentos replacementmariadbscratch installvicidial
Author

sundaram

Follow Me
Other Articles
Grid of database blocks with two corrupted rows marked in red among intact rows.
Previous

Repairing and Optimizing a Crashed VICIdial MariaDB Database

Audio waveform travelling inside a bounded, measured channel.
Next

Installing VICIphone WebRTC with Let’s Encrypt SSL on ViciBox 11

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About This Site

Vicidial, Asterisk, GoAutoDial and FreePBX tutorials — with practical guides to AI answering machine detection and AI agent integration.

Search

Recent Posts

  • Piping VICIdial Call Recordings Into a Speech-to-Text Workflow
  • Fixing ‘Extension s Rejected Because Extension Not Found’ on Inbound Calls
  • Asterisk Variable Manipulation: Substrings, Math and Caller ID Rewriting
  • PJSIP Trunks in VICIdial: A Working Asterisk 18 Configuration
  • Installing VICIphone WebRTC with Let’s Encrypt SSL on ViciBox 11

ViciDial AI

Vicidial, Asterisk, GoAutoDial and FreePBX tutorials — with practical guides to AI answering machine detection and AI agent integration.

Recent Posts

  • Piping VICIdial Call Recordings Into a Speech-to-Text Workflow
  • Fixing ‘Extension s Rejected Because Extension Not Found’ on Inbound Calls
  • Asterisk Variable Manipulation: Substrings, Math and Caller ID Rewriting
  • PJSIP Trunks in VICIdial: A Working Asterisk 18 Configuration
  • Installing VICIphone WebRTC with Let’s Encrypt SSL on ViciBox 11

Archives

  • April 2024 (1)
  • January 2024 (1)
  • October 2023 (1)
  • August 2023 (1)
  • May 2023 (1)
  • February 2023 (1)
  • November 2022 (1)
  • September 2022 (1)
  • June 2022 (1)
  • March 2022 (1)

Find Us

Contact Us:

email: info@vicidialai.com

Copyright 2026 — ViciDial AI. All rights reserved. | Privacy Policy