{
  "schema_version": "1.0.0",
  "catalog_version": "1.0.0-manual19",
  "updated_at": "2026-11-25T00:00:00Z",
  "repo_base_url": "https://repo.softswitchone.com/apt/cluster",
  "os_requirement": {
    "distro": "debian",
    "version": "13",
    "codename": "trixie",
    "architectures": ["amd64", "arm64"]
  },
  "sizing_profiles": {
    "lab": {
      "label": "Lab / PoC",
      "description": "Development, QA, and lab validation clusters (up to ~200 extensions, ~30 concurrent calls).",
      "pg_max_connections": 400,
      "haproxy_maxconn": 150,
      "fs_max_sessions": 250,
      "fs_sps": 30,
      "kamailio_shm_mb": 256,
      "kamailio_pkg_mb": 16
    },
    "production": {
      "label": "Production (SMB / ISP)",
      "description": "Production horizontal clusters with full HA failover (up to ~3,000 extensions, ~500 concurrent calls).",
      "pg_max_connections": 800,
      "haproxy_maxconn": 250,
      "fs_max_sessions": 1500,
      "fs_sps": 80,
      "kamailio_shm_mb": 1024,
      "kamailio_pkg_mb": 32
    },
    "carrier": {
      "label": "Carrier / Enterprise",
      "description": "High-density carrier deployments (10,000–20,000 extensions, 2,000–5,000 concurrent calls).",
      "pg_max_connections": 1200,
      "haproxy_maxconn": 500,
      "fs_max_sessions": 5000,
      "fs_sps": 200,
      "kamailio_shm_mb": 4096,
      "kamailio_pkg_mb": 64
    }
  },
  "storage_modes": [
    {
      "id": "glusterfs_replica3",
      "label": "GlusterFS Replica 3 Cluster",
      "category": "onprem",
      "requires_nodes": true,
      "enabled": true,
      "description": "Dedicated 3+ node self-healing replicated POSIX storage for ss-recordings, ss-uploads, and ss-music."
    },
    {
      "id": "cloudflare_r2",
      "label": "Cloudflare R2 (Zero-Egress S3)",
      "category": "cloud_object",
      "requires_nodes": false,
      "enabled": true,
      "description": "Zero-egress S3-compatible object storage with local NVMe write-back cache for active calls."
    },
    {
      "id": "aws_s3",
      "label": "Amazon S3",
      "category": "cloud_object",
      "requires_nodes": false,
      "enabled": true,
      "description": "AWS S3 bucket with IAM access keys, lifecycle archiving, and local NVMe write-back cache."
    },
    {
      "id": "google_cloud_storage",
      "label": "Google Cloud Storage (GCS)",
      "category": "cloud_object",
      "requires_nodes": false,
      "enabled": true,
      "description": "Google Cloud Storage via Service Account JSON or S3 Interop HMAC keys with local write-back cache."
    },
    {
      "id": "google_drive",
      "label": "Google Drive / Shared Drive",
      "category": "cloud_drive",
      "requires_nodes": false,
      "enabled": true,
      "description": "Google Workspace Shared Drive via Service Account JSON or OAuth2 token with local NVMe write-back cache."
    },
    {
      "id": "s3_compatible",
      "label": "S3-Compatible (MinIO / Wasabi / Backblaze B2 / Spaces)",
      "category": "cloud_object",
      "requires_nodes": false,
      "enabled": true,
      "description": "Universal S3-compatible provider for MinIO, Wasabi, Backblaze B2, DigitalOcean Spaces, or Hetzner."
    },
    {
      "id": "azure_blob",
      "label": "Microsoft Azure Blob Storage",
      "category": "cloud_object",
      "requires_nodes": false,
      "enabled": true,
      "description": "Azure Storage Container authenticated via Account Key or SAS URL with local write-back cache."
    },
    {
      "id": "nfs_external",
      "label": "External NAS / NFSv4.1 / EFS / Filestore",
      "category": "onprem",
      "requires_nodes": false,
      "enabled": true,
      "description": "Native kernel NFSv4.1 mount against corporate ZFS/SAN NAS, AWS EFS, or GCP Filestore (0 extra VMs)."
    },
    {
      "id": "sftp_external",
      "label": "External SFTP / Storage Box",
      "category": "onprem",
      "requires_nodes": false,
      "enabled": true,
      "description": "Dedicated SSH/SFTP Storage Box (e.g. Hetzner Storage Box or private NAS) with local NVMe write-back cache."
    }
  ],
  "roles": [
    {
      "id": "pg_ha",
      "name": "PostgreSQL 17 HA Node",
      "short_name": "DB HA",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_1_postgres_ha",
      "hostname_prefix": "pg-node",
      "min_nodes": 3,
      "recommended_nodes": 3,
      "odd_quorum": true,
      "scalable_day2": false,
      "packages": ["postgresql-17", "postgresql-17-pgvector", "etcd-server", "patroni", "python3-etcd"],
      "update_packages": ["postgresql-17", "postgresql-client-17", "postgresql-contrib-17", "postgresql-17-pgvector", "patroni", "etcd-server", "etcd-client", "snmpd"],
      "rolling_upgrade_strategy": "replicas_then_leader",
      "ports": ["5432/tcp", "8008/tcp", "2379/tcp", "2380/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "db_private",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 3072, "disk_gb": 25 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 40 },
        "production": { "vcpu": 4, "ram_mb": 16384, "disk_gb": 150 },
        "carrier": { "vcpu": 16, "ram_mb": 65536, "disk_gb": 500 }
      }
    },
    {
      "id": "storage_gluster",
      "name": "GlusterFS Shared Storage Node",
      "short_name": "File Server",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_2_storage_gluster",
      "hostname_prefix": "fs-node",
      "min_nodes": 3,
      "recommended_nodes": 3,
      "odd_quorum": false,
      "scalable_day2": false,
      "packages": ["glusterfs-server", "nftables"],
      "update_packages": ["glusterfs-server", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["24007/tcp", "24008/tcp", "49152-65535/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "storage_private",
      "requirements": {
        "hard_min": { "vcpu": 1, "ram_mb": 1536, "disk_gb": 25 },
        "lab": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 50 },
        "production": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 500 },
        "carrier": { "vcpu": 4, "ram_mb": 16384, "disk_gb": 2000 }
      }
    },
    {
      "id": "pbx_admin",
      "name": "PBX Control Plane (Admin & API)",
      "short_name": "PBX Admin",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_3a_pbx_admin",
      "hostname_prefix": "pbx-admin",
      "min_nodes": 1,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["haproxy", "glusterfs-client", "nginx", "softswitch-pbx-api", "softswitch-pbx-monitoring-api", "softswitch-pbx-admin", "softswitch-pbx-portal", "softswitch-pbx-switchboard"],
      "update_packages": ["softswitch-pbx-api", "softswitch-pbx-monitoring-api", "softswitch-pbx-admin", "softswitch-pbx-portal", "softswitch-pbx-switchboard", "haproxy", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["80/tcp", "443/tcp", "3001/tcp (internal)", "3500/tcp (internal)", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_a_management",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 60 },
        "carrier": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 100 }
      }
    },
    {
      "id": "pbx_telephony",
      "name": "Telephony Server Pool (Independent Active-Active)",
      "short_name": "Telephony",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_3b_pbx_telephony",
      "hostname_prefix": "pbx-node",
      "min_nodes": 1,
      "recommended_nodes": 3,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["haproxy", "glusterfs-client", "softswitch-pbx-telephony", "softswitch-pbx-music", "softswitch-pbx-voiceguide-emma", "softswitch-pbx-voiceguide-paloma"],
      "update_packages": ["softswitch-pbx-telephony", "softswitch-pbx-music", "softswitch-pbx-voiceguide-emma", "softswitch-pbx-voiceguide-paloma", "haproxy", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["5060/udp+tcp", "5080/udp+tcp", "5061/tcp", "16384-32768/udp", "7443/tcp", "8021/tcp (pbx_admin only)", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_b_telephony",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 80 },
        "carrier": { "vcpu": 16, "ram_mb": 32768, "disk_gb": 200 }
      }
    },
    {
      "id": "sbc_edge",
      "name": "Multi-Master SBC Edge",
      "short_name": "SBC Edge",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_4_sbc_ha",
      "hostname_prefix": "sbc-node",
      "min_nodes": 1,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["haproxy", "nginx", "softswitch-sbc-api", "softswitch-sbc-admin", "softswitch-sbc-telephony"],
      "update_packages": ["softswitch-sbc-api", "softswitch-sbc-admin", "softswitch-sbc-telephony", "haproxy", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "peers_then_primary",
      "ports": ["5060/udp+tcp", "5061/tcp", "5080/udp+tcp", "20000-40000/udp", "5090/udp (SBC peers only)", "443/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "sbc_zero_trust",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 60 },
        "carrier": { "vcpu": 16, "ram_mb": 49152, "disk_gb": 100 }
      }
    },
    {
      "id": "sbc_media",
      "name": "Media Relay Server Pool (Independent Active-Active)",
      "short_name": "Media Relay",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_4b_sbc_media",
      "hostname_prefix": "media-node",
      "min_nodes": 0,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["ngcp-rtpengine-daemon", "ngcp-rtpengine-utils", "nftables"],
      "update_packages": ["ngcp-rtpengine-daemon", "ngcp-rtpengine-utils", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["2223/udp (SBC Edge only)", "20000-40000/udp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "media_relay_edge",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "production": { "vcpu": 4, "ram_mb": 4096, "disk_gb": 40 },
        "carrier": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 80 }
      }
    },
    {
      "id": "bss_admin",
      "name": "BSS Admin & Real-Time OCS Engine",
      "short_name": "BSS Admin",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_5_bss_tier",
      "hostname_prefix": "bss-admin",
      "min_nodes": 1,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["haproxy", "nginx", "softswitch-bss-api", "softswitch-bss-web"],
      "update_packages": ["softswitch-bss-api", "softswitch-bss-web", "haproxy", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["80/tcp", "443/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_a_management",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 60 },
        "carrier": { "vcpu": 8, "ram_mb": 24576, "disk_gb": 100 }
      }
    },
    {
      "id": "bss_client",
      "name": "BSS Customer Portal (Hardened DMZ)",
      "short_name": "BSS Portal",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_5_bss_tier",
      "hostname_prefix": "bss-client",
      "min_nodes": 0,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["nginx", "nftables", "softswitch-bss-client"],
      "update_packages": ["softswitch-bss-client", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["80/tcp", "443/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_c_edge_dmz",
      "requirements": {
        "hard_min": { "vcpu": 1, "ram_mb": 1024, "disk_gb": 15 },
        "lab": { "vcpu": 1, "ram_mb": 2048, "disk_gb": 20 },
        "production": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "carrier": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 40 }
      }
    },
    {
      "id": "pbx_portal_edge",
      "name": "Ring2All Connect — User Portal (Dedicated Edge)",
      "short_name": "Connect Edge",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_3c_pbx_connect",
      "hostname_prefix": "portal-web",
      "min_nodes": 0,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["nginx", "nftables", "softswitch-pbx-portal"],
      "update_packages": ["softswitch-pbx-portal", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["80/tcp", "443/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_c_edge_dmz",
      "requirements": {
        "hard_min": { "vcpu": 1, "ram_mb": 1024, "disk_gb": 15 },
        "lab": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "production": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "carrier": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 40 }
      }
    },
    {
      "id": "pbx_switchboard_edge",
      "name": "Operator Switchboard (Dedicated Edge)",
      "short_name": "Switchboard Edge",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_3d_pbx_switchboard",
      "hostname_prefix": "switchboard-web",
      "min_nodes": 0,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["nginx", "nftables", "softswitch-pbx-switchboard"],
      "update_packages": ["softswitch-pbx-switchboard", "nginx", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["80/tcp", "443/tcp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "profile_c_edge_dmz",
      "requirements": {
        "hard_min": { "vcpu": 1, "ram_mb": 1024, "disk_gb": 15 },
        "lab": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "production": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "carrier": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 40 }
      }
    },
    {
      "id": "dms_hub",
      "name": "Ring2All DMS Auto-Provisioning Hub",
      "short_name": "DMS Hub",
      "tier": "addon",
      "phase": 2,
      "enabled": false,
      "stage": "stage_7_addons",
      "hostname_prefix": "dms-admin",
      "min_nodes": 0,
      "recommended_nodes": 1,
      "odd_quorum": false,
      "scalable_day2": false,
      "packages": ["haproxy", "nginx", "softswitch-dms-api", "softswitch-dms-web"],
      "ports": ["80/tcp", "443/tcp", "69/udp", "22/tcp"],
      "firewall_profile": "profile_a_management",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 20 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 80 },
        "carrier": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 200 }
      }
    },
    {
      "id": "ncx_ccaas",
      "name": "Ring2All NCX Contact Center (CCaaS)",
      "short_name": "NCX CCaaS",
      "tier": "addon",
      "phase": 2,
      "enabled": false,
      "stage": "stage_7_addons",
      "hostname_prefix": "ncx-node",
      "min_nodes": 0,
      "recommended_nodes": 1,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["haproxy", "nginx", "softswitch-ncx-all"],
      "ports": ["80/tcp", "443/tcp", "3008/tcp (internal)", "22/tcp"],
      "firewall_profile": "profile_a_management",
      "requirements": {
        "hard_min": { "vcpu": 4, "ram_mb": 4096, "disk_gb": 30 },
        "lab": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 40 },
        "production": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 100 },
        "carrier": { "vcpu": 16, "ram_mb": 32768, "disk_gb": 200 }
      }
    },
    {
      "id": "video_sfu",
      "name": "Video SFU Server Pool (Independent Active-Active)",
      "short_name": "Video SFU",
      "tier": "core",
      "phase": 1,
      "enabled": true,
      "stage": "stage_4c_video_sfu",
      "hostname_prefix": "video-sfu",
      "min_nodes": 0,
      "recommended_nodes": 2,
      "odd_quorum": false,
      "scalable_day2": true,
      "packages": ["softswitch-video-all", "redis-server", "nftables"],
      "update_packages": ["softswitch-video-sfu", "softswitch-video-sip", "softswitch-video-egress", "redis-server", "snmpd"],
      "rolling_upgrade_strategy": "one_by_one",
      "ports": ["443/tcp", "7880/tcp", "7881/tcp", "5070/udp+tcp (Telephony only)", "50000-60000/udp", "161/udp (NMS)", "9443/tcp (NMS)", "22/tcp"],
      "firewall_profile": "video_media_edge",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 30 },
        "lab": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 40 },
        "production": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 100 },
        "carrier": { "vcpu": 16, "ram_mb": 32768, "disk_gb": 200 }
      }
    },
    {
      "id": "crm_hub",
      "name": "Ring2All CRM & AI Helpdesk",
      "short_name": "CRM Hub",
      "tier": "addon",
      "phase": 2,
      "enabled": false,
      "stage": "stage_7_addons",
      "hostname_prefix": "crm-node",
      "min_nodes": 0,
      "recommended_nodes": 1,
      "odd_quorum": false,
      "scalable_day2": false,
      "packages": ["haproxy", "nginx", "softswitch-crm-all"],
      "ports": ["80/tcp", "443/tcp", "22/tcp"],
      "firewall_profile": "profile_a_management",
      "requirements": {
        "hard_min": { "vcpu": 2, "ram_mb": 2048, "disk_gb": 25 },
        "lab": { "vcpu": 2, "ram_mb": 4096, "disk_gb": 40 },
        "production": { "vcpu": 4, "ram_mb": 8192, "disk_gb": 100 },
        "carrier": { "vcpu": 8, "ram_mb": 16384, "disk_gb": 200 }
      }
    }
  ],
  "stages": [
    {
      "id": "stage_0_preflight",
      "order": 0,
      "name": "Pre-flight, SSH Key, SNMPv3 & Node Control Agent",
      "description": "Validates Debian 13 + sizing, pins NMS ED25519 SSH key, sets UTC + /etc/hosts mesh, installs random-credential SNMPv3, and starts native r2a-node-agent HTTPS :9443.",
      "depends_on": [],
      "target_roles": ["pg_ha", "storage_gluster", "pbx_admin", "pbx_portal_edge", "pbx_switchboard_edge", "pbx_telephony", "sbc_edge", "sbc_media", "video_sfu", "bss_admin", "bss_client"],
      "scripts": ["00-preflight.sh", "01-base-node.sh", "02-nms-agent-snmp.sh"],
      "timeout_sec": 360
    },
    {
      "id": "stage_1_postgres_ha",
      "order": 1,
      "name": "PostgreSQL 17 HA Cluster (Patroni + Etcd)",
      "description": "Installs PostgreSQL 17 + pgvector, forms 3-node Etcd Raft quorum, bootstraps Patroni leader then replicas, runs --all-db, and harvests isolated DB credentials.",
      "depends_on": ["stage_0_preflight"],
      "target_roles": ["pg_ha"],
      "scripts": ["10-pg-ha-node.sh", "11-pg-bootstrap-leader.sh", "12-pg-join-replica.sh", "13-pg-init-databases.sh"],
      "timeout_sec": 1200
    },
    {
      "id": "stage_2_storage_gluster",
      "order": 2,
      "name": "GlusterFS Replica 3 Shared Storage",
      "description": "Installs glusterfs-server on 3 storage nodes, executes bidirectional peer probe, and creates ss-recordings, ss-uploads, and ss-music replica 3 volumes.",
      "depends_on": ["stage_0_preflight"],
      "target_roles": ["storage_gluster"],
      "scripts": ["20-gluster-node.sh", "21-gluster-cluster-init.sh"],
      "timeout_sec": 600
    },
    {
      "id": "stage_3a_pbx_admin",
      "order": 3,
      "name": "PBX Control Plane Pool (pbx-admin-01..N)",
      "description": "Configures local HAProxy :5000/:5001, mounts shared cluster storage (ss-uploads, ss-recordings & ss-music with GID 2000 symlinks for MOH, prompts & recordings), injects identical shared cluster JWT/Encryption keys, deploys pbx-api/monitoring-api/admin, and enforces Profile A firewall across 1..N stateless nodes.",
      "depends_on": ["stage_1_postgres_ha", "stage_2_storage_gluster"],
      "target_roles": ["pbx_admin"],
      "scripts": ["30-client-haproxy.sh", "31-pbx-admin.sh"],
      "timeout_sec": 900
    },
    {
      "id": "stage_3c_pbx_connect",
      "order": 3.5,
      "optional": true,
      "name": "Ring2All Connect Edge Pool (Dedicated Servers)",
      "description": "Optional stateless DMZ pool (1..N) serving Ring2All Connect (/connect/) over HTTPS with automatic Nginx upstream load-balancing & failover across all PBX Control Plane nodes.",
      "depends_on": ["stage_3a_pbx_admin"],
      "target_roles": ["pbx_portal_edge"],
      "scripts": ["34-pbx-portal-edge.sh"],
      "timeout_sec": 600
    },
    {
      "id": "stage_3d_pbx_switchboard",
      "order": 3.6,
      "optional": true,
      "name": "Operator Switchboard Edge Pool (Dedicated Servers)",
      "description": "Optional stateless CTI pool (1..N) serving Operator Switchboard (/switchboard/) over HTTPS with automatic Nginx upstream failover for PBX API (:3001) & Monitoring WebSocket (:3500).",
      "depends_on": ["stage_3a_pbx_admin"],
      "target_roles": ["pbx_switchboard_edge"],
      "scripts": ["35-pbx-switchboard-edge.sh"],
      "timeout_sec": 600
    },
    {
      "id": "stage_3b_pbx_telephony",
      "order": 4,
      "name": "Telephony Server Pool (Independent Voice Nodes)",
      "description": "Configures local HAProxy, mounts shared storage (ss-recordings & ss-music with GID 2000 symlinks), deploys independent headless softswitch-pbx-telephony servers, applies Profile B firewall, and normalizes ESL routing.",
      "depends_on": ["stage_3a_pbx_admin", "stage_2_storage_gluster"],
      "target_roles": ["pbx_telephony"],
      "scripts": ["30-client-haproxy.sh", "32-pbx-telephony.sh", "33-pbx-normalize-esl.sh"],
      "timeout_sec": 1200
    },
    {
      "id": "stage_4_sbc_ha",
      "order": 5,
      "name": "Multi-Master SBC Cluster (DMQ Mesh + Media Relay)",
      "description": "Configures local HAProxy, deploys sbc-api/admin/telephony, enables DMQ :5090 mesh with split usrloc db_mode (1/0), hardens Zero-Trust firewall, and registers cluster nodes on HTTPS :443.",
      "depends_on": ["stage_1_postgres_ha", "stage_3b_pbx_telephony"],
      "target_roles": ["sbc_edge"],
      "scripts": ["30-client-haproxy.sh", "40-sbc-node.sh", "41-sbc-cluster-register.sh"],
      "timeout_sec": 1200
    },
    {
      "id": "stage_4b_sbc_media",
      "order": 5.5,
      "optional": true,
      "name": "Media Relay Server Pool (Optional Independent Offload)",
      "description": "Optional independent pool (1..N) of dedicated RTP/SRTP/WebRTC media relay servers balanced by Ring2All SBC via NG UDP :2223. When unused, SBC uses its local media relay automatically.",
      "depends_on": ["stage_4_sbc_ha"],
      "target_roles": ["sbc_media"],
      "scripts": ["42-sbc-media-node.sh", "43-sbc-media-sync.sh"],
      "timeout_sec": 600
    },
    {
      "id": "stage_4c_video_sfu",
      "order": 5.6,
      "optional": true,
      "name": "Video SFU Server Pool (Optional Independent Conferencing)",
      "description": "Optional independent pool (1..N) of Ring2All Video SFU servers (WebRTC, SIP Bridge, Egress) registered into Ring2All PBX for load-based room placement with zero inter-node mesh coupling.",
      "depends_on": ["stage_3a_pbx_admin"],
      "target_roles": ["video_sfu"],
      "scripts": ["45-video-sfu-node.sh", "46-video-sfu-sync.sh"],
      "timeout_sec": 900
    },
    {
      "id": "stage_5_bss_tier",
      "order": 6,
      "name": "Converged Carrier BSS Admin & Customer Portal",
      "description": "Deploys bss-admin (HAProxy + OCS engine + Admin UI) and bss-client (Customer Portal with hardened Nginx 403 perimeter).",
      "depends_on": ["stage_1_postgres_ha", "stage_3a_pbx_admin", "stage_4_sbc_ha"],
      "target_roles": ["bss_admin", "bss_client"],
      "scripts": ["30-client-haproxy.sh", "50-bss-admin.sh", "51-bss-client.sh"],
      "timeout_sec": 900
    },
    {
      "id": "stage_6_interconnect_verify",
      "order": 7,
      "name": "Zero-Touch Federation (RFPP v1) & Validation",
      "description": "Pairs PBX ↔ SBC ↔ BSS via RFPP v1, updates Telephony sbc_trust ACLs and SBC dispatchers/domains, runs end-to-end health verification, and onboards cluster into NMS Monitoring & Topology Flows.",
      "depends_on": ["stage_3b_pbx_telephony", "stage_4_sbc_ha", "stage_5_bss_tier"],
      "target_roles": ["pbx_admin", "sbc_edge", "bss_admin", "bss_client"],
      "scripts": ["60-cluster-pair.sh", "70-verify-cluster.sh"],
      "timeout_sec": 600
    }
  ]
}
