Content

Page tree



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

InputFunction
0,1,2,3,4,5,6,7,8,9Matches 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.

InputFunction
Any non-escaped characterUnescaped 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

\dThis 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:
1. BS: Go to “Dial Plans” menu.
2. BS: Input the following in the first Dial Plans entry and press Save:
|^\+([0-9]*)$|sip:00\1@\d;phone=yes|
3. HS1: Dial +70





2.Dial plan is saved successfully

3. HS2 should receive the call

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:
1. BS: Go to “Dial Plans” menu.
2. BS: Input the following in the first Dial Plans entry and press Save:
|^[^9]([0-9]{0,})$|sip:blocked@\d
3. HS1: Dial HS2
4. HS2: On hook
5. HS2: Dial HS1





2. Dial Plan should be saved successfully

3. HS2 Should receive call

5. HS2 “Call ended”

Example: Concatenate dial plans

It is possible to concatenate dial plans to have more functionality by placing quotes “” around each entry
In this test a kind of speed dial is created using the dial plan.
Dialling 1 is converted to extension one, dialling 2 is converted to extension 2 .. etc

Setup: HS1 should have extension 1001 , HS2 should have extension 1002 , HS3 Should have extension 1003

Steps:
1. BS: Go to “Dial Plans” website.
2. BS: Input the following in the first Dial Plans entry and press Save (With quotes):
“|^1$|sip:1001@\d” ” |^2$|sip:1002@\d” “|^3$|sip:1003@\d”
3. HS1: Dial 2
4. HS2: On Hook
5. HS1: Dial 3
6. HS3: On hook
7. HS2: Dial 1
8. HS1: On hook







2. Dial Plan should be saved successfully

3. HS2 Should receive call

5. HS3 Should receive call

7. HS1 Should receive call