|
|
|
@ -3116,7 +3116,6 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|
|
|
|
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", peer->name);
|
|
|
|
|
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start);
|
|
|
|
|
record_abandoned(qe);
|
|
|
|
|
ast_cdr_noanswer(qe->chan->cdr);
|
|
|
|
|
ast_hangup(peer);
|
|
|
|
|
ao2_ref(member, -1);
|
|
|
|
|
return -1;
|
|
|
|
@ -4089,7 +4088,6 @@ check_turns:
|
|
|
|
|
/* Leave if we have exceeded our queuetimeout */
|
|
|
|
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_TIMEOUT;
|
|
|
|
|
res = 0;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
|
|
|
|
@ -4108,7 +4106,6 @@ check_turns:
|
|
|
|
|
/* Leave if we have exceeded our queuetimeout */
|
|
|
|
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_TIMEOUT;
|
|
|
|
|
res = 0;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
|
|
|
|
@ -4122,7 +4119,6 @@ check_turns:
|
|
|
|
|
/* Leave if we have exceeded our queuetimeout */
|
|
|
|
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_TIMEOUT;
|
|
|
|
|
res = 0;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
|
|
|
|
@ -4141,7 +4137,6 @@ check_turns:
|
|
|
|
|
ast_verbose(VERBOSE_PREFIX_3 "Exiting on time-out cycle\n");
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_TIMEOUT;
|
|
|
|
|
res = 0;
|
|
|
|
|
break;
|
|
|
|
@ -4150,7 +4145,6 @@ check_turns:
|
|
|
|
|
/* leave the queue if no agents, if enabled */
|
|
|
|
|
if (qe.parent->leavewhenempty && (stat == QUEUE_NO_MEMBERS)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_LEAVEEMPTY;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
|
|
|
|
|
res = 0;
|
|
|
|
@ -4160,7 +4154,6 @@ check_turns:
|
|
|
|
|
/* leave the queue if no reachable agents, if enabled */
|
|
|
|
|
if ((qe.parent->leavewhenempty == QUEUE_EMPTY_STRICT) && (stat == QUEUE_NO_REACHABLE_MEMBERS)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_LEAVEUNAVAIL;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
|
|
|
|
|
res = 0;
|
|
|
|
@ -4170,7 +4163,6 @@ check_turns:
|
|
|
|
|
/* Leave if we have exceeded our queuetimeout */
|
|
|
|
|
if (qe.expire && (time(NULL) >= qe.expire)) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
reason = QUEUE_TIMEOUT;
|
|
|
|
|
res = 0;
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);
|
|
|
|
@ -4202,7 +4194,6 @@ stop:
|
|
|
|
|
if (res < 0) {
|
|
|
|
|
if (!qe.handled) {
|
|
|
|
|
record_abandoned(&qe);
|
|
|
|
|
ast_cdr_noanswer(qe.chan->cdr);
|
|
|
|
|
ast_queue_log(args.queuename, chan->uniqueid, "NONE", "ABANDON",
|
|
|
|
|
"%d|%d|%ld", qe.pos, qe.opos,
|
|
|
|
|
(long) time(NULL) - qe.start);
|
|
|
|
|