ViciDial Scratch Installation on Centos 7 With Asterisk

Jun 3, 2021

 ViciDial Scratch Centos 7 Asterisk 11

This is a complete guide for vicidial scratch installation on CentOS 7 and Asterisk 11.
It is assumed that you have freshly installed CentOS.

==Update OS & Reboot==

yum check-update
yum update -y
yum -y install epel-release
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
reboot

==Install Dependencies & Reboot==yum install make patch gcc gcc-c++ subversion php php-devel php-gd gd-devel php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel httpd libpcap libpcap-devel libnet ncurses ncurses-devel screen mysql-devel ntp kernel* mutt glibc.i686 wget nano unzip sipsak libuuid-devel sox –y libss7* libopen* autogen libtool shtool
yum install sqlite-devel –yyum install mariadb-server mariadb -y
==Enable in Startup httpd and mariadb==systemctl enable httpd.service; systemctl enable mariadb.servicesystemctl start httpd.service; systemctl start mariadb.service
==Install CPAN Modules==yum install perl-CPAN -yyum install perl-YAML -yyum install perl-libwww-perl -yyum install perl-DBD-MySQL -yyum install perl-GD -y
cd /usr/bin/curl -LOk http://xrl.us/cpanmchmod +x cpanm
cpanm -f File::HomeDircpanm -f File::Whichcpanm CPAN::Meta::Requirementscpanm -f CPANcpanm YAMLcpanm MD5cpanm Digest::MD5cpanm Digest::SHA1cpanm readlinecpanm Bundle::CPANcpanm DBIcpanm -f DBD::mysqlcpanm Net::Telnetcpanm Time::HiRescpanm Net::Servercpanm Switchcpanm Mail::Sendmailcpanm Unicode::Mapcpanm Jcodecpanm Spreadsheet::WriteExcelcpanm OLE::Storage_Litecpanm Proc::ProcessTablecpanm IO::Scalarcpanm Spreadsheet::ParseExcelcpanm Cursescpanm Getopt::Longcpanm Net::Domaincpanm Term::ReadKeycpanm Term::ANSIColorcpanm Spreadsheet::XLSXcpanm Spreadsheet::Readcpanm LWP::UserAgentcpanm HTML::Entitiescpanm HTML::Stripcpanm HTML::FormatTextcpanm HTML::TreeBuildercpanm Time::Localcpanm MIME::Decodercpanm Mail::POP3Clientcpanm Mail::IMAPClientcpanm Mail::Messagecpanm IO::Socket::SSLcpanm MIME::Base64cpanm MIME::QuotedPrintcpanm Crypt::Eksblowfish::Bcryptcpanm Crypt::RC4cpanm Text::CSVcpanm Text::CSV_XS
==Install Asterisk Perl Module==cd /usr/srcwget http://download.vicidial.com/required-apps/asterisk-perl-0.08.tar.gztar xzf asterisk-perl-0.08.tar.gzcd asterisk-perl-0.08perl Makefile.PLmake allmake install

==Asterisk 11 Download & Installation==
Download & Unzip Asterisk, Dahdi & Libpri

mkdir /usr/src/asteriskcd /usr/src/asterisk
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz               
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.10.2+2.10.2.tar.gz     
wget http://download.vicidial.com/required-apps/asterisk-11.22.0-vici.tar.gz  
==Exract all files== tar xzf asterisk-*tar xzf dahdi-linux-complete-*tar xzf libpri-*
==Install Dahdi==cd /usr/src/asterisk/dahdi-linux-complete-*makemake installmake configcd toolsmake cleanmakemake installmake config
==Install libpri==cd /usr/src/asterisk/libpri-*make cleanmakemake install
==Install Asterisk 11==cd /usr/src/asterisk/asterisk*./configure –libdir=/usr/lib64make cleanmake menuselect  # Select Application>MeetMe Appmakemake installmake samples
cp /usr/src/asterisk/asterisk-11.22.0/contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk   
==Create Database for Vicidial==mysqlCREATE DATABASE `asterisk` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@’%’ IDENTIFIED BY ‘1234’;
GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@localhost IDENTIFIED BY ‘1234’;
==Download and Install Vicidial ==mkdir /usr/src/astguiclientcd /usr/src/astguiclient svn checkout svn://svn.eflo.net:43690/agc_2-X/trunkcd /usr/src/astguiclient/trunk
==Import DB Server Install Settings==mysqlSET GLOBAL connect_timeout=60;use asterisk;\. /usr/src/astguiclient/trunk/extras/MySQL_AST_CREATE_tables.sql\. /usr/src/astguiclient/trunk/extras/first_server_install.sqlquit
cd /usr/src/astguiclient/trunkperl install.pl
Previous astGUIclient configuration file found at: /etc/astguiclient.conf
Would you like to use manual configuration and installation(y/n): [y]
STARTING ASTGUICLIENT MANUAL CONFIGURATION PHASE…
astguiclient configuration file or press enter for default: [/etc/astguiclient.conf]Previous astGUIclient configuration file found at: /etc/astguiclient.conf
astguiclient home path or press enter for default: [/usr/share/astguiclient]
astguiclient logs path or press enter for default: [/var/log/astguiclient]
asterisk agi-bin path or press enter for default: [/var/lib/asterisk/agi-bin]
server webroot path or press enter for default: [/var/www/html] /var/www/html
asterisk sounds path or press enter for default: [/var/lib/asterisk/sounds]
asterisk monitor path or press enter for default: [/var/spool/asterisk/monitor]
asterisk DONEmonitor path or press enter for default: [/var/spool/asterisk/monitorDONE]
server IP address or press enter for default: [] 172.31.44.206
DB server address or press enter for default: [localhost]
DB database name or press enter for default: [asterisk]
DB user login or press enter for default: [cron]
DB user password or press enter for default: [1234]
DB custom user login or press enter for default: [custom]
DB custom password login or press enter for default: [custom1234]
DB connection port or press enter for default: [3306]
Numeric list of the astGUIclient processes to be kept running(value should be listing of characters with no spaces: 123456) X – NO KEEPALIVE PROCESSES (use only if you want none to be keepalive) 1 – AST_update 2 – AST_send_listen 3 – AST_VDauto_dial 4 – AST_VDremote_agents 5 – AST_VDadapt (If multi-server system, this must only be on one server) 6 – FastAGI_log 7 – AST_VDauto_dial_FILL (only for multi-server, this must only be on one server) 8 – ip_relay (used for blind agent monitoring) 9 – Timeclock auto logout E – Email processor, (If multi-server system, this must only be on one server) S – SIP Logger (Patched Asterisk 13 required)Enter active keepalives or press enter for default: [1234568] 123456789E
Enter the Asterisk version that you are installing VICIDIAL for(value should be only one of the options below:) 1.2 1.4 1.8 11.X 13.XEnter asterisk version or press enter for default: [11.X] 11.X
Copy sample configuration files to /etc/asterisk/ ? [n] yCopy web language translation files to webroot ? []
FTP host address or press enter for default: [10.0.0.4] 172.31.44.206
FTP user login or press enter for default: [cron]
FTP user password or press enter for default: [test]
FTP connection port or press enter for default: [21]
FTP directory or press enter for default: [RECORDINGS]
HTTP path for archive or press enter for default: [http://10.0.0.4] 172.31.44.206
REPORT host address or press enter for default: [10.0.0.4] 172.31.44.206
REPORT user login or press enter for default: [cron]
REPORT user password or press enter for default: [test]
REPORT connection port or press enter for default: [21]
REPORT directory or press enter for default: [REPORTS]
FastAGI log minimum child servers: [3]
FastAGI log maximum child servers: [16]
FastAGI log minimum spare child servers: [2]
FastAGI log maximum spare child servers: [8]
FastAGI log maximum requests per child server: [1000]
FastAGI log check-for-dead seconds: [30]
FastAGI log check-for-wait seconds: [60]
  defined conf file:        /etc/astguiclient.conf  defined home path:        /usr/share/astguiclient  defined logs path:        /var/log/astguiclient  defined agi-bin path:     /var/lib/asterisk/agi-bin  defined webroot path:     /var/www/html  defined sounds path:      /var/lib/asterisk/sounds  defined monitor path:     /var/spool/asterisk/monitor  defined DONEmonitor path: /var/spool/asterisk/monitorDONE  defined server_ip:        172.31.44.206  defined DB_server:        localhost  defined DB_database:      asterisk  defined DB_user:          cron  defined DB_pass:          1234  defined DB_custom_user:   custom  defined DB_custom_pass:   custom1234  defined DB_port:          3306  defined active_keepalives:     1234568  defined asterisk_version:      13.X  defined copying conf files:    n  defined copying weblang files:  defined FTP_host:         10.0.0.4  defined FTP_user:         cron  defined FTP_pass:         test  defined FTP_port:         21  defined FTP_dir:          RECORDINGS  defined HTTP_path:        http://172.31.44.206  defined REPORT_host:      172.31.44.206  defined REPORT_user:      cron  defined REPORT_pass:      test  defined REPORT_port:      21  defined REPORT_dir:       REPORTS  defined fastagi_log_min_servers:       3  defined fastagi_log_max_servers:       16  defined fastagi_log_min_spare_servers: 2  defined fastagi_log_max_spare_servers: 8  defined fastagi_log_max_requests:      1000  defined fastagi_log_checkfordead:      30  defined fastagi_log_checkforwait:      60
Are these settings correct?(y/n): [y]
==Extra ==/usr/share/astguiclient/ADMIN_area_code_populate.pl
/usr/share/astguiclient/ADMIN_update_server_ip.pl –old-server_ip=10.10.10.15        
==Add Cronjobs==crontab -e
Copy and Paste this
@reboot ( sleep 30 ; /usr/share/astguiclient/start_asterisk_boot.pl )
### 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/AST_CRON_audio_1_move_mix.pl0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl –MIX0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl –GSM#2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl –GSM
### keepalive script for astguiclient processes* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl –cu3way
### kill Hangup script for Asterisk updaters* * * * * /usr/share/astguiclient/AST_manager_kill_hung_congested.pl
### updater for voicemail* * * * * /usr/share/astguiclient/AST_vm_update.pl
### updater for conference validator* * * * * /usr/share/astguiclient/AST_conf_update.pl
### flush queue DB table every hour for entries older than 1 hour11 * * * * /usr/share/astguiclient/AST_flush_DBqueue.pl -q
### fix the vicidial_agent_log once every hour and the full day run at night
33 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl
50 0 * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl –last-24hours
## uncomment below if using QueueMetrics
#*/5 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl –only-qm-live-call-check
## uncomment below if using Vtiger
#1 1 * * * /usr/share/astguiclient/Vtiger_optimize_all_tables.pl –quiet
### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/AST_VDhopper.pl -q
### adjust the GMT offset for the leads in the vicidial_list table
1 1,7 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl –debug
### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/AST_reset_mysql_vars.pl
### optimize the database tables within the asterisk database
3 1 * * * /usr/share/astguiclient/AST_DB_optimize.pl
## adjust time on the server with ntp
30 * * * * /usr/sbin/ntpdate -u pool.ntp.org 2>/dev/null 1>&2
### VICIDIAL agent time log weekly and daily summary report generation
2 0 * * 0 /usr/share/astguiclient/AST_agent_week.pl
22 0 * * * /usr/share/astguiclient/AST_agent_day.pl
### VICIDIAL campaign export scripts (OPTIONAL)
#32 0 * * * /usr/share/astguiclient/AST_VDsales_export.pl
#42 0 * * * /usr/share/astguiclient/AST_sourceID_summary_export.pl
### 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
### roll logs monthly on high-volume dialing systems
#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl
### 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 -f29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f30 0 * * * /usr/bin/find / -maxdepth 1 -name “screenlog.0*” -mtime +4 -print | xargs rm -f
### cleanup of the scheduled callback records
25 0 * * * /usr/share/astguiclient/AST_DB_dead_cb_purge.pl –purge-non-cb -q
### GMT adjust script – uncomment to enable
#45 0 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl –list-settings
### Dialer Inventory Report
1 7 * * * /usr/share/astguiclient/AST_dialer_inventory_snapshot.pl -q –override-24hours
### inbound email parser
* * * * * /usr/share/astguiclient/AST_inbound_email_parser.pl
to save press Esc  then shift+colon then type wq! hit enter.
==Configure your TimeZone==sudo timedatectl set-timezone America/New_Yorksudo rm -rf /etc/localtimesudo ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
nano /etc/php.ini  ( look for timezone uncomment it put = America/New_York)
reboot
Try now to access the vicidial page
HTTP://XXX.XXX.XXX.XXX/vicidial/admin.php for admn username:6666, password:1234HTTP://XXX.XXX.XXX.XXX/agc/vicidial.php for agent

https://hbtutorial09.blogspot.com/2020/11/how-to-set-or-change-timezone-on-centos.html

Leave a Reply