Time Conditions Module Documentation
Table of Contents
Section titled βTable of Contentsβ- Navigation & Access
- Screenshots & Visual Interface
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Status Modes
- Common Scenarios & Examples
- Model Context Protocol (MCP) AI Integration
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
Navigation & Access
Section titled βNavigation & AccessβTo access the Time Conditions module:
- Log in to the Ring2All Web Portal.
- In the left navigation sidebar, expand PBX Engine.
- Under Incoming Call Tools, click Time Conditions (
/pbx/incoming-tools/time-conditions).
Screenshots & Visual Interface
Section titled βScreenshots & Visual InterfaceβTime Conditions Overview
Section titled βTime Conditions OverviewβDisplays all time condition policies, associated time groups, current active status, toggle feature codes, and action controls.

Time Condition Configuration Form
Section titled βTime Condition Configuration FormβConfigures condition name, time group association, match destination (e.g. IVR), no-match destination (e.g. voicemail/extension), and BLF toggle override code.

1. Module Overview (Technical)
Section titled β1. Module Overview (Technical)βWhat Are Time Conditions?
Section titled βWhat Are Time Conditions?βTime Conditions are routing rules that evaluate whether the current time matches a Time Groupβs schedule. Based on the result, calls are routed to either a βmatchβ destination or a βno-matchβ destination.
Architecture
Section titled βArchitectureβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Time Condition Flow ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ββ Inbound Route β Time Condition: "Business Hours Check" ββ β ββ βΌ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β time_condition.lua β ββ β β ββ β 1. Load condition from time_conditions β ββ β 2. Check status (default, forced-match, forced-nomatch) β ββ β 3. If default: evaluate Time Group schedules β ββ β 4. If forced: use override status β ββ β β ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β ββ βββ MATCH βββββββββββββββββββββββββββββββββββββββββββββββΊ ββ β Route to: Main IVR ββ β ββ βββ NO MATCH ββββββββββββββββββββββββββββββββββββββββββββΊ ββ Route to: After-Hours Voicemail ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββRelationship with Time Groups
Section titled βRelationship with Time Groupsββββββββββββββββββββββββ ββββββββββββββββββββββββ Time Group β β Time Condition ββ "Business Hours" βββββββ "Main Line Hours" ββ β β ββ Mon-Fri 9:00-17:00 β β Match β Main IVR ββ Sat 10:00-14:00 β β No Match β VM ββββββββββββββββββββββββ β Toggle: *81 β βββββββββββββββββββββββπ― User Roles & Key Capabilities
Section titled βπ― User Roles & Key Capabilitiesβ| User Role | Key Capabilities & Permissions |
|---|---|
| PBX Super Admin | Audit time evaluation logic in FreeSWITCH dialplan (time_condition.lua), monitor override states across tenants, and inspect SIP BLF status synchronization. |
| Domain Administrator | Create time conditions, bind conditions to Time Groups, define Match and No-Match destinations, and assign manual override feature star codes (e.g. *81). |
| Front Desk / Office Supervisor | Dial the override feature code (*81) or toggle the BLF key on desk phones to manually force Open or Closed mode during bad weather or unexpected emergencies. |
| External Caller / Customer | Receive immediate, seamless routing to live staff during business hours or to night-service auto-attendants/voicemail outside business hours. |
2. Module Overview (Commercial/Business)
Section titled β2. Module Overview (Commercial/Business)βBusiness Value
Section titled βBusiness ValueβTime Conditions enable smart time-based routing:
| Without Time Conditions | With Time Conditions |
|---|---|
| Manual route switching | Automatic time routing |
| 24/7 same experience | Business/after-hours |
| Staff always needed | Self-service after hours |
| No holiday handling | Automatic holiday routing |
Use Cases
Section titled βUse Casesβ-
Business/After-Hours
- Business hours β Main menu
- After hours β Voicemail
-
Holiday Routing
- Holiday β Closed message
- Normal days β Standard routing
-
Lunch Break
- Lunch hour β Reduced staffing queue
- Normal hours β All agents
-
Weekend Support
- Weekdays β Full support
- Weekends β On-call only
Feature Highlights
Section titled βFeature Highlightsβ| Feature | Benefit |
|---|---|
| Time Group Reference | Reusable schedules |
| Match/No-Match Routing | Dual destination |
| Toggle Override | Manual control (*code) |
| BLF Integration | Visual status on phones |
| Auth PIN | Protected toggle |
| Multiple Destination Types | Extension, IVR, Queue, etc. |
3. Module Overview (End User/Administrator)
Section titled β3. Module Overview (End User/Administrator)βWhat Can You Do?
Section titled βWhat Can You Do?β- Create time conditions
- Link to Time Groups
- Set match destination (during scheduled time)
- Set no-match destination (outside scheduled time)
- Configure toggle feature code
- Set override status
- Enable BLF indication
Administrator Workflow
Section titled βAdministrator Workflowβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Creating a Time Condition ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ββ Section: General Information ββ ββ Condition Name: "Business Hours Check" ββ ββ Description: "Routes based on business hours" ββ ββ Time Group: Business Hours ββ ββ Context: tc_business_hours (auto-generated) ββ ββ Enabled: β ββ ββ Section: Routing Configuration ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β On Match Destination (During Schedule): β ββ β ββ Type: IVR β ββ β ββ Value: Main Menu β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β On No Match Destination (Outside Schedule): β ββ β ββ Type: Voicemail β ββ β ββ Value: General Mailbox β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ ββ Section: Override Settings ββ ββ Toggle Code: *81 ββ ββ Auth PIN: 1234 (optional) ββ ββ Status: Default (Auto) ββ ββ BLF Inverted: Off ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββQuick Tips
Section titled βQuick Tipsβ[!TIP] Use Descriptive Names: βBusiness Hours Checkβ is clearer than βTC1β.
[!TIP] Toggle Code Convention: Use *81, *82, etc. for easy reference.
[!CAUTION] Always Set Both Destinations: Ensure match AND no-match are configured.
4. Configuration Fields Reference
Section titled β4. Configuration Fields ReferenceβGeneral Fields
Section titled βGeneral Fieldsβ| Field | Description | Example |
|---|---|---|
| Condition Name | Unique identifier | Business Hours Check |
| Description | Optional notes | Routes during work hours |
| Time Group | Schedule to evaluate | Business Hours |
| Context | Dialplan context | tc_business_hours |
Routing Fields
Section titled βRouting Fieldsβ| Field | Description |
|---|---|
| On Match Module | Destination type when matched |
| On Match Value | Specific destination |
| On No Match Module | Destination type when not matched |
| On No Match Value | Specific destination |
Destination Types
Section titled βDestination Typesβ| Type | Description |
|---|---|
| Extension | Route to extension |
| IVR | Route to IVR menu |
| Ring Group | Route to ring group |
| Queue | Route to call queue |
| Voicemail | Route to voicemail |
| Hangup | Terminate call |
Override Fields
Section titled βOverride Fieldsβ| Field | Description | Default |
|---|---|---|
| Toggle Code | Feature code to toggle | None |
| Auth PIN | PIN for toggle protection | None |
| Status | Current override status | Default |
| BLF Inverted | Invert BLF indication | Off |
5. Status Modes
Section titled β5. Status ModesβStatus Options
Section titled βStatus Optionsβ| Status | Behavior |
|---|---|
| Default (Auto) | Evaluate Time Group schedules |
| Forced Match | Always route to match destination |
| Forced No Match | Always route to no-match destination |
Toggle Flow
Section titled βToggle FlowβStatus: Default (Auto) ββ[Dial *81]βββΊ Forced Match β [Dial *81] β βΌ Forced No Match β [Dial *81] β βΌ Default (Auto)BLF Integration
Section titled βBLF Integrationβ| Status | BLF State | BLF Inverted |
|---|---|---|
| Default | Off | On |
| Forced Match | On | Off |
| Forced No Match | On | Off |
6. Common Scenarios & Examples
Section titled β6. Common Scenarios & ExamplesβScenario 1: Business Hours Routing
Section titled βScenario 1: Business Hours RoutingβTime Condition: βMain Line Hoursβ
| Field | Value |
|---|---|
| Time Group | Business Hours (Mon-Fri 9-5) |
| Match Destination | Main IVR |
| No-Match Destination | After-Hours Voicemail |
| Toggle Code | *81 |
Result:
- 9am-5pm weekdays β Main IVR
- After hours β After-Hours Voicemail
- User dials *81 β Override toggle
Scenario 2: Holiday Closure
Section titled βScenario 2: Holiday ClosureβTime Condition: βHoliday Checkβ
| Field | Value |
|---|---|
| Time Group | Holidays 2026 |
| Match Destination | Holiday Announcement |
| No-Match Destination | (continue to next TC) |
Scenario 3: Emergency Override
Section titled βScenario 3: Emergency OverrideβTime Condition: βEmergency Openβ
| Field | Value |
|---|---|
| Time Group | Always Closed |
| Match Destination | Hangup |
| No-Match Destination | Emergency Queue |
| Toggle Code | *99 |
| Auth PIN | 5678 |
Use case: Toggle *99 to force-open during emergencies.
7. Model Context Protocol (MCP) AI Integration
Section titled β7. Model Context Protocol (MCP) AI IntegrationβRing2All exposes native Model Context Protocol (MCP) tools for Time Conditions, allowing AI agents and PBX AI Assistants to inspect active business schedule routing, query override states (default vs forced open/closed), adjust day/night branch destinations, and provision or toggle time condition rules programmatically with domain-level isolation and numbering collision protection.
Available MCP Tools
Section titled βAvailable MCP Toolsβ| Tool Name | Description | Key Parameters |
|---|---|---|
list_time_conditions |
Lists all Time Conditions in the domain, displaying linked Time Group, match/no-match destinations, toggle code, and current override status (default, forced-match, forced-nomatch). |
search (optional string) |
get_time_condition_status |
Retrieves full configuration and current live schedule routing decision (open vs closed destination targets) of a specific Time Condition. | name (required string) |
create_time_condition |
Provisions a new Time Condition linking an existing Time Group to match and no-match destinations. Strictly validates name uniqueness and enforces cross-module numbering anti-collision on toggleCode. |
name, timeGroupName, destinationMatchModule, destinationMatchValue, destinationNomatchModule, destinationNomatchValue, toggleCode, description |
update_time_condition |
Updates routing destinations, linked Time Group schedule, BLF toggle code, or manual status override. | name, newName, timeGroupName, destinationMatchModule, destinationMatchValue, destinationNomatchModule, destinationNomatchValue, toggleCode, status, enabled |
diagnose_time_condition |
Performs deep operational diagnostic on a Time Condition: evaluates server time, timezone offset, and Time Group schedule intervals, inspects manual override states (forced open vs forced closed), verifies match and non-match destination targets exist, and analyzes recent incoming schedule routing decisions. | name (required string) |
delete_time_condition |
Safely removes a Time Condition after verifying via assertCanDeleteTimeCondition that no active Inbound Routes or IVR options route to it. |
name (required string) |
Protection Guards & Anti-Collision Integrity
Section titled βProtection Guards & Anti-Collision Integrityβ- Toggle Code Numbering Anti-Collision: When assigning an optional feature toggle code (e.g.
*271), Ring2All executesvalidateNumberUniquenessacross the entire tenant domain. Toggle codes cannot collide with existing SIP extensions, ring groups, call queues, conferences, or call flows. - Dependency Guard (
assertCanDeleteTimeCondition): A Time Condition cannot be deleted if any inbound DID route points to it as primary destination or failover. - Atomic Telephony Server Synchronization: Schedule updates immediately invalidate dialplan XML cache (
reloadxml), ensuring instant activation on subsequent call arrivals.
AI Agent Operational Examples
Section titled βAI Agent Operational ExamplesβAuditing Time Condition Status & Overrides
Section titled βAuditing Time Condition Status & Overridesβ{ "tool": "get_time_condition_status", "arguments": { "name": "Main Office Business Hours" }}Diagnosing Schedule Matching & Destination Readiness
Section titled βDiagnosing Schedule Matching & Destination Readinessβ{ "tool": "diagnose_time_condition", "arguments": { "name": "Main Office Business Hours" }}Provisioning an After-Hours Routing Condition
Section titled βProvisioning an After-Hours Routing Conditionβ{ "tool": "create_time_condition", "arguments": { "name": "Emergency Night Routing", "timeGroupName": "Standard Business Hours", "destinationMatchModule": "ring-group", "destinationMatchValue": "600", "destinationNomatchModule": "voicemail", "destinationNomatchValue": "1001", "toggleCode": "*272" }}Recommended Natural Language Prompts
Section titled βRecommended Natural Language Promptsβ- βWhat is the current status and destination of the βMain Office Business Hoursβ Time Condition?β
- βForce open the office phone lines by setting status to βforced-matchβ on βBusiness Hours Checkβ.β
- *βCheck if feature code β271β is available to use as a toggle code or if it collides with another number.β
- βUpdate the no-match destination of βSupport Hoursβ to transfer callers to Queue 800.β
8. Limitations & Important Notes
Section titled β8. Limitations & Important NotesβTechnical Notes
Section titled βTechnical Notesβ[!NOTE] Timezone: Evaluation uses server timezone.
[!WARNING] Context Conflict: Ensure context names are unique.
[!WARNING] Missing Time Group: Condition fails if group is deleted.
Best Practices
Section titled βBest Practicesβ- Name Clearly: Use descriptive condition names
- Set Both Destinations: Always configure match AND no-match
- Use Toggle Codes: Enable quick override access
- Protect with PIN: Secure important toggles
- Test Thoroughly: Verify routing at different times
- Document Overrides: Track who has toggle access
9. Troubleshooting Tips
Section titled β9. Troubleshooting TipsβCommon Issues
Section titled βCommon Issuesβ| Symptom | Possible Cause | Solution |
|---|---|---|
| Always same route | Forced status active | Check status setting |
| Time not matching | Wrong time group | Verify time group schedules |
| Toggle not working | Wrong toggle code | Check toggle code format |
| PIN rejected | Wrong PIN | Verify auth PIN |
| Condition not found | Context mismatch | Check context registration |
Telephony Server Logs
Section titled βTelephony Server Logsβ# Check time condition evaluationgrep "Time Condition" /var/log/softswitch/telephony.loggrep "time_condition.lua" /var/log/softswitch/telephony.log10. Glossary
Section titled β10. Glossaryβ| Term | Definition |
|---|---|
| Time Condition | Routing rule evaluating time groups |
| Match | Current time within schedule |
| No-Match | Current time outside schedule |
| Toggle Code | Feature code to override status |
| Forced Status | Manual override (match/no-match) |
| BLF | Busy Lamp Field - phone status light |
| Context | Dialplan identifier |
Documentation last updated: January 2026

