AI智能电话机器人源码到呼叫中心系统
科大讯飞开发者平台
https://console.xfyun.cn/services/iat
https://www.xfyun.cn/
1.安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
2.升级到宝塔专业版
wget -O update.sh http://download.bt.cn/install/update_pro.sh && bash update.sh pro
运行
echo > /www/server/panel/data/userInfo.json
然后重启你的面板
/etc/init.d/bt restart
3.登陆宝塔,安装环境
php7.0 nginx mysql
4.安装freeswitch
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel e2fsprogs-devel flite-devel g722_1-devel gcc-c++ gdbm-devel gnutls-devel ilbc2-devel ldns-devel libcodec2-devel libcurl-devel libedit-devel libidn-devel libjpeg-devel libmemcached-devel libogg-devel libsilk-devel libsndfile-devel libtheora-devel libtiff-devel libtool libuuid-devel libvorbis-devel libxml2-devel lua-devel lzo-devel mongo-c-driver-devel ncurses-devel net-snmp-devel openssl-devel opus-devel pcre-devel perl perl-ExtUtils-Embed pkgconfig portaudio-devel postgresql-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel
yum install unixODBC-devel -y
yum install mysql-connector-odbc -y
yum install libshout-devel mpg123-devel lame-devel -y
5.配置freeswitch
上传zip包到/root/
tar zxvf freeswitch.tar.gz
mv -f freeswitch /usr/local/
ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli
6.安装 smartivr
cd
tar zxvf install.tar.gz
cd install
\cp -rf smartivr da2server /var/
cd /var/smartivr
chmod +x bin/smartivr
chmod +x bin/gender
chmod +x aiui/aiui
chmod +x iflytek/iflytek
chmod +x cgi/cgi
cd /var/da2server
chmod +x daserver
chmod +x libcrypto.so.1.0.0
chmod +x libjsoncpp.so.0
chmod +x libPocoData.so.60
chmod +x libPocoDataSQLite.so.60
chmod +x libPocoFoundation.so.60
\cp -rf libcrypto.so.1.0.0 libjsoncpp.so.0 libPocoData.so.60 libPocoDataSQLite.so.60 libPocoFoundation.so.60 /usr/lib64/
\cp -rf ~/install/libda2.so /usr/local/freeswitch/lib/
7.搭建网站
设置thinkphp伪静态
8.创建数据库
robot
telrobot
创建软链接
ln -s /www/wwwroot/你的IP/web /var/smartivr/uploads
9.设置定时任务
\cp -rf ~/install/autoserver.sh /usr/local/
chmod +x /usr/local/autoserver.sh
crontab -e
*/1 * * * * sh /usr/local/autoserver.sh
备注说明:
AI智能电话机器人,AI智能电话,AI机器人遇到如下问题:
错误合集
make时出现的错误: making all mod_signalwire make[4]: Entering directory /usr/local/src/freeswitch/src/mod/applications/mod_signalwire' Makefile:916: *** You must install libks to build mod_signalwire. Stop. make[4]: Leaving directory/usr/local/src/freeswitch/src/mod/applications/mod_signalwire' make[3]: *** [mod_signalwire-all] Error 1 根据报错可以看出需要安装需要安装 libks 和 signalwire-c,安装libks前需要先安装cmake。
安装cmake
yum remove cmake #卸载yum安装的版本,若无安装则忽略
cd /usr/local/src
wget https://cmake.org/files/v3.14/cmake-3.14.0.tar.gz
tar vzxf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./configure
make
make install
ln -s /usr/local/bin/cmake /usr/bin #软连接
安装libks
cd /usr/local/src
yum install libatomic
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make install
安装signalwire-c
cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make
make install
ln -sf /usr/local/lib64/pkgconfig/signalwire_client.pc /usr/lib64/pkgconfig/signalwire_client.pc
最后再次安装FreeSWITCH
make && make install
-------------------------------------------------------------------
AI智能电话机器人,AI智能电话,AI机器人Freeswitch 的日志上就会出现相关的 debug,notice 等信息。 如遇到红色的报警,并提示要 sleep 10 秒的,则是由于我们使用了默认密码,可以修改 Conf/vars.xml 中的 <X-PRE-PROCESS cmd="set" data="default_password=1234"/> 或修改 conf/dialplan/default.xml 中 <condition field="${default_password}" expression="^1234$" break="never"> <action application="log" data="CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING "/> <action application="log" data="CRIT Open $${conf_dir}/vars.xml and change the default_password."/> <action application="log" data="CRIT Once changed type 'reloadxml' at the console."/> <action application="log" data="CRIT WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING "/> <action application="sleep" data="10000"/> </condition>
----------------------------------------------------------------------------------------------------------------------
启动freeswitch报错:
[ERR] sofia.c:3146 Error Creating SIP UA for profile: external-ipv6
[ERR] sofia.c:3146 Error Creating SIP UA for profile: internal-ipv6
处理:禁用ipv6,如果系统不支持,可能会刷如上错误信息,禁用即可 。。查找来自https://www.cnblogs.com/lmsthoughts/p/9322816.html
禁用方式,在主目录执行
mv conf/sip_profiles/internal-ipv6.xml conf/sip_profiles/internal-ipv6.xml.bk
mv conf/sip_profiles/external-ipv6.xml conf/sip_profiles/external-ipv6.xml.bk
重新启动就没有了呵呵
----------------------------------------------------------------------------------
使用fs_cli启动报错
处理报错:[ERROR] fs_cli.c:1659 main() Error Connecting [Socket Connection Error]
编辑
vim /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml
重启FreeSWITCH
fs_cli -H IP -P 8021 -p ****(密码)
++====================================================================
AI智能电话机器人,AI智能电话,AI机器人配置录音功能:
1.创建录音存储文件夹
2.修改配置文件
3.使配置文件生效
4.测试结果
1.建立一个文件夹,在/freeswitch/recordings/archive/ ,用来存储录音文件;
2.修改拨码计划,打开 \conf\dialplan\default.xml
找到下面的语句:
<extension name="Local_Extension">
<condition field="destination_number" expression="^(10[01][0-8])$">
在下面添加录音配置参数:
<action application="set" data="RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/>
<action application="set" data="RECORD_COPYRIGHT=(c) 2011"/>
<action application="set" data="RECORD_SOFTWARE=FreeSWITCH"/>
<action application="set" data="RECORD_ARTIST=FreeSWITCH"/>
<action application="set" data="RECORD_COMMENT=FreeSWITCH"/>
<action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/>
<action application="set" data="RECORD_STEREO=true"/>
<action application="record_session" data="$${base_dir}/recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
3.在fs_cli中使用F6或执行reloadxml使配置文件生效;
4.随便呼叫产生录音文件
FreeSWITCH 架构
FreeSWITCH 的扩展性非常强