为什么需要标签来识别 SIP 对话?

发布于 2024-12-05 05:25:39 字数 130 浏览 0 评论 0原文

本地和远程标记以及 Call-ID 的组合用于标识对话。据说Call-ID是一次呼叫的唯一值。那么为什么 Call-ID 不单独用于识别对话呢?

A combination of local and remote tags along with Call-ID is used to identify a dialog. It is said that Call-ID is a unique value for a call. Why then is Call-ID not used solely to identify the dialog?

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

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

发布评论

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

评论(3

噩梦成真你也成魔 2024-12-12 05:25:39

一句话:“发夹”。

“Hairpinning”是指用户代理向自身发出呼叫,主要是出于自测试的目的。 (您可能遇到这种情况的另一个原因是您的代理将您的呼叫路由给您自己,称为“tromboning”。如果有意完成,这是对您的基础设施的有用的端到端测试。)

因此,假设您发送了一个 邀请自己并回答。然后,您的用户代理必须有两个对话框(每个对话框都有标识符),每个对话框代表呼叫的一端。如果您只有Call-ID,那么您不知道哪个对话框是调用者,哪个是被调用者。

这里的 FromTo 标签是您可以明确确定哪个对话框是哪个的方法。

In a word: "hairpinning".

"Hairpinning" is when a user agent makes a call to itself, mainly for the purposes of self-testing. (The other reason you might have this is because your proxy routes your call to yourself, called "tromboning". When done intentionally, it's a useful end-to-end test of your infrastructure.)

So let's say you send an INVITE to yourself, and answer it. Your user agent must then have two dialogs (each with identifiers), each representing one end of the call. If you only have a Call-ID, then you don't know which dialog is the caller and which the callee.

The From and To tags here are the way you can unambiguously determine which dialog is which.

百思不得你姐 2024-12-12 05:25:39

From TagTo tag 不足以唯一标识 Alice 和 Bob 之间的 SIP 对话。您还必须结合Call-ID

在 RFC 3261 第 12 页中,我们发现:

Call-ID 包含此呼叫的全局唯一标识符,
由随机字符串和软件电话的组合生成
主机名或 IP 地址。 To 标签、From 标签的组合,
Call-ID 完全定义了点对点 SIP 关系
Alice 和 Bob 之间的对话称为对话。

SIP RFC 3261

From Tag and To tag are not sufficient to uniquely identify a SIP dialog between Alice and Bob. You must combine the Call-ID too.

In the RFC 3261 page 12, we find this :

Call-ID contains a globally unique identifier for this call,
generated by the combination of a random string and the softphone's
host name or IP address. The combination of the To tag, From tag,
and Call-ID completely defines a peer-to-peer SIP relationship
between Alice and Bob and is referred to as a dialog.

SIP RFC 3261

蓝颜夕 2024-12-12 05:25:39

尽管唯一的 call-ID 保证了消息发送时的唯一性,但在分叉的情况下,call-ID 并不能保证唯一性。例如,如果 alice 呼叫 bob,邀请消息将发送到 bob 的所有注册端点 — Bob 的智能手机和 Bob 的 PC。这就是标签发挥作用的地方,以识别响应来自哪个端点。每个端点将发送具有相同呼叫 ID 但不同标签的响应。

even though a unique call-ID guarantees uniqueness when message is send but in case of forking call-ID does not guarantees uniqueness. For example if alice call bob, Invite messages to be sent to all bob's registered endpoints — bob's smart phone and bob's PC. That's where tag comes into picture to identify the response comes from which endpoint. Each endpoint will send the response with same call-ID but different tags.

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