diff --git a/include/asterisk/taskprocessor.h b/include/asterisk/taskprocessor.h
index 06368867a8f309d24666b1a7941d6fa3380a4108..6ebf0729cc7669dba73f071578787eee42291f67 100644
--- a/include/asterisk/taskprocessor.h
+++ b/include/asterisk/taskprocessor.h
@@ -56,6 +56,8 @@
 
 struct ast_taskprocessor;
 
+#define AST_TASKPROCESSOR_HIGH_WATER_LEVEL 500
+
 /*!
  * \brief ast_tps_options for specification of taskprocessor options
  *
diff --git a/main/taskprocessor.c b/main/taskprocessor.c
index cdac2c8a002fbb1e7a759993b4e258d9e6da9143..c8897c65db0ac9750435fd88cfa6568ec4209f49 100644
--- a/main/taskprocessor.c
+++ b/main/taskprocessor.c
@@ -714,8 +714,6 @@ void *ast_taskprocessor_unreference(struct ast_taskprocessor *tps)
 	return NULL;
 }
 
-#define HIGH_WATER_LEVEL 100
-
 /* push the task into the taskprocessor queue */
 static int taskprocessor_push(struct ast_taskprocessor *tps, struct tps_task *t)
 {
@@ -736,7 +734,7 @@ static int taskprocessor_push(struct ast_taskprocessor *tps, struct tps_task *t)
 	AST_LIST_INSERT_TAIL(&tps->tps_queue, t, list);
 	previous_size = tps->tps_queue_size++;
 
-	if (previous_size >= HIGH_WATER_LEVEL && !tps->high_water_warned) {
+	if (previous_size >= AST_TASKPROCESSOR_HIGH_WATER_LEVEL && !tps->high_water_warned) {
 		ast_log(LOG_WARNING, "The '%s' task processor queue reached %d scheduled tasks.\n",
 			tps->name, previous_size);
 		tps->high_water_warned = 1;
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index 32f6154f07d9639b48e0036f4e57a936d0302007..ea7419b6eec4fb77c8092f6d41a18db9b4cf9e23 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -245,7 +245,7 @@ static pjsip_module endpoint_mod = {
 	.on_rx_request = endpoint_lookup,
 };
 
-#define SIP_MAX_QUEUE 500L
+#define SIP_MAX_QUEUE (AST_TASKPROCESSOR_HIGH_WATER_LEVEL * 3)
 
 static pj_bool_t distributor(pjsip_rx_data *rdata)
 {