使用SIP客户端远程拨号

发布于 2025-01-06 14:49:11 字数 199 浏览 1 评论 0原文

我想使用我编写的简单非 SIP 客户端程序从我的电脑进行远程拨号,该程序将命令发送到通过 TCP 连接接受远程命令的专有 SIP 客户端。然后,专有的 SIP 客户端将使用我的 PC 的 IP 和 RTP SDP 中的端口号拨打远程方。这原则上可能吗?是否有任何可用的开源客户端使用这个概念?是否有任何可用的文档(IETF RFC、博客等)。

感谢在此事上的任何帮助。

I want to remote dial from my pc using a simple non SIP client program which I wrote and wchich sends commands to a proprietary SIP client that accepts remote commands via a TCP connection. The proprietary SIP client will then dial the remote party using my PC's IP and port number in SDP for RTP. Is this possible in principle? Are there any opensource clients available that use this concept? Is there any documentation (IETF RFCs, blogs etc) that is available.

Appreciate any help in this matter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

得不到的就毁灭 2025-01-13 14:49:11

查看 pjsip,它是一个适用于所有主要平台的开源跨平台 SIP 客户端,具有 C 语言 API 和Python 的 API 包装器,无论您喜欢哪个。他们的网站上也有示例。将您的 TCP 解析代码链接到 pjsip 并调用其函数来发起呼叫,您可以在他们的网站上找到如何执行此操作

Check out pjsip, it's an open-source cross-platform SIP client for all major platforms and with API in C and an API wrapper for python, whichever you prefer. There are also examples on their site. Link your TCP parsing code to pjsip and call its functions to initiate a call, you can find how to do it on their site

唱一曲作罢 2025-01-13 14:49:11

如果我理解正确的话,这就是您想要做的:

    TCP              SIP/SDP/RTP
PC <===> SIP client <===========> softswitch

实际上,PC 和 SIP 客户端之间的 TCP 对于信令可能是准确的,但对于媒体而言则不然,因为 RTP 媒体流通常通过 UDP 发送。

在我看来,第一步是确保您的软交换机接受将 RTP 数据包发送到与 SIP 客户端不同的 IP 地址(我认为大多数软交换机出于安全原因而拒绝)。如果它接受并且您的 SIP 客户端和 PC 之间没有 NAT,则您应该能够将 RTP 流直接发送到您的 PC。在这种情况下,您必须检索 RTP 数据包,最终重新排列它们,解压缩它们的有效负载并将它们提供给您的扬声器。

如果您的软交换机不想将 RTP 数据包发送到与 SIP IP 地址不同的 IP 地址,那么您必须将 RTP 数据包从 SIP 客户端转发到您的 PC。但是,如果您无法修改 SIP 客户端来执行此操作(很可能是这样,因为它是专有软件),您可能会陷入困境。

要测试您的软交换机是否接受向非预期 IP 地址发送 RTP 数据包,您可以使用 sipp 并指定远程媒体IP 地址与 SIP 信令 IP 地址不同。

If I understand correctly, here is what you want to do:

    TCP              SIP/SDP/RTP
PC <===> SIP client <===========> softswitch

Actually, TCP between PC and SIP client will probably be accurate for signalling but not for media as RTP media stream is often sent over UDP.

In my opinion, the first step is to make sure that your softswitch will accept sending RTP packets to an IP address which is not the same as SIP client (I think most of them refuse for security reasons). If it accepts and if you have no NAT between your SIP client and your PC, you should be able to send RTP stream directly to your PC. In this case, you have to retrieve RTP packets, eventually rearrange them, decompress their payload and feed them to your speakers.

If your softswitch does not want to send RTP packets to an IP address different from SIP IP address, then you have to forward your RTP packets from your SIP client to your PC. But if you can't modify your SIP client to do this (and it's probably the case as it's a proprietary software), you're probably stuck.

To test whether your softswitch accepts sending RTP packets to an unintended IP address, you can use sipp and specify a remote media ip address different from SIP signalling IP address.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文