Android客户端在PC上建立sip代理服务器
我已经实现了基于 sip 的实时语音传输,我的印象是,同一 WIFI 网络上的两部手机只要拥有彼此的 IP 地址就可以进行通信。但是,我无法让它工作...我正在使用 rtp 在这些客户端之间传输语音。 另外,我发现使用 WIFI 网络上的 PC 作为服务器更好。现在,我可以使用这台PC作为代理服务器来建立sip端到端连接吗?如果是,怎么办?
是否有用于初始化会话的现有实现?具体来说,如果有人能给我一个关于我需要两个客户端建立连接的地址/端口的示例,那就太好了。
I have implemented a sip based real time voice transfer under the impression that two of my phones on the same WIFI network can communicate provided that they have each others IP addresses. However, I could not make it work... I am using rtp to transfer voice between these clients.
Also, it's come to my notice that using a PC on the WIFI network as server is better. Now, can I use this PC as a proxy server to establish a sip end to end connection? If yes, how?
Are there existing implementations for initializing a session? Specifically, if someone could give me an example on what address/ports I would need both of my clients to establish the connection to, it would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已经正确实现了 SIP 协议所需的所有必要部分,那么您必须在 PC 上安装 SIP 服务器,并创建两个帐户,电话将在服务器上与它们连接。我已经尝试过使用 Android Asterisk 服务器,但我确信还有很多其他服务器...
默认情况下,SIP 服务器使用 UDP 侦听端口 5060。此端口仅用于会话(和其他控制消息)的启动,不用于传输 RTP 数据包。
If you have implemented correctly all the necessary parts that SIP protocol demands, then you have to install a SIP server on your PC and just create two accounts that the phones will connect with them on the server. I have tried with Android the Asterisk server, but I am sure that there will be many others out there...
By default SIP servers are listening on port 5060 using UDP. This port is used only for the initiation of the session (and other control messages) and NOT for the transfer of RTP packets.