直接 SIP 呼叫 IP
我正在为我的最终项目编写一个应具有 VoIP 功能的应用程序。我已经开始使用 android 2.3 包含的新 SIP API 进行测试。问题是我实际上住在学生宿舍里,所以我通过大楼的代理连接到互联网,而且它似乎有一个严格的防火墙,不允许任何东西通过。
我尝试了几个免费的SIP服务器和客户端,结果总是相同的:从我的UAC我可以看到其他客户端是否在线,我什至可以发送短信,但不可能建立实际的呼叫。我从未收到客户的任何回复。使用 Linphone 客户端我什至无法连接到 SIP 服务器进行身份验证。
问题是,我似乎无法在建筑物外拨打电话,但我已成功从安装在模拟器上的另一个 Linphone 客户端联系到安装在我的 PC 上的 Linphone 客户端。显然,我可以在没有任何 SIP 服务器的情况下在本地网络内拨打电话,只需使用接收方的本地地址而不是其 SIP 域即可。
问题是:我可以使用新的 android 2.3 SIP API 做同样的事情吗?我是否可以通过呼叫接收者的本地地址来在我的本地网络内拨打电话,而无需通过我所在建筑物外的任何 SIP 服务器进行身份验证?
由于我的应用程序是用于演示目的,这对我来说就足够了。在过去的三天里我一直在寻找解决这个问题的方法,但我还没有想出任何有用的东西。 :/
提前致谢。
I am programming for my End Project an application that should have VoIP capabilities. I have started testing with the new SIP API that android 2.3 includes. The problem is that I am actually living in a student's dormitory, so I am connected to the internet through the building's proxy and it seems to have a strict firewall that doesn't let anything pass.
I have tried several free SIP servers and clients and the result is always the same: from my UAC I can see if other clients are online, I even can send text messages, but it is impossible to establish an actual call. I never get any response from the client called. Using a Linphone client I can't even connect to the SIP server to authenticate.
The thing is, that it seems I cannot make calls outside my building, but I have successfully contacted a Linphone client installed on my PC from another Linphone client installed on an emulator. Apparently I can make calls inside my local network without any SIP server, just by using the local address of the receiver instead of its SIP domain.
The question is: Can I do the same with the new android 2.3 SIP API? Can I make a call inside my local network just by calling the receiver's local address, without the necessity of authenticate with any SIP server outside my building?
As my application is for demonstration purposes, this will be enough for me. I have been looking for a solution to this problem during the past three days but I haven't come up with anything useful. :/
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不明白为什么它在 Android 2.3 中不可能实现。可以使用其他客户端本地地址和端口进行点对点呼叫。
您还可以在PC上安装SIP服务器Brekeke服务器。您可以使用完整的 sip URI 进行呼叫。
I don't see any reason why It should not be possible in Android 2.3. Peer to peer call is possible with other clients local address with port.
You can also install SIP server Brekeke server on your PC. and you can use full sip URI for making calls.
因为音频和视频数据是通过与 sip 端口号不同的端口号发送的。 Sip端口是tcp,您可以在互联网上登录您的sip服务器。但是媒体端口是udp,你在nat后面,你不能打电话。为此,防火墙需要理解 sip 消息,然后应该为 udp 媒体打开端口。此外,您还需要 stun 服务器来处理 nat 遍历消息。
Because audio and video data is sent via different port number than sip port number. Sip port is tcp and you can login your sip server on internet. But media port is udp and you are behind nat and you cant making a call. To do this, firewall needs to understand sip messages and then it should open port for udp media. Also you need stun server for nat traversal messages.