pbxdocker
FreePBX Setup For Ubuntu 14.04 on Docker
-
Create an Ubuntu 14.04 instance on Digital Ocean (or VPS of choice) & connect via ssh
-
sudo apt-get update && sudo apt-get install git docker.io
-
git clone https://github.com/torrange/pbxdocker
-
cd pbxdocker && sudo docker build .
-
sudo docker run --net=host -d -t <image_build_id>
-
Open http://{{digital_ocean_ip}}/ in a browser.
-
Create administrator user when prompted
-
In the FreePBX control panel, open “Settings” => “Advanced Settings”
- switch “SIP Channel Driver” to ‘chan_sip’
- submit changes
-
In the FreePBX control panel, open
Settings
=>Asterisk SIP Settings
, changeRTP Port Ranges
to:- start=
6000
- end=
40000
- submit changes
- start=
-
In the FreePBX control panel, open
Settings
=>Asterisk SIP Settings
- click the
Detect External IP
button; subnets + external IP should auto-populate - submit changes
- click the
-
In the FreePBX control panel, open
Settings
=>chan_sip
link (right panel):- change
Bind Port
to5060
- submit changes.
- change
-
Ssh into Ubuntu instance:
ssh root@<digital_ocean_ip>
and run:docker exec -i -t <container_id> bash
killall asterisk
exit
- optional
astcore/scripts/./whitelist.sh
Asterisk will now automatically restart using the chan_sip.c driver listening on port 5060.
Before running pbxdocker/scripts/./whitelist.sh
, add your public static IP's to pbxdocker/scripts/./whitelist.sh
For example, for a public IP of 42.24.12.34: echo "iptables -I INPUT -s 42.24.12.34 -j ACCEPT" >> pbxdocker/scripts/./whitelist.sh
This will block all connecting traffic except from IP's: 42.24.12.34
. TCP ports 80
and 22
will remain open after running this script.
These steps can be followed verbatim on [http://localhost/] (http://localhost/) running an instance of the docker.io daemon