Skip to content

Commit

Permalink
WTEL-4057
Browse files Browse the repository at this point in the history
  • Loading branch information
navrotskyj committed Dec 1, 2023
1 parent 531b35b commit 11e3a7b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions external_commands/grpc/call_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func (c *CallConnection) NewCallContext(ctx context.Context, settings *model.Cal
Context: settings.Context,
Dialplan: settings.Dialplan,
Variables: settings.Variables,
CheckId: settings.CheckParentId,
}

if len(settings.Applications) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/webitel/engine v0.0.0-20230929132314-e8f08f52c140
github.com/webitel/flow_manager v0.0.0-20230928094914-a9c915fbadcb
github.com/webitel/protos/cc v0.0.0-20231016113342-4e297ed227c4
github.com/webitel/protos/fs v0.0.0-20230919101002-a30f21070914
github.com/webitel/protos/fs v0.0.0-20231201134013-7935e1a08885
github.com/webitel/protos/workflow v0.0.0-20230919101002-a30f21070914
github.com/webitel/wlog v0.0.0-20220608103744-93b33e61bd28
golang.org/x/sync v0.3.0
Expand Down
23 changes: 12 additions & 11 deletions model/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,17 +318,18 @@ type CallRequestApplication struct {
}

type CallRequest struct {
Id *string
Endpoints []string
Strategy uint8
Destination string
Variables map[string]string
Timeout uint16
CallerName string
CallerNumber string
Dialplan string
Context string
Applications []*CallRequestApplication
Id *string
Endpoints []string
Strategy uint8
Destination string
Variables map[string]string
Timeout uint16
CallerName string
CallerNumber string
Dialplan string
Context string
Applications []*CallRequestApplication
CheckParentId string
}

func (cr *CallRequest) SetPush() {
Expand Down
4 changes: 4 additions & 0 deletions queue/queue_call_progressive.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ func (queue *ProgressiveCallQueue) run(attempt *Attempt, team *agentTeam, agent
},
})
cr.Variables["wbt_parent_id"] = mCall.Id()
cr.CheckParentId = mCall.Id()

agentCall = mCall.NewCall(cr)
attempt.agentChannel = agentCall

Expand Down Expand Up @@ -229,7 +231,9 @@ func (queue *ProgressiveCallQueue) run(attempt *Attempt, team *agentTeam, agent
if agentCall.HangupAt() == 0 {
agentCall.Hangup(model.CALL_HANGUP_LOSE_RACE, false, nil)
}
calling = false
printfIfErr(err)
continue
}

//fixme refactor
Expand Down

0 comments on commit 11e3a7b

Please sign in to comment.