Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 6.0.0
Start using this module
Add this module to your Puppetfile:
mod 'LeLutin-asterisk', '2.0.3'
Learn more about managing modules with a PuppetfileDocumentation
Puppet module for Asterisk
To install Asterisk on a server, simply use the following:
include asterisk
This will install a plain version of Asterisk without any extra features enabled.
Users that are upgrading (e.g. switching or merging to current master) should consult the section named Upgrade notices near the end.
Requirements
In order to use this module, you need the stdlib module from:
https://github.com/puppetlabs/puppetlabs-stdlib
You should also make sure that augeas is installed since it is used to enable
the service in /etc/default/asterisk
.
Reference reading
Some good references to consult when it comes to Asterisk configuration are:
- The most up to date reference and documentation for all configurations can
be found in upstream default configuration files. They can also be found in
the
asterisk-doc
debian package. - Online version of "Asterisk: The Definitive Guide" 3rd edition. This is definitely the best and most up to date documentation available. A must read for anyone that is configuring a PBX with Asterisk. Consult this reference if you need more information about any options that can be configured with this module. The web site mentions a 4th edition was released but it is not available online: http://asteriskdocs.org/
- A good reference for VoIP and Asterisk (some information might be outdated): http://www.voip-info.org/
- The Asterisk project wiki: https://wiki.asterisk.org/
Configuring Asterisk
Parameters to the asterisk class
The main class has a couple of parameters that determine what is managed and how general configuration is set.
-
$manage_service
is a boolean that determines whether puppet will ensure that the service is running. Default value is true. -
$manage_package
is a boolean that determines whether puppet will ensure that the package is installed. Default value is true. -
$package_name
can be used to override the name of the package that installs Asterisk. Default value is "asterisk". -
$service_name
can be used to override the name of the Asterisk service. Default value is "asterisk". -
$confdir
can be used to override the path to the Asterisk configuration. Default value is "/etc/asterisk". -
$iax_general
is a hash of global options for IAX2. See section IAX2 Options. -
$sip_general
is a hash of global options for SIP. See section SIP Options. -
$voicemail_general
is a hash of global options for voicemail. See section Voicemail Options. -
$extensions_general
is a hash of global options for extensions. See section Extensions Options. -
$agents_multiplelogin
and$agents_global
are detailed in the Agents Options section. -
$features_general
and$featuremap
are detailed in the Features Options section. -
$queues_general
is detailed in the Queues Options section. -
$modules_autoload
,$modules_noload
,$modules_load
and$modules_global
are detailed in the Modules section. -
$manager_enable
,$manager_port
and$manager_bindaddr
are detailed in the Manager Options section.
Setting options with the $xyz_general or $xyz_global parameters
Asterisk has lots and lots of configuration variables that can be set in different files.
As you will see in some of the following configuration sections, some configuration files will be customizable through option hashes. The format of those hashes is always the same and looks like the following, where xyz would match the name of the configuration file:
$xyz_general = {
'configuration-option1' => 'value1',
'allow' => ['list-value1', 'list-value2'],
#[...]
}
In order to simplify the module, we're actually not validating that the options passed in are valid ones and expect this validation to be done by the user.
We encourage users to use strings as hash keys as in the example above since some Asterisk options have dashes in their name and dashes are prohibited in puppet DSL symbols.
Some options should always be arrays: the option can be specified in the configuration file more than once to declare more values. Those options will always be set in the hashes that define default values (see in each section below) as arrays either containing a number of strings, or being empty. The module enforces that those options be arrays since it needs to iterate over them in templates. Empty arrays mean that the option should not appear in the configuration file.
Default values are taken from Debian's default configuration files.
Keys that are present in the option hash paramters to the asterisk
class will
override the default options (or set new ones for options that are not present
in the default option hash). This lets you use all the default values but
change only a couple of values.
Source or content
Most of the defined types that drop a configuration file in a .d directory can either take a puppet source specification (of the form 'puppet:///modules/...' or a textual content.
The puppet source specification is always used with the source
parameter and
textual content with the content
parameter.
When using a puppet source specification the user has complete control over the contents of the configuration file. When textual content is used, the contents will usually be added after a line that defines a configuration section (e.g. a line of the form '[section]').
source
and content
are always mutually exclusive.
IAX2
The asterisk::iax
defined type helps you configure an IAX2 channel. source
or content
can be used with this type.
asterisk::iax { '5551234567':
source => 'puppet:///modules/site_asterisk/5551234567',
}
The asterisk::registry::iax
defined type is used to configure an IAX2
registry. All parameters (except for ensure) are mandatory. For example:
asterisk::registry::iax { 'providerX':
server => 'iax.providerX.com',
user => 'doyoufindme',
pass => 'attractive?',
}
IAX2 Options
If you are using the IAX2 protocol, you'll want to set some global
configuration options. For passing in settings, you need to send a hash to the
asterisk
class with the iax_general
parameter.
Here is the default hash with the default values, as defined in params.pp:
$iax_general = {
'allow' => [],
'disallow' => ['lpc10'],
'bandwidth' => 'low',
'jitterbuffer' => 'no',
'forcejitterbuffer' => 'no',
'autokill' => 'yes',
'delayreject' => 'yes',
}
SIP
You can configure SIP channels with the asterisk::sip
defined type. source
and content
can be used with this type.
asterisk::sip { '1234':
ensure => present,
secret => 'blah',
context => 'incoming',
}
You can also use the template_name
argument to either define a template, or
make the channel definition inherit from a template.
To define a template, set template_name
to '!':
asterisk::sip { 'corporate_user':
context => 'corporate',
type => 'friend',
# ...
template_name => '!',
}
If inheriting from a template, set template_name
to
the name of the template from which the channel is inheriting options.
asterisk::sip { 'hakim':
secret => 'ohnoes!',
template_name => 'corporate_user',
}
The defined type asterisk::registry::sip
lets you configure a SIP registry.
The server
and user
paramters are mandatory.
asterisk::registry::sip { 'providerX':
server => 'sip.providerX.com',
user => 'doyoufindme',
}
Password, authuser, port number and extension are optional parameters. If you define authuser, you must specify a password.
asterisk::registry::sip { 'friends_home':
server => 'home.friend.com',
port => '8888',
user => 'me',
password => 'myselfandI',
authuser => 'you',
extension => 'whatsupfriend',
}
SIP Options
If you are using the SIP protocol, you'll want to set some global
configuration options. For passing in settings, you need to send a hash to the
asterisk
class with the sip_general
parameter.
Here is the default hash with the default values, as defined in params.pp:
$sip_general = {
'disallow' => [],
'allow' => [],
'domain' => [],
'localnet' => [],
'context' => 'default',
'allowoverlap' => 'no',
'udpbindaddr' => '0.0.0.0',
'tcpenable' => 'no',
'tcpbindaddr' => '0.0.0.0',
'transport' => 'udp',
'srvlookup' => 'yes',
'allowguest' => 'no',
'alwaysauthreject' => 'yes',
}
SIP encryption
If you want to enable SIP encryption, you can set the following settings in the
sip_general
parameter to the asterisk
class:
$sip_option = {
'transports' => ['tls'],
'encryption' => 'yes',
'tlsenable' => 'yes',
# Change the following two values to the full paths where you're placing your
# own certificat and CA files, respectively.
'tlscertfile' => '/etc/ssl/somecert.crt',
'tlscafile' => '/etc/ssl/someca.crt',
# Only set this to 'yes' if you can't possibly get a verifiable certificate.
'tlsdontverifyserver' => 'no',
}
Note: the 'transports' option needs to be an array, so even though you only enable 'tls' as a transport, you need to enclose the string inside an array.
Voicemail
With the defined type asterisk::voicemail
you can configure a voicemail. The
context
and password
parameters are mandatory:
asterisk::voicemail { '3000':
context => 'some_context',
password => '5555',
user_name => 'Bob Bobby',
email => 'bob@bobby.comcom',
}
You can also use the optional 'pager_email' parameter to set the email that should receive a page about new voice messages.
And finally, the argument 'options' can take a hash of voicemail options like the following:
asterisk::voicemail { '3001':
context => 'blah',
password => '112233',
options => { 'attach' => 'yes', 'delete' => 'yes' },
}
Voicemail Options
Voicemail can be configured through a set of options in the [general]
context. To set those options, you can pass values as a hash to the
voicemail_general
parameter to the main class.
Here is the default hash with the default values, as defined in params.pp:
$voicemail_general = {
'format' => 'wav49|gsm|wav',
'serveremail' => 'asterisk',
'attach' => 'yes',
'skipms' => 3000,
'maxsilence' => 10,
'silencethreshold' => 128,
'maxlogins' => 3,
# This is not really the default value for emailbody but it makes more
# sense to be a bit more verbose by default.
'emailbody' => 'Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just ${IF($["${VM_CIDNUM}" = "${ORIG_VM_CIDNUM}"]?left:forwarded)} a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID} <${VM_CIDNUM}>, on ${VM_DATE},\n${IF($["${VM_CIDNUM}" = "${ORIG_VM_CIDNUM}"]?so:(originally sent by ${ORIG_VM_CALLERID} on ${ORIG_VM_DATE})\nso)} you might want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n',
'emaildateformat' => '%A, %B %d, %Y at %r',
'pagerdateformat' => '%A, %B %d, %Y at %r',
'sendvoicemail' => 'yes',
}
Extensions
Extensions can be set with the asterisk::extensions
defined type. source
or
content
can be used with this type.
asterisk::extensions { 'incoming':
ensure => present,
content => template('site_asterisk/extensions/incoming.erb'),
}
Extensions Options
Some global options can be set for extensions. You can achieve that by passing
a hash to the extensions_general
parameter to the asterisk
class.
Here is the default hash with the default values, as defined in params.pp:
$extensions_general = {
'static' => 'yes',
'writeprotect' => 'no',
'clearglobalvars' => 'no',
}
Note that by default no global variables (e.g. values set in the [globals]
context) are set. To set global variables, you can use an
asterisk::extensions
resource with a context value of "globals".
Agents
To define an agent you can use the asterisk::agent
defined type. The ext
,
password
and agent_name
parameters are mandatory.
To define a static agent:
asterisk::agent { 'joe':
ext => '1001',
password => '123413425',
agent_name => 'Joe Bonham',
}
You can also assign a static agent to one or more agent groups with the
groups
parameter. This parameter is a list of group names:
asterisk::agent { 'cindy':
ext => '1002',
password => '754326',
agent_name => 'Cindy Rotterbauer',
groups => ['1']
}
Static agents have some disadvantages compared to dynamic agents. For example, once assigned to a queue they cannot logout of that queue. For more information on how to setup dynamic agents, see:
- https://www.voip-info.org/asterisk-cmd-agentlogin
- https://www.voip-info.org/asterisk-cmd-addqueuemember
- https://www.voip-info.org/asterisk-cmd-removequeuemember
Agents Options
Some global options can be set for agents. One option in the [general]
context, multiplelogin
, can be set via the agents_multiplelogin
parameter
to the asterisk class
with a boolean value.
Global options in the [agents]
context can be set by passing a hash to the
agents_global
parameter to the asterisk
class. By default this parameter
doesn't define any global options.
For creating agents, it is recommended to use the asterisk::agent
defined
type.
Features
Features let you configure call parking and special numbers that trigger
special functionality. The asterisk::feature
defined type helps you
configuring such features. The options
parameter is mandatory.
Define features that are contained within feature group "myfeaturegroup":
$ft_options = {
'pausemonitor' => '#1,self/callee,Pausemonitor',
'unpauseMonitor' => '#3,self/callee,UnPauseMonitor',
}
asterisk::feature { 'myfeaturegroup':
options => $ft_options,
}
A special section in the features configuration file, namely
[applicationmaps]
lets you define global features. The
asterisk::feature::applicationmap
defined type helps you configure such a
global feature. The feature
and value
parameters are mandatory:
asterisk::feature::applicationmap { 'pausemonitor':
feature => 'pausemonitor',
value => '#1,self/callee,Pausemonitor',
}
Features global configurations
Some global feature options can be configured, like the default parkinglot, via
the features_general
parameter to the asterisk
class.
Here is the default hash with the default values, as defined in params.pp:
$features_general = {
'parkext' => '700',
'parkpos' => '701-720',
'context' => 'parkedcalls',
}
A special context, featuremap
, lets you configure global features. By
default, no feature is configured. You can pass a hash to the
features_featuremap
parameter to the asterisk
class to configure features
in this context.
Another special context, applicationmap
, lets you configure dynamic features.
To set entries in this context, you should use the
asterisk::feature::applicationmap
defined type. Note also that for dynamic
features to work the DYNAMIC_FEATURES channel variable must be set by listing
features enabled in the channel, separated by '#'.
To configure additional feature contexts, you can use the asterisk::feature
defined type.
Queues
Asterisk can put call in queues, for example when all agents are busy and the call cannot get connected. To create a queue, you can use the asterisk::queue
defined type:
asterisk::queue { 'frontline':
ensure => present,
stragegy => 'rrmemory',
members => [
'SIP/reception',
'SIP/secretary',
],
maxlen => 30,
timeout => 20,
retry => 10,
}
Call queues have lots of options and can interact with agents. Because of this we will not detail all of the parameters here. Please refer to the manifests/queue.pp file for the complete list of supported parameters. Also, for an in-depth coverage of call queueing, see: http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-ACD.html
Queues Options
For queues some global configurations and default values can be set in the
[general]
context. You can set options by passing a hash to the
queues_general
parameter to the asterisk
class.
Here is the default hash with the default values, as defined in params.pp:
$queues_general = {
'persistentmembers' => 'yes',
'monitor-type' => 'MixMonitor',
}
Modules
Configuring Asterisk modules is key to implementing your features right. Four
parameter to the asterisk
class offer you the possibility to customize what
modules are loaded or not on your PBX. Default values for the parameters were
taken from the default config file in Debian.
-
modules_autoload
: a boolean value (defaults totrue
) that decides whether or not Asterisk will try to automatically load required modules even though they are not explicitely marked as needing to be loaded in the modules.conf file. -
modules_noload
: an array of strings of explicitely unwanted modules that won't load even thoughmodules_autoload
is true. Specifying an array to this parameter overrides the default list so make sure to include all unwanted modules. The default array is the following:$modules_noload = [ 'pbx_gtkconsole.so', 'pbx_kdeconsole.so', 'app_intercom.so', 'chan_modem.so', 'chan_modem_aopen.so', 'chan_modem_bestdata.so', 'chan_modem_i4l.so', 'chan_capi.so', 'chan_alsa.so', 'cdr_sqlite.so', 'app_directory_odbc.so', 'res_config_odbc.so', 'res_config_pgsql.so' ]
-
modules_load
: an array of strings of explicitely wanted modules. Specifying an array to this parameter overrides the default list so make sure to include all wanted modules. The default array is the following:$modules_load = ['res_musiconhold.so']
-
modules_global
: a hash of options that should be set in the[global]
context. These options let you customize behaviours for modules that are loaded.
Managers
Asterisk can expose an interface for managing the PBX. This interface can be offered to different users with different permissions. You can configure read and write access to certain features of the PBX for each user.
The asterisk::manager
defined type helps you configure a manager access. The
secret
parameter is mandatory. By default, the resource name is used as the
manager name:
asterisk::manager { 'nagios':
secret => 'topsecret1234',
read => ['all'],
write => ['system', ' call', ' log', ' verbose', ' command', ' agent', ' user'],
}
Here's a paranoid version of the above configuration, with minimal network access, but the option to run system commands and trigger calls:
asterisk::manager { 'nagios':
secret => 'topsecret1234',
read => ['system', 'call'],
write => ['system', 'call'],
}
Here, we permit remote management to two other systems on an internal network:
asterisk::manager { 'robocall':
secret => 'robotsdeservesomeloveafterall',
permit => ['10.10.10.200/255.255.255.0', '10.20.20.200/255.255.255.0'],
read => ['system', 'call', 'log'],
write => ['system', 'call', 'originate'],
}
To override the manager name, you can use the manager_name
parameter:
asterisk::manager { 'sysadmin':
secret => 'nowyouseemenowyoudont',
read => ['all'],
write => ['all'],
manager_name => 'surreptitioustyrant',
}
Manager Options
Asterisk maintains a service on a port through which you can inspect asterisk's
state and issue commands to the PBX. You can control on which IP and port it
binds to and if it is enabled at all with three parameters to the asterisk
class.
-
manager_enable
: a boolean value that decides whether or not the manager is in function. Defaults to true. -
manager_port
: an integer value that specifies on which port the manager will listen. Default value is 5038. -
manager_bindaddr
: a string that contains the IP address on which the manager should bind. Default value is 127.0.0.1.
By default, no user access is configured. If you want to enable users to
interact with the manager, you should declare asterisk::manager
resources.
Dahdi
Dahdi is a set of kernel modules combined with an asterisk module that let people interact with Digium cards to send and receive calls from the POTS. To enable dahdi, use the following:
include 'asterisk::dahdi'
Language sounds
To include any language sounds, you can use the following (in this example, we're installing french and spanish sounds):
asterisk::language {
['fr-armelle', 'es']:
}
Valid languages strings are the following (these are all based on debian package names for now -- either asterisk-prompt-X or asterisk-Y. the language strings that start with core-sounds enable you to install language sounds in a specific encoding to avoid the need for asterisk to recode it while feeding it to a device):
- de
- es-co
- fr-armelle
- fr-proformatique
- it-menardi
- it-menardi-alaw
- it-menardi-gsm
- it-menardi-wav
- se
- es
- core-sounds-en
- core-sounds-en-g722
- core-sounds-en-gsm
- core-sounds-en-wav
- core-sounds-es
- core-sounds-es-g722
- core-sounds-es-gsm
- core-sounds-es-wav
- core-sounds-fr
- core-sounds-fr-g722
- core-sounds-fr-gsm
- core-sounds-fr-wav
- core-sounds-ru
- core-sounds-ru-g722
- core-sounds-ru-gsm
- core-sounds-ru-wav
Upgrade notices
-
The module used to manage files under /etc/asterisk/file.conf.d for all values of "file" that were managed. Things have been moved to /etc/asterisk/file.d, so before upgrading you should remove all .conf.d directories (all files under the old dirs will be automatically recreated in the new directories).
-
The defines that were previously named asterisk::context::xyz (or transitorily asterisk::snippet::xyz) are now named asterisk::xyz. Users will need to adjust their manifests to upgrade.
-
The
queues_monitor_type
andqueues_monitor_format
parameters to the default class were removed in favor of using quoted strings in the options array. Users who used those two options need to place their values in the$queues_general
hash with 'monitor-type' and 'monitor-format' strings as keys, respectively. To ensure that 'monitor-type' is not present in the config file, simply leave it out (as opposed to the previous behaviour of the option that required an empty string for this). -
Some default values were removed and some others were modified to be closer to default Debian config files. You should verify that new values or variables that disappear won't have an impact on your setup.
Patches and Testing
Contributions are highly welcomed, more so are those which contribute patches with tests. Or just more tests! We have rspec-puppet tests. When [contributing patches](Github WorkFlow), please make sure that your patches pass tests:
user@host01 ~/src/bw/puppet-composer (git)-[master] % rake tests
....................................
Finished in 2.29 seconds
36 examples, 0 failures
Still not implemented !
Types:
asterisk::mwi
License
This module is licensed under the GPLv3+, feel free to redistribute, modify and contribute changes.
A copy of the GPLv3 license text should be included with the module. If not, check out the github repository at https://github.com/lelutin/puppet-asterisk or one of its clones.
The license text can also be downloaded from:
Reference
Table of Contents
Classes
Public Classes
asterisk
: Install and configure an asterisk server.asterisk::dahdi
: Requirements for the asterisk dahdi module to work
Private Classes
asterisk::config
: asterisk basic configuration files.asterisk::install
: Install packages that are necessary for an asterisk server.asterisk::params
: Default values for the asterisk classasterisk::service
: Ensure the Asterisk service is running.
Defined types
Public Defined types
asterisk::agent
: Configure an asterisk agentasterisk::extensions
: Configure a dialplan context and extensions within that contextasterisk::feature
: Configure an asterisk feature application map groupingasterisk::iax
: Configure an IAX2 context and its optionsasterisk::language
: Install an asterisk language pack.asterisk::manager
: Configure an asterisk managerasterisk::queue
: Configure an asterisk queueasterisk::registry::iax
: Configure an IAX2 registryasterisk::registry::sip
: Configure a SIP registryasterisk::sip
: Configure a SIP peer, a user or a template for the previous.asterisk::voicemail
: Configure a voicemail
Private Defined types
asterisk::dotd
: Create a .d directory associated to a configuration fileasterisk::dotd::file
: Create a file inside a .d directory and set its permissions correctly.asterisk::dotd::nullfile
: Create a file in .d directories to avoid service start issues
Data types
Asterisk::Access
: A deny or permit line for Asterisk configurationAsterisk::ExtGlobalVars
: A hash of global variables for the dialplanAsterisk::Featuremap
: Options that can be set for featuremapAsterisk::Featuresgeneral
: Possible values for the[general]
section of features.confAsterisk::Logfile
: Options that can be set for a log fileAsterisk::ManagerPerms
: Possible permissions given to AMI users
Classes
asterisk
AEL and Lua)
-
TODO Purge unmanaged configs by default. Add parameter to disable purging.
-
See also
Examples
simple install
class { 'asterisk': }
Parameters
The following parameters are available in the asterisk
class.
manage_service
Data type: Boolean
Set this to false to avoid managing the asterisk service. By default puppet will enable the service and ensure that it is running.
Default value: true
manage_package
Data type: Boolean
Set this to false to avoid installing the asterisk package.
Default value: true
package_name
Data type: Variant[String, Array[String]]
Name or array of the package(s) being installed for asterisk.
Default value: $asterisk::params::package_name
service_name
Data type: String
Name of the asterisk service.
Default value: 'asterisk'
confdir
Data type: Stdlib::Absolutepath
Absolute path to the asterisk configuration directory.
Default value: '/etc/asterisk'
iax_general
Data type: Hash
Global configurations for IAX2. Options are set in the file as key = value
in the [general]
section of iax.conf
.
Default value: {}
sip_general
Data type: Hash
Global configurations for SIP. Options are set in the file as key = value
in the [general]
section of the sip.conf
file.
Default value: {}
voicemail_general
Data type: Hash
Global configurations for voicemail. Options are set in the file as key = value
in the [general]
section of the voicemail.conf
file.
Default value: {}
extensions_general
Data type: Hash
Global configurations for the dialplan. Options are set in the file as key = value
in the [general]
section of the extensions.conf
file.
Default value: {}
extensions_globals
Data type: Asterisk::ExtGlobalVars
Hash of global variables for the dialplan, placed in the [globals]
section of the extensions.conf
file. The variables defined here can be
accessed throughout the dialplan with the GLOBAL()
function. Global
variables can make dialplans reusable by different servers with different
use cases. They also make dialplans easier to maintain by concentrating
certain information in one location (e.g. to avoid having to modify the
same value through many contexts and macros). Global variables can also be
used for hiding passwords from Asterisk logs, for example for register
lines or calls to Dial()
where information about the provider is combined
with username and password: when using a global variable, the variable name
will be shown in logs, not the actual password. Variables are set in the
file as key = value
. If you pass in a Sensitive type as the value, it
will be unwrapped for outputting in the configuration file: this can avoid
showing certain sensitive information (as passwords) in puppet logs.
Default value: {}
agents_multiplelogin
Data type: Boolean
Set this to false to disable possibility for agents to be logged in
multiple times. This option is set in the [general]
section of the
agents.conf
file.
Default value: true
agents_global
Data type: Hash
Global configurations for agents. Options are set in the file as key = value
in the [agents]
section of the agents.conf
file.
Default value: {}
features_general
Data type: Asterisk::FeaturesGeneral
Global call features. Options are set in the file as key = value
in the
[general]
section of features.conf
.
Default value: $asterisk::params::features_general
features_featuremap
Data type: Asterisk::Featuremap
Global feature maps. Options are set in the file as key => value
in the
[featuremap]
section of features.conf
.
Default value: {}
features_applicationmap
Data type: Hash[String,String]
Global application feature maps. Options are set in the file as key => value
in the [applicationmap]
section of features.conf
.
Default value: {}
logger_general
Data type: Hash[String,String]
Global configurations for asterisk logging. Options are set in the file as
key=value
in the [general]
section of logger.conf
.
Default value: $asterisk::params::logger_general
log_files
Data type: Hash[String,Asterisk::Logfile]
A hash defining log files. Keys set log filenames and values should be
hashes containing at least one key levels
that has an associated list of
strings for levels that'll be output in that log file and an optional key
formatter
which has a string value of either default
or json
and
defines which format will be output to the log. If the formatter
key is
omitted, the default format is used. Log files can be the special names
console
or syslog
to determine what output is sent to the asterisk CLI
console and syslog, respectively, or it can be a file name. File names can
be either relative to the asterisk.conf
setting astlogdir
or an
absolute path.
Default value: $asterisk::params::log_files
queues_general
Data type: Hash
Global configurations for queues. Options are set in the file as key = value
in the [general]
section of the queues.conf
file.
Default value: {}
modules_autoload
Data type: Boolean
Set this to false to avoid having asterisk load modules automatically on an as-needed basis. This can be used to configure modules in a more restrictive manner.
Default value: true
modules_noload
Data type: Array[String]
List of modules that asterisk should not load. This can be useful if
modules_autoload
is set to true
.
Default value: $asterisk::params::modules_noload
modules_load
Data type: Array[String]
List of modules that asterisk should load on startup. This is useful if
you've set modules_autoload
to false
.
Default value: $asterisk::params::modules_load
modules_global
Data type: Hash
Global configurations for modules. Options are set in the file as key = value
in the [global]
section of the modules.conf
file.
Default value: {}
manager_enable
Data type: Boolean
Set this to false to disable asterisk manager.
Default value: true
manager_port
Data type: Integer
Port number on which asterisk will listen to for manager connections. Defaults to 5038.
Default value: 5038
manager_bindaddr
Data type: String
IP address to have asterisk bind to for manager connections. Defaults to binding to localhost.
Default value: '127.0.0.1'
asterisk::dahdi
DAHDI (Digium/Asterisk Hardware Device Interface) lets you connect your Asterisk PBX to a card, Digium and some other models, that bridges calls with the POTS.
- TODO This class is possibly incomplete and it needs to be finished and tested.
Defined types
asterisk::agent
Configure an asterisk agent
- See also
- https://www.voip-info.org/asterisk-cmd-agentlogin
- Dynamic agent login
- https://www.voip-info.org/asterisk-cmd-addqueuemember
- Adding agents to queues
- https://www.voip-info.org/asterisk-cmd-removequeuemember
- Removing agents from queues
- https://www.voip-info.org/asterisk-cmd-agentlogin
Examples
Basic agent
asterisk::agent { 'provocateur':
ext => '700',
password => Sensitive.new('supersecret'),
agent_name => 'provocateur',
}
Parameters
The following parameters are available in the asterisk::agent
defined type.
ext
Data type: String
Extension corresponding to the agent.
password
Data type: Sensitive[String]
Login password of the agent.
agent_name
Data type: String
Name by which the agent is referred to within dialplan.
ensure
Data type: Enum['present', 'absent']
Can be set to absent to remove a given agent.
Default value: present
groups
Data type: Array[String[1]]
List of groups to which the agent is associated.
Default value: []
asterisk::extensions
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.
- See also
Examples
basic context with one extension
asterisk::extensions { 'basic':
content => 'exten => 666,1,Hangup()',
}
Parameters
The following parameters are available in the asterisk::extensions
defined type.
ensure
Data type: Any
Set this to false to remove the corresponding configuration file.
Default value: present
source
Data type: Any
Puppet file source where the contents of the file can be found.
Default value: undef
content
Data type: Optional[String]
Textual contents of the file. This option is mutually exclusive with
$source
.
Default value: undef
asterisk::feature
This resource will define an application map grouping. It can be used to set dynamic features with the DYNAMIC_FEATURES variable: instead of listing all of the application maps that need to be enabled in DYNAMIC_FEATURES, you can use the name of a group to enable them all.
To configure global features, see the features_general
parameter to the
main class, asterisk
.
-
TODO list specific options as params instead of using an options hash
-
See also
Examples
feature configuration
asterisk::feature { 'shifteight':
options => {
unpauseMonitor => '*1',
pauseMonitor => '*2',
}
}
Parameters
The following parameters are available in the asterisk::feature
defined type.
options
Data type: Hash
Hash of options with keys being option names and values their values.
ensure
Data type: Any
Set this to absent
to remove the feature.
Default value: present
asterisk::iax
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
-
See also
Parameters
The following parameters are available in the asterisk::iax
defined type.
ensure
Data type: Any
Set this to absent
to remove the configuration file.
Default value: present
source
Data type: Any
Puppet file source where the contents of the file can be found.
Default value: undef
content
Data type: Optional[String]
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.
Default value: undef
asterisk::language
The name of the resource is the name of a language pack.
The language packs defined here were taken directly from packages available on debian and so this might not work for other distros.
Examples
installing two language packs
asterisk::language { ['de', 'es']: }
asterisk::manager
Configure an asterisk manager
- See also
Examples
manager with default authorizations that can connect from LAN.
asterisk::manager { 'sophie':
secret => Sensitive.new('youllneverguesswhatitis'),
permit => ['192.168.120.0/255.255.255.0'],
}
Parameters
The following parameters are available in the asterisk::manager
defined type.
secret
Data type: Sensitive[String[1]]
Authentication password for the manager.
ensure
Data type: Any
Set to absent
to remove the manager.
Default value: present
manager_name
Data type: String[1]
Can be used to override the name of the manager. By default the
name of the manager corresponds to $name
.
Default value: $name
deny
Data type: Array[String[1]]
List of IP specifications that are denied access to the manager. Denied
IPs can be overridden by $permit
. This makes it possible to only permit
access to some IP addresses. Default value is to deny access to everybody.
Default value: ['0.0.0.0/0.0.0.0']
permit
Data type: Array[String[1]]
List of IP specifications that are permitted access to the manager. Defaults to premitting only localhost.
Default value: ['127.0.0.1/255.255.255.255']
read
Data type: Array[Asterisk::ManagerPerms]
List of authorizations given to the manager to read certain information or
configuration. Defaults to system
and call
.
Default value: ['system', 'call']
write
Data type: Array[Asterisk::ManagerPerms]
List of authorizations given to the manager to write (change) certain
information or configuration. Defaults to system
and call
.
Default value: ['system', 'call']
writetimeout
Data type: Integer
Timeout in milliseconds used by Asterisk when writing data to the AMI connection for this user.
Default value: 100
displayconnects
Data type: Boolean
Set this to no to avoid reporting connections to the AMI as verbose messages printed to the Asterisk console.
Default value: true
eventfilter
Data type: Optional[String]
Whitelist- or blacklist-style filtering of manager events before they are delivered to the AMI client application. Filters are specified using a regular expression. A specified filter is a whitelist filter unless preceded by an exclamation point.
Default value: undef
asterisk::queue
This resource presents a multitude of options, corresponding to different options that can be configured for queues.
-
TODO use better data types. some params should be boolean. some should have an enum.
-
See also
- http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ACD_id288901.html#options_defined_queues
- Definitions of options
- http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-ACD.html
- http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ACD_id288932.html#ACD_id36004485
- Changing penalties dynamically
- http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ACD_id288901.html#options_defined_queues
Examples
create a queue with 10 max callers and strategy random
asterisk::queue { 'shortq':
stragegy => 'random',
maxlen => 10,
}
Parameters
The following parameters are available in the asterisk::queue
defined type.
ensure
Data type: Any
Set this to absent
in order to remove a queue.
Default value: present
strategy
Data type: Optional[String[1]]
Name of the queue strategy that determines which member phones are ringing when there is a call in the queue that needs answering. If this parameter is not defined, the strategy defaults to 'ringall'.
Default value: undef
context
Data type: Optional[String[1]]
Name of a dialplan context. Allows a caller to exit the queue by pressing a single DTMF digit. If a context is specified and the caller enters a number, that digit will attempt to be matched in the context specified, and dialplan execution will continue there.
Default value: undef
defaultrule
Data type: Optional[String[1]]
Associates a queue rule as defined in queuerules.conf to this queue, which is used to dynamically change the minimum and maximum penalties, which are then used to select an available agent.
Default value: undef
maxlen
Data type: Optional[Integer]
Maximum number of allowed callers in the queue. A value of 0 allows an unlimited number of callers in the queue. If unspecified, defaults to 0.
Default value: undef
musicclass
Data type: Optional[String[1]]
Name of a music class as defined in musiconhold.conf
to be used for this
particular queue. You can also override this value with the
CHANNEL(musicclass) channel variable.
Default value: undef
servicelevel
Data type: Optional[String[1]]
Threshold in seconds for queue waiting time. This can be then used in
statistics to determine the number of calls that have passed the
servicelevel
threshold.
Default value: undef
members
Data type: Array[String[1]]
List of static members of this queue. Each member should be specified a
Technology/Device_ID
.
Default value: []
memberdelay
Data type: Optional[Integer]
Optional number of seconds to add as delay before the caller and member get connected to each other.
Default value: undef
penaltymemberslimit
Data type: Optional[String[1]]
Optional lower bound to start disregarding penalty if number of members in the queue is lower than this number.
Default value: undef
membermacro
Data type: Optional[String[1]]
Name of a macro to be executed just prior to bridging the caller and the queue member.
Default value: undef
membergosub
Data type: Optional[String[1]]
If set, run this gosub when connected to the queue member you can override this gosub by setting the gosub option on the queue application
Default value: undef
setinterfacevar
Data type: Optional[String[1]]
If set to yes
, the channel variables MEMBERINTERFACE
, MEMBERNAME
,
MEMBERCALLS
, MEMBERLASTCALL
, MEMBERPENALTY
, MEMBERDYNAMIC
and
MEMBERREALTIME
will be set just prior to connecting the caller with the
queue member.
Default value: undef
setqueuevar
Data type: Optional[String[1]]
If set to yes
, the channel variables QUEUENAME
, QUEUEMAX
,
QUEUESTRATEGY
, QUEUECALLS
, QUEUEHOLDTIME
, QUEUECOMPLETED
,
QUEUEABANDONED
, QUEUESRVLEVEL
and QUEUESRVLEVELPERF
will be set just
prior to the call being bridged.
Default value: undef
setqueueentryvar
Data type: Optional[String[1]]
If set to yes
, the channel variables QEHOLDTIME
and QEORIGINALPOS
will be set just prior to the call being bridged.
Default value: undef
weight
Data type: Optional[Integer]
The weight of a queue. A queue with a higher weight defined will get first priority when members are associated with multiple queues.
Default value: undef
reportholdtime
Data type: Optional[String[1]]
If set to yes
, enables reporting of the caller’s hold time to the queue
member prior to bridging.
Default value: undef
ringinuse
Data type: Optional[String[1]]
If set to no
, avoid sending calls to members whose status is In Use
.
Only the SIP channel driver is currently able to accurately report this
status.
Default value: undef
wrapuptime
Data type: Optional[Integer]
Number of seconds to keep a member unavailable in a queue after completing a call.
Default value: undef
timeout
Data type: Optional[Integer]
Number of seconds to ring a member’s device. Also see timeoutpriority
.
Default value: undef
timeoutrestart
Data type: Optional[String[1]]
If set to yes
, resets the timeout for an agent to answer if either a
BUSY
or CONGESTION
status is received from the channel. This can be
useful if the agent is allowed to reject or cancel a call.
Default value: undef
timeoutpriority
Data type: Optional[String[1]]
Define which value of timeout
takes precedence in case of a conflict. Set
to conf
to have the value configured with timeout
on this resource take
precedence. Defaults to app
, which means the timeout
value from the
Queue()
application will take precedence.
Default value: undef
retry
Data type: Optional[String[1]]
Number of seconds to wait before attempting the next member in the queue if
the timeout
value is exhausted while attempting to ring a member of the
queue.
Default value: undef
autopause
Data type: Optional[String[1]]
Set this to yes
to enable the automatic pausing of members who fail to
answer a call. A value of all
causes this member to be paused in all
queues they are a member of.
Default value: undef
joinempty
Data type: Array[String[1]]
Controls whether a caller is added to the queue when no members are
available. Comma-separated options can be included to define how this
option determines whether members are available. See reference Definitions of options
to see what possible values this can take and what they mean.
Default value: []
leavewhenempty
Data type: Array[String[1]]
control whether callers are kicked out of the queue when members are no
longer available to take calls. This can take values similar to
joinempty
.
Default value: []
eventwhencalled
Data type: Optional[String[1]]
If set to yes
manager events AgentCalled
, AgentDump
, AgentConnect
and AgentComplete
will be sent to the Asterisk Manager Interface (AMI).
If set to vars, all channel variables associated with the agent will also
be sent to the AMI. Defaults to no
.
Default value: undef
eventmemberstatus
Data type: Optional[String[1]]
If set to yes
, the QueueMemberStatus event will be sent to AMI. Note that
this may generate a lot of manager events.
Default value: undef
monitor_type
Data type: Optional[String[1]]
If set to MixMonitor
, the MixMonitor()
application will be used for
recording calls within the queue. If not specified, the Monitor()
application will be used instead. This setting applies specifically for
this queue and overrides the general option with the same name.
Default value: undef
monitor_format
Data type: Array[String[1]]
File format to use when recording. If unspecified, calls will not be recorded.
Default value: []
autofill
Data type: Optional[String[1]]
If set to no
, the queue application will attempt to deliver calls to
agents in a serial manner. This means only one call is attempted to be
distributed to agents at a time. Additional callers are not distributed to
agents until that caller is connected to an agent. If set to yes
, callers
are distributed to available agents simultaneously. This value overrides
the value from the general section for this particular queue.
Default value: undef
announce
Data type: Optional[String[1]]
Filename of an announcement played to the agent that answered the call, typically to let them know what queue the caller is coming from. Useful when the agent is in multiple queues, especially when set to auto-answer the queue.
Default value: undef
announce_frequency
Data type: Optional[Integer]
Number of seconds to wait for before we should announce the caller’s position and/or estimated hold time in the queue. Set this value to zero or let the parameter unspecified to disable.
Default value: undef
min_announce_frequency
Data type: Optional[Integer]
Minimum amount of time, in seconds, that must pass before we announce the caller’s position in the queue again. This is used when the caller’s position may change frequently, to prevent the caller hearing multiple updates in a short period of time.
Default value: undef
announce_holdtime
Data type: Optional[String[1]]
Set to yes
to play the estimated hold time along with the periodic
announcements. If set to once
, the estimated hold time will be played
only once. Defaults to no
.
Default value: undef
announce_position
Data type: Optional[String[1]]
Set to yes
to have periodic announcements always mention current position
in the queue. If set to limit
announcements will only mention the
position in the queue if it is within the limit defined by
announce_position_limit
. If set to more
, announcements will only
mention the position in the queue if it is beyond the number in
announce_position_limit
. Defaults to no
.
Default value: undef
announce_position_limit
Data type: Optional[Integer]
Position in the queue that represents a threshold for announcements if
announce_position
was set to limit
or more
.
Default value: undef
announce_round_seconds
Data type: Optional[Integer]
If set to a non-zero value, announcements will mention seconds as well, rounded to the value specified in this parameter.
Default value: undef
periodic_announce
Data type: Array[String[1]]
List of file names of periodic announcements to be played. Prompts are
played in the order they are defined. If unset, defaults to
queue-periodic-announce
.
Default value: []
periodic_announce_frequency
Data type: Optional[Integer]
Time in seconds between periodic announcements to the caller.
Default value: undef
random_periodic_announce
Data type: Optional[String[1]]
If set to yes
, will play the defined periodic announcements in a random
order.
Default value: undef
relative_periodic_announce
Data type: Optional[String[1]]
If set to yes
, the periodic_announce_frequency timer will start from when
the end of the file being played back is reached, instead of from the
beginning. Defaults to no
.
Default value: undef
queue_youarenext
Data type: Optional[String]
Filename of a prompt to play when caller reaches first position in queue. If not defined, will play the default value (“You are now first in line”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_thereare
Data type: Optional[String]
Filename of a prompt to play in announcements when mentioning how much people are before the caller. If not defined, will play the default value (“There are”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_callswaiting
Data type: Optional[String]
Filename of a prompt to play in announcements after saying number of calls before caller. If not defined, will play the default value (“calls waiting”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_holdtime
Data type: Optional[String]
Filename of a prompt to play when starting to announce estimated wait time. If not defined, will play the default value (“The current estimated hold time is”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_minute
Data type: Optional[String]
Filename of a prompt to play after stating number of estimated minutes, if the number is 1. If not defined, will play the default value (“minute”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_minutes
Data type: Optional[String]
Filename of a prompt. This is the same as queue_minute
but for when the
number of minutes is more than 1.
Default value: undef
queue_seconds
Data type: Optional[String]
Filename of a prompt to play after stating number of estimated seconds. If not defined, will play the default value (“seconds”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_thankyou
Data type: Optional[String]
Filename of a prompt. If not defined, will play the default value (“Thank you for your patience”). If set to an empty value, the prompt will not be played at all.
Default value: undef
queue_reporthold
Data type: Optional[String]
Filename of a prompt. If not defined, will play the default value (“Hold time”). If set to an empty value, the prompt will not be played at all.
Default value: undef
asterisk::registry::iax
This makes it possible to register to an IAX2 peer for authenticated connections.
Parameters
The following parameters are available in the asterisk::registry::iax
defined type.
server
Data type: Stdlib::Host
Hostname or IP address of the server to which Asterisk should register.
user
Data type: String[1]
User name used for authenticating with the distant server.
password
Data type: Sensitive[String[1]]
Password used for authenticating.
ensure
Data type: Any
Set to absent
in order to remove the registry.
Default value: present
asterisk::registry::sip
This makes it possible to register to a SIP peer for authenticated connections.
Parameters
The following parameters are available in the asterisk::registry::sip
defined type.
server
Data type: Stdlib::Host
Hostname or IP address of the server to which Asterisk should register.
user
Data type: String[1]
User id for the local server.
ensure
Data type: Any
Set to absent
in order to remove the registry.
Default value: present
password
Data type: Optional[Sensitive[String[1]]]
Optional password used for authenticating. This is required if our peer does not match connections only on IP/port.
Default value: undef
authuser
Data type: Optional[String[1]]
Optional user name used for authenticating with the remote server. This is required if our peer does not match connections only on IP/port.
Default value: undef
port
Data type: Optional[Integer]
Numerical port with which a connection will be established to the remote server.
Default value: undef
extension
Data type: Optional[String[1]]
Extension that is used when calls are received from the remote server. When not set, extension will be 's'.
Default value: undef
asterisk::sip
Configure a SIP peer, a user or a template for the previous.
-
TODO use better data types. some should be boolean, some should have an enum
-
Note It is generally recommended to avoid assigning hostname to a
sip.conf
section like[provider.com]
. -
See also
Examples
create sip peer of providerZ
asterisk::sip { 'providerZ':
account_type => 'peer',
disallow => ['all'],
allow => ['ulaw'],
host => 'sip-host.local',
secret => Sensitive.new('callthisasecret'),
}
Parameters
The following parameters are available in the asterisk::sip
defined type.
ensure
Data type: Any
Set this to absent
in order to remove SIP configuration.
Default value: present
template_name
Data type: Optional[String[1]]
Set this to !
if you are creating a template. Set this to any name of a
template section to inherit options from it.
Default value: undef
account_type
Data type: Optional[String[1]]
Define how calls are handled. Roughly, peer
handles outbound and inbound
calls matches calls by ip/port. user
handles only inbound calls and
matches calls by authname
and secret
. friend
handles both inbound and
outbound calls where inbound calls are matched by authname
and secret
(like a user
) but outbound calls are matched by ip and port like a
peer
.
Default value: 'friend'
username
Data type: Optional[String[1]]
Deprecated option in asterisk. You probably want to use defaultuser
instead.
Default value: undef
defaultuser
Data type: Optional[String[1]]
Authentication user name.
Default value: undef
secret
Data type: Optional[Sensitive[String[1]]]
Authentication secret for inbound connections.
Default value: undef
md5secret
Data type: Optional[String[1]]
MD5-Hash of <user>:==SIP_realm==:<secret>
(can be used instead of
secret
). Default for authenticating to an Asterisk server when SIP realm
is not explicitly declared is <user>:asterisk:<secret>
.
Default value: undef
remotesecret
Data type: Optional[Sensitive[String[1]]]
Authentication secret for outbound connections. If this is not set,
$secret
is used for outbound connections.
Default value: undef
context
Data type: Optional[String[1]]
Name of the dialplan context that is used as starting point when an inbound call is received through this peer/user.
Default value: undef
canreinvite
Data type: Optional[String[1]]
Deprecated option in asterisk: was renamed to directmedia
. Whether or not
to issue a reinvite to the client unless really necessary. This is used to
interoperate with some (buggy) hardware that crashes if we reinvite, such
as the common Cisco ATA 186. Setting this to nonat
will allow reinvite
when local, deny reinvite when NAT. Finally setting this to update
will
use UPDATE
instead of INVITE
.
Default value: 'no'
directmedia
Data type: Optional[String[1]]
By default, Asterisk tries to re-invite media streams to an optimal path.
If there's no reason for Asterisk to stay in the media path, the media will
be redirected. This does not really work well in the case where Asterisk is
outside and the clients are on the inside of a NAT. In that case, you want
to set this parameter to nonat
. nonat
will allow media path redirection
(reinvite) but only when the peer where the media is being sent is known to
not be behind a NAT (as the RTP core can determine it based on the apparent
IP address the media arrives from). If you set this parameter to update
,
Asterisk will use an UPDATE
command instead of an INVITE
command to
redirect media. update
can also be combined with nonat
with the value
nonat,update
.
Default value: 'no'
directrtpsetup
Data type: Optional[Boolean]
Set this to true
to enable the new experimental direct RTP setup. This
sets up the call directly with media peer-2-peer without re-invites. Will
not work for video and cases where the callee sends RTP payloads and fmtp
headers in the 200 OK that does not match the callers INVITE. This will
also fail if directmedia is enabled when the device is actually behind NAT.
Default value: true
directmediadeny
Data type: Array[String[1]]
List of CIDR prefixes (e.g. of the form prefix/number of bits for mask
--
for example 172.16.0.0/16
) that should be denied passing directmedia to
other peers. You can use this if some of your phones are on IP addresses
that can not reach each other directly. This way you can force RTP to
always flow through asterisk in such cases. See also directmediapermit
.
Default value: []
directmediapermit
Data type: Array[String[1]]
List of CIDR prefixes that should be allowed passing directmedia to other
peers. See directmediadeny
.
Default value: []
host
Data type: Optional[String[1]]
Set this to dynamic
to require the device to register itself before
authenticating. Set to a hostname or IP address to match only for this host
or IP address.
Default value: 'dynamic'
insecure
Data type: Optional[String[1]]
If set to port
, allow matching of peer by IP address without matching
port number. If set to invite
, do not require authentication of incoming
INVITEs. If set to no
, all connections will be authenticated regardless
of port or IP address. Defaults to no
.
Default value: 'no'
language
Data type: Optional[String[1]]
Language code to define prompts for this peer/user.
Default value: 'en'
nat
Data type: Optional[String[1]]
Use methods to bypass issues when a phone is behind a NAT. This setting is
not useful for when the asterisk server is the one behind the NAT. Set this
to yes
to ignore the address information in the SIP and SDP headers. Set
this to force_rport
fore RFC 3581 behavior and disable symmetric RTP
support. Set this to comedia
to enable RFC 3581 behavior if the remote
side requests it and enables symmetric RTP support.
Default value: undef
qualify
Data type: Optional[String[1]]
If set to yes
, the check if client is reachable every qualifyfreq
seconds (defaults to 60 seconds). If set to an integer number, corresponds
to yes
and defines the timeout in milliseconds after a check packet is
sent: when the timeout is reached, a peer is considered offline. Valid only
with type
set to peer
.
Default value: 'no'
vmexten
Data type: Optional[String[1]]
Name of dialplan extension to reach mailbox. When unspecified, defaults to
asterisk
. Valid only with type
set to peer
.
Default value: undef
callerid
Data type: Optional[String[1]]
Caller ID information used when nothing else is available. When
unspecified, defaults to asterisk
.
Default value: undef
call_limit
Data type: Optional[Integer]
Number of simultaneous calls through this user/peer.
Default value: undef
callgroup
Data type: Optional[String[1]]
Call groups for calls to this device.
Default value: undef
mailbox
Data type: Optional[String[1]]
Voicemail extension (for message waiting indications). Not valid for type
set to user
.
Default value: undef
pickupgroup
Data type: Optional[String[1]]
Group that can pickup fellow workers’ calls using *8
and the Pickup()
application on the *8
extension.
Default value: undef
fromdomain
Data type: Optional[String[1]]
Default From:
domain in SIP messages when acting as a SIP UAC (client).
Default value: undef
fromuser
Data type: Optional[String[1]]
User to put in from
instead of $CALLERID(number)
(overrides the
callerid) when placing calls to a peer (another SIP proxy). Valid only
with type
set to peer
.
Default value: undef
outboundproxy
Data type: Optional[String[1]]
SRV name (excluding the _sip._udp prefix), hostname, or IP address of the
outbound SIP Proxy. Valid only with type
set to peer
.
Default value: undef
t38pt_udptl
Data type: Optional[String[1]]
Enable T.83 Fax support. Set to yes
to enable T.38 with FEC error
correction. Additionally, you can add comma-separated options: redundancy
enables redundancy error correction. none
disables error correction.
maxdatagram=NN
overrides the maximum datagram value to NN bytes (useful
for some problematic cases like Cisco media gateways).
Default value: undef
disallow
Data type: Array[String[1]]
List of codecs to disallow for this peer/user. The list can contain all
to
disallow all known codecs. If set to all
, codecs that are present in the
allow
list will override this setting, so this can be used to restrict to
a narrow number of codecs.
Default value: []
allow
Data type: Array[String[1]]
List of codecs to allow for this peer/user. The list can contain all
to
allow all known codecs. If set to all
, codecs in disallow
will override
this setting, so this can be used to blacklist only a narrow set of codecs.
Default value: []
dtmfmode
Data type: Optional[String[1]]
How the client handles DTMF signalling. Defaults to rfc2833
. Warning:
inband
leads to very high CPU load.
Default value: undef
transports
Data type: Array[String[1]]
Accepted transport types for this peer/user. Can be udp
, tcp
or both
with the order defining which is set as default (first value is default).
Default value: []
encryption
Data type: Optional[String]
Set to yes
to offer SRTP encrypted media (and only SRTP encrypted media)
on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58
if the
peer does not support SRTP. Defaults to no
.
Default value: ''
access
Data type: Array[Asterisk::Access]
List of permit/deny rules for CIDR prefixes like prefix/mask
. Each
element of the list should be a one element hash that specifies either
'permit' or 'deny' as a key and the CIDR prefix as its value. Order
Matters! – Rules are placed in the configuration file in the same order as
elements were inserted into the list. The last matching deny/permit rule is
the one used. If no rule matches, then the connection is permitted.
Default value: []
trustrpid
Data type: Optional[Enum['yes', 'no']]
If a Remote-Party-ID SIP header should be sent. Defaults to no
.
Default value: undef
sendrpid
Data type: Optional[Enum['yes', 'no', 'pai', 'rpid']]
If Remote-Party-ID SIP header should be trusted. Defaults to no
.
Default value: undef
asterisk::voicemail
Configure a voicemail
Examples
voicemail with email address
asterisk::voicemail { 'taro':
context => 'support2',
password => Sensitive.new('557722981749'),
email => 'taro.suupaa@support.com',
}
Parameters
The following parameters are available in the asterisk::voicemail
defined type.
context
Data type: String[1]
Name of the context in which the voicemail is assigned.
password
Data type: Sensitive[String[1]]
Authentication password set for accessing the voicemail. This is usually a series of numbers so that phones can dial the password, but it can be a textual password as well.
ensure
Data type: Any
Set to absent
to remove the voicemail.
Default value: present
user_name
Data type: Optional[String[1]]
Name assigned to the voicemail, usually the name of the person using it.
Default value: undef
email
Data type: Optional[String[1]]
Email address to which voicemail message sounds will be sent.
Default value: undef
pager_email
Data type: Optional[String[1]]
Email address to which a page will be sent upon receiving a voicemail.
Default value: undef
options
Data type: Hash[String,String]
Hash containing options that are set for the voicemail. For
example, a specific timezone can be set on individual voicemails with the
'tz' option. Options are set in the file as key = value
.
Default value: {}
Data types
Asterisk::Access
A couple of configuration files let administrators configure accesses. They are usually order-dependent so one can interleave permit and deny lines to create complex permissions.
Alias of Hash[Enum['permit','deny'], String[1], 1, 1]
Asterisk::ExtGlobalVars
A hash of global variables for the dialplan
Alias of Hash[String, Variant[String,Sensitive]]
Asterisk::Featuremap
Those are the possible values that one could find in the [featuremap]
section of features.conf
.
- See also
- http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AdditionalConfig_id256654.html#AdditionalConfig_id243783
- List of featuremaps and their meangings
Alias of Struct[{ Optional[blindxfer] => String[1], Optional[disconnect] => String[1], Optional[automon] => String[1], Optional[atxfer] => String[1], Optional[parkcall] => String[1], Optional[automixmon] => String[1], }]
Asterisk::Featuresgeneral
Possible values for the [general]
section of features.conf
- See also
- http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AdditionalConfig_id256654.html#AdditionalConfig_id244340
- List of options and their meaning
Alias of Struct[{ Optional[parkext] => String[1], Optional[parkpos] => String[1], Optional[context] => String[1], Optional[parkinghints] => Enum['yes','no'], Optional[parkingtime] => Integer, Optional[comebacktoorigin] => Enum['yes','no'], Optional[courtesytone] => String[1], Optional[parkedplay] => Enum['callee','caller','both','no'], Optional[parkedcalltransfers] => Enum['callee','caller','both','no'], Optional[parkedcallreparking] => Enum['callee','caller','both','no'], Optional[parkedcallhangup] => Enum['callee','caller','both','no'], Optional[parkedcallrecording] => Enum['callee','caller','both','no'], Optional[parkeddynamic] => Enum['yes','no'], Optional[adsipark] => Enum['yes','no'], Optional[findslot] => Enum['first','next'], Optional[parkedmusicclass] => String[1], Optional[transferdigittimeout] => Integer, Optional[xfersound] => String[1], Optional[xferfailsound] => String[1], Optional[pickupexten] => String[1], Optional[pickupsound] => String[1], Optional[pickupfailsound] => String[1], Optional[featuredigittimeout] => Integer, Optional[atxfernoanswertimeout] => Integer, Optional[atxferdropcall] => Enum['yes','no'], Optional[atxferloopdelay] => Integer, Optional[atxfercallbackretries] => Integer, }]
Asterisk::Logfile
Options that can be set for a log file
Alias of Struct[{ Optional[formatter] => Enum['default','json'], levels => Array[ Variant[ Enum['debug','notice','warning','error','dtmf','fax','security','verbose'], Pattern[/^verbose\([1-9]\d*\)$/]] ,1], }]
Asterisk::ManagerPerms
Possible permissions given to AMI users
- See also
- http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/AMI-configuration.html#AMI-readwriteopts
- List of rights and their meaning
Alias of Enum['all', 'system', 'call', 'log', 'verbose', 'agent', 'user', 'config', 'command', 'dtmf', 'reporting', 'cdr', 'dialplan', 'originate', 'agi', 'cc', 'aoc']
Dependencies
- puppetlabs/stdlib (>= 4.25.0 < 6.0.0)
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.