mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
tweaks for CDR
This commit is contained in:
parent
55cadb8cde
commit
8030d246c2
2 changed files with 21 additions and 5 deletions
|
@ -135,9 +135,9 @@
|
||||||
name: "{{ asterisk_db_dbname }}" # asterisk
|
name: "{{ asterisk_db_dbname }}" # asterisk
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
collation: utf8_general_ci
|
collation: utf8_general_ci
|
||||||
# login_host: "{{ asterisk_db_host }}"
|
login_host: "{{ asterisk_db_host }}"
|
||||||
# login_user: root
|
login_user: "{{ asterisk_db_user }}"
|
||||||
# login_password: "{{ mysql_root_password }}"
|
login_password: "{{ asterisk_db_password }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: FreePBX - Add cdr MySQL db ({{ asterisk_db_cdrdbname }})
|
- name: FreePBX - Add cdr MySQL db ({{ asterisk_db_cdrdbname }})
|
||||||
|
@ -147,6 +147,9 @@
|
||||||
collation: utf8_general_ci
|
collation: utf8_general_ci
|
||||||
login_host: "{{ asterisk_db_host }}"
|
login_host: "{{ asterisk_db_host }}"
|
||||||
state: present
|
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
|
- 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:
|
file:
|
||||||
|
@ -193,6 +196,13 @@
|
||||||
- odbc.ini
|
- odbc.ini
|
||||||
- odbcinst.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!
|
- name: FreePBX - 2-step install - won't run if {{ freepbx_install_dir }} already exists - CAN TAKE 3-12 MIN OR LONGER!
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
|
@ -200,14 +210,14 @@
|
||||||
creates: "{{ freepbx_install_dir }}" # /var/www/html/freepbx
|
creates: "{{ freepbx_install_dir }}" # /var/www/html/freepbx
|
||||||
with_items:
|
with_items:
|
||||||
- ./start_asterisk start
|
- ./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"
|
- 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 }}"
|
command: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
- killall -9 "PM2 v4.5.0: God" # 2021-08-09: Missed by fwconsole (does this matter?)
|
||||||
- fwconsole stop
|
- 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 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.
|
# - 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!
|
# - ./start_asterisk stop # Buggy!
|
||||||
# - /usr/sbin/asterisk -rx "core stop gracefully"
|
# - /usr/sbin/asterisk -rx "core stop gracefully"
|
||||||
|
|
6
roles/pbx/templates/cdr_mysql.conf
Normal file
6
roles/pbx/templates/cdr_mysql.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[global]
|
||||||
|
hostname = localhost
|
||||||
|
dbname = asteriskcdrdb
|
||||||
|
user = asterisk
|
||||||
|
password = asterisk
|
||||||
|
userfield=1
|
Loading…
Add table
Add a link
Reference in a new issue