mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-09 16:06:53 -07:00
Merge "app_queue: fix Calculate talktime when is first call answered" into 11
This commit is contained in:
+7
-3
@@ -4950,9 +4950,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->callscompletedinsl == 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user