Table of Contents

Сервис SalesPlatform Vtiger CRM Russian

Создание БД

# mysql
CREATE DATABASE vtigercrm;
GRANT ALL PRIVILEGES ON vtigercrm.* TO "vtigercrm"@"localhost" IDENTIFIED BY "vtigercrm";
FLUSH PRIVILEGES;

Установка требуемого ПО

debian10# PERLV=5.28

debian11# PERLV=5.32

debian10_11# apt install binutils cpp flex gcc libarchive-zip-perl libc6-dev \
libperl${PERLV} libpcre3 libpopt-dev lynx m4 make  ncftp nmap \
openssl perl perl-modules-${PERLV} unzip zip zlib1g-dev autoconf \
automake libtool bison autotools-dev gcc libpng-dev libjpeg-dev \
libfreetype6-dev libssl-dev libxml2-dev libxml2 g++ gawk \
libapache2-mod-php php-gd php-imap php-curl php-mysql php-mbstring php-xml

Преподавателю посмотреть содержимое php.ini на предмет секций

 
debian10# PHPV=7.3

debian11# PHPV=7.4

debian10_11# cat /etc/php/${PHPV}/apache2/php.ini
...
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE
safe_mode = off
display_errors = off
file_uploads = on
max_execution_time = 600
memory_limit = 128M
log_errors = on
output_buffering = on
short_open_tag = on
max_input_vars = 100000
extension=timezonedb.so
# service apache2 restart

Установка

# wget http://val.bmstu.ru/unix/CRM/salesplatform-vtigercrm-7.1.0-201803.tar.gz

# cd /var/www/html

/var/www/html# tar -xvf /root/salesplatform-vtigercrm*

# chown -R www-data:www-data /var/www/html/vtigercrm/
http://server.corpX.un/vtigercrm/
localhost
vtigercrm

Интеграция с Asterisk

SPAsteriskConnector 1.4.2

# wget http://val.bmstu.ru/unix/CRM/SPAsteriskConnector-1.4.2.zip

# mkdir /usr/local/SPAsteriskConnector

# cd /usr/local/SPAsteriskConnector

/usr/local/SPAsteriskConnector# unzip /root/SPAsteriskConnector-1.4.2.zip

# cat /usr/local/SPAsteriskConnector/conf/SPVtigerAsteriskConnector.properties
ServerIP   = 127.0.0.1
ServerPort = 4573
AsteriskAppDBPath = /usr/local/SPAsteriskConnector/db/

AsteriskServerIP   = 127.0.0.1
AsteriskServerPort = 5038
AsteriskUsername   = admin
AsteriskPassword   = admin

VtigerURL = http://localhost/vtigercrm/
VtigerSecretKey = test

CheckKeyOnListenRequest=true
LookUpVariablesNames=
DefaultOriginateChannelProtocol = SIP

Запуск

# chmod +x /usr/local/SPAsteriskConnector/bin/*sh

# /usr/local/SPAsteriskConnector/bin/start.sh

Отладка

# ss -pant | grep 4573

# asterisk -rx "manager show connected"

# wget -O - 'http://127.0.0.1:4573/makecall?event=outgoingcall&secret=test&from=403&to=301&context=default'

# tail -f /usr/local/SPAsteriskConnector/logs/nohu...

ЗАПУСКАТЬ ВМЕСТО СЕРВИСА# /usr/local/SPAsteriskConnector/bin/webapp.sh

Подключение CRM к Connector

URL адрес	http://127.0.0.1:4573
Контекст	default
Секретный ключ	test

Подключение Asterisk к Connector

# cat /etc/asterisk/extensions.conf
[default]
...
exten => _[+789]XXXXXXXXXX!,1,Dial(SIP/voip1_00000X/8${EXTEN:-10})
...
exten => voip1_00000X,1,Dial(SIP/401&SIP/402&SIP/403&SIP/404)

Информация по предыдущим версиям

Debian 9

# wget http://val.bmstu.ru/unix/CRM/salesplatform-vtigercrm-7.1.0-201803.tar.gz

debian9# apt install binutils cpp flex gcc libarchive-zip-perl libc6-dev \
libperl5.24 libpcre3 libpopt-dev lynx m4 make  ncftp nmap \
openssl perl perl-modules-5.24 unzip zip zlib1g-dev autoconf \
automake libtool bison autotools-dev gcc libpng-dev libjpeg-dev \
libfreetype6-dev libssl-dev libxml2-dev libxml2 g++ gawk \
libapache2-mod-php php-gd php-imap php-curl php-mysql php-mbstring php-xml

SalesPlatform Vtiger CRM 6.5.0

# wget http://val.bmstu.ru/unix/CRM/salesplatform-vtigercrm-6.5.0-201611.tar.gz

# apt install php5-mysql php5-gd php5-curl php5-imap

# cat /etc/php5/apache2/php.ini
...
safe_mode = off
register_globals = off
short_open_tag = On
output_buffering = on
max_execution_time = 600
max_input_vars = 100000
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
date.timezone = Europe/Moscow

SPAsteriskConnector 1.4.1

# wget http://val.bmstu.ru/unix/CRM/SPAsteriskConnector-1.4.1.zip

# mkdir /usr/local/SPAsteriskConnector

# cd /usr/local/SPAsteriskConnector

/usr/local/SPAsteriskConnector# unzip /root/SPAsteriskConnector-1.4.1.zip

# cat /usr/local/SPAsteriskConnector/conf/SPVtigerAsteriskConnector.properties
#ServerIP   = 127.0.0.1
#ServerIP   = 0.0.0.0
ServerPort = 4573
AsteriskAppDBPath = /usr/local/SPAsteriskConnector/db/

#AsteriskServerIP   = 127.0.0.1
#AsteriskServerIP   = server.corpX.un
AsteriskServerPort = 5038
AsteriskUsername   = admin
AsteriskPassword   = admin

VtigerURL = http://localhost/vtigercrm/
VtigerSecretKey = test

DefaultOriginateChannelProtocol = SIP
# cat /usr/local/SPAsteriskConnector/bin/webapp.sh
...
#JAVACP=../SPAsteriskConnector/build/classes:"../libs/*"
JAVACP=../source/classes:"../libs/*"
...