mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 10:26:41 +00:00
don't refuse invites on established sessions due to session limits
Conflicts: src/mod/endpoints/mod_sofia/sofia.c
This commit is contained in:
parent
1aa0ec5f81
commit
c4a5042c92
@ -1818,22 +1818,26 @@ void sofia_event_callback(nua_event_t event,
|
||||
case nua_i_options:
|
||||
case nua_i_notify:
|
||||
case nua_i_info:
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
if (switch_queue_size(mod_sofia_globals.msg_queue) > critical) {
|
||||
nua_respond(nh, 503, "System Busy", SIPTAG_RETRY_AFTER_STR("300"), NUTAG_WITH_THIS(nua), TAG_END());
|
||||
goto end;
|
||||
}
|
||||
if (switch_queue_size(mod_sofia_globals.msg_queue) > critical) {
|
||||
nua_respond(nh, 503, "System Busy", SIPTAG_RETRY_AFTER_STR("300"), NUTAG_WITH_THIS(nua), TAG_END());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_STANDBY)) {
|
||||
nua_respond(nh, 503, "System Paused", NUTAG_WITH_THIS(nua), TAG_END());
|
||||
goto end;
|
||||
if (sofia_test_pflag(profile, PFLAG_STANDBY)) {
|
||||
nua_respond(nh, 503, "System Paused", NUTAG_WITH_THIS(nua), TAG_END());
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user