From a06a1af0eb17428f5b929e1b6b76854a21a84500 Mon Sep 17 00:00:00 2001 From: Alexei Gradinari Date: Mon, 8 Aug 2016 13:53:32 -0400 Subject: res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack The PJSIP taskprocessors could be overflowed on startup if there are many (thousands) realtime endpoints configured with unsolicited mwi. The PJSIP stack could be totally unresponsive for a few minutes after boot completed. This patch creates a separate PJSIP serializers pool for mwi and makes unsolicited mwi use serializers from this pool. This patch also adds 2 new global options to tune taskprocessor alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'. This patch also adds new global option 'mwi_disable_initial_unsolicited' to disable sending unsolicited mwi to all endpoints on startup. If disabled then unsolicited mwi will start processing on next endpoint's contact update. ASTERISK-26230 #close Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a --- configs/samples/pjsip.conf.sample | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'configs') diff --git a/configs/samples/pjsip.conf.sample b/configs/samples/pjsip.conf.sample index 0f279c34d..2851945ed 100644 --- a/configs/samples/pjsip.conf.sample +++ b/configs/samples/pjsip.conf.sample @@ -956,6 +956,27 @@ ; set to this value if there is no better option (such as ; auth/realm) to be used + ; Asterisk Task Processor Queue Size + ; On heavy loaded system with DB storage you may need to increase + ; taskprocessor queue. + ; If the taskprocessor queue size reached high water level, + ; the alert is triggered. + ; If the alert is set the pjsip distibutor stops processing incoming + ; requests until the alert is cleared. + ; The alert is cleared when taskprocessor queue size drops to the + ; low water clear level. + ; The next options set taskprocessor queue levels for MWI. +;mwi_tps_queue_high=500 ; Taskprocessor high water alert trigger level. +;mwi_tps_queue_low=450 ; Taskprocessor low water clear alert level. + ; The default is -1 for 90% of high water level. + + ; Unsolicited MWI + ; If there are endpoints configured with unsolicited MWI + ; then res_pjsip_mwi module tries to send MWI to all endpoints on startup. +;mwi_disable_initial_unsolicited=no ; Disable sending unsolicited mwi to all endpoints on startup. + ; If disabled then unsolicited mwi will start processing + ; on the endpoint's next contact update. + ; MODULE PROVIDING BELOW SECTION(S): res_pjsip_acl ;==========================ACL SECTION OPTIONS========================= ;[acl] -- cgit v1.2.3