使用 SIP 和 WebRTC 的来电 [英] Incoming calls with SIP and WebRTC

查看:47
本文介绍了使用 SIP 和 WebRTC 的来电的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑实施基于浏览器的 VOIP 解决方案,该解决方案使用 SIP 和 WebRTC 并连接到 PTSN.基本上,用户给我他们的 SIP 凭证,我使用 WebRTC 来访问他们的麦克风和扬声器.在页面上,我计划运行一个 SIP 客户端.

I'm looking into implementing a browser-based VOIP solution that uses SIP and WebRTC and that connects to the PTSN. Basically, users give me their SIP credentials and I use WebRTC to acccess their microphone and speakers. On the page, I plan to run an SIP client.

如何实现来自 PTSN 的来电?我是否需要某种连接到用户 SIP 服务器的侦听器?

How do I implement the incoming calls coming from the PTSN? Do I need some sort of listener that connects to the SIP server of the user?

我知道这是一个广泛的问题,但在网上做了一些研究之后,我仍然对来电的 SIP 实现有些困惑.

I know this is a broad question but after doing some research online, I'm still somewhat confused about the SIP implementation of incoming calls.

推荐答案

您需要一个实现 SIP-WebRTC 网关的服务器.网关将能够通过 SIP 接收来自 SIP 提供商的传入呼叫(它本身将通过转换 ISDN-SIP、SS7-SIP 等充当 SIP-PSTN 网关),然后使用 WebRTC 将呼叫转发到基于浏览器的客户端.

You need a server that implements a SIP-WebRTC gateway. The gateway will be able to receive incoming calls from a SIP provider (which itself will be acting as a SIP-PSTN gateway by converting ISDN-SIP, SS7-SIP etc) via SIP and then forward the call to your browser based clients using WebRTC.

换句话说,您的服务器需要是 SIP 服务器和 HTTP 服务器的组合,并且 HTTP 服务器需要支持 Web 套接字和 WebRTC API.

Put another way your server needs to be a combination of a SIP server and a HTTP server and the HTTP server needs to support web sockets and the WebRTC API.

如果您还没有看过 Phono SDK,这是一个很好的起点.

If you haven't already take a look at the Phono SDK it's a good starting point.

更新:

自从我上次查看 WebRTC 以来,事情已经发生了一些变化.现在似乎在 JavaScript 实现中确实有一些 SIP,它利用新的 WebRTC API 来处理媒体方面的事情.使用 SIP-javascript 堆栈的浏览器应用程序不需要任何额外的服务器,并且可以直接连接到现有的 SIP 服务器.我发现的一个例子是 sip-js 但我相信还有其他的.

Things have moved on a little bit since I last looked at WebRTC. There now do seem to be some SIP in javascript implementations around that leverage the new WebRTC APIs for the media side of things. A browser application using a SIP-javascript stack would not need any additional servers and could connect directly to an existing SIP server. One example I found is sip-js but I believe there are others around as well.

这篇关于使用 SIP 和 WebRTC 的来电的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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