1.3 预处理指令 - 文件导入、宏定义、环境变量读取
预处理指令主要的目的是方便脚本维护,方便脚本在不同环境下运行。 预处理之后,脚本才会开始解析。 1. include_file include_file "path_to_file" Include the content of the file in config before parsing. path_to_file must be a static string. Including file operation is done at startup. If you change the content of included file, you have to restart the SIP server to become effective. 路径必须是静态,修改脚本要重启 The path_to_file can be relative or absolute. If it is not absolute path, first attempt is to locate it relative to current directory, and if fails, relative to directory of the file that includes it. There is no restriction where include can be used or what can contain - any part of config file is ok. There is a limit of maximum 10 includes in depth, otherwise you can use as many includes as you want. Reporting of the cfg file syntax errors prints now the file name for easier troubleshooting. ...