打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Freeswitch与外域IP对接之incoming call(彻底解决Rejected by acl “domains”. Falling back to Digest auth.)
专注三网融合之接入网/核心网等技术,音视频信令和媒体传输相关协议
专家前辈入驻,谈笑有鸿儒,往来无白丁,共同学习探讨IMS/IPPBX相关技术

欢迎同行加入IMS/IPPBX/VoIP/SIP QQ交流群:255404741(猛戳直接加群)



    SIP Trunk + DID 固然能够解决不同SIP域间呼叫互通的问题,但却不是唯一的解决方案,DID理解和配置都不易,且两域是something like从属的上下级的关系,满足不了独立的个体化需求。SIP域间直接的IP对接的方式就是解决此问题的。

Precondition说明:
本域:imsclub.com/122.112.86.102: 5060
测试分机:sip:1010@122.112.86.102

外域:42.96.203.28:5060
测试分机:sip:88885000@42.96.203.28

目的:实现注册在42.96.203.28的分机可以直接呼叫注册在imsclub.com/122.112.86.102上的分机,例如88885000拨1010进行直接呼叫(42.96.203.28的服务器需要配置相应的sip route到imsclub.com)。

public dialplan
呼叫路由conf/dialplan/public.xml中已默认配置transfer到相应的分机:

    <extension name="public_extensions">
      <condition field="destination_number" expression="^(10[01][0-9])$">
        <action application="transfer" data="$1 XML default"/>
      </condition>
    </extension>

acl 配置允许接受某域的请求

其实在conf/dilplan/default.xml开头有说明的:
<!--
    This context is usually accessed via authenticated callers on the sip profile on port 5060
    or transfered callers from the public context which arrived via the sip profile on port 5080.
    Authenticated users will use the user_context variable on the user to determine what context
    they can access. You can also add a user in the directory with the cidr= attribute acl.conf.xml
    will build the domains ACL using this value.
-->

确保acl.conf.xml配置允许接受某域的请求,否则会收到invite会被rejected:

sofia.c:8034 IP 42.96.203.28 Rejected by acl "domains". Falling back to Digest auth.


修改conf/autoload_configs/acl.conf.xml:

<network-lists>

<configuration>

     ......

    <list name="domains" default="deny">

      <!-- domain= is special it scans the domain from the directory to build the ACL -->

      <node type="allow" domain="$${domain}"/>

      <!-- Added by vinco zhang at 2014-06-01 for zhangwenge gateway -->

      <!--  why domain="42.96.203.28" doesn't work ? --> 

      <!-- <node type="allow" domain="42.96.203.28"/> -->

      <!-- use cidr= if you wish to allow ip ranges to this domains acl. -->

      <!-- <node type="allow" cidr="192.168.0.0/24"/> -->

     <!-- Added by vinco zhang at 2014-06-01 for zhangwenge gateway -->

      <node type="allow" cidr="42.96.203.28/32"/>

    </list>

  </network-lists>

</configuration>


acl配置生效

freeswitch@internal> reloadacl reloadxml

acl测试 & 呼叫测试
1. Test an IP address against one of your ACL's
freeswitch@internal> acl 42.96.203.28 domains
true
freeswitch@internal> 

2. 88885000 拨 1010 直接呼叫(注意不是输入sip uri 1010@122.112.86.102)

2014-06-02 18:30:18.681340 [INFO] mod_dialplan_xml.c:558Processing 88885000 <88885000>->1010 in context default

1010话机接起,这样外域对接的incoming call 成功了!抓包确认包确实是从 42.96.203.28:5060-->122.112.86.102:5060(而不是通过sip trunk到达122.112.86.102:5080)


鸣谢:感谢 张文阁 前辈提供对接的sip服务器

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Freeswitch与Freeswitch对接
《FreeSWITCH: VoIP实战》:SIP 模块 - mod_sofia
FreeSWITCH通过迅时网关连接PSTN
云服务器迁移,FreeSwitch要么无法拨打电话,要么拨通了没声音,客户IT部门没了,只能靠我排查
HTML5方式使用freeswitch——VERTO模块_freeswitch verto
ubuntu9.10安装openser sip服务器
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服