summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorCarlos Oliva <carlos.oliva@invoxcontact.com>2015-12-14 13:26:35 +0100
committerCarlos Oliva <carlos.oliva@invoxcontact.com>2015-12-14 17:21:27 +0100
commit3e7522533c7f7e147f792614128cc375a89e02cf (patch)
tree055a17aedd1678d25b187941ab3b11fa3a9229fb /apps
parentceebdfce40d278d17ecfb82afdffc41a8cc1cc94 (diff)
app_queue: update RT members when the 1st call joins a queue with no agents
If a call enters on a queue and the members on that queue are updated in realtime (ex: using mysql inserting a new agent) the queue members are never refreshed and the call will stay in the queue until other event occurs. This happens only if this is the first call of the queue and there is no agents servicing. This patch prevent this issue, ensuring realtime members are updated if there is one call in the queue and no available agents ASTERISK-25442 #close Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index a2ed2c924..416ebff4a 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5214,6 +5214,11 @@ static int is_our_turn(struct queue_ent *qe)
res = 0;
}
+ /* Update realtime members if this is the first call and number of avalable members is 0 */
+ if (avl == 0 && qe->pos == 1) {
+ update_realtime_members(qe->parent);
+ }
+
return res;
}