and available.
(related to issue #10652, reported by wuwu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81520
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
AST_LIST_UNLOCK(&queues);
if (q) {
- count = q->membercount;
+ for (m = q->members; m; m = m->next) {
+ /* Count the agents who are logged in and presently answering calls */
+ if ((m->status != AST_DEVICE_UNAVAILABLE) && (m->status != AST_DEVICE_INVALID)) {
+ count++;
+ }
+ }
ast_mutex_unlock(&q->lock);
} else
ast_log(LOG_WARNING, "queue %s was not found\n", data);