How to configure ov_vocs_mc.service

ov_vocs_mc.service is the main service of openvocs. It is used to provide Webserver and Database for the system.

The default config will look like this:

{
	"log" : {

		"systemd" : false,
		"file" : "stdout",
		"level" : "debug"
	},

	"vocs" : {

		"domain" : "localhost",

		"sip" :
		{
			"timeout":
			{
				"response timeout (usec)" : 5000000
			},
			"socket" :
			{
				"manager" :
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 10001
				}
			}
		},

		"frontend" :
		{
			"socket" :
			{
				"manager" :
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 12345
				}
			}
		},

		"events" :
		{
			"socket" :
			{
				"manager" :
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 44444
				}
			}
		},

		"backend" :
		{
			"socket" :
			{
				"manager" :
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 12346
				}
			},
			"mixer" :
			{
				"vad":
				{
					"zero_crossings_rate_hertz" : 50000,
					"powerlevel_density_dbfs" : -500,
					"enabled" : true
				},
				"sample_rate_hz" : 48000,
				"noise" : -70,
				"max_num_frames" : 100,
				"frame_buffer": 1024,
				"normalize_input" : false,
				"rtp_keepalive" : true,
				"normalize_mixed_by_root" : false
			}
		},

		"recorder" : {

			"socket" : {
				"manager" :
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 10010
				}
			},
			"db" : 
			{
				"socket":
				{
					"db":
					{
						"host" : "127.0.0.1",
						"type" : "TCP",
						"port" : 12345
					}
				}
			}
		}
	},

	"db" : {

		"git" :true,

		"path" : "./src/service/ov_mc_vocs/config",

		"timeout" :
		{
			"ldap" : 5000000,
			"threadlock timeout (usec)": 1000000,
			"state snapshot (sec)" : 60,
			"auth snapshot (sec)" : 300
		},
		"password" :
		{
			"length" : 32
		}
	},

	"ldap" : {

		"enabled" : false,
		"threads" : 4,
		"host": "localhost",
		"user_dn_tree" : "ou=people,dc=openvocs,dc=org",
		"timeout":
		{
			"network" : 3000000
		}
	},

    "webserver":
	{
		"name":"ov_vocs_service",

		"debug":false,
		"ip4_only":true,

		"domains":"./src/service/ov_mc_vocs/config/domains",

		"mime" : {
			"path" : "./src/service/ov_mc_vocs/config/mime",
			"extension" : "mime"
		},

		"sockets":
		{
			"http":
			{
				"host":"0.0.0.0",
				"port":80,
				"type":"TCP"
			},
			"https":
			{
				"host":"0.0.0.0",
				"port":443,
				"type":"TCP"
			},
			"stun":
			[
				{
					"host":"127.0.0.1",
					"port":13478,
					"type":"UDP"
				}
			]
		},

		"timer":
		{
			"accept":1000000,
			"io":0
		}
	}
}

Configure Logging

Logging is configured within the block log. By default systemd is used for logging purposes. This may be changed to file based logging using the config.

"log" : {

		"systemd" : false,
		"file" : "stdout",
		"level" : "debug"
},

For file based logging put in the filename in file attribute. To change the log level you may choose between debug, info, warning, error, critical.

Configure VOCS service

The vocs service is divided in different module configurations. Each module has some settings, which may be changed.

At the toplevel the domain has to be configured and should contain the domainname you use with the certificates you provide within the config. E.g. openvocs.org

Within the frontend part the ov_ice_proxy connection is configured. This is the listen configuration for ICE proxys to connect to.

Events is a event publish service, which may be used to monitor system events like switching a loopstate. The configuration provides an interface for event consumers to connect to.

Backend is the configuration part for ov_mixer instances to connect to. It contains the mixer configuration to be used and distributed to each mixer at registration.


"vocs" : {

	"domain" : "localhost",

	"sip" :
	{
		"timeout":
		{
			"response timeout (usec)" : 5000000
		},
		"socket" :
		{
			"manager" :
			{
				"host" : "127.0.0.1",
				"type" : "TCP",
				"port" : 10001
			}
		}
	},

	"frontend" :
	{
		"socket" :
		{
			"manager" :
			{
				"host" : "127.0.0.1",
				"type" : "TCP",
				"port" : 12345
			}
		}
	},

	"events" :
	{
		"socket" :
		{
			"manager" :
			{
				"host" : "127.0.0.1",
				"type" : "TCP",
				"port" : 44444
			}
		}
	},

	"backend" :
	{
		"socket" :
		{
			"manager" :
			{
				"host" : "127.0.0.1",
				"type" : "TCP",
				"port" : 12346
			}
		},
		"mixer" :
		{
			"vad":
			{
				"zero_crossings_rate_hertz" : 50000,
				"powerlevel_density_dbfs" : -500,
				"enabled" : true
			},
			"sample_rate_hz" : 48000,
			"noise" : -70,
			"max_num_frames" : 100,
			"frame_buffer": 1024,
			"normalize_input" : false,
			"rtp_keepalive" : true,
			"normalize_mixed_by_root" : false
		}
	},

	"recorder" : {

		"socket" : {
			"manager" :
			{
				"host" : "127.0.0.1",
				"type" : "TCP",
				"port" : 10010
			}
		},
		"db" : 
		{
			"socket":
			{
				"db":
				{
					"host" : "127.0.0.1",
					"type" : "TCP",
					"port" : 12345
				}
			}
		}
	}
},

Next part is the SIP configuration, which is only required when using the openvocs SIP Gateway. The SIP Gateway is not part of the opensource code and available on request.

The last part of the configuration is the recorder configuration. As the SIP gateway the recorder is not part of the opensource version and may be available on request.

Configure vocs db

The db config provides the path for the openvocs database storage. This database is a JSON based database of Authentication and Permission settings.

The git flag may be used to push the configuration on save to a git repository.

State and auth snapshots are the automated persistance to file functionality and may be changed to convinient values.

The password configuration is for new passwords created within the system e.g. on Password change of a user. By default only a length parameter for key and salt is required.

"db" : {

		"git" :true,

		"path" : "./src/service/ov_mc_vocs/config",

		"timeout" :
		{
			"ldap" : 5000000,
			"threadlock timeout (usec)": 1000000,
			"state snapshot (sec)" : 60,
			"auth snapshot (sec)" : 300
		},
		"password" :
		{
			"length" : 32
		}
	},

Configure LDAP

By default LDAP is disabled, but can be enabled using the LDAP block of the configuration.

The host attribute must be set to the LDAP server to be requested and the user_dn_tree attribute must be set to the LDAP registry for users. (Standard is people)

A network timeout may be configured to render an LDAP request inactive, if no response is deliverend within the timeout.

"ldap" : {

		"enabled" : false,
		"threads" : 4,
		"host": "localhost",
		"user_dn_tree" : "ou=people,dc=openvocs,dc=org",
		"timeout":
		{
			"network" : 3000000
		}
	},

Configure Webserver

The integrated webserver will be configured within the webserver block. A service name may be given for Log mappings.

The domains path contains the path to all domain configurations to be activated at the server. Each domain config will be loaded and executed.

Mime path configurations are used for mime types supported by the webserver. By default a standard set of mime types is activated.

Sockets to be configured are HTTP and HTTPs. The HTTP configuration is used for completeness and contains a redirect service to the HTTPs connection. In addtion a set of ports may be opened for STUN. The integrated STUN server will then reply to any STUN requests.

"webserver":
	{
		"name":"ov_vocs_service",

		"debug":false,
		"ip4_only":true,

		"domains":"./src/service/ov_mc_vocs/config/domains",

		"mime" : {
			"path" : "./src/service/ov_mc_vocs/config/mime",
			"extension" : "mime"
		},

		"sockets":
		{
			"http":
			{
				"host":"0.0.0.0",
				"port":80,
				"type":"TCP"
			},
			"https":
			{
				"host":"0.0.0.0",
				"port":443,
				"type":"TCP"
			},
			"stun":
			[
				{
					"host":"127.0.0.1",
					"port":13478,
					"type":"UDP"
				}
			]
		},

		"timer":
		{
			"accept":1000000,
			"io":0
		}
	}
}