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
This commit is contained in:
Alexei Gradinari
2016-08-08 13:53:32 -04:00
parent 9042ad40f2
commit 403b63571c
7 changed files with 333 additions and 6 deletions

View File

@@ -389,6 +389,15 @@ app_voicemail
Additional information can be found in the sample configuration file at
config/samples/voicemail.conf.sample.
res_pjsip_mwi
------------------
* Added "mwi_tps_queue_high" and "mwi_tps_queue_low" global configuration
options to tune taskprocessor alert levels.
* Added "mwi_disable_initial_unsolicited" global configuration option
to disable sending unsolicited MWI to all endpoints on startup.
Additional information can be found in the sample configuration file at
config/samples/pjsip.conf.sample.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 13.10.0 to Asterisk 13.11.0 ----------
------------------------------------------------------------------------------