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);
} 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);
network_port = switch_event_get_header(message_event, "to_sip_port");
extra_headers = sofia_glue_get_extra_headers_from_event(message_event, SOFIA_SIP_HEADER_PREFIX);
-
+ abort();
if (!to) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing To: header.\n");
goto end;
switch_channel_t *channel = NULL;
+ if (!sofia_test_pflag(profile, PFLAG_ENABLE_CHAT)) {
+ goto end;
+ }
+
+
if (session) {
channel = switch_core_session_get_channel(session);
}