[Asterisk-code-review] app queue: update RT members when the 1st call joins a queue... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Sat Dec 19 10:48:05 CST 2015


Matt Jordan has submitted this change and it was merged.

Change subject: app_queue: update RT members when the 1st call joins a queue with no agents
......................................................................


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
---
M apps/app_queue.c
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5a8dcd2..45d0093 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5191,6 +5191,11 @@
 		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;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/1694
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Carlos Oliva <carlos.oliva at invoxcontact.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Carlos Oliva <carlos.oliva at invoxcontact.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list