Record Mover (recmover)

Description

Role for moving call recordings across domain storages. Intercepts recording mixing completion events and moves recordings according to recording rules into the file storages of the corresponding domains.

Made redundant in Active-Passive mode. Scaled by splitting the domain tree.

Initiates the transcription process upon completion of its own operation. Also generates the callevents.records_moved message.

The Message Broker is required in the configuration.

Table 1. System characteristics

Code

recmover

Operation mode

Service

Redundancy mode

Active-Passive

Site types

Any

Layer

Business logic

Placement

Internal

State preservation and recovery on restart

Yes

Application

era_recmover

Own storage

ODB Mnesia

Limitations

  • A S3 storage specified by a recording rule can act as the domain file storage. By default, the domain recording storage is a subdirectory inside the common directory where data is placed after mixing (the mix role).

  • If the storage is unavailable, the placement task is saved in a buffer. The buffer is shared by all system domains. The buffer size is 100 thousand tasks. Each task is stored in the buffer for 24 hours after mixing. Retry attempts are made approximately every 10 minutes, but in queue order.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and digits and must start with a letter.

roletype

str

required

Role type. Possible values: "recmover".

ext

json

empty

Additional role options. Contains a JSON object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

limit_of_cores

int

empty

Limit on the number of CPU logical cores used. Default: 0 - unlimited.

logging_default_level

int

empty

Default logging level set specifically for the role instance (microservice type). More

allow_divergence

bool

false

Flag allowing parameter differences in roles of the same group. Default: false - not allowed.

group

int

required

Group number.
Horizontal scaling within a site is not supported. All role instances on the site must have the same value.
An integer from 1 to 9999999.

order

int

required

Order of the role instance within the group.
Determines the order in which takeover occurs in Active-Passive mode.

intervalerrsec

int

60

Interval until the next iteration in case of an error, in seconds.
Counted after the current iteration finishes with an error.
Possible values from 1 to 86400.

intervalsec

int

300

Interval between copy operations (from completion of the previous to start of the next), in seconds.
Possible values from 1 to 86400.

mode

str

"move"

Mode of handling recordings as a data provider. Possible values:

  • "copy" – files are copied to domain storages and remain in the common site storage.

  • "move" – files are copied to domain storages and then deleted from the common site storage.

mnesia_storage_mode

str

disc

Object storage operation mode.
Possible values:

  • disc - full mode, in RAM with disk persistence on all group instances.

  • ram - RAM only (with distributed and transactional support). If all group instances restart or shut down simultaneously, data is lost.

  • disc_only - disk only (noticeably less performant but saves RAM).

takeover

bool

global

Takeover mode switch.

Failover - activation of a lower-priority service instance when the higher-priority service instance (leader of the active-passive group) is detected as unavailable.
Takeover - activation of the higher-priority service instance (leader of the active-passive group) during its recovery, accompanied by stopping the service on the lower-priority service instance.

  • If the mode is enabled, takeover is performed automatically.

  • If the mode is disabled, takeover is not performed; the recovered group leader temporarily becomes a follower and waits for the service to be unloaded on the lower-priority instance.

  • If the option is not set, its value from the current site parameters is used. If it is not set on the site, the value from the general section is used. If it is not set anywhere, takeover is enabled for more accurate load distribution according to the configured priorities.

default_recstorageid

str

empty

Configuration code of the call recording storage on the server (server.recstorepaths.key), which in turn contains an alias of the server directory for storing call recordings by default.
First, the mixer places the result in the disk storage with the recstorageid specified in its configuration. RecMover copies/moves the recording from there to the storage of a specific domain.

If a recording rule assigns a specific existing storage in the domain, the call recording in that domain is placed there, and this parameter is not used.
If the recording rule does not specify a storage, or points to a nonexistent storage, the call recording in that domain is stored in the disk storage (possibly NFS) whose recstorageid is set by this parameter.
If the parameter is not set or is empty, the same section where the mixer placed the recording is used, only in the domain subdirectory.

If the directory does not exist, it is created.

Configuration example

Configuration management is performed in an application available to master domain administrators. The application hides the full configuration content, but it is still available through the API.

The configuration contains a section describing all instances of all roles. Parameters are defined for each specific role instance.

Node example
{
  "name": "recmoverl1",
  "roletype": "recmover",

  "group": 11210,
  "order": 1,

  "intervalerrsec": 30,
  "intervalsec": 30,
  "mode": "copy"
}

See also