There are many big/small problems that arise or may arise when interconnecting the different networks of WebSocket, SIP, and PSTN. The most basic aspects of address mapping and protocol conversion from SIP to ISUP are mentioned here. Other challenges, such as policy control, billing, charging, and so on, are left to the reader to implement as they wish.
The PSTN scenario is much different from VoIP, as in the PSTN, the user ID is in the numeric form, while in VoIP networks, the username is followed by
@domain name. To resolve the intermapping between both the worlds, DNS and Enum servers are used; this setup is depicted in the following diagram: