izPBX Cloud Native VoIP Telephony System
izPBX is a Turnkey Cloud Native VoIP Telephony System powered by Asterisk Engine and FreePBX Management GUI
20.16
, 20.16.X
, 20.16.X-BUILD
,20
, latest
(Asterisk 20 LTS + FreePBX 16)18.16
, 18.16.X
, 18.16.X-BUILD
,18
(Asterisk 18 LTS + FreePBX 16)18.15
, 18.15.X
, 18.15.X-BUILD
(Asterisk 18 LTS + FreePBX 15)16.15
, 16.15.X
, 16.15.X-BUILD
(Asterisk 16 LTS + FreePBX 15)dev-20
, dev-20.X
, dev-20.X.X-BUILD
dev-18
, dev-18.X
, dev-18.X.X-BUILD
Tags format: Z.Y.X-[BUILD]
where:
Look into project Tags page to discover the latest versions
Cloud and On-Premise, Fast, Automatic and Repeatable deploy of VoIP PBX systems
izpbx-*
tools scripts (like izpbx-callstats
)izsynth
utility - TTS/Text To Speech synthesizer, background music overlay assembler and audio file converter for PBX and Home Automation Systemstcpdump
and sngrep
utility to debug VoIP calls.env
filedefault.env
file)Using docker compose is the suggested method:
Install your prefered Linux OS into VM or Baremetal Server
Install Docker Runtime with docker compose
plugin for your Operating System from https://www.docker.com/get-started
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker compose-plugin -y
sudo systemctl enable --now docker
Create a compose.yml
, or clone git repository, or download latest tarbal release from: https://github.com/ugoviti/izpbx/releases and unpack it into a directory (ex. /opt/izpbx
), faster method with git:
git clone https://github.com/ugoviti/izpbx.git /opt/izpbx
cd /opt/izpbx
Checkout into latest official release:
git checkout tags/$(git tag | sort --version-sort | tail -1)
Copy default configuration file default.env
into .env
:
cp default.env .env
Customize .env
variables, specially the security section of default passwords:
vim .env
Deploy and start izpbx using docker compose
command:
docker compose up -d
Wait the pull to finish (~60 seconds with fast internet connections) and point your web browser to the IP address of your docker host and follow initial setup guide
Note: by default, to correctly handle SIP NAT and SIP-RTP UDP traffic, the izpbx container will use the network_mode: host
, so the izpbx container will be exposed directly to the outside network without using docker internal network range (network_mode: host will prevent multiple izpbx containers from running inside the same host).
Modify compose.yml and comment #network_mode: host
if you want run multiple izpbx containers in the same host (not production tested. There will be problems with RTP traffic).
Another available option is to disable network_mode: host
and use macvlan network mode used for running izPBX into multi-tenant mode.
If you need to customize the default compose.yml
, don't edit it, but create an override file:
docker compose.override.yml
and specify the options you want to override, for example:
version: '3'
services:
db:
image: docker.io/mariadb:10.11.4
izpbx:
image: docker.io/izdock/izpbx-asterisk:20.16.7
and start the deploy with the same command docker compose up -d
If you want test izPBX without using docker compose command, you can use the following docker commands:
Start MySQL:
docker run --rm -ti -v ./data/db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=CHANGEM3 -e MYSQL_PASSWORD=CHANGEM3 --name izpbx-db mariadb:10.4
Start izPBX:
docker run --rm -ti --network=host --privileged --cap-add=NET_ADMIN -v ./data/izpbx:/data -e MYSQL_ROOT_PASSWORD=CHANGEM3 -e MYSQL_PASSWORD=CHANGEM3 -e MYSQL_SERVER=127.0.0.1 -e MYSQL_DATABASE=asterisk -e MYSQL_USER=asterisk -e APP_DATA=/data --name izpbx izpbx-asterisk:latest
Upgrade the version of izpbx by downloading a new tgz release, or changing image tag into compose.yml file (from git releases page, verify if upstream docker compose was updated), or if you cloned directly from GIT, use the following commands as quick method:
cd /opt/izpbx
git checkout main
git pull
git fetch --tags --all -f
git checkout tags/$(git tag | sort --version-sort | tail -1)
Upgrade the izpbx deploy with:
(NB. First verify if compose.yml
and default.env
was updated a make the same changes in your .env
file)
docker compose pull
docker compose up -d
If the mariadb database version was changed, rememeber to update tables schema with command
source .env ; docker exec -it izpbx-db mysql_upgrade -u root -p$MYSQL_ROOT_PASSWORD
Open FreePBX Web URL and verify if exist any modules updates from FreePBX Menu: Admin --> Modules Admin --> Check Online --> Upgade all --> Process
That's all
FreePBX will be installed into persistent data dir on initial deploy only (when no installations already exist).
Successive container updates on the same release (example from 18.15.1 to 18.15.2) will not upgrade the FreePBX Framework (only Asterisk engine will be updated).
If you want upgrade FreePBX Framework/Core to a major release (example from 15 to 16), you have 2 options:
data
dir (IMPORTANT!)FREEPBX_AUTOUPGRADE_CORE=true
in the .env
filedata
dir (IMPORTANT!)FREEPBX_AUTOUPGRADE_CORE=false
in the .env
fileCreate a directory where you want deploy izpbx data and create compose.yml
and .env
files:
Example:
mkdir yourgreatpbx
cd yourgreatpbx
vim compose.yml
vim .env
NOTE:
compose.yml
according to your environment needs:
parent:
(must be specified your ethernet card)subnet:
(must match you intranet network range)ipv4_address:
(every izPBX frontend will must to have a different external IP).env
according to your environment needs:
MYSQL_SERVER=db
(you can't use localhost here)version: '3'
networks:
izpbx-0-ext:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 10.1.1.0/24
#ip_range: "10.1.1.221/30"
#gateway: 10.1.1.1
izpbx-1:
driver: bridge
services:
db:
image: mariadb:10.5.9
## WARNING: if you upgrade image tag enter the container and run mysql_upgrade:
## source .env ; docker exec -it izpbx-db mysql_upgrade -u root -p$MYSQL_ROOT_PASSWORD
command: --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
restart: unless-stopped
env_file:
- .env
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
## database configurations
volumes:
- ./data/db:/var/lib/mysql
networks:
izpbx-1:
izpbx:
#hostname: ${APP_FQDN}
image: izdock/izpbx-asterisk:18.15.11
restart: unless-stopped
depends_on:
- db
env_file:
- .env
volumes:
- ./data/izpbx:/data
cap_add:
- SYS_ADMIN
- NET_ADMIN
privileged: true
networks:
izpbx-0-ext:
ipv4_address: 10.1.1.221
izpbx-1:
Repeat the procedure for every izPBX you want deploy. Remember to create a dedicated directory for every izpbx deploy.
Enter in every directory containig configuration files and run:
docker compose up -d
Create a directory where you want deploy all izpbx data and create compose.yml
and a PBXNAME.env
file for every izpbx deploy:
Example:
mkdir izpbx
cd izpbx
vim compose.yml
vim izpbx1.env
vim izpbx2.env
vim izpbx3.env
etc...
NOTE:
compose.yml
according to your environment needs, changing:
parent:
(must be specified your ethernet card)subnet:
(must match you intranet network range)ipv4_address:
(every izPBX frontend will must to have a different external IP)PBXNAME.env
file and set different variables for MYSQL
(for best security use a different password for every deploy), example:
MYSQL_SERVER=db
(all deployes will use the same db name)MYSQL_DATABASE=izpbx1_asterisk
MYSQL_DATABASE_CDR=izpbx1_asteriskcdrdb
MYSQL_USER=izpbx1_asterisk
MYSQL_PASSWORD=izpbx1_AsteriskPasswordV3ryS3cur3
version: '3'
networks:
izpbx-0-ext:
driver: macvlan
driver_opts:
parent: enp0s13f0u3u1u3
ipam:
config:
- subnet: 10.1.1.0/24
izpbx-1:
driver: bridge
services:
db:
image: mariadb:10.5.9
## WARNING: if you upgrade image tag enter the container and run mysql_upgrade:
## source .env ; docker exec -it izpbx-db mysql_upgrade -u root -p$MYSQL_ROOT_PASSWORD
command: --sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
restart: unless-stopped
env_file:
- db.env
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
## database configurations
volumes:
- ./data/db:/var/lib/mysql
networks:
izpbx-1:
izpbx1:
#hostname: ${APP_FQDN}
image: izdock/izpbx-asterisk:18.15.11
restart: unless-stopped
depends_on:
- db
env_file:
- izpbx1.env
volumes:
- ./data/izpbx1:/data
cap_add:
- NET_ADMIN
privileged: true
networks:
izpbx-0-ext:
ipv4_address: 10.1.1.221
izpbx-1:
izpbx2:
#hostname: ${APP_FQDN}
image: izdock/izpbx-asterisk:18.15.11
restart: unless-stopped
depends_on:
- db
env_file:
- izpbx2.env
volumes:
- ./data/izpbx2:/data
cap_add:
- NET_ADMIN
privileged: true
networks:
izpbx-0-ext:
ipv4_address: 10.1.1.222
izpbx-1:
izpbx3:
#hostname: ${APP_FQDN}
image: izdock/izpbx-asterisk:18.15.11
restart: unless-stopped
depends_on:
- db
env_file:
- izpbx3.env
volumes:
- ./data/izpbx3:/data
cap_add:
- NET_ADMIN
privileged: true
networks:
izpbx-0-ext:
ipv4_address: 10.1.1.223
izpbx-1:
Enter the directory containig configuration files and run:
docker compose up -d
docker compose restart izpbx
docker restart izpbx
docker restart izpbx-db
izpbx
containerEnter the container:
docker exec -it izpbx bash
Restart izpbx service (Asterisk Engine):
supervisorctl restart izpbx
To restart others available services use supervisorctl restart SERVICE
Available services:
asterisk
cron
fail2ban
fop2
httpd
izpbx
tftpd
postfix
zabbix-agent
Tested Docker Runtime:
Tested Host Operating Systems:
Consult the default.env
file:
Consult official repository page for installation and configuration of Asterisk Zabbix Template in you Zabbix Server:
Settings-->Advanced Settings
Settings-->Asterisk Logfile Settings
Settings-->Asterisk SIP Settings
Settings-->Filestore-->Local
Admin-->Backup & Restore
Admin-->Contact Manager
Admin-->Caller ID Lookup Sources
Admin-->Sound Languages-->Setttings
Visit http://IZPBX_ADDRESS/pb/ to learn about the supported Phones and XML Address Books.
Configure Contact Manager as reported above (create a new contact manager group name like PhoneBook)
For Yealink / Fanvil phones you can use a single Phonebook Menu: http://IZPBX_ADDRESS/pb/yealink/menu
FOP2 specific version upgrade/downgrade (get latest release number from https://www.fop2.com/download.php): automatic upgrade:
FOP2_VER=2.31.37
curl -fSL --connect-timeout 30 http://download2.fop2.com/fop2-$FOP2_VER-centos-x86_64.tgz | tar xz -C /usr/src
cd /usr/src/fop2
make install
supervisorctl restart fop2
for manual downgrade just copy the fop2_server binary:
cp /usr/src/fop2/server/fop2_server /usr/local/fop2/fop2_server
supervisorctl restart fop2
FOP2 useful commands:
NB. define interface name to associate the license, for example: eth0
docker exec -it izpbx bash
/usr/local/fop2/fop2_server --rp=http --register --iface eth0 --name "Company Name" --code "LICENSECODE"
/usr/local/fop2/fop2_server --rp=http --getinfo --iface eth0
/usr/local/fop2/fop2_server --rp=http --reactivate --iface eth0
/usr/local/fop2/fop2_server --rp=http --revoke --iface eth0
FOP2 is running in Demo mode because the license is invalid
FreePBX is slow to reload (https://issues.freepbx.org/browse/FREEPBX-20559)
docker exec -it izpbx bash
fwconsole setting SIGNATURECHECK 0
Factory Reset izPBX (WARNING! your persistent storage will be wiped!):
docker compose down
rm -rf data
docker compose up -d
compose.yml
and comment localtime volume?)network_mode: host
network_mode: host
is used, so the PBX network is esposed directly in the host interface (no internal container network is used), so the default UDP RTP port range can be set from 10000
to 20000
.
network_mode: host
, tune the port range (forwarding 10000 ports with the docker stack make high cpu usage and longer startup times), for example for 50 concurrent calls:APP_PORT_RTP_START=10000
APP_PORT_RTP_END=10200
Developed and maintained by: Ugo Viti @ InitZero S.r.l.
Where to file issues: https://github.com/ugoviti/izpbx/issues
Where to get commercial help: email: support@initzero.it - web: InitZero Support
Supported architectures:
[amd64
]
Supported Docker versions: the latest release (down to 1.6 on a best-effort basis)
License: GPL v3