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
分享到:
相关推荐
FreeSWITCH加载mod_ilbc时需要的mod_ilbc.la、mod_ilbc.so等文件
freeswitch对接讯飞语音识别模块
FreeSWITCH提供了一个xml_rpc组件,支持用Web的方式管理...需要FreeSWITCH已经加载mod_xml_rpc 然后就可以通过http://<freeswitch-server>:8080/portal打开管理页面。 建议通过官方文档了解mod_xml_rpc的配置方法。
mod_odbc_cdr是freeswitch的一个模块,该模块负责将话单实时写入mysql数据库。按照设计话单将在写入数据库失败时,写入本地文本文件,但是测试时发现该功能无法满足。经修改、测试无误,特此分享。
重新加载配置使其生效 要添加用户Jason,分机号是1020,只需要到conf/directory/default目录下,将1000.xml拷贝到1020.xml,然后打开1020.xml,将所有1000都改为1020,并把effective_caller_id_name的值改为Jason,...
4.3模块加载机制 5 4.4应用(Applications) 6 4.4.1电话生命周期 6 4.4.2 mod_conference模块 8 4.4.3 mod_voicemail模块 14 4.4.4 mod_commands 14 4.4.5 mod_dptools 17 4.5 自动语音识别/语音合成 20 4.6 编码...
freeswitch默认是加载mod_dialplan_xml,即配置文件是采用XML文件格式。XML文件格式非常灵活,而且可以用第三方软件编辑XML文件,而且也可以手工编辑因为XML非常简单。这也是freeswitch采用mod_dialplan_xml为默认...
这是一个非常小的图像,仅支持Dialplan和事件套接字(不编译任何脚本语言,例如lua或javascript),没有声音,并且模块最少(请参见下面的modules.conf.xml,其中显示了哪些内容)模块正在加载)。 如前所述,它...
配置文件是conf/autoload_configs/modules.conf.xml,连接分两种模式: inbound/outboundmod_event_socket 的默认加载模式是inbound,outbound模式需要在dialplan的配置文件中设置。mod_event_socktet的配置文件是...
该文件提供了自己的函数,函数和数据,这些函数和数据替代了verto.js中的代码,从而使该文件一旦添加即可独立运行,而无需处理多个文件。 覆盖verto.js中定义的“回调”对象。 覆盖verto挂断处理程序。
drachtio-freeswitch-modules 一个freeswitch模块的开源集合,主要是为使用应用程序而,但通常可用于通用freeswitch应用程序并对其有用。 这些模块已经过Freeswitch 1.8版... 添加一个Freeswitch API调用以使用Google
vos软交换、asterisk、freeswitch放到公网上,容易遭受外网攻击。可以使用该脚本防护,禁止国外地址访问攻击。 执行过程:把2个文件上传到服务器任意目录。执行:chomod +x myiptables.sh && nohup sh myiptables.sh...
一个freeswitch mrcp 模块使用的配置文件,直接拷到对于的目录下即可,然后配置ip地址,再重启freeswitch即可加载
用java实现本地语音实时采取,然后对接阿里AI语音识别实现,语音识别系统。并内部加载逻辑实现电脑语音控制