Content
Dial Plan: configuration
Using our latest DECT firmwares it's possible to use some dial plans on our base stations M400 and M900, they can be configured via web interface in the Dial Plans menu as shown below
Or via provisioning/configuration file, defining them as below
<dial_plan idx="1-10">VALIDVALUE</dial_plan>
The dial plan format follows this one: Dial Plan - Regular Expressions
And The dial plan consists of three parts, each one is separated by an exclamation mark: ! or a pipe: | as in !match!replacement!flag
If any dial plans have been configured, under the Servers page the Dial Plan index parameter can be configured: this setting decides the dial plan to be used for the server and all the extensions that used the server.
Outgoing call: All outgoing calls are allowed / modified according to the plan, uf the dial plan does not match the number then the number is let through without modification
For example: !^9([0-9]*)$! sip:+852\1!
Any number that starts with 9, the 9 is removed and replaced with +852, so the input 941443700 will call +85241443700
Incoming calls: Incoming calls are not covered by the dial plan
The first part: match
It can be configured as in the table below
Input | Function |
---|---|
0,1,2,3,4,5,6,7,8,9 | Matches the given input |
\+ | Matches a literal + |
\* | Matches a literal * |
^ | Matches beginning of string |
$ | Matches end of string |
. (period) | Matches any character |
[] (Brackets) | Matches a range of characters. Eg [1-3] or [1,2,3] matches 1 or 2 or 3 |
[^] | Specifies a negated range eg [^1-3] means anything but 1, 2 and 3 |
+ | Matches one or more times |
* | Matches zero or more times |
? | Matches zero or one time |
{,} | {5,9} means match at least 5 times, at most 9 times. {5,} means match at least five times, {5} means match exactly five times Without multiplier, exactly one match is expected |
() | Used to make backreferences that can be used in the replacement part |
The second part: replacement
In this section any input is just passed through to the output except the things that have special meaning.
Input | Function |
---|---|
Any non-escaped character | Unescaped characters are used literally |
\1, \2 .. \9 | This is replaced by the content inside parenthesis in the match part \1 is first parenthesis and so forth |
\d | This is replaced by the registrar |
The third part: flag
These can be used to change the behaviour of the dial plan, but no flags are supported.
Example: Change + to 00
Dial plan can be used to change the dialled number for example by changing + to 00 Setup: HS2 have extension starting with 00 eg 0070 Steps: |
|
Example: Whitelist allow numbers
Using the dial plan, it is also possible to determine if a number is allowed or not. In this example all numbers that do not start with 9 are blocked Setup: HS1 should have extension starting with 1 eg 1000, HS2 should have extension starting with 9 eg 9000 Steps: |
|
Example: Concatenate dial plans
It is possible to concatenate dial plans to have more functionality by placing quotes “” around each entry Setup: HS1 should have extension 1001 , HS2 should have extension 1002 , HS3 Should have extension 1003 Steps: |
|
Further Information
Related articles