Step 16. Calls to external networks

Case: a user dials 9 and a city number on their phone; the city number is called, the user hears ringback tone (alerting), and after the external subscriber answers, they are connected in a dialog.

From the previous steps, all calls are served in the B2B role, where routing is performed and the possibility of calling and the direction are determined.

In this case, routing has determined an external direction as the target. To do this, the domain administrator configured route and vectorrule entities; the latter references the provider entity, which was also created in advance by the domain administrator.

For the system to integrate with telephony providers and corporate PBXs, the administrator adds the ESG role to the configuration. The domain administrator configures the provider and provider_callerid entities.

The provider entity defines the specific ESG instance that supports the channel and is the intermediate server through which all calls from the system to the provider and back pass. The provider entity has a large number of settings that detail ESG behavior when working with this account. Accordingly, the account can:

  • work with registration on the provider side or without it (by direct IP addresses),

  • set username, login, password, and domain name,

  • configure the use of an outbound proxy server by specifying the IP address and port,

  • set additional addresses and domain names from which packets from the provider may arrive,

  • configure regular sending of ping packets in various formats,

  • configure the use of BGMG (step 14),

  • and more.

The ESG role, specifically the instance specified in the provider account, registers and maintains its registration on the external server. When a call passes through ESG (in either direction), two legs of one dialog are formed there, similarly to B2BUA. Any call passing through the system always has exactly one B2BUA server in the middle. Thus, for example, a call route between an external subscriber and an internal subscriber includes 3 SIP servers: ESG, B2BUA, SG, and consequently the call has 3 legs with different identifiers.

esg_call

At the same time, both inside and outside the system, it is possible to preserve unified subscriber information or configure modifications of From:Displayname, From:Username, To:Username. This is done using domain entities of type provider_callerid. These rules are applied similarly to routing rules: the highest-priority matching rule is detected (based on direction, From, and To masks), and modifications of From:Displayname, From:Username, To:Username are performed.

To reduce the number of provider_callerid rules in a domain, grouping can be used: one provider_callerid rule for several provider accounts, as well as two-stage modification: first From modifiers are applied, then To modifiers in a second pass.

External call transfer

A distinctive feature of the ESG role is that it handles REFER independently. This concept is implemented because the number plan in the external system (PSTN, telephony provider, or a third-party enterprise PBX) and the number plan inside the system are generally not synchronized.

Case: external subscriber Alice (A, behind the provider) and internal user Boris (B) are in a dialog. Alice transfers Boris to Varvara ©, whose number she knows and which is reachable in the external network. Varvara is an external subscriber for the system and for Boris.

When receiving REFER from the provider, ESG interprets it as a need to call another external subscriber. Routing rules are configured by domain administrators and therefore do not guarantee the ability to route in the same direction to the specified external subscriber. This is especially evident when only incoming calls from the provider are configured for routing. Therefore, when receiving REFER from the provider, ESG initiates the corresponding call in the opposite direction strictly to the same provider without additional internal routing.

esg_refer_ext
Case: external subscriber Alice (A, behind the provider) and internal user Boris (B) are in a dialog. Boris transfers Alice to Vladimir ©, whose number he knows and which is reachable in the internal number plan.

Similarly, when receiving REFER from inside the system, ESG interprets it as a need to call the subscriber through internal routing. Indeed, an external subscriber cannot under any circumstances handle this REFER correctly on their own and will most likely leave it outside rather than bring it into the system with another call. If an internal user needs to transfer the call to another external subscriber, this will still be done through internal routing and through one of the B2B role instances, that is, preserving the dialog inside the system.

esg_refer_int
Table 1. Terms used
Term Definition

Ringback tone (alerting)

!

ESG

!

provider

!

provider_callerid

!