;
; Static extension configuration file, used by 静态分机配置文件,用于pbx_config 模块.配置所有的呼入呼出通话
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
;
; This configuration file is reloaded
; - With the "dialplan reload" command in the CLI 配置加载 CIL命令 dialplan reload 或者 reload(所有配置重新加载)
; - With the "reload" command (that reloads everything) in the CLI
The "General" category is for certain variables. "General"节是通用设置
[general]
;If static is set to no, or omitted, then the pbx_config will rewrite 如果static设置为no,或者忽略,当extensions被修改时,pbx_config会重写这个文件
; this file when extensions are modified. Remember that all comments 这个文件中的所有注释都会丢失
; made in the file will be lost when that happens.
;
; XXX Not yet implemented XXX 还没完成
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by 如果static=yes和writeprotect=no,你也可以通过CIL命令“dialplan save”保存dialplan
; CLI command "dialplan save" too
;
writeprotect=no
;
; things to do, it will terminate the call with BUSY, CONGESTION (忙,阻塞,挂机),这取决于Asterisk的最佳猜测.这个设置是默认设置
; or HANGUP depending on Asterisk's best guess. This is the default.
;
; If autofallthrough is not set, then if an extension runs out of 如果autofallthrough=no,如果超时,Asterisk会等待一个新的分机被拨打
; things to do, Asterisk will wait for a new extension to be dialed
; (this is the original behavior of Asterisk 1.0 and earlier). 这是在Asterisk1.0和更早的版本的原始设置
;
;autofallthrough=no
;
; If clearglobalvars is set, global variables will be cleared 如果clearglobalvars=yes,全局变量会在dailplan reload或者reload时,被清除和重新解析.
; and reparsed on an extensions reload, or Asterisk reload.
;
; If clearglobalvars is not set, then global variables will persist 如果clearglobalvars=no,全局变量在reload时会被保留,即使从extensions.conf或者
; through reloads, and even if deleted from the extensions.conf or 包含它(全局变量)的一个文件中删除,也会保留上次设置的值
; one of its included files, will remain set to the previous value.
;
; NOTE: A complication sets in, if you put your global variables into 注意:一个并发设置,如果你把你的全局变量设置在AEL文件中,而不是extensions.conf
; the AEL file, instead of the extensions.conf file. With clearglobalvars 文件.同时设置clearglobalvars=yes,“reload”会保留全局变量,因为在extensions.ael文件
; set, a "reload" will often leave the globals vars cleared, because it (.ael中保存全局变量)之后,让extensions.conf(.conf中没有[globals])加载,这并不罕见
; is not unusual to have extensions.conf (which will have no globals)
; load after the extensions.ael file (where the global vars are stored).
; So, with "reload" in this particular situation, first the AEL file will 因此,在这种特殊的情况下“reload”,首先AEL文件会清除,然后设置所有的全局变量,
; clear and then set all the global vars, then, later, when the extensions.conf 然后extensions.conf被重新加载,所有全局变量被清除,
; file is loaded, the global vars are all cleared, and then not set, because 所以全局变量无效,因为他们没有被保存在extensions.conf中.
; they are not stored in the extensions.conf file.
;
clearglobalvars=no
;
; If priorityjumping is set to 'yes', then applications that support 如果priorityjumping=yes,应用支持‘跳转’到一个不同的priority(优先级),
; 'jumping' to a different priority based on the result of their operations 这基于他们的业务操作的结果(这是向后兼容asterisk的pre-1.2版本)
; will do so (this is backwards compatible behavior with pre-1.2 releases
; of Asterisk). Individual applications can also be requested to do this 单独的application也可以通过在参数中设置“j”选项,来达到这种效果
; by passing a 'j' option in their arguments.
;
;priorityjumping=yes
;
; User context is where entries from users.conf are registered. The 用户上下文是在users.conf中注册的用户条目,默认值
; default value is 'default' 为default(也就是user.conf 的[default])
;
;userscontext=default
;
; You can include other config files, use the #include command 你可以包含其他配置文件,通过#include命令行(没有“;”)
; (without the ';'). Note that this is different from the "include" command 注意:这和“include”不同(“include”命令是把一个contexts包含到另外一个contexts)
; that includes contexts within other contexts. The #include command works #include 命令行在所有的asterisk配置文件中有效
; in all asterisk configuration files.
;#include "filename.conf" 这是三种不同的格式
;#include <filename.conf>
;#include filename.conf
;
; You can execute a program or script that produces config files, and they 你可以执行一个程序或者脚本生成配置文件,生成的配置会嵌入
; will be inserted where you insert the #exec command. The #exec command 到你所插入#exec 命令的地方,该命令也是在asterisk的所有配置文件中有效
; works on all asterisk configuration files. However, you will need to 但是,你要在asterisk. conf中设置“execincludes”选项来激活.否则他们被认为
; activate them within asterisk.conf with the "execincludes" option. They 是安全隐患
; are otherwise considered a security risk.
;#exec /opt/bin/build-extra-contexts.sh (这是调用脚本设置配置的实例)
;#exec /opt/bin/build-extra-contexts.sh --foo="bar"
;#exec </opt/bin/build-extra-contexts.sh --foo="bar">
;#exec "/opt/bin/build-extra-contexts.sh --foo=\"bar\""
;
; The "Globals" category contains global variables that can be referenced “Globals”节定义了全局变量,其可以在dialplan中通过GLOBAL拨号计划函数
; in the dialplan with the GLOBAL dialplan function: 来引用
; ${GLOBAL(VARIABLE)}
; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid 或者任何混合的Unix/Linux 环境变量可以被访问,
; Unix/Linux environmental variables can be reached with the ENV dialplan 通过ENV函数:${ENV(VARIABLE)}
; function: ${ENV(VARIABLE)}
[globals]
CONSOLE=Console/dsp ; Console interface for demo 控制台接口用于 演示
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=Zap/G2 ; Trunk interface Trunk接口(trunk通常被称为"中继(透传)"。在语音级应用的线路中,trunk一般 指"主干网络、电话干线",即两个交换局或交换机之间的连接电路或信道,它为两端