Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf/vanilla/autoload_configs/switch.conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@

<!-- <param name="max-audio-channels" value="2"/> -->

<!-- The system will ignore update application information in channel table, set this to false to avoid this behaviour -->
<param name="ignore_application_channel_update" value="true" />

</settings>

</configuration>
1 change: 1 addition & 0 deletions src/include/private/switch_core_pvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ struct switch_runtime {
uint32_t max_audio_channels;
switch_call_cause_t shutdown_cause;
uint32_t uuid_version;
int ignore_application_channel_update;
};

extern struct switch_runtime runtime;
Expand Down
2 changes: 2 additions & 0 deletions src/switch_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2381,6 +2381,8 @@ static void switch_load_core_config(const char *file)
}
} else if (!strcasecmp(var, "max-audio-channels") && !zstr(val)) {
switch_core_max_audio_channels(atoi(val));
} else if (!strcasecmp(var, "ignore_application_channel_update") && !zst(val)) {
runtime.ignore_application_channel_update = switch_true(val);
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/switch_core_sqldb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,8 @@ static void core_event_handler(switch_event_t *event)
case SWITCH_EVENT_CHANNEL_UNHOLD:
case SWITCH_EVENT_CHANNEL_EXECUTE: {

new_sql() = switch_mprintf("update channels set application='%q',application_data='%q',"
if (!runtime.ignore_application_channel_update) {
new_sql() = switch_mprintf("update channels set application='%q',application_data='%q',"
"presence_id='%q',presence_data='%q',accountcode='%q' where uuid='%q'",
switch_event_get_header_nil(event, "application"),
switch_event_get_header_nil(event, "application-data"),
Expand All @@ -2520,7 +2521,7 @@ static void core_event_handler(switch_event_t *event)
switch_event_get_header_nil(event, "variable_accountcode"),
switch_event_get_header_nil(event, "unique-id")
);

}
}
break;

Expand Down