From 3b846feff3517093ef336788d8b5295c4db7569c Mon Sep 17 00:00:00 2001 From: Zachary Ngo Date: Fri, 19 Jul 2024 14:34:11 -0500 Subject: [PATCH] skip hanging up queued call during transfers --- lib/electric_slide/call_queue.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/electric_slide/call_queue.rb b/lib/electric_slide/call_queue.rb index f024013..cb814ce 100644 --- a/lib/electric_slide/call_queue.rb +++ b/lib/electric_slide/call_queue.rb @@ -389,7 +389,9 @@ def call_agent(agent, queued_call) agent_call.on_unjoined do ignoring_ended_calls { agent_call.hangup } - ignoring_ended_calls { queued_call.hangup } + ignoring_ended_calls do + queued_call.hangup if queued_call[:call_transferring_to].blank? + end end # Track whether the agent actually talks to the queued_call @@ -403,7 +405,7 @@ def call_agent(agent, queued_call) # Ensure we don't return an agent that was removed or paused old_call = agent.call conditionally_return_agent agent - agent.call = nil if agent_return_method == :manual || agent.call == old_call + agent.call = nil if agent_return_method == :manual || agent.call == old_call agent.callback :disconnect, queue, agent_call, queued_call