In this section, we will cover how to receive and send calls to PSTN. We will start with explaining how to receive calls.
The handling of the calls from the PSTN side can be split into the following steps:
Trusting and authenticating the gateways/carriers sending you the calls coming from the PSTN side.
Identifying the called party; as a call from PSTN will target a PSTN number, we have to translate it to a local subscriber.
The inbound PSTN gateways (often provided by Direct Inward Dialing (DID) providers) are, from an IP perspective, static devices. (They do not change their IP addresses.) At the same time, such gateways usually do not implement digest authentication; such a mechanism is intended to authenticate dynamic end users rather than static infrastructure devices.
Such gateways are usually authenticated based on their IP location—IP-based authentication—where you authenticate the sending device based on the source IP of the...