Skip to content

Dial Rule Restrictions Module Documentation

12 min readUpdated: Sep 26, 2026
View as Markdown
  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Fields Reference
  5. Pattern Matching
  6. Common Scenarios & Examples
  7. Model Context Protocol (MCP) AI Integration
  8. Limitations & Important Notes
  9. Troubleshooting Tips
  10. Glossary

Dial Rule Restrictions provide pattern-based call control for both outbound and internal calls. Administrators can create restriction profiles with rules that allow or block calls based on dial patterns, optionally requiring passwords, limiting duration, or playing announcements.

┌─────────────────────────────────────────────────────────────────┐
│ Dial Rule Restrictions System │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Call initiated (outbound or internal) │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Load Class of Service Restriction │ │
│ │ (CoS has dial_rule_restriction_id assigned) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Evaluate Rules (by priority) │ │
│ │ │ │
│ │ Rule 1: Pattern 011* | Allowed: NO │ │
│ │ └─ Match international → BLOCK │ │
│ │ │ │
│ │ Rule 2: Pattern 1900* | Allowed: NO + Announcement │ │
│ │ └─ Match premium → BLOCK + Play message │ │
│ │ │ │
│ │ Rule 3: Pattern 1* | Allowed: YES | Max: 1800 sec │ │
│ │ └─ Match long distance → ALLOW with 30 min limit │ │
│ │ │ │
│ │ Rule 4: Pattern _X. | Allowed: YES │ │
│ │ └─ Fallback → ALLOW all others │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ Apply result: ALLOW (with limits) or BLOCK (with message) │
│ │
└─────────────────────────────────────────────────────────────────┘

Dial Rule Restrictions enable granular call control:

Without Dial Rule Restrictions With Dial Rule Restrictions
All-or-nothing CoS permissions Pattern-specific control
No call duration limits Enforce time limits
Silent blocking Play announcements
No password protection Require password for patterns
  1. Block Premium/900 Numbers

    • Block 1-900-* patterns
    • Play “This number is restricted” message
  2. International Call Control

    • Block all international (011*)
    • Allow specific countries with password
  3. Call Duration Limits

    • Allow long distance up to 30 minutes
    • Play warning before timeout
  4. Internal Extension Control

    • Block certain internal ranges
    • Restrict after-hours internal calls
Feature Benefit
Pattern Matching Telephony Server wildcards
Allow/Block Permit or deny per pattern
Announcements Custom audio for blocked calls
Duration Limits Max call time per pattern
Password Requirement PIN to bypass restriction
Priority Ordering Control rule evaluation
Direction Type Separate outbound vs internal

3. Module Overview (End User/Administrator)

Section titled “3. Module Overview (End User/Administrator)”
  • Create restriction profiles with multiple rules
  • Allow or block specific dial patterns
  • Set maximum call durations
  • Require passwords for certain patterns
  • Play custom announcements
  • Assign profiles to Class of Service
  1. Navigate to PBX Engine → Class of Services → Dial Restriction Rules in the main navigation menu.
  2. The list view displays all configured dial restriction profiles with Name, Description, and active status.
  3. Click the + Add button in the top toolbar to create a new dial restriction profile.
  4. Click any profile row or the edit action to manage profile metadata and define ordered dial pattern rules.

Dial Restriction Rules List View

┌─────────────────────────────────────────────────────────────────┐
│ Creating a Dial Rule Restriction │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Step 1: Profile Information │
│ ├─ Name: "Standard Restrictions" │
│ ├─ Description: "Block premium, limit long distance" │
│ └─ Enabled: ✓ │
│ │
│ Step 2: Add Rules │
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Rule 1 (Priority 1) - Block Premium │ │
│ │ ├─ Type: Outbound │ │
│ │ ├─ Pattern: ^(1900)[0-9]+ │ │
│ │ ├─ Allowed: ✗ (Denied) │ │
│ │ └─ Announcement: premium_blocked.wav │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Rule 2 (Priority 2) - Block International │ │
│ │ ├─ Type: Outbound │ │
│ │ ├─ Pattern: ^(011)[0-9]+ │ │
│ │ ├─ Allowed: ✗ (Denied) │ │
│ │ └─ Announcement: international_blocked.wav │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Rule 3 (Priority 3) - Limit Long Distance │ │
│ │ ├─ Type: Outbound │ │
│ │ ├─ Pattern: ^(1)[0-9]{10} │ │
│ │ ├─ Allowed: ✓ (Permitted) │ │
│ │ ├─ Max Duration: 1800 seconds (30 min) │ │
│ │ └─ Play Max Duration: ✓ │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ Step 3: Save and Assign to Class of Service │
│ │
└─────────────────────────────────────────────────────────────────┘

[!TIP] Priority Order: Rules are evaluated top-to-bottom—place specific denial patterns before broad wildcards. Use drag-and-drop handles to reorder rules easily.

[!TIP] Announcements: Pair blocked patterns with custom audio recordings so callers understand why their call was rejected.

[!CAUTION] Pattern Overlap: A permissive catch-all rule evaluated before a restriction rule will allow unauthorized calls through. Keep catch-alls at the bottom.


Dial Restriction Rule Configuration Form

Field Description User-Friendly Tooltip Example Notes
Name * Unique identifier for the restriction profile A descriptive name for the dial rule restriction International & Premium Barring Required. Unique per domain.
Description Contextual notes and operational scope Detailed description of what this profile restricts Block 011 international and 1900 premium rate numbers Optional.
Enabled * Operational status of the profile Whether this dial rule restriction profile is currently active Toggle (On/Off) Required. If disabled, calls bypass these rules.
Field Description Type / Control Example Notes
Move Drag-and-drop reordering handle Grip handle Vertical drag Rules are evaluated sequentially from top to bottom.
Type Direction or match type category Dropdown Outbound, Internal Specifies whether the pattern applies to external or internal destinations.
Pattern * Regular expression or dial string match Text input ^(011|1900)[0-9]+ Evaluated against dialed destination string.
Allowed Call action upon match Toggle / Select Permit / Deny When set to Denied, the call is blocked immediately.
Announcement Audio file played to caller when matched/blocked Audio select restricted_call.wav Optional prompt informing caller of restriction.
Play Max Duration Play audio warning when duration approaches limit Toggle (On/Off) Enabled Announces time limit before auto-disconnect.
Max Duration Seconds Maximum allowed call duration in seconds Number input 1800 (30 min) Automatically disconnects call when threshold is reached.
Require Password Require authorization PIN to override restriction Toggle (On/Off) Disabled When enabled, prompts caller for an authorization code.
Actions Delete rule action Trash button Delete Removes individual rule row from table.

Pattern Matches Example
* Zero or more characters 1900* matches 1-900-xxx-xxxx
_X. Any digit, one or more Matches any number
_X Any single digit 0-9
_Z Digits 1-9 Not 0
_N Digits 2-9 Not 0 or 1
[list] Character set [0-9]
Purpose Pattern
International (011) 011*
Premium (1-900) 1900*
Toll-free (1-800) 1800*, 1888*, 1877*
Long distance (1+) 1*
Local (7/10 digit) _NXXXXXX, _NXXNXXXXXX
All calls _X.
Internal 3-digit _XXX
Internal 4-digit _XXXX

Scenario 1: Block Premium and International

Section titled “Scenario 1: Block Premium and International”

Profile: “Standard Employee”

Priority Pattern Allowed Description
1 1900* No Block premium
2 1976* No Block expensive
3 011* No Block international
4 _X. Yes Allow all else

Profile: “International with Override”

Priority Pattern Allowed Password Description
1 1900* No - Block premium always
2 011* Yes ✓ International with PIN
3 _X. Yes - Allow all else

Profile: “Time-Limited”

Priority Pattern Allowed Max Duration Description
1 1* Yes 1800 sec 30 min long distance
2 011* Yes 600 sec 10 min international
3 _X. Yes - Unlimited local

Profile: “Lobby Phone”

Priority Type Pattern Allowed Description
1 Internal 1* Yes Allow 1xx extensions
2 Internal _X. No Block other internal
3 Outbound 911 Yes Allow emergency
4 Outbound _X. No Block all external

7. Model Context Protocol (MCP) AI Integration

Section titled “7. Model Context Protocol (MCP) AI Integration”

Ring2All exposes dedicated Model Context Protocol (MCP) tools for Dial Rule Restrictions, allowing autonomous AI agents and Copilots to inspect outbound and internal pattern rules, verify call duration limits, and configure dialed digit filtering policies with domain-level isolation.

Tool Name Description Key Parameters
list_dial_restrictions Lists all Dial Rule Restriction profiles defined in the domain, including names, descriptions, and rule counts. search (optional string)
get_dial_restriction_status Retrieves full pattern matching rules, allowed/blocked actions, duration limits, and PIN requirements for a profile. name (required)
create_dial_restriction Provisions a new Dial Rule Restriction profile. name, description, enabled
update_dial_restriction Modifies an existing restriction profile name, description, or enabled status. name, newName, description, enabled
delete_dial_restriction Deletes a restriction profile after verifying it is not referenced by an active Class of Service (assertCanDeleteDialRestriction). name (required)
{
"tool": "get_dial_restriction_status",
"arguments": {
"name": "Block International"
}
}

Provisioning a Local Only Restriction Profile

Section titled “Provisioning a Local Only Restriction Profile”
{
"tool": "create_dial_restriction",
"arguments": {
"name": "Local Calls Only",
"description": "Restricts outbound calls to local prefixes and emergency numbers only",
"enabled": true
}
}
  • “Show me which numbers or patterns are blocked in the ‘Block International’ profile.”
  • “Create a dial restriction profile named ‘Lobby Restricted’ to prevent long-distance calls.”
  • “Check if any Class of Service is currently using the ‘Emergency Only’ restriction profile before deleting it.”

[!WARNING] First Match Wins: Only the first matching rule is applied.

[!WARNING] Profile Assignment: Restrictions must be assigned to Class of Service.

  1. Priority Order: Specific patterns first, wildcards last
  2. Fallback Rule: Always include catch-all at end
  3. Test Patterns: Verify pattern matching before production
  4. Document Rules: Use descriptions for clarity
  5. Announce Blocks: Play message instead of silent hangup

[!IMPORTANT] Rules are evaluated by priority (1 = first). The first matching rule determines the action.


Symptom Possible Cause Solution
Calls always blocked Wrong priority order Put allow rules before block wildcards
Calls not limited Duration not enabled Check Play Max Duration toggle
Wrong pattern matched Pattern overlap Adjust priorities
No announcement Audio file missing Verify file exists

List restrictions:

SELECT r.id, r.name, r.enabled,
(SELECT COUNT(*) FROM public.dial_rule_restriction_rules
WHERE dial_rule_restriction_id = r.id) as rule_count
FROM public.dial_rule_restrictions r
WHERE r.domain_id = [domain_id];

Check rules:

SELECT direction, pattern, allowed,
max_duration_seconds, require_password, priority
FROM public.dial_rule_restriction_rules
WHERE dial_rule_restriction_id = [restriction_id]
ORDER BY priority;

Term Definition
Dial Rule Restriction Profile containing pattern-based rules
Pattern Dial string match using Telephony Server wildcards
Priority Order in which rules are evaluated
Max Duration Time limit for calls matching pattern
Announcement Audio played when call is blocked
Password Requirement PIN needed to bypass restriction
Direction Outbound (external) or Internal

Documentation last updated: January 2026