Dial plan rules can be added, edited, and deleted in Config Tool or imported from comma-separated values (CSV) text files, where they are stored. The text files can contain multiple rules. Each rule is on a separate line and each comma-separated value (or value field) of a rule is separated by a semicolon (;). Sample dial plan rules are added by default as inactive.
Each dial plan rule must define the values as shown in the following example.
- Name (A)
- The name of the dial plan rule. If the name is not provided, a default value is used upon import (DialplanRule1). Enter a name that will help you remember the purpose of the rule.
- Schedule (B)
- The schedule that defines when this rule must be in effect. The long string of
digits for this value represent a GUID (Globally Unique Identifier). If this GUID is
not provided, or it is incorrect, the default value of Always is used upon
import. Tip: The schedule can be changed graphically from the Dial plans page in Config Tool once the dial plan rule has been imported, so you can leave it empty here and let the system assign the default schedule.
- Status (C)
- The status of the rule (On = Active; Off = Inactive). This value is not case sensitive. If this value is not provided, the default value Off is used upon import.
- Direction from (D)
- The SIP server from where the call is originating (the source server). Possible values are local or the name of a SIP trunk. Sipelia Server is always the local SIP server. If a SIP trunk name is entered here and does not exist in the Sipelia Server configuration, a warning will be displayed, and this value will revert to local during import.
- Direction to (E)
- The SIP server that receives the call (the destination server). Possible values are local or the name of a SIP trunk. The name of the SIP trunk must be unique, and must match the name that was entered in the SIP trunking tab when adding the SIP trunk. Sipelia Server is always the local SIP server. If a SIP trunk name is entered here and does not exist in the Sipelia Server configuration, a warning will be displayed, and this value will revert to local during import.
- Source (F)
- The regular expression that identifies the extension of the caller (the source caller). The dial plan rule is only applied if there is a match between the regular expression and the caller's extension. This field is mandatory.
- Destination (G)
- The regular expression that identifies the extension of the recipient (the destination recipient). The dial plan rule is only applied if there is a match between the regular expression and the recipient's extension. This field is mandatory.
- New source (H)
- The value that changes the caller's extension (if the rule is applied). For example, if the caller at extension 1001 calls the recipient at extension 2001, and the New source value is 4001, the recipient at extension 2001 sees that the incoming call is coming from extension 4001, not 1001. Possible values can also include regular expressions.
- New destination (I)
- The SIP extension that is receiving the call (if the rule is applied). Possible values can also include regular expressions.
Order of priority for dial plan rules
Rules defined in a dial plan are listed in order of priority. A rule located in a previous row is considered to be a higher priority rule. If a call matches two or more rules, the first rule listed in the dial plan will always apply. The order of priority can be changed after they were imported in Config Tool using the arrows located on the right side of the list.