aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-05 20:29:09 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-05 20:29:09 +0000
commit42dda2ebb6ce13b30848ffcfa5912c1bc9503c9a (patch)
treedfb237ec5baff39bd619c6707595c65f2a745552
parentc58732d7e4da0c2d69ce7f23858bff2f81536436 (diff)
Fix situations where queue members could be autopaused unexpectedly
Specifically, this patch prevents us from autopausing members when we receive a busy or congestion frame from them. (closes issue #14376) Reported by: fiddur Patches: 14376.patch uploaded by putnopvut (license 60) Tested by: fiddur git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@173692 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 474ba9d88..18ec1df88 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2069,12 +2069,12 @@ static void record_abandoned(struct queue_ent *qe)
}
/*! \brief RNA == Ring No Answer. Common code that is executed when we try a queue member and they don't answer. */
-static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername)
+static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int pause)
{
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", rnatime);
ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
- if (qe->parent->autopause) {
+ if (qe->parent->autopause && pause) {
if (!set_member_paused(qe->parent->name, interface, 1)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n", interface, qe->parent->name);
@@ -2251,7 +2251,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
do_hang(o);
endtime = (long)time(NULL);
endtime -= starttime;
- rna(endtime*1000, qe, on, membername);
+ rna(endtime * 1000, qe, on, membername, 0);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
if (qe->parent->timeoutrestart)
*to = orig;
@@ -2266,7 +2266,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
ast_cdr_busy(in->cdr);
endtime = (long)time(NULL);
endtime -= starttime;
- rna(endtime*1000, qe, on, membername);
+ rna(endtime * 1000, qe, on, membername, 0);
do_hang(o);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
if (qe->parent->timeoutrestart)
@@ -2289,7 +2289,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
ast_frfree(f);
} else {
endtime = (long) time(NULL) - starttime;
- rna(endtime * 1000, qe, on, membername);
+ rna(endtime * 1000, qe, on, membername, 1);
do_hang(o);
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
if (qe->parent->timeoutrestart)
@@ -2327,7 +2327,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
}
if (!*to) {
for (o = start; o; o = o->call_next)
- rna(orig, qe, o->interface, o->member->membername);
+ rna(orig, qe, o->interface, o->member->membername, 1);
}
}