Defined Type: asterisk::extensions
- Defined in:
- manifests/extensions.pp
Summary
Configure a dialplan context and extensions within that contextOverview
This can be used to configure your different contexts with extensions, but it can also be used to create macros that can be called in other contexts.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'manifests/extensions.pp', line 22
define asterisk::extensions (
$ensure = present,
$source = undef,
# Only enforcing type for this param since we're using its value
Optional[String] $content = undef
) {
if $content !~ Undef {
$real_content = "[${name}]\n${content}"
}
else {
$real_content = $content
}
asterisk::dotd::file { "extensions_${name}.conf":
ensure => $ensure,
dotd_dir => 'extensions.d',
source => $source,
content => $real_content,
filename => "${name}.conf",
}
}
|