Skip to content

Raywonder/flexpbx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FlexPBX - Complete Open Source PBX System

FlexPBX is a complete, feature-rich PBX system built on Asterisk with a modern web interface, user migration system, documentation center, and free remote streaming music on hold.

Version: 1.4 Release Date: November 9, 2025 License: Open Source


πŸŽ‰ What's New in v1.4

  • User Migration System: Move users between extensions and departments with automatic queue updates
  • Complete Documentation Center: 14 comprehensive guides (5000+ lines)
  • Remote Streaming MOH: Free TappedIn Radio Network integration
  • Department Management: Enhanced with automatic queue management
  • Migration History: Complete audit trail for all user moves
  • Complete Database Schema: All 17 tables in single SQL file

πŸ“¦ Download & Installation

Quick Installation (Recommended)

Download pre-built installers:

Master Server (Full features, host your own):

wget https://flexpbx.devinecreations.net/downloads/FlexPBX-Master-Server-v1.4.tar.gz
tar -xzf FlexPBX-Master-Server-v1.4.tar.gz
cd FlexPBX-Master-Server-v1.4
sudo bash install.sh

Client Installation (Uses remote streaming):

wget https://flexpbx.devinecreations.net/downloads/FlexPBX-Client-v1.4.tar.gz
tar -xzf FlexPBX-Client-v1.4.tar.gz
cd FlexPBX-Client-v1.4
sudo bash install.sh

Install from Source

Clone this repository and copy source files manually:

# Clone repository
git clone https://github.com/Raywonder/flexpbx.git
cd flexpbx

# Copy source files
cp -r src/admin/* /path/to/webroot/admin/
cp -r src/api/* /path/to/webroot/api/
cp -r src/user-portal/* /path/to/webroot/user-portal/
cp -r src/includes/* /path/to/webroot/includes/

# Import database
mysql -u username -p database_name < sql/complete-schema.sql

# Configure Asterisk
sudo cp config/musiconhold.conf /etc/asterisk/
sudo asterisk -rx "moh reload"

See src/README.md for detailed installation instructions.


πŸ“ Repository Structure

flexpbx/
β”œβ”€β”€ src/                        Source code (275 files)
β”‚   β”œβ”€β”€ admin/                  Admin panel (81 PHP files)
β”‚   β”œβ”€β”€ api/                    API endpoints (123 PHP files)
β”‚   β”œβ”€β”€ user-portal/            User portal (38 PHP files)
β”‚   β”œβ”€β”€ includes/               Shared libraries (17 PHP files)
β”‚   β”œβ”€β”€ scripts/                Utility scripts (11 files)
β”‚   β”œβ”€β”€ cron/                   Scheduled tasks (5 PHP files)
β”‚   └── README.md               Source installation guide
β”‚
β”œβ”€β”€ docs/                       Documentation (14 files, 5000+ lines)
β”‚   β”œβ”€β”€ AZURACAST_INTEGRATION.md
β”‚   β”œβ”€β”€ COMPLETE_SYSTEM_STATUS_NOV9_2025.md
β”‚   β”œβ”€β”€ DOCUMENTATION_INDEX.md
β”‚   β”œβ”€β”€ USER_MIGRATION_COMPLETE_GUIDE.md
β”‚   └── ... (10 more)
β”‚
β”œβ”€β”€ sql/                        Database schemas
β”‚   β”œβ”€β”€ complete-schema.sql     All 17 tables (360 lines)
β”‚   └── migration_history_table.sql
β”‚
β”œβ”€β”€ config/                     Configuration files
β”‚   β”œβ”€β”€ musiconhold.conf        MOH with remote streaming
β”‚   β”œβ”€β”€ asterisk-dialplan-defaults.conf
β”‚   └── ivr-templates.json
β”‚
β”œβ”€β”€ scripts/                    Asterisk automation
β”‚   β”œβ”€β”€ auto-configure-feature-codes.php
β”‚   └── configure-asterisk-dialplan.sh
β”‚
β”œβ”€β”€ mcp-server/                 AI Integration (MCP Server)
β”‚   β”œβ”€β”€ src/                    MCP server source (20 tools)
β”‚   β”œβ”€β”€ docs/                   MCP documentation
β”‚   β”œβ”€β”€ examples/               Usage examples
β”‚   └── README.md               MCP server guide
β”‚
└── README.md                   This file

✨ Features

User Management

  • βœ… User invitation system with email notifications
  • βœ… User migration (change extensions, move departments)
  • βœ… Extension auto-assignment (2000-2999 range)
  • βœ… Department management with automatic queue updates
  • βœ… Bulk user operations
  • βœ… Complete migration history audit trail

Communication

  • βœ… PJSIP SIP endpoints
  • βœ… Voicemail with email notifications
  • βœ… Call queues with statistics
  • βœ… Conference rooms (ConfBridge)
  • βœ… Call parking (700-702)
  • βœ… Ring groups
  • βœ… IVR builder with templates

Music on Hold

  • βœ… Free remote streaming (TappedIn Radio Network)
  • βœ… Multiple radio stations (TappedIn, Raywonder, SoulFood, ChrisMix)
  • βœ… Local file support
  • βœ… Jellyfin integration (optional)
  • βœ… Remote MOH server connection (optional)

Documentation & Help

  • βœ… Documentation center with 14 comprehensive guides
  • βœ… Searchable documentation interface
  • βœ… Markdown to HTML viewer
  • βœ… Print and download capabilities
  • βœ… Help system with articles
  • βœ… Quick reference cards

Admin Features

  • βœ… Modern admin dashboard
  • βœ… Extension management
  • βœ… Department management
  • βœ… Queue management
  • βœ… Call logs and analytics
  • βœ… Mattermost chat integration
  • βœ… Notification system
  • βœ… Security settings
  • βœ… Role management

Integrations

  • βœ… Mattermost chat embedding
  • βœ… TextNow SMS/calling
  • βœ… Google Voice OAuth 2.0
  • βœ… Twilio API
  • βœ… XMPP messaging framework
  • βœ… Mastodon OAuth authentication

AI Integration (MCP Server)

  • βœ… 20 production-ready tools for AI assistants
  • βœ… Conference management (7 tools)
  • βœ… Extension monitoring (3 tools)
  • βœ… Dial plan rules (3 tools)
  • βœ… Call analytics (3 tools)
  • βœ… Claude Desktop integration
  • βœ… Full AMI integration

See mcp-server/README.md for MCP server details.


πŸ—„οΈ Database Schema

17 Tables Included

Core Tables:

  • extensions - User extensions with status tracking
  • departments - Department organization
  • department_queues - Department-queue relationships

Migration System:

  • migration_history - Complete audit trail

XMPP/Messaging:

  • xmpp_users, xmpp_messages, xmpp_roster

Notifications:

  • notifications, announcements

IVR & Queues:

  • ivr_templates, queue_members, queue_stats

Voicemail:

  • voicemail

PJSIP:

  • ps_endpoints, ps_auths, ps_aors

Support:

  • help_articles, log_files

Views:

  • extension_summary - Complete extension overview

See sql/complete-schema.sql for full schema.


🎡 Music on Hold

Free Remote Streaming (NEW in v1.4)

FlexPBX v1.4 includes free remote streaming for all installations:

  1. TappedIn Radio - Soundscapes, meditation music, podcasts

  2. Raywonder Radio - Audio described content, educational

  3. External Streams - SoulFood Radio, ChrisMix Radio

  4. Optional - Jellyfin, Remote MOH server (ready to enable)

No music licensing needed! Works immediately out of the box.

See config/musiconhold.conf for configuration.


πŸš€ Quick Start

1. System Requirements

Minimum:

  • Rocky Linux 8/9, AlmaLinux 8/9, CentOS 8+, or Ubuntu 20.04+
  • 2GB RAM (master), 1GB RAM (client)
  • 20GB disk (master), 10GB disk (client)
  • PHP 8.0+ (8.1 or 8.2 recommended)
  • MariaDB 10.5+ or MySQL 8.0+
  • Asterisk 18.12.1+
  • Apache 2.4+ with mod_rewrite

Recommended:

  • 4GB RAM
  • 40GB disk
  • PHP 8.2
  • MariaDB 10.11
  • Internet connection (for remote streaming MOH)

2. Post-Installation

After installation:

  1. Access Admin Portal:

    https://your-server/admin/
    
  2. Default Admin:

    • Create admin account during installation
    • Or set role to 'admin' in database
  3. Configure System:

    • System Settings β†’ Configure PBX
    • Department Management β†’ Create departments
    • User Management β†’ Invite users
    • MOH Settings β†’ Test remote streaming
  4. Test Features:

    • Dial *43 for echo test
    • Dial 9991 to test MOH
    • Dial 8000 for conference room

3. User Migration

Move users between extensions or departments:

  1. Go to Admin Dashboard β†’ User & Department Management β†’ User Migration

  2. Choose migration type:

    • Complete migration (extension + department)
    • Quick extension change
    • Department transfer only
    • Bulk migration
  3. Preview changes before executing

  4. System automatically updates:

    • PJSIP configuration
    • Queue memberships
    • Voicemail location
    • User portal display

See docs/USER_MIGRATION_COMPLETE_GUIDE.md for detailed guide.


πŸ“š Documentation

Complete Guides (14 Files)

All documentation is included in the docs/ directory:

  1. System Status & Implementation:

    • COMPLETE_SYSTEM_STATUS_NOV9_2025.md
    • FLEXPBX_COMPLETE_FEATURE_INTEGRATION_NOV9_2025.md
    • SESSION_COMPLETE_NOV9_2025.md
    • FINAL_SESSION_SUMMARY_NOV9_2025.md
  2. Setup & Configuration:

    • AZURACAST_INTEGRATION.md
    • INSTALLER_DIALPLAN_INTEGRATION.md
    • FREEPBX_COMPATIBILITY_GUIDE.md
  3. User Management:

    • USER_MIGRATION_COMPLETE_GUIDE.md (500+ lines)
    • USER_MIGRATION_SUMMARY_NOV9_2025.md
    • USER_INVITATION_QUICK_START.md
  4. Quick Reference:

    • FLEXPBX_QUICK_REFERENCE_CARD.md
    • DOCUMENTATION_INDEX.md
    • DOCUMENTATION_LINKING_COMPLETE_NOV9_2025.md
    • FLEXPBX_XMPP_INTEGRATION.md

Total: 5000+ lines of comprehensive documentation

Access Documentation

Via Admin Panel:

Admin Dashboard β†’ Documentation Center

Via Files:

See docs/ directory in repository or installation

πŸ€– AI Integration (MCP Server)

FlexPBX includes a Model Context Protocol (MCP) server for AI integration.

Features

20 Production Tools:

  • AMI Core (4 tools): status, channels, originate, hangup
  • Conference Management (7 tools): list, participants, kick, mute, lock, etc.
  • Extension Management (3 tools): list, status, registration
  • Dial Plan (3 tools): rules, feature codes, validation
  • Call Analytics (3 tools): CDR, statistics, summaries

Quick Start

# Install MCP server
cd mcp-server
npm install

# Configure
cp .env.example .env
nano .env  # Add your AMI credentials

# Start server
npm start

Claude Desktop Integration

Add to Claude Desktop config:

{
  "mcpServers": {
    "flexpbx-voip": {
      "command": "node",
      "args": ["/path/to/flexpbx/mcp-server/src/index.js"],
      "env": {
        "AMI_HOST": "127.0.0.1",
        "AMI_PORT": "5038",
        "AMI_USERNAME": "your_username",
        "AMI_SECRET": "your_secret"
      }
    }
  }
}

See mcp-server/README.md for complete guide.


πŸ”§ Development

File Counts

  • PHP Files: 259
  • JavaScript Files: 10+
  • CSS Files: 5+
  • SQL Files: 2
  • Documentation: 14 files
  • Total Lines: 50,000+ (source) + 5,000+ (docs)

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

Code Structure

Admin Panel (src/admin/):

  • MVC-like structure
  • Session-based authentication
  • Role-based access control

API (src/api/):

  • RESTful endpoints
  • JSON responses
  • Database abstraction

User Portal (src/user-portal/):

  • User-facing features
  • Extension management
  • Profile settings

πŸ” Security

Best Practices

  • βœ… Use strong database passwords
  • βœ… Enable HTTPS/SSL
  • βœ… Configure firewall (ports 5060, 5061, 10000-20000)
  • βœ… Restrict AMI access
  • βœ… Enable fail2ban
  • βœ… Regular security updates
  • βœ… Change default admin credentials

Default Credentials

Admin Account:

  • Created during installation
  • Set strong password
  • Enable 2FA (if available)

Database:

  • Configure unique credentials
  • Restrict localhost-only access
  • Use strong passwords

πŸ“ž Support & Contact

Resources

Contact


πŸ“Š Statistics

v1.4 Release

  • Source Files: 275
  • Lines of Code: 50,000+
  • Documentation: 5,000+ lines (14 files)
  • Database Tables: 17
  • API Endpoints: 123
  • Admin Pages: 81
  • User Portal Pages: 38
  • MCP Tools: 20

Features

  • User Migration System: βœ…
  • Documentation Center: βœ…
  • Remote Streaming MOH: βœ… (Free)
  • Department Management: βœ…
  • XMPP Messaging: βœ…
  • Mattermost Integration: βœ…
  • AI Integration (MCP): βœ…

πŸ“œ License

FlexPBX is open source software. See LICENSE file for details.


πŸŽ‰ Credits

Developed by: Devine Creations Website: https://devine-creations.com | https://devinecreations.net Version: 1.4 Release Date: November 9, 2025

Built with:

  • Asterisk PBX
  • PHP 8.x
  • MariaDB
  • JavaScript/jQuery
  • Model Context Protocol (MCP)

Free Streaming Provided by:

  • TappedIn Radio Network
  • Raywonder Radio

πŸ”— Quick Links


⭐ Star this repository if you find FlexPBX useful!

🀝 Contributions welcome!

About

This is flex pbx! Not just your avrige pbx system!

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors