Supported Pattern Syntax
This topic describes the syntax supported in dial patterns, DID patterns, and Caller ID patterns, and provides examples to help you understand and configure patterns.
Pattern
A pattern can be an exact number, a special character, or a combination of numbers and special characters to match specific numbers.
The following table lists the special characters supported for pattern.
| Character | Description | Example |
|---|---|---|
X |
Match any digit from 0 to 9. | 9XXX matches numbers from
9000 to 9999. |
Z |
Match any digit from 1 to 9. | 9ZZZ matches numbers from
9001 to 9999. |
N |
Match any digit from 2 to 9. | 9NNN matches numbers from
9002 to 9999. |
[###] |
Match any digit enclosed in brackets. Note: You can use - to
specify a range of digits. |
|
. |
Match one or more digits. | 9011. matches any number starting with 9011,
excluding 9011 itself. |
! |
Match zero or more digits. |
9011! matches any number starting with
9011, including 9011
itself. |
{{.Ext}} placeholder
{{.Ext}} placeholder represents an extension number in a pattern and
allows the pattern to dynamically match different extension numbers. It must be used
together with a specific number.
| Placeholder | Description | Example |
|---|---|---|
{{.Ext}} |
Represent extension number. | 550 matches numbers
starting with 550, where the digits after
550 correspond to extension number. It can
be used in inbound routes to route calls to corresponding
extensions, or in outbound routes as an extension-based Outbound
Caller ID.
|