diff --git a/app/sip_profiles/app_config.php b/app/sip_profiles/app_config.php
index 1121b147d0..9a381c8a33 100644
--- a/app/sip_profiles/app_config.php
+++ b/app/sip_profiles/app_config.php
@@ -78,6 +78,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(255)";
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_profile_enabled";
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_profile_description";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
diff --git a/app/sip_profiles/app_defaults.php b/app/sip_profiles/app_defaults.php
index 7b1ab92167..85b2e92d72 100644
--- a/app/sip_profiles/app_defaults.php
+++ b/app/sip_profiles/app_defaults.php
@@ -85,7 +85,7 @@
case "internal":
$sip_profile_description = "The Internal profile by default requires registration which is used by the endpoints. ";
$sip_profile_description .= "By default the Internal profile binds to port 5060. ";
- break;
+ break;
case "internal-ipv6":
$sip_profile_description = "The Internal IPV6 profile binds to the IP version 6 address and is similar to the Internal profile.\n";
break;
@@ -181,4 +181,13 @@
}
}
+//if empty, set sip_profile_enabled = true
+ if ($domains_processed == 1) {
+ $sql = "update v_sip_profiles set ";
+ $sql .= "sip_profile_enabled = 'true' ";
+ $sql .= "where sip_profile_enabled is null ";
+ $sql .= "or sip_profile_enabled = '' ";
+ $db->exec(check_sql($sql));
+ unset($sql);
+ }
?>
\ No newline at end of file
diff --git a/app/sip_profiles/app_languages.php b/app/sip_profiles/app_languages.php
index e76fb30edf..9d6aab9e4e 100644
--- a/app/sip_profiles/app_languages.php
+++ b/app/sip_profiles/app_languages.php
@@ -79,6 +79,15 @@ $text['message-add']['pt-br'] = "Criação Efetuada";
$text['message-add']['pl'] = "Dodano poprawnie";
$text['message-add']['sv-se'] = "Tillagd";
+$text['label-true']['en-us'] = "True";
+$text['label-true']['es-cl'] = "Verdadero";
+$text['label-true']['pt-pt'] = "Sim";
+$text['label-true']['fr-fr'] = "Oui";
+$text['label-true']['pt-br'] = "Sim";
+$text['label-true']['pl'] = "Tak";
+$text['label-true']['uk'] = "Так";
+$text['label-true']['sv-se'] = "Sann";
+
$text['label-setting_value']['en-us'] = "Value";
$text['label-setting_value']['es-cl'] = "Valor";
$text['label-setting_value']['pt-pt'] = "Valor";
@@ -126,6 +135,24 @@ $text['label-hostname']['pt-br'] = "Hostname";
$text['label-hostname']['pl'] = "Nazwa hosta";
$text['label-hostname']['sv-se'] = "Hostname";
+$text['label-false']['en-us'] = "False";
+$text['label-false']['es-cl'] = "Falso";
+$text['label-false']['pt-pt'] = "Não";
+$text['label-false']['fr-fr'] = "Non";
+$text['label-false']['pt-br'] = "Não";
+$text['label-false']['pl'] = "Nie";
+$text['label-false']['uk'] = "Ні";
+$text['label-false']['sv-se'] = "Falsk";
+
+$text['label-enabled']['en-us'] = "Enabled";
+$text['label-enabled']['es-cl'] = "Activado";
+$text['label-enabled']['pt-pt'] = "Habilitada";
+$text['label-enabled']['fr-fr'] = "Actif";
+$text['label-enabled']['pt-br'] = "Habilitado";
+$text['label-enabled']['pl'] = "Numer wew włączony?";
+$text['label-enabled']['uk'] = "Включено";
+$text['label-enabled']['sv-se'] = "Aktiverad";
+
$text['label-description']['en-us'] = "Description";
$text['label-description']['es-cl'] = "Descripción";
$text['label-description']['pt-pt'] = "Descrição";
@@ -235,6 +262,13 @@ $text['description-hostname']['pt-br'] = "Insira o hostname";
$text['description-hostname']['pl'] = "Wprowadź nazwę hosta / PBXu.";
$text['description-hostname']['sv-se'] = "Fyll i hostname / switchname.";
+$text['description-enabled']['en-us'] = "Control the state of the profile.";
+$text['description-enabled']['pt-pt'] = "Controlar o estado do perfil.";
+$text['description-enabled']['fr-fr'] = "Contrôler l'état du profil.";
+$text['description-enabled']['pt-br'] = "Controlar o estado do perfil.";
+$text['description-enabled']['pl'] = "Kontroluj stan profilu.";
+$text['description-enabled']['sv-se'] = "Styr tillståndet i profilen.";
+
$text['description-description']['en-us'] = "Enter the description.";
$text['description-description']['es-cl'] = "Ingrese una descripción.";
$text['description-description']['pt-pt'] = "Introduza a descrição.";
diff --git a/app/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php
index e3b0f2485e..7d4cc01e49 100644
--- a/app/sip_profiles/sip_profile_edit.php
+++ b/app/sip_profiles/sip_profile_edit.php
@@ -71,8 +71,9 @@ else {
//get http post variables and set them to php variables
if (count($_POST) > 0) {
$sip_profile_name = check_str($_POST["sip_profile_name"]);
- $sip_profile_description = check_str($_POST["sip_profile_description"]);
$sip_profile_hostname = check_str($_POST["sip_profile_hostname"]);
+ $sip_profile_description = check_str($_POST["sip_profile_description"]);
+ $sip_profile_enabled = check_str($_POST["sip_profile_enabled"]);
}
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
@@ -107,7 +108,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "sip_profile_uuid, ";
$sql .= "sip_profile_name, ";
$sql .= "sip_profile_hostname, ";
- $sql .= "sip_profile_description ";
+ $sql .= "sip_profile_description, ";
+ $sql .= "sip_profile_enabled ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
@@ -119,7 +121,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
else {
$sql .= "null, ";
}
- $sql .= "'$sip_profile_description' ";
+ $sql .= "'$sip_profile_description', ";
+ $sql .= "'$sip_profile_enabled' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
@@ -135,7 +138,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
else {
$sql .= "sip_profile_hostname = null, ";
}
- $sql .= "sip_profile_description = '$sip_profile_description' ";
+ $sql .= "sip_profile_description = '$sip_profile_description', ";
+ $sql .= "sip_profile_enabled = '$sip_profile_enabled' ";
$sql .= "where sip_profile_uuid = '$sip_profile_uuid'";
$db->exec(check_sql($sql));
unset($sql);
@@ -173,6 +177,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sip_profile_name = $row["sip_profile_name"];
$sip_profile_hostname = $row["sip_profile_hostname"];
$sip_profile_description = $row["sip_profile_description"];
+ $sip_profile_enabled = $row["sip_profile_enabled"];
break; //limit to 1 row
}
unset ($prep_statement);
@@ -221,6 +226,20 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
+ echo "
\n";
+ echo "| \n";
+ echo " ".$text['label-enabled']."\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-enabled']."\n";
+ echo " | \n";
+ echo "
\n";
+
echo "\n";
echo "| \n";
echo " ".$text['label-description']."\n";
@@ -231,6 +250,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo $text['description-description']."\n";
echo " | \n";
echo "
\n";
+
echo " \n";
echo " \n";
if ($action == "update") {
diff --git a/app/sip_profiles/sip_profiles.php b/app/sip_profiles/sip_profiles.php
index b48151ae55..193cb52f62 100644
--- a/app/sip_profiles/sip_profiles.php
+++ b/app/sip_profiles/sip_profiles.php
@@ -104,8 +104,9 @@ require_once "resources/paging.php";
echo "\n";
echo "\n";
echo th_order_by('sip_profile_name', $text['label-name'], $order_by, $order);
- echo "| ".$text['label-hostname']." | \n";
- echo "".$text['label-description']." | \n";
+ echo "".$text['label-hostname']." | \n";
+ echo "".$text['label-enabled']." | \n";
+ echo "".$text['label-description']." | \n";
echo "";
if (permission_exists('sip_profile_add')) {
echo "$v_link_label_add";
@@ -126,6 +127,7 @@ require_once "resources/paging.php";
}
echo " | \n";
echo " ".$row['sip_profile_hostname']." | \n";
+ echo " ".$text['label-'.$row['sip_profile_enabled']]." | \n";
echo " ".$row['sip_profile_description']." | \n";
echo " ";
if (permission_exists('sip_profile_edit')) {
@@ -142,7 +144,7 @@ require_once "resources/paging.php";
} //end if results
echo " | \n";
- echo "| \n";
+ echo " | \n";
echo " \n";
echo " \n";
echo " | | \n";
| |