Defined Type: asterisk::iax

Defined in:
manifests/iax.pp

Summary

Configure an IAX2 context and its options

Overview

A context named after $name will be created. You can configure iax2 users, peers or the special context callnumberlimits that lets you override limits to call numbers per IP address range.

TODO:

list all options as parameters instead of using textual contents

Parameters:

  • ensure (Any) (defaults to: present)

    Set this to absent to remove the configuration file.

  • source (Any) (defaults to: undef)

    Puppet file source where the contents of the file can be found.

  • content (Optional[String]) (defaults to: undef)

    Textual contents of the file being created. This option is mutually exclusive with $source. The content is placed after the name of the context (which is $name) and so it should not include the context name definition.

See Also:



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'manifests/iax.pp', line 21

define asterisk::iax (
  $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 { "iax_${name}.conf":
    ensure   => $ensure,
    dotd_dir => 'iax.d',
    source   => $source,
    content  => $real_content,
    filename => "${name}.conf",
  }

}