mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 18:30:01 +00:00
FS-5676 --resolve
This commit is contained in:
parent
fa8392a8c0
commit
52cd5fdad1
@ -313,6 +313,7 @@ struct fifo_node {
|
|||||||
int ring_timeout;
|
int ring_timeout;
|
||||||
int default_lag;
|
int default_lag;
|
||||||
char *domain_name;
|
char *domain_name;
|
||||||
|
int retry_delay;
|
||||||
struct fifo_node *next;
|
struct fifo_node *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1576,7 +1577,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
|
|||||||
"outbound_fail_count=outbound_fail_count+1, "
|
"outbound_fail_count=outbound_fail_count+1, "
|
||||||
"outbound_fail_total_count = outbound_fail_total_count+1, "
|
"outbound_fail_total_count = outbound_fail_total_count+1, "
|
||||||
"next_avail=%ld + lag + 1 where uuid='%q' and ring_count > 0",
|
"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);
|
fifo_execute_sql_queued(&sql, SWITCH_TRUE, SWITCH_TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1755,7 +1756,7 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
|
|||||||
|
|
||||||
sql = switch_mprintf("update fifo_outbound set ring_count=ring_count-1, "
|
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'",
|
"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);
|
fifo_execute_sql_queued(&sql, SWITCH_TRUE, SWITCH_TRUE);
|
||||||
|
|
||||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
|
||||||
@ -4437,6 +4438,16 @@ static switch_status_t load_config(int reload, int del_all)
|
|||||||
node->has_outbound = 1;
|
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"))) {
|
if ((val = switch_xml_attr(fifo, "outbound_priority"))) {
|
||||||
outbound_priority = atoi(val);
|
outbound_priority = atoi(val);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user