ARS - Overview
Most of the call management rules for outgoing and incoming calls through outside lines are set at Automatic Route Selection.
Common outside lines to which Brekeke PBX connects:
Third-Party SIP Servers
A Third-Party SIP Server is any server software other than the bundled SIP server that comes with Brekeke PBX. Common third-party SIP servers are those that are located at VoIP service providers or other office locations.
Gateways
The gateways referred to here are SIP PSTN Gateways that connect digital and analog PSTN lines or software gateways that convert between different protocols.
Defining rules in the [ARS] menu enables ARS to make optimal use of outside lines and of your gateways. You can define extension numbers that will receive incoming calls, as well as which lines to use for outgoing calls.
Here are some examples of uses for the ARS feature:
Select the least expensive calling options
You could save money by sending all international calls through an inexpensive long distance carrier, or just send calls that connect to a branch office located in (for example) Taipei through that specific carrier. With the ARS feature, you can use whichever calling option is the least expensive for each call.
Effective port use of PSTN Gateways
When there are multiple PSTN Gateways installed in an office, some ports may be used more frequently than others. You can use the ARS feature to select the most efficient PSTN Gateway port automatically.
Effective Use of Outside Lines
Similar to the above example, when you subscribe to multiple VoIP service providers, some phone numbers may be used more frequently than others. You can use the ARS feature to select the most efficient service provider automatically.
Network Traffic Management and Load Balancing
When many sessions are in progress and the server load is too high or network bandwidth is insufficient, you may choose to use the ARS feature to direct some calls through PSTN Gateways.
Failover
With ARS failover, Brekeke PBX searches for an alternate route if the specified route is unavailable or has failed, and then makes outgoing calls via the alternate route. For example, if you have multiple ITSPs (Internet Telephony Service Providers) and/or PSTN (Public Switched Telephone Network) gateways, Brekeke PBX allows for backup connections if the VoIP (Voice over Internet Protocol) or Internet connection is lost. In this situation, Brekeke PBX will automatically switch to an analog route through the PSTN gateway. The original route can be reactivated manually from Brekeke PBX Admintool or automatically by preset settings.
1. Route Search Process
Two sessions are used for each call in Brekeke PBX. Please refer to Section 5, “Call Process Flow” for more details on session processing during calls.
When User A calls User B, the SIP session initiated by User A will be answered by Brekeke PBX. Brekeke PBX will then process ARS Pattern-IN for the incoming session. Brekeke PBX also initiates a session with User B and will process ARS Pattern-OUT for the outgoing session.
Route search is done by searching for Matching Patterns that apply to a call. The Route Search starts from the highest priority (lowest number) as defined by the ARS rules. If multiple patterns share a priority level, a pattern is selected at random. When a matching pattern is found, the process will check if the [Max Sessions] value has been reached. If the pattern has sessions available, the process will select the pattern and convert the From and To header fields according to the settings defined in [Deploy Patterns].
For incoming sessions, Brekeke PBX will check if any ARS route matches and will then route the session to an appropriate dial-in number. Please ensure that calls between your own extension users do not match ARS rules, because those calls do not need to be routed through your gateway and a third-party SIP provider.
For outgoing calls, it is necessary to set priorities for effective routing, depending on line usage.
2. Matching Patterns
Use regular expressions to enter conditions for the To or From headers, etc., for the matching process. The fields can be set in the same way as the [Matching Patterns] fields in the Dial Plan. If these fields are left blank, all calls will be considered to match the condition.
By changing the [User] field of an ARS Pattern-OUT setting, it is possible to restrict who can use the ARS pattern. The “User” of the call for the ARS rule will be determined as follows:
- If the callee is a Brekeke PBX user, then that callee is considered as the “User” of the call.
- If #1 is not applicable and the call is forwarded through a Brekeke PBX user’s setting in the [Other Forwarding destinations], [Forwarding destination (No answer)] or [Forwarding destination (Busy)] field, the Brekeke PBX user will be considered as the “User” of the call.
- If #2 is not applicable and the caller is a Brekeke PBX user, the caller will be considered as the “User” of the call.
- If none of the above is applicable, no user will considered as the “User” of the call.
The [Plugin], [Param] and [Return] fields are used only when you want to extend the matching conditions using a JAVA plug-in. Please refer to “ARS Plug-in Developer’s Guide” for more information.
3. Deploy Patterns
This is similar to the [Deploy Patterns] fields in the Dial Plan, however, there are several important differences:
- In ARS rules, numbers follow the “$” sign in [Deploy Patterns]. (Use “%” in the Dial Plan.)
- Conversion of a From header that matches in [Matching Patterns] is done as described in [Deploy Patterns] for the From header. Conversion of a To header is done as defined in [Deploy Patterns] for the To header, DTMF and Target field. (In Dial Plan rules, multiple lines can be defined in the [Matching Patterns] and [Deploy Patterns] fields, which are processed simultaneously.)
- By using &f<n>, &t<n> or &u<n> in the [Deploy Patterns] field, it is possible to use a value in parenthesis of some [Matching Patterns] fields. The symbols &f, &t and &u correspond to From, To and User, respectively. For example, &f1 refers to the value in the first parenthesis in [Matching Patterns] > [From].
- If the From or To field is blank, no conversion will be performed. If the DTMF field is blank, no DTMF will be sent. If the Target field is blank, no target IP address will be specified. (In most cases, the call will be routed to the domain specified in the To field.)
4. ARS Templates and Editing Variables
It is possible to create a template in ARS Settings for multiple ARS rules that have the same configuration patterns. In [Running Status], real rules (not template) will be displayed. In the template fields (excluding the [Route name], [Descriptions] and [Parameters] fields), you can use the variables &v1, &v2,…&v9. You can specify real values in [Edit variables].