Syntax for dial plans

In Bria, a dial plan can be used to modify how your calls are placed. For example, a dial plan can change any number that starts with “+1613” to “613”. A dial plan is used for any combination of the following reasons:

  • To modify (transform) the input (the number to be dialed), such as to add the “9” required to obtain an outside line from a PBX.
  • To select the account to use to place a call, if users have more than one account. For example, to use Account 1 to dial a number starting with 61, and use Account 2 to dial a number starting with 64.

This topic discusses how to come up with a dial plan as well as how Bria uses it.

  • If you have only one SIP account and are looking for ways to modify dialing numbers, read Writing a dial plan on how to define patterns and transformation. If you decide to use more than one pattern, learn about the T timer to add a pause.
  • If you have multiple SIP accounts and want dial plans to choose a dial-out account, read Syntax for dial plans.

Writing a dial plan expression

A dial plan has two parts:

  • Pattern - It defines rules for the Bria client to look for in the input (a number to be dialed). If the input matches a pattern, the Bria client checks if the dial plan includes a match/transformation part for the pattern and modifies the input as defined. See Pattern elements on how to define a pattern using regular expressions.
  • Match/transformation - It defines how the input should be modified for the specific pattern. This is optional; you do not always need to modify the input. The match parameter indicates the pattern number such as match=1. There are several modifications supported; see Transformation keywords.

Examples of patterns and transformation

Dial plan syntax

The syntax of your dial plan expression separates each part with semicolons and terminates with a semicolon:

pattern;match=n;transformation;

You can have more than one of each in an expression, where patterns are separated by a pipe | symbol:

pattern1|pattern2|pattern3;match=1;trans1;match=2;trans2;match=3;trans3;

Pattern elements

The content for a pattern follows the digit map rules of RFC 2705, supplemented by the rules for regular expressions. Where there is an overlap between the digit map and regular expression rules, the digit map rules apply. For this reason, there are some special cases, included in the table below.

Transformation keywords

Bria uses several keywords to transform the input into a number that can be dialed. These are processed in a specific order.

Dial plan examples

How Bria uses the dial plan

When the user enters a digit to dial, Bria takes the input (a phone number) and performs a series of steps to match the number to a dial plan, and if the input matches a pattern, alter the number (if necessary), and then place the call right away without any further user interaction.

  1. Match the input to a dial plan.

  2. Transform the input.

    If a match is found between the input and a pattern, that pattern’s transformation (if any) is performed.

  3. Place a call.

    If a match is found between the input and a pattern, the call is placed immediately without user intervention to the transformed input, using the pattern's account.

    If Bria finds a match that includes a T timer, Bria waits until the T timer expires (approximately 4 seconds) or the user clicks Enter or Call, whichever happens first, to dial the transformed number.

What if no match is found?

If no match is found, Bria waits till the user clicks Enter or Call, and dials the input without altering.

Bria desktop chooses the account to dial out as follows:

  • When the Outgoing Account is set to Auto Select, Bria desktop uses the account selected as the Preferred account for calls in Account Settings.
  • When the Outgoing Account is set to a specific account, Bria desktop uses the selected account to dial the number.

Bria mobile uses the preferred account if no match is found.