diff --git a/tasks/main.yml b/tasks/main.yml index a7a9fcb..2a0bacf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,7 +17,7 @@ dest: /etc/kazoo/freeswitch/autoload_configs/kazoo.conf.xml notify: Gracefully Restart FreeSwitch -- name: Create FreeSwitch SIP Profile +- name: Create SIP Interface template: src: sipinterface_1.xml.j2 dest: /etc/kazoo/freeswitch/sip_profiles/sipinterface_1.xml diff --git a/templates/files/kazoo-freeswitch.service b/templates/files/kazoo-freeswitch.service deleted file mode 100644 index db17f67..0000000 --- a/templates/files/kazoo-freeswitch.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=FreeSWITCH Configured for Kazoo -After=syslog.target network-online.target - -[Service] -User=freeswitch -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -LimitCORE=infinity -# RuntimeDirectory is not yet supported in CentOS 7. A workaround is to use /etc/tmpfiles.d/freeswitch.conf -# RuntimeDirectory=/run/freeswitch -# RuntimeDirectoryMode=0750 -ExecStartPre=/usr/sbin/kazoo-freeswitch prepare -ExecStart=/usr/sbin/kazoo-freeswitch start -nc -nf -ExecStop=/usr/bin/fs_cli -x 'fsctl shutdown asap' -Restart=on-abort -PIDFile=/var/run/freeswitch/freeswitch.pid - -[Install] -WantedBy=multi-user.target - diff --git a/templates/handlers/main.yml b/templates/handlers/main.yml deleted file mode 100644 index 6dbde49..0000000 --- a/templates/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Gracefully Restart FreeSwitch - shell: "fs_cli -x 'fsctl shutdown asap restart'" - diff --git a/templates/meta/main.yml b/templates/meta/main.yml deleted file mode 100644 index 2fa762b..0000000 --- a/templates/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - { role: haproxy } diff --git a/templates/sipinterface_1.xml.j2 b/templates/sipinterface_1.xml.j2 index 40aabce..b67d87f 100644 --- a/templates/sipinterface_1.xml.j2 +++ b/templates/sipinterface_1.xml.j2 @@ -23,7 +23,6 @@ - @@ -45,7 +44,7 @@ - + @@ -68,7 +67,7 @@ - + diff --git a/templates/tasks/main.yml b/templates/tasks/main.yml deleted file mode 100644 index 7f77696..0000000 --- a/templates/tasks/main.yml +++ /dev/null @@ -1,58 +0,0 @@ ---- -- name: Install FreeSwitch - yum: - name: kazoo-freeswitch - state: latest - notify: Gracefully Restart FreeSwitch - -- name: Stop and Disable Default FreeSwitch - service: - name: freeswitch - state: stopped - enabled: no - -- name: Create Kazoo Configuration - template: - src: kazoo.conf.xml.j2 - dest: /etc/kazoo/freeswitch/autoload_configs/kazoo.conf.xml - notify: Gracefully Restart FreeSwitch - -- name: Create FreeSwitch SIP Profile - template: - src: sipinterface_1.xml.j2 - dest: /etc/kazoo/freeswitch/sip_profiles/sipinterface_1.xml - notify: Gracefully Restart FreeSwitch - -- name: Create FreeSwitch Service - copy: - src: files/kazoo-freeswitch.service - dest: /lib/systemd/system/kazoo-freeswitch.service - -- name: Start and Enable FreeSwitch - service: - name: kazoo-freeswitch - state: started - daemon_reload: yes - enabled: yes - -- name: Allow FreeSwitch SIP TCP - firewalld: - port: 11000/tcp - permanent: true - immediate: true - state: enabled - -- name: Allow FreeSwitch SIP UDP - firewalld: - port: 11000/udp - permanent: true - immediate: true - state: enabled - -- name: Allow FreeSwitch RTP - firewalld: - port: 16384-32768/udp - permanent: true - immediate: true - state: enabled -