knowledge/freeswitch/搭建STUN服务.md
2021-11-25 15:51:36 +08:00

54 lines
729 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 搭建STUN服务
---
> 以centos7为例
* github地址
```url
https://github.com/jselbie/stunserver
```
* STUNServer官网
```url
http://www.stunprotocol.org/
```
## 部署过程
```bash
# 安装依赖
yum install gcc g++ make
yum install boost-devel
yum install openssl-devel
# 下载安装包
cd /usr/local/src
curl -OL http://www.stunprotocol.org/stunserver-1.2.16.tgz
# 解压
tar xvf stunserver-1.2.16.tgz
# 安装
cd stunserver
make
# 校验
./stuntestcode
# 运行
./stunserver &
```
## 防火墙
```bash
firewall-cmd --permanent --add-port="3478/udp"
```
## 配置freeswitch
```bash
cd /usr/local/freeswitch/conf
vim vars.xml
```
把stun-set中的服务地址换成刚配置好的stun服务器地址