CoS/CoR group access separation
Introduction
Goal: compact configuration of group access and restrictions on telephone calls without increasing the number or size of routing rules.
-
Permission to make calls to certain directions (international, long-distance, local, mobile, different providers, etc.)
-
Configuring prohibition of calls between subscriber groups.
-
Group permission of certain subscriber features.
Entity classes are added to reduce the coupled complexity of mass configuration.
User accounts get binding to CoS and CoR groups, and an access matrix between groups is configured. The CoS profile gets access to call directions and service features.
This configuration method is optional and may not be applied if there is no corresponding need. By default there is no configuration and the group access policy is not applied.
1. General principles
The system is based on separation of privileges and restrictions:
-
CoS (Class of Service) — determines what is allowed to the call initiator (user, provider).
-
CoR (Class of Restriction) — determines who can reach the destination object (user, routing rule, service).
-
Policy — a single permission table determining the availability of communication between CoS and CoR groups.
-
Toll List — can determine which call directions are allowed (restricts the corresponding routing rules).
-
Toll Link — a matrix of links between Toll List and call directions.
Basic rule: If properties are not set — access is open. Restriction applies only with explicit configuration.
2. Data model
2.1. Changes in accounts and rules
| Entity | Field | Type | Purpose |
|---|---|---|---|
sipuser |
|
|
Privilege profile for outgoing calls (code) |
|
|
Restriction profile for incoming calls (code) |
|
provider |
|
|
Privilege profile for calls arriving from the external network (code) |
vectorrule |
|
|
Direction types (for example: international, national, local, internal, cross) |
|
|
Required minimum access level (for implementing the mandatory direction restriction model). |
|
|
|
Reassignment of CoS in the current call context. By default '*' leaves CoS unchanged. |
|
featurecode |
|
|
Service type (the field already exists and is set) |
2.2. Group policy classes
Class: CosProfiles
Privilege profile of the subscriber initiating the call.
-
code(atom) — Unique code in the domain (required). -
restriction_level(integer) — Access level of the current CoS group for implementing the mandatory direction separation model. -
call_types([atom]) — List of explicitly allowed call directions (for example: international, national, local, mobile, internal, or all). -
toll_lists([atom]) — List of connected toll lists, each of which in turn contains directions or is linked to directions via the link matrix. Can be used to configure schemes with a large variety of separated directions (a small change is implemented by a small modification). -
feature_access([atom]) — List of service features available for restriction (possible options: pickup, grouppickup, intercom, barge, voicemail, parking, replace, monitor, prompt, mesh, adhoc_conference, or all). -
comment(string) — Arbitrary comment.
Class: CorProfiles
Protection profile of the subscriber receiving the call.
-
code(atom) — Unique code in the domain (required). -
comment(string) — Arbitrary comment.
Class: CorPolicies
Matrix of service access policies between subscriber groups.
-
src_cos(atom) — Source CoS code (required). The value 'any' covers any CoS value in the call context except an empty value. -
dst_cor(atom) — Destination CoR code (required). The value 'any' covers any CoR value except an empty value. -
feature(atom) — Checked restricted function from source to destination (possible options: call, call_redirect, call_forward, callwaiting, pickup, intercom, barge, replace, monitor, prompt, mesh, any). The value 'any' covers any function. -
priority(integer) — Rule priority (default 1000). Applied when several rules with different application conditions match. -
time_mask( all | work | non-work | atom ) — Time profile (defaultall).workandnon-work— domain working and non-working time on the communication layer. Other values — product layer schedule code in the domain. -
action(allow | deny) — Record action type (required). -
comment(string) — Arbitrary comment.
Class: TollLists
List of simultaneously allowed call directions (for configuring schemes with a large variety of separated directions).
-
code(atom) — Unique Toll list code in the domain (required). -
call_types([atom]) — List of allowed call directions (for example: international, national, local, mobile, internal, or all). -
comment(string) — Arbitrary comment.
Class: TollLinks
Matrix of two-way links between TollList and CallType (for configuring schemes with a large variety of separated directions).
-
toll_list(atom) — TollList code in the domain. -
call_type(atom) — CallType code in the domain. -
allow(boolean) — true is expected, i.e., the link between the specific TollList and the specific CallType is established. -
comment(string) — Arbitrary comment.
2.3. Group policy reference data
| Reference | Type | Purpose |
|---|---|---|
PolicyCallTypes (for vectorrule.opts.call_type, CosProfile.call_types, TollList.call_types, TollLink.call_type) |
Read-Write |
Examples: all, local, national, international, internal, mobile, … |
Important: References are used for convenient value substitution in the interface.
There is no error if the 'cos' or 'cor' value is assigned directly in sipuser, provider, and CorPolicy objects, even if it is absent from the CosProfiles and CorProfiles references.
|
3. Call validation algorithm
3.1. General sequence
-
Determining the initiator CoS into the call context:
-
user →
sipuser.opts.cos -
provider →
provider.opts.cos -
IVR → empty CoS (everything allowed)
-
-
Searching for matching routing rules (
vectorrule). -
Optional CoS reassignment (
vectorrule.opts.modify_cos). Applied before checking the policies of the current rule. -
Call context CoS empty → the call is allowed by group policy.
-
Rule filtering:
-
By
restriction_level: if the rule hasvectorrule.opts.restriction_level> 0, a CosProfile with aCosProfile.restriction_levelvalue not less than it is required. Otherwise the call is prohibited by group policy. -
By
call_types: intersection ofvectorrule.opts.call_typeandCosProfile.call_types(orCosProfile.toll_lists→TollList.call_types, orCosProfile.toll_lists→TollLinks.{toll_list, call_type}). Applied if 'vectorrule.opts.call_type' is set. If there is no intersection the call is prohibited by group policy. -
Rule refusal → move to the next rule in the domain.
-
By matrix:
CorPolicy(src_cos, dst_cor, 'call'), where dst_cor is the owner user of the dialed number, FeatureType=call. Applied if the called subscriber is a system user and their 'sipuser.opts.cor' is set. -
Rule refusal → refuse the subscriber the call.
-
3.2. featurecode validation
-
For featurecode additionally:
-
CosProfile.feature_accessvsfeaturecode.type, where FeatureType: pickup, grouppickup, monitor, prompt, mesh, voicemail, parking, replace, barge, intercom.. Applied if the 'CosProfile' object exists, otherwise use of the service featurecode is not restricted directly by group policy. -
CorPolicy(src_cos, postfix/extension dst_cor, featurecode.type), where dst_cor is the owner user of the dialed number, FeatureType: callwaiting, pickup, intercom, barge, replace, monitor, prompt, mesh. Applied if the service number postfix is a system user number and their 'sipuser.opts.cor' is set. -
Refusal → refuse the subscriber the call.
-
| Step | Check | Source | Destination |
|---|---|---|---|
1 |
|
CoS |
VectorRule |
2 |
|
CoS |
VectorRule |
3 |
|
CoS |
FeatureCode |
4 |
|
CoS |
CoR |
5 |
Standard featurerule validation |
— |
— |
3.3. Cross-domain calls
When passing a call between domains:
-
The initiator CoS is preserved in the context.
-
It may be changed by a rule of the receiving domain (
modify_cos). -
By default it remains the original.
-
It is matched with the receiving domain
CosProfileand checked by the receiving domain policies. -
The call is allowed or prohibited by group policy on a common basis in the receiving domain, as if this call were initiated inside the domain.
3.4. Transfer to a number
Applied in one-step transfer to a number (without leg substitution) if the target number for transfer is a system user number and 'sipuser.opts.cor' is set for it.
-
For transfer to a number:
-
CorPolicy(src_cos, dst_cor, 'call_forward'), where src_cos is the transfer initiator, dst_cor is the owner user of the number for transfer, feature='call_forward'. -
Group policy refusal → refuse the subscriber the transfer.
-
3.5. Redirection to a number
Applied when any kind of redirection is detected, if the target number for redirection is a system user number and 'sipuser.opts.cor' is set for it.
-
For redirection to a number:
-
CorPolicy(src_cos, dst_cor, 'call_redirect'), where src_cos is the redirection owner, dst_cor is the owner user of the destination number, feature='call_redirect'. -
Group policy refusal → stop initiating a new fork to the redirection number.
-
3.6. Creating an ad-hoc conference
Applied when calling the ad-hoc conference factory number (at the moment of creating an ad-hoc conference, not connecting to an existing one), if the 'CosProfile' object exists.
-
For creating ad-hoc conferences:
-
CosProfile.feature_accessvs 'adhoc_conference'. -
Group policy refusal → refuse the subscriber the call without creating an ad-hoc conference.
-
4. Determining the initiator CoS
| Scenario | CoS in context |
|---|---|
Call from a user |
|
Call from a provider |
|
Call from IVR |
Empty CoS (everything allowed). |
Call transfer |
CoS of the transferring subscriber |
Redirection |
CoS of the redirecting subscriber |
Cross-domain |
Initiator CoS. May be changed via vectorrule.opts.modify_cos |
| A routing rule can change 'cos' in the context of any call, including assigning 'cos' for a call from IVR. |
5. Default behavior
| Situation | Result |
|---|---|
Properties not set (cos, cor, call_type) |
Everything allowed |
cos-cor pair not found in |
Call allowed |
|
feature_access restrictions are not applied; routing rules with zero access level and unassigned direction are allowed (both are default values). |
|
0 (only routing rules with zero access level are allowed ( |
|
[all] (no call direction is blocked based on code matching). |
|
[] (no TollList is assigned). |
|
[all] (all preset and system-restrictable functions and services are allowed) |
|
any |
|
any |
|
any |
|
allow |
|
all (always active) |
|
1000 (base priority) |
|
[] (no direction is explicitly set for the list). |
|
Directions with lists are not matched. |
|
true (the TollList and CallType link is active; CoS holders for whom this TollList is set are allowed the direction call). |
|
Direction is not set; restrictions on rule use based on name matching are not applied. |
|
0 The minimum access level available to everyone by default is required. That is, the restriction on rule use based on the mandatory model is not applied. |
|
* (leaves CoS in the context unchanged) |
|
The incoming call context from this user is not restricted by CoS/CoR group access policy. |
|
Calls to this user and subscriber services toward this user are not restricted by CoS/CoR group access policy. |
|
The incoming call context from this account is not restricted by CoS/CoR group access policy. |
The absence of CosProfile with a set cos for a user means prohibition of all directions (routing rules) for which call_type or a non-zero restriction_level is set.
An empty CosProfile.feature_access list means prohibition of all preset restrictable functions and services.
Empty CosProfile.call_types and CosProfile.toll_lists lists mean prohibition of all configured directions for which call_type is set.
6. Minimum required configuration
To restrict access of calls and service functions between subscriber groups, the minimum is:
-
Set CoS on the source object.
-
Set CoR on the destination object.
-
Create CorPolicy with
action: denyfor the pair.
To restrict access by call direction, the minimum is:
. Set CoS on the source object.
. Create CosProfile with a limited call_types list AND/OR a limited access level restriction_level.
. Assign to the vectorrule routing rule the direction code call_type AND/OR the minimum access level restriction_level.
7. Requirements for new entities
| Entity | Required fields | Optional fields |
|---|---|---|
CosProfile |
|
|
CorProfile |
|
— |
CorPolicy |
|
|
toll_list |
|
|
toll_link |
|
|
PolicyCallTypes |
|
Validation
-
vectorrule-
call_typemay exist in thePolicyCallTypesreference or be absent there (strict referential integrity within the API is not required).
-
-
provider-
cosmay exist in theCosProfilesreference (if absent, calls to named directions are blocked when thecosvalue is set).
-
-
sipuser-
cosmay exist in theCosProfilesreference (if absent, calls to named directions are blocked when thecosvalue is set).
-