Defined Type: asterisk::cfg::queue

Defined in:
manifests/cfg/queue.pp

Overview

Configure an asterisk queue

This resource presents a multitude of options, corresponding to different options that can be configured for queues. The README file presents links to resources that describe what all of the options do.

One parameter is an exception:

$ensure can be set to absent in order to remove a queue

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: present)
  • strategy (Boolean) (defaults to: false)
  • members (Array) (defaults to: [])
  • memberdelay (Integer) (defaults to: false)
  • penaltymemberslimit (Integer) (defaults to: false)
  • membermacro (Variant[Boolean, String]) (defaults to: false)
  • membergosub (Variant[Boolean, String]) (defaults to: false)
  • context (Variant[Boolean, String]) (defaults to: false)
  • defaultrule (Variant[Boolean, String]) (defaults to: false)
  • maxlen (Variant[Boolean, Integer]) (defaults to: false)
  • musicclass (Variant[Boolean, String]) (defaults to: false)
  • servicelevel (Variant[Boolean, String]) (defaults to: false)
  • weight (Variant[Boolean, Integer]) (defaults to: false)
  • joinempty (Array) (defaults to: [])
  • leavewhenempty (Array) (defaults to: [])
  • eventwhencalled (Boolean) (defaults to: false)
  • eventmemberstatus (Boolean) (defaults to: false)
  • reportholdtime (Boolean) (defaults to: false)
  • ringinuse (Boolean) (defaults to: false)
  • monitor_type (Boolean) (defaults to: false)
  • monitor_format (Array[String]) (defaults to: [])
  • announce (Boolean) (defaults to: false)
  • announce_frequency (Boolean) (defaults to: false)
  • min_announce_frequency (Boolean) (defaults to: false)
  • announce_holdtime (Boolean) (defaults to: false)
  • announce_position (Boolean) (defaults to: false)
  • announce_position_limit (Boolean) (defaults to: false)
  • announce_round_seconds (Boolean) (defaults to: false)
  • periodic_announce (Array[String]) (defaults to: [])
  • periodic_announce_frequency (Integer) (defaults to: false)
  • random_periodic_announce (String) (defaults to: false)
  • relative_periodic_announce (String) (defaults to: false)
  • queue_youarenext (String) (defaults to: false)
  • queue_thereare (String) (defaults to: false)
  • queue_callswaiting (String) (defaults to: false)
  • queue_holdtime (Integer) (defaults to: false)
  • queue_minute (String) (defaults to: false)
  • queue_minutes (String) (defaults to: false)
  • queue_seconds (Boolean) (defaults to: false)
  • queue_thankyou (Boolean) (defaults to: false)
  • queue_reporthold (Boolean) (defaults to: false)
  • wrapuptime (Integer) (defaults to: false)
  • timeout (Integer) (defaults to: false)
  • timeoutrestart (Integer) (defaults to: false)
  • timeoutpriority (Integer) (defaults to: false)
  • retry (Integer) (defaults to: false)
  • autofill (Boolean) (defaults to: false)
  • autopause (Boolean) (defaults to: false)
  • setinterfacevar (Boolean) (defaults to: false)
  • setqueuevar (Boolean) (defaults to: false)
  • setqueueentryvar (Boolean) (defaults to: false)


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'manifests/cfg/queue.pp', line 11

define asterisk::cfg::queue (
  Enum['present', 'absent'] $ensure   = present,
  Boolean $strategy = false,
  Array $members = [],
  Integer $memberdelay = false,
  Integer $penaltymemberslimit = false,
  Variant[Boolean, String] $membermacro = false,
  Variant[Boolean, String] $membergosub = false,
  Variant[Boolean, String] $context = false,
  Variant[Boolean, String] $defaultrule = false,
  Variant[Boolean, Integer] $maxlen = false,
  Variant[Boolean, String] $musicclass = false,
  Variant[Boolean, String] $servicelevel = false,
  Variant[Boolean, Integer] $weight = false,
  Array $joinempty = [],
  Array $leavewhenempty = [],
  Boolean $eventwhencalled = false,
  Boolean $eventmemberstatus = false,
  Boolean $reportholdtime = false,
  Boolean $ringinuse = false,
  Boolean $monitor_type = false,
  Array[String] $monitor_format = [],
  Boolean $announce = false,
  Boolean $announce_frequency = false,
  Boolean $min_announce_frequency = false,
  Boolean $announce_holdtime = false,
  Boolean $announce_position = false,
  Boolean $announce_position_limit = false,
  Boolean $announce_round_seconds = false,
  Array[String] $periodic_announce = [],
  Integer $periodic_announce_frequency = false,
  String $random_periodic_announce = false,
  String $relative_periodic_announce = false,
  String $queue_youarenext = false,
  String $queue_thereare = false,
  String $queue_callswaiting = false,
  Integer $queue_holdtime = false,
  String $queue_minute = false,
  String $queue_minutes = false,
  Boolean $queue_seconds = false,
  Boolean $queue_thankyou = false,
  Boolean $queue_reporthold = false,
  Integer $wrapuptime = false,
  Integer $timeout = false,
  Integer $timeoutrestart = false,
  Integer $timeoutpriority = false,
  Integer $retry = false,
  Boolean $autofill = false,
  Boolean $autopause = false,
  Boolean $setinterfacevar = false,
  Boolean $setqueuevar = false,
  Boolean $setqueueentryvar = false
) {

  # Ensure that we can iterate over some of the parameters.
  validate_array($members)
  validate_array($joinempty)
  validate_array($leavewhenempty)
  validate_array($monitor_format)
  validate_array($periodic_announce)

  asterisk::util::dotdfile {"queue_${name}.conf":
    ensure   => $ensure,
    dotd_dir => 'queues.d',
    content  => template('asterisk/snippet/queue.erb'),
    filename => "${name}.conf",
  }

}