diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-02-13 16:53:29 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-02-13 16:53:29 +0000 |
commit | ab61f6ec1694b0d034d58e68d54e4eb918fc6181 (patch) | |
tree | 736d7f35eb16125bf920787511326188d4f21750 /apps | |
parent | d8d5a9a18062155d3a1ce0dde10811b010567741 (diff) |
Properly differentiate between caller and agent hangups (bug #3578)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5018 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_queue.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index a12cf6899..d75848472 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1557,7 +1557,7 @@ static int try_calling(struct queue_ent *qe, char *ooptions, char *announceoverr } } res2 |= ast_autoservice_stop(qe->chan); - if (res2) { + if (peer->_softhangup) { /* Agent must have hung up */ ast_log(LOG_WARNING, "Agent on %s hungup on the customer. They're going to be pissed.\n", peer->name); ast_queue_log(queuename, qe->chan->uniqueid, peer->name, "AGENTDUMP", "%s", ""); @@ -1570,6 +1570,13 @@ static int try_calling(struct queue_ent *qe, char *ooptions, char *announceoverr queuename, qe->chan->uniqueid, peer->name, member->interface); } ast_hangup(peer); + goto out; + } else if (res2) { + /* Caller must have hung up just before being connected*/ + 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, peer->name, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long)time(NULL) - qe->start); + record_abandoned(qe); + ast_hangup(peer); return -1; } } |