Browse Source

first commit

master
Blagovest Petrov 9 years ago
parent
commit
8e105928e3
  1. 1
      .gitignore
  2. 50
      README.md
  3. 12
      files/freepbx.service
  4. 2326
      files/menuselect-tree
  5. 204
      files/menuselect.makedeps
  6. 109
      files/menuselect.makeopts
  7. 22
      handlers/main.yml
  8. 14
      meta/main.yml
  9. 265
      tasks/main.yml
  10. 36
      vars/main.yml

1
.gitignore

@ -0,0 +1 @@
*~

50
README.md

@ -0,0 +1,50 @@
freepbx13
===============
This role will instal freepbx 13.
Requirements
---------------------
Needs root/sudo
Role Varibles
-----------------
Nothing for now.
Example
---------------
- hosts: freepbx
user: root
roles:
- {role: eniac111.freepbx13}
Dependencies
-----------------
None
License
-------
2-clause BSD
Author Information
------------------
Blagovest Petrov
http://petrovs.info
Notice
------
Tested on Centos 7 running on LXC. Should work on older versions too.
TODO
----
* Support for Debian/Ubuntu
* Asterisk "make menuedit" settings to be configured by Ansible variables

12
files/freepbx.service

@ -0,0 +1,12 @@
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start
ExecStop=/usr/sbin/fwconsole stop
[Install]
WantedBy=multi-user.target

2326
files/menuselect-tree

File diff suppressed because it is too large

204
files/menuselect.makedeps

@ -0,0 +1,204 @@
MENUSELECT_DEPENDS_chan_mobile=BLUETOOTH
MENUSELECT_DEPENDS_res_config_mysql=MYSQLCLIENT
MENUSELECT_DEPENDS_app_mysql=MYSQLCLIENT
MENUSELECT_DEPENDS_cdr_mysql=MYSQLCLIENT
MENUSELECT_DEPENDS_app_flash=DAHDI
MENUSELECT_DEPENDS_app_dahdiras=DAHDI
MENUSELECT_DEPENDS_app_fax=SPANDSP
MENUSELECT_DEPENDS_app_jack=JACK RESAMPLE
MENUSELECT_DEPENDS_app_meetme=DAHDI
MENUSELECT_DEPENDS_app_osplookup=OSPTK OPENSSL
MENUSELECT_DEPENDS_cdr_syslog=SYSLOG
MENUSELECT_DEPENDS_cdr_pgsql=PGSQL
MENUSELECT_DEPENDS_cdr_radius=RADIUS
MENUSELECT_DEPENDS_cdr_sqlite3_custom=SQLITE3
MENUSELECT_DEPENDS_cdr_tds=FREETDS
MENUSELECT_DEPENDS_cdr_sqlite=SQLITE
MENUSELECT_DEPENDS_cel_pgsql=PGSQL
MENUSELECT_DEPENDS_cel_radius=RADIUS
MENUSELECT_DEPENDS_cel_sqlite3_custom=SQLITE3
MENUSELECT_DEPENDS_cel_tds=FREETDS
MENUSELECT_DEPENDS_chan_dahdi=DAHDI TONEZONE PRI SS7 OPENR2
MENUSELECT_DEPENDS_chan_iax2=CRYPTO
MENUSELECT_DEPENDS_chan_motif=IKSEMEL OPENSSL
MENUSELECT_DEPENDS_chan_pjsip=PJPROJECT
MENUSELECT_DEPENDS_chan_alsa=ALSA
MENUSELECT_DEPENDS_chan_console=PORTAUDIO
MENUSELECT_DEPENDS_chan_misdn=ISDNNET MISDN SUPPSERV
MENUSELECT_DEPENDS_chan_nbs=NBS
MENUSELECT_DEPENDS_chan_oss=OSS
MENUSELECT_DEPENDS_chan_phone=IXJUSER
MENUSELECT_DEPENDS_chan_vpb=VPB
MENUSELECT_DEPENDS_codec_dahdi=DAHDI
MENUSELECT_DEPENDS_codec_gsm=GSM
MENUSELECT_DEPENDS_codec_ilbc=ILBC
MENUSELECT_DEPENDS_codec_speex=SPEEX SPEEX_PREPROCESS SPEEXDSP
MENUSELECT_DEPENDS_format_ogg_vorbis=VORBIS OGG
MENUSELECT_DEPENDS_func_aes=CRYPTO
MENUSELECT_DEPENDS_func_curl=CURL
MENUSELECT_DEPENDS_func_iconv=ICONV
MENUSELECT_DEPENDS_func_pjsip_aor=PJPROJECT
MENUSELECT_DEPENDS_func_pjsip_contact=PJPROJECT
MENUSELECT_DEPENDS_func_pjsip_endpoint=PJPROJECT
MENUSELECT_DEPENDS_func_speex=SPEEX SPEEX_PREPROCESS SPEEXDSP
MENUSELECT_DEPENDS_pbx_dundi=ZLIB CRYPTO
MENUSELECT_DEPENDS_pbx_lua=LUA
MENUSELECT_DEPENDS_res_calendar_caldav=NEON ICAL LIBXML2
MENUSELECT_DEPENDS_res_calendar_ews=NEON29
MENUSELECT_DEPENDS_res_calendar_exchange=NEON ICAL IKSEMEL
MENUSELECT_DEPENDS_res_calendar_icalendar=NEON ICAL
MENUSELECT_DEPENDS_res_config_curl=CURL
MENUSELECT_DEPENDS_res_config_sqlite3=SQLITE3
MENUSELECT_DEPENDS_res_crypto=OPENSSL
MENUSELECT_DEPENDS_res_curl=CURL
MENUSELECT_DEPENDS_res_http_post=GMIME
MENUSELECT_DEPENDS_res_odbc=GENERIC_ODBC LTDL
MENUSELECT_DEPENDS_res_pjproject=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_acl=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_authenticator_digest=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_caller_id=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_config_wizard=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_dialog_info_body_generator=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_diversion=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_dlg_options=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_dtmf_info=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_endpoint_identifier_anonymous=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_endpoint_identifier_ip=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_endpoint_identifier_user=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_exten_state=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_header_funcs=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_logger=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_messaging=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_multihomed=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_mwi=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_mwi_body_generator=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_nat=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_notify=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_one_touch_record_info=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_outbound_authenticator_digest=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_outbound_publish=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_outbound_registration=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_path=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_pidf_body_generator=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_pidf_digium_body_supplement=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_pidf_eyebeam_body_supplement=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_publish_asterisk=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_pubsub=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_refer=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_registrar=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_registrar_expire=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_rfc3326=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_sdp_rtp=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_send_to_voicemail=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_session=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_sips_contact=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_t38=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_transport_management=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_transport_websocket=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_xpidf_body_generator=PJPROJECT
MENUSELECT_DEPENDS_res_rtp_asterisk=PJPROJECT
MENUSELECT_DEPENDS_res_srtp=SRTP
MENUSELECT_DEPENDS_res_stasis_test=TEST_FRAMEWORK
MENUSELECT_DEPENDS_res_timing_dahdi=DAHDI
MENUSELECT_DEPENDS_res_timing_timerfd=TIMERFD
MENUSELECT_DEPENDS_res_xmpp=IKSEMEL OPENSSL
MENUSELECT_DEPENDS_res_config_ldap=LDAP
MENUSELECT_DEPENDS_res_config_pgsql=PGSQL
MENUSELECT_DEPENDS_res_config_sqlite=SQLITE
MENUSELECT_DEPENDS_res_corosync=COROSYNC
MENUSELECT_DEPENDS_res_fax_spandsp=SPANDSP
MENUSELECT_DEPENDS_res_hep_pjsip=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_history=PJPROJECT
MENUSELECT_DEPENDS_res_pjsip_phoneprov_provider=PJPROJECT
MENUSELECT_DEPENDS_res_snmp=NETSNMP
MENUSELECT_DEPENDS_res_timing_kqueue=KQUEUE
MENUSELECT_DEPENDS_test_abstract_jb=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_acl=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_amihooks=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_aoc=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_app=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_ari=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_ari_model=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_ast_format_str_reduce=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_astobj2=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_astobj2_thrash=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_bucket=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_callerid=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_cdr=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_cel=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_channel_feature_hooks=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_config=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_core_codec=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_core_format=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_db=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_devicestate=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_dlinklists=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_endpoints=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_event=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_expr=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_format_cache=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_format_cap=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_func_file=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_gosub=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_hashtab_thrash=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_heap=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_jitterbuf=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_json=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_linkedlists=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_locale=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_logger=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_message=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_named_lock=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_netsock2=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_optional_api=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_pbx=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_poll=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_res_stasis=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_sched=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_scoped_lock=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_security_events=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_skel=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_sorcery=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_sorcery_astdb=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_sorcery_memory_cache_thrash=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_sorcery_realtime=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_stasis=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_stasis_channels=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_stasis_endpoints=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_stringfields=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_strings=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_substitution=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_taskprocessor=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_threadpool=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_time=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_uri=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_utils=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_uuid=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_vector=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_voicemail_api=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_websocket_client=TEST_FRAMEWORK
MENUSELECT_DEPENDS_test_xml_escape=TEST_FRAMEWORK
MENUSELECT_DEPENDS_BETTER_BACKTRACES=BFD DLADDR
MENUSELECT_DEPENDS_BUILD_NATIVE=NATIVE_ARCH
MENUSELECT_DEPENDS_REBUILD_PARSERS=BISON FLEX
MENUSELECT_DEPENDS_USE_HOARD_ALLOCATOR=HOARD
MENUSELECT_DEPENDS_ADDRESS_SANITIZER=HAVE_ADDRESS_SANITIZER
MENUSELECT_DEPENDS_THREAD_SANITIZER=HAVE_THREAD_SANITIZER
MENUSELECT_DEPENDS_LEAK_SANITIZER=HAVE_LEAK_SANITIZER
MENUSELECT_DEPENDS_UNDEFINED_SANITIZER=HAVE_UNDEFINED_SANITIZER
MENUSELECT_DEPENDS_ODBC_STORAGE=GENERIC_ODBC LTDL
MENUSELECT_DEPENDS_IMAP_STORAGE=IMAP_TK OPENSSL
MENUSELECT_DEPENDS_astman=NEWT
MENUSELECT_DEPENDS_smsq=POPT
MENUSELECT_DEPENDS_EMBED_ADDONS=GNU_LD
MENUSELECT_DEPENDS_EMBED_APPS=GNU_LD
MENUSELECT_DEPENDS_EMBED_BRIDGES=GNU_LD
MENUSELECT_DEPENDS_EMBED_CDR=GNU_LD
MENUSELECT_DEPENDS_EMBED_CHANNELS=GNU_LD
MENUSELECT_DEPENDS_EMBED_CODECS=GNU_LD
MENUSELECT_DEPENDS_EMBED_FORMATS=GNU_LD
MENUSELECT_DEPENDS_EMBED_FUNCS=GNU_LD
MENUSELECT_DEPENDS_EMBED_PBX=GNU_LD
MENUSELECT_DEPENDS_EMBED_RES=GNU_LD
MENUSELECT_DEPENDS_EMBED_TEST=GNU_LD

109
files/menuselect.makeopts

@ -0,0 +1,109 @@
MENUSELECT_ADDONS=chan_mobile chan_ooh323 res_config_mysql app_mysql cdr_mysql
MENUSELECT_APPS=app_flash app_skel app_dahdiras app_fax app_ivrdemo app_jack app_meetme app_osplookup app_saycounted app_setcallerid
MENUSELECT_BRIDGES=
MENUSELECT_CDR=cdr_radius cdr_tds cdr_sqlite
MENUSELECT_CEL=cel_radius cel_tds
MENUSELECT_CHANNELS=chan_dahdi chan_alsa chan_console chan_misdn chan_nbs chan_vpb
MENUSELECT_CODECS=codec_dahdi
MENUSELECT_FORMATS=
MENUSELECT_FUNCS=
MENUSELECT_PBX=
MENUSELECT_RES=res_ari_mailboxes res_http_post res_mwi_external res_mwi_external_ami res_stasis_mailbox res_stasis_test res_timing_dahdi res_chan_stats res_config_sqlite res_fax_spandsp res_pktccops res_timing_kqueue
MENUSELECT_TESTS=test_abstract_jb test_acl test_amihooks test_aoc test_app test_ari test_ari_model test_ast_format_str_reduce test_astobj2 test_astobj2_thrash test_bucket test_callerid test_cdr test_cel test_channel_feature_hooks test_config test_core_codec test_core_format test_db test_devicestate test_dlinklists test_endpoints test_event test_expr test_format_cache test_format_cap test_func_file test_gosub test_hashtab_thrash test_heap test_jitterbuf test_json test_linkedlists test_locale test_logger test_message test_named_lock test_netsock2 test_optional_api test_pbx test_poll test_res_stasis test_sched test_scoped_lock test_security_events test_skel test_sorcery test_sorcery_astdb test_sorcery_memory_cache_thrash test_sorcery_realtime test_stasis test_stasis_channels test_stasis_endpoints test_stringfields test_strings test_substitution test_taskprocessor test_threadpool test_time test_uri test_utils test_uuid test_vector test_voicemail_api test_websocket_client test_xml_escape
MENUSELECT_CFLAGS=LOADABLE_MODULES BUILD_NATIVE OPTIONAL_API
MENUSELECT_OPTS_app_voicemail=FILE_STORAGE
MENUSELECT_UTILS=astcanary astdb2sqlite3 astdb2bdb
MENUSELECT_AGIS=
MENUSELECT_EMBED=
MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-WAV CORE-SOUNDS-EN-ULAW CORE-SOUNDS-EN-ALAW CORE-SOUNDS-EN-GSM CORE-SOUNDS-EN-G729 CORE-SOUNDS-EN-G722 CORE-SOUNDS-EN-SLN16 CORE-SOUNDS-EN-SIREN7 CORE-SOUNDS-EN-SIREN14 CORE-SOUNDS-EN_AU-WAV CORE-SOUNDS-EN_AU-ULAW CORE-SOUNDS-EN_AU-ALAW CORE-SOUNDS-EN_AU-GSM CORE-SOUNDS-EN_AU-G729 CORE-SOUNDS-EN_AU-G722 CORE-SOUNDS-EN_AU-SLN16 CORE-SOUNDS-EN_AU-SIREN7 CORE-SOUNDS-EN_AU-SIREN14 CORE-SOUNDS-EN_GB-WAV CORE-SOUNDS-EN_GB-ULAW CORE-SOUNDS-EN_GB-ALAW CORE-SOUNDS-EN_GB-GSM CORE-SOUNDS-EN_GB-G729 CORE-SOUNDS-EN_GB-G722 CORE-SOUNDS-EN_GB-SLN16 CORE-SOUNDS-EN_GB-SIREN7 CORE-SOUNDS-EN_GB-SIREN14 CORE-SOUNDS-ES-WAV CORE-SOUNDS-ES-ULAW CORE-SOUNDS-ES-ALAW CORE-SOUNDS-ES-GSM CORE-SOUNDS-ES-G729 CORE-SOUNDS-ES-G722 CORE-SOUNDS-ES-SLN16 CORE-SOUNDS-ES-SIREN7 CORE-SOUNDS-ES-SIREN14 CORE-SOUNDS-FR-WAV CORE-SOUNDS-FR-ULAW CORE-SOUNDS-FR-ALAW CORE-SOUNDS-FR-GSM CORE-SOUNDS-FR-G729 CORE-SOUNDS-FR-G722 CORE-SOUNDS-FR-SLN16 CORE-SOUNDS-FR-SIREN7 CORE-SOUNDS-FR-SIREN14 CORE-SOUNDS-IT-WAV CORE-SOUNDS-IT-ULAW CORE-SOUNDS-IT-ALAW CORE-SOUNDS-IT-GSM CORE-SOUNDS-IT-G729 CORE-SOUNDS-IT-G722 CORE-SOUNDS-IT-SLN16 CORE-SOUNDS-IT-SIREN7 CORE-SOUNDS-IT-SIREN14 CORE-SOUNDS-RU-WAV CORE-SOUNDS-RU-ULAW CORE-SOUNDS-RU-ALAW CORE-SOUNDS-RU-GSM CORE-SOUNDS-RU-G729 CORE-SOUNDS-RU-G722 CORE-SOUNDS-RU-SLN16 CORE-SOUNDS-RU-SIREN7 CORE-SOUNDS-RU-SIREN14 CORE-SOUNDS-JA-WAV CORE-SOUNDS-JA-ULAW CORE-SOUNDS-JA-ALAW CORE-SOUNDS-JA-GSM CORE-SOUNDS-JA-G729 CORE-SOUNDS-JA-G722 CORE-SOUNDS-JA-SLN16 CORE-SOUNDS-JA-SIREN7 CORE-SOUNDS-JA-SIREN14 CORE-SOUNDS-SV-WAV CORE-SOUNDS-SV-ULAW CORE-SOUNDS-SV-ALAW CORE-SOUNDS-SV-GSM CORE-SOUNDS-SV-G729 CORE-SOUNDS-SV-G722 CORE-SOUNDS-SV-SLN16 CORE-SOUNDS-SV-SIREN7 CORE-SOUNDS-SV-SIREN14
MENUSELECT_MOH=MOH-OPSOUND-WAV MOH-OPSOUND-ULAW MOH-OPSOUND-ALAW MOH-OPSOUND-GSM MOH-OPSOUND-G729 MOH-OPSOUND-G722 MOH-OPSOUND-SLN16 MOH-OPSOUND-SIREN7 MOH-OPSOUND-SIREN14
MENUSELECT_EXTRA_SOUNDS=EXTRA-SOUNDS-EN-WAV EXTRA-SOUNDS-EN-ULAW EXTRA-SOUNDS-EN-ALAW EXTRA-SOUNDS-EN-GSM EXTRA-SOUNDS-EN-G729 EXTRA-SOUNDS-EN-G722 EXTRA-SOUNDS-EN-SLN16 EXTRA-SOUNDS-EN-SIREN7 EXTRA-SOUNDS-EN-SIREN14 EXTRA-SOUNDS-EN_GB-WAV EXTRA-SOUNDS-EN_GB-ULAW EXTRA-SOUNDS-EN_GB-ALAW EXTRA-SOUNDS-EN_GB-GSM EXTRA-SOUNDS-EN_GB-G729 EXTRA-SOUNDS-EN_GB-G722 EXTRA-SOUNDS-EN_GB-SLN16 EXTRA-SOUNDS-EN_GB-SIREN7 EXTRA-SOUNDS-EN_GB-SIREN14 EXTRA-SOUNDS-FR-WAV EXTRA-SOUNDS-FR-ULAW EXTRA-SOUNDS-FR-ALAW EXTRA-SOUNDS-FR-GSM EXTRA-SOUNDS-FR-G729 EXTRA-SOUNDS-FR-G722 EXTRA-SOUNDS-FR-SLN16 EXTRA-SOUNDS-FR-SIREN7 EXTRA-SOUNDS-FR-SIREN14
MENUSELECT_BUILD_DEPS=bridge_holding app_cdr app_confbridge res_monitor res_speech res_agi res_stasis res_adsi res_smdi res_odbc res_xmpp res_pjsip res_pjsip_session res_crypto res_http_websocket app_chanspy func_cut func_groupcount func_uri res_ael_share res_ari res_ari_model res_stasis_recording res_stasis_playback res_stasis_answer res_stasis_snoop res_stasis_device_state func_periodic_hook res_pjproject res_sorcery_config res_sorcery_memory res_sorcery_astdb res_pjsip_pubsub res_pjsip_exten_state res_pjsip_outbound_publish res_statsd res_hep res_phoneprov DONT_OPTIMIZE G711_NEW_ALGORITHM
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_flash
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_dahdiras
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_jack
MENUSELECT_DEPSFAILED=MENUSELECT_APPS=app_osplookup
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_radius
MENUSELECT_DEPSFAILED=MENUSELECT_CDR=cdr_tds
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_radius
MENUSELECT_DEPSFAILED=MENUSELECT_CEL=cel_tds
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_alsa
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_console
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_misdn
MENUSELECT_DEPSFAILED=MENUSELECT_CHANNELS=chan_nbs
MENUSELECT_DEPSFAILED=MENUSELECT_CODECS=codec_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_http_post
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_stasis_test
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_timing_dahdi
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_config_sqlite
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_fax_spandsp
MENUSELECT_DEPSFAILED=MENUSELECT_RES=res_timing_kqueue
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_abstract_jb
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_acl
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_amihooks
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_aoc
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_app
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_ari
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_ari_model
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_ast_format_str_reduce
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_astobj2
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_astobj2_thrash
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_bucket
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_callerid
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_cdr
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_cel
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_channel_feature_hooks
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_config
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_core_codec
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_core_format
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_db
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_devicestate
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_dlinklists
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_endpoints
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_event
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_expr
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_format_cache
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_format_cap
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_func_file
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_gosub
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_hashtab_thrash
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_heap
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_jitterbuf
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_json
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_linkedlists
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_locale
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_logger
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_message
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_named_lock
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_netsock2
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_optional_api
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_pbx
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_poll
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_res_stasis
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sched
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_scoped_lock
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_security_events
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_skel
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sorcery
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sorcery_astdb
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sorcery_memory_cache_thrash
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_sorcery_realtime
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_stasis
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_stasis_channels
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_stasis_endpoints
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_stringfields
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_strings
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_substitution
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_taskprocessor
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_threadpool
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_time
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_uri
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_utils
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_uuid
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_vector
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_voicemail_api
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_websocket_client
MENUSELECT_DEPSFAILED=MENUSELECT_TESTS=test_xml_escape
MENUSELECT_DEPSFAILED=MENUSELECT_CFLAGS=LEAK_SANITIZER
MENUSELECT_DEPSFAILED=MENUSELECT_CFLAGS=UNDEFINED_SANITIZER

22
handlers/main.yml

@ -0,0 +1,22 @@
- name: Enable MariaDB
service:
name : mariadb
enabled: yes
state : restarted
- name: Disable Asterisk
service:
name : asterisk
enabled: no
state : stopped
- name: Restart httpd
service:
name : httpd
state: restarted
- name: Start FreePBX
service:
name : freepbx
state: started
enabled: yes

14
meta/main.yml

@ -0,0 +1,14 @@
---
galaxy_info:
author: "Blagovest Petrov"
license: 2-clause BSD
version: 0.1
description: Installs FreePBX
min_ansible_version: 2.0
platforms:
- name: CentOS
versions:
- 7
categories:
- voip
dependencies: []

265
tasks/main.yml

@ -0,0 +1,265 @@
- name: OS | Install Development tools
yum: name="@Development tools" state=present
- name: OS | Install Packages
yum: name={{ item }} state=present
with_items: '{{ redhat_packages }}'
notify: Enable MariaDB
- name: OS | Install Pear Packages
pear: name=Console_Getopt state=present
- name: OS | Add the Asterisk user
user:
name : asterisk
comment : 'Asterisk user'
createhome: no
system : yes
- name: MariaDB | Remove anonymous users
command: 'mysql -ne "{{ item }}"'
with_items:
- DELETE FROM mysql.user WHERE User=''
changed_when: False
- name: MariaDB | Forbid remote root login
command: 'mysql -ne "{{ item }}"'
with_items:
- DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')
changed_when: False
#- name: MariaDB | Remove test database
# command: 'mysql -ne "{{ item }}"'
# with_items:
# - DROP DATABASE test
# - DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'
# changed_when: False
# ignore_errors: True
- name: MariaDB | Reload privilege tables
command: 'mysql -ne "{{ item }}"'
with_items:
- FLUSH PRIVILEGES
ignore_errors: True
- name: Iksemel | Download and unpack
unarchive:
src : 'http://iksemel.googlecode.com/files/iksemel-1.4.tar.gz'
dest: '/usr/src'
copy: no
- name: Iksemel | Run configure
command: '{{ item }}'
args:
chdir: /usr/src/iksemel-1.4
with_items:
- ./configure
- make
- make install
- name: PjProject (PjSIP) | Download
unarchive:
src : 'http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2'
dest: '/usr/src'
copy: no
- name: PjProject (PjSIP) | Install
shell: '{{ item }}'
args:
chdir: /usr/src/pjproject-2.4
environment:
CFLAGS: '-DPJ_HAS_IPV6=0'
with_items:
- ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib64
- make dep
- make
- make install
#- name: Create Asterisk download dir
# file: path=/usr/src/asterisk13 state=directory
- name: Jansson | Download
unarchive:
src : 'https://github.com/akheron/jansson/archive/v2.7.tar.gz'
dest: '/usr/src/'
copy: no
- name: Jansson | Install
shell: '{{ item }}'
args:
chdir: /usr/src/jansson-2.7
with_items:
- autoreconf -i
- ./configure --libdir=/usr/lib64
- make
- make install
- name: Asterisk | Download
unarchive:
src : 'http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz'
dest: '/usr/src/'
copy: no
- name: Asterisk | Register the src dir into Ansible
shell: ls -d /usr/src/asterisk*
register: asterisk_dir
- name: Asterisk | Configure
shell: ' {{ item }}'
args:
chdir: '{{ asterisk_dir.stdout }}'
#chdir: '/usr/src/asterisk-13.9.1'
with_items:
- ./contrib/scripts/install_prereq install
- ./configure --libdir=/usr/lib64
- ./contrib/scripts/get_mp3_source.sh
- name: Asterisk | Make menuedit 1
template:
src : 'files/menuselect.makedeps'
dest: '{{ asterisk_dir.stdout }}'
mode: 0644
- name: Asterisk | Make menuedit 2
template:
src : 'files/menuselect.makeopts'
dest: '{{ asterisk_dir.stdout }}'
mode: 0644
- name: Asterisk | Make menuedit 3
template:
src : 'files/menuselect-tree'
dest: '{{ asterisk_dir.stdout }}'
mode: 0644
- name: Asterisk | Compile
command: ' {{ item }}'
args:
chdir: '{{ asterisk_dir.stdout }}'
with_items:
- make
- make install
- make config
- ldconfig
notify: Disable Asterisk
- name: Asterisk | Install Core WAV sounds
unarchive:
src : 'http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz'
dest: '/var/lib/asterisk/sounds'
copy: no
- name: Asterisk | Install Extra WAV sounds
unarchive:
src : 'http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz'
dest: '/var/lib/asterisk/sounds'
copy: no
- name: Asterisk | Install Core g722 sounds
unarchive:
src : 'http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-g722-current.tar.gz'
dest: '/var/lib/asterisk/sounds'
copy: no
- name: Asterisk | Install Extra g722 sounds
unarchive:
src : 'http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz'
dest: '/var/lib/asterisk/sounds'
copy: no
- name: Asterisk | Fix Permissions - /var/run/asterisk
file:
path : '/var/run/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | Fix Permissions - /etc/asterisk
file:
path : '/etc/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | FixPermissions - /var/lib/asterisk
file:
path : '/var/lib/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | FixPermissions - /var/log/asterisk
file:
path : '/var/log/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | FixPermissions - /var/spool/asterisk
file:
path : '/var/spool/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | FixPermissions - /usr/lib64/asterisk
file:
path : '/usr/lib64/asterisk'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: Asterisk | FixPermissions - /var/www
file:
path : '/var/www'
state : directory
owner : 'asterisk'
group : 'asterisk'
recurse: yes
- name: httpd | Set httpd to use asterisk for user
replace:
dest : '/etc/httpd/conf/httpd.conf'
regexp : '(\s+)User\ apache(\s+.*)?$'
replace: '\1User asterisk\2'
- name: httpd | Set httpd to use asterisk for group
replace:
dest : '/etc/httpd/conf/httpd.conf'
regexp : '(\s+)Group\ apache(\s+.*)?$'
replace: '\1Group asterisk\2'
- name: httpd | AllowOverride = all
replace:
dest : '/etc/httpd/conf/httpd.conf'
regexp : '(<[dD]irectory /var/www/>[^<]*)AllowOverride None'
replace: '\1AllowOverride All'
notify:
- Restart httpd
- name: FreePBX | Download
unarchive:
src: 'http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz'
dest: '/usr/src/'
copy: no
- name: FreePBX | Install
command: ' {{ item }}'
args:
chdir: '/usr/src/freepbx'
with_items:
- ./start_asterisk start
- ./install -n
- name: Systemd | Copy script
template:
src : 'files/freepbx.service'
dest: ' /etc/systemd/system/freepbx.service'
mode: 0755
notify: Start FreePBX

36
vars/main.yml

@ -0,0 +1,36 @@
redhat_packages:
- lynx
- mariadb-server
- mariadb
- php
- php-mysql
- php-mbstring
- php-xml
- tftp-server
- httpd
- ncurses-devel
- sendmail
- sendmail-cf
- sox
- newt-devel
- libxml2-devel
- libtiff-devel
- audiofile-devel
- gtk2-devel
- subversion
- kernel-devel
- git
- php-process
- crontabs
- cronie
- cronie-anacron
- wget
- vim
- uuid-devel
- sqlite-devel
- net-tools
- gnutls-devel
- php-pear
- unixODBC
- mysql-connector-odbc
Loading…
Cancel
Save