Adding JanusConn to config

This commit is contained in:
DanB
2024-04-09 14:59:00 +02:00
parent c5c8ca5991
commit 9b87b32abf
2 changed files with 10 additions and 0 deletions

View File

@@ -1184,6 +1184,9 @@ const CGRATES_CFG_JSON = `
"enabled": false, // enables the Janus agent: <true|false>
"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
],
},

View File

@@ -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
}