Created
November 16, 2015 03:08
-
-
Save roramirez/c332be92f45bc53b6ae4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apps/app_queue.c b/apps/app_queue.c | |
index 862988b..0a2726b 100644 | |
--- a/apps/app_queue.c | |
+++ b/apps/app_queue.c | |
@@ -5400,9 +5400,13 @@ static int update_queue(struct call_queue *q, struct member *member, int callcom | |
if (callcompletedinsl) { | |
q->callscompletedinsl++; | |
} | |
- /* Calculate talktime using the same exponential average as holdtime code*/ | |
- oldtalktime = q->talktime; | |
- q->talktime = (((oldtalktime << 2) - oldtalktime) + newtalktime) >> 2; | |
+ if (q->callscompleted ==1) { | |
+ q->talktime = newtalktime; | |
+ } else { | |
+ /* Calculate talktime using the same exponential average as holdtime code*/ | |
+ oldtalktime = q->talktime; | |
+ q->talktime = (((oldtalktime << 2) - oldtalktime) + newtalktime) >> 2; | |
+ } | |
ao2_unlock(q); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment