1、获取token
2、 通过包安装
echo "signalwire" > /etc/yum/vars/signalwireusername
echo "TOKEN" > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-*
systemctl enable freeswith
systemctl start freeswith
3、修改注册端口
vars.xml
<!-- Internal SIP Profile -->
<X-PRE-PROCESS cmd="set" data="internal_auth_calls=true"/>
<X-PRE-PROCESS cmd="set" data="internal_sip_port=10777"/>
<X-PRE-PROCESS cmd="set" data="internal_tls_port=10778"/>
<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=10888"/>
<X-PRE-PROCESS cmd="set" data="external_tls_port=10889"/>
<X-PRE-PROCESS cmd="set" data="external_ssl_enable=false"/>
4、修改sdp端口(如果不设置后开放防火墙,接通后听不到声音)
autoload_configs/switch.conf.xml
<!-- RTP port range -->
<param name="rtp-start-port" value="15000"/>
<param name="rtp-end-port" value="16000"/>
5、设置外部ip
vars.xml
<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=43.138.146.222"/>
<X-PRE-PROCESS cmd="stun-set" data="external_sip_ip=43.138.146.222"/>