* The /enterprise/ outbound strategy does not preserve the caller ID
* of the caller thereby allowing deliver of callers to agents at the
* fastest possible rate.
+ *
+ * outbound_per_cycle is used to define the maximum number of agents
+ * who will be available to answer a single caller. In ringall this
+ * maximum is the number who will be called, in enterprise the need defines
+ * how many agents will be called. outbound_per_cycle_min will define
+ * the minimum agents who will be called to answer a caller regardless of
+ * need, giving the enterprise strategy the ability to ring through more
+ * than one agent for one caller.
+
*
* ## Manual calls
*
long busy;
int is_static;
int outbound_per_cycle;
+ int outbound_per_cycle_min;
char *outbound_name;
outbound_strategy_t outbound_strategy;
int ring_timeout;
* the results. The enterprise strategy handler can simply take each
* member one at a time, so the `place_call_enterprise_callback` takes
* care of invoking the handler.
+ *
+ * Within the ringall call strategy outbound_per_cycle is used to define
+ * how many agents exactly are assigned to the caller. With ringall if
+ * multiple callers are calling in and one is answered, because the call
+ * is assigned to all agents the call to the agents that is not answered
+ * will be lose raced and the other agents will drop the call before the
+ * next one will begin to ring. When oubound_per_cycle is used in the
+ * enterprise strategy it acts as a maximum value for how many agents
+ * are rung at once on any call, the caller is not assigned to any agent
+ * until the call is answered. Enterprise only rings the number of phones
+ * that are needed, so outbound_per_cycle as a max does not give you the
+ * effect of ringall. outbound_per_cycle_min defines how many agents minimum
+ * will be rung by an incoming caller through fifo, which can give a ringall
+ * effect. outbound_per_cycle and outbound_per_cycle_min both default to 1.
+ *
*/
static void find_consumers(fifo_node_t *node)
{
if (node->outbound_per_cycle && node->outbound_per_cycle < need) {
need = node->outbound_per_cycle;
+ } else if (node->outbound_per_cycle_min && node->outbound_per_cycle_min > need) {
+ need = node->outbound_per_cycle_min;
}
fifo_execute_sql_callback(globals.sql_mutex, sql, place_call_enterprise_callback, &need);
switch_snprintf(tmp, sizeof(buffer), "%u", node->outbound_per_cycle);
switch_xml_set_attr_d(x_fifo, "outbound_per_cycle", tmp);
+ switch_snprintf(tmp, sizeof(buffer), "%u", node->outbound_per_cycle_min);
+ switch_xml_set_attr_d(x_fifo, "outbound_per_cycle_min", tmp);
+
switch_snprintf(tmp, sizeof(buffer), "%u", node->ring_timeout);
switch_xml_set_attr_d(x_fifo, "ring_timeout", tmp);
stream->write_function(stream, "node: %s\n"
" outbound_name: %s\n"
" outbound_per_cycle: %d"
+ " outbound_per_cycle_min: %d"
" outbound_priority: %d"
" outbound_strategy: %s\n"
" has_outbound: %d\n"
" ready: %d\n"
" waiting: %d\n"
,
- node->name, node->outbound_name, node->outbound_per_cycle,
+ node->name, node->outbound_name, node->outbound_per_cycle, node->outbound_per_cycle_min,
node->outbound_priority, print_strategy(node->outbound_strategy),
node->has_outbound,
node->outbound_priority,
node->has_outbound = 1;
}
+ node->outbound_per_cycle_min = 1;
+ if ((val = switch_xml_attr(fifo, "outbound_per_cycle_min"))) {
+ if (!((i = atoi(val)) < 0)) {
+ node->outbound_per_cycle_min = i;
+ }
+ }
+
if ((val = switch_xml_attr(fifo, "retry_delay"))) {
if ((i = atoi(val)) < 0) i = 0;
node->retry_delay = i;