Enumerations
OPBX uses PHP 8.1+ backed enums for fixed value sets.
Auto Dialer Enums
CallerIdStrategy
Distribution strategy for Caller ID pools.
File: App\Enums\CallerIdStrategy
Table Column: auto_dialer_campaigns.caller_id_strategy
| Case | Value | Description |
|---|---|---|
ROUND_ROBIN | round_robin | Sequential cycling |
RANDOM | random | Random selection |
LEAST_RECENTLY_USED | least_recently_used | Select least recently used |
CampaignStatus
Campaign lifecycle states.
File: App\Enums\CampaignStatus
Table Column: auto_dialer_campaigns.status
| Case | Value | Description |
|---|---|---|
DRAFT | draft | Initial configuration |
ACTIVE | active | Currently dialing |
PAUSED | paused | Temporarily stopped |
COMPLETED | completed | All destinations processed |
ARCHIVED | archived | Soft-deleted |
DestinationStatus
Status of a destination (phone number) in a campaign.
File: App\Enums\DestinationStatus
Table Column: auto_dialer_destinations.status
| Case | Value | Description |
|---|---|---|
PENDING | pending | Waiting to be called |
DIALING | dialing | Currently being dialed |
CONNECTED | connected | Call connected |
COMPLETED | completed | Successfully completed |
FAILED | failed | Failed after all retries |
INVALID | invalid | Invalid number |
AmdMode
Answering Machine Detection modes.
File: App\Enums\AmdMode
Table Column: auto_dialer_campaigns.amd_mode
| Case | Value | Description |
|---|---|---|
ENABLED | Enabled | Detect human or machine |
DETECT_MESSAGE_END | DetectMessageEnd | Wait for greeting to end |
ListStatus
Distribution list states.
File: App\Enums\ListStatus
Table Column: auto_dialer_lists.status
| Case | Value | Description |
|---|---|---|
DRAFT | draft | Creating/uploading |
PENDING | pending | Awaiting processing |
PROCESSING | processing | CSV being processed |
READY | ready | Available for use |
FAILED | failed | Upload/processing failed |
IN_USE | in_use | Assigned to campaign |
USED | used | Campaign completed |
ARCHIVED | archived | No longer used |
Core PBX Enums
ExtensionType
Types of PBX extensions.
File: App\Enums\ExtensionType
Table Column: extensions.type
| Case | Value | Description |
|---|---|---|
USER | user | Human user extension |
CONFERENCE | conference | Conference room endpoint |
RING_GROUP | ring_group | Ring group endpoint |
IVR | ivr | IVR menu endpoint |
AI_ASSISTANT | ai_assistant | AI assistant endpoint |
AI_LOAD_BALANCER | ai_load_balancer | Load balancer endpoint |
FORWARD | forward | Call forwarding |
CUSTOM_LOGIC | custom_logic | Custom routing logic |
RoutingDestinationType
Destination types for call routing.
File: App\Enums\RoutingDestinationType
Table Column: auto_dialer_campaigns.routing_destination_type
| Case | Value | Description |
|---|---|---|
EXTENSION | extension | Route to extension |
RING_GROUP | ring_group | Route to ring group |
CONFERENCE_ROOM | conference_room | Route to conference room |
IVR_MENU | ivr_menu | Route to IVR menu |
AI_ASSISTANT | ai_assistant | Route to AI assistant |
AI_LOAD_BALANCER | ai_load_balancer | Route via load balancer |
HANGUP | hangup | Disconnect call |
RingGroupStrategy
Call distribution strategies.
File: App\Enums\RingGroupStrategy
Table Column: ring_groups.strategy
| Case | Value | Description |
|---|---|---|
SIMULTANEOUS | simultaneous | Ring all members at once |
ROUND_ROBIN | round_robin | Rotate through members |
SEQUENTIAL | sequential | Ring in order |
RingGroupStatus
Ring group states.
File: App\Enums\RingGroupStatus
Table Column: ring_groups.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Operational |
INACTIVE | inactive | Disabled |
RingGroupFallbackAction
Actions when a ring group fails.
File: App\Enums\RingGroupFallbackAction
Table Column: ring_groups.fallback_action
| Case | Value | Description |
|---|---|---|
EXTENSION | extension | Forward to extension |
RING_GROUP | ring_group | Forward to ring group |
IVR_MENU | ivr_menu | Forward to IVR menu |
AI_ASSISTANT | ai_assistant | Forward to AI assistant |
AI_LOAD_BALANCER | ai_load_balancer | Forward to AI load balancer |
HANGUP | hangup | End call |
AI Integration Enums
AiAssistantStatus
AI assistant states.
File: App\Enums\AiAssistantStatus
Table Column: ai_assistants.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Ready to receive calls |
INACTIVE | inactive | Disabled |
AlbsStrategy
Load balancer distribution strategies.
File: App\Enums\AlbsStrategy
Table Column: ai_assistant_load_balancers.strategy
| Case | Value | Description |
|---|---|---|
ROUND_ROBIN | round_robin | Rotate through assistants |
PRIORITY | priority | First active by priority |
PERCENTAGE | percentage | Weighted random |
AlbsStatus
Load balancer states.
File: App\Enums\AlbsStatus
Table Column: ai_assistant_load_balancers.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Operational |
INACTIVE | inactive | Disabled |
User & Organization Enums
UserRole
Role-based access control.
File: App\Enums\UserRole
Table Column: users.role
| Case | Value | Level | Description |
|---|---|---|---|
OWNER | owner | 1 | Full organization access |
PBX_ADMIN | pbx_admin | 2 | PBX configuration access |
PBX_USER | pbx_user | 3 | Basic PBX usage |
REPORTER | reporter | 4 | View-only access |
UserStatus
User account states.
File: App\Enums\UserStatus
Table Column: users.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Can log in |
INACTIVE | inactive | Suspended |
PENDING | pending | Invitation pending activation |
OrganizationStatus
Organization states.
File: App\Enums\OrganizationStatus
Table Column: organizations.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Normal operation |
SUSPENDED | suspended | Access restricted |
DELETED | deleted | Soft-deleted |
Call & Logging Enums
CallStatus
Call session states.
File: App\Enums\CallStatus
| Case | Value | Description |
|---|---|---|
INITIATED | initiated | Call created |
RINGING | ringing | Destination ringing |
ANSWERED | answered | Call connected |
COMPLETED | completed | Call ended normally |
BUSY | busy | Busy signal |
NO_ANSWER | no_answer | No answer |
FAILED | failed | Call failed |
Call Tracking Enums
CallTrackingCampaignStatus
Campaign states.
File: App\Enums\CallTrackingCampaignStatus
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Campaign is live |
INACTIVE | inactive | Campaign is paused |
CallTrackingDestinationType
Destination types for tracked calls.
File: App\Enums\CallTrackingDestinationType
| Case | Value | Description |
|---|---|---|
FORWARD | forward | Forward to external number |
EXTENSION | extension | Route to extension |
RING_GROUP | ring_group | Route to ring group |
BUSINESS_HOURS | business_hours | Route via business hours |
CONFERENCE_ROOM | conference_room | Route to conference room |
IVR_MENU | ivr_menu | Route to IVR menu |
AI_ASSISTANT | ai_assistant | Route to AI assistant |
AI_LOAD_BALANCER | ai_load_balancer | Route via AI load balancer |
CallTrackingEventType
Webhook event types.
File: App\Enums\CallTrackingEventType
| Case | Value | Description |
|---|---|---|
CALL_RECEIVED | call.received | Call received |
CALL_ANSWERED | call.answered | Call answered |
CALL_MISSED | call.missed | Call missed |
CALL_CONVERTED | call.converted | Call converted |
CALL_FAILED | call.failed | Call failed |
Business Hours Enums
BusinessHoursStatus
Schedule states.
File: App\Enums\BusinessHoursStatus
| Case | Value | Description |
|---|---|---|
ACTIVE | active | In use |
INACTIVE | inactive | Not in use |
BusinessHoursActionType
Actions for business hours routing.
File: App\Enums\BusinessHoursActionType
| Case | Value | Description |
|---|---|---|
EXTENSION | extension | Route to extension |
RING_GROUP | ring_group | Route to ring group |
CONFERENCE_ROOM | conference_room | Route to conference room |
IVR_MENU | ivr_menu | Route to IVR menu |
AI_ASSISTANT | ai_assistant | Route to AI assistant |
AI_LOAD_BALANCER | ai_load_balancer | Route to AI load balancer |
BusinessHoursExceptionType
Schedule exception types.
File: App\Enums\BusinessHoursExceptionType
| Case | Value | Description |
|---|---|---|
CLOSED | closed | Closed all day |
SPECIAL_HOURS | special_hours | Special operating hours |
DayOfWeek
Days for scheduling.
File: App\Enums\DayOfWeek
| Case | Value |
|---|---|
MONDAY | monday |
TUESDAY | tuesday |
WEDNESDAY | wednesday |
THURSDAY | thursday |
FRIDAY | friday |
SATURDAY | saturday |
SUNDAY | sunday |
Security Enums
InboundBlacklistMatchType
Pattern matching strategies.
File: App\Enums\InboundBlacklistMatchType
Table Column: inbound_blacklists.match_type
| Case | Value | Description |
|---|---|---|
EXACT | exact | Exact match |
PREFIX | prefix | Starts with pattern |
WILDCARD | wildcard | fnmatch pattern |
InboundBlacklistRejectionStrategy
How blocked calls are handled.
File: App\Enums\InboundBlacklistRejectionStrategy
Table Column: inbound_blacklists.rejection_strategy
| Case | Value | Description |
|---|---|---|
DROP | drop | Silent hangup |
REJECT | reject | Play rejection message |
TORMENT | torment | Conference hold music |
InboundBlacklistStatus
Blacklist entry states.
File: App\Enums\InboundBlacklistStatus
Table Column: inbound_blacklists.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Blocking calls |
INACTIVE | inactive | Not enforced |
WhitelistStatus
Whitelist entry states.
File: App\Enums\WhitelistStatus
Table Column: outbound_whitelists.status
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Rule active |
INACTIVE | inactive | Rule disabled |
IVR Enums
IvrMenuStatus
IVR menu states.
File: App\Enums\IvrMenuStatus
| Case | Value | Description |
|---|---|---|
ACTIVE | active | Operational |
INACTIVE | inactive | Disabled |
IvrDestinationType
IVR option routing types.
File: App\Enums\IvrDestinationType
Table Column: ivr_menu_options.destination_type
| Case | Value | Description |
|---|---|---|
EXTENSION | extension | Route to extension |
RING_GROUP | ring_group | Route to ring group |
CONFERENCE_ROOM | conference_room | Route to conference room |
IVR_MENU | ivr_menu | Sub-menu |
BUSINESS_HOURS | business_hours | Business hours schedule |
AI_ASSISTANT | ai_assistant | Route to AI assistant |
AI_LOAD_BALANCER | ai_load_balancer | Route to AI load balancer |
HANGUP | hangup | End call |
Using Enums
use App\Enums\CampaignStatus;
// From value
$status = CampaignStatus::from('active');
// Safely
$status = CampaignStatus::tryFrom($value);
// All cases
$all = CampaignStatus::cases();
// Value and label
$value = $status->value;
$label = $status->label();
// Validation
Rule::enum(CampaignStatus::class)