Internal SIP Gate (sg)
Description
Cluster entry point over SIP for internal devices defined by SIP-user accounts.
Proxies requests in stateless mode to internal servers with roles b2b. Has an address through which the phones of internal subscribers of the respective site are connected. Any request from the system to the user goes through the appropriate role instance sg.
Does not distinguish between different types of requests - skips all the way through, adding itself to the "Via" headers of all requests and the "Record-Route" headers of INVITE requests.
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 sg role must have one or more instances of the bgmg role with non-overlapping port settings.
Reserved and scaled in mode Active-Active.
When the role is started, the certificate specified in the *certdir* parameter is validated. If the validation fails, the role is started with an unchanged certificate. The certificate can be overridden through the domain settings.
Code |
|
Mode of operation |
|
Backup mode |
|
Types of sites |
|
Layer |
|
Placement |
|
Saving and restoring state on reboot |
|
appendix |
|
Limitations
-
No more than 3000 SIP packets per role instance per second.
-
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 ( |
|||
|
required |
Local TCP port for SIP ( |
|||
|
empty |
Local TLS port for SIP ( |
|||
|
empty |
WebSocketSecure local port for SIP ( |
|||
|
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.
|
|||
|
|
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 |
|||
|
empty |
The alias of the directory on the server for storing certificates (files 'server.crt' and 'server.key'). This setting and certificate is applied only when the certificate specified in the domain settings is not applied (settings.certificate_pem):
|
|||
|
empty |
Password for decryption of the certificate secret key file specified in the field 'certdir'. |
|||
|
|
Media gateway microservice application switch b2b for calls forwarded by the current role instance sg. |
|||
|
|
Turns off the application of an edge media gateway by the current outbound-proxy server. An outbound media gateway may be needed if the outbound-proxy server is hosted on multiple subnets, and there is a subnet from which subscribers connect that is not accessible to other servers in the system where the microservices are executing mg.
|
|||
|
|
List of audio codec names used for call initiation (shoulder call). |
|||
|
empty |
List of video codec names used to initiate a call (shoulder call). |
|||
|
|
Video transcoding switch.
|
|||
|
|
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. |
|||
|
|
Maximum udp packet size sent by the system, in bytes. |
|||
|
|
NOTIFY request sending mode switch to re-register the UA when the sg role instance serving the device goes down. |
|||
|
|
Switch for sending unsuccessful final SIP responses to REGISTER, SUBSCRIBE, INVITE (new) requests during server out-of-service mode. deservice_followers, array<int>, |
|||
|
|
A response code sent to subscribers in response to an incoming request while the node is in service withdrawal mode. |
|||
|
|
Turns off automatic DisplayName transliteration mode in requests forwarded away from the system to connected devices. |
|||
|
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 |
"Substitution of domains instead of ip addresses in the To and From headers of SIP packets. Format:
|
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": "sg1",
"roletype": "sg",
"iface": "eth0",
"roleid": 11280,
"separate": true,
"tcp": 5060,
"udp": 5060,
"tls": 5061,
"wss": 5063,
"log_trn": true,
"log_sip": true,
"log_media": true,
"log_mgct": true,
"certdir": "alias://paths/default_certdir",
"keypass": "eb9c4458016d3f1e378d02004c4f4f50",
"max_udp_size": 10000,
"b2bmedia": true,
"reregister": false,
"translit": true,
"sip_alg": [
{"gray":"172.16.0.14","white":"62.84.126.3"},
{"gray":"172.16.0.15","white":"62.84.126.6"}
],
"substitute_domains": [
{
"addr": "172.16.0.15",
"domain": "pbx.era-platform.ru"
}
]
}