}
}
+ if (var_event) {
+ switch_uuid_t uuid;
+ char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
+ char *use_uuid;
+
+ if (caller_channel) {
+ use_uuid = switch_core_session_get_uuid(session);
+ } else {
+ switch_uuid_get(&uuid);
+ switch_uuid_format(uuid_str, &uuid);
+ use_uuid = uuid_str;
+ }
+
+ switch_event_del_header(var_event, "call_uuid");
+ switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "call_uuid", use_uuid);
+
+ if (caller_channel) {
+ switch_channel_set_variable(caller_channel, "call_uuid", use_uuid);
+ }
+ }
+
/* A comma (,) separated list of variable names that should ne propagated from originator to originatee */
if (caller_channel && (export_vars = switch_channel_get_variable(caller_channel, SWITCH_EXPORT_VARS_VARIABLE))) {
char *cptmp = switch_core_session_strdup(session, export_vars);