D-Link DVX-7090 Router User Manual


 
Configuration How-to’s
5.9 HOW TO USE MATCH AND PATTERN FIELDS IN THE ROUTING
TABLE
Regular expressions are character strings used to build search patterns. Regular expressions
also provide a powerful string handling tool. Regular expressions may include both
alphanumeric characters, i.e. letters and digits normally used in writing and the so-called
metacharacters. Metacharacters are symbols that have special meaning and use.
In this application you use regular expressions to define match (
) and pattern
(
) strings.
The
field is for regular expressions that define a match pattern for the source or
destination number search.
The most instrumental and frequent metacharacters that you may need to use in match
patterns include:
^ denotes the beginning of the match string. For example, ^56 matches a string
starting with “56”.
$ stands for the end of a string. For example, 88$ corresponds to any set of
characters ending with “88”.
. signifies any character
\d means any decimal digit.
When the number of symbols in the sought string is unknown, use special metacharacters
called quantifiers. The most commonly used quantifiers are as follows:
* denotes any number of something, for example, X* means any number of X’s;
– ? stands for zero or 1 entry of a character, for example, X? means none or one X;
– + is used to express one or more entries of a character, for example you type X+
to signify 1 or more entries of X, and finally
X{n} denotes exactly n number of Xs.
The field
is designed for entering source and destination number translation rules.
The need to transform the source or destination number often arises before passing the
number to a particular service. If no changes are required, use the following regular
expression
.*.
When number transformation is necessary without passing it to any particular service
afterwards, select one of the following commands from the list:
Continue – the modified number is passed to the next rule in the Routing table;
Restart – the modified number is passed to the first rule of the Routing table.
Brackets are used to mark parts of the number extracted during call handling, for example
^(56.*). In the field
the marked parts are referred to as $n. In the expression $n n
represents a positive integer (greater than or equal to one) that identifies the number of the
brackets occurrence (e.g. $1 denotes the first set of brackets, $2 means the second set of
brackets etc).
DVX-7090 VoIP Router page 63 of 83