mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update AgentV1DisconnectSession api signature
Will accept utils.CGREvent instead of utils.AttrDisconnectSession as a parameter. SessionSv1.ForceDisconnect will take utils.SessionFilterWithEvent as a parameter instead of *utils.SessionFilter. Added possibility to pass DisconnectCause as an Event parameter. The forceSTerminate that's called when the session timer expires will have DisconnectCause 'SESSION_TIMEOUT' instead of 'FORCED_DISCONNECT'. Added Dispatcher methods for AlterSessions. Event will be merged with EventStart of the session before being sent to AgentV1DisconnectSession.
This commit is contained in:
committed by
Dan Christian Bogos
parent
41b9b719d5
commit
ee98dbe0ca
@@ -34,13 +34,13 @@ import (
|
||||
|
||||
var (
|
||||
brpc *birpc.BirpcClient
|
||||
disconnectEvChan = make(chan *utils.AttrDisconnectSession, 1)
|
||||
disconnectEvChan = make(chan utils.CGREvent, 1)
|
||||
)
|
||||
|
||||
type smock struct{}
|
||||
|
||||
func (*smock) DisconnectSession(ctx *context.Context,
|
||||
args *utils.AttrDisconnectSession, reply *string) error {
|
||||
args utils.CGREvent, reply *string) error {
|
||||
disconnectEvChan <- args
|
||||
*reply = utils.OK
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user