Skip to content

Commit

Permalink
Release 5.0.2 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jul 13, 2020
1 parent 54be9c6 commit 8a772c8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 87 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.0.2 2020-07-13 <dave at tiredofit dot ca>

### Changed
- Disable app_vooicemail_odbc and app_voicemail_imap causing problems with Voicemail working


## 5.0.1 2020-06-20 <rusxakep@github>

### Changed
Expand Down
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,14 @@ RUN echo "Package: libxml2*" > /etc/apt/preferences.d/libxml2 && \
cd /usr/src/asterisk/ && \
make distclean && \
contrib/scripts/get_mp3_source.sh && \
\
cd /usr/src/asterisk && \
./configure \
--with-jansson-bundled \
--with-pjproject-bundled \
--with-bluetooth \
--with-codec2 \
--with-corosync \
--with-crypto \
--with-ffmpeg \
--with-freetds \
--with-gmime \
--with-iconv \
--with-iksemel \
Expand All @@ -196,7 +195,6 @@ RUN echo "Package: libxml2*" > /etc/apt/preferences.d/libxml2 && \
--with-libxslt \
--with-lua \
--with-ogg \
--with-openssl \
--with-opus \
--with-resample \
--with-spandsp \
Expand All @@ -207,7 +205,7 @@ RUN echo "Package: libxml2*" > /etc/apt/preferences.d/libxml2 && \
--with-uriparser \
--with-vorbis \
--with-vpb \
--with-zlib && \
&& \
\
make menuselect/menuselect menuselect-tree menuselect.makeopts && \
menuselect/menuselect --disable BUILD_NATIVE \
Expand All @@ -221,8 +219,9 @@ RUN echo "Package: libxml2*" > /etc/apt/preferences.d/libxml2 && \
--enable BETTER_BACKTRACES \
--disable MOH-OPSOUND-WAV \
--enable MOH-OPSOUND-GSM \
--disable app_voicemail_imap \
--disable app_voicemail_odbc \
--disable res_digium_phone \
--disable codec_g723 \
--disable codec_g729a && \
make && \
make install && \
Expand Down Expand Up @@ -306,4 +305,4 @@ RUN echo "Package: libxml2*" > /etc/apt/preferences.d/libxml2 && \
EXPOSE 80 443 4445 4569 5060/udp 5160/udp 5061 5161 8001 8003 8008 8009 8025 ${RTP_START}-${RTP_FINISH}/udp

### Files add
ADD install /
ADD install /
161 changes: 81 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
[![Docker Layers](https://images.microbadger.com/badges/image/tiredofit/freepbx.svg)](https://microbadger.com/images/tiredofit/freepbx)


# Introduction
## Introduction

This will build a container for [FreePBX](https://www.freepbx.org) - A Voice over IP manager for Asterisk.
Upon starting this image it will give you a turn-key PBX system for SIP calling.
This will build a container for [FreePBX](https://www.freepbx.org) - 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 FreePBX 15
* Latest release Asterisk 17
Expand All @@ -23,42 +23,43 @@ Upon starting this image it will give you a turn-key PBX system for SIP calling.
* Customizable FOP and Admin URLs

This container uses [tiredofit/debian:buster](https://hub.docker.com/r/tiredofit/debian) as a base.
**If you are presently running this image when it utilized FreePBX 14 and

**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](https://github.com/tiredofit/docker-freepbx/issues/51)**


[Changelog](CHANGELOG.md)

# Authors
## Authors

- [Dave Conroy](https://github.com/tiredofit)

# Table of Contents
## Table of Contents

- [Introduction](#introduction)
- [Changelog](CHANGELOG.md)
- [Authors](#authors)
- [Table of Contents](#table-of-contents)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [Data Volumes](#data-volumes)
- [Environment Variables](#environmentvariables)
- [Networking](#networking)
- [Data-Volumes](#data-volumes)
- [Environment Variables](#environment-variables)
- [Networking](#networking)
- [Maintenance](#maintenance)
- [Shell Access](#shell-access)
- [References](#references)
- [Shell Access](#shell-access)
- [References](#references)

# Prerequisites
## Prerequisites

This image assumes that you are using a reverse proxy such as
[jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) and optionally the [Let's Encrypt Proxy
Companion @ https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion)
This image assumes that you are using a reverse proxy such as
[jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) and optionally the [Let's Encrypt Proxy
Companion @ https://github.com/JrCs/docker-letsencrypt-nginx-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, although it can use an internally provided service (not recommended).

# Installation
## Installation

Automated builds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/freepbx) and is the recommended method of installation.

Expand All @@ -75,9 +76,9 @@ The following image tags are available:
You can also visit the image tags section on Docker hub to pull a version that follows the CHANGELOG.


# Quick Start
### Quick Start

* The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/).
* The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/).
See the example's folder for a working [docker-compose.yml](examples/docker-compose.yml) that can be modified for development or production use.

* Set various [environment variables](#environment-variables) to understand the capabilities of this image.
Expand All @@ -88,97 +89,97 @@ See the example's folder for a working [docker-compose.yml](examples/docker-comp

Login to the web server's admin URL (default /admin) and enter in your admin username, admin password, and email address and start configuring the system!

# Configuration
## 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`.
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 configure and can be mapped for persistent storage.

| Directory | Description |
|--------------|-------------------------------------------------------------|
| `/certs` | Drop your certificates here for TLS w/PJSIP / UCP / HTTPd/ FOP |
| `/var/www/html` | FreePBX web files |
| `/var/log/` | Apache, Asterisk and FreePBX Log Files |
| `/data` | Data persistence for Asterisk and FreePBX and FOP
| `/assets/custom` | *OPTIONAL* - 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 |
| Directory | Description |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `/certs` | Drop your certificates here for TLS w/PJSIP / UCP / HTTPd/ FOP |
| `/var/www/html` | FreePBX web files |
| `/var/log/` | Apache, Asterisk and FreePBX Log Files |
| `/data` | Data persistence for Asterisk and FreePBX and FOP |
| `/assets/custom` | *OPTIONAL* - 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](https://hub.docker.com/r/tiredofit/debian),
Along with the environment variables from the [Base image](https://hub.docker.com/r/tiredofit/debian),
below is the complete list of available options that can be used to customize your installation.

| Parameter | Description |
|------------------|----------------------------------------|
| `ADMIN_DIRECTORY` | What folder to access admin panel - Default `/admin` |
| `DB_EMBEDDED` | Allows you to use an internally provided MariaDB Server e.g. `TRUE` or `FALSE` |
| `DB_HOST` | Host or container name of MySQL Server e.g. `freepbx-db` |
| `DB_PORT` | MySQL Port - Default `3306` |
| `DB_NAME` | MySQL Database name e.g. `asterisk` |
| `DB_USER` | MySQL Username for above database e.g. `asterisk` |
| `DB_PASS` | MySQL Password for above database e.g. `password`|
| `ENABLE_FAIL2BAN` | Enable Fail2ban to block the "bad guys" - Default `TRUE`|
| `ENABLE_FOP` | Enable Flash Operator Panel - Default `FALSE` |
| `ENABLE_SSL` | Enable HTTPd to serve SSL requests - Default `FALSE`|
| `ENABLE_XMPP` | Enable XMPP Module with MongoDB - Default `FALSE` |
| `FOP_DIRECTORY` | What folder to access FOP - Default `/fop`
| `HTTP_PORT` | HTTP listening port - Default `80` |
| `HTTPS_PORT` | HTTPS listening port - Default `443` |
| `INSTALL_ADDITIONAL_MODULES` | Comma separated list of modules to additionally install on first container startup |
| `RTP_START` | What port to start RTP transmissions - Default `18000` |
| `RTP_FINISH` | What port to start RTP transmissions - Default `20000` |
| `UCP_FIRST` | Load UCP as web frontpage `TRUE/FALSE` - Default `TRUE` |
| `TLS_CERT` | TLS certificate to drop in /certs for HTTPS if no reverse proxy |
| `TLS_KEY` | TLS Key to drop in /certs for HTTPS if no reverse proxy |
| `WEBROOT` | If you wish to install to a subfolder use this. Example: `/var/www/html/pbx` Default '/var/www/html'
| Parameter | Description | Default |
| ---------------------------- | ---------------------------------------------------------------------------------- | --------------- |
| `ADMIN_DIRECTORY` | What folder to access admin panel | `/admin` |
| `DB_EMBEDDED` | Allows you to use an internally provided MariaDB Server e.g. `TRUE` or `FALSE` | |
| `DB_HOST` | Host or container name of MySQL Server e.g. `freepbx-db` | |
| `DB_PORT` | MySQL Port | `3306` |
| `DB_NAME` | MySQL Database name e.g. `asterisk` | |
| `DB_USER` | MySQL Username for above database e.g. `asterisk` | |
| `DB_PASS` | MySQL Password for above database e.g. `password` | |
| `ENABLE_FAIL2BAN` | Enable Fail2ban to block the "bad guys" | `TRUE` |
| `ENABLE_FOP` | Enable Flash Operator Panel | `FALSE` |
| `ENABLE_SSL` | Enable HTTPd to serve SSL requests | `FALSE` |
| `ENABLE_XMPP` | Enable XMPP Module with MongoDB | `FALSE` |
| `FOP_DIRECTORY` | What folder to access FOP | `/fop` |
| `HTTP_PORT` | HTTP listening port | `80` |
| `HTTPS_PORT` | HTTPS listening port | `443` |
| `INSTALL_ADDITIONAL_MODULES` | Comma separated list of modules to additionally install on first container startup | |
| `RTP_START` | What port to start RTP transmissions | `18000` |
| `RTP_FINISH` | What port to start RTP transmissions | `20000` |
| `UCP_FIRST` | Load UCP as web frontpage `TRUE` or `FALSE` | `TRUE` |
| `TLS_CERT` | TLS certificate to drop in /certs for HTTPS if no reverse proxy | |
| `TLS_KEY` | TLS Key to drop in /certs for HTTPS if no reverse proxy | |
| `WEBROOT` | If you wish to install to a subfolder use this. Example: `/var/www/html/pbx` | `/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.

| Port | Description |
|-----------|-------------|
| `80` | HTTP |
| `443` | HTTPS |
| `4445` | FOP |
| `4569` | IAX |
| `5060` | PJSIP |
| `5160` | SIP |
| `8001` | UCP |
| `8003` | UCP SSL |
| `8008` | UCP |
| `8009` | UCP SSL |
| `18000-20000/udp` | RTP 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,
| Port | Description |
| ----------------- | ----------- |
| `80` | HTTP |
| `443` | HTTPS |
| `4445` | FOP |
| `4569` | IAX |
| `5060` | PJSIP |
| `5160` | SIP |
| `8001` | UCP |
| `8003` | UCP SSL |
| `8008` | UCP |
| `8009` | UCP SSL |
| `18000-20000/udp` | RTP 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:
* 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
* 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
### Shell Access

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

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

# References
## References

* https://freepbx.org/

0 comments on commit 8a772c8

Please sign in to comment.