Step 18. BLF (Busy Lamp Field)

Case: Alice (A) picks up the handset on her SIP phone and starts a call to Boris (B). Varvara © sees on the BLF panel of her SIP phone that Alice’s indicator has turned red, and Boris’s indicator is blinking red.

To make this work, the administrator first configures the BLF function on Varvara’s SIP phone: when configuring the first button with an indicator, the administrator enters Alice’s number, and for the second button with an indicator, Boris’s number.

The BLF function works through SIP SUBSCRIBE and NOTIFY requests with special content, implementing the well-known Publisher-Subscriber pattern. The device subscribes to events, and the system notifies the device whenever events of interest occur. For BLF, the events are changes in the state of a specific user, more precisely the account of their SIP device (sipuser).

Throughout this step, user means the account of their SIP device, sipuser.

The state depends on the presence and state of calls in which the account is one of the subscribers. There are 4 states in total: terminated, idle, early, busy.

  • Calls are served by the B2BUA role.

  • All SIP requests from devices are processed by the B2BUA role.

  • There can be many B2BUA role instances even on one site, let alone across the system.

  • A user can be busy in several simultaneous calls.

  • Calls are served on arbitrary servers (B2BUA role instances), generally on different servers.

  • A user is considered busy if they participate in at least one active call.

  • A user is considered free only if they participate in no calls.

Given the constraints above, it is clear that a notification about a user becoming free cannot be produced directly by the B2BUA role, because it does not own the contexts of the user’s complete set of calls across all B2BUA role instances on all sites. To reliably decide about a change, the state must be integrated from at least the set of individual states of all calls in which the user participates.

To solve this and similar questions, the StateStore role is used. It collects and stores all individual states that various system services, including B2BUA role instances, can associate with a user. It contains a state machine for calculating the integrated state, as well as a subscription and notification mechanism. It is made redundant in Active-Passive mode, can be split into groups by domain zones (microservice domain facades, step 7), and synchronizes data between sites serving the domain.

  1. Subscription

blf_statestore
  1. Notification

blf_statestore_02

Thus, the SUBSCRIBE request, processed on one of the B2BUAs, temporarily places information about the subscriber in the subscription storage of the StateStore role in the domain of the target sipuser. B2BUA instances, while serving calls, determine various states (early, busy) for subscriber users, temporarily place information about the subscriber user’s state in the state storage of the StateStore role in the corresponding domain, and regularly renew it. StateStore, each time it processes a request, recalculates the integral state of the associated sipuser and, when it changes, notifies all subscribers. To do this, the corresponding request is sent to the serving B2BUA instance of each subscriber; the command is transformed into a NOTIFY request and sent to the subscriber device.

At the same time, it does not matter:

  • in which domain users A, B, and C are located;

  • on which sites their domains are served;

  • through which sites their devices are connected to the system;

  • which site serves the call;

  • whether that site serves user A’s domain.

Any call in which user A participates leads to a synchronized change of A’s state on all sites serving their domain. Any change in user A’s state leads to a notification of user C’s device.

blf_statestore_cross

However, cross-domain subscription is possible only if C can call A according to the routing rules of both domains.

Table 1. Terms used
Term Definition

BLF

!

sipuser state

!

StateStore

!