lemon 是基于 FreeSWITCH 的开源呼叫中心系统,是 tenjin 3.0 的升级版, 并且正式更名为 lemon,Web系统主要使用PHP开发,核心控制模块使用C语言编写,单台服务器可多租户使用。
- 座席队列监控
- 3种外呼模式
- 简单的订单系统
- 分机注册及状态监控
- 商品管理和语音管理
- 通话录音查询
- 通话记录和通话数据报表
- 集成VOS账户余额查询
- 可定制简单的呼入队列
- 群呼转座席自动模式
- 群呼转座席固定模式
- 半自动一对一外呼
- 服务优化
systemctl disable auditd.service
systemctl disable firewalld.service
systemctl disable microcode.service
systemctl disable NetworkManager.service
systemctl disable postfix.service
systemctl disable tuned.service
- 内核参数优化 vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv4.ip_forward = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
fs.file-max = 2097152
fs.mqueue.msg_default = 10240
fs.mqueue.msg_max = 10240
fs.mqueue.msgsize_default = 8192
fs.mqueue.msgsize_max = 8192
fs.mqueue.queues_max = 256
- 内核参数优化 vi /etc/security/limits.conf
* soft nofile 102400
* hard nofile 102400
* soft nproc unlimited
* hard nproc unlimited
- 关闭 selinux
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/selinux/config
- 安装 yum 源 epel-release
yum -y install epel-release
yum makecache fast
- 安装相关依赖软件包和开发库
yum install -y gcc gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel openssl-devel re2c
yum install -y libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel e2fsprogs-devel
yum install -y libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel gsm gsm-devel
yum install -y libevent libevent-devel hiredis hiredis-devel libconfig libconfig-devel libjpeg-devel
yum install -y nginx php php-fpm php-devel php-pgsql php-mcrypt php-mbstring php-pdo php-pgsql redis sqlite-devel
yum install -y git
git clone https://github.com/xuntee/lemon.git
- 安装PHP的redis数据库扩展
tar -zxvf 2.2.7.tar.gz
cd phpredis-2.2.7
phpize
./configure
make
make install
vi /etc/php.d/redis.ini
; Enable redis extension module
extension=redis.so
- 安装 PostgreSQL 数据库
yum install -y postgresql postgresql-server postgresql-devel
postgresql-setup initdb
systemctl enable postgresql.service
systemctl start postgresql.service
- 安装 pgbouncer 数据库连接池
tar -zxvf pgbouncer-1.7.2.tar.gz
cd pgbouncer-1.7.2
./configure
make
make install
mkdir -p /etc/pgbouncer
mkdir -p /var/log/pgbouncer
mkdir -p /var/run/pgbouncer
chown -R postgres:postgres /var/log/pgbouncer
chown -R postgres:postgres /var/run/pgbouncer
cp ../config/pgbouncer.ini /etc
cp ../config/userlist.txt /etc/pgbouncer
cp ../config/pgbouncer.conf /etc/tmpfiles.d
cp ../config/pgbouncer.service /etc/systemd/system
systemctl enable pgbouncer.service
systemctl start pgbouncer.service
- 下面安装可能会报错 You must install libopus-dev to build mod_opus. Stop.
vi /etc/yum.repos.d/linuxtech.repo
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET
yum install libopus-devel
make clean
- 编译安装 FreeSWITCH
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.10.tar.gz
tar -zxvf freeswitch-1.6.10.tar.gz
cd freeswitch-1.6.10
sed -i "s#\#applications/mod_curl#applications/mod_curl#g" modules.conf
./configure --disable-debug --disable-libyuv --disable-libvpx --enable-core-pgsql-support
make
make mod_xml_curl-install
cp src/mod/applications/mod_curl/.libs/mod_curl.so /usr/local/freeswitch/mod/
cp src/mod/applications/mod_curl/.libs/mod_curl.la /usr/local/freeswitch/mod/
make install
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/freeswitch
mkdir -p /var/service
mkdir -p /var/freeswitch
chown -R apache:apache /var/service
chown -R apache:apache /var/freeswitch
chown -R apache:apache /usr/local/freeswitch
- 安装php phalcon 扩展
tar -zxvf phalcon-2.0.12.tar.gz
cd phalcon-2.0.12/build
./install
vi /etc/php.d/phalcon.ini
; Enable phalcon extension module
extension=phalcon.so
- 安装 ESL PHP模块
cd libs/esl
make phpmod
cp php/ESL.so /usr/lib64/php/modules
vi /etc/php.d/ESL.ini
; Enable ESL extension module
extension=ESL.so
- 安装 mod_bcg729 语音编码
tar -zxvf mod_bcg729.tar.gz
cd mod_bcg729
make
make install
- 设置开机启动
systemctl restart php-fpm
systemctl enable php-fpm
systemctl restart nginx
systemctl enable nginx
systemctl restart redis
systemctl enable redis
github 下载地址: freeswitch-sound-cn 或者 git clone
git clone https://github.com/log2k/freeswitch-sound-cn.git
cp -R freeswitch-sound-cn /usr/local/freeswitch/sounds