Data Models Overview
This section provides comprehensive documentation of the data structures in OPBX.
Categories
Database Models
Complete reference of all Eloquent models including:
- Table structure and columns
- Relationships
- Scopes and mutators
- Business logic methods
Enumerations
All PHP enums used throughout the application:
- Status enums
- Type enums
- Strategy enums
- Mode enums
Configuration
Configuration files and environment variables:
- Application config
- Service configuration
- Environment variables
- Feature flags
Key Models by Module
Auto Dialer
- AutoDialerCampaign — Campaign configuration
- AutoDialerCampaignCallerId — Caller ID pool entries
- AutoDialerCallerIdStat — Per-Caller ID statistics
- AutoDialerList — Distribution lists
- AutoDialerDestination — List destinations
- AutoDialerListVersion — Previous versions of a list, and their numbers
Core PBX
- Extension — PBX extensions
- DidNumber — Phone numbers
- RingGroup — Ring group configuration
- IvrMenu — IVR menu structure
- BusinessHoursSchedule — Business hours
- CallQueue — Call queues (live state is in the ACD worker)
AI Integration
- AiAssistant — AI assistant configuration
- AiAssistantLoadBalancer — Load balancer setup
Users & Organizations
- User — User accounts
- Organization — Multi-tenant organizations
- CloudonixSettings — Cloudonix credentials per org
Call & Logging
- CallDetailRecord — CDR from Cloudonix, with the warm archive table
- SessionUpdate — Real-time session events
- CallNotificationsSettings — Webhook notification config
- CallNotificationLog — Notification delivery log
- EmailLog — Transactional email log
- PlatformAuditLog — Cross-tenant audit trail
- PlatformHealthCheck — Platform Status history
Security
- InboundBlacklist — Blocked caller patterns
- OutboundWhitelist — Outbound routing rules
- BlockedCallLog — Log of blocked calls
Recently Added
Call Record Tiers and Platform Status (2026-10)
| Change | Purpose |
|---|---|
archived_call_detail_records | Warm tier for call records 6-12 months old |
direction on call_detail_records | Call direction, copied from the session update |
platform_health_checks | Platform Status history |
unavailable destination type | Added to every routing destination enum column |
The unused VoiceAgent model was removed; AI assistants are AiAssistant.
Caller ID Pooling (v2026.04)
New models supporting multiple Caller IDs per campaign:
| Model | Purpose |
|---|---|
AutoDialerCampaignCallerId | Pivot table linking campaigns to DIDs |
AutoDialerCallerIdStat | Tracks call statistics per Caller ID |
See Campaign Manager for usage documentation.