项目作者: mwolff44

项目描述 :
Ansible role for freeswitch (debian)
高级语言: Shell
项目地址: git://github.com/mwolff44/freeswitch-mw.git
创建时间: 2015-01-13T16:09:17Z
项目社区:https://github.com/mwolff44/freeswitch-mw

开源协议:GNU General Public License v3.0

下载


Freeswitch-mw

Build Status
Galaxy

Ansible role for FreeSwitch 1.6

Requirements

  • Tested on Ansible 2.0 or higher.

Ansible installation via pip

  1. sudo apt-get install -y ansible

Role Variables

The role variables and default values.

FreeSwitch

  1. freeswitch_conf_dir: '/etc/freeswitch' # Configuration directory
  2. freeswitch_symlinks: True # default FS layout in /usr/local/freeswitch by creating symlinks
  3. freeswitch_install_conf: True # Allow the installation of the configuration files - Could be disabled when updating
  4. freeswitch_conf_backup_dir: '/etc/freeswitch.orig' # Backup configuration directory
  5. freeswitch_config_template_dir: '../templates/freeswitch/config' # Templates directory used for FreeSwitch configuration
  6. freeswitch_config_list: # List of templates config files with ending ".j2"
  7. - autoload_configs/console.conf.xml.j2
  8. - autoload_configs/logfile.conf.xml.j2
  9. - autoload_configs/modules.conf.xml.j2
  10. - autoload_configs/switch.conf.xml.j2
  11. - autoload_configs/syslog.conf.xml.j2
  12. freeswitch_install_script: True # Allow the installation of the script files - Could be disabled when updating
  13. freeswitch_script_dir: '/usr/share/freeswitch/scripts' # Script directory
  14. freeswitch_script_backup_dir: '/usr/share/freeswitch/scripts.orig' # Backup cscript directory
  15. freeswitch_script_template_dir: '../templates/freeswitch/scripts' # Templates directory used for FreeSwitch script
  16. freeswitch_script_list: # List of templates script files with ending ".j2"
  17. - test.lua.j2
  18. freeswitch_packages: # FreeSwitch packages to be installed
  19. - freeswitch-meta-all
  20. - freeswitch-all-dbg
  21. - gdb

FreeSwitch config

  1. freeswitch_log_mapping: <map name="err" value="debug,info,notice,warning,err,crit,alert"></map>
  2. freeswitch_log_max_rotate: <!-- <param name="maximum-rotate" value="32"/> -->
  3. freeswitch_max_db_handles: 50 # Maximum number of simultaneous DB handles open
  4. freeswitch_db_handle_timeout: 10 # Maximum number of seconds to wait for a new DB handle before failing
  5. freeswitch_min_idle_cpu: 25 # Minimum idle CPU before refusing calls
  6. freeswitch_max_sessions: 1000 # Max number of sessions to allow at any given time
  7. freeswitch_sessions_per_second: 30 # Most channels to create per second
  8. freeswitch_global_loglevel: debug # Default Global Log Level - value is one of debug,info,notice,warning,err,crit,alert
  9. freeswitch_rtp_start_port: 16384
  10. freeswitch_rtp_end_port: 32768

ODBC

  1. odbc_install: false
  2. odbc_packages_install: false
  3. odbc_packages:
  4. - unixodbc-bin
  5. - unixodbc-dev
  6. odbc_postgresql_install: false
  7. odbc_postgresql_packages:
  8. - odbc-postgresql
  9. postgresql_packages_install: false
  10. odbc_template_dir: '../templates/odbc' # Templates directory used for ODBC
  11. odbc_server: 127.0.0.1
  12. odbc_port: 5432
  13. odbc_database: 'mydatabase'
  14. odbc_user: 'myuser'
  15. odbc_password: 'mypass'
  16. odbc_tracefile: '/tmp/psqlodbc.log'

Fail2ban

  1. fail2ban_install: False # Default : fail2ban will not be installed
  2. fail2ban_local_jail_file: /etc/fail2ban/jail.local # fail2ban jail file for FreeSwitch
  3. fail2ban_filter_dir: /etc/fail2ban/filter.d # fail2ban filter directory
  4. fail2ban_local_jail: ../templates/fail2ban/jail.local # fail2ban template jail for FreeSwitch
  5. fail2ban_fs: ../templates/fail2ban/freeswitch.conf # Fail2ban filter template for FreeSwitch
  6. fail2ban_dos_fs: ../templates/fail2ban/freeswitch-dos.conf # Fail2ban filter template for freeswitch dos

Sngrep

  1. sngrep_install: False # Default : sngrep will not be installed

Time sync with systemd

  1. ntp_install: False # Default : time sync will not be configured
  2. ntp_servers: '{{ ntp_servers_map[ansible_distribution]
  3. | d(ntp_servers_map["default"]) }}'
  4. ntp_servers_map:
  5. 'Debian': [ '0.debian.pool.ntp.org', '1.debian.pool.ntp.org',
  6. '2.debian.pool.ntp.org', '3.debian.pool.ntp.org' ]
  7. 'Ubuntu': [ '0.ubuntu.pool.ntp.org', '1.ubuntu.pool.ntp.org',
  8. '2.ubuntu.pool.ntp.org', '3.ubuntu.pool.ntp.org' ]
  9. 'default': [ '0.pool.ntp.org', '1.pool.ntp.org',
  10. '2.pool.ntp.org', '3.pool.ntp.org' ]
  11. ntp_timezone: 'Europe/Paris'
  12. ntp_timesyncd_template : ../templates/etc/systemd/timesyncd.conf.d/ansible.conf.j2

Dependencies

No

Usage

Add mwolff44.freeswitch-mw to your roles ans setup the variables in your playbook file. Example :

  1. - hosts: all
  2. vars_files:
  3. - 'defaults/main.yml'
  4. tasks:
  5. - include: 'tasks/main.yml'
  6. handlers:
  7. - include: 'handlers/main.yml'

License

Licensed under the GPL v3 license. See the LICENSE file for details.

Contributor

A special thank to :
Bruno SALZANO / d4rkstar@gmail.com"">d4rkstar@gmail.com

Author Information

Mathias WOLFF / Blog des télécoms - PyFreeBilling