事件的Unique

编程入门 行业动态 更新时间:2024-10-24 18:23:29
事件的Unique-ID和Channel-Call-UUID有什么区别?(What's the difference between event's Unique-ID and Channel-Call-UUID?)

Freeswitch事件包含两个变量( Unique-ID和Channel-Call-UUID ),似乎总是设置为完全相同的值:leg的唯一标识符。

我没有看到这个的目的,虽然Unique-ID在FS的维基上有一个单行文档 (“这个频道的呼叫支路的uuid”),但Channel-Call-UUID没有。 更糟糕的是:我遇到两个他们的价值观不同的例子 :

[...] Channel-Call-UUID: c9bbde8b-379b-45d4-b193-3f761a44f3e2 Unique-ID: 81273088-c31f-4469-85a6-c878e42210e5 [...] [...] Channel-Call-UUID: ada7f3de-2374-4144-9b1d-eade29df0779 Unique-ID: f3ebca6c-d9cd-4f89-ae12-748e6c479dda [...]

我需要能够清楚地识别代码中的一条腿,所以我想知道

哪一个是最准确的 另一个的目的是什么?

Freeswitch events contain two variables (Unique-ID and Channel-Call-UUID) that seem to always be set to the exact same value: the leg's unique identifier.

I don't see the purpose of this and while Unique-ID has a one-line documentation on FS's wiki ("uuid of this channel's call leg"), Channel-Call-UUID doesn't. Even worse: I came accross two examples where their values were different:

[...] Channel-Call-UUID: c9bbde8b-379b-45d4-b193-3f761a44f3e2 Unique-ID: 81273088-c31f-4469-85a6-c878e42210e5 [...] [...] Channel-Call-UUID: ada7f3de-2374-4144-9b1d-eade29df0779 Unique-ID: f3ebca6c-d9cd-4f89-ae12-748e6c479dda [...]

I need to be able to clearly identify a leg in my code, so I'd like to know

which one is the most accurate and what's the purpose of the other one

最满意答案

“ Unique-ID ”标识当前频道的分支(此值似乎始终与“ Caller-Unique-ID ”相同, 记录为 “This channel's uuid”)。 “ Channel-Call-UUID ”是可用于识别已应答/桥接信道的ID。 它似乎来自频道创作者的“ Unique-ID ”。 b-leg(被叫方)的“ Channel-Call-UUID ”的值与其“ Unique-ID ”不同,但它与“ Other-Leg-Unique-ID ”标题的值相同。

源代码( src/switch_channel.c )支持我之前的声明:

if ((v = switch_channel_get_variable(channel, "call_uuid"))) { switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", v); } else { switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", switch_core_session_get_uuid(channel->session)); } "Unique-ID" identifies the leg of the current channel (this value seems to always be identical to "Caller-Unique-ID", documented as "This channel's uuid"). "Channel-Call-UUID" is an ID that can be used to identify answered/bridged channels. It seems to be derived from the "Unique-ID" of the channel's creator. The value of "Channel-Call-UUID" of the b-leg (the callee) differs from its "Unique-ID", but it is identical to the value of the "Other-Leg-Unique-ID" header.

The source code (src/switch_channel.c) supports my previous claims:

if ((v = switch_channel_get_variable(channel, "call_uuid"))) { switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", v); } else { switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", switch_core_session_get_uuid(channel->session)); }

更多推荐

本文发布于:2023-04-28 02:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329816.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事件   Unique

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!