summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael L. Young <elgueromexicano@gmail.com>2013-01-03 22:14:20 +0000
committerMichael L. Young <elgueromexicano@gmail.com>2013-01-03 22:14:20 +0000
commit8c0d7005f3afb614865b8cbe1e5f33cd309cbb68 (patch)
treedb78785b8876f867e5d7545f7a2c75280f8ec404
parent1d685bd28ca64f6093ae86d0fe2974612c05f1cd (diff)
Fix Queue Log Reporting Every Call COMPLETECALLER With "h" Extension Present
When the "h" extension is present within the context of the queue, all calls are being reported COMPLETECALLER even when the agent is hanging up the call. This patch checks to see if the agent hung-up or not instead of only relying on checking if the queue (caller) channel hung-up or not. It would appear that having the h extension in the mix, the pbx goes to the h extension, "hanging-up" the queue channel and triggering the reporting of COMPLETECALLER. (closes issue ASTERISK-20743) Reported by: call Tested by: call, Michael L. Young Patches: asterisk-20743-q-cmplt-caller.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2256/ ........ Merged revisions 378514 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378515 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c0daff4b6..2a15d1973 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5818,7 +5818,7 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
time(&callstart);
transfer_ds = setup_transfer_datastore(qe, member, callstart, callcompletedinsl);
- bridge = ast_bridge_call(qe->chan,peer, &bridge_config);
+ bridge = ast_bridge_call(qe->chan, peer, &bridge_config);
/* If the queue member did an attended transfer, then the TRANSFER already was logged in the queue_log
* when the masquerade occurred. These other "ending" queue_log messages are unnecessary, except for
@@ -5834,7 +5834,7 @@ static int try_calling(struct queue_ent *qe, const struct ast_flags opts, char *
ast_channel_exten(qe->chan), ast_channel_context(qe->chan), (long) (callstart - qe->start),
(long) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
- } else if (ast_check_hangup(qe->chan)) {
+ } else if (ast_check_hangup(qe->chan) && !ast_check_hangup(peer)) {
ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "COMPLETECALLER", "%ld|%ld|%d",
(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);