Dial plan

1. Description

"Dial plan" is core function of cloud miniSIPServer. Once miniSIPServer receives a call, it will invoke "dial plan" to analyze called number of the call and get final routing information. So during "dial plan" process, there are two key procedures:

  • Analyze called numbers to get routing information.
  • Route call to final destination.

dial plan procedures in cloud miniSIPServer

2. Analyze numbers

Cloud miniSIPServer has a simpler "dial plan" feature than local miniSIPServer. In cloud system, miniSIPServer will only analyze called number, and change called numbers if necessary according to configuration, to get final routing information.

During these procedures, miniSIPServer uses 'maximum length matched' rule to match configuration records with incoming calls.

2.1 Maximum length matched

For an instance, there is an incoming call whose number is '1234' (here we don't care this number is caller number or called number), and miniSIPServer has two records illustrated below.

Record ID Number prefix Other
1 12 ... ...
2 123 ... ...

Both of them can match current call since their 'number prefix' is exact number prefix of '1234', then which record will be selected by miniSIPServer? miniSIPServer will use record 2 because its number prefix length is greater than record 1.

In miniSIPServer, this rule is named as 'maximum length matched'. All "dial plan" procedures will follow this rule.

2.2 Procedures

miniSIPServer uses an independent menu to include all necessary configuration for "dial plan". Please refer to the figure below.

dial plan menus

These configurations include several key procedures during whole "analyze numbers" procss:

  • Analyze called number. It is the most important procedure because miniSIPServer will get final routing information according to its result.
  • Refine called number.
  • Change numbers in different procedures.

The figure below illusrates main flow and sequence of "analyze numbers" process in cloud miniSIPServer.

basic procedures in dial plan

3. Routing

At this time, miniSIPServer supports several "route type" defined in "analyze called number" procedure:

  • Local user
  • External line
  • SIP trunk
  • Routing group
  • Intercept
3.1 Local user

"Local user" type means miniSIPServer should try to find the local user whose number is exact "called number" in current call. If miniSIPServer cannot find this user or it is not online, miniSIPServer should release current call.

By default, miniSIPServer processes all calls as "local user" calls if there isn't any "analyze called number" record matched these calls.

3.2 External line

"External line" type means miniSIPServer should route current call to external line to final outside users. There are some special configurations for this route-type.

  • In 'analyze called number', we can configure "specific external line" item at the same time. That means miniSIPServer should route call to such external line.
  • analyze called number with specific external line

    If the "specific external line" item is blank, miniSIPServer will try to select an available external line to route the call.

  • In 'local user' configuration, we can indicate 'use specific external line for out-goup calls' too. That means miniSIPServer should route out-group calls to such external line for the local user.
  • local user with specific external line

Below figure illustrates the basic relationship between these special configurations if route type is "external line".

relationship between specific external lines

3.3 SIP trunk

Please refer to "SIP trunk" document for more details.

3.4 Routing group

"Routing group" can combine "external line" and "SIP trunk". It is very flexible for routing selection. Please refer to "routing group" document for more details.

3.5 Intercept

In fact, this type is not used to route call. It is used to indicate miniSIPServer to reject current call directly.

4. Configuration

"Dial plan" feature may have several tables to be configured.

  • Transition
  • Analyze called number
  • Refine called number
4.1 Transition

"Transition" is used to change numbers. Please click menu "Dial plan / Transition" to get its details.

Number transition configuration

Item Type or value Description
ID Integer (>0) Transition ID. It will be referred by other records.
Type 1: Add prefix

Add a prefix before current called or caller string.

"Prefix / Replace string" item must be configured together.

2: Replace

Replace target string with a specific string which should be configured in "Prefix / Replace string" item.

The target string is confirmed by "start position" and "length" items.

3: Delete Delete a string which should be confirmed by "start position" and "length" items
Start position Integer

The start position from where current transition will be done.

Valid value is between 0 and 31. 0 means the first digit of the number.

Length Integer

The target transition length. It indicates how many characters should be deleted or replaced.

Valid value is between 1 and 31.

Prefix / Replace string String The specific strings which will be added as a prefix or replace target strings.

Since 'transition' is a very important and useful element in dial-plan and analysis process, we give some examples to describe how to use it.

Example 1: Change "1234" to "Holly1234".

    Transition type = Add
    Prefix/Replace string = Holly

Example 2:Change "1234" to "34".

    Transition type = Delete
    Start position = 0
    Length = 2

Example 3: Change "1234" to "Holly34".

    Transition type = Replace
    Start position = 0
    Length = 2
    Prefix/Replace string = Holly
4.2 Analyze called number

This is the core procedure in miniSIPServer "dial plan" process. Its result will get final routing for calls and might change numbers.

Please click menu "Dial plan / Analyze called number" to get its details.

Analyze called number

Item Type or value Description
Called number prefix String The target called number prefix to be analyzed. miniSIPServer uses longest-match method to match called numbers with this prefix.
Route Type Local user (extension) The call should be routed to a local user.
External line

The call will be routed to outside through an external line.

If "Specific external line" is configured at the same time, the call will be routed through this specific external line.

SIP trunk

The call will be routed to a specific SIP server which is indicated by "SIP trunk ID".

Please refer to "SIP trunk" service document for more details.

Routing group

The call will be routed to a routing group.

Please refer to "routing-group" service document for more details.

Intercept Current call should be intercepted and released immediately.
Specific external line String If route type is "external line" and this item is configured, the current call will be routed to such external line.
SIP trunk ID Integer (>0) If route type is "SIP trunk", this item MUST be configured together and the current call will be routed to such trunk.
Routing group ID Integer (>0) If route type is "Routing group", this item MUST be configured together and the current call will be routed to such group.
Call right Integer

Call right for current record.

If it is 0, that means no limitation, all local users can make calls with this prefix.

If it is non-zero, that means only local users who have the same call right can make calls with such prefix.

Maximum duration (seconds) Integer(>=0)

The Maximum duration of matched call.

If timer expired, miniSIPServer will force to release the call automatically.

'0' means no limitation.

Change called number Yes or No It indicates whether the called number should be changed.

Transition ID Integer (>0) If the called number is configured to be changed, this item MUST be configured. The transition should be configured firstly.
Re-analyze after transition Yes or No If it is selected, it means analysis process should be done again after the called number is changed.

4.3 Refine called number

If calls are routed to external lines or SIP trunks, miniSIPServer can use this procedure to refine their final called numbers before sending calls out.

Please click menu "Dial plan / Refine called number" to get its details.

Refine called number

Item Type or value Description
Outgoing group ID Integer (>0)

Record ID.

This ID will be referred by outgoing calls configuration of external lines and SIP trunks.

Called number prefix String "dial plan" process will use this item with "outgoing group ID" item to match calls. If calls are matched, "dial plan" will refine their called numbers.
Transition ID Integer If current record matchs the call, "dial plan" will use this transtion to the change called number of current call.