Skip to content

Commit

Permalink
skip hanging up queued call during transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
osxi committed Jul 19, 2024
1 parent 987bba2 commit 3b846fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/electric_slide/call_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 3b846fe

Please sign in to comment.