diff --git a/config/config_defaults.go b/config/config_defaults.go index 3fa771930..fabec2795 100644 --- a/config/config_defaults.go +++ b/config/config_defaults.go @@ -1184,6 +1184,9 @@ const CGRATES_CFG_JSON = ` "enabled": false, // enables the Janus agent: "url": "/janus", "sessions_conns": ["*internal"], + "janus_conns":[ // instantiate connections to multiple Asterisk servers + {"address": "127.0.0.1:8088", "type": "*ws"} + ], "request_processors": [ // request processors to be applied to Janus messages ], }, diff --git a/config/janusagntcfg.go b/config/janusagntcfg.go index 29ab9fd1f..e7671b56b 100644 --- a/config/janusagntcfg.go +++ b/config/janusagntcfg.go @@ -23,11 +23,18 @@ import ( "github.com/cgrates/rpcclient" ) +// JanusConn represents one connection to Janus server +type JanusConn struct { + Address string // Address to reach Janus + Type string // Connection type +} + // JanusAgentCfg the config for an Janus Agent type JanusAgentCfg struct { Enabled bool URL string SessionSConns []string + JanusConns []*JanusConn // connections towards Janus RequestProcessors []*RequestProcessor }