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
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.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));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With