How to Install Asterisk in VICIdial [Complete Beginner’s Guide]

1 1
How to Install Asterisk in VICIdial [Complete Beginner’s Guide]

If you’re new to VoIP systems and call center software, learning how to install Asterisk in VICIdial can seem daunting. But don’t worry—this guide is designed for absolute beginners with no prior experience. We’ll walk through everything step by step, explaining each part as we go.

Introduction to Asterisk and VICIdial

Asterisk is an open-source PBX (Private Branch Exchange) software that powers VoIP communications, allowing you to make calls over the internet. It’s flexible and widely used for building telephony applications.

VICIdial is an open-source call center suite that includes predictive dialing, inbound/outbound blending, and agent management. It’s built on top of Asterisk, which serves as the telephony engine. Asterisk is required for VICIdial because it handles call routing, SIP registrations, and voice processing—without it, VICIdial can’t manage calls. In this guide, we’ll focus on how to install Asterisk in VICIdial, ensuring they work together seamlessly.

👉 Related reading: Can You Install VICIdial on Shared Hosting?

By following this tutorial, you’ll have a functional setup ready for your call center needs.

Prerequisites for Installation

Before we dive into how to install Asterisk in VICIdial, make sure you have the following:

  • Server Requirements: A dedicated server or VPS with at least 4GB RAM, 2 CPU cores, and 50GB disk space. For production, aim for 8GB RAM or more.
  • Operating System: AlmaLinux 9 (a free CentOS replacement, as CentOS 7 is end-of-life in 2024). Install the minimal version for best performance.
  • Root Access: You’ll need root privileges to run commands. Use SSH to log in as root or use sudo.
  • Basic Linux Knowledge: Familiarity with the terminal, editing files (we’ll use nano), and basic commands like cd and ls. If this is your first time, follow along exactly.

Ensure your server has internet access for downloading packages. If you’re using a VPS, check your provider’s firewall settings.

Step-by-Step Guide to Install Asterisk in VICIdial

2 1
Step-by-Step Guide to Install Asterisk in VICIdial

Now, let’s get into the installation. We’ll use clear numbered steps, with commands in code blocks. Each step includes what the command does and common errors with fixes. Assume you’re logged in as root.

Step 1: Updating the Server and Installing Dependencies

First, update your system and install the packages Asterisk and VICIdial need. This ensures compatibility and security.

  1. Update the system packages:
				
					dnf check-update
dnf update -y

				
			

Explanation: This checks for updates and applies them. It keeps your OS current.

  1.  Install EPEL repository and development tools:
				
					dnf -y install epel-release
dnf -y groupinstall 'Development Tools'
dnf -y update

				
			

Explanation: EPEL provides extra packages. Development Tools are needed for compiling source code.

  1. Install additional repositories for PHP and MariaDB:
				
					dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf -y install http://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf -y install yum-utils
dnf module enable php:remi-8.2 -y

				
			

Explanation: These repos provide newer PHP versions (8.2 for compatibility with latest VICIdial).

  1. Install core dependencies:
				
					dnf install -y make patch gcc gcc-c++ subversion php php-devel php-gd gd-devel php-mbstring php-mcrypt php-imap php-ldap php-mysqlnd php-odbc php-pear php-xml php-xmlrpc php-opcache curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel httpd libpcap libpcap-devel libnet ncurses ncurses-devel screen mariadb-devel ntp mutt glibc.i686 wget nano unzip sipsak sox libss7* libopen* openssl libsrtp libsrtp-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel htop speex speex-devel iftop sqlite-devel kernel* kernel-devel
				
			

Explanation: These are libraries for PHP, web server, database, and Asterisk compilation. MariaDB is the database for VICIdial.

Possible Errors and Fixes:

  • “No such package”: Check your internet connection or repo configuration. Run dnf clean all and try again.
  • “Conflict with packages”: Use dnf –skip-broken install -y if minor conflicts occur, but investigate for major issues.
				
					Reboot
				
			

Step 2: Downloading Asterisk Source Files

Asterisk is best installed from source for VICIdial compatibility.

  1. Navigate to the source directory:
				
					cd /usr/src

				
			
  1.  Download the latest Asterisk 18 source (recommended for VICIdial in 2025): 
				
					wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz

				
			

Explanation: This downloads the tarball from the official site.

  1. Extract the files:
				
					tar -xvzf asterisk-18-current.tar.gz
cd asterisk-18.*

				
			

Explanation: Unzips the files and moves into the directory.

Possible Errors and Fixes:

  • “Wget not found”: You missed it in dependencies—run dnf install -y wget.
  • “Invalid URL”: Check the Asterisk website for the latest version link if the current one changes.

Step 3: Installing Required Libraries (MP3, Codecs)

Asterisk needs libraries for audio formats and codecs.

  1. Install MP3 support
				
					contrib/scripts/get_mp3_source.sh

				
			

Explanation: This script downloads MP3 source for Asterisk to handle MP3 files (used in VICIdial for hold music).

  1. Install additional codecs (e.g., G729 optional, but for basic, skip or use open ones):
				
					dnf install -y speex speex-devel opus opus-devel

				
			
  1. Explanation: These enable audio codecs for better call quality.

Possible Errors and Fixes:

  • “Script not found”: Ensure you’re in the Asterisk directory.
  • “Permission denied”: Run as root or use chmod +x contrib/scripts/get_mp3_source.sh.

Step 4: Compiling and Installing Asterisk

Compile Asterisk with VICIdial-compatible options.

  1. Run the configure script:
				
					./configure --with-jansson-bundled --with-pjproject-bundled --libdir=/usr/lib64

				
			

Explanation: Configures Asterisk with bundled libraries for compatibility, using 64-bit lib dir.

  1. Select modules (use menuselect if needed):
				
					make menuselect
				
			

Explanation: Opens a menu to select modules. Enable format_mp3, app_meetme (for conferences in VICIdial), and chan_pjsip or chan_sip.

  1. Compile and install:
				
					make all
make install
make samples

				
			

Explanation: make all compiles, make install installs, make samples adds sample configs.

Possible Errors and Fixes:

  • “Missing dependency”: E.g., “jansson not found”—install with dnf install -y jansson-devel. Rerun configure.
  • “Compilation fails”: Check RAM (need at least 4GB) or missing development tools.

Step 5: Configuring and Starting Asterisk Service

Set up Asterisk to run as a service.

  1. Create a systemd service file:
				
					nano /etc/systemd/system/asterisk.service

				
			

Add this content:

				
					[Unit]
Description=Asterisk PBX
After=network.target mariadb.service

[Service]
Type=simple
ExecStart=/usr/sbin/asterisk -vvvg -C /etc/asterisk/asterisk.conf
ExecReload=/usr/sbin/asterisk -rx 'core reload'
Restart=always

[Install]
WantedBy=multi-user.target

				
			

Explanation: This makes Asterisk start automatically.

Reload and start:

				
					systemctl daemon-reload
systemctl enable asterisk
systemctl start asterisk

				
			

Explanation: Enables and starts the service.

Possible Errors and Fixes:

  • “Service not starting”: Check logs with journalctl -u asterisk. Fix configs if errors.
  • “Port conflicts”: Ensure no other PBX is running.

Step 6: Connecting Asterisk with VICIdial

Now, install VICIdial and link it to Asterisk.

  1. Download VICIdial from SVN:
				
					cd /usr/src
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk astguiclient
cd astguiclient

				
			

Explanation: Downloads the latest VICIdial source.

  1. Run the install script:
				
					perl install.pl

				
			

Explanation: Installs VICIdial, sets up database, and connects to Asterisk.

  1. Configure Asterisk for VICIdial:
				
					nano /etc/asterisk/manager.conf

				
			

Add VICIdial manager credentials (from VICIdial docs, e.g., user ‘cron’, secret ‘1234’). 

  1. Reload Asterisk:
				
					asterisk -rx "reload"
				
			
  1. Explanation: Applies changes.

Possible Errors and Fixes:

  • “SVN not found”: Install with dnf install -y subversion.
  • “Database connection fail”: Ensure MariaDB is running (systemctl start mariadb) and secure it with mysql_secure_installation.

Step 7: Testing the Installation with a Softphone

Verify everything works.

  1. Create a SIP extension in Asterisk:
				
					nano /etc/asterisk/sip.conf

				
			

Add: 

				
					[1000]
type=friend
secret=password
host=dynamic
context=default

				
			
  1. Reload SIP: 
				
					asterisk -rx "sip reload"

				
			
  1. Use a softphone like Zoiper:
    • Install Zoiper on your phone/PC.
    • Register with SIP server: your_server_IP, username 1000, password ‘password’.
    • Make a test call to another extension or echo test (*43).

Possible Errors and Fixes:

  • “Registration failed”: Check firewall (firewall-cmd –add-port=5060/udp –permanent; firewall-cmd –reload).
  • “No sound”: Ensure codecs match and NAT is configured if behind firewall.

Troubleshooting Common Problems

3
Troubleshooting Common Problems
  • Firewall Issues: Add rules for SIP (5060/udp), RTP (10000-20000/udp): firewall-cmd –add-port=10000-20000/udp –permanent; firewall-cmd –reload.
  • Missing Packages: If a command fails, search with dnf search package_name and install.
  • Service Not Starting: Check logs (asterisk -vvv or journalctl). Common: bad config or port in use.
  • VICIdial Not Connecting to Asterisk: Verify manager.conf credentials match VICIdial’s settings. Restart both.
  • SELinux Blocks: If enabled, set to permissive with setenforce 0 temporarily.

If stuck, check VICIdial forums or Asterisk logs (/var/log/asterisk/full).

FAQs 

  1. What is Asterisk and why is it required for VICIdial?

Asterisk is an open-source PBX software for VoIP calls. It’s required for VICIdial as it handles call routing and voice processing, enabling the call center features.

  1. What are the basic prerequisites for installing Asterisk in VICIdial?

You need a server with at least 4GB RAM, AlmaLinux 9 OS, root access, and basic Linux knowledge like using the terminal.

  1. How do I download and compile Asterisk for VICIdial?

Download the source from the official site using wget, extract it, run ./configure with options, then use make menuselect, make all, and make install.

  1. What should I do if Asterisk service fails to start after installation?

Check logs with journalctl -u asterisk, fix config errors in /etc/asterisk/, ensure no port conflicts, and restart the service.

  1. How can I test if Asterisk is properly installed in VICIdial?

Create a SIP extension in sip.conf, reload Asterisk, register a softphone like Zoiper, and make a test call or use the echo test (*43).

Conclusion

Congratulations! You’ve learned how to install Asterisk in VICIdial from scratch. This complete beginner’s guide covered updating your server, downloading and compiling Asterisk, connecting it to VICIdial, and testing with a softphone. By following these steps carefully, you should have a working setup. Remember, practice makes perfect—start small and scale up. If you encounter issues, revisit the troubleshooting section. Now, go ahead and explore more advanced features in VICIdial!

Leave a Reply

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

Stay In Touch

Be the first to know about new arrivals and promotions