Sign inSign up

aasaidane/freepbx

By aasaidane

Updated almost 7 years ago

FreePBX 14 - Asterisk 16.

Image
0

2.7K

aasaidane/freepbx repository overview

hub.docker.com/r/aasaidane/freepbx

Introduction

This will build a container for FreePBX - A Voice over IP Manager for Asterisk. Upon starting this image it will give you a turn-key PBX system for SIP calling.

  • Latest release Version 15
  • Compiles and Installs Asterisk 16
  • Choice of running embedded database or Modifies to support external MySQL Database and only require one DB.
  • Supports Data Persistence
  • Fail2Ban installed to block brute force attacks
  • Debian Stretch Base w/ Apache2
  • NodeJS 11.x
  • Automatically Installs User Control Panel and displays at first page
  • Option to Install Flash Operator Panel 2
  • Customizable FOP and Admin URLs

This Container uses tiredofit/debian:stretch as a base.

If you are presently running this image when it utilized FreePBX 14 and Asterisk 14 and can no longer use your image, please see this post

Changelog

Authors

Table of Contents

Prerequisites

This image assumes that you are using a reverse proxy such as jwilder/nginx-proxy and optionally the Let's Encrypt Proxy Companion @ https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion in order to serve your pages. However, it will run just fine on it's own if you map appropriate ports.

You will also need an external MySQL/MariaDB Container, athough it can use an internally provided service (not recommended).

Installation

Automated builds of the image are available on Docker Hub and is the recommended method of installation.

docker pull tiredofit/freepbx:(imagetag)

The following image tags are available:

  • 15 - Asterisk 16, Freepbx 15 - Debian Stretch (latest build)
  • 14 - Asterisk 14, Freepbx 14 - Debian Stretch (latest build)
  • latest - Asterisk 16, Freepbx 15 - Debian Stretch (Same as 15)

You can also visit the image tags section on Docker hub to pull a version that follows the CHANGELOG.

Quick Start

The first boot can take from 3 minutes - 30 minutes depending on your internet connection as there is a considerable amount of downloading to do!

Login to the web server and enter in your admin username, admin password, and email address and start configuring the system!

Configuration

Data-Volumes

The container supports data persistence and during Dockerfile Build creates symbolic links for /var/lib/asterisk, /var/spool/asterisk, /home/asterisk, and /etc/asterisk. Upon startup configuration files are copied and generated to support portability.

The following directories are used for configuration and can be mapped for persistent storage.

DirectoryDescription
/certsDrop your Certificates here for TLS w/PJSIP / UCP / HTTPd/ FOP
/var/www/htmlFreePBX web files
/var/log/Apache, Asterisk and FreePBX Log Files
/dataData Persistence for Asterisk and Freepbx and FOP
/assets/customOPTIONAL - If you would like to overwrite some files in the container, put them here following the same folder structure for anything underneath the /var/www/html directory
Environment Variables

Along with the Environment Variables from the Base image, below is the complete list of available options that can be used to customize your installation.

ParameterDescription
ADMIN_DIRECTORYWhat folder to access admin panel - Default /admin
DB_EMBEDDEDAllows you to use an internally provided MariaDB Server e.g. TRUE or FALSE
DB_HOSTHost or container name of MySQL Server e.g. freepbx-db
DB_PORTMySQL Port - Default 3306
DB_NAMEMySQL Database name e.g. asterisk
DB_USERMySQL Username for above Database e.g. asterisk
DB_PASSMySQL Password for above Database e.g. password
ENABLE_FAIL2BANEnable Fail2ban to block the bad guys - Default TRUE
ENABLE_FOPEnable Flash Operator Panel - Default TRUE
ENABLE_SSLEnable HTTPd to serve SSL requests - Default FALSE
ENABLE_XMPPEnable XMPP Module with MongoDB - Default FALSE
HTTP_PORTHTTP Listening Port - Default 80
HTTPS_PORTHTTPS Listening Port - Default 443
FOP_DIRECTORYWhat folder to access FOP - Default /fop
RTP_STARTWhat port to start RTP Transmissions - Default 18000
RTP_FINISHWhat port to start RTP Transmissions - Default 20000
UCP_FIRSTLoad UCP as web frontpage TRUE/FALSE - Default TRUE
TLS_CERTTLS Certificate to drop in /certs for HTTPS if no reverse proxy
TLS_KEYTLS Key to drop in /certs for HTTPS if no reverse proxy
WEBROOTIf you wish to install to a subfolder use this. Example: /var/www/html/pbx Default '/var/www/html'

ADMIN_DIRECTORY and FOP_DIRECTORY may not work correctly if WEBROOT is changed or UCP_FIRST=FALSE

Networking

The following ports are exposed.

PortDescription
80HTTP
443HTTPS
4445FOP
4569IAX
5060PJSIP
5160SIP
8001UCP
8003UCP SSL
8008UCP
8009UCP SSL
18000-20000/udpRTP Ports

Maintenance

  • There seems to be a problem with the CDR Module when updating where it refuses to update when using an external DB Server. If that happens, simply enter the container (as shown below) and execute upgrade-cdr, which will download the latest CDR module, apply a tweak, install, and reload the system for you.

Known Bugs

  • When installing Parking Lot or Feature Codes you sometimes get SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'helptext' at row 1. To resolve login to your SQL server and issue this statement: alter table featurecodes modify column helptext varchar(500);
  • If you find yourself needing to update the framework or core modules and experience issues, enter the container and run upgrade-core which will truncate the column and auto upgrade the core and framework modules.
Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is e.g. freepbx) bash

References

Tag summary

Content type

Image

Digest

Size

559.1 MB

Last updated

almost 7 years ago

docker pull aasaidane/freepbx