如何在 extensions.conf 中为添加站创建自定义 conf 文件,星号? [英] How to create custom conf file for add stations in extensions.conf, asterisk?

查看:31
本文介绍了如何在 extensions.conf 中为添加站创建自定义 conf 文件,星号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作项目是用 java & 编写的处理星号.通过 java 程序,我选择站号,例如 max no 90 或 900 或 9000.为了添加星号,我处理 3 个文件配置文件队列配置文件扩展配置文件在 extensions.conf 中,我完成了以下设置,专门用于快速添加站点.extenpatternmatchnew=yes

I am working project which written in java & handle asterisk. By java program i select station numbers like max no 90 or 900 or 9000. For adding in asterisk i handle 3 files sip.conf queues.conf extensions.conf In extensions.conf i done following setting specifically for adding stations quick. extenpatternmatchnew=yes

这样我可以在 20-30 秒内在 extensions.conf 中输入 90 个站8-9分钟内900站&5 小时内 9000但我得到的信息是我们可以根据需要包含任意数量的 conf 文件.#include另一个拨号计划 - 星号但我的问题是如果我想在 extensions.conf 文件中添加 9000 个站点 &通过#include 技术我可以把 temp1.conf, 0 到 1000 站temp2.​​conf,1001到2000站

By this i can enter 90 stations within 20-30sec in extensions.conf 900 stations within 8-9 min & 9000 withing 5 hours But i got info that we can include as many conf files as we want. #include another dialplan - asterisk but my question is If i want to add 9000 stations in extensions.conf file & by technique of #include Can i put temp1.conf, 0 to 1000 stations temp2.conf, 1001 to 2000 stations

tempN.conf, N to last-无站如果可以,那么temp.conf 的格式是什么?通过这样做,我可以减少在 extensions.conf、sip.cof、queues.conf 中添加大量站的时间吗?需要帮助请!

tempN.conf, N to last-No stations If i can then what is format of temp.conf? By doing this can i reduce time to adding large number of stations in extensions.conf,sip.cof, queues.conf? Need help please!

推荐答案

#include 语句 不会影响性能,但拨号计划可能更容易维护.

The #include statement doesn't affect performance, but the dial plan may be easier to maintain.

包含文件的格式

#include 语句替换拨号方案中该文件的内容.它必须像编写拨号计划一样编写.#include 语句 适用于所有星号配置文件.你也可以覆盖拨号方案部分,如果你#include底部的文件.

The #include statement replaces the Content of that File in the Dialplan. It has to be written like you would write the Dialplan. The #include statement works in all Asterisk configuration files. You could also overwrite Dialplan Sections, if you #include the File on the bottom.

示例

#include "headquarter_extensions_custom.conf"

[globals]
; ...

[default]
exten => s,1,Answer
exten => s,2,Playback(welcome-message)
; go to context defined in included file
exten => s,3,Goto(headquarter,s,1)    

编辑包含文件后,您必须重新加载配置,即.重新加载.

After editing the include file, you have to reload the Configuration, ie. reload.

替代方案

您还可以使用包含声明来包含上下文在拨号方案中.这允许编写标准上下文并使用上下文扩展它们
在自定义配置文件中定义(通过 #include).

You could also include Contexts, with the include Statement in the Dialplan. This allows to write standard Contexts and extend them with Contexts
defined in a Custom Configuration File (via #include).

include =>NameOfContext

示例

extensions.conf"的内容

Content of "extensions.conf"

#include "headquarter_extensions_custom.conf"
#include "localoffice_extensions_custom.conf"

[general]

[support]
include => localoffice
include => headquarter

headquarter_extensions_custom.conf"的内容:

Content of "headquarter_extensions_custom.conf":

[headquarter]
exten => 012345678,1,Dial(SIP/012345678)

localoffice_extensions_custom.conf"的内容:

Content of "localoffice_extensions_custom.conf":

[localoffice]
exten => 1234,1,Dial(SIP/2001)

模式

如果您可以用模式替换数百个扩展,请将数字块路由到目的地,即._123XX 本地办公室,_5[1-3]XX 总部办公室.

If you can replace hundreds of Extensions with Patterns, route Blocks of Numbers to Destinations, ie. _123XX LocalOffice, _5[1-3]XX HeadQuarterOffice.

可扩展性

您还可以在多个服务器上拆分您的星号配置.这意味着确定您的硬件和软件的限制,并通过 DNS、SIP 代理或切换到星号实时实现进行扩展.

You could also split your Asterisk Configurations on more than one Servers. That means determining limits of your Hard- and Software and scale through DNS, SIP-Proxy or switch to a asterisk Realtime Implemetation.

这篇关于如何在 extensions.conf 中为添加站创建自定义 conf 文件,星号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆