##### Vicibox 11 how to guide
– Dialer
1.) Install OS
2.) zypper up -y
reboot
3.) vicibox-install
reboot
4.) setup hostname files /etc/host
-Example
127.0.0.1 localhost
192.168.1.1 domain (replace with internal ip, put domain but not the told for example domain instead of domain.com)
12.0.0.1 domain.com (Use External IP instead of 192.168.1.1)
nano /etc/hostname
domain.com
5.) setup time yast timezone
Setup to sync with Pool and set timezone
6.) update php files timezone
7.) Setup SSL Certificates
cd /etc/ssl
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
— put in contents of server.csr into namecheap SSL setup, wait for the certificate file to be emailed to you and place them into /etc/ssl
openssl rsa -in server.key -text > private.pem
openssl x509 -inform PEM -in domain.crt > public.pem
chmod 775 *
chmod a+x *
8.) Change ssl-global file in the apache directory /etc/apache2
nano ssl-global.conf
9.) Change the apache vhosts
Turn on rewrite to SSL only by editing 0000-default.conf
Turn on SSL by editing 0000-default-ssl.conf
Turn on SSL for dynportal by editing dynportal-ssl.conf
10.) Edit Asterisk files
cd /etc/asterisk
edit sip.conf turn off rtp timeout
edit http.conf
servername=Asterisk
enabled=yes
bindaddr=0.0.0.0
tlsenable=yes ; enable tls – default no.
tlsbindaddr=0.0.0.0:8089 ; address and port to bind to – default is bindaddr and port 8089.
tlscertfile=/etc/ssl/public.pem
tlsprivatekey=/etc/ssl/private.pem
11.) yast firewall
set to start on boot
Change Interfaces to the following
- eth0 set to public (Public Ip Address)
- eth1 set to trusted (Internal IP)
-edit external zone to allow
apache2
apache2-ssl
Asterisk
rip
ssh
additional ports open 666 for SSH
-edit public zones
rtp
ssh
additional ports for SSH 666
12.) Edit ssh port to 666
cd /etc/ssh
nano sshd_config
Or nano /etc/ssh/sshd_config
Port 666
13.) Change Crontab for dialers
- Reboot nightly
- white list ip’s
- Delete Tiltx temporary files
30 6 * * * /sbin/reboot
@reboot /usr/bin/VB-firewall –white –dynamic –quiet
* * * * * /usr/bin/VB-firewall –white –dynamic –quiet
00 22 * * * root cd /tmp/ && find . -name ‘*TILTXtmp*’ -type f -delete
########## Webserver
Same as dialer but crontab just add the whitelist and KHOMP Script
@reboot /usr/bin/VB-firewall –white –dynamic –quiet
* * * * * /usr/bin/VB-firewall –white –dynamic –quiet
* * * * * /usr/share/astguiclient/KHOMP_updater.pl
########## Database
Setup MD raid to mount at /srv/mysql before running vicibox-install
Database doesn’t need SSL or Asterisk setup
-crontab / Roll Call Logs / LeadGo
roll logs monthly on high-volume dialing systems
30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl –months=6
roll call_log and vicidial_log_extended daily on very high-volume dialing systems
20 1 * * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl –daily
12 20 * * * /root/LeadGo.pl
15 2 * * * /root/truncate.sh
-Truncate.sh
nano /root/truncate.sh
!/bin/sh
echo “truncate table vicidial_carrier_log” | mysql -u’root’ -D’asterisk’
echo “truncate table vicidial_amd_log_archive” | mysql -u’root’ -D’asterisk’
echo “truncate table vicidial_amd_log” | mysql -u’root’ -D’asterisk’
echo “truncate table vicidial_carrier_log_archive” | mysql -u’root’ -D’asterisk’
-fixme.sh
nano /root/fixme.sh
!/bin/bash
echo “lets truncate some shit”
sh -x /root/truncate.sh
echo “lets clear the logs, first”
echo “Sweet, now its time to repair the database”
sleep 1
mysqlcheck –all-databases –auto-repair
wipe-fix.sh
nano /root/wipe-fix.sh
!/bin/bash
echo “lets truncate some shit”
sh -x /root/truncate.sh
echo “lets clear the logs, first”
/usr/share/astguiclient/ADMIN_archive_log_tables.pl
echo “nice one, now to clear carrier logs”
/usr/share/astguiclient/ADMIN_archive_log_tables.pl –daily –carrier-daily
echo “Sweet, now its time to repair the database”
sleep 1
mysqlcheck –all-databases
mysqlcheck –all-databases -o
mysqlcheck –all-databases –auto-repair
mysqlcheck –all-databases –analyze
— Set executable permissions
chmod a+x turnchate.sh
chmod a+x wipe-fix.sh
chmod a+x fixme.sh
chmod 775 turnchate.sh
chmod 775 wipe-fix.sh
chmod 775 fixme.sh
Optimize mysql
cd /etc/my.cnf.d/
edit cache-buffers-general.cnf
Change key_buffer_size to 60% of memory
edit general.cnf
Change max_connections to above 4000 in the range of 4000-9000
### Optimize System Limits
— Change security limits
/etc/security/limits.conf
Add to the bottom
mysql soft nofile 1024000
mysql hard nofile 1024000
mysql soft nproc 1024000
mysql hard nproc 4096000
hard nofile 1024000
soft nofile 1024000
root hard nofile 1024000
root soft nofile 1024000
—- Change Default Task Max
/etc/systemd/system.conf
Add to the bottom
DefaultTasksMax=infinity
—- Change MariaDb Limits
/usr/lib/systemd/system/mariadb.service
Add
LimitNOFILE=infinity
LimitMEMLOCK=infinity
Make sure time zone and php.ini have the correct locations
yast timezone
Modify the php.ini files in the system
‘America/Los_Angeles’