Posted on Leave a comment

How to configure ov_mc_ice_proxy

The ICE proxy has 2 operational modes:

  • multiplexing mode
    In multiplexing mode all incoming connections will be multiplexed over a dedicated port
  • dynamic mode
    In dynamic mode each connection will be terminated at a dedicated port, which is opened dynamically. Dynamic mode may be used behind NAT environments to allow the server to be running with a NATed IP.

    Both modes share the main part of the configuration. To enable multiplexing mode change the multiplexing attribute to true. In this case all configuration withinin the dynamic attribute are rendered invalid. For dynamic mode change the multiplexing flag to false. This enabled the dynamic configuration.
    In dynamic mode an external STUN or TURN server may be used to allow the server tp gather it’s external IP ( Scenario NAT environment!) The port range used may be configured also to allow firewall configurations to match.
{
	"log" : {

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

    "proxy" : {

    	"multiplexing" : false,

    	"ssl" :
		{
			"certificate" : "resources/certificate/openvocs.test.crt",
			"key" :  "resources/certificate/openvocs.test.key",
			"CA file" : "resources/certificate/openvocs.test.crt"
		},

		"dynamic" :
		{
			"port" :
			{
				"min" : 1025,
				"max" : 65535
			},
			"stun" : 
			{
				"server" : 
				{
					"host" : "87.238.197.166",
					"type" : "UDP",
					"port" : 3478
				}
			},

			"turn" : 
			{
				"server" : 
				{
					"host" : "127.0.0.1",
					"type" : "UDP",
					"port" : 12345
				},
				"user" : "user1",
				"password" : "user1"
			}
		},

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

    	"external" :
    	{
    		"host": "192.168.2.112",
    		"port": 50000,
    		"type": "UDP"
    	},

    	"internal" :
    	{
    		"host": "192.168.2.112",
    		"port": 0,
    		"type": "UDP"
    	},

    	"limits":
    	{

    	}
	}
}

All configurations must use the SSL attribute filled with the respective data.

The manager socket configuration defines the ov_vocs_mc.service to be used and must be filled accordingly.

The external host is the host used for Multiplexing and Dynamic ICE operations. In multiplexing mode the port configured will be used, in dynamic mode a port from the port range will be used.

Internal host is the internal host configuration of the openvocs core network. The same network like used for the ov_mixer services must be s

Posted on Leave a comment

How to configure ov_mc_vocs.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
		}
	}
}

Posted on Leave a comment

How to use openvocs

This short Tutorial shows how to use the openvocs voice communication service.

Step 1 – Navigate to your openvocs instance with the browser

Login with the credentials you have setup. For default openvocs you may use user1 with password user1.

Step 2 – Choose a role

Choose a role for the openvocs system. Note the role administrator has no voice layout defined.

Step 3 – Enable Media Device

A Media Device chooser is shown during login to the page. Choose the media connection you want to use with openvocs.

Step 4 – Select a Loop

By default no loop is selected. If you have used the system before some loops may be selected like in the previous session. This is related to the session storage of the system. When you login again, your last set of selection will be activated automatically.

To select a loop click on it. A blue selection show listen on. A green selection shows talk on.

To actually talk on a loop you must press Push To Talk. The PTT bar is located at the buttom of the page.