Step 10. Connecting a SIP phone
Case: a user receives a login and password for their SIP phone, the domain name, and connection point addresses from the administrator. They configure the phone and enable registration on it. The device registers and displays the corresponding status.
SIP devices operate over the SIP protocol (a large set of RFCs, starting with the most basic 3261). In this case, the device generates only signaling traffic, namely SIP itself. It sends a REGISTER request and expects a 200 OK response or an error response with code 4xx-6xx. Device registration is performed for a specified time (usually within 1 hour), during which the device extends the registration by sending the next REGISTER request with the same identifier, or creates a registration with a new identifier. The domain name is the logical name of the domain in which the SIP device account was created; this name may not exist in DNS if proxy addressing is used.
The diagram introduces new functional elements. It reflects the presence of SIP-Boundary at the system boundary, that is, the need for one of the system roles on one of the servers to have functionality responsible for receiving and standardizing SIP transactions. The SIP-Server functional element processes the REGISTER request by authenticating it (its task is similar to the previously considered WS role task: there, HTTP requests from the User-API were processed, while here the standard SIP API is processed, currently the REGISTER request). Registrar_Storage temporarily stores the registration. DC handles authorization in a way similar to user authorization when executing APIs in step 1, but SIP device authorization uses a different domain entity: the SIP-UA account (sipuser). It is this entity, created in advance by the administrator in one of the domains, that contains the login and password entered by the user when configuring their SIP phone.
The scheme is maximally simplified and focuses on the need to allocate three types of new functionality. At this stage, the essence of SIP-Boundary, SIP-Server, and _Registrar_Storage should be clarified, or rather the need for their separation, and they should be tied to specific system roles.
If the purpose and meaning of device registration are ignored, the need to separate the functionality cannot be adequately assessed. Therefore, let us partially anticipate the next case:
user A picks up the handset, dials a known number of user B, and the call arrives at user B’s registered device.
In this form it is sufficient for now. To make a call to user B, some process must access the registration storage. By the dialed number, the account is found in DC, and by the account, the address of the registered SIP device to which the call should be sent is found in Registrar_Storage.
We ensure service availability and scaling. If these three functionalities existed inseparably in only one place, there would be no scaling potential. And if they existed inseparably in several instances of one role, some users would register on one server and some on another. Calls between them would be impossible, or at best every call would require searching across all servers of the entire system, a regression in speed and performance. Thus the need to allocate SIP device registration storage is justified. This is the Registrar role. Its main responsibility is the secure storage of all registered SIP devices. It is made redundant in Active-Passive mode, split into groups by domain zones (microservice domain facades, step 7), and synchronizes data between sites serving the domain. It stores data in an object DB distributed across the servers of the role group.
The need to separate SIP-Boundary and SIP-Server will become clear after other functional responsibilities are separated between them.
-
SIP-Server is the B2BUA (Back-to-back User-Agent) role. It is responsible for logical processing of all SIP requests. When processing SIP INVITE requests for calls, B2BUA acts as the opposite UA for the request initiator. It organizes authorization checks, routing, callee lookup, and the second dialog leg, including multiple calls. For both subscribers (caller and callee), it is a full-fledged UA, thus combining two SIP dialogs within one call.
-
SIP-Boundary is the SG (SIP-Gate) role. Its main responsibility is to keep the connection point unchanged when processing incoming calls. That is, regardless of where the call came from, it reaches the device from exactly the point where the device connected and registered. This implements classic stateful SIP-Proxy functionality. Additionally, it
-
acts as a border filter against spam;
-
handles network separation, meaning it can have several network interfaces and translate requests from one network to another;
-
performs even load balancing across all B2BUAs on its site, randomly selecting any available B2BUA on the current site.
-
Both have SIP interfaces and are made redundant and scaled in Active-Active mode.
This functional composition provides great architectural flexibility. In particular, there can be different numbers of servers with the SG role and the B2BUA role. We examine the SG and B2BUA roles in more detail in step 11.
An important special case of this step’s scenario is that a phone can register in a domain from a site where the domain is not served. In this case, the registration data is stored on all sites where the domain is served and points to the device’s connection point, that is, the SG of another site. This happens through Registrar functionality, namely proxying and synchronization. This feature is called roaming.
Another special case is the ability to register several SIP devices under one account. This is limited only by the corresponding license and may be limited differently for different users.
| Term | Definition |
|---|---|
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
-
Next step: Step 11. The first call
-
Previous step: Step 9. Cross-site interaction