#define QUEUE_FLAG_LEAVEWHENEMPTY (1 << 11) /* If all agents leave the queue, remove callers from the queue */
#define QUEUE_FLAG_REPORTHOLDTIME (1 << 12) /* Should we report caller hold time to answering member? */
#define QUEUE_FLAG_WRAPPED (1 << 13) /* Round Robin - wrapped around? */
+#define QUEUE_FLAG_TIMEOUTRESTART (1 << 14) /* Restart timer when member call */
/* We define a custom "local user" structure because we
use it not only for keeping track of what is in use but
ast_cdr_busy(in->cdr);
ast_hangup(o->chan);
o->chan = NULL;
- if (qe->parent->strategy)
+ if (qe->parent->strategy) {
+ if (ast_test_flag(qe->parent, QUEUE_FLAG_TIMEOUTRESTART))
+ *to = orig;
ring_one(qe, outgoing, &numbusies);
+ }
numbusies++;
break;
case AST_CONTROL_CONGESTION:
ast_cdr_busy(in->cdr);
ast_hangup(o->chan);
o->chan = NULL;
- if (qe->parent->strategy)
+ if (qe->parent->strategy) {
+ if (ast_test_flag(qe->parent, QUEUE_FLAG_TIMEOUTRESTART))
+ *to = orig;
ring_one(qe, outgoing, &numbusies);
+ }
numbusies++;
break;
case AST_CONTROL_RINGING:
o->stillgoing = 0;
ast_hangup(o->chan);
o->chan = NULL;
- if (qe->parent->strategy)
+ if (qe->parent->strategy) {
+ if (ast_test_flag(qe->parent, QUEUE_FLAG_TIMEOUTRESTART))
+ *to = orig;
ring_one(qe, outgoing, &numbusies);
+ }
}
}
o = o->next;
q->weight = atoi(var->value);
if (q->weight)
use_weight++;
+ } else if (!strcasecmp(var->name, "timeoutrestart")) {
+ ast_set2_flag(q, ast_true(var->value), QUEUE_FLAG_TIMEOUTRESTART);
} else {
ast_log(LOG_WARNING, "Unknown keyword in queue '%s': %s at line %d of queue.conf\n", cat, var->name, var->lineno);
}
;
; memberdelay = 0
;
+; If timeoutrestart is set to yes, then the timeout for an agent to answer is
+; reset if a BUSY or CONGESTION is received. This can be useful if agents
+; are able to cancel a call with reject or similar.
+;
+; timeoutrestart = no
+;
; 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