asterisk
: Install and configure an asterisk server.asterisk::dahdi
: Requirements for the asterisk dahdi module to work
asterisk::config
: asterisk basic configuration files.asterisk::install
: Install packages that are necessary for an asterisk server.asterisk::service
: Ensure the Asterisk service is running.
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
asterisk::dotd::file
: Create a file inside a .d directory and set its permissions correctly.
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
Install and configure an asterisk server.
-
TODO make it possible to manage dialplan with the two other methods (e.g. AEL and Lua)
-
See also
class { 'asterisk': }
The following parameters are available in the asterisk
class:
manage_service
manage_package
package_name
service_name
confdir
purge_confdir
iax_general
iax_contexts
iax_registries
sip_general
sip_peers
sip_registries
voicemail_general
voicemails
extensions_general
extensions_globals
extension_contexts
agents_global
agents
features_general
features_featuremap
features_applicationmap
features
logger_general
log_files
queues_general
queues
modules_autoload
modules_preload
modules_noload
modules_load
modules_global
manager_enable
manager_port
manager_bindaddr
manager_accounts
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.
Data type: Boolean
Set this to false to avoid installing the asterisk package.
Data type: Variant[String, Array[String]]
Name or array of the package(s) being installed for asterisk.
Data type: String
Name of the asterisk service.
Data type: Stdlib::Absolutepath
Absolute path to the asterisk configuration directory.
Data type: Boolean
Set this to true to enable autoremoval of configuration files that are
not managed by puppet inside of asterisk's confdir
.
Data type: Hash
Global configurations for IAX2. Options are set in the file as key = value
in the [general]
section of iax.conf
.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::iax
defined types.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate
asterisk::registry::iax
defined types.
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.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::sip
defined types.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate
asterisk::registry::sip
defined types.
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.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::voicemail
defined types.
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.
Data type: Asterisk::ExtGlobalVars
Hash of global variables for the dialplan, placed in the [globals]
section of the extensions.conf
file.
WARNING: If you load any other extension configuration engine, such as pbx_ael.so, your global variables may be overridden by that file. Please take care to use only one location to set global variables, and you will likely save yourself a ton of grief.
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.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::extension
defined types.
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.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::agent
defined types.
Data type: Asterisk::FeaturesGeneral
Global call features. Options are set in the file as key = value
in the
[general]
section of features.conf
.
Data type: Asterisk::Featuremap
Global feature maps. Options are set in the file as key => value
in the
[featuremap]
section of features.conf
.
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
.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::feature
defined types.
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
.
Data type: Hash[String,Asterisk::Logfile]
A hash defining log files.
Top-level keys set log file names.
Log files can use the special names console
or syslog
to determine
what output is sent to the asterisk CLI console and syslog, respectively.
All other top-level keys represent a file name. File names can
be either relative to the asterisk.conf
setting astlogdir
or an
absolute path.
Values associated to the top-level keys should be a hash that
contains at least one key, levels
. The value for levels
should be an
array listing logging levels for this log file.
As well as levels
, there can be an optional key, formatter
. Its value
should be a string containing either default
or json
and it defines
which format will be output to the log. If the formatter
key is
omitted, asterisk's default log format is used.
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.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::queue
defined types.
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.
Data type: Array[String]
List of modules that asterisk should load before asterisk core has been initialized. This can be useful if you wish to map all module configuration files into Realtime storage.
Data type: Array[String]
List of modules that asterisk should not load. This can be useful if
modules_autoload
is set to true
.
Data type: Array[String]
List of modules that asterisk should load on startup. This is useful if
you've set modules_autoload
to false
.
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.
Data type: Boolean
Set this to false to disable asterisk manager.
Data type: Integer
Port number on which asterisk will listen to for manager connections. Defaults to 5038.
Data type: String
IP address to have asterisk bind to for manager connections. Defaults to binding to localhost.
Data type: Stdlib::CreateResources
Hash of resource_name => params used to instantiate asterisk::manager
defined types.
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 could be merged into config.pp and used conditionally to a boolean parameter that enables/disables (off by default) dahdi.
-
See also
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
asterisk::agent { 'provocateur':
ext => '700',
password => Sensitive.new('supersecret'),
agent_name => 'provocateur',
}
The following parameters are available in the asterisk::agent
defined type:
Data type: String
Extension corresponding to the agent.
Data type: Sensitive[String]
Login password of the agent.
Data type: String
Name by which the agent is referred to within dialplan.
Data type: Stdlib::Ensure::File::File
Can be set to absent to remove a given agent.
Default value: file
Data type: Array[String[1]]
List of groups to which the agent is associated.
Default value: []
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
asterisk::extensions { 'basic':
content => 'exten => 666,1,Hangup()',
}
The following parameters are available in the asterisk::extensions
defined type:
Data type: Stdlib::Ensure::File::File
Set this to false to remove the corresponding configuration file.
Default value: file
Data type: Optional[Stdlib::Filesource]
Puppet file source where the contents of the file can be found.
Default value: undef
Data type: Optional[String]
Textual contents of the file. This option is mutually exclusive with
$source
.
Default value: undef
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
asterisk::feature { 'shifteight':
options => {
unpauseMonitor => '*1',
pauseMonitor => '*2',
}
}
The following parameters are available in the asterisk::feature
defined type:
Data type: Hash
Hash of options with keys being option names and values their values.
Data type: Stdlib::Ensure::File::File
Set this to absent
to remove the feature.
Default value: file
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
The following parameters are available in the asterisk::iax
defined type:
Data type: Stdlib::Ensure::File::File
Set this to absent
to remove the configuration file.
Default value: file
Data type: Optional[Stdlib::Filesource]
Puppet file source where the contents of the file can be found.
Default value: undef
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
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.
asterisk::language { ['de', 'es']: }
Configure an asterisk manager
- See also
asterisk::manager { 'sophie':
secret => Sensitive.new('youllneverguesswhatitis'),
permit => ['192.168.120.0/255.255.255.0'],
}
The following parameters are available in the asterisk::manager
defined type:
Data type: Sensitive[String[1]]
Authentication password for the manager.
Data type: Stdlib::Ensure::File::File
Set to absent
to remove the manager.
Default value: file
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
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']
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']
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']
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']
Data type: Integer
Timeout in milliseconds used by Asterisk when writing data to the AMI connection for this user.
Default value: 100
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
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
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
asterisk::queue { 'shortq':
stragegy => 'random',
maxlen => 10,
}
The following parameters are available in the asterisk::queue
defined type:
ensure
strategy
context
defaultrule
maxlen
musicclass
servicelevel
members
memberdelay
penaltymemberslimit
membermacro
membergosub
setinterfacevar
setqueuevar
setqueueentryvar
weight
reportholdtime
ringinuse
wrapuptime
timeout
timeoutrestart
timeoutpriority
retry
autopause
joinempty
leavewhenempty
eventwhencalled
eventmemberstatus
monitor_type
monitor_format
autofill
announce
announce_frequency
min_announce_frequency
announce_holdtime
announce_position
announce_position_limit
announce_round_seconds
periodic_announce
periodic_announce_frequency
random_periodic_announce
relative_periodic_announce
queue_youarenext
queue_thereare
queue_callswaiting
queue_holdtime
queue_minute
queue_minutes
queue_seconds
queue_thankyou
queue_reporthold
Data type: Stdlib::Ensure::File::File
Set this to absent
in order to remove a queue.
Default value: file
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
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
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
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
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
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
Data type: Array[String[1]]
List of static members of this queue. Each member should be specified a
Technology/Device_ID
.
Default value: []
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
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
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
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
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
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
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
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
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
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
Data type: Optional[Integer]
Number of seconds to keep a member unavailable in a queue after completing a call.
Default value: undef
Data type: Optional[Integer]
Number of seconds to ring a member’s device. Also see timeoutpriority
.
Default value: undef
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
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
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
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
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: []
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: []
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
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
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
Data type: Array[String[1]]
File format to use when recording. If unspecified, calls will not be recorded.
Default value: []
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
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
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
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
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
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
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
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
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: []
Data type: Optional[Integer]
Time in seconds between periodic announcements to the caller.
Default value: undef
Data type: Optional[String[1]]
If set to yes
, will play the defined periodic announcements in a random
order.
Default value: undef
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
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
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
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
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
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
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
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
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
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
This makes it possible to register to an IAX2 peer for authenticated connections.
The following parameters are available in the asterisk::registry::iax
defined type:
Data type: Stdlib::Host
Hostname or IP address of the server to which Asterisk should register.
Data type: String[1]
User name used for authenticating with the distant server.
Data type: Sensitive[String[1]]
Password used for authenticating.
Data type: Stdlib::Ensure::File::File
Set to absent
in order to remove the registry.
Default value: file
This makes it possible to register to a SIP peer for authenticated connections.
The following parameters are available in the asterisk::registry::sip
defined type:
Data type: Stdlib::Host
Hostname or IP address of the server to which Asterisk should register.
Data type: String[1]
User id for the local server.
Data type: Stdlib::Ensure::File::File
Set to absent
in order to remove the registry.
Default value: file
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
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
Data type: Optional[Integer]
Numerical port with which a connection will be established to the remote server.
Default value: undef
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
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
asterisk::sip { 'providerZ':
account_type => 'peer',
disallow => ['all'],
allow => ['ulaw'],
host => 'sip-host.local',
secret => Sensitive.new('callthisasecret'),
}
The following parameters are available in the asterisk::sip
defined type:
ensure
template_name
account_type
username
defaultuser
secret
md5secret
remotesecret
context
canreinvite
directmedia
directrtpsetup
directmediadeny
directmediapermit
host
insecure
language
nat
qualify
vmexten
callerid
call_limit
callgroup
mailbox
pickupgroup
fromdomain
fromuser
outboundproxy
t38pt_udptl
disallow
allow
dtmfmode
transports
encryption
access
trustrpid
sendrpid
Data type: Stdlib::Ensure::File::File
Set this to absent
in order to remove SIP configuration.
Default value: file
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
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'
Data type: Optional[String[1]]
Deprecated option in asterisk. You probably want to use defaultuser
instead.
Default value: undef
Data type: Optional[String[1]]
Authentication user name.
Default value: undef
Data type: Optional[Sensitive[String[1]]]
Authentication secret for inbound connections.
Default value: undef
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
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
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
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: undef
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'
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
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: []
Data type: Array[String[1]]
List of CIDR prefixes that should be allowed passing directmedia to other
peers. See directmediadeny
.
Default value: []
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'
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'
Data type: Optional[String[1]]
Language code to define prompts for this peer/user.
Default value: 'en'
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
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'
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
Data type: Optional[String[1]]
Caller ID information used when nothing else is available. When
unspecified, defaults to asterisk
.
Default value: undef
Data type: Optional[Integer]
Number of simultaneous calls through this user/peer.
Default value: undef
Data type: Optional[String[1]]
Call groups for calls to this device.
Default value: undef
Data type: Optional[String[1]]
Voicemail extension (for message waiting indications). Not valid for type
set to user
.
Default value: undef
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
Data type: Optional[String[1]]
Default From:
domain in SIP messages when acting as a SIP UAC (client).
Default value: undef
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
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
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
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: []
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: []
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
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: []
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: undef
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: []
Data type: Optional[Enum['yes', 'no']]
If a Remote-Party-ID SIP header should be sent. Defaults to no
.
Default value: undef
Data type: Optional[Enum['yes', 'no', 'pai', 'rpid']]
If Remote-Party-ID SIP header should be trusted. Defaults to no
.
Default value: undef
Configure a voicemail
asterisk::voicemail { 'taro':
context => 'support2',
password => Sensitive.new('557722981749'),
email => '[email protected]',
}
The following parameters are available in the asterisk::voicemail
defined type:
Data type: String[1]
Name of the context in which the voicemail is assigned.
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.
Data type: Stdlib::Ensure::File::File
Set to absent
to remove the voicemail.
Default value: file
Data type: Optional[String[1]]
Name assigned to the voicemail, usually the name of the person using it.
Default value: undef
Data type: Optional[String[1]]
Email address to which voicemail message sounds will be sent.
Default value: undef
Data type: Optional[String[1]]
Email address to which a page will be sent upon receiving a voicemail.
Default value: undef
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: {}
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]
A hash of global variables for the dialplan
Alias of Hash[String, Variant[String,Sensitive]]
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],
}]
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,
}]
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],
}]
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']