Configuration Files
(Added documentation for Configuration file directives) |
|||
(24 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Configuration files are text files with a structure similar to the Windows INI files composed of "sections" and "properties".<br> | |
+ | This files can be found in [[Paths and Directories|configuration files directory]]: '''conf.d''' that is in the directory where Yate was build.<br> | ||
+ | They are stored as *.conf.sample, you have to copy them as *.conf and edit them according to your needs.<br> | ||
+ | This files are used to pass variables to a running Yate instance. | ||
+ | |||
+ | === Configuration files location === | ||
+ | |||
+ | The configuration files are in conf.d directory that is found in the root directory where Yate was build. | ||
+ | |||
+ | More informations about the path for configuration files in function of how Yate was installed on different platforms, can be found in [[Paths and Directories]] page. | ||
=== Structure of configuration files=== | === Structure of configuration files=== | ||
Line 14: | Line 23: | ||
that continues over \ | that continues over \ | ||
several lines | several lines | ||
+ | |||
+ | ;[section3] | ||
+ | ;key=value | ||
Spaces surrounding section, keys and values are removed - in the example above the 2nd pair in section1 has key "'''key2'''" and value "'''value 2'''". | Spaces surrounding section, keys and values are removed - in the example above the 2nd pair in section1 has key "'''key2'''" and value "'''value 2'''". | ||
+ | |||
+ | Comments are the lines starting with ''';''' as you can see in the example as [section3]. | ||
Starting with '''SVN Rev. 2433''' (2009-01-13) very long values (like database queries) can be broken over several lines by placing a backslash at the end of line. In the example above | Starting with '''SVN Rev. 2433''' (2009-01-13) very long values (like database queries) can be broken over several lines by placing a backslash at the end of line. In the example above | ||
− | '''key'''" will have a value of "'''A very long value that continues over several lines'''" - note that spaces at start of continuation lines are also removed. | + | "'''key'''" will have a value of "'''A very long value that continues over several lines'''" - note that spaces at start of continuation lines are also removed. |
If you need to have a backslash at the end of a value just add one or more white spaces (blank or tab) after it. | If you need to have a backslash at the end of a value just add one or more white spaces (blank or tab) after it. | ||
+ | |||
+ | === Startup configuration file === | ||
+ | |||
+ | The main Yate startup configuration is stored in the file '''yate.conf'''.<br> | ||
+ | ''Please notice that "yate.conf" under Windows has to be named "yate-service.conf" if you are running it as a service or "yate-console.conf" while running the console version''. | ||
+ | In other words '''it has to match the executable file name or the file would not be loaded''' and default configuration will be applied. | ||
+ | |||
+ | File "yate.conf" controls the loading of [[Modules|modules]] in Yate.<br> | ||
+ | Loading of each module is controlled by the base name of each module in the [modules] section from yate.conf.<br> | ||
+ | The default is specified by '''modload''' in section [general] of the same file: | ||
+ | |||
+ | * if modload=yes (default) all modules are loaded if not disabled explicitly | ||
+ | * if modload=no only explicitly enabled modules are loaded | ||
+ | |||
+ | === Directives === | ||
+ | |||
+ | * '''[$require|$include|$includesilent <filename|directory>]''' | ||
+ | Include a specific configuration file or directory. Engine running parameters are replaced in value<br> | ||
+ | '''$includesilent''': do not warn when failed to open file<br> | ||
+ | '''$require''': signal failure in config load return<br> | ||
+ | * '''[$requiresection|$includesection|$includesectionsilent <section_name>]''' | ||
+ | Include the specified section. Engine running parameters are replaced in value<br> | ||
+ | These directives are handled inside sections only<br> | ||
+ | These directives are handled in included files also. They are applied after full file load<br> | ||
+ | '''$includesectionsilent:''' do not warn when failed to include the section (recursive include or not found)<br> | ||
+ | '''$requiresection:''' signal failure in config load return<br> | ||
+ | * '''[$enabled <value>]''' | ||
+ | Enable or disable parameters processing. File processing starts with enable=true<br> | ||
+ | This directive applies to currently processed file only (included files may use their own $enabled directives)<br> | ||
+ | Values:<br> | ||
+ | '''else''', '''toggle''': Toggle current enabled value<br> | ||
+ | '''elseif''': Disable parameter(s) processing only if currently enabled<br> | ||
+ | For all subsequent values Engine running parameters are replaced in value before evaluation<br> | ||
+ | '''$loaded <name>''': Evaluates to boolean true if given plugin <name> is loaded<br> | ||
+ | '''$unloaded <name>''': Evaluates to boolean true if given plugin <name> is not loaded<br> | ||
+ | '''$filled <str>''': Evaluates to boolean true if <str> is not empty<br> | ||
+ | '''$empty <str>''': Evaluates to boolean true if <str> is empty<br> | ||
+ | '''true|yes''': Boolean true<br> | ||
+ | '''false|no''': Boolean false<br> | ||
=== Configuration options=== | === Configuration options=== | ||
Line 29: | Line 82: | ||
'''See also''' | '''See also''' | ||
+ | * [[Modules]] | ||
* [[Telephony]] | * [[Telephony]] | ||
+ | |||
+ | [[Category:Administrate]] [[Category:Configuration files]] |
Latest revision as of 13:47, 19 December 2022
Configuration files are text files with a structure similar to the Windows INI files composed of "sections" and "properties".
This files can be found in configuration files directory: conf.d that is in the directory where Yate was build.
They are stored as *.conf.sample, you have to copy them as *.conf and edit them according to your needs.
This files are used to pass variables to a running Yate instance.
Contents |
[edit] Configuration files location
The configuration files are in conf.d directory that is found in the root directory where Yate was build.
More informations about the path for configuration files in function of how Yate was installed on different platforms, can be found in Paths and Directories page.
[edit] Structure of configuration files
The structure of the configuration files is similar to the Windows INI files. They are text files divided in sections each containing several key=value pairs:
[section1] key1=value 1 key2 = value 2 [section2] key = A very long value \ that continues over \ several lines ;[section3] ;key=value
Spaces surrounding section, keys and values are removed - in the example above the 2nd pair in section1 has key "key2" and value "value 2".
Comments are the lines starting with ; as you can see in the example as [section3].
Starting with SVN Rev. 2433 (2009-01-13) very long values (like database queries) can be broken over several lines by placing a backslash at the end of line. In the example above "key" will have a value of "A very long value that continues over several lines" - note that spaces at start of continuation lines are also removed.
If you need to have a backslash at the end of a value just add one or more white spaces (blank or tab) after it.
[edit] Startup configuration file
The main Yate startup configuration is stored in the file yate.conf.
Please notice that "yate.conf" under Windows has to be named "yate-service.conf" if you are running it as a service or "yate-console.conf" while running the console version. In other words it has to match the executable file name or the file would not be loaded and default configuration will be applied.
File "yate.conf" controls the loading of modules in Yate.
Loading of each module is controlled by the base name of each module in the [modules] section from yate.conf.
The default is specified by modload in section [general] of the same file:
- if modload=yes (default) all modules are loaded if not disabled explicitly
- if modload=no only explicitly enabled modules are loaded
[edit] Directives
- [$require|$include|$includesilent <filename|directory>]
Include a specific configuration file or directory. Engine running parameters are replaced in value
$includesilent: do not warn when failed to open file
$require: signal failure in config load return
- [$requiresection|$includesection|$includesectionsilent <section_name>]
Include the specified section. Engine running parameters are replaced in value
These directives are handled inside sections only
These directives are handled in included files also. They are applied after full file load
$includesectionsilent: do not warn when failed to include the section (recursive include or not found)
$requiresection: signal failure in config load return
- [$enabled <value>]
Enable or disable parameters processing. File processing starts with enable=true
This directive applies to currently processed file only (included files may use their own $enabled directives)
Values:
else, toggle: Toggle current enabled value
elseif: Disable parameter(s) processing only if currently enabled
For all subsequent values Engine running parameters are replaced in value before evaluation
$loaded <name>: Evaluates to boolean true if given plugin <name> is loaded
$unloaded <name>: Evaluates to boolean true if given plugin <name> is not loaded
$filled <str>: Evaluates to boolean true if <str> is not empty
$empty <str>: Evaluates to boolean true if <str> is empty
true|yes: Boolean true
false|no: Boolean false
[edit] Configuration options
See modules and features documentation for other configuration options.
See also