Call Filtering
Block unwanted calls (spam, harassment, specific regions) or create exclusive whitelists allowing only specific numbers to call through your trunks. Protect your business from toll fraud and improve call quality by filtering unwanted traffic.
Understanding Number Blocking
Key Concepts:
- Blacklist: Block specific numbers or patterns from calling in
- Whitelist: Only allow specific numbers or patterns to call in
- Pattern Matching: Use wildcards and regex for flexible rules
- Precedence: Whitelist overrides blacklist when both match
Common Use Cases:
- Block known spam callers
- Restrict calls from specific area codes or countries
- Block premium-rate numbers
- Whitelist trusted clients only
- Prevent toll fraud from specific regions
- Block competitor reconnaissance calls
Blocked Numbers (Blacklist)
Block Specific Numbers or Patterns
Navigate to Blocked Numbers
Go to Settings > Trunks > [Select Trunk] > Advanced > Blocked Numbers > Click Add Rule
Configure Blocking Rule
Rule Details:
- Rule Name: Descriptive identifier (e.g., "Block-Spam-Caller", "Block-International")
- Number Pattern: Number or pattern to block
- Match Type: Exact, Starts With, Contains, Regex
- Action: Block call, Play message, Redirect
Number Pattern Examples:
Exact Match:
+15551234567 → Block this specific number
Starts With:
+44 → Block all UK numbers
+1900 → Block all 900 premium numbers
Contains:
*1234* → Block any number containing 1234
Wildcard:
+1555123____ → Block range +1555123-0000 to +1555123-9999Wildcards
Use _ for single digit wildcard, * for multiple digits, . for any character in regex mode.
Set Block Action
Available Actions:
Reject Call:
- Immediate rejection (fast busy)
- Caller hears rejection tone
- No PBX resources used
- Best for spam
Play Message:
- Custom rejection message
- "This number is blocked"
- Useful for explanation
- Then disconnect
Redirect to:
- Voicemail (caller leaves message)
- Recording ("Call customer service")
- External number (complaints line)
- IVR menu
Recommendation
Use "Reject Call" for spam and fraud. Use "Play Message" when you want to inform the caller why they're blocked.
Enable and Test
- Enable the rule
- Test from blocked number
- Verify call is blocked as expected
- Check logs to confirm rule is working
Rule Active
The blocking rule is now active. Calls matching this pattern will be blocked according to your configuration.
Advanced Pattern Matching Techniques
Wildcard Patterns:
Single Digit (_):
Pattern: +1555123___0
Matches: +15551230000 to +15551239990 (every 10th number)
Use Case: Block number range with patternMultiple Digits (*):
Pattern: +1*5551234567
Matches: +15551234567, +115551234567, +12225551234567
Use Case: Match regardless of prefix variationsArea Code Blocking:
Pattern: +1900*
Matches: All US 900 premium numbers
Pattern: +1976*
Matches: All US 976 pay-per-call numbersCountry Code Blocking:
Pattern: +44*
Matches: All UK numbers
Pattern: +86*
Matches: All China numbers
Pattern: +234*
Matches: All Nigeria numbers (high fraud risk)Regex Patterns (Advanced):
International Except North America:
Regex: ^(?!\+1)[+][0-9]+$
Matches: Any international number except +1 (US/Canada)
Use Case: Block all international except North AmericaPremium Rate Numbers:
Regex: ^(\+1900|\+1976|\+1809)
Matches: US premium and Caribbean high-cost numbers
Use Case: Prevent expensive toll fraudAnonymous/Private Callers:
Pattern: Anonymous
Or: Private
Or: Restricted
Matches: Calls with hidden caller ID
Use Case: Block callers hiding their identityTest Patterns
Always test pattern matching with sample numbers before enabling. Overly broad patterns can block legitimate calls.
Pre-Built Blocking Scenarios
Scenario 1: Block All International
Rule Name: Block-All-International
Pattern: ^(?!\+1)[+][0-9]+$
Match Type: Regex
Action: Reject Call
Use Case: Domestic-only businessScenario 2: Block Premium Numbers
Rule 1: Block-900-Numbers
Pattern: +1900*
Action: Play message "Premium numbers not allowed"
Rule 2: Block-976-Numbers
Pattern: +1976*
Action: Play message "Pay-per-call blocked"Scenario 3: Block High-Fraud Countries
Rule 1: Block-Nigeria
Pattern: +234*
Action: Reject
Rule 2: Block-Somalia
Pattern: +252*
Action: Reject
Rule 3: Block-Cuba
Pattern: +53*
Action: RejectScenario 4: Block Specific Spam Caller
Rule Name: Block-Spam-Caller-ID
Pattern: +15551234567
Match Type: Exact
Action: Reject
Notes: Reported spam caller, multiple complaintsScenario 5: Block Number Range
Rule Name: Block-Competitor-Numbers
Pattern: +1555123*
Action: Reject
Use Case: Block known competitor's number rangeScenario 6: Block Anonymous Callers
Rule Name: Block-Hidden-CallerID
Pattern: Anonymous|Private|Restricted|Unknown
Match Type: Regex
Action: Play message "Please disable caller ID blocking"
Use Case: Require caller ID for business callsIndustry-Specific
Customize blocking rules based on your industry. E-commerce may block all international; international business may only block known fraud regions.
Bulk Import Blocking Rules
Prepare Import File
CSV Format:
rule_name,pattern,match_type,action,enabled
Block-UK-Numbers,+44*,starts_with,reject,true
Block-Premium-900,+1900*,starts_with,reject,true
Block-Spam-1,+15551234567,exact,reject,true
Block-International,^(?!\+1)[+][0-9]+$,regex,play_message,trueRequired Columns:
rule_name: Descriptive namepattern: Number pattern to matchmatch_type: exact, starts_with, contains, regexaction: reject, play_message, redirectenabled: true or false
Import File
- Click Import Rules
- Select CSV file
- Review preview
- Click Confirm Import
Bulk Import
Efficient for adding many rules at once, such as entire spam databases or country blocking lists.
Validate and Enable
- Review imported rules
- Test sample numbers against rules
- Enable rules one at a time or all at once
- Monitor call logs for blocked calls
Pre-Made Lists (Available):
- Spam Database: 1000+ known spam numbers
- Toll Fraud Countries: High-risk international codes
- Premium Numbers: All US premium rate prefixes
- Anonymous Patterns: Various hidden caller ID formats
Community Lists
Subscribe to community-maintained spam lists that update automatically. Requires integration with spam database services.
Allowed Numbers (Whitelist)
Allow Only Specific Numbers
Navigate to Allowed Numbers
Go to Settings > Trunks > [Select Trunk] > Advanced > Allowed Numbers > Click Add Rule
Configure Whitelist Rule
Rule Details:
- Rule Name: "Allow-Key-Clients", "Allow-Support-Team"
- Number Pattern: Number or pattern to allow
- Match Type: Exact, Starts With, Contains, Regex
- Priority: Higher number = higher priority
Number Pattern Examples:
Exact Match:
+15551234567 → Allow only this number
Starts With:
+1555* → Allow entire area code 555
+1 → Allow all North America
Contains:
*1234* → Allow any number with 1234
Wildcard:
+44207_______ → Allow London area code rangeSet Whitelist Mode
Whitelist Modes:
Additive Mode (Default):
- Whitelist adds to normal operation
- Both whitelisted and non-blacklisted calls allowed
- Use for adding VIP bypass rules
Exclusive Mode:
- ONLY whitelisted numbers allowed
- Everything else blocked
- Use for high-security scenarios
Exclusive Mode
Exclusive mode blocks ALL calls except those on whitelist. Use carefully - test thoroughly before enabling in production.
Enable and Test
- Add multiple whitelist entries
- Test from whitelisted number (should work)
- Test from non-whitelisted number (behavior depends on mode)
- Verify call logs
Whitelist Active
Allowed numbers can now bypass blocking rules and will always connect.
Whitelist-Only Operation
What is Exclusive Mode? When enabled, ONLY numbers on the whitelist can call through the trunk. Everything else is automatically blocked.
Use Cases:
High-Security Environment:
Scenario: Government office, only allow approved numbers
Configuration:
- Enable Exclusive Whitelist Mode
- Add all approved government numbers
- Add emergency services
- Add key personnel mobile numbers
Result: Zero spam, complete controlPrivate Hotline:
Scenario: Support hotline for VIP clients only
Configuration:
- Enable Exclusive Mode on dedicated trunk
- Add VIP client numbers
- Regular customers use different trunk
Result: VIP-only accessInternal Testing:
Scenario: Test trunk before production
Configuration:
- Enable Exclusive Mode
- Add only test team numbers
- Perform testing without risk
- Disable Exclusive Mode when ready
Result: Controlled testing environmentEmergency Contact System:
Scenario: After-hours emergency line
Configuration:
- Separate trunk for emergencies
- Whitelist on-call staff only
- Block all other callers
Result: True emergency calls onlyCritical Warning
Exclusive mode will block ALL callers not on whitelist, including customers, partners, and potentially emergency services. Maintain whitelist carefully.
Common Whitelist Patterns
VIP Client Allowlist:
Client 1: +15551234567 (exact)
Client 2: +15559876543 (exact)
Client 3 Mobile: +15551111111 (exact)
Notes: Manual entry of each VIP numberPartner Company Range:
Pattern: +1555123*
Matches: All numbers from partner's number range
Use Case: Allow entire partner organizationGeographic Allow (Local Only):
Pattern: +1555*
Matches: All local area code 555
Use Case: Local-only business, block long distanceMobile Numbers Only:
Regex: ^(\+1[2-9]\d{2}[2-9]\d{6})$
Matches: Valid US mobile numbers
Use Case: Mobile-only access (no landlines)International HQ Locations:
Rule 1: Allow-US-HQ
Pattern: +1555*
Rule 2: Allow-UK-HQ
Pattern: +442071*
Rule 3: Allow-Singapore-HQ
Pattern: +656*
Use Case: Multi-location company, only allow company sitesPattern Testing
Use the pattern tester tool to verify your patterns match intended numbers before enabling whitelist.
Blacklist + Whitelist Interactions
Rule Precedence:
- Whitelist evaluated first (highest priority)
- Blacklist evaluated second
- Default allow if no matches
Scenario 1: VIP Bypass Spam Block
Blacklist: +1555123* (block entire range - spam source)
Whitelist: +15551234567 (but allow this specific VIP)
Result: +15551234567 connects (whitelist wins)
+15551234568 blocked (blacklist applies)Scenario 2: Allow Region, Block Specific
Whitelist: +1555* (allow area code)
Blacklist: +15551234567 (block known problem number)
Result: Blacklist has no effect (whitelist allows everything matching +1555*)Scenario 3: International with Exceptions
Blacklist: +44* (block all UK)
Whitelist: +442071234567 (allow UK office)
Result: UK office can call, other UK numbers blockedBest Practice Combinations:
Spam Protection + VIP Access:
1. Import spam database to blacklist
2. Add VIP customers to whitelist
3. VIPs always connect, spam always blockedGeographic + Exception:
1. Blacklist all international (+^(?!\+1))
2. Whitelist specific international partners
3. Domestic unrestricted, international selectiveTime-Based + Whitelist:
1. After hours, enable exclusive whitelist mode
2. Only on-call staff numbers whitelisted
3. During business hours, disable exclusive mode
4. Normal operation with blacklist onlyRule Interaction
Whitelist always takes precedence over blacklist. Use this to create "block all except..." scenarios.
Pattern Matching Reference
Wildcard Pattern Reference
Single Digit Wildcard (_):
Pattern: +1555123___0
Matches:
✓ +15551230000
✓ +15551231230
✓ +15551239990
✗ +15551230001 (last digit not 0)
✗ +155512300 (too short)Multiple Digit Wildcard (*):
Pattern: +1555*
Matches:
✓ +1555
✓ +15551234567
✓ +15559999999999
✗ +1556 (doesn't start with +1555)Start of String (^):
Pattern: ^+1555
Matches: Numbers starting with +1555
Must be at beginning of numberEnd of String ($):
Pattern: 4567$
Matches: Numbers ending with 4567
Must be at end of numberCharacter Class ([...]):
Pattern: +1555[0-5]*
Matches: +1555 followed by digits 0-5
Example: +15550123, +15555555
Not: +15556789 (6 not in class)Negation ([^...]):
Pattern: +1555[^09]*
Matches: +1555 but NOT followed by 0 or 9
Example: +15551234, +15558888
Not: +15550123, +15559999Wildcard Performance
Wildcards are faster than regex. Use wildcards when possible for better performance on high-volume trunks.
Regular Expression Patterns
Block International (Except US/Canada):
Regex: ^(?!\+1)[+][0-9]+$
Explanation:
^ = start of string
(?!\+1) = negative lookahead, not +1
[+] = must start with +
[0-9]+ = one or more digits
$ = end of stringPremium Rate Numbers (US):
Regex: ^(\+1900|\+1976|\+1809|\+1284|\+1649|\+1242)
Matches:
900: premium numbers
976: pay-per-call
809: Caribbean premium
284, 649, 242: high-cost CaribbeanToll Fraud High-Risk Countries:
Regex: ^(\+234|\+252|\+225|\+223|\+233|\+254)
Matches:
234: Nigeria
252: Somalia
225: Ivory Coast
223: Mali
233: Ghana
254: KenyaMobile Numbers Only (US):
Regex: ^(\+1[2-9]\d{2}[2-9]\d{6})$
Explanation:
\+1 = country code
[2-9] = area code first digit (2-9)
\d{2} = area code remaining digits
[2-9] = exchange first digit (2-9)
\d{6} = remaining digitsAnonymous Caller Variations:
Regex: ^(Anonymous|Private|Restricted|Unknown|Unavailable|Blocked)$
Matches: Common hidden caller ID names (case-sensitive)Specific Area Codes:
Regex: ^(\+1(555|800|888|877|866|855|844|833))
Matches: Toll-free and test area codesInternational Format Validation:
Regex: ^\+[1-9]\d{1,14}$
Validates: Proper E.164 format
Must start with +
Country code 1-999
Total 1-15 digits (after +)Regex Performance
Complex regex patterns can impact performance on high-volume trunks. Test and monitor CPU usage when using advanced regex.
Pattern Testing Tool
Open Pattern Tester
Go to Settings > Trunks > Advanced > Pattern Tester
Enter Pattern and Test Numbers
Pattern: +1555*
Test Numbers:
+15551234567 → ✓ Match
+15559999999 → ✓ Match
+15561234567 → ✗ No match
+4415551234567 → ✗ No matchReview Match Results
Tool shows:
- Which numbers match
- Why they match (pattern explanation)
- Captured groups (for regex)
- Performance metrics (match speed)
Testing Best Practices:
-
Test Both Positive and Negative:
- Numbers that SHOULD match
- Numbers that SHOULD NOT match
-
Test Edge Cases:
- Shortest possible match
- Longest possible match
- Numbers just outside pattern
-
Test Real-World Numbers:
- Use actual numbers from call logs
- Include various formats
- Test international variations
-
Performance Testing:
- Test with 1000+ numbers
- Measure pattern evaluation time
- Compare wildcard vs regex speed
Production Testing
Always test patterns in staging environment or with monitoring before deploying to production trunks.
Pattern Matching Performance
Performance Rankings (fastest to slowest):
1. Exact Match (fastest):
Pattern: +15551234567
Speed: 0.001ms per match
Use Case: Block specific known numbers2. Prefix Match (very fast):
Pattern: +1555*
Speed: 0.002ms per match
Use Case: Block area codes, country codes3. Simple Wildcard (fast):
Pattern: +1555123____
Speed: 0.005ms per match
Use Case: Number ranges with pattern4. Simple Regex (moderate):
Pattern: ^(\+1900|\+1976)
Speed: 0.02ms per match
Use Case: Multiple specific prefixes5. Complex Regex (slowest):
Pattern: ^(?!\+1)[+][0-9]+$
Speed: 0.1ms per match
Use Case: Complex logic, multiple conditionsPerformance Impact:
Low Volume (< 100 calls/hour):
- Any pattern type acceptable
- Regex complexity doesn't matter
- Prioritize correctness over speed
Medium Volume (100-1000 calls/hour):
- Prefer wildcards over regex
- Limit complex regex patterns
- Monitor CPU usage
High Volume (> 1000 calls/hour):
- Use exact match or prefix match only
- Avoid complex regex
- Consider hardware upgrades
- Monitor performance metrics
Optimization Tips:
-
Sort by Specificity: Most specific rules first
Order: 1. Exact match rules (fastest exit) 2. Prefix match rules 3. Wildcard rules 4. Regex rules (slowest) -
Combine Similar Patterns:
Instead of: +1900*, +1976*, +1809* Use: ^(\+1900|\+1976|\+1809) (One regex instead of three rules) -
Use Caching: System caches recent pattern matches
-
Limit Rule Count: < 100 rules for best performance
Monitoring
Monitor pattern matching performance in system metrics. High CPU usage during call setup indicates pattern optimization needed.
Import and Export
Export Blocking/Allowing Rules
Export All Rules
Navigate to Blocked Numbers or Allowed Numbers > Click Export
Select Export Format
CSV Format:
rule_name,pattern,match_type,action,enabled,notes
Block-International,^(?!\+1)[+][0-9]+$,regex,reject,true,Block all except US/Canada
Block-Premium,+1900*,starts_with,reject,true,Premium rate numbers
Allow-VIP-1,+15551234567,exact,allow,true,VIP Client Alpha CorpJSON Format:
[
{
"rule_name": "Block-International",
"pattern": "^(?!\\+1)[+][0-9]+$",
"match_type": "regex",
"action": "reject",
"enabled": true,
"notes": "Block all except US/Canada"
}
]XML Format (for integration):
<rules>
<rule>
<name>Block-International</name>
<pattern>^(?!\+1)[+][0-9]+$</pattern>
<type>regex</type>
<action>reject</action>
</rule>
</rules>Download File
File downloaded with timestamp: blocking-rules-2024-11-21.csv
Exported
Use exported file for backup, documentation, or transferring to another trunk/PBX.
Import Blocking Rules
Prepare Import File
Ensure CSV/JSON file has correct format and all required fields.
Import File
Click Import > Select file > Review preview
Handle Conflicts
Duplicate Rules:
- Skip duplicates
- Overwrite existing
- Merge (keep both, rename)
Invalid Patterns:
- Highlighted in preview
- Fix before importing
- Or skip invalid rules
Confirm Import
Review summary:
- Total rules imported
- Duplicates skipped
- Errors encountered
Import Complete
Verify imported rules are working correctly with pattern tester before enabling.
Sharing Rules Between Trunks/Systems
Same PBX, Different Trunk:
- Export from Trunk A
- Import to Trunk B
- Adjust trunk-specific patterns if needed
Different PBX System:
- Export from source PBX
- Review/adjust for compatibility
- Import to destination PBX
- Test thoroughly
Team/Community Sharing:
- Share spam databases
- Collaborate on fraud prevention
- Standardize across organization
- Version control rule sets
Pre-Made Rule Sets (Available):
- Global Spam Database: 10,000+ spam numbers
- Toll Fraud Protection: High-risk country codes
- Premium Block: All premium rate patterns
- Anonymous Block: Hidden caller ID variations
Rule Libraries
Maintain library of rule sets for different scenarios (high security, moderate, open). Apply appropriate set based on needs.
Rule Set Version Control
Why Version Control?:
- Track changes over time
- Roll back problematic rules
- Audit who changed what
- Document reasons for rules
Versioning Strategy:
Version 1.0: Initial deployment
- Basic spam blocking
- 50 rules
Version 1.1: Added toll fraud protection
- High-risk countries
- Premium numbers
- 125 rules
Version 1.2: VIP whitelist
- Added key client whitelist
- Exclusive mode for after-hours
- 150 rulesChange Log Example:
2024-11-21 - John Smith
Added: Block Nigeria (+234*)
Reason: 10 toll fraud attempts detected
2024-11-15 - Jane Doe
Added: Allow VIP Client (+15551234567)
Reason: VIP complained about accidental block
2024-11-10 - Bob Johnson
Removed: Block UK numbers (too broad)
Added: Block specific UK spam range (+441234*)
Reason: Blocking legitimate UK clientsBackup Strategy:
- Daily automatic exports
- Store in version control (Git)
- Keep 90 days of history
- Document major changes
Compliance
Some industries require audit trails of blocking rules. Maintain version history for compliance purposes.
Best Practices
Number Blocking Recommendations
Follow these best practices for effective call filtering without blocking legitimate callers.
Rule Management
- Start Conservative: Begin with targeted rules, expand as needed
- Test Thoroughly: Always test patterns before enabling in production
- Document Rules: Note why each rule was added and when
- Regular Review: Quarterly review of all rules, remove obsolete ones
- Monitor Impact: Track blocked call volume, review for false positives
Pattern Design
- Specific Over Broad: Block +15551234567 rather than +1555*
- Whitelist VIPs: Ensure important callers can always reach you
- Test Edge Cases: Verify patterns match exactly what you intend
- Use Simple Patterns: Prefer wildcards over regex when possible
- Avoid Overlaps: Ensure rules don't conflict with each other
Security
- Block Premium Numbers: Always block 900, 976, and Caribbean premium
- Monitor Fraud Patterns: Watch for unusual destination patterns
- Geographic Restrictions: Block regions you don't do business with
- Anonymous Blocking: Consider blocking hidden caller ID for security
- Regular Updates: Update spam lists monthly from community databases
Performance
- Limit Rule Count: Keep under 100 rules for optimal performance
- Order by Frequency: Most common matches first
- Use Caching: Enable pattern match caching
- Monitor CPU: Watch for performance impact on high-volume trunks
- Optimize Regex: Simplify complex regex patterns
Compliance
- Emergency Services: Never block emergency services (911, etc.)
- Regulatory Numbers: Don't block regulatory/government numbers
- Customer Access: Ensure customers can always reach you
- Do Not Call: Maintain separate DNC list for outbound
- Audit Trail: Keep logs of blocked calls for compliance
Troubleshooting
Legitimate Calls Being Blocked
Symptoms:
- Important clients can't reach you
- Complaints about blocked calls
- Missing expected calls
Diagnostic Steps:
-
Check Call Logs:
- Review blocked calls list
- Identify which rule blocked call
- Verify if block was intentional
-
Review Pattern:
- Is pattern too broad?
- Example: +1555* blocks entire area code
- Narrow pattern to specific problem numbers
-
Check Precedence:
- Is blacklist overriding whitelist?
- Add specific number to whitelist
- Whitelist should take precedence
-
Test Pattern:
- Use pattern tester with blocked number
- Verify pattern matches as expected
- Adjust pattern if needed
Solutions:
Add to Whitelist:
Add: +15551234567 (specific client)
Priority: High
Result: Always allowed, bypasses blacklistNarrow Pattern:
Before: +1555* (blocks entire area code)
After: +15559* (blocks only 555-9xxx range)
Result: Other numbers in area code workDisable Rule Temporarily:
Disable problematic rule
Test if calls connect
Refine rule pattern
Re-enable with new patternCustomer Impact
False positives damage customer relationships. Monitor closely and respond quickly to blocking complaints.
Rule Not Blocking Expected Numbers
Symptoms:
- Spam calls still getting through
- Pattern doesn't match test numbers
- Rule appears enabled but not working
Diagnostic Steps:
-
Verify Rule Enabled:
- Check rule status (enabled/disabled)
- Verify correct trunk assigned
- Confirm rule priority
-
Test Pattern:
- Use pattern tester
- Enter actual spam number
- See if pattern matches
-
Check Number Format:
- How does provider send caller ID?
- E.164 format (+15551234567)?
- Local format (5551234567)?
- Pattern must match actual format received
-
Review Rule Type:
- Exact vs starts_with vs regex
- Correct type for your pattern?
Common Issues:
Format Mismatch:
Rule pattern: +15551234567
Provider sends: 5551234567
Result: No match (missing +1)
Solution: Add second rule for local format
Or use number normalizationWildcard Syntax Error:
Incorrect: +1555*123
Correct: +1555123* (* at end for wildcard)Regex Escape Characters:
Incorrect: +1 (space and unescaped +)
Correct: \+1 (escaped + for regex)Case Sensitivity:
Pattern: anonymous
Caller ID: Anonymous
Result: No match (case-sensitive)
Solution: Use regex with case-insensitive flag
Or: (anonymous|Anonymous|ANONYMOUS)Number Normalization
Enable number normalization to convert all caller IDs to E.164 format, making pattern matching more reliable.
Slow Call Setup Due to Pattern Matching
Symptoms:
- Increased call setup time
- High CPU usage during calls
- System slowdown
Diagnostic Steps:
-
Check Rule Count:
- How many rules active?
- Over 100 rules can impact performance
- Consider consolidation
-
Identify Slow Patterns:
- Complex regex patterns slow
- Monitor pattern evaluation time
- Optimize or replace
-
Check Rule Order:
- Most common matches first?
- Exact matches before regex
- Optimize rule priority
-
System Resources:
- CPU usage during call setup
- Memory usage
- Trunk call volume
Solutions:
Consolidate Rules:
Before (3 rules):
+1900*
+1976*
+1809*
After (1 rule):
^(\+1900|\+1976|\+1809)
Result: Faster evaluationReplace Regex with Wildcards:
Before: ^(\+1555[0-9]{7})$
After: +1555*
Result: 10x faster matchingReorder Rules:
Priority order:
1. Exact matches (fastest)
2. Prefix wildcards
3. Complex wildcards
4. Simple regex
5. Complex regex (slowest)Enable Caching:
Cache recent pattern matches
Reduces repeated evaluation
Significant improvement for repeat callersPerformance Monitoring
Monitor pattern matching performance metrics. If average match time > 10ms, optimization needed.
Whitelisted Numbers Still Blocked
Symptoms:
- Whitelisted number blocked
- Whitelist appears enabled
- No apparent reason for block
Diagnostic Steps:
-
Verify Whitelist Entry:
- Check pattern matches exactly
- Verify enabled status
- Check trunk assignment
-
Check Exclusive Mode:
- Is exclusive mode enabled elsewhere?
- Time-based rules active?
- Conflicting configuration?
-
Review Call Logs:
- Which rule blocked call?
- Was it blacklist or other rule?
- Error message details
-
Test Pattern:
- Use pattern tester
- Verify whitelist pattern matches
- Check for typos
Common Issues:
Pattern Typo:
Whitelist: +15551234567
Caller: +15551234568
Result: No match (last digit different)Precedence Issue:
Some systems: blacklist overrides whitelist
Check: precedence settings
Fix: Ensure whitelist has priorityMultiple Trunk Rules:
Whitelist on Trunk A
Call comes in on Trunk B
Result: Whitelist doesn't apply
Solution: Add whitelist to correct trunkTime-Based Rules:
Whitelist only active during business hours
Call after hours gets blocked by exclusive mode
Solution: Ensure whitelist applies 24/7 or adjust time rulesSystem-Wide Block:
Number blocked at system level (above trunk level)
Trunk whitelist can't override
Solution: Remove from system blacklistPrecedence
Verify whitelist precedence in your system. Some PBX systems process blacklist first, making whitelist ineffective.
Use Cases
Blocking Spam and Robocalls
Strategy:
- Import community spam database
- Block anonymous callers
- Block frequent spam area codes
- Whitelist known contacts
Implementation:
Rule 1: Block-Spam-Database
Pattern: Import from spam list
Action: Reject
Count: 5,000+ numbers
Rule 2: Block-Anonymous
Pattern: ^(Anonymous|Private|Restricted)$
Action: Play message "Please enable caller ID"
Rule 3: Block-Spam-Area-Codes
Pattern: ^(\+1564|\+1855844)
Action: Reject
Reason: Known spam origin codes
Whitelist: Import customer database
Pattern: Customer phone numbers
Priority: HighResults:
- 95% reduction in spam calls
- No customer complaints
- Minimal false positives
- Improved staff productivity
Community Databases
Subscribe to real-time spam databases for automatic protection against new spam numbers.
Preventing International Toll Fraud
Threat: Hackers compromise PBX, make expensive international calls, resulting in thousands in fraud charges.
Protection Strategy:
Block High-Risk Countries:
Block: +234* (Nigeria - #1 fraud source)
Block: +252* (Somalia)
Block: +225* (Ivory Coast)
Block: +223* (Mali)
Block: +233* (Ghana)
Block: +254* (Kenya)
Block: +53* (Cuba)
Block: +95* (Myanmar)Block Premium Numbers:
Block: +1900* (US premium)
Block: +1976* (US pay-per-call)
Block: +1809* (Caribbean premium)
Block: +1284* (British Virgin Islands)
Block: +1649* (Turks and Caicos)Allow Only Business Regions:
Whitelist Exclusive Mode (after hours)
Allow: +1* (US/Canada)
Allow: +44* (UK office)
Allow: +61* (Australia office)
Block: Everything elseMonitor and Alert:
- Alert on blocked international calls
- Daily reports of blocking activity
- Immediate notification of fraud attempts
- Review patterns weekly
Results:
- Zero toll fraud incidents
- $50,000+ potential fraud prevented
- Peace of mind
Toll Fraud Costs
Average toll fraud incident costs $12,000. Premium-rate fraud can exceed $100,000. Prevention is critical.
Geographic Call Restrictions
Scenario 1: Domestic Only Business
Business: Local retail store
Customers: US only
Goal: Block all international
Configuration:
Block: ^(?!\+1)[+][0-9]+$
Allow: +1*
Result: US/Canada onlyScenario 2: Multi-National with Exceptions
Business: International company
Offices: US, UK, Singapore
Goal: Block all except office regions
Configuration:
Exclusive Whitelist Mode
Allow: +1* (US/Canada)
Allow: +44* (UK)
Allow: +65* (Singapore)
Block: Everything else
Result: Three regions onlyScenario 3: Avoid High-Cost Regions
Business: Cost-conscious startup
Goal: Block expensive international
Configuration:
Allow: +1* (local)
Block: All international except:
Allow: +44* (UK - business partner)
Result: Domestic + selective internationalScenario 4: State/Province Restrictions
Business: State-licensed service
License: California only
Goal: California callers only
Configuration:
Allow patterns for CA area codes:
+1209*, +1213*, +1310*, +1323*,
+1341*, +1408*, +1415*, +1424*,
+1442*, +1510*, +1530*, +1559*,
+1562*, +1619*, +1626*, +1628*,
+1650*, +1657*, +1661*, +1669*,
+1707*, +1714*, +1747*, +1760*,
+1805*, +1818*, +1820*, +1831*,
+1858*, +1909*, +1916*, +1925*,
+1949*, +1951*
Exclusive Mode: Yes
Result: California onlyLicensing
Some businesses (legal, healthcare, financial) are licensed per state/region. Geographic blocking ensures compliance.
VIP and Priority Caller Management
Scenario 1: VIP Bypass Everything
Business: High-end service
VIP Clients: Top 10 accounts
Goal: VIPs never blocked
Configuration:
Blacklist: Aggressive spam blocking
Whitelist (High Priority):
+15551111111 (VIP Client A)
+15552222222 (VIP Client B)
+15553333333 (VIP Client C)
...
Result: VIPs always connect, spam blockedScenario 2: After-Hours Emergency
Business: Medical practice
After Hours: Emergencies only
Goal: Only doctors and on-call staff
Configuration:
Time-Based Rule (6pm-8am):
Enable Exclusive Whitelist Mode
Whitelist:
+15551234567 (Dr. Smith)
+15559876543 (Dr. Jones)
+15551111111 (On-call service)
Result: After-hours, only authorized callersScenario 3: Executive Direct Line
Business: Corporation
Executive: CEO direct line
Goal: Board members and C-suite only
Configuration:
Trunk: CEO-Direct-Line
Exclusive Whitelist: Enabled 24/7
Whitelist:
+15551111111 (CFO)
+15552222222 (CTO)
+15553333333 (Board Chair)
... (board members)
Result: Truly private direct lineScenario 4: Support VIP Queue
Business: SaaS company
VIP Support: Dedicated trunk
Goal: VIP customers skip queue
Configuration:
Trunk: VIP-Support
Whitelist: VIP customer numbers
Routing: Direct to VIP support team
Result: VIPs bypass normal support queueCustomer Experience
VIP whitelists ensure your most important customers always have access. Improves satisfaction and retention.