Adding sessions.SessionSClient interface, tests for AsteriskAgent, FreeSWITCHAgent and KamailioAgents for interface implementation

This commit is contained in:
DanB
2018-12-11 19:11:39 +01:00
parent 44c6ec2275
commit 56008b7b09
2 changed files with 8 additions and 0 deletions

View File

@@ -26,6 +26,14 @@ import (
"github.com/cgrates/cgrates/utils"
)
// SessionSClient is the interface implemented by Agents which are able to
// communicate bidirectionally with SessionS and remote Communication Switch
type SessionSClient interface {
Call(serviceMethod string, args interface{}, reply interface{}) error
V1DisconnectSession(args utils.AttrDisconnectSession, reply *string) (err error)
V1GetActiveSessionIDs(ignParam string, sessionIDs *[]*SessionID) (err error)
}
// getSessionTTL retrieves SessionTTL setting out of ev
// if SessionTTLMaxDelay is present in ev, the return is randomized
func getSessionTTL(ev *engine.SafEvent, cfgSessionTTL time.Duration,