了解 SIP、WebRTC 和 PSTN 如何协同工作 [英] Understanding how SIP, WebRTC and PSTN work together

查看:53
本文介绍了了解 SIP、WebRTC 和 PSTN 如何协同工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在深入了解 WebRTC、SIP 和 PSTN 以及它们如何协同工作,尤其是在浏览器中接听电话的能力.我在 Twilio 的网站上花了一些时间,我喜欢他们让您从 PSTN 接听电话到您的浏览器的方式.

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.

我想了解他们如何能够让某人拨打普通的 PSTN 电话号码,并将呼叫定向到网络浏览器.

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:

假设我住在伦敦,拥有自己的 SIP 服务器和 SIP 帐户,并且有一个 PSTN 电话号码,并且该号码已映射到 SIP 帐户.现在我希望能够在我的浏览器中接听来自世界各地的电话.当人们拨打 PSTN 号码时,电话会通过我的电信提供商.那么这些调用是如何到达我的浏览器的呢?我是否必须先将 SIP 服务器连接到电信提供商系统,然后才能将呼叫定向到浏览器?

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?

这是否意味着为了能够将呼叫定向到浏览器,电信公司系统必须知道对于这个特定的 PSTN 号码,呼叫必须来自我的 SIP 服务器或类似的东西?

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 将本地号码提供给需要它们的人.我知道 Twilio 与电信公司签署了协议以获取这些号码.Twilio 系统是否会在这些电信公司系统能够将呼叫定向到用户浏览器之前连接到所有这些系统?

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,

我想说您的问题可以分为 2 个所需的技术解决方案.第一 - 从 PSTN 到 WebRTC 的呼叫第二 - 浏览器来电

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

接到从 PSTN 到 WebRTC 的呼叫

这样做需要网关 (GW).事实上,WebRTC 没有什么特别之处.将 PSTN 呼叫接入任何 VoIP 网络(SIP、H.323、专有)将需要能够终止 PSTN 呼叫并初始化 VoIP 呼叫.对于 WebRTC,有一些特殊要求,例如安全性、WebSockets、Opus 9 或 G.711,这很常见).另一件特别的事情是 WebRTC 没有指定信令.您可以使用 SIP,但许多只是使用简单的专有信令.这就是为什么许多解决方案创建了一种 GW 和 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.

浏览器来电

这是一个更复杂的要求,它实际上取决于您拥有的整体应用程序.如果您的浏览器没有运行,则没有简单的方法可以通过它接听来电.一个解决方案可能是您让用户安装的一些小应用程序会启动浏览器,但随后您会错过无需安装的优势,但它比完整的客户端安装要好,后者需要比这个小型启动器应用程序更多的更新.另一种情况是用户正在浏览您的网站,您看到他遇到麻烦或想买东西(或选择任何其他用例),然后您要求他接听来电.这是一个简单得多的情况,因为您的 JS 已经在运行.如上所述,这完全取决于确切的应用和场景.

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.

阿米尔

这篇关于了解 SIP、WebRTC 和 PSTN 如何协同工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆