From: Matthew Nicholson Date: Wed, 12 Aug 2009 23:04:02 +0000 (+0000) Subject: This patch adds additional checking when generating queue log TRANSFER events. X-Git-Tag: 1.4.26.2~4^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b35312b15bad36e3bda58c95db4bb1c673783783;p=thirdparty%2Fasterisk.git This patch adds additional checking when generating queue log TRANSFER events. The additional checks prevent generation of false TRANSFER events in certain situations. (closes issue #14536) Reported by: aragon Patches: queue-log-xfer-fix1.diff uploaded by mnicholson (license 96) Tested by: aragon, mnicholson git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211953 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 63cb4b082e..d254eb2515 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3231,7 +3231,9 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce ast_channel_lock(qe->chan); if (!attended_transfer_occurred(qe->chan)) { struct ast_datastore *tds; - if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) { + + /* detect a blind transfer */ + if (!(qe->chan->_softhangup | peer->_softhangup) && (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten))) { ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld", qe->chan->exten, qe->chan->context, (long) (callstart - qe->start), (long) (time(NULL) - callstart));