Asterisk macros

来源:互联网 发布:西北师大知行学院吧 编辑:程序博客网 时间:2024/05/17 00:01

Asterisk macros

一种特殊类型的“contexts”是 macros,由用户自定义,命名前缀是“macro-”,这是可重用的模式,如同编程语言里的“过程”。

In Asterisk, a macro is a special kind of context which can be expanded within the definition of another context. Its name must begin with “macro-”. A macro is expanded by using the Macro command.

All the lines of the macro definition should only use the s extension; the actual extension will come from the line in the calling context on which the macro is expanded.

Within the macro definition, use the variable substitution ${MACRO_EXTEN} to refer to the actual extension.

原创粉丝点击