Merge "app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON"

pull/7/head
Joshua Colp 8 years ago committed by Gerrit Code Review
commit 95c6b98acf

@ -5465,7 +5465,8 @@ static int wait_our_turn(struct queue_ent *qe, int ringing, enum queue_result *r
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) { if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY; *reason = QUEUE_LEAVEEMPTY;
ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start)); ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
leave_queue(qe); res = -1;
qe->handled = -1;
break; break;
} }
} }
@ -6803,6 +6804,7 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer)); ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start)); ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
record_abandoned(qe); record_abandoned(qe);
qe->handled = -1;
ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer))); ast_channel_publish_dial(qe->chan, peer, member->interface, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
ast_autoservice_chan_hangup_peer(qe->chan, peer); ast_autoservice_chan_hangup_peer(qe->chan, peer);
ao2_ref(member, -1); ao2_ref(member, -1);

Loading…
Cancel
Save