External SIP Gate (esg)
Description
Access point to the cluster via SIP for external devices - telephony providers, gateways and upstream and peer-to-peer PBXs that are in an external number plan not managed by the system. All work is based on the accounts of SIP providers. For docking the internal number plan with peer-to-peer and upstream PBXs and providers, the CallerId conversion rules and CalledId (provider_callerid).
Processes requests in the user-agent. One arm is always the external subscriber, the other arm is always the internal server with the role of b2bua.
Media Gateway applies when a call is associated with a provider account that has the option enabled "media".
Is a boundary role for the interface SIP.
Protects the cluster from unwanted external requests using boundary filters based on static rules and dynamic lists of temporarily banned addresses.
Can use the bgmg role to address the issue of docking different networks. Media gateway via the bgmg role is applied automatically when multiple network interfaces are detected and when proxying a request from one subnet to another.
For the mode to function properly, the server with the esg role must have one or more instances of the bgmg role with non-overlapping port settings.
Reserved and scaled in mode Active-Active.
Each provider account is assigned to a specific instance of the esg role running at one of the sites where the domain is served.
Read more about working with telephony providers.
Code |
|
Mode of operation |
|
Backup mode |
|
Types of sites |
|
Layer |
|
Placement |
|
Saving and restoring state on reboot |
|
appendix |
|
Limitations
-
REFER and INVITE+Replaces requests are always processed mirrored, that is, within the direction from which the request is received.
-
Is an edge role, uses a TLS certificate for HTTPS and WSS connections.
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. |
||
|
required |
Local UDP port for SIP. The same port handles both TCP. |
|||
|
required |
Local TCP port for SIP. If a value other than UDP is specified, it will be raised additionally. |
|||
|
empty |
Local port for tls connections. Does not open by default. |
|||
|
empty |
Local port for SIP interaction with other system microservices (UDP/TCP). |
|||
|
|
A list of server interfaces on which port listeners are raised. For sg, esg, redirect roles executed on the same server, the same values can be specified as external ports (udp,tcp,tls,wss) if their list of listened interfaces do not overlap. The original interface of the current node with port 'sip_internal_port' is always added to the list of listened interfaces, which should not be used by other microservices on the same server.
|
|||
|
|
Switch for logging events to log |
|||
|
|
Media function logging switch |
|||
|
|
Switch for logging the communication protocol with the MGC controller to the logger |
|||
|
|
Switch for logging dialog state machine trace to logs |
|||
|
|
SIP traffic logging switch to log |
|||
|
|
By default, SDP-offer for unencrypted media stream (rtp) is sent to TLS-connected addresses when initiating calls. You can use the parameter to enable SDP-offer initiation with encrypted media stream for TLS addresses. |
|||
|
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. |
|||
|
`["PCMA/8000", "PCMU/8000" "telephone-event/8000"]` |
List of audio codec names used for call initiation (shoulder call). As value - a list containing names of audio codecs in format
The three basic formats, |
|||
|
empty |
List of video codec names used to initiate a call (shoulder call). As a value - a list containing video codec names in the following format
|
|||
|
|
Video transcoding switch.
|
|||
|
|
Maximum udp packet size sent by the system, in bytes. |
|||
|
|
Switch to apply media gateway role b2b for calls initiated by the current role instance esg. |
|||
|
empty |
A list of IP addresses of the current server. |
|||
|
empty |
List of external STUN-servers to determine the external IP-address of the server when working for the NAT. |
|||
|
empty |
White Address Substitution. Format:
The list should include the addresses of all servers where the media gate is located, as well as the local interfaces of the current machine from which all external addresses are routed. |
|||
|
empty |
Headline Trolling. Format:
The default is blank. |
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": "esg12",
"roletype": "esg",
"iface": "eth0",
"roleid": 11260,
"separate": true,
"tcp": 5080,
"udp": 5080,
"tls": 5081,
"log_cdr": true,
"log_trn": true,
"log_sip": true,
"log_media": true,
"log_mgct": true,
"certdir": "/var/lib/era/certificates",
"keypass": "eb9c4458016d3f1e378d02004c4f4f50",
"max_udp_size": 10000,
"stunserver": ["sip:stun.sipnet.ru:5060", "sip:demo.era.ru:5060"],
"sip_alg": [
{"gray":"172.16.0.14","white":"62.84.126.3"},
{"gray":"172.16.0.15","white":"62.84.126.6"}
],
"fwd_headers": [
"X-Header-1",
"X-Header-2"
]
}