Skip to content

Commit

Permalink
Merge pull request #46 from webitel/v23.09
Browse files Browse the repository at this point in the history
[progressive] race invite & hangup
  • Loading branch information
navrotskyj authored Nov 29, 2023
2 parents 0bcf9b9 + 88c229a commit 531b35b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions queue/queue_call_progressive.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@ func (queue *ProgressiveCallQueue) run(attempt *Attempt, team *agentTeam, agent

go queue.HangupManyCall(mCall.Id(), model.CALL_HANGUP_ORIGINATOR_CANCEL, cnt...)

//todo
if mCall.HangupCause() != "" {
calling = false
continue
}

if queue.HasRingtone() {
mCall.ParkPlaybackFile(queue.domainId, queue.Ringtone(), "aleg")
}
Expand All @@ -211,8 +205,13 @@ func (queue *ProgressiveCallQueue) run(attempt *Attempt, team *agentTeam, agent
agentCall = mCall.NewCall(cr)
attempt.agentChannel = agentCall

printfIfErr(agentCall.Invite())
//todo
if mCall.HangupCause() != "" {
calling = false
continue
}

printfIfErr(agentCall.Invite())
wlog.Debug(fmt.Sprintf("call [%s] && agent [%s]", mCall.Id(), agentCall.Id()))

top:
Expand Down Expand Up @@ -316,6 +315,7 @@ func (queue *ProgressiveCallQueue) run(attempt *Attempt, team *agentTeam, agent
team.Reporting(queue, attempt, agent, agentCall.ReportingAt() > 0, agentCall.Transferred())
} else {
if agentCall.HangupAt() == 0 && agentCall.TransferTo() == nil && mCall.HangupAt() > 0 {
time.Sleep(time.Millisecond * 200) // todo WTEL-4057
agentCall.Hangup(model.CALL_HANGUP_ORIGINATOR_CANCEL, false, nil)
}
//FIXME cancel if progressive cnt > 1
Expand Down

0 comments on commit 531b35b

Please sign in to comment.