Skip to content

About

fusionpbx 5.2/freeswitch 1.10.9/php 7.4

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

22 Commits

Folders and files

Repository files navigation

FusionPBX Docker

Docker Hub License

A comprehensive Docker solution for FusionPBX, providing a complete VoIP platform with all necessary components pre-configured and ready to deploy.

Stack: Ubuntu 20.04 β€’ FusionPBX 5.2 β€’ FreeSWITCH 1.10.9 β€’ PHP 7.4 β€’ PostgreSQL 12

πŸ“š References

πŸ“‹ Table of Contents

πŸ—οΈ Software Stack

Component Version
Base OS Ubuntu 20.04
FusionPBX 5.2
FreeSWITCH 1.10.9
PHP 7.4
PostgreSQL 12

οΏ½ Included Services

The Docker image includes the following pre-configured services:

  • iptables - Firewall management
  • sngrep - SIP packet capture tool
  • fusionpbx - Web-based PBX system
  • php - PHP runtime
  • nginx - Web server
  • postgres - Database server
  • freeswitch - Voice over IP platform
  • fail2ban - Intrusion prevention system

πŸš€ Quick Start

Step 1: Configure Permissions

Set the proper ownership for the config directory:

sudo chown 33:33 config -R

πŸ’‘ Note: The src directory contains the complete FusionPBX installer source code, allowing for customization and transparency in the build process.

Step 2: Choose Your Deployment Method

Option A: Use Pre-built Image (Recommended)

Pull the latest image from Docker Hub:

docker pull michaelfangtw/fusionpbx-docker-dev:5.2

Option B: Build Locally

If you want to build the image locally: you can change password in config.sh

docker build -t fusionpbx-docker-dev:5.2 .

Step 3: Configure Docker Compose

The docker-compose.yaml file is already configured. Choose your preferred method:

  • 1. Pre-built image (default): Uses michaelfangtw/fusionpbx-docker-dev:5.2
  • 1. Local build: Uncomment the build section in the compose file
services:
  pbx:
    # 1. Use pre-built image from Docker Hub
    image: michaelfangtw/fusionpbx-docker-dev:5.2
    
    # 2. Or build locally (uncomment to use)
    # build:
    #   context: .
    # 3. Or build locally (uncomment to use)
    # image: fusionpbx-docker-dev:5.2
    
    # Host networking for RTP port range
    network_mode: "host"
    container_name: fusionpbx
    restart: always
    privileged: true

    # Persist configuration
    volumes:
      - ./config/fusionpbx:/etc/fusionpbx

    entrypoint: ["/usr/sbin/init"]

Step 4: Start the Container

docker compose up -d

Step 5: Access the Web Interface

Once the container is running, access FusionPBX at:

  • URL: http://localhost
  • Username: admin@localhost
  • **vi **: password * dont forget to change password *

πŸ“ Project Structure

fusionpbx-docker-dev/
β”œβ”€β”€ config/                    # Configuration files
β”‚   └── fusionpbx/            # FusionPBX configuration
β”œβ”€β”€ src/                      # Source code and installers
β”‚   └── fusionpbx-install.sh/ # Official FusionPBX installer scripts
β”‚       β”œβ”€β”€ centos/           # CentOS installation scripts
β”‚       β”œβ”€β”€ debian/           # Debian installation scripts
β”‚       β”œβ”€β”€ devuan/           # Devuan installation scripts
β”‚       β”œβ”€β”€ freebsd/          # FreeBSD installation scripts
β”‚       β”œβ”€β”€ ubuntu/           # Ubuntu installation scripts
β”‚       └── windows/          # Windows installation scripts
β”œβ”€β”€ docker-compose.yaml       # Docker Compose configuration
β”œβ”€β”€ Dockerfile               # Docker image definition
└── README.md               # Documentation

πŸ“ Note: The src/fusionpbx-install.sh directory contains the complete official installer with platform-specific scripts and resources for various operating systems.

πŸ” Default Credentials

🌐 Web Interface

  • URL: http://localhost
  • Username: admin@localhost
  • Password: password * dont forget to change password *

πŸ—„οΈ Database (PostgreSQL)

⚠️ IMPORTANT: Do not change these credentials - they are required for proper operation

  • Host: localhost
  • User: fusionpbx
  • Password: password * don't forget to change your password *

🌐 Network Configuration

This container uses host networking mode to properly handle RTP traffic for VoIP communications. This means:

  • All services are accessible on the host's network interface
  • No port mapping is required
  • FreeSWITCH can properly handle media streams

πŸ’Ύ Data Persistence

Configuration data is persisted through Docker volumes:

Host Path Container Path Description
./config/fusionpbx /etc/fusionpbx FusionPBX configuration files

βš™οΈ Requirements

  • Docker Engine: 20.10+
  • Docker Compose: v2.0+
  • Operating System: Linux (required for host networking mode)

πŸ”§ Troubleshooting

🌐 Web Interface Issues

Problem: Cannot Access Web Interface

If you can't access the web interface at http://localhost:

  1. Check container status:

    docker ps
  2. View container logs:

    docker logs fusionpbx
  3. Check port availability:

    sudo netstat -tulpn | grep :80

Problem: Login Issues

If you cannot log in to the web interface:

  1. Access the container:

    docker exec -it fusionpbx /bin/bash
  2. Backup existing configuration:

    mv /etc/fusionpbx/config.conf /etc/fusionpbx/config.conf.old
  3. Reset admin credentials:

    http://localhost
    1.reset admin
      id=admin 
      pass=password  * don't forget to change your password *
      domain:localhost
    
      postgresq
      db host:localhost
      port:5432
      id=fusionpbx
      pass=password   * don't forget to change your password *
    
  4. Use default credentials:

    • Username: admin
    • Password: password * don't forget to change your password *

πŸ—„οΈ Database Issues

Problem: Database Connection Failures

If you encounter database-related login failures:

  1. Access the container:

    docker exec -it fusionpbx /bin/bash
  2. Navigate to resources directory:

    cd /src/fusionpbx-install.sh/ubuntu/resources
  3. Recreate the database:

    ./postgresql.sh    # Create database
    ./finish.sh        # Set admin credentials

🐳 Container Management

Save Changes to Local Image

To preserve modifications made inside the container:

# Make changes inside the container
docker exec -it fusionpbx /bin/bash
# ... perform your modifications ...
# Exit the container

# Commit changes to create a new image
TAG=5.2
docker tag fusionpbx-docker:$TAG  michaelfangtw/fusionpbx-docker:$TAG
docker login
docker push michaelfangtw/fusionpbx-docker:$TAG

View Container Logs

# Real-time logs
docker logs -f fusionpbx

# Last 100 lines
docker logs --tail 100 fusionpbx

Restart Container

docker restart fusionpbx

πŸ“š Additional Resources

🀝 Contributing

This project includes the complete FusionPBX installer source code in the src/ directory for transparency and customization. Feel free to submit issues and pull requests.

πŸ“„ License

This project follows the same licensing as the original FusionPBX project. Please refer to the official FusionPBX repository for license details.

About

fusionpbx 5.2/freeswitch 1.10.9/php 7.4

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages