Every time a user dials a number, the system needs to decide what to do with it - route it internally to a colleague, send it out over the Public Switched Telephone Network (PSTN), transform it into a different format first, or block it entirely. Call Patterns are the mechanism that makes those decisions possible.
They are Admin-defined rules that sit between the dialed digits and the routing engine, giving organizations the ability to shape exactly how numbers are interpreted and where calls go. Without Call Patterns, the system can only apply generic routing logic. With them, Admins can normalize dialing formats across regions, enable short-code dialing, and build a dial plan that reflects how their specific organization actually operates.
The objective of this guide is to provide a complete reference for configuring and managing Call Patterns within Talkdesk Voice Platform. Call Patterns allow Admins to define rules that manipulate dial strings, restrict users from calling specific numbers, and define call egress routes. They form the core of the Intelligent Dial Plan engine.
Table of Contents
- Call Pattern Types
- Number Manipulation Patterns
- Custom Patterns
- Call Routing Precedence Logic
- Assigning Patterns to Sites, Users, and Devices
- Testing Patterns
Call Pattern Types
There are two types of Call Patterns:
- Number Manipulation Patterns: Transforms dial strings using operations such as Strip, Replace, Prepend, or Append.
- Custom Patterns: Enables complex routing decisions, such as Block (explicit prevention) or OffNet (external routing with custom numbering).
Both pattern types use the same input format. Valid inputs to configure a pattern include:
- Digits 0–9
- *
- X
- \
- #
- +
Wildcard Characters
| Symbol | Meaning | Example |
| X | Matches exactly one digit (0–9) | 9X matches 91, 92, etc. |
| * | Matches zero or more trailing digits | 123* matches 1234, 1234594, etc. |
Notes:
- + and # match against these characters when they appear as part of the dial string.
- \ is used as an escape sequence for instances where the dial string contains a * character.
Number Manipulation Patterns
Number Manipulation Patterns transform dialed digits before the system attempts to route the call. If a configured pattern matches the number entered by an end user, the number is transformed according to the configured operation:
- Prepend: Adds digits to the beginning of the dialed number.
- Append: Adds digits to the end of the dialed number.
- Strip: Removes a specified prefix from the dialed number.
- Replace: Replaces the matched dial string with a defined value, supporting capture groups.
Capture Groups (Replace Operation)
For the Replace operation, whenever a pattern matches an input, the wildcard portions (* and X) are automatically captured into numbered groups from left to right. Literals are not captured - only the variable parts of the match are.
Captured groups can then be referenced when constructing the replacement value using ${1}, ${2}, etc.
- If no capture groups are referenced, the entire matched input is replaced by the literal replacement value.
- If capture groups are referenced, the output is constructed from the referenced groups and any surrounding literal text.
Examples:
| Pattern | Replacement | Input | Output | Notes |
| 011* | +${1} | 0114412345 | +4412345 | Strips 011, prepends + |
| 0* | +44${1} | 07911123456 | +447911123456 | Strips 0, prepends +44 |
| * | +1${1} | 2025551234 | +12025551234 | Prepends +1 to any number |
Note: Capture groups represent only the digits matched by wildcards. Administrators must construct the desired output entirely through the replacement template; captured groups cannot be directly replaced within the original pattern.
Number Manipulation Pattern Examples
Example 1: Feature Access Code
| Field | Value |
| Pattern | #49 |
| Description | Feature Access Code for Conference Bridge |
| Operation | Replace |
| Value | +15552672917 |
When a user dials #49, the dialed number is transformed to +15552672917.
Example 2: Normalize to E.164
| Field | Value |
| Pattern | XXXXXXXXXX |
| Description | Normalize to E.164 |
| Operation | Prepend |
| Value | +1 |
When any 10-digit numerical string is dialed, the number is prepended with +1 to normalize it to E.164 format.
Example 3: Normalize International Dialing to E.164
| Field | Value |
| Pattern | 011* |
| Description | Normalize International Dialing to E.164 |
| Operation | Strip |
| Value | 011 |
When the string 011441632960123 is dialed, it is transformed to 441632960123.
Custom Patterns
Custom Patterns allow Admins to pre-define routing outcomes for specific dial strings. Like Number Manipulation Patterns, they use the same wildcard input format.
| Pattern Type | Purpose | Use Case |
| Block | Explicitly prevents calls to specific numbers or number ranges. | Enforcing Do Not Call lists, preventing fraud, restricting dialing to competitor lines. |
| OffNet | Routes non-E.164 dial strings to the PSTN without using Talkdesk's standard normalization logic. | Short-code dialing or third-party gateways requiring non-E.164 format. |
| SIP Trunking | Routes calls to another private, internal platform (e.g., a UCaaS system or PBX) connected via a dedicated SIP Trunk. | Routing an extension block (e.g., 5XXX) to a connected back-office UCaaS platform. |
Call Routing Precedence Logic
The Intelligent Dial Plan uses a strict, deterministic order of precedence to resolve every dialed string. This ensures there are no conflicts, even when multiple rules or patterns could potentially match the same number.
| Priority | Step | Description |
| 1 | Number Manipulation Patterns | Applied first to clean up or transform the dialed digits. |
| 2 | Extensions (Intra/Inter-Site) | Checked to determine if the number corresponds to an internal Talkdesk user. |
| 3 | Custom Patterns | Evaluated for hybrid routing (Block, OffNet, SIP Trunking) as defined by the administrator. |
| 4 | PSTN Dialing | The remaining number is routed to the Public Switched Telephone Network using Talkdesk's carrier infrastructure. |
Assigning Patterns to Sites, Users, and Devices
Call Patterns can be assigned at three levels:
- Site: All users and devices assigned to the Site inherit these patterns by default.
- User: Users inherit Site patterns but can have individual patterns enabled, disabled, or added. Patterns inherited from a Site are labeled "From site".
- Device: Common area devices inherit Site patterns. Pattern access can be overridden at the device level.
To assign patterns to a Site, navigate to the Patterns tab of the Site and assign or unassign patterns as required.
To override patterns at the user level, navigate to Admin > Users > [User] > Telephony > Edit.
To override patterns at the device level, navigate to Admin > Devices > [Device] > Patterns.
Testing Patterns
To reduce the risk of introducing patterns into production environments that could lead to unexpected behavior, administrators can test patterns before assigning them to a Site, user, or device.
Note: It is strongly recommended to test all new patterns in a controlled context before production deployment.