Media Gate Controller (mgc)

Description

Controller of a group of media gateways located at the same site.
Managed by Roles by Roles: b2b, conf, ivr, esg. Interacts with media gateways via the MEGACO protocol. The media gateway is the rtx_mg3 application, which is included in the configuration as roles mg and bgmg.

Reserved Active-Passive mode. Scalable within a site by dividing into groups with a dedicated set of media gateways.

Table 1. System Characteristics

Code

mgc

Mode of operation

Service

Backup mode

Active-Passive, Active-Active by group

Types of sites

Any

Layer

Business logic

Placement

Internal

Saving and restoring state on reboot

Yes

appendix

era_mgc

Own storage

ODB Mnesia

Limitations

  • Must be present at all sites with roles mg.

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: "mgc".

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.
Integer from 1 to 9999.

group

int

required

Group Number.
As part of horizontal scaling, a role can be divided into multiple groups on a site, with only one instance active in each group and the rest reserved.
The group includes a collection of media gateways.
In the process of creating a new media context, first the MGC group on the site is selected in a uniformly random way, and then the MG with the smallest number of active media contexts is selected within the group. If one group is unavailable, an attempt is made to create a context in the next group.
Integer from 1 to 9999999.

order

int

required

The order of a role instance within a group.
Determines in what order Active-Passive flow within the group will occur.

port

int

required

Local port TCP MEGACO.
For example: 2954.

local_mg_lower_priority

bool

true

Switch to downgrade the priority of local MG media gateways located on the same server as the currently active one MGC.
During shutdown, local media gateways participate equally with other media gateways.
Enabled by default - local media gateways are used only if no other media gateways are found capable of serving the new context.
It is used in multi-server systems to preferentially disperse the responsibility for handling a call across different servers.

mnesia_storage_mode

str

disc "Mode of operation of object storage.

Possible options:

* disc - full mode

in RAM with saving to disk on all instances of the group.

  • ram - only in RAM (with support for distributed

transactional). If all instances of the group are rebooted/shut down simultaneously

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": "mgc1",
  "roletype": "mgc",
  "iface": "eth0",

  "roleid": 11290,
  "separate": true,
  "group": 3,
  "order": 2,
  "port": 2954
}

See also