cookbook 'freeswitch', '~> 1.0.0'
freeswitch (16) Versions 1.0.0 Follow3
Installs/Configures FreeSWITCH
cookbook 'freeswitch', '~> 1.0.0', :supermarket
knife supermarket install freeswitch
knife supermarket download freeswitch
FreeSWITCH cookbook
This Chef cookbook installs FreeSWITCH either from source or packages and configures its basic settings. It is intended that this cookbook remain small and perform only installation tasks, with downstream cookbooks depending on it to configure FreeSWITCH for more specific tasks.
Requirements
Tested on Ubuntu 12.04, Debian 7.1 and CentOS 6.5.
Usage
Add recipe[freeswitch]
to your node's run list
Attributes
-
node['freeswitch']['install_method']
- the method by which to install FreeSWITCH. May bepackage
orsource
. This choice determines other applicable parameters. (defaultpackage
) -
node['freeswitch']['user']
- the user as which to run FreeSWITCH (defaultfreeswitch
) -
node['freeswitch']['group']
- the group as which to run FreeSWITCH (defaultfreeswitch
) -
node['freeswitch']['service']
- the service name as which to run FreeSWITCH (defaultfreeswitch
) -
node['freeswitch']['binpath']
- the path at which FreeSWITCH binaries are located (default/usr/bin
) -
node['freeswitch']['confpath']
- the path at which FreeSWITCH configuration is located (default/etc/freeswitch
) -
node['freeswitch']['homedir']
- the path at which FreeSWITCH's home directory is' located (default/var/lib/freeswitch
) -
node['freeswitch']['local_ip']
- the local IP FreeSWITCH listens on (defaultdefault['asterisk']['public_ip'] = node['ec2'] ? node['ec2']['public_ipv4'] : node['ipaddress']
) -
node['freeswitch']['domain']
- the domain at which FS acts as a registrar, etc (defaultnode['fqdn']
) -
node['freeswitch']['vars_template']
- the template file to use for placing FreeSWITCHvars.xml
-
node['freeswitch']['vars_template_cookbook']
- the cookbook from which to load the vars template -
node['freeswitch']['autoload_modules']
- the list of modules which FreeSWITCH should load on startup (default%w[mod_console mod_logfile mod_cdr_csv mod_event_socket mod_sofia mod_loopback mod_commands mod_conference mod_db mod_dptools mod_expr mod_fifo mod_hash mod_voicemail mod_esf mod_fsv mod_cluechoo mod_valet_parking mod_httapi mod_dialplan_xml mod_dialplan_asterisk mod_spandsp mod_g723_1 mod_g729 mod_amr mod_speex mod_h26x mod_vp8 mod_b64 mod_sndfile mod_native_file mod_local_stream mod_tone_stream mod_spidermonkey mod_lua mod_say_en]
)
Package install attributes
-
node['freeswitch']['package']['packages']
- the FreeSWITCH packages to install (default%w(freeswitch-meta-vanilla freeswitch-lang freeswitch-music freeswitch-sounds freeswitch-conf-vanilla)
on Debian/Ubuntu,%w(freeswitch freeswitch-lang-en freeswitch-sounds-music freeswitch-sounds-en-us-callie freeswitch-config-vanilla)
on RedHat/CentOS) -
node['freeswitch']['package']['repo']['enable']
- if the FreeSWITCH official repository should be enabled (defaulttrue
) -
node['freeswitch']['package']['repo']['url']
- the URL of the FreeSWITCH official repo (defaulthttp://files.freeswitch.org/repo/deb/debian
) -
node['freeswitch']['package']['repo']['distro']
- the distro to select from the repo (defaultwheezy
) -
node['freeswitch']['package']['repo']['branches']
- the branches of the repo to import (default%w(main)
) -
node['freeswitch']['package']['repo']['keyserver']
- the keyserver against which to auth the repo (defaultnil
, this will use the cookbook's stored GPG key) -
node['freeswitch']['package']['repo']['key']
- the repo's public GPG key (defaultfreeswitch.gpg
)
Source install attributes
-
node['freeswitch']['source']['git_uri']
- the URI of the FreeSWITCH git repository to use for installation (defaulthttps://stash.freeswitch.org/scm/fs/freeswitch.git
) -
node['freeswitch']['source']['git_branch']
- the branch of the git repository to install from (defaultv1.2.stable
) -
node['freeswitch']['source']['dependencies']
- the packages to be installed on which compilation depends (default%w[autoconf automake g++ git-core libjpeg62-dev libncurses5-dev libtool make python-dev gawk pkg-config gnutls-bin libsqlite3-dev bison libasound2-dev]
) -
node['freeswitch']['source']['modules']
- the modules to compile (default%w[loggers/mod_console loggers/mod_logfile applications/mod_cluechoo applications/mod_commands applications/mod_conference applications/mod_dptools applications/mod_db applications/mod_fifo applications/mod_hash applications/mod_httapi applications/mod_expr applications/mod_esf applications/mod_fsv applications/mod_spandsp applications/mod_valet_parking applications/mod_voicemail codecs/mod_g723_1 codecs/mod_amr codecs/mod_g729 codecs/mod_h26x codecs/mod_speex dialplans/mod_dialplan_xml dialplans/mod_dialplan_asterisk endpoints/mod_sofia endpoints/mod_loopback event_handlers/mod_event_socket event_handlers/mod_cdr_csv formats/mod_native_file formats/mod_sndfile formats/mod_local_stream formats/mod_tone_stream languages/mod_lua say/mod_say_en]
)
Recipes
-
freeswitch
- Fetches and installs FreeSWITCH
Resources/Providers
freeswitch_user
This LWRP provides an easy way to manage FreeSWITCH users (directory entries). FreeSWITCH XML config will be reloaded after a run which manipulates users.
Actions
- :add: adds a user to the directory
- :remove: removes a user from the directory
Attribute Parameters
- id: The user's ID. May be alphanumeric, and defaults to the name of the resource.
- directory: The name of the directory in which to place the user (must already exist). Defaults to
'default'
. - password: The user's password. Defaults to
$${default_password}
. - vm_password: The user's voicemail password. Defaults to
$${default_password}
. - effective_caller_id_name: The user's caller ID name. Defaults to
'Extension'
. - effective_caller_id_number: The user's caller ID number. Defaults to
$${outbound_caller_id}
. - cookbook: The name of the cookbook from which to fetch the user template. Defaults to this cookbook.
- template: The name of the template to use for the user's configuration. Defaults to
user.xml.erb
.
Examples
Add the joebloggs
user:
freeswitch_user 'joebloggs'
Add a user specifying all the possible attributes:
freeswitch_user 'joebloggs' do |variable| directory 'default' password 'foobar' vm_password 'barbaz' effective_caller_id_name 'Joe Bloggs' effective_caller_id_number 'joe@bloggs.com' cookbook 'my-wrapper-cookbook' template 'freeswitch-user.xml.erb' end
Remove the joebloggs
user:
freeswitch_user 'joebloggs' do action :remove end
Author
[Ben Langfeld](@benlangfeld)
develop
1.0.0
- Remove all things Rayo related. This has been moved into a downstream cookbook at http://github.com/mojolingo/freeswitch-rayo-cookbook
0.7.0
- Update URL for FreeSWITCH git repository (moved to Stash)
- Add additional dev packages now required for source builds
- Remove mod_enum which was breaking source builds
0.6.4
- mod_http_cache is now correctly installed for Rayo servers
0.6.3
- Use a stored GPG key instead of relying on keyservers
0.6.2
- Fix reloading after user resource execution
0.6.1
- Prevent conflicts between our init script and the one provided by packages
- Prefix package key ID for reliable lookup
0.6.0
- Allow specifying the cookbook from which to load the vars template
- Softly reload FreeSWITCH on config changes, rather than doing a full restart
0.5.0
- Allow creating FS users (directory entries) via a LWRP
0.4.2
- Update source build dependencies
0.4.1
- Only place config templates on initial installation. Avoids unnecessarily bouncing config and restarting FreeSWITCH on every run.
- Speed up the source build
- Add additional development pkgs needed by FS master
0.4.0
- Bump to yum 3.x cookbook
0.3.2
- Ensure that mod_ssml, mod_flite and mod_pocketsphinx get installed for a Rayo server
0.3.1
- Install rayo config in source install
0.3.0
- Add support for CentOS
- Default local_ip to the primary interface's IP
0.2.0
- Add rayo recipe for deploying a Rayo server
0.1.0
- First release
Collaborator Number Metric
1.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC064: Ensure issues_url is set in metadata: freeswitch/metadata.rb:1
FC065: Ensure source_url is set in metadata: freeswitch/metadata.rb:1
FC066: Ensure chef_version is set in metadata: freeswitch/metadata.rb:1
FC069: Ensure standardized license defined in metadata: freeswitch/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: freeswitch/resources/user.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
freeswitch/files/default/freeswitch.gpg
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC064: Ensure issues_url is set in metadata: freeswitch/metadata.rb:1
FC065: Ensure source_url is set in metadata: freeswitch/metadata.rb:1
FC066: Ensure chef_version is set in metadata: freeswitch/metadata.rb:1
FC069: Ensure standardized license defined in metadata: freeswitch/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: freeswitch/resources/user.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
freeswitch/files/default/freeswitch.gpg
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
FC065: Ensure source_url is set in metadata: freeswitch/metadata.rb:1
FC066: Ensure chef_version is set in metadata: freeswitch/metadata.rb:1
FC069: Ensure standardized license defined in metadata: freeswitch/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: freeswitch/resources/user.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
freeswitch/files/default/freeswitch.gpg
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number