Representation rule (representative)
Description
Rule for representing a number (and optionally displayname) when calling from one domain to another.
Allows determining which initiator number a subscriber from another domain will see. And accordingly, where the callback will be directed when REDIAL is pressed. Used when organizing a common number plan for several domains.
The representation search process consists of several sequential stages, each of which interrupts the process on success and passes control to the next stage on failure.
(1) A suitable CROSS rule is searched in the called subscriber’s domain.
(2) A suitable INNER rule is searched in the domain of the subscriber who forwarded the call.
(3) A suitable INNER rule is searched in the call initiator’s domain.
(4) A suitable GLOBAL rule is searched in the first-level domain (relative to the call initiator’s domain).
If all stages fail, the number "undefined" is substituted. By default, a rule substituting the initiator number unchanged is automatically added to newly created domains.
Global number plan configuration rules should follow the given sequence of stages.
The configured set of representation rules can be tested through the diagnostic API.
Fields
{
"id": uuid,
"priority": int,
"dir": str,
"ofdomain": str,
"ofusername": str,
"ofnumber": str,
"fordomain": str,
"forusername": str,
"fornumber": str,
"action": str,
"modifier": str,
"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: |
Priority. A lower value means higher priority. |
Field: |
Filter by application direction. |
Field: |
Call initiator domain filter mask. |
Field: |
Call initiator username filter mask. |
Field: |
Call initiator number filter mask. |
Field: |
Called subscriber domain filter mask. |
Field: |
Called subscriber username filter mask. |
Field: |
Called subscriber number filter mask. |
Field: |
Domain filter mask of the subscriber who forwarded the call. |
Field: |
Username filter mask of the subscriber who forwarded the call. |
Field: |
Number filter mask of the subscriber who forwarded the call. |
Field: |
Action determined by the rule. |
Field: |
Source number modifier. |
Field: |
Source name modifier in the DisplayName field. |
Field: |
|
Field: |
Arbitrary title |
Field: |
Arbitrary comment |
Field: |
Tabular data for using filters (and modifiers) within one rule search session. |
Field: |
Allows extending the compound with arbitrary keys and values |
Field: |
Object creation time |
Field: |
Time of last modification of the object |
Filter options by application direction
| Value | Description |
|---|---|
|
The rule applies only at the first stage, in the called subscriber’s domain. Represents accounts of other domains for the current domain. |
|
The rule applies: |
|
The rule applies only at the fourth stage in the first-level domain that is the root relative to the call initiator subscriber’s domain. Makes sense only in first-level domains (relative to the master domain). Represents accounts of arbitrary domains for other domains. |
|
The rule applies at all stages |
Filter operation modes
| Mode | Description |
|---|---|
|
The value being checked is passed through the filter character by character.
If one of the service characters must be specified as a target, it should be enclosed in square brackets, e.g. For example, |
|
The substring
The following can be used as table field values:
Using the table modifier is allowed in combination with other control commands of per-character mode. For example, |
|
The Pattern template is applied to the source value. Structure of the regex template value: For example,- value:
All standard regular expression rules can be used when forming Pattern templates. |
|
"The value being checked is an integer and falls within the specified range of numeric values. Structure of the dia template value: For example,- value: |
Actions
| Value | Description |
|---|---|
|
Applies the representation rule |
|
Interrupts the current search stage and passes control to the next stage |
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. |