c32cec2836
Telephone calls are generally 8 kHz. With VoIP, higher sample rates are possible. G.722 is the most common, which is 16 kHz. Conferencing supports these higher sample rates, as well. Make sure we have the higher quality sound prompts installed as well in case we can make use of them. While we're at it, install the gsm prompts, as well. That is the low bandwidth codec currently allowed. Change-Id: I34921fa6a00720d05113a848bc9f1f94f2200c8b
107 lines
2.8 KiB
Puppet
107 lines
2.8 KiB
Puppet
# Copyright 2013 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# Class to configure asterisk on a CentOS node.
|
|
#
|
|
# Note that every node must provide its own asterisk.conf and modules.conf files.
|
|
# All other configuration customizations should be done as overrides to the default
|
|
# configuration by dropping files into the appropriate conf.d directory.
|
|
#
|
|
# == Class: asterisk
|
|
class asterisk (
|
|
$asterisk_conf_source = '',
|
|
$modules_conf_source = '',
|
|
) {
|
|
yumrepo { 'asteriskcurrent':
|
|
baseurl => 'http://packages.asterisk.org/centos/$releasever/current/$basearch/',
|
|
descr => 'Asterisk supporting packages produced by Digium',
|
|
enabled => 1,
|
|
gpgcheck => 0,
|
|
}
|
|
|
|
yumrepo { 'asterisk11':
|
|
baseurl => 'http://packages.asterisk.org/centos/$releasever/asterisk-11/$basearch/',
|
|
descr => 'Asterisk packages produced by Digium',
|
|
enabled => 1,
|
|
gpgcheck => 0,
|
|
require => Yumrepo['asteriskcurrent'],
|
|
}
|
|
|
|
package { 'asterisknow-version' :
|
|
ensure => present,
|
|
require => [
|
|
Yumrepo['asteriskcurrent'],
|
|
],
|
|
}
|
|
|
|
package { 'asterisk' :
|
|
ensure => present,
|
|
require => [
|
|
Yumrepo['asterisk11'],
|
|
Package['asterisknow-version'],
|
|
],
|
|
}
|
|
|
|
$sounds = [
|
|
'asterisk-sounds-core-en-g722',
|
|
'asterisk-sounds-core-en-ulaw',
|
|
'asterisk-sounds-core-en-gsm',
|
|
'asterisk-sounds-extra-en-g722',
|
|
'asterisk-sounds-extra-en-ulaw',
|
|
'asterisk-sounds-extra-en-gsm',
|
|
'asterisk-sounds-moh-opsound-wav',
|
|
'asterisk-sounds-moh-opsound-ulaw',
|
|
]
|
|
|
|
package { $sounds :
|
|
ensure => present,
|
|
require => Yumrepo['asteriskcurrent'],
|
|
}
|
|
|
|
file {'/etc/asterisk/asterisk.conf':
|
|
ensure => present,
|
|
owner => 'asterisk',
|
|
group => 'asterisk',
|
|
mode => '0660',
|
|
source => $asterisk_conf_source,
|
|
}
|
|
|
|
file {'/etc/asterisk/modules.conf':
|
|
ensure => present,
|
|
owner => 'asterisk',
|
|
group => 'asterisk',
|
|
mode => '0660',
|
|
source => $modules_conf_source,
|
|
}
|
|
|
|
file {'/etc/asterisk/':
|
|
ensure => present,
|
|
recurse => true,
|
|
owner => 'asterisk',
|
|
group => 'asterisk',
|
|
mode => '0660',
|
|
source => 'puppet:///modules/asterisk/',
|
|
require => Package['asterisk'],
|
|
}
|
|
|
|
service { 'asterisk':
|
|
ensure => running,
|
|
enable => true,
|
|
require => [
|
|
Package['asterisk'],
|
|
File['/etc/asterisk/'],
|
|
]
|
|
}
|
|
}
|