美文网首页
FreeSWITCH之-SBC

FreeSWITCH之-SBC

作者: 幽澜先生 | 来源:发表于2019-06-17 15:41 被阅读0次
image.png

基础配置

使用freeswitch源码带的sbc配置文件

修改external和internal的信令和媒体IP为实际IP;

如两端都不需要对呼叫进行鉴权,建议将vars.xml中internal的鉴权修改为false

使用iptables做白名单限制

拨号计划

/usr/local/freeswitch/conf/dialplan/public

00_sbc_to_int.xml

<include>
<extension name="sbc_ext_to_int"> <!-- 将来自172.16.10.41的呼叫送到网关ext_to_int-->
    <condition field="network_addr" expression="^172\.16\.10\.41$" break="on-false"/> 
    <condition field="destination_number" expression="^(\d+)$" break="on-true">
    <action application="bridge" data="sofia/gateway/ext_to_int/$1"/>
 </condition>
</extension>
</include>


01_sbc_to_ext.xml

<include>
<extension name="sbc_int_to_ext"> <!-- 将来自172.16.100.248的呼叫送到网关int_to_ext-->
    <condition field="network_addr" expression="^172\.16\.100\.248$" break="on-false"/>
    <condition field="destination_number" expression="^(\d+)$" break="on-true">
    <action application="bridge" data="sofia/gateway/int_to_ext/$1"/>
 </condition>
</extension>
</include>

网关

/usr/local/freeswitch/conf/sip_profiles/external/sbc_gw.xml 
<include>
<gateway name="int_to_ext">     
 <param name="proxy" value="172.16.10.41:5080"/>
 <param name="realm" value="172.16.10.41"/>
   <param name="register" value="false"/>
   <param name="rtp-autofix-timing" value="false"/>
   <param name="caller-id-in-from" value="true"/>
   <param name="from-domain" value="SBC_INT"/>
   <param name="profile" value="external"/>
   <param name="context" value="public"/>
</gateway>
</include>
/usr/local/freeswitch/conf/sip_profiles/internal/sbc_gw.xml
<include>
<gateway name="ext_to_int"> 
 <param name="proxy" value="172.16.100.248:5060"/>
 <param name="realm" value="172.16.100.248"/>
   <param name="register" value="false"/>
   <param name="rtp-autofix-timing" value="false"/>
   <param name="caller-id-in-from" value="true"/>
   <param name="from-domain" value="SBC_EXT"/>
   <param name="profile" value="internal"/>
   <param name="context" value="public"/>
</gateway>
</include>

相关文章

网友评论

      本文标题:FreeSWITCH之-SBC

      本文链接:https://www.haomeiwen.com/subject/gwgafctx.html