mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
Move freepbx from being hosted at pbx.lan to <ip>:8888
This commit is contained in:
parent
4169db3080
commit
8a1094e964
7 changed files with 14 additions and 8 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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:8888/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: 8888
|
||||||
|
#
|
||||||
# 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!
|
||||||
|
|
||||||
|
|
|
@ -134,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
|
||||||
|
|
|
@ -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: 8888
|
||||||
|
|
||||||
# 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