From 946c4ee50c11bb83ff5b71ffa4fc95163c28f735 Mon Sep 17 00:00:00 2001 From: Troy Denton Date: Sun, 16 Aug 2020 21:10:48 -0500 Subject: [PATCH] add delay after originator_cancel to prevent erratic behaviour --- src/mod/applications/mod_callcenter/mod_callcenter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index f59b744098..5909cd3ccf 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -2128,7 +2128,10 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa switch (cause) { /* When we hang-up agents that did not answer in ring-all strategy */ case SWITCH_CAUSE_LOSE_RACE: + break; + /* originator cancel can happen when agent changes state during offering*/ case SWITCH_CAUSE_ORIGINATOR_CANCEL: + delay_next_agent_call = (h->busy_delay_time > delay_next_agent_call? h->busy_delay_time : delay_next_agent_call); break; /* Busy: Do Not Disturb, Circuit congestion */ case SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION: