Fedora35编译FS_1.10.8


一、系统准备

防火墙

systemctl stop firewalld

systemctl disable firewalld

SSH

vi /etc/ssh/sshd_config 打开 port 22

#systemctl enable sshd.service

#systemctl start sshd.service

 

二、  安装依赖

yum install -y autoconf

yum install -y automake

yum install -y libtool

yum install -y gcc-c++

yum install -y libtiff-devel

yum install -y libjpeg-devel

yum install -y openssl-devel

yum install -y sofia-sip

yum install -y sofia-sip-devel

yum install -y zlib-devel

yum install -y sqlite-devel

yum install -y libcurl-devel

yum install -y pcre-devel

yum install -y speex-devel

yum install -y speexdsp-devel

yum install -y ldns-devel

yum install –y cmake

yum install -y libuuid-devel

yum install -y libatomic

yum groupinstall  -y  "Development Tools"

yum install -y libedit-devel

yum install -y yasm

yum install -y lua-devel

yum install -y opus-devel

yum install -y postgresql-devel

yum install -y libpq-devel

yum install -y libsndfile-devel

三,下载源码,编译

freeswitch 当然要下最新版本的

git clone https://github.com/signalwire/freeswitch.git freeswitch

git clone https://github.com/freeswitch/spandsp.git

安装到 /usr/local/lib/pkgconfig

 

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}

git clone https://github.com/freeswitch/sofia-sip.git

git clone https://github.com/signalwire/libks.git

git clone https://github.com/signalwire/signalwire-c.git

cp /usr/lib/pkgconfig/ libks.pc  /usr/local/lib/pkgconfig/

wget -c http://files.freeswitch.org/downloads/libs/libav-12.tar.bz2

tar xjvf libav-12.tar.bz2

./configure --disable-static --enable-shared --enable-pic

make CXXFLAGS="-fPIC"

 然后把freeswitch下进行configure  就可以了。

四,声音

make sounds-install

make moh-install

五 快捷

ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/

六,编译过程需要改代码:

1. src/switch_core_media.c:2246:111: error: argument 2 of type ‘switch_core_media_flag_t[15]’ with mismatched bound [-Werror=array-parameter=]

 2246 | SWITCH_DECLARE(void) switch_media_handle_set_media_flags(switch_media_handle_t *smh, switch_core_media_flag_t flags[SCMF_MAX])

e  switch_media_handle_set_media_flags(switch_media_handle_t *smh, switch_core_media_flag_t flags[])

2. src/switch_rtp.c:4530:117: error: argument 5 of type ‘switch_rtp_flag_t[54]’ with mismatched bound [-Werror=array-parameter=]

 4530 |                                                                                                   switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool)

e  switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool

3. src/switch_rtp.c:4749:109: error: argument 8 of type ‘switch_rtp_flag_t[54]’ with mismatched bound [-Werror=array-parameter=]

 4749 |                                                                                           switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool

e  switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID], char *timer_name, const char **err, switch_memory_pool_t *pool

Makefile:1477: *** You must install libavformat-dev and libswscale-dev to build mod_av.  Stop

      

fs