queue log.
* Added ability for non-realtime queues to have realtime members
* Added the "linear" strategy to queues.
+ * Added the "wrandom" strategy to queues.
MeetMe Changes
--------------
QUEUE_STRATEGY_FEWESTCALLS,
QUEUE_STRATEGY_RANDOM,
QUEUE_STRATEGY_RRMEMORY,
- QUEUE_STRATEGY_LINEAR
+ QUEUE_STRATEGY_LINEAR,
+ QUEUE_STRATEGY_WRANDOM
};
static struct strategy {
{ QUEUE_STRATEGY_RANDOM, "random" },
{ QUEUE_STRATEGY_RRMEMORY, "rrmemory" },
{ QUEUE_STRATEGY_LINEAR, "linear" },
+ { QUEUE_STRATEGY_WRANDOM, "wrandom"},
};
#define DEFAULT_RETRY 5
tmp->metric = ast_random() % 1000;
tmp->metric += mem->penalty * 1000000;
break;
+ case QUEUE_STRATEGY_WRANDOM:
+ tmp->metric = ast_random() % ((1 + mem->penalty) * 1000);
+ break;
case QUEUE_STRATEGY_FEWESTCALLS:
tmp->metric = mem->calls;
tmp->metric += mem->penalty * 1000000;
; linear - rings interfaces in the order specified in this configuration file.
; If you use dynamic members, the members will be rung in the order in
; which they were added
+; wrandom - rings random interface, but uses the member's penalty as a weight
+; when calculating their metric. So a member with penalty 0 will have
+; a metric somewhere between 0 and 1000, and a member with penalty 1 will
+; have a metric between 0 and 2000, and a member with penalty 2 will have
+; a metric between 0 and 3000. Please note, if using this strategy, the member
+; penalty is not the same as when using other queue strategies. It is ONLY used
+; as a weight for calculating metric.
;
;strategy = ringall
;