register for nat handling -->
<!-- <param name="NDLB-received-in-nat-reg-contact" value="true"/> -->
<param name="auth-calls" value="$${internal_auth_calls}"/>
- <!-- <param name="auth-messages" value="false"/> -->
<!-- <param name="auth-subscriptions" value="false"/> -->
<!-- Force the user and auth-user to match. -->
<param name="inbound-reg-force-matching-username" value="true"/>
<!-- on authed calls, authenticate *all* the packets not just invite -->
<param name="auth-all-packets" value="false"/>
+ <!-- NOTICE: auth-messages was deprecated and authentication is enabled by default now.
+ See disable-auth-messages param for more details. -->
+ <!-- <param name="auth-messages" value="false"/> -->
+ <!-- Uncomment to stop authentication on message packets.
+ By default authentication is enabled.
+ disable-auth-messages param has higher priority than the deprecated auth-messages param. -->
+ <!-- <param name="disable-auth-messages" value="true"/> -->
<!-- external_sip_ip
Used as the public IP address for SDP.
sofia_profile_start_failure(NULL, xprofilename);
} else {
switch_memory_pool_t *pool = NULL;
+ char *auth_messages_value = NULL;
+ uint8_t disable_auth_flag = 0;
if (!xprofilename) {
xprofilename = "unnamed";
sofia_clear_pflag(profile, PFLAG_AUTH_CALLS);
}
} else if (!strcasecmp(var, "auth-messages")) {
+ auth_messages_value = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "disable-auth-messages")) {
if (switch_true(val)) {
- sofia_set_pflag(profile, PFLAG_AUTH_MESSAGES);
- } else {
sofia_clear_pflag(profile, PFLAG_AUTH_MESSAGES);
+ } else {
+ sofia_set_pflag(profile, PFLAG_AUTH_MESSAGES);
}
+
+ disable_auth_flag = 1;
} else if (!strcasecmp(var, "auth-subscriptions")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_AUTH_SUBSCRIPTIONS);
}
}
+ if (!disable_auth_flag) {
+ if (!auth_messages_value || switch_true(auth_messages_value)) {
+ sofia_set_pflag(profile, PFLAG_AUTH_MESSAGES);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_AUTH_MESSAGES);
+ }
+ }
+
if (sofia_test_flag(profile, TFLAG_ZRTP_PASSTHRU) && !sofia_test_flag(profile, TFLAG_LATE_NEGOTIATION)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ZRTP passthrough implictly enables inbound-late-negotiation\n");
sofia_set_flag(profile, TFLAG_LATE_NEGOTIATION);