freeswitch搭建

1、获取token

https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/HOWTO-Create-a-SignalWire-Personal-Access-Token_67240087/#attachments

2、 通过包安装

https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/Linux/CentOS-7-and-RHEL-7_10289546#installing-from-rpm-packages

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"/>

6、重启fs

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注