Project

General

Profile

Step By Step Scratch install Goautodial V4 with FQDN

Added by Steve Turner over 4 years ago

GOAUTODIAL VER4 SCRATCH INSTALL ALL REQUIREMENTS INCLUDING FQDN

I have spent quite a few days to build a server that will function with FQDN and is ready to be clustered. Going through all of the forums and have pieced together this guide that I use now. This has been a trial and error process, and I wanted to share with everyone and show my appreciation to all that have been involved with this forum and help sections. The only part that is not included is the LetsEncrypt or other SSL certificates, this still uses the Self-Signed certs. The ONLY security I have included in this walkthrough is changing the SSH port. Be sure to change passwords, add MYSQL root password (mysql_secure_installation) and use the IP tables or FIREWALLD. IPTABLES are installed and a sample config file available on install, be sure to change the SSH port in the IPTABLES script before using it or you will be locked out.

Installing the PERL scripts and a few missing dependencies eliminate some of the bugs people encounter here in the forum, changing the file ownership after GIT update seems to reduce the CPU high load issues and less NOTICES in the logs. GOOD LUCK TO YOU ALL.

STOP AND DISABLE FIREWALL:

systemctl disable firewalld
systemctl stop firewalld

DISABLE SELINUX:

vi /etc/selinux/config
SELINUX=disabled (Change to disabled)

UPDATE HOSTNAME:

hostnamectl set-hostname xxxxxx.xxxxx.xxx
vi /etc/hosts
change domain name for actual server ip (xxx.xxx.xxx.xxx complete domain name subdomain only)

CHANGE SSH PORT: (remember this or you will be locked out)

vi /etc/ssh/sshd_config
uncomment #Port and change to preferred new port number

UPDATE SYSTEM:

yum install wget -y

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

yum update -y

reboot (use new port number if was changed)

INSTALL DEPENDENCIES:

yum install -y epel-release
yum groupinstall "Development Tools" -y

wget https://rpm.mag-sol.com/Centos/7/x86_64/perl-Sys-RunAlone-0.12-1.el7.centos.noarch.rpm
rpm -i perl-Sys-RunAlone-0.12-1.el7.centos.noarch.rpm

yum install y MariaDB-server MariaDB-devel 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 kamailio kamailio-mysql kamailio-ims kamailio-utils kamailio-websocket kamailio-json perl-Math-Round perl-File-Touch perl-Sys-RunAlone perl-Switch perl->Time-Local ngcp-rtpengine ngcp-rtpengine-kernel ngcp-rtpengine-dkms dkms dahdi-linux dahdi-linux-devel kernel-devel perl-DBD-mysql perl-Net-Telnet lame httpd mod_ssl screen crontabs mailx net->tools readline readline-devel ncurses ncurses-devel tk tk-devel htop perl-DBI perl-Digest-HMAC perl-YAML perl-ExtUtils-ParseXS perl-NetAddr-IP perl-Crypt-SSLeay perl-Curses perl-DBD-Pg perl->Module-ScanDeps perl-Text-CSV perl-HTML-Template perl-IO-Compress perl-Text-Glob perl-Jcode perl-Test-Script perl-Archive-Tar perl-Test-Base perl-OLE-Storage_Lite perl-Archive-Zip perl-Net->Server perl-Convert-ASN1 perl perl-Compress-Raw-Zlib perl-Digest-SHA1 perl-Data-Dumper perl-Error perl-ExtUtils-CBuilder perl-Test-Tester perl-Parse-RecDescent perl-Spiffy perl-IO-Zlib perl->Module-Build perl-HTML-Parser perl-Net-SSLeay perl-Proc-ProcessTable perl-TermReadKey perl-Term-ReadLine-Gnu perl-Digest-SHA perl-Tk perl-Net-SNMP perl-Test-NoWarnings perl-XML-Writer perl->Proc-PID-File perl-Compress-Raw-Bzip2 perl-libwww-perl perl-XML-Parser perl-File-Remove perl-Parse-CPAN-Meta perl-Set-Scalar perl-Probe-Perl perl-File-Which perl-Package-Constants perl-Module->Install perl-File-HomeDir perl-Spreadsheet-ParseExcel perl-Mail-Sendmail perl-Spreadsheet-XLSX perl-version perl-Crypt-DES perl-URI perl-Net-Daemon perl-IO-stringy perl-YAML-Tiny perl-HTML->Tagset perl-Socket6 perl-BSD-Resource perl-PlRPC perl-IPC-Run3 perl-Text-CSV_XS perl-Unicode-Map perl-Module-CoreList perl-Net-Telnet perl-PAR-Dist perl-Date-Manip perl-JSON perl-Proc-Daemon >perl-Spreadsheet-WriteExcel perl-rrdtool sox ntp iftop subversion glibc.i686 mod_fcgid

INSTALL CPAN and PERL SCRIPTS: (run twice or until all are installed with dependencies)

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

SHOULD HAVE THIS OUTPUT ON CONSOLE:

CPAN: Module::CoreList loaded ok (v2.76_02)
Tk is up to date (804.034).
String::CRC is up to date (1).
Tk::TableMatrix is up to date (1.23).
Net::Address::IP::Local is up to date (0.1.2).
Term::ReadLine::Gnu is up to date (1.36).
Spreadsheet::Read is up to date (0.80).
Net::Address::IPv4::Local is up to date (0.12).
RPM::Specfile is up to date (1.51).
Spreadsheet::XLSX is up to date (0.15).
Spreadsheet::ReadSXC is up to date (0.20).

ENABLE SERVICES ON START-UP AND START MYSQL:

systemctl enable php-fpm
systemctl enable httpd
systemctl enable mariadb
systemctl enable kamailio
systemctl enable ngcp-rtpengine
systemctl start mariadb

INSTALL GOAUTODIAL:

yum -y install goautodial-ce
cd /usr/src/goautodial
./install.sh

reboot (seems databases are not created until after reboot,on some instances a HARD REBOOT is required)

CONFIRM DATABASES CREATED:

mysql
MariaDB [(none)]>show databases;

Should show 8 Databases
asterisk
goautodial
information_schema
kamailio
mysql
osticketdb
performance_schema
test
8 rows in set (0.00 sec)

UPDATE GOAUTODIAL TABLE IN MYSQL:

use goautodial;
ALTER TABLE go_campaigns ADD COLUMN manual_dial_min_digits INT DEFAULT '6';
ALTER TABLE users ADD COLUMN enable_webrtc tinyint(1) DEFAULT '1';
quit;

UPDATE GOAUTODIAL WITH GIT:

cd /var/www/html
git stash
git pull

cd /var/www/html/goAPIv2
git stash
git pull

CHANGE FILE OWNERSHIP: (GIT files are replaced with ROOT as owner and need to be changed to APACHE owner)

chown apache.apache -R /var/www/html

UPDATE CRONTAB:

crontab -e (be sure to add --HTTPS to end of 4th line of recording scripts)

1,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 --MP3 --HTTPS

UPDATE IPs AND FQDN:

Kamailio:
vi /etc/kamailio/kamailio.cfg
Around line 136:
#!substdef "!MY_IP_ADDR!10.10.100.164!g" (use your IP address)
#!substdef "!MY_DOMAIN!xxxxx.xxxxx.xxx!g" (use your FQDN)

/* add local domain aliases */
alias="subdomain.domainname.com"
alias="domainname.com"

RTPEngine:
vi /etc/rtpengine/rtpengine.conf
Around line 8:
a single interface:
interface = 10.10.100.164 (use your IP address)

GOautodial web application
vi /var/www/html/php/goCRMAPISettings.php
Change IP address to your FQDN and then restart Kamailio and RTPEngine.

CHANGE KAMAILIO DOMAIN:

vi /etc/asterisk/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=xxxxxxx.xxxxxxx.xxx ;change me to my FQDN
insecure=port,invite

SET DOMAIN IN HTTP.CONF: (about line 95)

vi /etc/httpd/conf/httpd.conf
uncomment Servername and change to your FQDN (xxxx.xxxx.xxx:80)

UPDATE DEFAULT TIME ZONE: (about line 877)

vi /etc/php.ini
date.timezone = Asia/Manila (change to your timezone)

RUN UPDATE IP SCRIPT:

/usr/share/astguiclient/ADMIN_update_server_ip.pl (should show old IP as 127.0.0.1)

UPDATE SELF-SIGNED SSL CERT TO NEW DOMAIN:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/localhost.key -out /etc/pki/tls/certs/localhost.crt

CREATE LINK FOR RECORDINGS:

If you have an issue with recordings a solution is to manually create an symbolic link in
the folder html named RECORDINGS poiting to the file where asterisk store the recordings
files
.
cd /var/www/html
ln -s /var/spool/asterisk/monitorDONE/ RECORDINGS
If you get NOT AUTHORIZED errors you must change the chmod of all the folders in the
path /var/spool/asterisk/monitorDONE/MP3/.

REBOOT: (to be sure system survives reboot)

reboot

CHECK THEIR STATUSES:

systemctl status ngcp-rtpengine
systemctl status kamailio
asterisk -vvvvvr

LOG IN AS ADMIN:

https://FQDN
USER: goadmin
PASSWORD: G0autodial2018

ADMINISTRATION>SETTINGS:

Change Base URL to your FQDN
Change Company Name
Change Timezone

ADMINISTRATION>GOWEBRTCSETTINGS:

Change WebRTC Websocket to FQDN
Change WebRTC SIP Host/IP to FQDN
Change Kamailio Domain to FQDN

SETTINGS>SERVERS:

Advanced Settings:
Generate Conf Files: YES
Rebuild Conf Files: YES
Rebuild Music On Hold: YES
Alt Recording Server IP: FQDN
External Server IP: FQDN

SETTINGS>CARRIERS:

Create new SIP carrier (be sure to use 10 digits for DIAL PREFIX)

TELEPHONY>CAMPAIGNS>TEST CAMPAIGN:

Change to Dial Method MANUAL
Change Carrier to use for this Campaign to the newly created carrier
Change to 24hr dialing

REBOOT TO BE SURE NEW CONFIG FILES ARE USED:

reboot

TELEPHONY>USERS:

Create NEW ADMIN USER
Delete agent001 and create NEW USER

NOW YOU SHOULD HAVE A FULLY FUNCTIONAL GOAUTODIAL INSTANCE WITH FQDN:

In INCOGNITO browser, Login as newly created agent and test calls


Replies (30)

RE: Step By Step Scratch install Goautodial V4 with FQDN - Added by Wittie Manansala about 4 years ago

Hi,

Our steps are posted here:

Scratch install:
https://goautodial.org/projects/goautodialce/wiki/Version_4_How_To_Install_Goautodial_From_Scratch_using_CentOS_7X

Update latest version:
https://goautodial.org/projects/goautodialce/wiki/HOWTO_Update_latest_version_via_Github

For checking visit below site specially on Administration Gui Settings and Configuration Files to check section:
https://goautodial.org/projects/goautodialce/wiki/Goautodial_Getting_Started_Guidev4

Make sure your dialer is running properly (your able to login, create campaign and make calls) before install SSL certificate on your server.

Thanks

Thanks

RE: Step By Step Scratch install Goautodial V4 with FQDN - Added by Rohit Mathur about 4 years ago

Hi Steve,

Amazing article. I was able to install a production server without a single error. Kudos to you.

Lot of us now need assistance in installing LetsEncrypt or any other Valid SSL Certificate. Self Signed is not enough for Cloud servers and due to COVID 19, cloud is the only options.

It would be a big help if you have add steps on using LetsEncrypt certificate with GA4.

Looking forward to this.

Cheers! Stay Safe!

Rohit

RE: Step By Step Scratch install Goautodial V4 with FQDN - Added by Leopoldo Martinez over 3 years ago

Hello, i'm having erro trying to instal GADV4, when i run this comand

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

start to work fine, but when it comes to this part "Spreadsheet::ReadSXC" it doesn't work good, and the RPMs doesn't work... any help?

RE: Step By Step Scratch install Goautodial V4 with FQDN - Added by Jackie Alfonso over 3 years ago

Leopoldo Martinez wrote:

Hello, i'm having erro trying to instal GADV4, when i run this comand

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

start to work fine, but when it comes to this part "Spreadsheet::ReadSXC" it doesn't work good, and the RPMs doesn't work... any help?

Hi Leopoldo,

Please follow this steps below.

INSTALL CPAN and PERL SCRIPTS: (run twice or until all are installed with dependencies)

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

If you see an ERROR please send a screenshot of that ERROR as well.

Thank yoU!

RE: Step By Step Scratch install Goautodial V4 with FQDN - Added by Leopoldo Martinez over 3 years ago

Jackie Alfonso wrote:

Leopoldo Martinez wrote:

Hello, i'm having erro trying to instal GADV4, when i run this comand

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

start to work fine, but when it comes to this part "Spreadsheet::ReadSXC" it doesn't work good, and the RPMs doesn't work... any help?

Hi Leopoldo,

Please follow this steps below.

INSTALL CPAN and PERL SCRIPTS: (run twice or until all are installed with dependencies)

cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC

If you see an ERROR please send a screenshot of that ERROR as well.

Thank yoU!

hi, those were the steps i followed, that is exactly the command i commented above. Also I ran it again just to have the exit message and to be able to post it, I hope I can receive some help.

[root@imperia ~]# cpan -i Tk String::CRC Tk::TableMatrix Net::Address::IP::Local Term::ReadLine::Gnu Spreadsheet::Read Net::Address::IPv4::Local RPM::Specfile Spreadsheet::XLSX Spreadsheet::ReadSXC
CPAN: Storable loaded ok (v2.45)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 28 Sep 2020 15:55:56 GMT
CPAN: Module::CoreList loaded ok (v2.76_02)
Tk is up to date (804.035).
String::CRC is up to date (1).
Tk::TableMatrix is up to date (1.23).
Net::Address::IP::Local is up to date (0.1.2).
Term::ReadLine::Gnu is up to date (1.36).
Spreadsheet::Read is up to date (0.82).
Net::Address::IPv4::Local is up to date (0.12).
RPM::Specfile is up to date (1.51).
Spreadsheet::XLSX is up to date (0.15).
Running install for module 'Spreadsheet::ReadSXC'
Running make for C/CO/CORION/Spreadsheet-ReadSXC-0.26.tar.gz
CPAN: LWP::UserAgent loaded ok (v6.05)
CPAN: Time::HiRes loaded ok (v1.9725)
Fetching with LWP:
http://mirror.low-orbit.net/pub/cpan/authors/id/C/CO/CORION/Spreadsheet-ReadSXC-0.26.tar.gz
CPAN: YAML loaded ok (v0.84)
CPAN: Digest::SHA loaded ok (v5.85)
Fetching with LWP:
http://mirror.low-orbit.net/pub/cpan/authors/id/C/CO/CORION/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.061)
Checksum for /root/.cpan/sources/authors/id/C/CO/CORION/Spreadsheet-ReadSXC-0.26.tar.gz ok
Uncompressed /root/.cpan/sources/authors/id/C/CO/CORION/Spreadsheet-ReadSXC-0.26.tar.gz successfully
Using Tar:/usr/bin/tar xf "Spreadsheet-ReadSXC-0.26.tar":
Couldn't untar Spreadsheet-ReadSXC-0.26.tar
CPAN: File::Temp loaded ok (v0.2301)
CPAN: CPAN::Meta loaded ok (v2.120921)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/CORION-d9s6ux/Makefile.PL" returned false.)
Writing one on our own (setting NAME to SpreadsheetReadSXC)
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install

On the other hand, I am having problems making calls, the system is online but it does not call from the trunk I placed. I take the opportunity to also attach that trace of the CLI to see if you can help me with that too.

Asterisk 13.17.2-vici, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details. =========================================================================
Connected to Asterisk 13.17.2-vici currently running on imperia (pid = 1684)
Manager 'sendcron' logged on from 127.0.0.1
-- Called 8600051@default
-- Executing [8600051@default:1] Konference("Local/8600051@default-00000001;2", "8600051,R") in new stack
-- Local/8600051@default-00000001;1 answered
-- Executing [123456789034965277777@default:1] AGI("Local/8600051@default-00000001;1", "agi://127.0.0.1:4577/call_log") in new stack
Manager 'sendcron' logged off from 127.0.0.1
-- AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=30955597))
-- <Local/8600051@default-00000001;1>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing [123456789034965277777@default:2] Dial("Local/8600051@default-00000001;1", "SIP/34965277777@Imperia,,tTo") in new stack
Using SIP RTP CoS mark 5
-- Called SIP/34965277777@Imperia
[Sep 29 16:33:54] WARNING[2244][C-00000003]: channel.c:6561 ast_channel_make_compatible_helper: No path to translate from SIP/Imperia-00000001 to Local/8600051@default-00000001;1
Spawn extension (default, 123456789034965277777, 2) exited non-zero on 'Local/8600051@default-00000001;1'
[Sep 29 16:33:54] WARNING2244[C-00000003]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
-- Executing [h@default:1] AGI") in new stack
-- <Local/8600051@default-00000001;1>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CONGESTION---------------) completed, returning 0
[Sep 29 16:33:54] ERROR2245[C-00000002]: member.c:389 member_exec: unable to answer call
Spawn extension (default, 8600051, 1) exited non-zero on 'Local/8600051@default-00000001;2'
[Sep 29 16:33:54] WARNING[2245][C-00000002]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
-- Executing [h@default:1] AGI("Local/8600051@default-00000001;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------------)") in new stack
-- &lt;Local/8600051@default-00000001;2&gt;AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------------) completed, returning 0
Manager 'sendcron' logged on from 127.0.0.1
-- Called 58600051@default
-- Executing [58600051@default:1] Konference("Local/58600051@default-00000002;2", "8600051,qLR") in new stack
-- Local/58600051@default-00000002;1 answered
-- Executing [8309@default:1] Answer("Local/58600051@default-00000002;1", "") in new stack == Manager 'sendcron' logged off from 127.0.0.1
-- Executing [8309@default:2] Monitor("Local/58600051@default-00000002;1", "wav,User235_965277777_20200929-113353") in new stack
-- Executing [8309@default:3] Wait("Local/58600051@default-00000002;1", "3600") in new stack
[Sep 29 16:34:01] WARNING1779: chan_sip.c:4072 retrans_pkt: Retransmission timeout reached on transmission :5070 for seqno 103 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response

Thanks!!!...

(26-30/30) Go to top