freeswitch xml_curl 模块管理acl/dialplan 等

1,在代码目录先编译

vim modules.conf

去掉comment

xml_int/mod_xml_cdr

make clean;make;make install

2,在安装目录加载xml_curl模块

vim conf/autoload_configs/modules.conf.xml

<load module="mod_xml_curl"/>

3,安装apache 并启动服务

yum  -y  install  httpd

systemctl  start httpd

/etc/httpd/conf/httpd.conf 设置端口为8080

#Listen 12.34.56.78:80
Listen 8080

4,vim conf/autoload_configs/xml_curl.conf.xml

添加下面的配置,由于我们的这个服务在本机

<param name="gateway-url" value="http://127.0.0.1:8080" bindings="configuration"/>

5,

在/var/www/html 目录下写入我们自己的主页 index.html

请把x.x.x.x换成你实际的allow or deny的IP

<document type="freeswitch/xml">
  <section name="configuration" description="Various Configuration">
<configuration name="acl.conf" description="Network Lists">
  <network-lists>
    <!-- 
         These ACL's are automatically created on startup.

         rfc1918.auto  - RFC1918 Space
         nat.auto      - RFC1918 Excluding your local lan.
         localnet.auto - ACL for your local lan.
         loopback.auto - ACL for your local lan.
    -->

    <list name="lan" default="allow">
      <node type="deny" cidr="x.x.x.x/32"/>
    </list>

    <!--
        This will traverse the directory adding all users 
        with the cidr= tag to this ACL, when this ACL matches
        the users variables and params apply as if they 
        digest authenticated.
    -->
    <list name="domains" default="deny">
      <!-- domain= is special it scans the domain from the directory to build the ACL -->
      <node type="allow" domain="$${domain}"/>
      <!-- use cidr= if you wish to allow ip ranges to this domains acl. -->
      <!-- <node type="allow" cidr="192.168.0.0/24"/> -->
      <node type="allow" cidr="x.x.x.x/32"/>

    </list>

  </network-lists>
</configuration>
  </section>
</document>

添加ACL然后在控制台输入reloadacl 看看是否生效

6.同理可以验证dialplan

7,最后可以用Java做一个服务去统一管理dialplan/ACL 等配置。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值