pjsip 上的 HTTP 隧道
我开发了一个 VOIP 应用程序,它使用 PJSip 通过 SIP 通道进行通信。我想要做的是创建一个 HTTP 隧道,以便系统即使在 VOIP 被阻止的区域也能正常工作。使用 PJSip 实现此目的的方法是什么,或者如果有一些外部方法那么如何将其与 PJSip 合并?
I have developed a VOIP Application, that uses PJSip to communicate over SIP channel. What i want to do is to create a HTTP tunnel so that the system works even in areas where VOIP is blocked. What is the way to achieve this using PJSip or if there is some external method then how can it be merged with PJSip??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有简单的方法可以做到这一点。您必须在 pjsip 中编写另一个传输协议或修改当前传输以支持 http 隧道上的 tcp/udp。还有如何通过 HTTP“隧道”传输流量。您可能必须确保您使用的 HTTP 服务器也支持 HTTP 隧道。
这可能会为您提供 SIP 信令,但您可能会遇到 RTP 媒体流量问题。
您最好在 pjsip 代码中实现 TURN 支持。 pjsip 已经支持 RTP 媒体的 TURN,因此使其支持主要 SIP 信令流量的 TURN 的工作量会减少。
虽然这假设您可以安装 TURN 服务器?如果您无法安装 TURN 服务器并且您的 HTTP 服务器不支持 HTTP 隧道,那么您可能会运气不佳。
There is no easy way to do this. You will have to write another transport protocol in pjsip or modify the current transports to support tcp/udp over http tunneling. There is also how you would "tunnel" the traffic through HTTP as well. You may have to make sure you are using a HTTP server that supports HTTP tunneling as well.
This may get you the SIP signalling but you may run into problems with the RTP media traffic.
You may be better off implementing TURN support into the pjsip code. pjsip already supports TURN for RTP media so it will be less work to make it support TURN for the main SIP signalling traffic.
Altho this assumes that you can get a TURN server installed? If you can't get a TURN server installed and your HTTP server doesn't support HTTP tunneling then you may be out of luck.
当局通过捕获您的 sip 和 RTP 数据包来检测您的 VoIP 应用程序。您可以调整您的 pjsip 并强制通过一个网关发送所有数据(目前,pjsip 为 sip/RTP/rtcp 等打开不同的端口)。您还必须更改每个传出的数据包,以便当局无法知道该数据包是 sip 数据包还是 RTP 数据包(他们通过查看标头结构知道数据包的类型)。
您还需要实现一个隧道类型的系统,每个数据包在到达服务器之前都要经过该系统。该隧道应该具有将数据包重组为其原始状态的能力。这样您就可以向服务器发送数据包而不会被阻止。
The authorities detect about your VoIP applications by capturing your sip and RTP packets.You can tweak your pjsip and force to send all the data through one gateway(currently, pjsip opens different ports for sip/RTP/rtcp etc). You will have to change every outgoing packet also so that the authorities will not able to know that the packet is sip or RTP packet(they know the type of packet by looking at the structure of the header).
You will also need to implement a tunnel-type system through which every packet goes before going to server. This tunnel should have the capabilities of re-structuring the packets to its original state. This way you will be able to send packets to the server without being blocked.