Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Install Vicidial scratch on ubuntu

by | Sep 26, 2021

Wondering how to install Vicidial scratch on ubuntu? We can help you.

As part of our Server Management Services, we assist our customers with similar queries.

Today, let us see how our Support techs perform this task.

How to Install Vicidial scratch on ubuntu?

VICIDIAL is an enterprise class, open source, call center suite in use by many large call centers around the world.

It can also function as an ACD for inbound calls, or closer calls coming from VICIDIAL outbound fronters.

It is capable of inbound, outbound, and blended call handling.

VICIDIAL even allows you to have agents logged in from remote locations.

Today, let us see the steps followed by our Support Techs in order to perform this task.

1.Firstly, login to the server as a root user

$ apt-get update #(retrieves the latest repository information)
$ apt-get upgrade #(upgrades any out of date packages
$ apt-get install linux-headers #(Used for zaptel compile) or
$ apt-get install linux-headers-server
$ apt-get install linux-source #(needed if you are going to recompile the linux kernel)
$ apt-get install linux-image-server
$ reboot #(reboot to use the new kernel)

Using cron and aptitude

2.To begin, create a new file:

$ nano /etc/cron.weekly/apt-security-updates

3.Then copy the following text into this new file, save, and exit:

echo “**************” >> /var/log/apt-security-updates
date >> /var/log/apt-security-updates
aptitude update >> /var/log/apt-security-updates
aptitude safe-upgrade -o Aptitude::Delete-Unused=false –assume-yes –target-release `lsb_release -cs`-security >> /var/log/apt-security-updates
echo “Security updates (if any) installed”

Press ctrl+x and the Y “enter” to save

4.Once you are complete, you want to make the file executable. So, via the terminal, type the following line:

$ sudo chmod +x /etc/cron.weekly/apt-security-updates

This script will run once weekly and it installs all available packages from the security repository.

It also generates a log in /var/log/apt-security-updates for later inspection in case something goes wrong.

This script will output information to a log file, so to prevent this log file from getting too large we need to make sure it gets rotated out.

To do this, we’ll use the logrotate utility, which comes with Ubuntu.

Press Alt+F2 and type this command:

$ nano /etc/logrotate.d/apt-security-updates
> install MD5
> install Digest::SHA1
> install readline
> install Bundle::CPAN #(do not change settings,This one takes a while be patient and keep hitting enter!)
> quit
$ cpan (enter through questions until you get to the cpan prompt)
> o conf commit (saves the config changes)
> force install Scalar::Util
> install DBI
> force install DBD::mysql
> install Net::Server
> install Time::HiRes
> install Net::Telnet
> install Unicode::Map
> install Jcode
> install OLE::Storage_Lite
> install Spreadsheet::WriteExcel
> install Proc::ProcessTable
> install Spreadsheet::ParseExcel
> install Mail::Sendmail
> quit
$ cd /usr/src
$ wget … .08.tar.gz
$ tar xzf asterisk-perl-0.08.tar.gz
$ cd asterisk-perl-0.08
$ perl Makefile.PL
$ make all
$ make install
$ cd /usr/src
$ wget … 0.5.tar.gz
$ tar xzf ttyload-0.5.tar.gz
$ cd ttyload-0.5
$ make
$ make install
$ cd /usr/src
$ wget …
$ unzip
$ cd eaccelerator-
$ phpize
$ ./configure
$ make
$ make install
$ cd /etc/php5/conf.d/
$ nano eaccelerator.ini
> add the following to the eaccelerator.:

Press ctrl+x and the Y “enter” to save

$ mkdir /var/lib/eaccelerator
$ chmod 0777 /var/lib/eaccelerator
$ php -v

Please note you should see a line mentioning eaccelerator. If you do not or you get an error you have done something wrong

$ mkdir /usr/src/asterisk
$ cd /usr/src/asterisk

5.FOR 1.4 asterisk do the following:

$ wget … ici.tar.gz
$ wget … 2.1.tar.gz
$ wget … 0.1.tar.gz
$ tar xzf asterisk-
$ tar xzf zaptel-
$ tar xzf libpri-
$ cd libpri-
$ make clean; make; make install
$ cd ../zaptel-
$ ./configure; make clean; make; make install
$ cd ../
$ mv asterisk- asterisk-
$ cd asterisk-
$ ./configure; make clean; make; make install
$ make samples
$ modprobe zaptel
$ modprobe ztdummy

6.Install the module for the digium device that you are using, we are using the T100P single span T1 card so we use:

modprobe wct1xxp

Here’s the list of all digium cards and the modules you use with them:

Card Module

TDM400P wctdm
X100P wcfxo
TDM* wcfxs
S100U wcusb
T100P wct1xxp
E100P wct1xxp
T400P tor2
E400P tor2
TE110P wcte11xp
TE410P wct4xxp
TE405P wct4xxp
TE411P wct4xxp
TE406P wct4xxp
TE210P wct2xxp
TE205P wct2xxp
TDM2400P wctdm24xxp

7.If you have chosen a Sangoma T1/E1 or analog card, you will need to follow their instructions for installation of their driver software LATEST Sangoma Wanpipe drivers:

wget … -3.3.9.tgz

8.Now your asterisk installation is built and loaded and it’s time to configure it.

NOTES: If you want to install zttool diagnostics you may need the newt package installed:

$ wget … 1.6.tar.gz
$ ln -s /usr/lib/ /usr/lib/

9.Then go to your zaptel folder and do ‘make zttool’

Digium/Clone X100P EXAMPLE for reliable cheap hardware timer:

$ ./conf_examples/zaptel.conf.x100p.sample
$ ./conf_examples/zapata.conf.x100p.sample

Digium/Clone T100P EXAMPLE, also works for TE4xxp cards

$ ./conf_examples/zaptel.conf.t100p.sample
$ ./conf_examples/zapata.conf.t100p.sample

Test Asterisk:

$ asterisk -vvvvvvvvvvvvvvvvvvvvvvvvvvvvgc #(to see if Asterisk runs)
> core show version
> dahdi show status
> core show application meetme
> stop now

10 FOR Sounds asterisk run the following steps

$ cd /usr/src/
$ wget … ent.tar.gz
$ wget … ent.tar.gz
$ wget … ent.tar.gz
$ wget … ent.tar.gz
$ wget … ent.tar.gz
$ wget … ent.tar.gz

11.Set the sounds in place

$ cd /var/lib/asterisk/sounds
$ tar xzf /usr/src/asterisk-core-sounds-en-gsm-current.tar.gz
$ tar xzf /usr/src/asterisk-core-sounds-en-ulaw-current.tar.gz
$ tar xzf /usr/src/asterisk-core-sounds-en-wav-current.tar.gz
$ tar xzf /usr/src/asterisk-extra-sounds-en-gsm-current.tar.gz
$ tar xzf /usr/src/asterisk-extra-sounds-en-ulaw-current.tar.gz
$ tar xzf /usr/src/asterisk-extra-sounds-en-wav-current.tar.gz

12.Grab parking file, and convert audio to native formats

$ wget
$ sox conf.gsm conf.wav
$ sox conf.gsm -t ul conf.ulaw
$ cp conf.gsm park.gsm
$ cp conf.ulaw park.ulaw
$ cp conf.wav park.wav
$ cd /var/lib/asterisk
$ ln -s moh mohmp3
$ mkdir mohmp3
$ cd mohmp3
$ rm .asterisk*
$ mkdir /var/lib/asterisk/quiet-mp3
$ cd /var/lib/asterisk/quiet-mp3

13.For SVN 2.2.0 trunk: ( There are other options but this gives you the latest version)

$ mkdir /usr/src/astguiclient
$ cd /usr/src/astguiclient
$ svn checkout svn://
$ cd trunk
$ perl

14.Once in Perl Follow these steps:

: manual configuration y
: press enter until you get to webroot and set that to the following:
: press enter through to the Sample configuration files and set that to ‘y’
: Then press enter through to the end of the script

15.To change root mysql password

$ mysqladmin -u root password YOURNEWPASSWORD

16.Then, dump vicidial database

$ mysql -p (enter the mysql root user’s password you set earlier)
> CREATE DATABASE `asterisk` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
> use asterisk;
> \. /usr/src/astguiclient/trunk/extras/MySQL_AST_CREATE_tables.sql
> \. /usr/src/astguiclient/trunk/extras/first_server_install.sql
> \. /usr/src/astguiclient/trunk/extras/sip-iax_phones.sql
> quit

17.Add my.cnf :

$ cd /etc/mysql/
$ wget
$ mv ubuntu-my-vici.cnf my.cnf
$ /etc/init.d/mysql restart
$ /usr/share/astguiclient/ –old-server_ip=
$ /usr/share/astguiclient/
$ cp /usr/src/astguiclient/trunk/extras/performance_test_leads.txt /usr/share/astguiclient/LEADS_IN/
$ /usr/share/astguiclient/ –forcelistid=107 –forcephonecode=1

18.Next, Setup Crontab

$ crontab -e

19.Add the following lines:

### remove old vicidial logs and asterisk logs more than 2 days old
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
30 0 * * * /usr/bin/find / -maxdepth 1 -name “screenlog.0*” -mtime +4 -print | xargs rm -f
### fix the vicidial_agent_log once every hour and the full day run at night
33 * * * * /usr/share/astguiclient/
50 0 * * * /usr/share/astguiclient/ –last-24hours
## uncomment below if using QueueMetrics
#*/5 * * * * /usr/share/astguiclient/ –only-qm-live-call-check

### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/ -q
 ### adjust the GMT offset for the leads in the vicidial_list table
1 1,7 * * * /usr/share/astguiclient/ –debug –postal-code-gmt
### optimize the database tables within the asterisk database
3 1 * * * /usr/share/astguiclient/
### VICIDIAL agent time log weekly summary report generation
2 0 * * 0 /usr/share/astguiclient/
### roll logs monthly on high-volume dialing systems
#30 1 1 * * /usr/share/astguiclient/
## uncomment below if using Vtiger
#1 1 * * * /usr/share/astguiclient/ –quiet
### recording mixing/compressing/ftping scripts
#0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/ –MIX
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/
1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/ –MP3
#2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/ –MP3
### kill Hangup script for Asterisk updaters
* * * * * /usr/share/astguiclient/
### updater for voicemail
* * * * * /usr/share/astguiclient/
### updater for conference validator
* * * * * /usr/share/astguiclient/
### flush queue DB table every hour for entries older than 1 hour
11 * * * * /usr/share/astguiclient/ -q
### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/
### remove old recordings more than 7 days old
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
### Reboot nightly to manage asterisk issues and memory leaks – uncomment if issues arise
#30 6 * * * /sbin/reboot
### remove text to speech file more than 4 days old
#20 0 * * * /usr/bin/find /var/lib/asterisk/sounds/tts/ -maxdepth 2 -type f -mtime +4 -print | xargs rm -f

(ctrl+x and the Y to save)

$ cd /etc/init.d/
$ wget
$ chmod +x vicidial
$ update-rc.d -f vicidial defaults
$ nano /etc/apache2/sites-available/default (add the following lines, Added right before </VirtualHost> )
Alias /RECORDINGS/ “/var/spool/asterisk/monitorDONE/”
<Directory “/var/spool/asterisk/monitorDONE”>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
<files *.mp3>
Forcetype application/forcedownload

Then, ctrl+x and the Y to save

$ chmod 0777 /var/spool/asterisk/monitorDONE/
$ /etc/init.d/apache2 restart
$ nano /etc/fstab (add the following line to the end of the file)
tmpfs /var/spool/asterisk/monitor tmpfs rw 0 0

(ctrl+x and the Y to save)

$ shutdown -r 0

(Once system reboots open Terminal and login)

$ sudo su
$ screen -ls (should show at least 6 screens, one of which should be asterisk)

For asterisk CLI:

$ sudo su
$ asterisk -rvvvvvvvvvvvvvvvv

20.In a web browser, go to (http://YOUR_SERVER_IP_ADDRESS/vicidial/admin.php) to see if everything is working.

You should also reboot at this point to make sure everything will start back up properly.

If you get this Fatal error: Allowed memory size of 16777216 bytes exhausted

21.Then, restart Apache

$ /etc/init.d/apache2 restart

[Need help with similar queries? We’d be happy to assist you]


In short, we saw how our Support Techs Install Vicidial scratch on ubuntu.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.



Submit a Comment

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

Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.