Can specify whether the signal server is secure or not

This commit is contained in:
Pierre HUBERT 2019-02-02 08:08:44 +01:00
parent 45875a2972
commit 9d3fb3b342
4 changed files with 12 additions and 0 deletions

View File

@ -190,6 +190,7 @@ class CallsController {
if($config->get_enabled()){ if($config->get_enabled()){
$data["signal_server_name"] = $config->get_signal_server_name(); $data["signal_server_name"] = $config->get_signal_server_name();
$data["signal_server_port"] = $config->get_signal_server_port(); $data["signal_server_port"] = $config->get_signal_server_port();
$data["is_signal_server_secure"] = $config->get_is_signal_server_secure();
$data["stun_server"] = $config->get_stun_server(); $data["stun_server"] = $config->get_stun_server();
$data["turn_server"] = $config->get_turn_server(); $data["turn_server"] = $config->get_turn_server();
$data["turn_username"] = $config->get_turn_username(); $data["turn_username"] = $config->get_turn_username();

View File

@ -31,6 +31,7 @@ class CallsComponents {
$config->set_enabled($callConfig["enabled"]); $config->set_enabled($callConfig["enabled"]);
$config->set_signal_server_name($callConfig["signal_server_name"]); $config->set_signal_server_name($callConfig["signal_server_name"]);
$config->set_signal_server_port($callConfig["signal_server_port"]); $config->set_signal_server_port($callConfig["signal_server_port"]);
$config->set_is_signal_server_secure($callConfig["is_signal_server_secure"]);
$config->set_stun_server($callConfig["stun_server"]); $config->set_stun_server($callConfig["stun_server"]);
$config->set_turn_server($callConfig["turn_server"]); $config->set_turn_server($callConfig["turn_server"]);
$config->set_turn_username($callConfig["turn_username"]); $config->set_turn_username($callConfig["turn_username"]);

View File

@ -11,6 +11,7 @@ class CallsConfig {
private $enabled = false; private $enabled = false;
private $signal_server_name; private $signal_server_name;
private $signal_server_port; private $signal_server_port;
private $is_signal_server_secure;
private $stun_server; private $stun_server;
private $turn_server; private $turn_server;
private $turn_username; private $turn_username;
@ -54,6 +55,14 @@ class CallsConfig {
return $this->signal_server_port; return $this->signal_server_port;
} }
//Get and set secure state of the signaling server
public function set_is_signal_server_secure(bool $is_signal_server_secure){
$this->is_signal_server_secure = $is_signal_server_secure;
}
public function get_is_signal_server_secure() : bool {
return $this->is_signal_server_secure;
}
//Get and set stun server //Get and set stun server
public function set_stun_server(string $stun_server){ public function set_stun_server(string $stun_server){

View File

@ -21,6 +21,7 @@ $config->set("calls", array(
"enabled" => true, "enabled" => true,
"signal_server_name" => "localhost", "signal_server_name" => "localhost",
"signal_server_port" => 8081, "signal_server_port" => 8081,
"is_signal_server_secure" => false,
"stun_server" => "stun:127.0.0.1:3478", "stun_server" => "stun:127.0.0.1:3478",
"turn_server" => "turn:127.0.0.1:3478", "turn_server" => "turn:127.0.0.1:3478",
"turn_username" => "anonymous", "turn_username" => "anonymous",