Using wildcards in the inbound dialplan

Using wildcards in the inbound dialplan

You are here:
Estimated reading time: 1 min.

Since version 4.0.3, in order to match more than one number, you can use regular expressions to allow the use of number patterns as DID numbers. You can use wildcards to do this.

Allowed DID numbers

  • Plain numbers
    • Must start with a digit, letter or “+”
    • Must contain only alphanumeric characters (no “_”)
  • Patterns
    • Must start with “_”, “_+”, or “+_”
    • May contain characters: 0-9A-Za-z
    • May contain matching pairs of ‘[‘ and ‘]’ containing digits and/or digit ranges (a range consists of two digits separated by ‘-‘)

You can use individual DIDs that are within a range that you specified as a wildcard. So, if you e.g. have created the following two DIDs in your inbound dial plan:

  1. a DID _+3120123456X and
  2. a DID +31201234567

that is fine. The rules set for +31201234567 will be used when a call to that specific number comes in, and the rules set for the wildcard apply to any of the other numbers that will match the wildcard (for which there are no specific individual DIDs created).

Examples

Say we have a block of 100 successive numbers to all of which the same dial plan rules would apply. For instance: +31201234500 to +31201234599. To facilitate this easily we would want to create a single DID entry in our dial plan that matches any number in that group of 100 DID’s.

To do so we will create a new inbound number in Dialplan/Inbound: _+312012345XX and create one or more rules that apply to it when an inbound call comes in (local extension, call group, routine, etc). If you would call e.g. 0031201234500 or 0031201234511 your newly created dial plan entry will be used.

You could also choose to match only a part of that block of 100 numbers, e.g. by creating an entry _+312012345[0-2]X to catch any number between 0031201234500 and 0031201234529, and _+312012345[3-9]X to handle the rest.

Was this article helpful?
No