mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-14 04:54:49 +00:00
删除不必要的event变量
This commit is contained in:
parent
c9baac2da9
commit
26014bef56
@ -2659,7 +2659,7 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
|
||||
switch_caller_profile_t *caller_profile, *originator_caller_profile = NULL, *originatee_caller_profile = NULL;
|
||||
switch_codec_implementation_t impl = { 0 };
|
||||
//char state_num[25];
|
||||
const char *v;
|
||||
//const char *v;
|
||||
|
||||
switch_mutex_lock(channel->profile_mutex);
|
||||
|
||||
@ -2686,19 +2686,19 @@ SWITCH_DECLARE(void) switch_channel_event_set_basic_data(switch_channel_t *chann
|
||||
// switch_channel_test_flag(channel, CF_DIALPLAN) ? "true" : "false");
|
||||
|
||||
|
||||
if ((v = switch_channel_get_variable_dup(channel, "presence_id", SWITCH_FALSE, -1))) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-ID", v);
|
||||
}
|
||||
//if ((v = switch_channel_get_variable_dup(channel, "presence_id", SWITCH_FALSE, -1))) {
|
||||
// switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-ID", v);
|
||||
//}
|
||||
|
||||
if ((v = switch_channel_get_variable_dup(channel, "presence_data", SWITCH_FALSE, -1))) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-Data", v);
|
||||
}
|
||||
//if ((v = switch_channel_get_variable_dup(channel, "presence_data", SWITCH_FALSE, -1))) {
|
||||
// switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Presence-Data", v);
|
||||
//}
|
||||
|
||||
|
||||
if ((v = switch_channel_get_variable_dup(channel, "presence_data_cols", SWITCH_FALSE, -1))) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Data-Cols", v);
|
||||
switch_event_add_presence_data_cols(channel, event, "PD-");
|
||||
}
|
||||
//if ((v = switch_channel_get_variable_dup(channel, "presence_data_cols", SWITCH_FALSE, -1))) {
|
||||
// switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Presence-Data-Cols", v);
|
||||
// switch_event_add_presence_data_cols(channel, event, "PD-");
|
||||
//}
|
||||
|
||||
//if ((v = switch_channel_get_variable_dup(channel, "call_uuid", SWITCH_FALSE, -1))) {
|
||||
// switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Channel-Call-UUID", v);
|
||||
|
@ -2941,13 +2941,22 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
||||
switch_channel_set_variable_var_check(channel, SWITCH_CURRENT_APPLICATION_DATA_VARIABLE, expanded, SWITCH_FALSE);
|
||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, NULL);
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(session->channel, event);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", expanded);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-UUID", app_uuid);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-UUID-Name", app_uuid_name);
|
||||
switch_event_fire(&event);
|
||||
if (strcmp(application_interface->interface_name, "set") == 0
|
||||
|| strcmp(application_interface->interface_name, "export") == 0
|
||||
|| strcmp(application_interface->interface_name, "park") == 0
|
||||
|| strcmp(application_interface->interface_name, "acknowledge_call") == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
|
||||
"%s drop Application event\n", application_interface->interface_name);
|
||||
}
|
||||
else {
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(session->channel, event);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", expanded);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-UUID", app_uuid);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-UUID-Name", app_uuid_name);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
}
|
||||
|
||||
switch_channel_clear_flag(session->channel, CF_BREAK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user