AiPBX

Spec 004: Web Video Meetings & Guest Conference Scheduling System


1. Problem & Goal (What & Why)

1.1 Problem Statement

  1. Audio-Only Legacy Conferencing: AiPBX’s /conferences interface currently only handles basic voice ConfBridge rooms. In modern work environments, teams require video meetings with gallery/grid view, active speaker detection, and screen sharing.
  2. Scheduled Meetings & Calendar Gaps: Users have no built-in way to schedule future video meetings for specific dates and times, or share meeting invites with calendar (.ics) attachments.
  3. No External/Guest Access: Anyone without an extension or portal account is currently locked out of PBX conferences. Organizations must rely on third-party services (Zoom, Google Meet, Teams) to host meetings with clients, vendors, or external partners.
  4. Asterisk ConfBridge Video Architecture: Asterisk 20/22 natively supports Selective Forwarding Unit (SFU) mode (video_mode=sfu) and Active Speaker mode (video_mode=follow_talker), but endpoints need max_audio_streams and max_video_streams expanded, and ConfBridge bridge profiles configured.

1.2 Proposed Solution


2. User Stories & Acceptance Criteria (DoD)

User Stories

Acceptance Criteria (Definition of Done)


3. Technical Design (How)

3.1 Database Schema

CREATE TABLE `pbx_meetings` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `meeting_token` VARCHAR(64) NOT NULL UNIQUE,
  `title` VARCHAR(191) NOT NULL,
  `description` TEXT NULL,
  `host_user_id` INT NULL,
  `room_number` VARCHAR(32) NOT NULL,
  `pin` VARCHAR(32) NULL,
  `scheduled_start` DATETIME NOT NULL,
  `scheduled_end` DATETIME NOT NULL,
  `video_mode` ENUM('sfu', 'follow_talker', 'none') DEFAULT 'sfu',
  `max_participants` INT DEFAULT 25,
  `allow_guests` TINYINT(1) DEFAULT 1,
  `status` ENUM('scheduled', 'in_progress', 'completed', 'cancelled') DEFAULT 'scheduled',
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  INDEX `idx_meeting_token` (`meeting_token`),
  INDEX `idx_scheduled_start` (`scheduled_start`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `pbx_meeting_invites` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `meeting_id` INT NOT NULL,
  `email` VARCHAR(191) NOT NULL,
  `name` VARCHAR(191) NULL,
  `guest_token` VARCHAR(64) NOT NULL UNIQUE,
  `status` ENUM('invited', 'accepted', 'joined', 'declined') DEFAULT 'invited',
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`meeting_id`) REFERENCES `pbx_meetings`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

3.2 Services & Controllers


4. Verification & Testing