FS-2787
This commit is contained in:
parent
afaf1fac05
commit
6772c795e0
|
@ -3406,7 +3406,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_NAT_OPTIONS_PING);
|
||||
}
|
||||
} else if (!strcasecmp(var, "all-options-ping")) {
|
||||
} else if (!strcasecmp(var, "all-reg-options-ping")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_ALL_REG_OPTIONS_PING);
|
||||
} else {
|
||||
|
|
|
@ -676,14 +676,16 @@ void sofia_reg_check_expire(sofia_profile_t *profile, time_t now, int reboot)
|
|||
if (sofia_test_pflag(profile, PFLAG_ALL_REG_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 hostname='%s'", mod_sofia_globals.hostname);
|
||||
" from sip_registrations where hostname='%s' and "
|
||||
"profile_name='%s'", mod_sofia_globals.hostname, profile->name);
|
||||
|
||||
sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_reg_nat_callback, profile);
|
||||
} else if (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 '%%NAT%%' "
|
||||
"or contact like '%%fs_nat=yes%%') and hostname='%s'", mod_sofia_globals.hostname);
|
||||
"or contact like '%%fs_nat=yes%%') and hostname='%s' "
|
||||
"and profile_name='%s'", mod_sofia_globals.hostname, profile->name);
|
||||
|
||||
sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_reg_nat_callback, profile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue