# Queue Priority Distribution

**URL:** <https://community.asterisk.org/t/queue-priority-distribution/72335>\
**Category:** Asterisk Support\
**Created:** [October 17, 2017, 7:56am UTC](https://community.asterisk.org/t/queue-priority-distribution/72335 "2017-10-17T07:56:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![faqterson](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@faqterson](https://community.asterisk.org/u/faqterson)\
**Post date:** [October 17, 2017, 7:56am UTC](https://community.asterisk.org/t/queue-priority-distribution/72335/1 "2017-10-17T07:56:36Z")

</div>

Hi

I need to find out how callers are prioritized in multiple queues. Exp: You have 2 queues all with the same agents, in each queue you have a caller waiting in the queue, caller 1 in queue 2 waiting 30 seconds, caller 2 in queue 1 wating 15 seconds. Which caller will get processed first, will it be caller 1 that waited longer or will queue 1 be processed first since its queues has a lower alphabetical value.

Can any one assist with understand queue distribution between multiple queues?

Regards

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [October 17, 2017, 9:47am UTC](https://community.asterisk.org/t/queue-priority-distribution/72335/2 "2017-10-17T09:47:15Z")

</div>

If the queues have the same weight, the answer is indeterminate.

Each second, each queued job tries to find an agent. If there is a higher weight queue with the same agent, which also has jobs, and there are more jobs than free agents, it will skip a turn (although this begins to go wrong if you have to recurse). If not, it will take the agent.
