mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
add call_uuid var
This commit is contained in:
parent
36648cb177
commit
8d0c81103e
@ -1922,6 +1922,27 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user