Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 42422) +++ apps/app_queue.c (working copy) @@ -240,6 +240,9 @@ #define PM_MAX_LEN 8192 /*! \brief queues.conf [general] option */ +static int queue_keep_stats = 0; + +/*! \brief queues.conf [general] option */ static int queue_persistent_members = 0; /*! \brief queues.conf per-queue weight option */ @@ -3686,6 +3689,9 @@ while ((cat = ast_category_browse(cfg, cat)) ) { if (!strcasecmp(cat, "general")) { /* Initialize global settings */ + queue_keep_stats = 0; + if ((general_val = ast_variable_retrieve(cfg, "general", "keepstats"))) + queue_keep_stats = ast_true(general_val); queue_persistent_members = 0; if ((general_val = ast_variable_retrieve(cfg, "general", "persistentmembers"))) queue_persistent_members = ast_true(general_val); @@ -3715,7 +3721,8 @@ ast_mutex_lock(&q->lock); /* Re-initialize the queue, and clear statistics */ init_queue(q); - clear_queue(q); + if (!queue_keep_stats) + clear_queue(q); for (cur = q->members; cur; cur = cur->next) { if (!cur->dynamic) { cur->delme = 1; Index: configs/queues.conf.sample =================================================================== --- configs/queues.conf.sample (revision 42422) +++ configs/queues.conf.sample (working copy) @@ -8,6 +8,11 @@ ; read into their recorded queues. Default is 'yes'. ; persistentmembers = yes +; +; Keep Stats +; Keep queue statistics during a reload. Default is 'no' +; +keepstats = no ; ; AutoFill Behavior ; The old/current behavior of the queue has a serial type behavior