Recording rules (recordrule)

Description

The rule of thumb for the application of a telephone call recording.
Applies at the time of connection after a successful call, when the parties to the dialog have been identified.

In a single phone call, participants can belong to different domains.
The process of deciding on an entry consists of
(1) Identifying call participants and their domains and preparing search parameters.
(2) Definition of a write rule in the initiator domain.
(3) In the case of a cross-domain call, defining a record rule in the domain of the called party.
(4) Making a record decision based on a favorable record decision in at least one of the domains.
By default, conversations are not recorded.

Records are stored in domain-specific repositories. Options:
* NFS a folder attached to the NFS server and connected as a volum in the system container. During installation, the file 'rshare.sign' is placed in this folder to indicate the availability of the server.
* Under the same conditions, if the folder is not NFS-connected, it is hosted locally on a server with the role recmover. When accessing the file, all servers where instances are active are searched recmover.
* in S3 storage (if storage is created and configured for such in the domain, and its code from the field is specified in the record rule) 'instance').

Also allows you to customize the recording by siprec (RFC-7866), streamed_call_rec, mixed_call_rec.

Limitations

  • The collection is not available in the master domain.

Fields

Entity structure
{
  "id": uuid,
  "priority": int,
  "dir": str,
  "fromnumber": str,
  "tonumber": str,
  "crossdomain": str,
  "rec": intbool,
  "storageruleid": uuid,
  "schedule": str,
  "periods": array<object>,
  "opts": {
    "title": str,
    "comment": str
  }
  "ext": {
    "ct": date,
    "lwt": date
  }
}
Table 1. Fields
Specification Description

Field: id
Mode: inout
Type: uuid
Default: generated

Identifier. Can be specified at creation, otherwise generated by the system.

Field: priority
Mode: in
Type: int
Default: required

Priority. A lower value means a higher priority.

Field: dir
Mode: in
Type: str
Default: `"*"`", "Filter by call direction.

Field: fromnumber
Mode: in
Type: str
Default: "*"

Call initiator number filter mask.
Filter operation modes.

Field: tonumber
Mode: in
Type: str
Default: "*"

Caller Filter Mask.
Filter operation modes.

Field: crossdomain
Mode: in
Type: str
Default: "*"

Other domain filter mask.
Applies only in the course of servicing cross-domain calls.
Filter operation modes.

Field: rec
Mode: in
Type: intbool
Default: required

Turns off the default recording mode by platform means. Subscriber channels are recorded separately, mixed according to the microservice settings mixer in the configuration, transferred to domain stores.
1 – to record, 0 to not record.
In case a cross-domain call in both domains detects different actions, the record is made but does not reach the domain that refused the record.

Field: siprec
Mode: in
Type: intbool
Default: false

Recording mode switch via siprec (RFC-7866).
1 – to record, 0 to not record.
In case a cross-domain call in both domains detects different actions, siprec calls are made only according to the settings of the domain that requested the record.
Learn more about mode settings 'siprec'.

Field: streamed_call_rec
Mode: in
Type: intbool
Default: false

Switches the recording mode by means of two SIP calls, where the first one broadcasts the channel of the initiating subscriber and the second one broadcasts the channel of the called subscriber.
1 – to record, 0 to not record.
If a cross-domain call in both domains detects different actions, calls are only made according to the settings of the domain that requested the record.
Learn more about mode settings 'streamed_call_rec'.

Field: mixed_call_rec
Mode: in
Type: intbool
Default: false

Turns off the recording mode via SIP call broadcasting a mixed dialog of two subscribers.
1 – to record, 0 to not record.
If a cross-domain call in both domains detects different actions, calls are only made according to the settings of the domain that requested the record.
Learn more about mode settings 'mixed_call_rec'.

Can also be used by security personnel.
In this case, the employee’s device account should be specified as the recording server, and the device itself should be allowed to accept arbitrary incoming calls, since the call will be sent bypassing routing and registration path.

Field: storageruleid
Mode: in
Type: guid
Default: required

NOT USED. The repositories are cleaned by external means. For convenience, all records are placed in catalogs with dates.

A rule for storing call recordings placed in the domain storage.
Applies only if rec = 1 (recorded by media gateway).

Field: storagekey
Mode: in
Type: str
Default: empty

Code file storage of the current domain (field 'instance') to host conversation records.
This file storage will host the conversation recording generated by the media gateway (if the recording rule has the option enabled) 'rec').

If the file storage code is not specified, the file storage whose code is specified by the domain parameter is used 'default_rec_storagekey'.

If the file storage code is not specified either there or there, it is taken to be equal to 'record'.
If no code is specified, or a storage with such a code is not found in the domain, or it is of an inappropriate type, the conversation record is placed in the default storage.

The default storage is a folder where the mixer places generated call recordings.
This is a folder in the file system defined by the system configuration (can be an NFS folder, or a local folder in a container with the platform mounted in a folder in the host when the platform is installed on the server, or if not properly configured, a folder in the container).
The mixer role configuration parameter 'recstorageid' specifies the key by which the server configuration parameter 'recstorepaths' specifies the 'alias' of a directory in the server/container file system.
The default for standard configurations and install via installer is the /var/lib/era_files/recpath folder in the container, and it is a docker-volume, that is, a folder in the host of the respective server.

The Mixer role places the file in the specified folder. If it is an NFS client, all servers and roles in the multi-server platform have direct network access to this folder through an identical setting in the configuration. If the folder is not an NFS client, the entry is placed locally only on the server where the mixer is executed.
The role Recmover then moves the record to the domain stores. Depending on the configuration, the source file from the mix result directory may be deleted.
If necessary, recmover downloads the file from another server (in the absence of NFS configuration) and places it locally at the same logical address bound by the configuration to its own server by setting up aliases.
If recmover places the file in the default storage (domain storage for call recordings), and no NFS is used, the recording ends up only on the server where it was executed recmover.

Further retrieval of records is performed with a search in the connected file storages based on a special link containing the storage code.
And in case the record was placed in the default record repository, the link contains the directory key for records from the configuration applied by the mixer.
Including when NFS is not configured, a search will be performed on all servers where records may have ended up in local folders.
It does not matter from a record retrieval point of view whether the folder is a volum (mounted in the host).

To mount a new disk/partition to an existing container, you can use instructions.

Field: speechanalytics
Mode: in
Type: bool
Default: false

Speech analytics calculation switch.
In case of media gateway recording (if the recording rule has the 'rec' option enabled), the mixer performs speech analysis of the conversation after preparing the stereo recording.

The result of speech analysis is placed in the callevents.call_rec_links event in the field speechinfo, and as a consequence in the events ccsevents.connection_set_record_info, in the conversation archives generated by the product layer.

The settings of the speech analyzer operation modes are set in the master-domain parameters speech_analytics_options.

Field: schedule
Mode: in
Type: str
Default: "all"

Field: periods
Mode: in
Type: array<object>
Default: empty

Activity interval during the week.
Applies in mode schedule = custom.
Each item in the list covers a specific segment within the week: from time on a particular day of the week to time on another particular day of the week.
Based on the aggregate of these segments, an overall schedule is generated.
Weekly schedule list item.

Field: opts
Mode: in
Type: object
Composite field

Field: opts.title
Mode: in
Type: str
Default: empty

Arbitrary header

Field: opts.comment
Mode: in
Type: str
Default: empty

Arbitrary comment

Field: ext
Mode: inout
Type: object
Compound field

Allows you to extend the compound with arbitrary keys and values

Field: ext.ct
Mode: out
Type: date
Default: generated

Object creation time

Field: ext.lwt
Mode: out
Type: date
Default: generated

Filter options by call direction

Table 2. Filter options by call direction
Value Description

"inner"

The rule can only be applied to intra-domain calls where both parties are subscribers of the current domain

"incoming"

The rule can only be applied to cross-domain calls where the called party is a subscriber of the current domain

"outgoing"

The rule can only be applied to cross-domain calls where the initiating party is a subscriber of the current domain

"*"

The rule can be applied to all calls where at least one of the parties is a subscriber in the current domain

Filter operation modes

Table 3. Filter operation modes
Mode Description

Posymbolic

The value to be subjected to the conformance check is passed through the filter character by character.
The following special characters and combinations may be used:

  • X – any character;

  • ? - any character;

  • * – all remaining characters;

  • {F} and {f} is the entire From username value;

  • {T} and {t} is the entire To username value;

  • {E} and `{e}' is an empty value.

If it is necessary to specify one of the service characters as a target character, it should be enclosed in square brackets, e.g. [X].

For example, XX[X] is any three-character value, with X at the end.

Regex

The pattern is applied to the original value Pattern.

The structure of a regex pattern value:
/reg/Pattern1.

For example,- significance: "302"
- mask: "/reg/0"
- Result: true.

  • significance: "302"

  • mask: "/reg/^0$"

  • Result: false.

  • significance: "302"

  • mask: "/reg/^302$"

  • Result: true.

  • significance: "302"

  • mask: "/reg/^(301|302|305)$"

  • Result: true.

All standard regular expression rules can be applied when forming Pattern patterns.

Range

The value subject to compliance checking is a numeric integer and is within the specified numeric range.

The structure of the dia-template value:
/dia/FromValue+N - fall under the pattern of N+1 values from FromValue to FromValue+N.

For example,- significance: "302"
- mask: "/dia/300+10"
- Result: true.

Work schedule

Table 4. Work schedule
Value Description

"all"

The rule is available for use at all times

"disabled"

The rule is not available for use ever

"work"

The rule is available for use only during business hours

"non-work"

The rule is only available for use outside of business hours

"custom"

The rule defines the individual availability schedule in the field periods

Weekly schedule list item

Table 5. Weekly schedule list item
Field Value Description

daystart

17

Day of the week of the start of the segment (1 - Mon, 7 - Sun)

daystop

17

Day of the week of the end of the segment (1 - Mon, 7 - Sun)

timestart

01440

Intraday segment start time in minutes

timestop

01440

Intraday segment end time in minutes

See also

Logical roles

  • b2b conducts the application of recording rules and recording initiation.

  • recmover applies the record rule from the event originally generated in b2b when distributing call records across domains.