add enable-chat sofia profile param which defaults to true when not present, set to false to turn off the chat interface in sofia

This commit is contained in:
Anthony Minessale
2014-04-19 12:29:00 -05:00
parent f408dae2af
commit 79ebcb104b
4 changed files with 15 additions and 1 deletions
+7
View File
@@ -3982,6 +3982,7 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
profile->client_rport_level = 1;
profile->tls_cert_dir = SWITCH_GLOBAL_dirs.certs_dir;
sofia_set_pflag(profile, PFLAG_DISABLE_100REL);
sofia_set_pflag(profile, PFLAG_ENABLE_CHAT);
profile->auto_restart = 1;
sofia_set_media_flag(profile, SCMF_AUTOFIX_TIMING);
sofia_set_media_flag(profile, SCMF_RENEG_ON_REINVITE);
@@ -4179,6 +4180,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
} else {
sofia_clear_pflag(profile, PFLAG_IN_DIALOG_CHAT);
}
} else if (!strcasecmp(var, "enable-chat")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_ENABLE_CHAT);
} else {
sofia_clear_pflag(profile, PFLAG_ENABLE_CHAT);
}
} else if (!strcasecmp(var, "fire-message-events")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_FIRE_MESSAGE_EVENTS);