Index: apps/app_queue.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v retrieving revision 1.76 diff -u -r1.76 app_queue.c --- apps/app_queue.c 14 Jul 2004 07:34:34 -0000 1.76 +++ apps/app_queue.c 23 Jul 2004 21:10:06 -0000 @@ -216,6 +216,7 @@ int rrpos; /* Round Robin - position */ int wrapped; /* Round Robin - wrapped around? */ + int joinempty; /* Do we care if the queue has no members? */ struct member *members; /* Member channels to be tried */ struct queue_ent *head; /* Start of the actual queue */ @@ -280,7 +281,7 @@ if (!strcasecmp(q->name, queuename)) { /* This is our one */ ast_mutex_lock(&q->lock); - if (q->members && (!q->maxlen || (q->count < q->maxlen))) { + if ((q->members || q->joinempty) && (!q->maxlen || (q->count < q->maxlen))) { /* There's space for us, put us at the right position inside * the queue. * Take into account the priority of the calling user */ @@ -1830,6 +1840,8 @@ ast_log(LOG_WARNING, "'%s' isn't a valid strategy, using ringall instead\n", var->value); q->strategy = 0; } + } else if (!strcasecmp(var->name, "joinempty")) { + q->joinempty = ast_true(var->value); } else { ast_log(LOG_WARNING, "Unknown keyword in queue '%s': %s at line %d of queue.conf\n", cat, var->name, var->lineno); } Index: configs/queues.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/queues.conf.sample,v retrieving revision 1.11 diff -u -r1.11 queues.conf.sample --- configs/queues.conf.sample 28 Jun 2004 20:17:20 -0000 1.11 +++ configs/queues.conf.sample 23 Jul 2004 21:10:06 -0000 @@ -107,6 +107,10 @@ ; ; monitor-join = yes ; +; If you wish to allow queues that have no members currently to be joined, set this to yes +; +; joinempty = yes +; ; Each member of this call queue is listed on a separate line in ; the form technology/dialstring. "member" means a normal member of a ; queue. An optional penalty may be specified after a comma, such that