]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't refuse invites on established sessions due to session limits
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Mar 2014 18:46:26 +0000 (23:46 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Mar 2014 18:46:26 +0000 (23:46 +0500)
src/mod/endpoints/mod_sofia/sofia.c

index 09d66c7ae2c970f922226dfb72e66c0eb33c7d02..8344a842b17d0fbdd7adf24eba425b88fe040202 100644 (file)
@@ -2061,21 +2061,24 @@ void sofia_event_callback(nua_event_t event,
        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) > (unsigned int)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) > (unsigned int)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: