mod_xml_curl 动态加载号码,拨号方案
来源:互联网 发布:java返回值设置 编辑:程序博客网 时间:2024/06/06 09:01
mod_xml_curl:
此模块为与Asterisk realtime 机制差不多,可以通过此模让freeswitch 需要时动态访问外部数据库或Web Server.这样可以实现动态控制freeswitch核心。
比如 分机的添加可以通过在数据库配置,freeswitch通过此模块来加载分机。
通过此模块可以绑定:
1 .dialplan
<param name="gateway-url" value="http://localhost:8080" bindings="Dialplan"/>
第二步 修改 xml_curl.cong.xml
重点是 http://example1.com:80/fsapi 这个http接口
接口的详细规范请参考 http://wiki.freeswitch.org/wiki/Mod_xml_curl
此模块为与Asterisk realtime 机制差不多,可以通过此模让freeswitch 需要时动态访问外部数据库或Web Server.这样可以实现动态控制freeswitch核心。
比如 分机的添加可以通过在数据库配置,freeswitch通过此模块来加载分机。
通过此模块可以绑定:
1 .dialplan
<param name="gateway-url" value="http://localhost:8080" bindings="Dialplan"/>
每次呼叫,系统都会先访问8080
freeswitch安装完成后默认的是用静态配置文件的方式加载号码本
这对于动态注册的用户,无法实时同步
需要系统reloadxml后号码才能呼入
对于商业系统来说这是无法接受的
动态加载
动态方式其实很简单,开发一个http接口给fs调用
fs发去http请求传参数,接口返回http相应
这样就OK了
下面给出具体配置:
第一步 找到 modules.conf.conf 文件 去掉注释
- <load module="mod_xml_curl"/>
第二步 修改 xml_curl.cong.xml
重点是 http://example1.com:80/fsapi 这个http接口
- <configuration name="xml_curl.conf" description="cURL XML Gateway">
- <bindings>
- <!-- Ask example1.com for a dialplan config, if we get a valid response
- then don't continue onto example2.com. However if we don't get a valid
- response, then continue onto example2.com
- -->
- <binding name="dialplan">
- <param name="gateway-url" value="http://example1.com:80/fsapi" bindings="dialplan"/>
- </binding>
- <!-- This will only get called if example1.com returns an invalid or
- not found response. If this gateway also fails to return a valid
- configuration, then FreeSWITCH will look for the static configuration
- file on disk
- -->
- <binding name="dialplan backup">
- <param name="gateway-url" value="http://example2.com:80/fsapi" bindings="dialplan"/>
- </binding>
- <!-- Ask example1.com for a directory config, if not found then revert
- to disk
- -->
- <binding name="directory">
- <param name="gateway-url" value="http://example1:80/fsapi" bindings="directory"/>
- </binding>
- <!-- Ask example1.com for a configuration config, if not found then revert
- to disk
- -->
- <binding name="configuration">
- <param name="gateway-url" value="http://example1:80/fsapi" bindings="configuration"/>
- </binding>
- <!-- Ask example1.com for a phrases config, if not found then revert
- to disk
- -->
- <binding name="phrases">
- <param name="gateway-url" value="http://example1:80/fsapi" bindings="phrases"/>
- </binding>
- </bindings>
- </configuration>
接口的详细规范请参考 http://wiki.freeswitch.org/wiki/Mod_xml_curl
0 0
- mod_xml_curl 动态加载号码,拨号方案
- Asterisk 动态拨号方案配置说明
- asterisk1.8 拨号方案 mysql存储(动态)
- android 截获拨号号码
- 3G 拨号号码设置
- 国际号码拨号规则
- 【插件动态加载方案】
- LinearLayout动态加载Button方案
- 保留号码的方案
- Asterisk-sip(mysql)动态写入和拨号方案动态(Agi)
- TD拨号成功方案
- asterisk拨号方案基础
- Asterisk拨号方案一
- Asterisk拨号方案二
- 拨号方案基础
- symbian 打开拨号对话框并设置号码
- 从拨号音分析拨号号码
- Android 6.0拨号界面号码格式化
- ifconfig找不到命令
- 匿名映射
- Percision Recall F-Measure
- python中变量命名
- jquery和javascript的区别(常用方法比较)(修正)
- mod_xml_curl 动态加载号码,拨号方案
- 工控仪表控件Iocomp ActiveX系列教程:将控件集成到Web页面
- phonegap阻止键盘弹出导致的页面移动
- Cocos2d-x 3.1.1 移植出现error C1083: 无法打开包括文件:“extensions/ExtensionMacros.h”
- LeetCode | Merge Two Sorted Lists
- 成熟到优秀的瓶颈问题
- c3p0与DBCP连接池,造成的MySql 8小时问题解决方案
- Linux Eclipse C++开发环境配置 无图无真相,自己动手丰衣足食。
- @RequestMapping 用法详解之地址映射