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

cos

atom

Privilege profile for outgoing calls (code)

cor

atom

Restriction profile for incoming calls (code)

provider

cos

atom

Privilege profile for calls arriving from the external network (code)

vectorrule

call_type

[atom]

Direction types (for example: international, national, local, internal, cross)

restriction_level

integer

Required minimum access level (for implementing the mandatory direction restriction model).

modify_cos

atom

Reassignment of CoS in the current call context. By default '*' leaves CoS unchanged.

featurecode

type

atom

Service type (the field already exists and is set)

2.2. Group policy classes

cor_cos_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 (default all). work and non-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

  1. Determining the initiator CoS into the call context:

    • user → sipuser.opts.cos

    • provider → provider.opts.cos

    • IVR → empty CoS (everything allowed)

  2. Searching for matching routing rules (vectorrule).

  3. Optional CoS reassignment (vectorrule.opts.modify_cos). Applied before checking the policies of the current rule.

  4. Call context CoS empty → the call is allowed by group policy.

  5. Rule filtering:

    1. By restriction_level: if the rule has vectorrule.opts.restriction_level > 0, a CosProfile with a CosProfile.restriction_level value not less than it is required. Otherwise the call is prohibited by group policy.

    2. By call_types: intersection of vectorrule.opts.call_type and CosProfile.call_types (or CosProfile.toll_lists → TollList.call_types, or CosProfile.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.

    3. Rule refusal → move to the next rule in the domain.

    4. 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.

    5. Rule refusal → refuse the subscriber the call.

3.2. featurecode validation

  1. For featurecode additionally:

    1. CosProfile.feature_access vs featurecode.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.

    2. 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.

    3. Refusal → refuse the subscriber the call.

Step Check Source Destination

1

CosProfile.restriction_level >= vectorrule.opts.restriction_level

CoS

VectorRule

2

CosProfile.call_types vs vectorrule.opts.call_type or CosProfile.toll_lists vs vectorrule.opts.call_type

CoS

VectorRule

3

CosProfile.feature_access vs featurecode.type

CoS

FeatureCode

4

CoS vs user(with number from featurecode.postfix).cor (CorPolicy.feature=featurecode.type)

CoS

CoR

5

Standard featurerule validation

—

—

3.3. Cross-domain calls

When passing a call between domains:

  1. The initiator CoS is preserved in the context.

  2. It may be changed by a rule of the receiving domain (modify_cos).

  3. By default it remains the original.

  4. It is matched with the receiving domain CosProfile and checked by the receiving domain policies.

  5. 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.

  1. For transfer to a number:

    1. 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'.

    2. 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.

  1. For redirection to a number:

    1. 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'.

    2. 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.

  1. For creating ad-hoc conferences:

    1. CosProfile.feature_access vs 'adhoc_conference'.

    2. 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

sipuser.opts.cos or empty (everything allowed).

Call from a provider

provider.opts.cos or empty (everything allowed).

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 CorPolicy

Call allowed

CosProfile does not exist

feature_access restrictions are not applied; routing rules with zero access level and unassigned direction are allowed (both are default values).

CosProfile.restriction_level not set

0 (only routing rules with zero access level are allowed (restriction_level = 0 is the default value).

CosProfile.call_types not set

[all] (no call direction is blocked based on code matching).

CosProfile.toll_lists not set

[] (no TollList is assigned).

CosProfile.feature_access not set

[all] (all preset and system-restrictable functions and services are allowed)

CorPolicy.src_cos not set

any

CorPolicy.dst_cor not set

any

CorPolicy.feature not set

any

CorPolicy.action not set

allow

CorPolicy.time_mask not set

all (always active)

CorPolicy.priority not set

1000 (base priority)

TollList.call_types not set

[] (no direction is explicitly set for the list).

TollLink does not exist

Directions with lists are not matched.

TollLink.allow not set

true (the TollList and CallType link is active; CoS holders for whom this TollList is set are allowed the direction call).

vectorrule.opts.call_type not set

Direction is not set; restrictions on rule use based on name matching are not applied.

vectorrule.opts.restriction_level not set

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.

vectorrule.opts.cos_modify not set

* (leaves CoS in the context unchanged)

sipuser.opts.cos not set

The incoming call context from this user is not restricted by CoS/CoR group access policy.

sipuser.opts.cor not set

Calls to this user and subscriber services toward this user are not restricted by CoS/CoR group access policy.

provider.opts.cos not set

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:

  1. Set CoS on the source object.

  2. Set CoR on the destination object.

  3. Create CorPolicy with action: deny for 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

code

restriction_level,

feature_access,

call_types,

toll_lists

CorProfile

code

—

CorPolicy

src_cos,

dst_cor,

feature

priority (1000),

action (allow),

time_mask (all)

toll_list

code

call_types ([])

toll_link

toll_list,

call_type

allow (true))

PolicyCallTypes

code

Validation

  • vectorrule

    • call_type may exist in the PolicyCallTypes reference or be absent there (strict referential integrity within the API is not required).

  • provider

    • cos may exist in the CosProfiles reference (if absent, calls to named directions are blocked when the cos value is set).

  • sipuser

    • cos may exist in the CosProfiles reference (if absent, calls to named directions are blocked when the cos value is set).