Mixer (mix)

Description

Provides preparation, packaging, linking and posting of call recording files based on system events. Placement is done in a shared repository (Localpaths - recstore), from where records are then distributed to domain repositories by the role recmover.

Reserved and scaled in mode Active-Active.

Organizes the startup and monitoring of the rtx_mixer application process in the operating system, which actually performs media processing.

Initiates the process of moving the record to domain stores.

Table 1. System Characteristics

Code

mix

Mode of operation

Service

Backup mode

Active-Active

Types of sites

Any

Layer

Business logic

Placement

Internal

Saving and restoring state on reboot

No

appendix

era_mix

Managed application

rtx_mixer

Limitations

  • Creates a dense CPU load at the time the mixdown is performed. When sharing a server with other roles, you should seriously limit the number of threads that can be used by a role, otherwise there is a risk of 100% CPU utilization on the server.

  • Mixing is performed in a process with minimum priority.

  • It is necessary to provide such an amount of processing power for a role on the site that, on an average day, all instances of the role have time to pack all conversations taking place on the site.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and numbers, must begin with a letter.

roletype

str

required

Role Type. Possible values: "mix".

iface

str

required

The alias of the server network interface on which the roles will interact internally with each other.

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.

roleid

int

required

Role ID. Unique for the entire system, regardless of the site or server.
Cannot be changed after assignment. Integer from 1 to 9999

separate

bool

required

An indication that the role has been allocated to a separate node.

recstorageid

str

required

A directory alias on the server for storing conversation recordings.
If the directory does not exist, it will be created.
When the role recmover is running, records from the shared repository are moved to domain repositories. By default, the domain record repository is a subdirectory of the shared record storage directory.
Depending on whether you configure the transfer of entries to domain storage outside the cluster (e.g., S3 storage), the placement of entries in the catalog can be short-term, or long-term with accumulation.
Value format: alias://paths/<ALIAS_NAME>.

cachefolder

str

empty

Directory alias of the directory on the server to host the mixer service files.
If the directory does not exist, it will be created.
Default: "/var/lib/era/_workdir/<NODE_NAME>"

channels

int

2

The number of channels in the file after mixing.
Can only be changed for mp3 and mp3 formats pcm.
Possible values:

  • 1 – mono,* 2 – stereo.

encoding

str

"mp3"

The format in which the audio recording file will be packaged after mixing.
Possible values: "mp3", "pcm", "pcma", "pcmu", "gsm".

maxevents

int

8

The maximum number of events that a role can receive from all queues in a single iteration.
By default, a value equal to the number of available logical processors is taken, but if an error occurs during the definition, the default is taken: 8.

samplerate

int

8000

Sampling Frequency.
It is possible to change only for the formats mp3 and pcm.
Possible values for mp3 and pcm: 8000, 16000, 32000.

Configuration example

The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.

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

Example node
{
  "name": "mix1",
  "roletype": "mix",
  "iface": "eth0",

  "roleid": 11200,
  "separate": false,

  "recstorageid": "main4",

  "channels": "2",
  "encoding": "mp3",
  "samplerate": "8000"
}

See also