66
SBC session border controllers
–
To address URI —
the URI from the To header is checked, it is possible to check via a regular expression;
–
Request-URI User Part —
the name from the Request-URI header is checked, it is possible to check via a
regular expression;
–
Request-URI Host Part —
the domain from the Request-URI header is checked, it is possible to check via a
regular expression;
–
Request-URI —
the Request-URI is checked, it is possible to check via a regular expression;
–
Source IP —
the source IP address is checked, either a single IP or a subnet in CIDR notation: 192.0.2.0/24 is
allowed;
–
User-Agent —
the User-Agent is checked, it is possible to check via a regular expression.
It is possible to change the order of conditions by selecting a condition by clicking on a field and moving it up
or down using the green arrows below the list of conditions.
Syntax of regular expressions for making conditions
1.
A regular expression is described by a combination of Latin letters, numbers and special characters.
Example:
12345@my\.domain
— string containing "
The symbol "." (dot) in this entry
is special and has been escaped, see paragraph 11 for details.
2.
Digit sequence enclosed in square brackets corresponds to any of the characters enclosed in brackets;
Example:
[01459]
corresponds to one of the digits 0, 1, 4, 5 or 9
3.
A range of characters can be specified in square brackets, separated by a dash;
Example:
[4-9]
—
corresponds to one of the numbers from 4 to 9;
Example:
[a-d4-97]
—
a combination of the previous options. Corresponds to any letter from 'a' to 'd', one of
the numbers from 4 to 9 or the number 7.
4.
The symbol "^" marks the beginning of a line;
Example:
^7383
—
a string that starts with 7383.
5.
The "$" symbol marks the end of a line;
Example:
100$
—
a string that ends with 100.
Example:
^40000$
— a string that corresponds exactly to «40000»
6.
The symbol "." (dot) stands for any character;
Example:
^7383.......
—
a string that starts with 7383 and then contains seven any characters. The string may
be longer in this case. To definitely limit the string, add a "$" at the end:
^7383.......$
;
Example:
^…..$ —
a string that contains exactly five any characters;
Example:
…..
—
a string that contains five any characters; Longer strings also fit this condition.
7.
The symbol "*" represents the repetition of the previous character zero or more times
Example:
45*
— strings that contain the sequence: 4, 45, 455 etc.
8.
The symbol "+" represents the repetition of the previous character one or more times