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 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:
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.
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?
Eddy,
I would say that your question can be split to 2 technical solutions required. First - Getting a call from PSTN to WebRTC Second - Incoming calls on the browser
Getting a call from PSTN to WebRTC
Doing this requires a Gateway (GW). There is nothing special here in WebRTC in this fact. Getting a PSTN call into any VoIP network (SIP, H.323, proprietary) will require a that will terminate PSTN calls and initialize VoIP calls. For WebRTC there are a few special requirements like security, WebSockets, Opus 9or G.711 which is common). Another special thing is that WebRTC doesn't specify the signaling. You may use SIP but many just use simple proprietary signaling. That is why many of the solutions create a kind of end-to-end solution of a GW and the WebRTC clients.
Incoming calls on the browser
That is a bit of a more complex requirement and it really depends on the overall application you have. If your browser is not running there is no simple way to get an incoming call on it. A solution could be some small application you make users install that will bring up the browser but then you miss the no install advantage yet it is better than a complete client installation that will require more updates than this small launcher application. Another case is that user is browsing your website, you see he is in trouble or looking to buy something (or pick any other use case) and you ask him to answer an incoming call. That is a much simpler case as you have your JS running already. So as said, it all depends on the exact application and scenario.
Amir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With