diff --git a/data/ansible/calls/freeswitch/main.yaml b/data/ansible/calls/freeswitch/main.yaml index e7b2f499e..a93487a1c 100644 --- a/data/ansible/calls/freeswitch/main.yaml +++ b/data/ansible/calls/freeswitch/main.yaml @@ -44,66 +44,73 @@ remote_user: '{{ user }}' tasks: -########################################################################################################################### -# install dependencies - - name: Install dependencies - become: yes - apt: name={{ dependencies }} state=present + ########################################################################################################################### + # install dependencies + - name: Install dependencies + become: yes + apt: name={{ dependencies }} state=present - - name: Add key for freeswitch - become: yes - apt_key: url=https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc state=present + - name: Add key for freeswitch + become: yes + apt_key: url=https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc state=present - - name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie) - become: yes - apt_repository: - repo: deb http://files.freeswitch.org/repo/deb/debian-release/ stretch main - state: present - filename: 'freeswitch' + - name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie) + become: yes + apt_repository: + repo: deb http://files.freeswitch.org/repo/deb/debian-release/ buster main + state: present + filename: 'freeswitch' - # Install FreeSwitch - - name: Install FreeSwitch - become: yes - apt: name={{ freeswitch_packages }} state=latest + - name: Add FreeSwitch apt repository (1.8) (Debian 8/Jessie) + become: yes + apt_repository: + repo: deb-src http://files.freeswitch.org/repo/deb/debian-release/ buster main + state: present + filename: 'freeswitch' -########################################################################################################################### -# Install Golang - - name: install unarchive dependencies (zypper) - become: yes - zypper: - name: - - gzip - - tar - state: present - when: ansible_pkg_mgr == 'zypper' + # Install FreeSwitch + - name: Install FreeSwitch + become: yes + apt: name={{ freeswitch_packages }} state=latest - - name: Install golang - include: go.yaml + ########################################################################################################################### + # Install Golang + - name: install unarchive dependencies (zypper) + become: yes + zypper: + name: + - gzip + - tar + state: present + when: ansible_pkg_mgr == 'zypper' -########################################################################################################################### -# Install and config CGRateS - - name: Install and config CGRateS - include: cgrates.yaml + - name: Install golang + include: go.yaml -# Configure FreeSwitch - - name: Unzip FreeSWITCH config - become: yes - shell: 'sudo tar -xvf freeswitch_conf.tar.gz' - args: - chdir: '{{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc' + ########################################################################################################################### + # Install and config CGRateS + - name: Install and config CGRateS + include: cgrates.yaml - - name: Remove FreeSWITCH default config from /etc/freesitch - become: yes - shell: 'sudo rm -rf *' - args: - chdir: '/etc/freeswitch' + # Configure FreeSwitch + - name: Unzip FreeSWITCH config + become: yes + shell: 'sudo tar -xvf freeswitch_conf.tar.gz' + args: + chdir: '{{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc' - - name: Copy our custom config for FreeSWITCH in /etc/freesitch - become: yes - shell: 'sudo cp -r {{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch/* /etc/freeswitch' - args: - chdir: '/etc/freeswitch' + - name: Remove FreeSWITCH default config from /etc/freeswitch + become: yes + shell: 'sudo rm -rf *' + args: + chdir: '/etc/freeswitch' -# Configure PJSUA - - name: Config PJSUA - include: pjsua.yaml + - name: Copy our custom config for FreeSWITCH in /etc/freeswitch + become: yes + shell: 'sudo cp -r {{ cgrates_dir }}/data/tutorial_tests/fs_evsock/freeswitch/etc/freeswitch/* /etc/freeswitch' + args: + chdir: '/etc/freeswitch' + + # Configure PJSUA + - name: Config PJSUA + include: pjsua.yaml diff --git a/data/ansible/calls/freeswitch/pjsua.yaml b/data/ansible/calls/freeswitch/pjsua.yaml index 2b360519a..21cbe5a8a 100644 --- a/data/ansible/calls/freeswitch/pjsua.yaml +++ b/data/ansible/calls/freeswitch/pjsua.yaml @@ -1,13 +1,13 @@ --- - name: Download PJSUA become: yes - shell: 'sudo wget https://www.pjsip.org/release/2.9/pjproject-2.9.tar.bz2' + shell: 'wget https://github.com/pjsip/pjproject/archive/2.10.tar.gz' args: chdir: '/tmp' - name: Unzip PJSUA become: yes - shell: 'sudo tar -xvf pjproject-2.9.tar.bz2' + shell: 'tar -xvf 2.10.tar.gz' args: chdir: '/tmp' @@ -17,12 +17,12 @@ - name: Install PJSUA become: yes - shell: 'sudo ./configure && make dep && make && make install' + shell: './configure && make dep && make && make install' args: - chdir: '/tmp/pjproject-2.9' + chdir: '/tmp/pjproject-2.10' - name: Copy PJSUA into /usr/bin become: yes - shell: 'sudo mv pjsua-x86_64-unknown-linux-gnu /usr/bin/pjsua' + shell: 'mv pjsua-x86_64-unknown-linux-gnu /usr/bin/pjsua' args: - chdir: '/tmp/pjproject-2.9/pjsip-apps/bin' + chdir: '/tmp/pjproject-2.10/pjsip-apps/bin'