don't refuse invites on established sessions due to session limits

This commit is contained in:
Anthony Minessale 2014-03-07 23:46:26 +05:00
parent 8d2c6b354e
commit f87ae15fc6
1 changed files with 14 additions and 11 deletions

View File

@ -2061,6 +2061,7 @@ void sofia_event_callback(nua_event_t event,
case nua_i_notify:
case nua_i_info:
if (!sofia_private) {
if (sess_count >= sess_max || !sofia_test_pflag(profile, PFLAG_RUNNING) || !switch_core_ready_inbound()) {
nua_respond(nh, 503, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), NUTAG_WITH_THIS(nua), TAG_END());
goto end;
@ -2076,6 +2077,8 @@ void sofia_event_callback(nua_event_t event,
nua_respond(nh, 503, "System Paused", NUTAG_WITH_THIS(nua), TAG_END());
goto end;
}
}
break;
default: