Brekeke PBX Wiki

ARS - Route Variables

Global Route Variables (Brekeke PBX v3.1.x or later)

Global variables can be accessed from any ARS route. The update of a global variable will affect the ARS routes in which the related variable name is set.

From [Field Settings], administrators can set a global variable’s field type, name and description, and can also choose whether or not a global variable will be displayed on the ARS top page.

 

The Global variables&g1&g9 ) can be used .

 

Variable Setting (Brekeke PBX v3.1.x or later)

From the ARS template’s [Variable Setting] page, administrators can create routes that use the same ARS patterns template and can also set the values of the variables to be used by each route.

 

Common Settings

Common variables can be accessed from any route created under the same ARS template. Updating a common variable will affect the ARS routes under the current ARS template.

From [Field Settings], administrators can set a common variable’s Field Type, Field Name, Input Rule and Descriptions, and can also choose whether a common variable will be displayed on the [Variable Settings] page.

Configuring [Field Settings] on [Common Settings] is the same as on [Route Local Settings]. For more configuration details, please refer to “Route Local Settings” in the next section..

 

The Route common variables&a1&a9&b1&b9&c1&c9) can be used.

 

Route Local Settings

Create new routes and assign values to the route’s local variables defined in the ARS template for each route, and also deploy multiple routes based on the same ARS template.

From the [Field Settings] page, administrators can change the route’s local variables’ settings and also write JavaScript code to control the variable values set in each route.

Sample script:

if( v1 == 3333 )
  v5= "192.168.200.20";
else
  v5= "192.168.200.30";

Set the above script in the [Route Local Settings] > [Field Settings] -> [Script] field. If a route has variable v1 with value 3333, this route variable v5 will be set as “192.168.200.20” automatically. The route variable v5 will be set as “192.168.200.30” when variable v1 is set to any value other than 3333.

 

The table below shows an example of other items on the [Field settings] page.

If you choose “Select” as the Field Type, you should set an input rule in “Input Rule.”

Field Type Variable Field Name Initial Value Input Rule  
Text v1 Call Number [0-9] *1
Select v2 ITSP Type 003 ITSP A:001;ITSP B:002;ITSP C:003; *2

*1. When “Text” is selected as the Field Type, an Input Rule is not necessary. However, if you set an input rule using a regular expression, Brekeke PBX will check variables according to the rule on the [Variable Settings] page.

*2. When “Select” is selected as the Field Type, an Input Rule is needed. In the example, according to the input rule, “ITSP A,” ”ITSP B” and “ITSP C” are displayed as options for the select box on the [Variable Settings] page. “ITSP C” is displayed as the initial value of the select box.

 

Route local variables (&v1&v9, &w1&w9, &x1&x9can be used.

 

 

Variable Setting (Brekeke PBX v3.0.x)

The variables defined in an ARS route can be edited from the [Edit Variables] page at the upper-right of the ARS route template.

Variables Default value
v1 User ID/Number
v2 Password
v3 – v9 Customizable fields

 

Yes No
Suggest Edit