Project

General

Profile

Version 4 How To Install Goautodial From Scratch using CentOS 7

This is the initial HOWTO for installing the GOautodial app (v4) from scratch or from previous versions (3.X). This is a work in progress and updates are posted any time.

Prerequites

  1. A fully qualified domain name (FQDN) - alternative is to install DNSmasq or just edit your /etc/hosts file
  2. An SSL certicate for your FQDN (or self-signed) - This is needed by webRTC and by default we use HTTPS - Get a free one from Cert Bot https://www.centosblog.com/use-letsencrypt-free-ssl-certificate-centos-linux/

Install GOautodial version 3.X (either from scratch or using the v3.3 ISO)

Update the Goautodial yum repository

cd /etc/yum.repos.d/
wget http://downloads2.goautodial.org/centos/7/goautodial.repo

If you already have an existing goautodial.repo file, append the following:

[goautodial-updates]
name=CentOS-$releasever - Goautodial - Updates
baseurl=http://downloads2.goautodial.org/centos/$releasever/updates/$basearch/
enabled=1 
gpgcheck=0

This will enable the "GOautodial Updates" Yum repository.

Uninstall packages that can't be automatically upgraded via "yum update" command

First, shutdown MySQL, Asterisk and HTTPD:

mysqladmin -p shutdown
asterisk -rx "core shutdown now" 
systemctl stop httpd

Check existing PHP version:

rpm -qa | grep php

We are at PHP 5.5. We need version 7!
php55w-devel-5.5.37-1.w7.x86_64
php55w-imap-5.5.37-1.w7.x86_64
php55w-mbstring-5.5.37-1.w7.x86_64
php55w-cli-5.5.37-1.w7.x86_64
php55w-xml-5.5.37-1.w7.x86_64
php55w-pdo-5.5.37-1.w7.x86_64
php55w-mcrypt-5.5.37-1.w7.x86_64
php55w-mysql-5.5.37-1.w7.x86_64
php55w-common-5.5.37-1.w7.x86_64
php55w-fpm-5.5.37-1.w7.x86_64
php55w-process-5.5.37-1.w7.x86_64
php55w-gd-5.5.37-1.w7.x86_64
php55w-5.5.37-1.w7.x86_64
php55w-intl-5.5.37-1.w7.x86_64
php55w-opcache-5.5.37-1.w7.x86_64
php55w-pear-1.10.1-1.w7.noarch

Uninstall..

rpm -e php55w-devel-5.5.37-1.w7.x86_64 php55w-imap-5.5.37-1.w7.x86_64 php55w-mbstring-5.5.37-1.w7.x86_64 php55w-cli-5.5.37-1.w7.x86_64 php55w-xml-5.5.37-1.w7.x86_64 php55w-pdo-5.5.37-1.w7.x86_64 php55w-mcrypt-5.5.37-1.w7.x86_64 php55w-mysql-5.5.37-1.w7.x86_64 php55w-common-5.5.37-1.w7.x86_64 php55w-fpm-5.5.37-1.w7.x86_64 php55w-process-5.5.37-1.w7.x86_64 php55w-gd-5.5.37-1.w7.x86_64 php55w-5.5.37-1.w7.x86_64 php55w-intl-5.5.37-1.w7.x86_64 php55w-opcache-5.5.37-1.w7.x86_64 php55w-pear-1.10.1-1.w7.noarch 

Check existing Asterisk version:
rpm -qa | grep asterisk

We are at Asterisk 11.X. We need Asterisk 13.X!
asterisk-11.20.0-el7_centos.go.x86_64
asterisk-addons-11.20.0-el7_centos.go.x86_64
asterisk-devel-11.20.0-el7_centos.go.x86_64

rpm -e asterisk-11.20.0-el7_centos.go.x86_64 asterisk-addons-11.20.0-el7_centos.go.x86_64 asterisk-devel-11.20.0-el7_centos.go.x86_64 \

Move existing web document root folder and create an empty one for version 4:

cd /var/www/
mv html html.v3
mkdir html

Update system

yum install -y epel-release
yum update -y 

This will also upgrade MariaDB to version 10.1.34

Install PHP 7, Asterisk 13, Kamailio 5, RTPengine and other dependencies

yum install php70w-mysql php70w-mcrypt php70w-devel php70w-mbstring php70w-common php70w-xml php70w-pear php70w-cli php70w-imap php70w-fpm php70w-gd php70w-opcache php70w-pdo php70w-process php70w php70w-intl php70w-pear.noarch php70w-xmlrpc asterisk-mysql-13.17.2-vici.el7.centos.x86_64 asterisk-perl-0.08-2.go.x86_64 asterisk-voicemail-plain-13.17.2-vici.el7.centos.x86_64 asterisk-devel-13.17.2-vici.el7.centos.x86_64 asterisk-voicemail-13.17.2-vici.el7.centos.x86_64 asterisk-alsa-13.17.2-vici.el7.centos.x86_64 asterisk-sip-13.17.2-vici.el7.centos.x86_64 asterisk-13.17.2-vici.el7.centos.x86_64 asterisk-dahdi-13.17.2-vici.el7.centos.x86_64 asterisk-iax2-13.17.2-vici.el7.centos.x86_64 asterisk-mp3-13.17.2-vici.el7.centos.x86_64 kamailio-tls-5.0.7-3.el7.centos.x86_64 kamailio-5.0.7-3.el7.centos.x86_64 kamailio-mysql-5.0.7-3.el7.centos.x86_64 kamailio-ims-5.0.7-3.el7.centos.x86_64 kamailio-utils-5.0.7-3.el7.centos.x86_64 kamailio-websocket-5.0.7-3.el7.centos.x86_64 perl-Math-Round perl-File-Touch perl-Sys-RunAlone perl-Switch perl-Time-Local kamailio-tls-5.0.7-3.el7.centos.x86_64 kamailio-5.0.7-3.el7.centos.x86_64 kamailio-json-5.0.7-3.el7.centos.x86_64 kamailio-mysql-5.0.7-3.el7.centos.x86_64 kamailio-ims-5.0.7-3.el7.centos.x86_64 kamailio-utils-5.0.7-3.el7.centos.x86_64 kamailio-websocket-5.0.7-3.el7.centos.x86_64 ngcp-rtpengine ngcp-rtpengine-kernel ngcp-rtpengine-dkms dkms dahdi-linux dahdi-linux-devel kernel-devel
cpan -i Net::Telnet

Enable and configure PHP-FPM:

nano /etc/httpd/conf.d/fpm.conf
# PHP scripts setup 
ProxyPassMatch ^/(.*.php)$ fcgi://127.0.0.1:9000/var/www/html

Alias / /var/www/html/

Edit PHP configuration file
nano /etc/php.ini

GOautodial default settings:

memory_limit = 128M
short_open_tag = On
max_execution_time = 360
max_input_time = 360
post_max_size = 64M
upload_max_filesize = 64M
default_socket_timeout = 360
date.timezone = America/New_York

Enable at system startup and start the service:

systemctl enable php-fpm 
systemctl start php-fpm
systemctl status php-fpm
systemctl enable httpd
systemctl start httpd

Download GOautodial App (and needed SQL files)

cd /var/www
git clone https://github.com/goautodial/v4.0 html

cd /var/www/html
git clone https://github.com/goautodial/goAPIv2

Download default configuration files:

touch /var/www/html/version.txt
cd /var/www/html/php/
cp goCRMAPISettings.php-sample goCRMAPISettings.php
cp Config.php-sample Config.php

Replace HOSTNAME with your FQDN:

nano goCRMAPISettings.php

<?php
define ('gourl', 'https://HOSTNAME/goAPIv2'); //replace with your HOSTNAME
define ('goUser', 'goAPI');
define ('goPass', 'goAPIpass1234');
define ('responsetype', 'json');
?>

nano Config.php

<?php
// database configuration
define('DB_USERNAME', 'goautodialu');
define('DB_PASSWORD', 'goautodialu1234');
define('DB_HOST', 'localhost');
define('DB_NAME', 'goautodial'); 
define('DB_PORT', '3306');
define('DB_NAME_ASTERISK', 'asterisk');
// other configuration parameters
define('CRM_ADMIN_EMAIL', 'admin@localhost.com');
?>

cd /root/
wget https://downloads2.goautodial.org/files/version4/goautodial.sql
wget https://downloads2.goautodial.org/files/version4/kamailio.sql
wget https://downloads2.goautodial.org/files/version4/osticketdb.sql

Configure MariaDB

Rename previous config file:

mv /etc/my.cnf /etc/my.cnf.old

nano /etc/my.cnf.d/server.cnf

Default MariaDB settings for GOautodial App:

[mysqld]
#large-pages
performance_schema                              = ON
max_connections                                 = 1024
skip-name-resolve
skip-host-cache

#slow_query_log                                 = 1
#log_queries_not_using_indexes
log-error=/var/log/mariadb/mariadb.log

query_cache_size                                = 64M
query_cache_limit                               = 16M
query_cache_min_res_unit                        = 1k

table_open_cache                                = 8192
table_cache                                     = 4096
table_definition_cache                          = 2048
thread_cache_size                               = 256
read_rnd_buffer_size                            = 16M
sort_buffer_size                                = 4M
join_buffer_size                                = 2M
tmp_table_size                                  = 256M
max_heap_table                                  = 256M

# MyISAM
myisam-recover-options
bulk_insert_buffer_size                         = 2G
myisam_sort_buffer_size                         = 128M
concurrent_insert                               = 2
myisam_repair_threads                           = 1
key_buffer_size                                 = 4096M

innodb_buffer_pool_size                         = 4G
innodb_additional_mem_pool_size                 = 16M
innodb_log_file_size                            = 1024M
innodb_buffer_pool_instances                    = 12
innodb_flush_log_at_trx_commit                  = 2
innodb_thread_concurrency                       = 16

Restart MariaDB:
systemctl enable mariadb
systemctl restart mariadb

Update databases to current schema:
mysql_upgrade -p

Create required databases:
mysql -p

create database goautodial;
create database kamailio;
create database osticketdb;

Create default MariaDB users:
GRANT SELECT,INSERT,UPDATE,DELETE,ALTER,CREATE,LOCK TABLES ON asterisk.* TO 'asterisku'@'%' IDENTIFIED BY 'asterisku1234';
GRANT SELECT,INSERT,UPDATE,DELETE,ALTER,CREATE,LOCK TABLES ON asterisk.* TO 'asterisku'@'localhost' IDENTIFIED BY 'asterisku1234';

GRANT SELECT,INSERT,UPDATE,DELETE ON asterisk.* TO 'goautodialu'@'%' IDENTIFIED BY 'goautodialu1234';
GRANT SELECT,INSERT,UPDATE,DELETE ON asterisk.* TO 'goautodialu'@'localhost' IDENTIFIED BY 'goautodialu1234';

GRANT SELECT,INSERT,UPDATE,DELETE ON goautodial.* TO 'goautodialu'@'%' IDENTIFIED BY 'goautodialu1234';
GRANT SELECT,INSERT,UPDATE,DELETE ON goautodial.* TO 'goautodialu'@'localhost' IDENTIFIED BY 'goautodialu1234';

GRANT SELECT,INSERT,UPDATE,DELETE ON osticketdb.* TO 'osticketu'@'%' IDENTIFIED BY 'osticketu1234';
GRANT SELECT,INSERT,UPDATE,DELETE ON osticketdb.* TO 'osticketu'@'localhost' IDENTIFIED BY 'osticketu1234';

GRANT SELECT,INSERT,UPDATE,DELETE ON kamailio.* TO 'kamailiou'@'%' IDENTIFIED BY 'kamailiou1234';
GRANT SELECT,INSERT,UPDATE,DELETE ON kamailio.* TO 'kamailiou'@'localhost' IDENTIFIED BY 'kamailiou1234';

GRANT SELECT ON kamailio.* TO 'kamailioro'@'localhost' IDENTIFIED BY 'kamailioro';

GRANT RELOAD ON *.* TO asterisku@'%';
GRANT RELOAD ON *.* TO asterisku@localhost;

flush privileges;

Populate required tables with default values:
cd /root
mysql -p goautodial < /root/goautodial.sql
mysql -p kamailio < /root/kamailio.sql
mysql -p osticketdb < /root/osticketdb.sql

Download and Install Vicidial SVN version

mkdir /usr/src/astguiclient
cd /usr/src/astguiclient
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk

Upgrade Vicidial database schema. You can safely ignore the error/warning messages
cd /usr/src/astguiclient/trunk/extras
mysql -f -p asterisk < upgrade_2.10.sql
mysql -f -p asterisk < upgrade_2.12.sql
mysql -f -p asterisk < upgrade_2.14.sql

mysql -p asterisk;

Create required GOautodial goAPI user:
INSERT INTO vicidial_users(user,pass,pass_hash,full_name,user_level,user_group,active) values('goAPI',' ','EORxUHT6Ju2kLOOB4g3X3GxJcQ9RGGS','GOautodial API User','9','ADMIN','N');

Create "goadmin" Admin user account:

INSERT INTO vicidial_users(user,pass,user_group,full_name,user_level,phone_login,phone_pass,agentonly_callbacks,agentcall_manual,active,vdc_agent_api_access,pass_hash,agent_choose_ingroups,vicidial_recording,vicidial_transfers,closer_default_blended,scheduled_callbacks) VALUES('goadmin',' ','ADMIN','Admin User','9','7798306534',' ','1','1','Y','1','h0CAwQ/of1y0YFKgut1hVcqNl1SMSNu','1','1','1','1','1');

INSERT INTO phones(extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid,template_id,user_group,conf_secret,messages,old_messages) VALUES('7798306534','99997798306534','7798306534','','','127.0.0.1','7798306534','','ACTIVE','Y','','Admin User','ADMIN','','EXTERNAL','-5','0000000000','--NONE--','ADMIN','','0','0');

use goautodial;
INSERT INTO users(userid,name,fullname,password_hash,avatar,role,status,user_group,phone) VALUES('1416','goadmin','Admin User',' ',' ','9','1','ADMIN','7798306534');

use kamailio;
INSERT INTO subscriber(`username`, `domain`, `password`, `ha1`, `ha1b`) VALUES('7798306534', 'vaglxc01.goautodial.com', '', '0f4c00d613252a5d0991608b77bc1541', '053e5769a9ea23d954b4c821582984f3');

Update system settings:

mysql asterisk -p

UPDATE system_settings SET pass_cost = 12;
UPDATE system_settings SET pass_hash_enabled = 1;
UPDATE servers SET asterisk_version="13.X";

DROP TABLE IF EXISTS `online`;
CREATE TABLE `online` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `member_id` int(11) DEFAULT NULL,
  `conference` varchar(255) DEFAULT NULL,
  `channel` varchar(80) DEFAULT NULL,
  `talking` int(11) DEFAULT '0',
  `muted` int(11) DEFAULT '0',
  `number` varchar(20) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `admin` int(11) DEFAULT '0',
  `scoreid` int(11) DEFAULT NULL,
  `lastmenuoption` varchar(25) DEFAULT NULL,
  `uniqueid` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

use goautodial;
UPDATE settings SET value="hostname.goautodial.com" where value="vaglxc01.goautodial.com";

Important! Change hostname.goautodial.com to your FQDN

Download default astguiclient.conf file:

cd /root/
https://downloads2.goautodial.org/files/version4/etc/astguiclient.conf
cp astguiclient.conf /var/www/html/
rm -f /etc/astguiclient.conf
ln -s /var/www/html/astguiclient.conf /etc/

Modify accordingly or leave as is:

nano astguiclient.conf

Create a backup copy

cp astguiclient.conf astguiclient-backup.conf

Install Vicidial Perl scripts only:

cd /usr/src/astguiclient/trunk/
perl install.pl  --no-prompt --without-web --asterisk_version 13.X --copy_sample_conf_files --debugX

Note: this will overwrite the downloaded astguiclient.conf

Restore backup astguiclient.conf file:

cd /var/www/html
cp astguiclient-backup.conf astguiclient.conf

Configure Kamailio SIP server

Download and edit default configuration file:

cd /etc/kamailio/
wget https://downloads2.goautodial.org/files/version4/etc/kamailio/kamailio-wss+sip.cfg

mv kamailio-wss+sip.cfg kamailio.cfg
nano kamailio.cfg

Go to line 141:

#!substdef "!MY_IP_ADDR!127.0.0.1!g" 
#!substdef "!MY_DOMAIN!vaglxc01.goautodial.com!g" 

Important! Change 127.0.0.1 to your public IP address and vaglxc01.goautodial.com to your FQDN

systemctl enable kamailio
systemctl restart kamailio

Configure RTPengine

nano /etc/rtpengine/rtpengine.conf
[rtpengine]

table = 0
# no-fallback = false
### for userspace forwarding only:
# table = -1

### a single interface:
#interface = 123.234.345.456
### separate multiple interfaces with semicolons:
# interface = internal/12.23.34.45;external/23.34.45.54
### for different advertised address:
# interface = 12.23.34.45!23.34.45.56

listen-ng = 127.0.0.1:2223

Uncomment and change to your public IP address:

#interface = 123.234.345.456

Change the listening port from 2223 to 5066:

listen-ng = 127.0.0.1:5066

Apply the configuration changes above to the config file below:

nano /etc/sysconfig/rtpengine

Recompile the rtpengine kernel module:

cd /usr/src/ngcp-rtpengine-6.4.0.0-1.el7/
make
make install

Start RTPengine:

systemctl enable ngcp-rtpengine
systemctl start ngcp-rtpengine
systemctl status ngcp-rtpengine

Download and edit Asterisk configuration files:

cd /etc/asterisk/
mv sip.conf sip.conf.old
mv sip-goautodial.conf sip-goautodial.conf.old
mv extensions.conf extensions.conf.old
mv extensions-goautodial.conf extensions-goautodial.conf.old
mv codecs.conf codecs.conf.old

rmdir /usr/share/asterisk/sounds/
ln -s /var/lib/asterisk/sounds /usr/share/asterisk/

wget https://downloads2.goautodial.org/files/version4/etc/asterisk/sip.conf
wget https://downloads2.goautodial.org/files/version4/etc/asterisk/sip-goautodial.conf
wget https://downloads2.goautodial.org/files/version4/etc/asterisk/extensions.conf
wget https://downloads2.goautodial.org/files/version4/etc/asterisk/extensions-goautodial.conf
wget https://downloads2.goautodial.org/files/version4/etc/asterisk/codecs.conf

Edit sip-goautodial.conf file:
nano sip-goautodial.conf

[kamailio]
;encryption=yes ;uncomment for TLS encryption
disallow=all
allow=opus
allow=ulaw
type=friend
dtmfmode=rfc2833
context=default
qualify=yes
nat=force_rport,comedia
host=vaglxc01.goautodial.com ;change me to my FQDN
insecure=port,invite

Important! Change vaglxc01.goautodial.com to your FQDN (or edit your /etc/hosts file)

Download and install Opus codec

cd /root
wget https://downloads2.goautodial.org/files/version4/codec_opus.tar

cd /
tar xvf /root/codec_opus.tar

Ouput:
usr/lib64/asterisk/modules/codec_opus.so
usr/lib64/asterisk/modules/format_ogg_opus.so
usr/lib64/asterisk/modules/res_format_attr_opus.so
usr/share/asterisk/documentation/thirdparty/
usr/share/asterisk/documentation/thirdparty/codec_opus_config-en_US.xml

Start Asterisk

/usr/share/astguiclient/start_asterisk_boot.pl

If Asterisk is already running, restart:

asterisk -rx "core restart now" 

Access your GOautodial application (Google Chrome is recommended)

https://HOSTNAME

User: goadmin
Pass: G0autodial2018

Notes

Kamailio default port 5060/UDP
Asterisk default port 5070/UDP

Please use the community forum boards (https://goautodial.org/projects/goautodialce/boards) for any questions and etc.

Go to top