我们用SIP 客户端呼叫的时候,经常遇到复杂的网络NAT环境,这个时候需要我们安装STUN Server / Turn Server 做穿透用。
这里简单记录下 STUN Server的安装启动步骤:
yum -y install gcc
yum -y install make
yum -y install boost* # For Boost
yum -y install openssl* # For OpenSSL
wget http://www.stunprotocol.org/stunserver-1.2.3.tgz
tar zxvf stunserver-1.2.3.tgz
cd stunserver
make
# 检查环境 是否OK
./stuntestcode
nohup /usr/local/stunserver/stunserver --mode basic --primaryinterface 172.31.78.132 &
nohup ./stunserver --mode full --primaryinterface eth0 --altinterface eth0 &
全功能模式 需要2个IP
./stunserver --mode full --primaryinterface 47.52.229.136 --altinterface 172.31.78.132
nohup ./stunserver --mode basic --primaryinterface 172.31.78.132
基本模式 1个IP
./stunserver --mode basic --primaryinterface 47.52.229.136 --altinterface 172.31.78.132
./stunserver --help 查看 参数说明!
文档:http://zengqf.gitee.io/ifreeswitchgui/
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有