I have been learning more about WebRTC, SIP and PSTN and how they work together especially the ability to receive phone calls in browser. I have spent some time on Twilio's website and I like the way they are able to make you receive a phone call From PSTN to your browser.

I want to understand how they are able to let someone call a normal PSTN phone number and the call is directed to web browser. 

I bumped into [this question](https://stackoverflow.com/questions/13896198/incoming-calls-with-sip-and-webrtc) and got some little understanding but there are some things that are still missing for me.

To clarify my question, let us take the following scenario:

1st Part
--------

Let's assume I live in London and have my own SIP-server and SIP account and have a PSTN phone-number and the number is mapped to the SIP account. Now I want to be able to receive telephone calls from all over the world in my browser. When people call the PSTN number, the calls pass through my Telecom Provider. So how does the calls get to my browser? Do I have to connect my SIP server to the Telecom Provider systems before I can direct the calls to my browser?

Does it mean that to be able to direct a call to a browser the Telecom company system must know that for this particular PSTN number, the call must come to my SIP server or something like that?

I want to know all the steps that takes place for the call to get to my browser including softwares and (probably the hardwares) that come in between.

2nd part
--------

Twilio gives local numbers to those who wants them. I understand that Twilio signs agreement with the Telecom companies to get those numbers. Does Twilio system connects to all these Telecom companies systems before they are able to direct calls to users' browsers?