1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

tweaks for CDR

This commit is contained in:
Jerry Vonau 2021-08-13 16:47:36 -05:00
parent 55cadb8cde
commit 8030d246c2
2 changed files with 21 additions and 5 deletions

View file

@ -135,9 +135,9 @@
name: "{{ asterisk_db_dbname }}" # asterisk
encoding: utf8
collation: utf8_general_ci
# login_host: "{{ asterisk_db_host }}"
# login_user: root
# login_password: "{{ mysql_root_password }}"
login_host: "{{ asterisk_db_host }}"
login_user: "{{ asterisk_db_user }}"
login_password: "{{ asterisk_db_password }}"
state: present
- name: FreePBX - Add cdr MySQL db ({{ asterisk_db_cdrdbname }})
@ -147,6 +147,9 @@
collation: utf8_general_ci
login_host: "{{ asterisk_db_host }}"
state: present
login_host: "{{ asterisk_db_host }}"
login_user: "{{ asterisk_db_user }}"
login_password: "{{ asterisk_db_password }}"
- name: FreePBX - Create new php sessions dir /var/lib/php/asterisk_sessions/ - SEE 'php_value session.save_path /var/lib/php/asterisk_sessions/' IN pbx/templates/freepbx.conf.j2
file:
@ -193,6 +196,13 @@
- odbc.ini
- odbcinst.ini
- name: FreePBX - Create /etc/asterisk/cdr_mysql.conf
template:
src: "{{ item }}"
dest: /etc/asterisk/
with_items:
- cdr_mysql.conf
- name: FreePBX - 2-step install - won't run if {{ freepbx_install_dir }} already exists - CAN TAKE 3-12 MIN OR LONGER!
command: "{{ item }}"
args:
@ -200,14 +210,14 @@
creates: "{{ freepbx_install_dir }}" # /var/www/html/freepbx
with_items:
- ./start_asterisk start
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }}
- name: "Run 'fwconsole stop' and 'killall -9 safe_asterisk' to stop both Asterisk processes -- this avoids \"Unable to run Pre-Asterisk hooks, because Asterisk is already running\" in 'journalctl -u freepbx' logs"
command: "{{ item }}"
with_items:
- killall -9 "PM2 v4.5.0: God" # 2021-08-09: Missed by fwconsole (does this matter?)
- fwconsole stop
- killall -9 safe_asterisk # 2021-08-08: Stronger medicine needed for 64-bit Ubuntu Server 21.04 on RPi 4. Originally from @jvonau's PR #2912.
- killall -9 "PM2 v4.5.0: God" # 2021-08-09: Missed by fwconsole (does this matter?)
# - killall -9 asterisk # 2021-08-05: Also from @jvonau's PR #2912, to brute force this. In the end, above 'fwconsole stop' works more gracefully.
# - ./start_asterisk stop # Buggy!
# - /usr/sbin/asterisk -rx "core stop gracefully"

View file

@ -0,0 +1,6 @@
[global]
hostname = localhost
dbname = asteriskcdrdb
user = asterisk
password = asterisk
userfield=1