Overview
The wide application of VoIP has resulted in more and more dialing plans. While service flexibility is enhanced and customer requirements are satisfied, reasonable, operable number management becomes increasingly important. A dial plan can help voice gateways to manage numbers in a unified way and create a management policy for all numbers, making number management more convenient and reasonable. The dial plan process on the calling side differs from that on the called side. The following discusses these two dial plan processes respectively.
Dial Plan Process
I. On the calling side
Figure 1-1 shows the dial plan process on the calling side.
Figure 1 Dial plan process on the calling side
1) The voice gateway on the calling side substitutes the calling/called number on the subscriber line according to the number substitution rule.
2) The voice gateway performs global number substitution.
3) The gateway selects a proper voice entity based on the voice entity selection priority rules and substitutes the calling/called number.
4) The gateway initiates a call to the called side and sends the calling/called number.
II. On the called side
Figure 1-2 shows the dial plan process on the called side.
Figure 2 Dial plan process on the called side
1) After receiving a voice call (the called number), the voice gateway on the called side performs calling/called number substitution globally.
2) The voice gateway on the called side selects a proper voice entity based on the voice entity selection priority rules. (Number substitution may also be involved during the voice entity selection.) If the called party is a local voice subscriber, the gateway directly connects the subscriber line. If the called party is a PSTN subscriber, the gateway initiates a call and sends the calling/called number to the PSTN. The PBX in the PSTN connects the call.
Regular Expression
You will frequently use some regular expressions when configuring number substitution rules. Regular expressions are a powerful and flexible tool for pattern matching and substitution. They are not restricted to a language or system and have been widely accepted.
When using a regular expression, you need to construct a matching pattern according to certain rules, and then compare the matching pattern with the target object. The simplest regular expressions do not contain any meta-character. For example, you can specify a regular expression “hello”, which only matches the string “hello”.
Meta-character | Meaning |
0-9 | Digits 0 through 9 |
# and * | Each indicates a valid digit |
. | Wildcard, which can match any valid digit. For example, 555…. can match any number beginning with 555 and ending in four additional characters. |
- | Hyphen (connecting element), used to connect two numbers (The smaller comes before the larger) to indicate a range of numbers, for example, 1-9 inclusive. |
[ ] | Delimits a range for matching. It can be used together with signs such as !, %, and +. For example, [235-9] indicates one number of 2, 3, and 5 through 9. |
( ) | Indicates a sub-expression. For example, (086) indicates the character string 086. It is usually used together with signs such as !, %, and +. For example, (086)!010 can match two character strings 010 and 086010. |
! | A control character, indicating that the sub-expression before it appears once or does not appear. For example, (010)!12345678 can match 12345678 and 01012345678. |
+ | A control character, indicating that the sub-expression before it appears one or more times. If the plus sign (+) appears at the head of a number, the number is an E.164 number and the plus sign itself does not represent a specific number or number repetition. For example, 9876(54)+ can match 987654, 98765454, 9876545454, and so on, and +110022 is an E.164-compliant number. |
% | A control character, indicating that the sub-expression before it appears multiple times or does not appear. For example, 9876(54)% can match 9876, 987654, 98765454, 9876545454, and so on. |
& Note:
l The sub-expression (one digit or digit string) before a control character such as !, +, and % can appear for the corresponding times. For example, (100)+ can match 100, 100100, 100100100, and so on. Once any number of them is matched, the match is considered an exact match. In the longest match mode, the voice gateway will ignore subsequent digits dialed by the subscriber after an exact match. (For the case that the gateway needs to wait for subscribers to continue dialing after an exact match, refer to the T mode.)
l The characters (\) and (|) are mainly used in regular expressions and you are not allowed to configure it. The character (\) is an escape character. If you want a control character to represent itself, you need to add the escape character (\) before it. For example, (\+) represents the character (+) itself because (+) is a control character in regular expressions. The character (|) means that the current character (string) is the character (string) on either the left or the right. For example, 0860108888|T means that the current character string is either 0860108888 or T.
l T mode: The character T in the match-template match-string means that the voice gateway should wait for more digits until the number exceeds the maximum length or the dial timer expires.
Number Substitution
According to the network requirements, you can first configure a number substitution rule list, and then define specific number substitution rules, dot-match rules, and preferred number substitution rules for the list. Finally, you can apply these substitution rules globally or to voice entities and voice subscriber lines to substitute calling/called numbers flexibly.
If there exist multiple number substitution rules in a number substitution rule list, only one number substitution rule will be matched. The match process is as follows:
1) The preferred number substitution rule is matched first. If the match succeeds, the gateway substitutes numbers on basis of this rule.
2) If the match fails, the gateway matches other number substitution rules in sequence. Once a rule is matched successfully, the gateway stops matching other number substitution rules.
& Note:
Here, the dot represents virtually matched digits. Virtually matched digits, including ., +, %, !, and [], refer to those that match the variable part in a regular expression. For example, the virtually matched digits are the digit “2”, the digit “5”, and the digits “25” respectively when the number 1255 matches the regular expressions 1[234]55, 125+, and 1..5.



Products

