
正文
Freeswitch Tutorial
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
I. Install Freeswitch
1) FreeSWITCH Explained
https://freeswitch.org/confluence/
https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7+and+RHEL+7
https://freeswitch.org/confluence/display/FREESWITCH/CentOS+7
2) step by step:
Install FreeSWITCH 1.6.0 on CentOS 7 (fresh installation):Note: Everything below is run inside CentOS 7 terminal as "root" user (via "su -" command)1) Make sure yum update is run and CentOS is up-to-date
2) {optional} inside Terminal window select Edit Profile Preferences and select "Use custom default terminal size" and make it 160 x 60. Close terminal and re-open for the change to take affect.
3) yum -y install git
4) yum -y install epel-release
5) rpm -Uvh http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm
6) yum -y install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel
7) yum -y install libyuv-devel opus-devel libvpx-devel libvpx2* libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel
8) cd /usr/local/src
9) git clone -b v1.6 https://github.com/signalwire/freeswitch.git
10) cd /usr/local/src/freeswitch
11) ./bootstrap.sh
12) ./configure
13) make
14) make install
15) make cd-sounds-install
16) make cd-moh-install
17) cd /usr/local/freeswitch/conf
18) vi vars.xml
Change: <X-PRE-PROCESS cmd="set" data="default_password=1234"/> {!!set it to something different!!}
Save and close (<Esc> :wq!)
19) cd /usr/local/freeswitch/conf/sip_profiles
20) mv internal-ipv6.xml internal-ipv6.xml.removed {disables ipv6 support}
21) mv external-ipv6.xml external-ipv6.xml.removed {disables ipv6 support}
22) cd /usr/local/freeswitch/bin
23) ./freeswitch -nonat -nonatmap
24) ... to exit from FreeSWITCH console
3) Quickly install
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswitch
freeswitch
4) Source install
freeswitch_v1.6_install_centos7.6.sh
#
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-releaseyum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel db-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 python26-devel python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel#
cd /usr/local/src
git clone -b v1.6 https://github.com/signalwire/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure
make -j
make -j install#
make -j cd-sounds-install
make -j cd-moh-install#
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/#
#freeswitch -nc
freeswitch#
#netstat -anp|grep 5060#
#fs_cli
freeswitch_v1.8_install_centos7.2.sh
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm epel-releaseyum install -y git alsa-lib-devel autoconf automake bison broadvoice-devel bzip2 curl-devel libdb4-devel e2fsprogs-devel erlang 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 python-devel soundtouch-devel speex-devel sqlite-devel unbound-devel unixODBC-devel wget which yasm zlib-devel libshout-devel libmpg123-devel lame-develyum remove cmake
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 installcd /usr/local/src
yum install libatomic
git clone https://github.com/signalwire/libks.git
cd libks
cmake .
make
make installcd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c/
cmake .
make
make installln -sf /usr/local/lib64/pkgconfig/signalwire_client.pc /usr/lib64/pkgconfig/signalwire_client.pccd /usr/local/src/
if false;then
git clone https://github.com/signalwire/freeswitch.git freeswitch
cd freeswitch
./bootstrap.sh
else
wget http://files.freeswitch.org/releases/freeswitch/freeswitch-1.8.5.tar.gz
tar vzxf freeswitch-1.8.5.tar.gz
cd freeswitch-1.8.5
fi
./configure
make
make install
II. Configuring Freeswitch Parameters
1) Change password
cd /usr/local/freeswitch/conf
vi vars.xml
Change: <X-PRE-PROCESS cmd="set" data="default_password=1234"/> {!!set it to something different!!}
Save and close (<Esc> :wq!)
2) Delete IPv6
cd /usr/local/freeswitch/conf/sip_profiles
mv internal-ipv6.xml internal-ipv6.xml.removed {disables ipv6 support}
mv external-ipv6.xml external-ipv6.xml.removed {disables ipv6 support}
3) Configuring ext-rtp-ip
vi conf/autoload_configs/verto.conf.xml
<param name="ext-rtp-ip" value=""/>vi conf/sip_profiles/internal.xml
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>vi conf/sip_profiles/external.xml
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>
4) Configuring SIP Port
vi /usr/local/freeswitch/conf/vars.xml
<X-PRE-PROCESS cmd="set" data="internal_auth_calls=true"/>
<X-PRE-PROCESS cmd="set" data="internal_sip_port=5060"/>
<X-PRE-PROCESS cmd="set" data="internal_tls_port=5061"/>
<X-PRE-PROCESS cmd="set" data="internal_ssl_enable=false"/>
<!-- External SIP Profile -->
<X-PRE-PROCESS cmd="set" data="external_auth_calls=false"/>
<X-PRE-PROCESS cmd="set" data="external_sip_port=5080"/>
<X-PRE-PROCESS cmd="set" data="external_tls_port=5081"/>
<X-PRE-PROCESS cmd="set" data="external_ssl_enable=false"/>
5) Configuring loglevel
vi /usr/local/freeswitch/conf/vars.xml
<!-- various debug and defaults -->
<X-PRE-PROCESS cmd="set" data="call_debug=false"/>
<X-PRE-PROCESS cmd="set" data="console_loglevel=info"/>
<X-PRE-PROCESS cmd="set" data="default_areacode=918"/>
<X-PRE-PROCESS cmd="set" data="default_country=US"/>
6) fs_cli.c:1673 main() Error Connecting []
vi /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml
<param name="listen-ip" value="::"/> 改为 <param name="listen-ip" value="0.0.0.0"/>
7) Startup freeswitch
cd /usr/local/freeswitch/bin
./freeswitch -nonat -nonatmap
.=============================================================.
| _____ ______ _____ _____ ____ _ _ |
| | ___| __ ___ ___/ ___\ \ / /_ _|_ _/ ___| | | | |
| | |_ | '__/ _ \/ _ \___ \\ \ /\ / / | | | || | | |_| | |
| | _|| | | __/ __/___) |\ V V / | | | || |___| _ | |
| |_| |_| \___|\___|____/ \_/\_/ |___| |_| \____|_| |_| |
| |
.=============================================================.
| Anthony Minessale II, Michael Jerris, Brian West, Others |
| FreeSWITCH (http://www.freeswitch.org) |
| Paypal Donations Appreciated: paypal@freeswitch.org |
| Brought to you by ClueCon http://www.cluecon.com/ |
.=============================================================.
.=======================================================================================================.
| ____ _ ____ |
| / ___| |_ _ ___ / ___|___ _ __ |
| | | | | | | |/ _ \ | / _ \| '_ \ |
| | |___| | |_| | __/ |__| (_) | | | | |
| \____|_|\__,_|\___|\____\___/|_| |_| |
| |
| _____ _ _ ____ __ |
| |_ _|__| | ___ _ __ | |__ ___ _ __ _ _ / ___|___ _ __ / _| ___ _ __ ___ _ __ ___ ___ |
| | |/ _ \ |/ _ \ '_ \| '_ \ / _ \| '_ \| | | | | | / _ \| '_ \| |_ / _ \ '__/ _ \ '_ \ / __/ _ \ |
| | | __/ | __/ |_) | | | | (_) | | | | |_| | | |__| (_) | | | | _| __/ | | __/ | | | (_| __/ |
| |_|\___|_|\___| .__/|_| |_|\___/|_| |_|\__, | \____\___/|_| |_|_| \___|_| \___|_| |_|\___\___| |
| |_| |___/ |
| _____ _ _ |
| | ____|_ _____ _ __ _ _ / \ _ _ __ _ _ _ ___| |_ |
| | _| \ \ / / _ \ '__| | | | / _ \| | | |/ _` | | | / __| __| |
| | |___ \ V / __/ | | |_| | / ___ \ |_| | (_| | |_| \__ \ |_ |
| |_____| \_/ \___|_| \__, | /_/ \_\__,_|\__, |\__,_|___/\__| |
| |___/ |___/ |
| ____ _ ____ |
| __ ____ ____ __ / ___| |_ _ ___ / ___|___ _ __ ___ ___ _ __ ___ |
| \ \ /\ / /\ \ /\ / /\ \ /\ / / | | | | | | |/ _ \ | / _ \| '_ \ / __/ _ \| '_ ` _ \ |
| \ V V / \ V V / \ V V / _ | |___| | |_| | __/ |__| (_) | | | | _ | (_| (_) | | | | | | |
| \_/\_/ \_/\_/ \_/\_/ (_) \____|_|\__,_|\___|\____\___/|_| |_| (_) \___\___/|_| |_| |_| |
| |
.=======================================================================================================.
III. book && wiki
http://www.freeswitch.org.cn/tags.html#book
FreeSWITCH 实战
http://www.freeswitch.org.cn/2011/10/29/freeswitch-shi-zhan.html
1) 多台 FreeSWITCH 服务器级联
http://www.freeswitch.org.cn/2012/03/28/duo-tai-freeswitch-fu-wu-qi-ji-lian.html
2) 测试 FreeSWITCH 视频会议
http://www.dujinfang.com/2011/04/24/ce-shi-freeswitch-shi-pin-hui-yi.html
3) 第七章 SIP 模块 - mod_sofia
http://www.freeswitch.org.cn/2010/08/03/di-qi-zhang-sip-mo-kuai-mod_sofia.html
IV. 第三方应用
1) 踩坑n次,终于安装成功 ,CentOS 7 安装FreeSwitch 1.8.5
https://blog.csdn.net/zhuimeng11_/article/details/92819658
Ubuntu 16.04 install FreeSWITCH v1.8
https://blog.csdn.net/IDreamsComeTrue/article/details/88235215
2) 电话会议
https://www.cnblogs.com/chendaoyin/archive/2012/09/14/2685423.html
3) FreeSwitch之拨号计划~简单例子
FreeSwitch之拨号计划~简单例子(一)
FreeSwitch之拨号计划~简单例子(二)
FreeSwitch之拨号计划~简单例子(三)
4)A great GUI manager for FreeSwitch
https://github.com/JoneXiong/YouPBX
5)FreeSWITCH 语音识别 ASR 接口介绍 科大讯飞 百度 阿里云 等接口实现
https://blog.csdn.net/iyaosan/article/details/79115010
#freeswitch配置之nat穿越
https://blog.csdn.net/hellochenyi/article/details/78769932
https://blog.csdn.net/liang12360640/article/details/38110095
6) freeswitch集成ffmpeg
http://www.voidcn.com/article/p-utpvdhrn-tk.html
Freeswitch如何在Linux/Mac/Win创建用户以及批量创建用户
https://www.wsonh.com/article/40.html
FreeSWITCH默认号码
默认号码及说明
号码说明
9664保持音乐
9191注册ClueCon
9192在log中显示Channel
9195echo,回音测试,延迟5秒
9196echo,回音测试
9197milliwatte extension, 铃音生成
9198TGML 铃音生成实例
9180铃音测试,使用远端生成的回铃音
9181铃音测试,产生英式铃音
9182铃音测试。使用音乐当铃音,彩铃
9183先应答,然后发送英式彩铃
9184先应答,然后发送音乐彩铃
9178发传真
9179收传真
5000实例IVR
4000听取语音信箱
33xx电话会议,48kHz(其中xx可为00~99,下同)
32xx电话会议,32kHz
31xx电话会议,16kHz
30xx电话会议,8kHz
2000-2002呼叫组
1000-1019默认分机号(密码默认为1234)






