} else {
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
}
+ } else if (!strcasecmp(var, "nat-options-ping")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_NAT_OPTIONS_PING);
+ }
} else if (!strcasecmp(var, "inbound-codec-negotiation")) {
if (!strcasecmp(val, "greedy")) {
sofia_set_pflag(profile, PFLAG_GREEDY);
} else {
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
}
+ } else if (!strcasecmp(var, "nat-options-ping")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_NAT_OPTIONS_PING);
+ }
} else if (!strcasecmp(var, "inbound-codec-negotiation")) {
if (!strcasecmp(val, "greedy")) {
sofia_set_pflag(profile, PFLAG_GREEDY);
sofia_glue_actually_execute_sql(profile, SWITCH_FALSE, sql, NULL);
- if (now) {
+ if (now && sofia_test_pflag(profile, PFLAG_NAT_OPTIONS_PING)) {
switch_snprintf(sql, sizeof(sql), "select call_id,sip_user,sip_host,contact,status,rpid,"
"expires,user_agent,server_user,server_host,profile_name"
" from sip_registrations where (status like '%%AUTO-NAT%%' "