Routing rule (vectorrule)
Description
Routing rule for telephone calls and state subscriptions, applied at the second stage of the two-stage routing process (after the vector selection stage).
Rules are analyzed in a strictly defined order corresponding to the priorities of rules within the vector. A rule is analyzed by matching conditions against request parameters, and is applied when all filters pass.
Determines the action and can modify request parameters, preparing them for the next phase of the routing process.
The configured set of vectors and routing rules can be tested through the diagnostic API.
Limitations
-
The collection is unavailable in the master domain.
-
On every call, after the vector is determined at the previous routing step, all rules belonging to the vector are analyzed — request parameters are matched against filter masks. This can negatively affect overall performance with a large number of rules within a vector.
Fields
{
"id": uuid,
"vector": str,
"priority": str,
"action": str,
"dir": str,
"fromnumber": str,
"fromdomain": str,
"fromextaccount": str,
"tonumber": str,
"todomain": str,
"toextaccount": str,
"modfromnumber": str,
"modtonumber": str,
"schedule": str,
"periods": array<object>,
"opts": {
"title": str,
"comment": str
},
"ext": {
"ct": date,
"lwt": date
}
}
| Specification | Description |
|---|---|
Field: |
Identifier. Can be specified at creation, otherwise generated by the system. |
Field: |
Code of the vector this rule belongs to |
Field: |
Rule priority within the vector. If several rules have the same priority, their check and application occur in random order. A lower value means higher priority. |
Field: |
Applied action |
Field: |
Filter based on the call initiator environment |
Field: |
Source number filter mask. |
Field: |
Source domain filter mask. |
Field: |
Filter mask for the provider account code in the current domain. |
Field: |
Destination number filter mask. |
Field: |
Destination number filter mask. |
Field: |
Destination domain to which the routing process should be sent when the corresponding action (cross) is selected |
Field: |
Code of the SIP telephony provider account through which the call should be sent to an external destination when the corresponding action (external) is selected. |
Field: |
Source number modifier. |
Field: |
Destination number modifier. |
Field: |
Modifier of the special value for creating chains. |
Field: |
Defines the rule activity schedule. |
Field: |
Activity interval during the week. |
Field: |
|
Field: |
Arbitrary title |
Field: |
Arbitrary comment |
Field: |
Tabular data for using filters (and modifiers) within one rule search session. |
Field: |
Switch for moving to the next matching rule by priority when applying the current rule fails. |
Field: |
Switch for the redirect option when moving to another domain (for cross-type rules). |
Field: |
Probabilistic rule application coefficient. Example. To make three rules in a group apply with equal probability, they should be assigned adjacent but different priorities. Set the first rule probability to 33.33%, the second to 50%, and the third to 100%. Then the probability of applying the third rule is 1 * (1 - 0.5) * (1 - 0.333) ~ 33.33%. |
Direction code. Used to configure group access restriction policies by direction. If direction application is blocked by policy, routing continues searching among lower-priority rules. More in the article CoS/CoR group access restriction. |
|
Required CoS access level in the call context. Used to configure group access restriction policies by direction. More in the article CoS/CoR group access restriction. |
|
CoS (class of service) group modifier in the call context. The value It is a deeply optional configuration variant, since call restrictions within group policies can be introduced based on the access matrix between CoS and CoR groups of end subscribers. Applying the modifier can have unexpected consequences, for example blocking a call from IVR whose CoS was initially empty (group policy disabled). The modifier is applied first, then group policies are checked based on the already changed CoS value. More in the article CoS/CoR group access restriction. |
|
Field: |
Allows extending the compound with arbitrary keys and values |
Field: |
Object creation time |
Field: |
Time of last modification of the object |
Action
| Value | Description |
|---|---|
|
Reject the call |
|
Route the call to an external account (ESG role); toextaccount must also be specified |
|
Route the call to an internal or group number in the current domain |
|
Route the call to an internal number in the current domain using extension (more) |
|
Route the call to another domain |
|
Route the call to a service determined by subscriber feature codes. The specific feature code is determined by matching the number against featurecode entities in the domain. |
|
Apply number modification rules and re-route based on the new parameters |
Call initiator environment
| Value | Description |
|---|---|
|
The rule can be applied only to calls initiated within the current domain |
|
The rule can be applied only to calls arriving from outside through a provider account in the current domain |
|
The rule can be applied only to calls arriving from another domain |
|
The filter is not applied; the rule is suitable for all call initiator environments |
Filter operation modes
Modifier operation modes
| Mode | Description |
|---|---|
|
The source value passes through the specified modifier character by character with accumulation.
For example,- value: |
|
The substring The table links several filter and modifier fields. Based on sequential filter checks, fewer rows remain in the table, taking detected matches into account. Using the table modifier is allowed in combination with other control commands of per-character mode. |
|
The Pattern template with Opts options is applied to the source value, and the found block(s) are replaced with the Replace template. General structure of the regex modifier value: Options can be omitted or contain any combination of the characters:
For example,- value: When forming the Pattern and Replace templates, all standard regular expression rules can be used, including capture groups, backreferences, named group substitution, etc. |
Work schedule
| Value | Description |
|---|---|
|
The rule is always available for application |
|
The rule is never available for application |
|
The rule is available for application only during working hours |
|
The rule is available for application only outside working hours |
|
The rule defines an individual availability schedule in the rule |
Weekly schedule list element
| Field | Value | Description |
|---|---|---|
|
|
Day of week when the segment starts ( |
|
|
Day of week when the segment ends ( |
|
|
Start time of the segment within the day, in minutes |
|
|
End time of the segment within the day, in minutes |