Skip to main content

RingGroupFallbackAction Enum

The RingGroupFallbackAction enum defines what happens when no members of a ring group answer a call.

Definition

namespace App\Enums;

enum RingGroupFallbackAction: string
{
case EXTENSION = 'extension';
case RING_GROUP = 'ring_group';
case IVR_MENU = 'ivr_menu';
case AI_ASSISTANT = 'ai_assistant';
case AI_LOAD_BALANCER = 'ai_load_balancer';
case HANGUP = 'hangup';
}

Values

ValueLabelDescription
extensionForward to ExtensionForward call to a specific extension
ring_groupForward to Ring GroupForward call to another ring group
ivr_menuForward to IVR MenuForward call to an IVR menu
ai_assistantForward to AI AssistantForward call to an AI assistant
ai_load_balancerForward to AI Load BalancerForward call to an AI load balancer
hangupHangupEnd the call

Methods

label(): string

Get human-readable label.

RingGroupFallbackAction::IVR_MENU->label(); // "Forward to IVR Menu"
RingGroupFallbackAction::HANGUP->label(); // "Hangup"

description(): string

Get detailed description.

RingGroupFallbackAction::EXTENSION->description();
// "Forward call to a specific extension"

Usage Example

use App\Enums\RingGroupFallbackAction;
use App\Models\RingGroup;

// Ring group with voicemail fallback
$ringGroup = RingGroup::create([
'name' => 'Sales Team',
'strategy' => RingGroupStrategy::SIMULTANEOUS,
'fallback_action' => RingGroupFallbackAction::EXTENSION,
'fallback_extension_id' => $voicemailExtId,
]);

// Ring group with IVR fallback
$ringGroup = RingGroup::create([
'name' => 'Support Team',
'fallback_action' => RingGroupFallbackAction::IVR_MENU,
'fallback_ivr_menu_id' => $ivrMenuId,
]);

Database Storage

Stored as VARCHAR(50) in the database:

fallback_action VARCHAR(50) NOT NULL DEFAULT 'hangup'

Used By