1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

Move freepbx from being hosted at pbx.lan to <ip>:8888

This commit is contained in:
Anish Mangal 2019-06-20 04:30:55 +00:00
parent 4169db3080
commit 8a1094e964
7 changed files with 14 additions and 8 deletions

View file

@ -10,7 +10,7 @@
lineinfile:
path: /etc/hosts
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
when: iiab_lan_iface != "none" and not installing

View file

@ -63,6 +63,7 @@ minetest_port={{ minetest_port }}
mosquitto_port={{ mosquitto_port }}
nodered_port={{ nodered_port }}
pbx_enabled={{ pbx_enabled }}
pbx_http_port={{ pbx_http_port }}
pbx_signaling_ports_chan_sip={{ pbx_signaling_ports_chan_sip }}
pbx_signaling_ports_chan_pjsip={{ pbx_signaling_ports_chan_pjsip }}
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
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_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

View file

@ -25,9 +25,7 @@ Optionally, you may want to enable `chan_dongle <https://github.com/wdoekes/aste
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).
**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).
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).
You can monitor the FreePBX service with command::

View file

@ -9,7 +9,8 @@
# pbx_signaling_ports_chan_sip: "5160:5161"
# pbx_signaling_ports_chan_pjsip: "5060"
# pbx_data_ports: "10000:20000"
# pbx_http_port: 8888
#
# 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!

View file

@ -134,6 +134,12 @@
state: absent
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 }})
systemd:
name: "{{ apache_service }}" # httpd or apache2

View file

@ -1,6 +1,4 @@
<VirtualHost *:80>
ServerName pbx.lan
<VirtualHost *:{{ freepbx_http_port }}>
ServerAdmin admin@box.lan
DocumentRoot /var/www/html/

View file

@ -333,6 +333,7 @@ asterisk_chan_dongle: False
pbx_signaling_ports_chan_sip: "5160:5161"
pbx_signaling_ports_chan_pjsip: "5060"
pbx_data_ports: "10000:20000"
pbx_http_port: 8888
# If using WordPress intensively, set apache_high_php_limits in 3-BASE-SERVER
wordpress_install: False