我目前正在计划我的最后一年的项目,我希望创build一个支持IP语音和基于文本的聊天(虽然不是“下一个Skype”)的应用程序。 我只是真的想要一个简单易用的方法来完成voIP部分,而且不需要扩展function,至less不需要开始。
我想要的function之一是它不会通过服务器,但这是因为我不想在应用程序发布后维护服务器。 所以如果有可能把你的知识产权给某人,他们join使用它将是可取的。
我打算使用GUI的Qt框架,虽然它可以改变,语言(C ++)也可以改变,所以没有什么是写的。 该软件将在Windows上运行。
我曾经看过H.323,sip和其他一些开源软件,但似乎很难进入,我无法弄清楚他们是否做了我需要他们做的事情。
我应该考虑的任何开源库都是我想要的东西的一部分? 我错过的任何消息来源? 我对于VoIP世界是全新的,并且可以朝正确的方向推动。 同样,如果有一种语言以简单的方式做到这一点,我可以切换,因为我目前正处于规划阶段。 感谢您的帮助。
我会推荐PJSIP。 http://www.pjsip.org/
PJSIP将为您处理SIP 和音频。 (它也有STUN!)
我将不得不不同意另一个答案,请使用QT。 在这里没有理由去“本地”。 PJSIP不仅可以为您处理音频,还有许多其他跨平台音频库。
关于IP传递…如果你打算在局域网上使用它,我建议使用UDP广播来发现其他用户(并在UI中有一个位置来定义你的用户名,以便最终用户可以识别彼此)。 这在QT中很容易完成。
首先,我在几个月前为我的公司实施了类似的东西。
得到教训:
1. you can't just pass IPs around and expect the users to like that over skype. Solution: a. You will need your own server with the necessary ports forwarded. You will have to use some sort of firewall hole punching algorithm(take a look at UDP hole punching). 2. Using existing VoIP library is always better. Downside? You can't write proprietary code using opensource library. Hence you will need to learn H.323 and RTCP/RTP protocol. 3. You will need to write echo reduction algorithms for voice. 4. COMPRESS your audio data before sending it to another computer. PCM data can and will clog your network, delaying sound and fuzzing up everything in the process. Use aLaw and uLaw compression schemes. 5. Make sure you take care of all the error conditions. Multimedia over network can be tricky if not really hard to implement. 6. DONT USE QT. Use a platform specific framework like .NET and libraries that deal with sound (NAudio).
我认为在深入研究VoIP编程的技术之前,这将总结出您需要首先解决的问题。
对于你的问题,你的问题要小得多。
1. You don't need echo reduction algorithms IF you use headsets. 2. You don't need to write hole punching algorithms if you're OK with passing IPs around. Take a look at NAT traversal(UPnP?) if the data is suppose to go on a network and to a computer that isn't on your LAN. FLOW: COMPUTER1->DATABUFFER->COMPRESSuLaw/aLaw->NETWORK->DECOMPRESSuLaw/aLaw->OTHERCOMPUTER and vice versa.
祝你好运 :)