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 install openvocs

This is a short tutorial to show you how to install openvocs from a checked out respository. The first step is to compile the openvocs code base. To do so use:

source env.sh
make clean && make -j 12

The next step is to compile an install target. Install targets supported are deb and rpm.

make deb

Once the package is build you can install the package using your package manager.

sudo dpkg -i build/openvocs_0.2.0-402_amd64.deb

Openvocs is now installed within your system. Important folder are configuration, which is installed to /etc/openvocs and HTML sources, which are installed under /srv/openvocs/HTML.

Once the system is installed it need to be configured. To configure the system move to /etc/openvocs and run the ov_config.sh script.

NOTE ov_config.sh expects your IP address as input and need to be run as root.

cd /etc/openvocs
sudo ./ov_config.sh 192.168.2.110

Once the script is executed you should restart all openvocs applications. This is quite easy using:

sudo systemctl restart ov_mc.target

You may now use your browser to navigate to your IP Address. You will be presented with a certificate failure message. This is due to your recent created certificate using ov_config.sh. You may change the certificate later, for now press advanded and accept the certificate.

Once the certificate is accepted you will see the following page. Press the Voice Client application and start using openvocs.

The default login page will be shown. You may use the users user1 to user10 with the passwords similar to the username to test openvocs.

The next page will show you a role selection, please chose role1 or role2 to login.

Once done and the audio device was selected properly the follwing window will be the openvocs voice client.

Congratulations, you have successfully installed openvocs on your local machine. You may use different devices in the same network to test the functionality.