Devices without registration

Introduction

The case was handled within task #140.

Phones are connected to specific gates (sg role) at specific addresses (domains). This is phone configuration.

A call from a phone proceeds without authorization verification (solely by sender address and association with a sipuser account without registration). The SG and B2BUA roles handle this part of the task using caches of accounts without registration, keeping the data in them up to date. When calling from an account without registration, only the authorization component differs in system behavior, while username and domain are analyzed and used similarly to the standard mode.

When calling a phone (an account without registration), the system acts exactly like accounts with registration. The difference is hidden in the behavior of independent internal services emulating registration. Thus, data about such accounts resides in the registrar (sr role) and is maintained there up to date.

sipuser account fields

reg (of type intbool) determines the account operating mode: with or without registration, default true — with registration.

devices specifies the set of devices and their properties in object list format (array<object>):

  "devices": [
     {
       "device": "192.168.0.10:5060",
       "gates": [ 4, 6 ],
       "proto": "udp"
     }
  ]
  • gates — specifies the address of the internal server (sg gate role) from which to send requests (port optional and actually ignored) in SrvIdx format :: int (see Configuration) or IP address and port :: str.

  • device — specifies the external server address (IPV4); the port is 5060 by default but can be specified.

  • proto — protocol for communication with the device (tcp,udp,tls), default udp.

Operation specifics

Each account can contain several devices; they are called by simultaneous forks.

Each device is bound to a specific gate so that an outgoing call to the account passes strictly through it. This ensures device synchronization, since the counterpart device is similarly configured to a specific address. The gates field value can also contain * a list of SrvIdx numbers, strings with the gate IP address, strings with IP address and port, * the value "" — a random gate is used on the site serving the domain that has the lexicographically smallest name. * an empty list or empty string — the default value set in the domain settings (settings.ext.default_sipuser_noreg_gates) is used; it is expected to contain a RoleId number, a gate IP address, a gate IP address and port, or a list of these values. If the value is not set, behavior is similar to . If the resulting value does not intersect with the gates of the sites serving the domain, the account is not registered and calls to it are impossible, although calls from it will pass into the system through any gate on the sites serving the domain.

One specific device (essentially a device address) can use several gates (SG role). However, a request to one device always leaves from only one gate; the others are ignored and used only when the gate is unavailable. Requests from devices are accepted on any gates of the sites where the domain owning the account is served.

The number of device addresses must not exceed the number of licenses allocated to this sipuser. Validation and prohibition of changes in either direction occur at account modification time.

If a gate address is specified that is not discovered, the system does not put it into operation. And when a gate is removed from the configuration, it is disabled from operation without being automatically removed from the account properties.

A special registration emulation service maintains the data in the registrar (mware role, operates in Active-Passive mode on each site). It monitors the domain center (periodically fetches accounts) and compares the data with the previous copy, creating/updating/deleting accounts in the registrar while checking gate availability and guaranteeing that a path through an available gate is preserved in the registrar.

The registration emulation service handles only those devices (a subset of all account devices) that belong to the gates of the current site. This guarantees no duplication or parasitic influence on the registrar from several sites, but at the same time requires not specifying several gates belonging to different sites in one device. Responsibility for this lies with the domain administrator.

Specifics of solving the missing domain in the request problem

To solve the case where only an IP address is specified in the domain field of an INVITE request, a shared cache on b2b is used. By the sender address and port it determines whether any domain served on the current site has a device without registration with the corresponding values. If there are no such devices, the system operates in the usual mode, applying authorization and account determination algorithms by the From and Authorization headers. If devices are found, then depending on the number of accounts bound to this sender address, the number of domains at the address, and the From address — the domain or IPV4 — it prohibits or processes the call, treating it as a call from a specific account of a specific domain.