Skip to end of metadata
Go to start of metadata

To use a template when creating another section, simply put the template name in parentheses after the section heading name, as shown in the example below. If you want to inherit from multiple templates, use commas to separate the template names).

This works even when the section name referenced in parentheses is not defined as a template as in the case of the "not-a-template" section.

The newly-created section will inherit all the values and objects defined in the template(s), as well as any new settings or objects defined in the newly-created section. The settings and objects defined in the newly-created section override settings or objects of the same name from the templates. Consider this example:

The [test-three] section will be processed as though it had been written in the following way:

chan_sip Template Example

Here is a more extensive and realistic example from the chan_sip channel driver's sample configuration file.

  • No labels