CentOS7 不好搞,但应客户要求,不得不搞
选择 rtpengine9.5.8 版本而不是更新的版本,肯定是有自己的考虑的
不废话了,直接上脚本:
#!/bin/bash# CentOS7 最小安装yum -y install epel-release
yum -y install git gcc-c++ glib2 glib2-devel gcc zlib zlib-devel openssl \openssl-devel pcre pcre-devel libcurl libcurl-devel xmlrpc-c \xmlrpc-c-devel hiredis-devel iptables-devel kernel kernel-devel \libpcap-devel spandsp spandsp-devel \ibevent-devel json-c-devel json-glib json-glib-devel gperf perl-IPC-Cmd \libiptcdata-devel libiptcdata-devel redis libwebsockets-devel libevent-devel \mariadb-develyum localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm
yum install -y ffmpeg-devel speex-devel speexdsp-devel libshout-devel libmpg123-devel lame-devel libsndfile-develcd /usr/src
git clone https://github.com/sipwise/rtpengine.git -b mr9.5.8
cd rtpengine/daemon
make
cp rtpengine /usr/bin
rtpengine -v
Version: git-mr9.5.8-b201589
rtpengine --codecs
PCMA: fully supported
PCMU: fully supported
G723: fully supported
G722: fully supported
QCELP: supported for decoding only
G729: supported for decoding only
G729a: supported for decoding only
speex: fully supported
GSM: fully supported
iLBC: not supported
opus: fully supported
vorbis: codec supported but lacks RTP definition
ac3: codec supported but lacks RTP definition
eac3: codec supported but lacks RTP definition
ATRAC3: supported for decoding only
ATRAC-X: supported for decoding only
EVRC: supported for decoding only
EVRC0: supported for decoding only
EVRC1: supported for decoding only
AMR: fully supported
AMR-WB: fully supported
telephone-event: fully supported
CN: fully supported
PCM-S16LE: codec supported but lacks RTP definition
PCM-U8: codec supported but lacks RTP definition
MP3: codec supported but lacks RTP definition
iptables extension 和 xt_RTPENGINE 暂时不弄
G.729 暂时不弄
参考链接:
https://blog.kolmisoft.com/rtpengine-install-on-centos-7/
查了下资料,bcg729 貌似不难搞定
yum install -y --nogpgcheck http://repo.okay.com.mx/centos/7/x86_64/release/bcg729-devel-1.0.4-5.el7.x86_64.rpm
make clean && make
rtpengine --codecs
G729: fully supported # 变了
G729a: fully supported # 变了