diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php
index baa6a05a5c..2d5b47e559 100644
--- a/app/destinations/app_languages.php
+++ b/app/destinations/app_languages.php
@@ -1,275 +1,278 @@
+?>
\ No newline at end of file
diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php
index 59703504c3..5d0c380e08 100644
--- a/app/destinations/destination_edit.php
+++ b/app/destinations/destination_edit.php
@@ -244,7 +244,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "accountcode=".$destination_accountcode;
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
$y++;
-
+
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
}
@@ -291,10 +291,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "tone_detect_hits=1";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
$y++;
-
+
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
-
+
// execute on tone detect
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
@@ -724,12 +724,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "| \n";
- echo " ".$text['label-accountcode'].":\n";
+ echo " ".$text['label-account_code'].":\n";
echo " | \n";
echo "\n";
echo " \n";
echo " \n";
- echo $text['description-accountcode']."\n";
+ echo $text['description-account_code']."\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
echo " ".$text['billing-warning'];
}
diff --git a/app/devices/app_config.php b/app/devices/app_config.php
index 759393a512..ef92ceaa24 100644
--- a/app/devices/app_config.php
+++ b/app/devices/app_config.php
@@ -102,6 +102,24 @@
$apps[$x]['permissions'][$y]['name'] = 'device_domain';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
+ $apps[$x]['permissions'][$y]['name'] = "device_profile_view";
+ $apps[$x]['permissions'][$y]['groups'][] = "admin";
+ $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+ $y++;
+ $apps[$x]['permissions'][$y]['name'] = "device_profile_add";
+ $apps[$x]['permissions'][$y]['groups'][] = "admin";
+ $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+ $y++;
+ $apps[$x]['permissions'][$y]['name'] = "device_profile_edit";
+ $apps[$x]['permissions'][$y]['groups'][] = "admin";
+ $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+ $y++;
+ $apps[$x]['permissions'][$y]['name'] = "device_profile_delete";
+ $apps[$x]['permissions'][$y]['groups'][] = "admin";
+ $apps[$x]['permissions'][$y]['groups'][] = "superadmin";
+ $y++;
+ $apps[$x]['permissions'][$y]['name'] = 'device_profile_domain';
+ $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//schema details
$y = 0; //table array index
@@ -132,6 +150,15 @@
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_profile_uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_device_profiles";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "device_profile_uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
@@ -172,16 +199,6 @@
$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']['text'] = "device_username";
- //$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_username";
- //$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']['text'] = "device_password";
- //$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_password";
- //$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']['text'] = "device_time_zone";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_time_zone";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
@@ -337,6 +354,15 @@
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_devices';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'device_uuid';
$z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_profile_uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_device_profiles";
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "device_profile_uuid";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
+ $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_key_id';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Select the key ID.';
@@ -366,4 +392,34 @@
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label.';
$z++;
+ $y = 4; //table array index
+ $z = 0; //field array index
+ $apps[$x]['db'][$y]['table'] = 'v_device_profiles';
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_profile_uuid';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
+ $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
+ $z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
+ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
+ $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
+ $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
+ $z++;
+ $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_profile_name";
+ $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'] = "device_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'] = "device_profile_description";
+ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
+ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
+ $z++;
+
?>
\ No newline at end of file
diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php
index f7732ff7dc..a9351348eb 100644
--- a/app/devices/app_languages.php
+++ b/app/devices/app_languages.php
@@ -76,7 +76,7 @@
$text['description-device_model']['pt-pt'] = "Introduza o nome do modelo ou número.";
$text['description-device_model']['fr-fr'] = "Entrer le nom ou le numéro du modèle";
- $text['label-device_firmware_version']['en-us'] = "Firmware Version";
+ $text['label-device_firmware_version']['en-us'] = "Firmware";
$text['label-device_firmware_version']['es-cl'] = "Versión de Firmware";
$text['label-device_firmware_version']['pt-pt'] = "Versão do Firmware";
$text['label-device_firmware_version']['fr-fr'] = "Version Firmware";
@@ -236,6 +236,88 @@
$text['description-device_description']['pt-pt'] = "Introduza a descrição.";
$text['description-device_description']['fr-fr'] = "Entrez la description.";
+ //profiles
+ $text['title-profiles']['en-us'] = "Key Profiles";
+ $text['title-profiles']['es-cl'] = "Perfiles Clave";
+ $text['title-profiles']['pt-pt'] = "Perfis-Chave";
+ $text['title-profiles']['fr-fr'] = "Profils Clés";
+
+ $text['title-profile']['en-us'] = "Key Profile";
+ $text['title-profile']['es-cl'] = "Perfil Clave";
+ $text['title-profile']['pt-pt'] = "Perfil Chave";
+ $text['title-profile']['fr-fr'] = "Profil Clés";
+
+ $text['header-profiles']['en-us'] = "Key Profiles";
+ $text['header-profiles']['es-cl'] = "Perfiles Clave";
+ $text['header-profiles']['pt-pt'] = "Perfis-Chave";
+ $text['header-profiles']['fr-fr'] = "Profils Clés";
+
+ $text['description-profiles']['en-us'] = "Define a set of keys as a profile. Any changes to the profile effect all devices assigned to the profile.";
+ $text['description-profiles']['es-cl'] = "Definir un conjunto de claves como un perfil. Cualquier cambio en el perfil de efectos todos los dispositivos asignados al perfil.";
+ $text['description-profiles']['pt-pt'] = "Defina um conjunto de chaves como um perfil. Quaisquer mudanças no perfil de todos os dispositivos de efeito atribuído ao perfil.";
+ $text['description-profiles']['fr-fr'] = "Définir un ensemble de touches comme un profil. Toute modification apportée à l'effet de profil tous les appareils affectés au profil.";
+
+ $text['header-profile']['en-us'] = "Key Profile";
+ $text['header-profile']['es-cl'] = "Perfil Clave";
+ $text['header-profile']['pt-pt'] = "Perfil Chave";
+ $text['header-profile']['fr-fr'] = "Profil Clés";
+
+ $text['description-profile']['en-us'] = "Define the assignments for this key profile.";
+ $text['description-profile']['es-cl'] = "Definir las asignaciones para este perfil de llave.";
+ $text['description-profile']['pt-pt'] = "Definir as atribuições para esse perfil de chave.";
+ $text['description-profile']['fr-fr'] = "Définir les missions pour ce profil de clé.";
+
+ $text['label-profile']['en-us'] = "Key Profile";
+ $text['label-profile']['es-cl'] = "Perfil Clave";
+ $text['label-profile']['pt-pt'] = "Perfil Chave";
+ $text['label-profile']['fr-fr'] = "Profil Clés";
+
+ $text['description-profile2']['en-us'] = "Select a Key Profile and/or define custom keys below.";
+ $text['description-profile2']['es-cl'] = "Seleccione un perfil de llave y / o definir teclas personalizadas a continuación.";
+ $text['description-profile2']['pt-pt'] = "Selecione um perfil Key e / ou definir chaves personalizados abaixo.";
+ $text['description-profile2']['fr-fr'] = "Sélectionnez un profil à clé et / ou définir des touches personnalisées ci-dessous.";
+
+ $text['button-profiles']['en-us'] = "Key Profiles";
+ $text['button-profiles']['es-cl'] = "Perfiles Clave";
+ $text['button-profiles']['pt-pt'] = "Perfis-Chave";
+ $text['button-profiles']['fr-fr'] = "Profils Clés";
+
+ $text['label-profile_name']['en-us'] = "Name";
+ $text['label-profile_name']['es-cl'] = "Nombre";
+ $text['label-profile_name']['pt-pt'] = "Nome";
+ $text['label-profile_name']['fr-fr'] = "Nom";
+
+ $text['description-profile_name']['en-us'] = "Enter a name to identify this profile.";
+ $text['description-profile_name']['es-cl'] = "Introduzca un nombre para identificar este perfil.";
+ $text['description-profile_name']['pt-pt'] = "Digite um nome para identificar este perfil.";
+ $text['description-profile_name']['fr-fr'] = "Entrez un nom pour identifier ce profil.";
+
+ $text['label-profile_domain']['en-us'] = "Domain";
+ $text['label-profile_domain']['es-cl'] = "Dominio";
+ $text['label-profile_domain']['pt-pt'] = "Domínio";
+ $text['label-profile_domain']['fr-fr'] = "Domaine";
+
+ $text['label-profile_enabled']['en-us'] = "Enabled";
+ $text['label-profile_enabled']['es-cl'] = "Activado";
+ $text['label-profile_enabled']['pt-pt'] = "Activado";
+ $text['label-profile_enabled']['fr-fr'] = "Actif";
+
+ $text['description-profile_enabled']['en-us'] = "Select the current state of this profile.";
+ $text['description-profile_enabled']['es-cl'] = "Seleccione el estado actual de este perfil.";
+ $text['description-profile_enabled']['pt-pt'] = "Selecione o estado atual deste perfil.";
+ $text['description-profile_enabled']['fr-fr'] = "Sélectionnez l'état actuel de ce profil.";
+
+ $text['label-profile_description']['en-us'] = "Description";
+ $text['label-profile_description']['es-cl'] = "Descripción";
+ $text['label-profile_description']['pt-pt'] = "Descrição";
+ $text['label-profile_description']['fr-fr'] = "Description";
+
+ $text['description-profile_description']['en-us'] = "Additional details about this profile.";
+ $text['description-profile_description']['es-cl'] = "Detalles adicionales acerca de este perfil.";
+ $text['description-profile_description']['pt-pt'] = "Detalhes adicionais sobre este perfil.";
+ $text['description-profile_description']['fr-fr'] = "Des détails supplémentaires sur ce profil.";
+
+
//keys
$text['label-keys']['en-us'] = "Keys";
$text['label-keys']['es-cl'] = "Claves";
diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php
index 6227a29b00..443ffe85aa 100644
--- a/app/devices/device_edit.php
+++ b/app/devices/device_edit.php
@@ -98,6 +98,8 @@ require_once "resources/require.php";
$user_id = check_str($_POST["user_id"]);
$auth_id = check_str($_POST["auth_id"]);
$password = check_str($_POST["password"]);
+ //profile
+ $device_profile_uuid = check_str($_POST["device_profile_uuid"]);
//keys
$device_key_category = check_str($_POST["device_key_category"]);
$device_key_id = check_str($_POST["device_key_id"]);
@@ -277,6 +279,7 @@ require_once "resources/require.php";
$device_firmware_version = $row["device_firmware_version"];
$device_provision_enable = $row["device_provision_enable"];
$device_template = $row["device_template"];
+ $device_profile_uuid = $row["device_profile_uuid"];
$device_description = $row["device_description"];
}
unset ($prep_statement);
@@ -312,7 +315,7 @@ require_once "resources/require.php";
$sql .= "ORDER by ";
$sql .= "CASE device_key_category ";
$sql .= "WHEN 'line' THEN 1 ";
- $sql .= "WHEN 'memort' THEN 2 ";
+ $sql .= "WHEN 'memory' THEN 2 ";
$sql .= "WHEN 'programmable' THEN 3 ";
$sql .= "WHEN 'expansion' THEN 4 ";
$sql .= "ELSE 100 END, ";
@@ -406,18 +409,16 @@ require_once "resources/require.php";
";
- echo "\n";
- echo "\n";
- echo " \n";
- echo " ";
-
echo " | |