咱們用SIP 客戶端呼叫的時候,常常遇到複雜的網絡NAT環境,這個時候須要咱們安裝STUN Server / Turn Server 作穿透用。
這裏簡單記錄下 STUN Server的安裝啓動步驟:git
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.tgzide
tar zxvf stunserver-1.2.3.tgzui
cd stunserver
makecode
檢查環境 是否OK
./stuntestcodeserver
nohup /usr/local/stunserver/stunserver --mode basic --primaryinterface 172.31.78.132 &ssl
nohup ./stunserver --mode full --primaryinterface eth0 --altinterface eth0 &文檔
全功能模式 須要2個IP get
./stunserver --mode full --primaryinterface 47.52.229.136 --altinterface 172.31.78.132 openssl
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 查看 參數說明!