Skip to content

Commit

Permalink
Merge pull request #66 from webitel/v24.04
Browse files Browse the repository at this point in the history
DEV-3703
  • Loading branch information
navrotskyj authored Jun 24, 2024
2 parents a7ad293 + c6fa293 commit 0ecf7ba
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions queue/call_predict.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,25 +392,25 @@ func (queue *PredictCallQueue) runOfferingAgents(attempt *Attempt, mCall call_ma

case call_manager.CALL_STATE_ACCEPT:
attempt.Emit(AttemptHookBridgedAgent, agentCall.Id())
time.Sleep(time.Millisecond * 250)
time.Sleep(time.Millisecond * 200)
if err = agentCall.Bridge(mCall); err != nil {
if agentCall.HangupAt() == 0 {
agentCall.Hangup(model.CALL_HANGUP_LOSE_RACE, false, nil)
}
printfIfErr(err)
}

if queue.AllowGreetingAgent && agent.GreetingMedia() != nil {
mCall.BroadcastPlaybackFile(agent.DomainId(), agent.GreetingMedia(), "both")
} else if queue.AutoAnswer() {
agentCall.BroadcastTone(queue.AutoAnswerTone, "aleg")
}
} else {
if queue.AllowGreetingAgent && agent.GreetingMedia() != nil {
mCall.BroadcastPlaybackFile(agent.DomainId(), agent.GreetingMedia(), "both")
} else if queue.AutoAnswer() {
agentCall.BroadcastTone(queue.AutoAnswerTone, "aleg")
}

if queue.transferAfter != "" {
mCall.SerVariables(map[string]string{
model.CallVarTransferAfter: queue.transferAfter,
"hangup_after_bridge": "false",
})
if queue.transferAfter != "" {
mCall.SerVariables(map[string]string{
model.CallVarTransferAfter: queue.transferAfter,
"hangup_after_bridge": "false",
})
}
}

case call_manager.CALL_STATE_HANGUP:
Expand Down

0 comments on commit 0ecf7ba

Please sign in to comment.