yoqw/语音服务环境需求.md
2020-07-01 17:47:54 +08:00

4.7 KiB
Raw Blame History

语音服务环境需求

1. FreeSWITCH

可安装在操作系统CentOS 7或者Debian buster上,需要安装核心部件lua``curl``odbc``bcg729等,安装步骤参考

# FreeSWITCH
FROM debian:buster
RUN echo 'deb http://mirrors.aliyun.com/debian/ buster main non-free contrib' > /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian-security buster/updates main' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian-security buster/updates main' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y curl gnupg2 \
&& echo 'deb http://files.freeswitch.org/repo/deb/debian-release/ buster main' \
> /etc/apt/sources.list.d/freeswitch.list \
&& echo 'deb-src http://files.freeswitch.org/repo/deb/debian-release/ buster main' \
>> /etc/apt/sources.list.d/freeswitch.list \
&& curl -Lk 'https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc' \
| apt-key add - \
&& apt-get update \
&& apt-get install -y libfreeswitch-dev \
git autoconf automake libtool build-essential \
&& mkdir -p /var/src/mod_bcg729 \
&& curl -Lk https://github.com/xadhoom/mod_bcg729/archive/v1.0.5.tar.gz | \
tar -xzv --strip 1 -C /var/src/mod_bcg729 \
&& cd /var/src/mod_bcg729 \
&& make

FROM debian:buster
RUN echo 'deb http://mirrors.aliyun.com/debian/ buster main non-free contrib' > /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian-security buster/updates main' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian-security buster/updates main' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib' >> /etc/apt/sources.list \
&& echo 'deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y curl gnupg2 \
&& echo 'deb http://files.freeswitch.org/repo/deb/debian-release/ buster main' > /etc/apt/sources.list.d/freeswitch.list \
&& echo 'deb-src http://files.freeswitch.org/repo/deb/debian-release/ buster main' >> /etc/apt/sources.list.d/freeswitch.list \
&& curl -Lk 'https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc' | apt-key add - \
&& apt-get update \
&& apt-get install -y lua5.3 \
liblua5.3-0 \
liblua5.3-dev \
libfreeswitch-dev \
freeswitch \
freeswitch-conf-vanilla \
freeswitch-init \
freeswitch-lang-en \
freeswitch-meta-codecs \
freeswitch-mod-commands \
freeswitch-mod-console \
freeswitch-mod-curl \
freeswitch-mod-dialplan-xml \
freeswitch-mod-directory \
freeswitch-mod-dptools \
freeswitch-mod-event-socket \
freeswitch-mod-expr \
freeswitch-mod-format-cdr \
freeswitch-mod-httapi \
freeswitch-mod-local-stream \
freeswitch-mod-logfile \
freeswitch-mod-lua \
freeswitch-mod-native-file \
freeswitch-mod-odbc-cdr \
freeswitch-mod-opusfile \
freeswitch-mod-rtc \
freeswitch-mod-say-en \
freeswitch-mod-shout \
freeswitch-mod-sms \
freeswitch-mod-sndfile \
freeswitch-mod-sofia \
freeswitch-mod-syslog \
freeswitch-mod-tone-stream \
freeswitch-mod-translate \
freeswitch-mod-xml-curl \
freeswitch-music-default \
freeswitch-sounds-en-us-callie \
freeswitch-timezones

# BCG729
COPY --from=0 /var/src/mod_bcg729/mod_bcg729.so /usr/lib/freeswitch/mod/

# ODBC MySQL
RUN apt-get install -y unixodbc unixodbc-dev \
&& curl -Lk https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.19-linux-debian10-x86-64bit.tar.gz \
| tar -xzv --exclude 'bin/myodbc-installer' --strip 2 -C /usr/lib \
&& echo '[MySQL]\nDescription=ODBC for MySQL\nUsageCount=1\nDriver=/usr/lib/libmyodbc8w.so\nSetup=/usr/lib/libmyodbc8S.so\nDriver64=/usr/lib/libmyodbc5w.so\nSetup64=/usr/lib/libmyodbc8S.so\nFileUsage=1\n' > /etc/odbcinst.ini

2. MySQL

3. Redis

4. ZooKeeper (Java服务注册中心

5. OpenResty (录音存储)

6. JDK (Java服务运行环境