mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
commit
babfd7563a
11 changed files with 57 additions and 11 deletions
|
@ -78,3 +78,12 @@
|
||||||
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
|
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
|
||||||
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755'}
|
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755'}
|
||||||
- { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
|
- { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
|
||||||
|
|
||||||
|
- name: Fix KA Lite bug in regex parsing ifconfig output, for @m-anish's network names that contain dashes
|
||||||
|
replace:
|
||||||
|
path: /usr/local/kalite/venv/local/lib/python2.7/site-packages/kalite/packages/dist/ifcfg/parser.py
|
||||||
|
regexp: 'a-zA-Z0-9'
|
||||||
|
replace: 'a-zA-Z0-9\-'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||||
|
|
||||||
# Just comment out this pinning line if you want Kolibri's "latest" version, after 0.12.4's bug is resolved: https://github.com/iiab/iiab/issues/1675 https://github.com/learningequality/kolibri/issues/5664
|
# 2019-06-21: Just comment out this pinning line if you want Kolibri's "latest" version, after 0.12.4's bug is resolved: https://github.com/iiab/iiab/issues/1675 https://github.com/learningequality/kolibri/issues/5664
|
||||||
kolibri_version: 0.12.3
|
# kolibri_version: 0.12.5
|
||||||
|
|
||||||
# Kolibri folder to store its data and configuration files.
|
# Kolibri folder to store its data and configuration files.
|
||||||
kolibri_home: "{{ content_base }}/kolibri" # /library/kolibri
|
kolibri_home: "{{ content_base }}/kolibri" # /library/kolibri
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
regexp: '^172\.18\.96\.1'
|
regexp: '^172\.18\.96\.1'
|
||||||
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan pbx pbx.lan'
|
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan'
|
||||||
state: present
|
state: present
|
||||||
when: iiab_lan_iface != "none" and not installing
|
when: iiab_lan_iface != "none" and not installing
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,6 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ dhcp_service2 }}"
|
name: "{{ dhcp_service2 }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: (iiab_network_mode != "Appliance") # Sufficient b/c br0 exists thanks to /etc/network/interfaces.d/iiab
|
#when: (iiab_network_mode != "Appliance") # Sufficient b/c br0 exists thanks to /etc/network/interfaces.d/iiab
|
||||||
#when: (iiab_network_mode != "Appliance") and (not no_net_restart)
|
#when: (iiab_network_mode != "Appliance") and (not no_net_restart)
|
||||||
#when: iiab_network_mode != "Appliance" and iiab_wan_iface != discovered_wireless_iface
|
#when: iiab_network_mode != "Appliance" and iiab_wan_iface != discovered_wireless_iface
|
||||||
|
|
|
@ -63,6 +63,7 @@ minetest_port={{ minetest_port }}
|
||||||
mosquitto_port={{ mosquitto_port }}
|
mosquitto_port={{ mosquitto_port }}
|
||||||
nodered_port={{ nodered_port }}
|
nodered_port={{ nodered_port }}
|
||||||
pbx_enabled={{ pbx_enabled }}
|
pbx_enabled={{ pbx_enabled }}
|
||||||
|
pbx_http_port={{ pbx_http_port }}
|
||||||
pbx_signaling_ports_chan_sip={{ pbx_signaling_ports_chan_sip }}
|
pbx_signaling_ports_chan_sip={{ pbx_signaling_ports_chan_sip }}
|
||||||
pbx_signaling_ports_chan_pjsip={{ pbx_signaling_ports_chan_pjsip }}
|
pbx_signaling_ports_chan_pjsip={{ pbx_signaling_ports_chan_pjsip }}
|
||||||
pbx_data_ports={{ pbx_data_ports }}
|
pbx_data_ports={{ pbx_data_ports }}
|
||||||
|
@ -152,6 +153,7 @@ if [ "$wan" != "none" ]; then
|
||||||
$IPTABLES -A INPUT -p tcp --dport $nodered_port -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p tcp --dport $nodered_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
|
|
||||||
if [ "$pbx_enabled" == "True" ]; then
|
if [ "$pbx_enabled" == "True" ]; then
|
||||||
|
$IPTABLES -A INPUT -p tcp --dport $pbx_http_port -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p udp --dport $pbx_signaling_ports_chan_sip -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p udp --dport $pbx_signaling_ports_chan_sip -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p udp --dport $pbx_signaling_ports_chan_pjsip -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p udp --dport $pbx_signaling_ports_chan_pjsip -m state --state NEW -i $wan -j ACCEPT
|
||||||
$IPTABLES -A INPUT -p udp --dport $pbx_data_ports -m state --state NEW -i $wan -j ACCEPT
|
$IPTABLES -A INPUT -p udp --dport $pbx_data_ports -m state --state NEW -i $wan -j ACCEPT
|
||||||
|
|
|
@ -25,9 +25,7 @@ Optionally, you may want to enable `chan_dongle <https://github.com/wdoekes/aste
|
||||||
|
|
||||||
asterisk_chan_dongle: True
|
asterisk_chan_dongle: True
|
||||||
|
|
||||||
After installing PBX as part of IIAB, please visit http://pbx.lan/freepbx and proceed with initial configuration (no login/password is required initially — you will be asked to set this up).
|
After installing PBX as part of IIAB, please visit http://box.lan:83/freepbx and proceed with initial configuration (no login/password is required initially — you will be asked to set this up).
|
||||||
|
|
||||||
**CAUTION: it is sometimes necessary to put "[ACTUAL IP ADDRESS] pbx.lan" into the 'hosts' file on the client machine (where the browser is being used) to get http://pbx.lan/freepbx to work.** This file is ``/etc/hosts`` on Linux and macOS, or ``c:\Windows\System32\Drivers\etc\hosts`` on most Windows machines (conversely, customizing the hosts file is *not* necessary if your browser is able to access the `'LAN' side <https://github.com/iiab/iiab/wiki/IIAB-Networking#internet-in-a-box-iiab-networking>`_ of your IIAB server).
|
|
||||||
|
|
||||||
You can monitor the FreePBX service with command::
|
You can monitor the FreePBX service with command::
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
# pbx_signaling_ports_chan_sip: "5160:5161"
|
# pbx_signaling_ports_chan_sip: "5160:5161"
|
||||||
# pbx_signaling_ports_chan_pjsip: "5060"
|
# pbx_signaling_ports_chan_pjsip: "5060"
|
||||||
# pbx_data_ports: "10000:20000"
|
# pbx_data_ports: "10000:20000"
|
||||||
|
# pbx_http_port: 83
|
||||||
|
#
|
||||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,11 @@
|
||||||
extra_opts: [--strip-components=1]
|
extra_opts: [--strip-components=1]
|
||||||
creates: "{{ freepbx_src_dir }}/install"
|
creates: "{{ freepbx_src_dir }}/install"
|
||||||
|
|
||||||
|
- name: FreePBX - Patch FreePBX source - IIAB Bug 1685
|
||||||
|
patch:
|
||||||
|
src: "roles/pbx/templates/71-freepbx-framework.patch"
|
||||||
|
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
|
||||||
|
|
||||||
- name: FreePBX - Disable & Stop asterisk service
|
- name: FreePBX - Disable & Stop asterisk service
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
@ -129,6 +134,12 @@
|
||||||
state: absent
|
state: absent
|
||||||
when: not pbx_enabled
|
when: not pbx_enabled
|
||||||
|
|
||||||
|
- name: FreePBX - Add {{ freepbx_http_port }} as a Listen directive to apache ports.conf
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/apache2/ports.conf
|
||||||
|
line: "Listen {{ freepbx_http_port }}"
|
||||||
|
insertafter: Listen 80
|
||||||
|
|
||||||
- name: FreePBX - Restart Apache service ({{ apache_service }})
|
- name: FreePBX - Restart Apache service ({{ apache_service }})
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}" # httpd or apache2
|
name: "{{ apache_service }}" # httpd or apache2
|
||||||
|
|
26
roles/pbx/templates/71-freepbx-framework.patch
Normal file
26
roles/pbx/templates/71-freepbx-framework.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- Framework.class.php 2019-05-22 08:37:49.748899666 +0530
|
||||||
|
+++ Framework.class.php.new 2019-05-22 08:38:04.968584018 +0530
|
||||||
|
@@ -177,7 +177,7 @@
|
||||||
|
dbug("aborting early because previous errors");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
- if ($this->freepbx->astman->connected()) {
|
||||||
|
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||||
|
$ast_ret = $this->freepbx->astman->Command('module reload manager');
|
||||||
|
} else {
|
||||||
|
unset($output);
|
||||||
|
@@ -187,12 +187,12 @@
|
||||||
|
$this->freepbx->Logger->log(FPBX_LOG_ERROR,_("Failed to reload AMI, manual reload will be necessary, try: [asterisk -rx 'module reload manager']"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- if ($this->freepbx->astman->connected()) {
|
||||||
|
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||||
|
$this->freepbx->astman->disconnect();
|
||||||
|
}
|
||||||
|
global $bootstrap_settings;
|
||||||
|
|
||||||
|
- if (!$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||||
|
+ if (!$this->freepbx->astman || !$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||||
|
// couldn't connect at all
|
||||||
|
$this->freepbx->Logger->log(FPBX_LOG_CRITICAL,"Connection attmempt to AMI failed");
|
||||||
|
return false;
|
|
@ -1,6 +1,4 @@
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:{{ freepbx_http_port }}>
|
||||||
|
|
||||||
ServerName pbx.lan
|
|
||||||
|
|
||||||
ServerAdmin admin@box.lan
|
ServerAdmin admin@box.lan
|
||||||
DocumentRoot /var/www/html/
|
DocumentRoot /var/www/html/
|
||||||
|
|
|
@ -333,6 +333,7 @@ asterisk_chan_dongle: False
|
||||||
pbx_signaling_ports_chan_sip: "5160:5161"
|
pbx_signaling_ports_chan_sip: "5160:5161"
|
||||||
pbx_signaling_ports_chan_pjsip: "5060"
|
pbx_signaling_ports_chan_pjsip: "5060"
|
||||||
pbx_data_ports: "10000:20000"
|
pbx_data_ports: "10000:20000"
|
||||||
|
pbx_http_port: 83
|
||||||
|
|
||||||
# If using WordPress intensively, set apache_high_php_limits in 3-BASE-SERVER
|
# If using WordPress intensively, set apache_high_php_limits in 3-BASE-SERVER
|
||||||
wordpress_install: False
|
wordpress_install: False
|
||||||
|
|
Loading…
Reference in a new issue