在Google Cloud VM上安装Freeswitch

时间:2018-02-24 22:28:10

标签: google-cloud-platform sip telephony freeswitch sip-server

我已在Google Cloud VM上安装了Freeswitch(centos7)。这只是一个测试实例。

尚未对配置进行任何更改。

服务器启动正常但我在测试时无法获得任何音频。 已根据链接打开防火墙:https://freeswitch.org/confluence/display/FREESWITCH/Firewall

freeswitch日志显示进入的呼叫和发出的音频。

有人能够提出任何建议来帮我解决这个问题吗?

此致 VM

2 个答案:

答案 0 :(得分:1)

看了一下之后,看起来在云提供商上有一些运行Freeswitch的问题。到目前为止,有关于running it on Amazon EC2的官方文档,它说它没有得到官方支持。我会尝试将其改编为Google Cloud Platform,也许这对您有用。

1 - 创建Debian Jesse 8实例

gcloud compute instances create freeswitch-test --image-family debian-8 --image-project debian-cloud --tags=freeswitch

2 - 创建所需的防火墙规则以打开其运行所需的端口。从文档看起来应该是UPD:16384-32768,TCP:8081-8082,TCP/UDP:5060,UDP:4569,TCP/UDP:8000

 gcloud compute firewall-rules create freeswitch-policy --allow UDP:16384-32768,TCP:8081-8082,TCP:5060,UDP:5060,UDP:4569,TCP:8000,UDP:8000 --source-ranges=0.0.0.0/0 --target-tags=freeswitch

然后你希望freeswitch能够在启动时知道它的外部IP。我认为最好的方法可能是保留静态IP,然后创建转发规则:

gcloud compute addresses create freeswitch-ip --region us-east1
gcloud compute target-pools create freeswitch --region us-east1
gcloud compute target-pools add-instances freeswitch --instances freeswitch-test --instances-zone us-east1-b
gcloud compute forwarding-rules create freeswitch-forwarding --address freeswitch-ip --region us-east1 --target-pool   freeswitch

现在在freeswitch上配置静态IP:

conf/vars.xml

<X-PRE-PROCESS cmd="exec-set" data="bind_server_ip=[YOUR-IP]">
<X-PRE-PROCESS cmd="exec-set" data="[YOUR-IP]"/>
<X-PRE-PROCESS cmd="exec-set" data="[YOUR-IP]"/>



conf/sip_profiles/internal.xml

<param name="aggressive-nat-detection" value="true"/>
<param name="multiple-registrations" value="true"/>
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
<param name="NDLB-received-in-nat-reg-contact" value="true"/>
<param name="NDLB-force-rport" value="true"/>
<param name="NDLB-broken-auth-hash" value="true"/>
<param name="enable-timer" value="false"/>
<param name="auth-calls" value="true"/>


conf/sip_profiles/external.xml


<param name="aggressive-nat-detection" value="true"/>
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
<param name="NDLB-force-rport" value="true"/>


conf/autoload/switch.conf.xml
=============================


<param name="rtp-start-port" value="16384"/>
<param name="rtp-end-port" value="32768"/>

答案 1 :(得分:0)

我尝试:

Sofia外部IP配置

您不必对Sofia个人资料进行任何更改。 FreeSWITCH自动NAT功能将自动处理此问题。但是,如果要手动执行此操作,请编辑sip_profiles / internal.xml文件,并将auto-nat替换为ext-rtp-ip和ext-sip-ip参数中的外部IP地址。