int ring_timeout;
int default_lag;
char *domain_name;
+ int retry_delay;
struct fifo_node *next;
};
"outbound_fail_count=outbound_fail_count+1, "
"outbound_fail_total_count = outbound_fail_total_count+1, "
"next_avail=%ld + lag + 1 where uuid='%q' and ring_count > 0",
- (long) switch_epoch_time_now(NULL), h->uuid);
+ (long) switch_epoch_time_now(NULL) + node->retry_delay, h->uuid);
fifo_execute_sql_queued(&sql, SWITCH_TRUE, SWITCH_TRUE);
}
sql = switch_mprintf("update fifo_outbound set ring_count=ring_count-1, "
"outbound_fail_count=outbound_fail_count+1, next_avail=%ld + lag + 1 where uuid='%q'",
- (long) switch_epoch_time_now(NULL), h->uuid);
+ (long) switch_epoch_time_now(NULL) + node->retry_delay, h->uuid);
fifo_execute_sql_queued(&sql, SWITCH_TRUE, SWITCH_TRUE);
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
node->has_outbound = 1;
}
+ if ((val = switch_xml_attr(fifo, "retry_delay"))) {
+ int tmp;
+
+ if ((tmp = atoi(val)) < 0) {
+ tmp = 0;
+ }
+
+ node->retry_delay = tmp;
+ }
+
if ((val = switch_xml_attr(fifo, "outbound_priority"))) {
outbound_priority = atoi(val);