how to install vicidial on centos 6 with asterisk 11
Overview & prerequisites
This guide walks you through a scratch/manual install of VICIdial on a freshly installed CentOS 6 server and building Asterisk 11 (plus DAHDI and libpri) from source. It is aimed at system administrators and VoIP engineers who need a manual install instead of using a VICIBOX ISO image. If you prefer an automated install, consider using the VICIBOX ISO which packages VICIdial with tested dependencies.
Table of Contents
ToggleMinimum recommended server (for lab / small deployment):
- 64-bit x86 server (2+ CPU cores)
- 8–16 GB RAM (more for larger call volumes)
- 100+ GB disk (recordings)
- Static IP and proper DNS
- CentOS 6.10 (latest 6.x) freshly installed
Prerequisites & warnings
- Root or sudo access.
- Internet access to download sources and packages.
- Backups of any existing data — this process can change configs and packages.
- Understand you are using legacy OS/software; production use should be isolated or migrated to modern OS like CentOS 7/8 or Rocky/AlmaLinux and newer Asterisk/VICIdial versions when possible.
High-level install plan
- Update OS, disable SELinux, set hostname, and ensure network.
- Install build tools and dependencies.
- Download and build DAHDI, libpri, then Asterisk 11.
- Install Apache, PHP, MySQL (MariaDB/MySQL 5.5/5.6 compatible with VICIdial) and PHP extensions.
- Create MySQL databases and users; import VICIdial schema.
- Checkout VICIdial code (SVN/Git) and run its install scripts.
- Configure Asterisk dialplan, codecs, and DAHDI if using PSTN hardware.
- Test services, set up logging and cron jobs, and tune for performance.
- Harden and secure the server (firewall, fail2ban, backups).
This ordering is important: DAHDI → libpri → Asterisk, then VICIdial. Many community guides emphasize the exact build order to avoid missing kernel modules and dependencies.
Step 0: Prepare the CentOS 6 base system
yum -y update
reboot
2. Disable SELinux permanently (CentOS 6):
Edit /etc/selinux/config:
SELINUX=disabled
Then reboot if required.
3.Set hostname & ensure networking
hostnamectl set-hostname viciserver.example.com
(If hostnamectl not present, use hostname and update /etc/hosts.)
4.Install EPEL and common repos
yum -y install epel-release
5. Install essential build tools
yum -y groupinstall "Development Tools"
yum -y install wget gcc gcc-c++ make git subversion vim ntp sysstat
Step 1: Install dependencies for Asterisk and VICIdial
Install required packages commonly used across community guides:
yum -y install zlib-devel openssl-devel ncurses-devel \
libxml2-devel sqlite-devel newt-devel libuuid-devel \
unixODBC-devel curl-devel e2fsprogs-devel libtool \
mysql-devel pcre-devel
Install additional utilities:
yum -y install httpd mysql-server php php-mysql php-xml php-mbstring php-gd \
sox sox-devel libtermcap-devel mpg123 vsftpd crontabs
Start and enable MySQL and Apache
service mysqld start
chkconfig mysqld on
service httpd start
chkconfig httpd on
Secure MySQL (run mysql_secure_installation) and set a strong root password.
Many community tutorials for VICIdial and Asterisk on CentOS 6 list similar dependency sets; ensure php-mysql matches your MySQL version compatibility.
Step 2: Build and install DAHDI and libpri
DAHDI (if using PSTN cards) and libpri should be installed before Asterisk.
- Download sources
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
tar xzf dahdi-linux-complete-current.tar.gz
tar xzf libpri-1.4-current.tar.gz
2. Build DAHDI
cd dahdi-linux-complete-*
make all
make install
make config
3. Build libpri
cd /usr/src/libpri-*
make
make install
If you are not using telephony hardware (Sangoma/E1/T1), DAHDI can often be skipped; however, many Asterisk builds still expect libpri for PRI support. Community guides stress the DAHDI→libpri order.
Step 3: Build and install Asterisk 11
- Download and extract
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
tar xzf asterisk-11-current.tar.gz
cd asterisk-11.*
2. Install MP3/codec prerequisites (optional)
yum -y install lame lame-devel
3.Configure and build
./configure --libdir=/usr/lib64
make menuselect
# In menuselect, enable required codecs and chan_sip (or chan_pjsip per preference)
make
make install
make samples
make config
ldconfig
4. Start Asterisk
service asterisk start
chkconfig asterisk on
Validation
Connect to Asterisk CLI:
asterisk -rvv
You should see Asterisk 11 boot logs and a CLI prompt.
Multiple online walkthroughs for Asterisk 11 on CentOS 6 provide the same sequence. Keep careful attention to menuselect and the codecs you need.
Step 4: MySQL/MariaDB and PHP configuration for VICIdial
VICIdial requires a MySQL-compatible database and PHP with certain extensions.
1. Configure MySQL
Start MySQL (if not running) and create the database:
mysql -u root -p
CREATE DATABASE asterisk;
GRANT ALL PRIVILEGES ON asterisk.* TO 'astuser'@'localhost' IDENTIFIED BY 'strongpassword';
FLUSH PRIVILEGES;
EXIT;
2. PHP settings
Edit /etc/php.ini:
memory_limit = 256M
max_execution_time = 1
Restart Apache:
service httpd restart
3. Ensure ODBC and PHP modules present
yum -y install unixODBC unixODBC-devel php-odbc php-mbstring
service httpd restart
VICIdial community guides vary on MySQL versions; MySQL 5.5/5.6 or compatible MariaDB versions are commonly used for CentOS 6-era VICIdial installs.
Step 5: VICIdial code checkout and initial install
You can use the VICIdial SVN or download a release tarball. The community typically uses the SVN trunk for the latest stable code.
- Create a vici user and directory
useradd -m -d /home/vicidial -s /bin/bash vicidial
mkdir /usr/src/vicidial
cd /usr/src/vicidial
2. Checkout code (example using SVN)
svn checkout http://svn.example.org/vicidial/trunk vicidial
# or download a tarball if you have a release
3. Run the VICIdial install scripts
Most scratch-install guides provide an install.pl or series of scripts. Example flow:
cd /usr/src/vicidial/vicidial
./install.pl --db-host=localhost --db-user=astuser --db-pass=strongpassword
Follow prompts to import SQL schema and configure /etc/astguiclient.conf and web files.
4. Setup Apache virtual host
Create /etc/httpd/conf.d/vicidial.conf:
ServerName vicidial.example.com
DocumentRoot /var/www/html/vicidial
AllowOverride All
Order allow,deny
Allow from all
Reload Apache:
service httpd reload
The exact VICIdial install script names and parameters can differ by version. Many community scratch-install posts include complete install scripts and configuration examples. If you prefer a turnkey ISO, VICIBOX is an alternative that installs all components automatically.
Step 6: Configure Asterisk for VICIdial
VICIdial expects certain dialplan configurations and manager/user contexts.
- AGI and manager settings
- Ensure asterisk user owns relevant AGI scripts in /var/lib/asterisk/agi-bin.
- Configure /etc/asterisk/manager.conf with a user that VICIdial will use.
- Extensions and dialplan
- Import or append the VICIdial-provided dialplan snippets (often extensions_vicidial.conf) into Asterisk config.
- Reload Asterisk: asterisk -rx “reload”
- Recordings and permissions
- Configure /var/spool/asterisk/monitorDONE and /var/spool/asterisk/monitor with correct ownership and permissions for the web server and asterisk user.
Community guides provide full sample configs to copy into /etc/asterisk. Always compare sample files to your environment before overwriting.
Hints, tuning and common pitfalls migration path
- Codec issues
- Ensure required codecs (ulaw/alaw/g729 if licensed) are enabled. Missing codecs cause one-way audio.
- Firewall & NAT
- Open RTP ports (typically 10000–20000 UDP), SIP ports (5060 default), and manager/API ports as needed.
- For NAT, configure localnet and externip in sip.conf or rtp.conf as appropriate.
- Timing sources
- If using DAHDI or PSTN cards, ensure kernel modules and dahdi† services are active; timing misconfiguration causes audio issues.
- MySQL tuning
- For production, tune my.cnf (innodb_buffer_pool_size, max_connections, query_cache) to match available RAM.
- Cron jobs & monitoring
- Set up cron for VICIdial scripts, queue monitoring, and log rotation. Use sar, top, and iostat to monitor performance.
- Permissions & SELinux
- SELinux should be disabled or properly configured; SELinux enforcing often blocks AGI scripts and web interactions on CentOS 6 installs.
Community threads are full of specific fixes; search the VICIdial forums for error strings.
Post-install tests
- Verify Asterisk CLI: asterisk -rvvv — check sip/rtp bindings.
- Access VICIdial web UI, login with default or provided credentials.
- Place test calls between softphones; verify two-way audio.
- Test recording, playback, and reporting.
- Run tail -f /var/log/asterisk/full to monitor real-time logs.
Security & legacy-software considerations (must read)
Important: CentOS 6 and Asterisk 11 are legacy and no longer receive the same level of upstream security fixes as modern releases. If you must deploy this stack:
- Isolate the server in a private VLAN.
- Restrict SIP/RTP access to trusted peers and VPNs.
- Use strong passwords for all accounts, and change default credentials.
- Maintain offsite backups of DB and recordings.
- Regularly monitor logs and implement intrusion detection (fail2ban, iptables rules).
This guide is technical guidance and not legal or financial advice. Evaluate compliance and data protection requirements for call recording and telephony in your jurisdiction. Consult legal counsel for regulatory compliance.
Alternatives & migration path
if you are building a new deployment, consider:
- Using a VICIBOX ISO to save time and avoid build issues.
- Installing on a newer OS (CentOS 7/8 or Rocky/AlmaLinux) and newer Asterisk versions with community-tested VICIdial compatibility guides.
- Using containerized solutions or appliances that include patched components.
Many organizations opt to migrate away from CentOS 6/Asterisk 11 due to end-of-life concerns; plan a migration if security posture is critical.
Troubleshooting checklist
- No audio: Check RTP port range firewall, NAT settings, and codec negotiation.
- Asterisk won’t start: Review /var/log/messages and Asterisk full log for missing modules.
- VICIdial web errors: Check PHP logs, DB connectivity, and file permissions.
- Database errors: Ensure correct DB charset/collation and that astuser has required privileges.
Search the VICIdial forum for specific error strings; the community maintains many scratch-install fixes.
Maintenance & backups
- Schedule nightly DB dumps and periodic full backups of /var/spool/asterisk/monitor and /var/lib/mysql.
- Rotate and archive call recordings.
- Keep a recovery plan and test restores periodically.
Final checklist before going live
- Services running (Asterisk, Apache, MySQL).
- Web UI accessible and login verified.
- Test inbound/outbound call flows and recording.
- Firewall rules tightened and server isolated.
- Backups scheduled and tested.
- Monitoring configured (Nagios/Prometheus/other).
Resources and community references
- VICIdial Forums and Scratch Install threads (community scripts and step-by-step examples).
- Asterisk 11 installation guides for CentOS 6 (DAHDI → libpri → Asterisk build order).
- Vicibox ISO as an alternative local installer.
Conclusion
Installing VICIdial on CentOS 6 with Asterisk 11 is feasible following a strict build order: prepare the OS, install dependencies, compile DAHDI/libpri/Asterisk, configure MySQL/PHP/Apache, import VICIdial, then tune and secure the server. Use community scratch-install guides and the VICIdial forums for version-specific scripts and troubleshooting. If this install is for production, strongly consider upgrading to more current OS and software stacks or using the VICIBOX appliance to reduce risk.
Disclaimer: This guide is technical instruction only. It is not legal, financial, or regulatory advice. When handling recorded calls or user data, consult legal counsel to ensure compliance with applicable laws and regulations.