]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix Queue Log Reporting Every Call COMPLETECALLER With "h" Extension Present
authorMatthew Jordan <mjordan@digium.com>
Tue, 27 May 2014 17:02:30 +0000 (17:02 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 27 May 2014 17:02:30 +0000 (17:02 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/certified/branches/1.8.15@414562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 63f944999a68d5dbb3f87b82d480366e37feb4d8..f2943c368b7e598bdbb4aa3cb44865f5f7959beb 100644 (file)
@@ -5239,7 +5239,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
 
                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
@@ -5255,7 +5255,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                                        qe->chan->exten, qe->chan->context, (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, qe->chan->uniqueid, 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);