mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
Merged revisions 173693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r173693 | mmichelson | 2009-02-05 14:30:45 -0600 (Thu, 05 Feb 2009) | 20 lines Merged revisions 173692 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173692 | mmichelson | 2009-02-05 14:29:09 -0600 (Thu, 05 Feb 2009) | 12 lines 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@173694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2447,11 +2447,11 @@ 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. */
|
/*! \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)
|
||||||
{
|
{
|
||||||
ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
|
ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
|
||||||
ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", 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, "Auto-Pause", 1)) {
|
if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
|
||||||
ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n", interface, qe->parent->name);
|
ast_verb(3, "Auto-Pausing Queue Member %s in queue %s since they failed to answer.\n", interface, qe->parent->name);
|
||||||
} else {
|
} else {
|
||||||
@@ -2630,7 +2630,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
do_hang(o);
|
do_hang(o);
|
||||||
endtime = (long) time(NULL);
|
endtime = (long) time(NULL);
|
||||||
endtime -= starttime;
|
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->strategy != QUEUE_STRATEGY_RINGALL) {
|
||||||
if (qe->parent->timeoutrestart)
|
if (qe->parent->timeoutrestart)
|
||||||
*to = orig;
|
*to = orig;
|
||||||
@@ -2644,7 +2644,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
ast_cdr_busy(in->cdr);
|
ast_cdr_busy(in->cdr);
|
||||||
endtime = (long) time(NULL);
|
endtime = (long) time(NULL);
|
||||||
endtime -= starttime;
|
endtime -= starttime;
|
||||||
rna(endtime*1000, qe, on, membername);
|
rna(endtime * 1000, qe, on, membername, 0);
|
||||||
do_hang(o);
|
do_hang(o);
|
||||||
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
|
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
|
||||||
if (qe->parent->timeoutrestart)
|
if (qe->parent->timeoutrestart)
|
||||||
@@ -2666,7 +2666,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
ast_frfree(f);
|
ast_frfree(f);
|
||||||
} else {
|
} else {
|
||||||
endtime = (long) time(NULL) - starttime;
|
endtime = (long) time(NULL) - starttime;
|
||||||
rna(endtime * 1000, qe, on, membername);
|
rna(endtime * 1000, qe, on, membername, 1);
|
||||||
do_hang(o);
|
do_hang(o);
|
||||||
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
|
if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
|
||||||
if (qe->parent->timeoutrestart)
|
if (qe->parent->timeoutrestart)
|
||||||
@@ -2703,7 +2703,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
}
|
}
|
||||||
if (!*to) {
|
if (!*to) {
|
||||||
for (o = start; o; o = o->call_next)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user