Media Gate (mg)
Description
A media gateway that closes media streams.
Managed by the mgc role via protocol MEGACO. Each media context is managed by one of the roles: b2b, conf, ivr, esg.
Redundant and scalable in Active-Active mode and additionally by group distribution mgc.
Organizes the startup and monitoring of the rtx_mg3 application process in the operating system that actually handles media traffic.
Code |
|
Mode of operation |
|
Backup mode |
|
Types of sites |
|
Layer |
|
Placement |
|
Saving and restoring state on reboot |
|
appendix |
|
Managed application |
|
Limitations
-
Must be present on all sites with b2b roles when used in media processing system (option "b2bmedia" in roles sg, esg, ivr, conf).
-
Port settings should not overlap with other roles on the server.
-
For full cross-site operation of the system, it is necessary that all instances of mg roles serve traffic on those network interfaces from which the same addresses of all other mg and bgmg roles are reachable. Otherwise, cross-site calls may not be possible.
-
The bandwidth of network interfaces serving media traffic and network connections must be matched to the possible peak load and the codecs used. For example, 200 telephone conversations in PCMA codec (G.711 a-law) require a bandwidth of at least 20 Mbit/s each way at the narrowest point. When serving more conversations and distributing them to different servers with media gateways, it is necessary to provide adequate bandwidth on the network devices that aggregate the traffic.
-
Traffic always follows the shortest route: device A - media gateway - device B (at the logical layer excluding all intermediate network devices). But in some cases, devices A and B may be other media gateways serving the media contexts of conferences and IVR. In a separate case, when interconnecting different subnets on the sg and esg border roles, media gateways can act as the A and B devices of a role bgmg.
-
It is possible to work on several interfaces, and the parameters `aliases` and `termportranges` are specified. Specifying a pair of parameters (`aliases`, `termportranges`) and a pair (`rtpiface`,`termportrange`) at the same time is prohibited.
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
|
required |
Name. May consist of Latin letters and numbers, must begin with a letter. |
|
|
required |
Role Type. Possible values: |
|
|
required |
The alias of the server network interface on which the roles will interact internally with each other. |
|
|
empty |
Additional role options. Contains a json object or list. |
|
|
empty |
Role activity flag. When set to false, the role does not participate in validation and is not started. |
|
|
required |
Role ID. |
|
|
required |
An indication that the role has been allocated to a separate node. |
|
|
|
The mgc group to which the current one belongs mg. |
|
|
required |
Local port TCP MEGACO. |
|
|
empty |
List of codecs in use. Restricts the use of externally issued codecs. |
|
|
empty |
Alias of the directory on the server for storing certificates (server.crt and server.key). |
|
|
empty |
Password for decrypting the certificate’s secret key file. |
|
|
|
An indication that call recordings have been saved. |
|
|
empty |
The alias of the directory on the server to host the conversation recordings. By default, the directory is used: "/var/lib/era/files/records" |
|
|
empty |
The range of RTP ports that this role instance will use. |
|
|
empty |
Directory alias of a directory on the server to host log files. |
|
|
|
Logging Level. The value must be a list of one element. Possible values of the element:
In previous versions, the list could contain flags: Possible values:
|
|
|
|
Maximum total size of log files for one day, in MB. When the limit is reached, logging stops pending deletion, including automatic time-based deletion. |
|
|
|
Maximum size of a single log file, in MB. |
|
|
|
Packet-based statistics logging switch RTCP. |
|
|
|
Interval for dumping data from the cache to the original call recording file, in milliseconds. |
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.
{
"name": "mg11",
"roletype": "mg",
"iface": "eth0",
"roleid": 11300,
"separate": true,
"port": 2945,
"mgcgroup": 3,
"codecs": ["PCMA", "PCMU"],
"logpartsize": 10,
"logtrace": [
"warning"
],
"mgrecordcalls": "alias://paths/b",
"recdumpinterval": 3000,
"rtcpmonitor": true,
"termportrange": "10000:2000"
}