Merge branch 'master' into master

This commit is contained in:
FusionPBX
2021-03-23 14:01:15 -06:00
committed by GitHub
484 changed files with 54238 additions and 8377 deletions

View File

@@ -57,4 +57,15 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "operator_panel_on_demand";
?>
//default settings
$y=0;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "569280f2-a433-4eaf-9c08-945efdc6cf8f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "operator_panel";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "refresh";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1500";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the refresh rate in seconds (<=120) or milliseconds (>=500).";
$y++;
?>

View File

@@ -64,7 +64,12 @@
}
//update the status
if (permission_exists("user_account_setting_edit")) {
if (permission_exists("user_setting_edit")) {
//add the user_edit permission
$p = new permissions;
$p->add("user_edit", "temp");
//update the database user_status
$array['users'][0]['user_uuid'] = $_SESSION['user']['user_uuid'];
$array['users'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid'];
$array['users'][0]['user_status'] = $user_status;
@@ -72,6 +77,10 @@
$database->app_name = 'operator_panel';
$database->app_uuid = 'dd3d173a-5d51-4231-ab22-b18c5b712bb2';
$database->save($array);
//remove the temporary permission
$p->delete("user_edit", "temp");
unset($array);
}
@@ -185,8 +194,24 @@
<script language="JavaScript" type="text/javascript" src="<?php echo PROJECT_PATH; ?>/resources/jquery/jquery-ui.min.js"></script>
<script type="text/javascript">
<?php
//determine refresh rate
$refresh_default = 1500; //milliseconds
$refresh = is_numeric($_SESSION['operator_panel']['refresh']['numeric']) ? $_SESSION['operator_panel']['refresh']['numeric'] : $refresh_default;
if ($refresh >= 0.5 && $refresh <= 120) { //convert seconds to milliseconds
$refresh = $refresh * 1000;
}
else if ($refresh < 0.5 || ($refresh > 120 && $refresh < 500)) {
$refresh = $refresh_default; //use default
}
else {
//>= 500, must be milliseconds
}
unset($refresh_default);
?>
//ajax refresh
var refresh = 1500;
var refresh = <?php echo $refresh; ?>;
var source_url = 'resources/content.php?' <?php if (isset($_GET['debug'])) { echo " + '&debug'"; } ?>;
var interval_timer_id;

View File

@@ -82,7 +82,7 @@ echo " <b>".$text['title-operator_panel']."</b>";
echo " </td>";
echo " <td valign='top' align='center' nowrap>";
if (sizeof($_SESSION['user']['extensions']) > 0) {
if (permission_exists("user_setting_edit") && sizeof($_SESSION['user']['extensions']) > 0) {
$status_options[1]['status'] = "Available";
$status_options[1]['label'] = $text['label-status_available'];
$status_options[1]['style'] = "op_btn_status_available";
@@ -377,7 +377,7 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) {
//record
if (permission_exists('operator_panel_record') && $ext_state == 'active') {
$call_identifier_record = $ext['call_uuid'];
$rec_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".escape($call_identifier_record).".wav";
$rec_file = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".escape($call_identifier_record).".wav";
if (file_exists($rec_file)) {
$block .= "<img src='resources/images/recording.png' style='width: 12px; height: 12px; border: none; margin: 4px 0px 0px 5px; cursor: help;' title=\"".$text['label-recording']."\" ".$onhover_pause_refresh.">";
}

View File

@@ -124,6 +124,11 @@
$database->save($array);
$message = $database->message;
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//redirect the user
if (isset($action)) {
if ($action == "add") {

View File

@@ -106,6 +106,11 @@ if (!class_exists('bridges')) {
$database->delete($array);
unset($array);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);
}
@@ -174,6 +179,11 @@ if (!class_exists('bridges')) {
$database->save($array);
unset($array);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);
}

View File

@@ -99,6 +99,10 @@
$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']['text'] = "call_block_direction";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the direction of the calls to block.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "extension_uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
@@ -113,11 +117,15 @@
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the name.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_block_country_code";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the country code.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_block_number";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "blocked_caller_number";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the full phone number.";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the phone number.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "call_block_count";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "blocked_call_count";

View File

@@ -26,12 +26,12 @@
if ($domains_processed == 1) {
//create a view for call block
//create a view for call block
$database = new database;
$database->execute("DROP VIEW view_call_block;", null);
$sql = "CREATE VIEW view_call_block AS ( \n";
$sql .= " select c.domain_uuid, call_block_uuid, c.extension_uuid, call_block_name, \n";
$sql .= " call_block_number, extension, number_alias, call_block_count, call_block_app, call_block_data, date_added, call_block_enabled, call_block_description \n";
$sql .= " select c.domain_uuid, call_block_uuid, c.call_block_direction, c.extension_uuid, c.call_block_name, c.call_block_country_code, \n";
$sql .= " c.call_block_number, e.extension, e.number_alias, c.call_block_count, c.call_block_app, c.call_block_data, c.date_added, c.call_block_enabled, c.call_block_description \n";
$sql .= " from v_call_block as c \n";
$sql .= " left join v_extensions as e \n";
$sql .= " on c.extension_uuid = e.extension_uuid \n";
@@ -40,6 +40,12 @@ if ($domains_processed == 1) {
$database->execute($sql, null);
unset($sql);
//set call blocks to inbound if no direction defined
$sql = "update v_call_block set call_block_direction = 'inbound' where call_block_direction is null ";
$database = new database;
$database->execute($sql, null);
unset($sql);
}
?>

View File

@@ -120,7 +120,7 @@ $text['label-provide-number']['de-de'] = "Bitte geben Sie die Nummer an";
$text['label-provide-number']['el-gr'] = "Εισάγετε: Αριθμό";
$text['label-provide-number']['es-cl'] = "Por favor agregue: Número";
$text['label-provide-number']['es-mx'] = "Por favor agregue: Número"; //copied from es-cl
$text['label-provide-number']['fr-ca'] = "Merci d'indiquer: Numéro"; //copied from fr-fr
$text['label-provide-number']['fr-ca'] = "S'il vous plaît indiquer: Numéro";
$text['label-provide-number']['fr-fr'] = "Merci d'indiquer: Numéro";
$text['label-provide-number']['he-il'] = "אנא הכנס מספר";
$text['label-provide-number']['it-it'] = "Prego fornire: Numero";
@@ -142,7 +142,7 @@ $text['label-provide-name']['de-de'] = "Bitte geben Sie den Namen an";
$text['label-provide-name']['el-gr'] = "Εισάγετε: Όνομα";
$text['label-provide-name']['es-cl'] = "Por favor agregue: Nombre";
$text['label-provide-name']['es-mx'] = "Por favor agregue: Nombre"; //copied from es-cl
$text['label-provide-name']['fr-ca'] = "Merci d'indiquer: Nom"; //copied from fr-fr
$text['label-provide-name']['fr-ca'] = "S'il vous plaît indiquer: Nom"; //copied from fr-fr
$text['label-provide-name']['fr-fr'] = "Merci d'indiquer: Nom";
$text['label-provide-name']['he-il'] = "אנא הכנס שם";
$text['label-provide-name']['it-it'] = "Prego fornire: Nome";
@@ -164,7 +164,7 @@ $text['label-provide-enabled']['de-de'] = "Bitte geben Sie folgendes an: Aktiv";
$text['label-provide-enabled']['el-gr'] = "Εισάγετε: Ενεργοποιημένο";
$text['label-provide-enabled']['es-cl'] = "Por favor agregue: Activo";
$text['label-provide-enabled']['es-mx'] = "Por favor agregue: Activo"; //copied from es-cl
$text['label-provide-enabled']['fr-ca'] = "Merci d'indiquer: Actif"; //copied from fr-fr
$text['label-provide-enabled']['fr-ca'] = "S'il vous plaît indiquer: Actif"; //copied from fr-fr
$text['label-provide-enabled']['fr-fr'] = "Merci d'indiquer: Actif";
$text['label-provide-enabled']['he-il'] = "";
$text['label-provide-enabled']['it-it'] = "Prego fornire: Abilitazione";
@@ -177,6 +177,27 @@ $text['label-provide-enabled']['ru-ru'] = "Пожалуйста, введите:
$text['label-provide-enabled']['sv-se'] = "Ange: Aktiverad";
$text['label-provide-enabled']['uk-ua'] = "Включити/відключити";
$text['label-country_code']['en-us'] = "Country Code";
$text['label-country_code']['en-gb'] = "Country Code";
$text['label-country_code']['ar-eg'] = "";
$text['label-country_code']['de-at'] = ""; //copied from de-de
$text['label-country_code']['de-ch'] = ""; //copied from de-de
$text['label-country_code']['de-de'] = "";
$text['label-country_code']['es-cl'] = "";
$text['label-country_code']['es-mx'] = ""; //copied from es-cl
$text['label-country_code']['fr-ca'] = "Préfixe"; //copied from fr-fr
$text['label-country_code']['fr-fr'] = "Préfixe";
$text['label-country_code']['he-il'] = "";
$text['label-country_code']['it-it'] = "";
$text['label-country_code']['nl-nl'] = "Voorloop";
$text['label-country_code']['pl-pl'] = "";
$text['label-country_code']['pt-br'] = "Prefixo"; //copied from pt-pt
$text['label-country_code']['pt-pt'] = "";
$text['label-country_code']['ro-ro'] = "";
$text['label-country_code']['ru-ru'] = "";
$text['label-country_code']['sv-se'] = "";
$text['label-country_code']['uk-ua'] = "";
$text['label-number']['en-us'] = "Number";
$text['label-number']['en-gb'] = "Number";
$text['label-number']['ar-eg'] = "رقم";
@@ -265,6 +286,48 @@ $text['label-inbound']['ru-ru'] = "Входящий";
$text['label-inbound']['sv-se'] = "Inkommande";
$text['label-inbound']['uk-ua'] = "Вихідний";
$text['label-outbound']['en-us'] = "Outbound";
$text['label-outbound']['en-gb'] = "Outbound";
$text['label-outbound']['ar-eg'] = "";
$text['label-outbound']['de-at'] = "Ausgehend"; //copied from de-de
$text['label-outbound']['de-ch'] = "Ausgehend"; //copied from de-de
$text['label-outbound']['de-de'] = "Ausgehend";
$text['label-outbound']['es-cl'] = "Salida";
$text['label-outbound']['es-mx'] = "Salida"; //copied from es-cl
$text['label-outbound']['fr-ca'] = "Sortant"; //copied from fr-fr
$text['label-outbound']['fr-fr'] = "Sortant";
$text['label-outbound']['he-il'] = "";
$text['label-outbound']['it-it'] = "In Uscita";
$text['label-outbound']['nl-nl'] = "";
$text['label-outbound']['pl-pl'] = "Wychodzące";
$text['label-outbound']['pt-br'] = "Saída"; //copied from pt-pt
$text['label-outbound']['pt-pt'] = "Saída";
$text['label-outbound']['ro-ro'] = "";
$text['label-outbound']['ru-ru'] = "Исходящие";
$text['label-outbound']['sv-se'] = "Utgående";
$text['label-outbound']['uk-ua'] = "";
$text['label-destination']['en-us'] = "Destination";
$text['label-destination']['en-gb'] = "Destination";
$text['label-destination']['ar-eg'] = "";
$text['label-destination']['de-at'] = "Ziel"; //copied from de-de
$text['label-destination']['de-ch'] = "Ziel"; //copied from de-de
$text['label-destination']['de-de'] = "Ziel";
$text['label-destination']['es-cl'] = "Destino";
$text['label-destination']['es-mx'] = "Destino"; //copied from es-cl
$text['label-destination']['fr-ca'] = "Destination"; //copied from fr-fr
$text['label-destination']['fr-fr'] = "Destination";
$text['label-destination']['he-il'] = "";
$text['label-destination']['it-it'] = "Destinazione";
$text['label-destination']['nl-nl'] = "";
$text['label-destination']['pl-pl'] = "Numer docelowy";
$text['label-destination']['pt-br'] = "Número de destino";
$text['label-destination']['pt-pt'] = "Destino";
$text['label-destination']['ro-ro'] = "";
$text['label-destination']['ru-ru'] = "Назначение";
$text['label-destination']['sv-se'] = "Destination";
$text['label-destination']['uk-ua'] = "Номер";
$text['label-edit-note']['en-us'] = "Block calls from a number. Edit the name and enable/disable below.";
$text['label-edit-note']['en-gb'] = "Block calls from a number. Edit the name and enable/disable below.";
$text['label-edit-note']['ar-eg'] = "";
@@ -318,7 +381,7 @@ $text['label-edit-add']['de-de'] = "Sperrlisten";
$text['label-edit-add']['el-gr'] = "Λίστα Απόρριψης";
$text['label-edit-add']['es-cl'] = "Agregar bloqueo de llamada";
$text['label-edit-add']['es-mx'] = "Agregar bloqueo de llamada"; //copied from es-cl
$text['label-edit-add']['fr-ca'] = "Ajouter filtrage d'appel"; //copied from fr-fr
$text['label-edit-add']['fr-ca'] = "Ajouter au filtrage d'appels"; //copied from fr-fr
$text['label-edit-add']['fr-fr'] = "Ajouter filtrage d'appel";
$text['label-edit-add']['he-il'] = "חסימת שיחה";
$text['label-edit-add']['it-it'] = "Blocco Chiamate";
@@ -419,27 +482,27 @@ $text['label-count']['ru-ru'] = "Количество";
$text['label-count']['sv-se'] = "Räkna";
$text['label-count']['uk-ua'] = "Кількість";
$text['label-called-on']['en-us'] = "Called on";
$text['label-called-on']['en-gb'] = "Called on";
$text['label-called-on']['ar-eg'] = "تم الأتصال علي";
$text['label-called-on']['de-at'] = "Anruf am"; //copied from de-de
$text['label-called-on']['de-ch'] = "Anruf am"; //copied from de-de
$text['label-called-on']['de-de'] = "Anruf am";
$text['label-called-on']['el-gr'] = "Η κλήση πραγματοποιήθηκε";
$text['label-called-on']['es-cl'] = "Llamó en";
$text['label-called-on']['es-mx'] = "Llamó en"; //copied from es-cl
$text['label-called-on']['fr-ca'] = "Appelé le"; //copied from fr-fr
$text['label-called-on']['fr-fr'] = "Appelé le";
$text['label-called-on']['he-il'] = "Opgeroepen op";
$text['label-called-on']['it-it'] = "Chiamato il";
$text['label-called-on']['nl-nl'] = "Aangeroepen op";
$text['label-called-on']['pl-pl'] = "Zadzwoniono na";
$text['label-called-on']['pt-br'] = "Chamada em ";
$text['label-called-on']['pt-pt'] = "Chamado em";
$text['label-called-on']['ro-ro'] = "Sunat pe";
$text['label-called-on']['ru-ru'] = "Направление";
$text['label-called-on']['sv-se'] = "Ringdes";
$text['label-called-on']['uk-ua'] = "Дзвінок здійснено";
$text['label-called']['en-us'] = "Called";
$text['label-called']['en-gb'] = "Called";
$text['label-called']['ar-eg'] = "تم الأتصال علي";
$text['label-called']['de-at'] = "Anruf"; //copied from de-de
$text['label-called']['de-ch'] = "Anruf"; //copied from de-de
$text['label-called']['de-de'] = "Anruf";
$text['label-called']['el-gr'] = "Η κλήση πραγματοποιήθηκε";
$text['label-called']['es-cl'] = "Llamó";
$text['label-called']['es-mx'] = "Llamó"; //copied from es-cl
$text['label-called']['fr-ca'] = "Appelé"; //copied from fr-fr
$text['label-called']['fr-fr'] = "Appelé";
$text['label-called']['he-il'] = "Opgeroepen";
$text['label-called']['it-it'] = "Chiamato";
$text['label-called']['nl-nl'] = "Aangeroepen";
$text['label-called']['pl-pl'] = "Zadzwoniono";
$text['label-called']['pt-br'] = "Chamada";
$text['label-called']['pt-pt'] = "Chamado";
$text['label-called']['ro-ro'] = "Sunat";
$text['label-called']['ru-ru'] = "Направление";
$text['label-called']['sv-se'] = "Ringdes";
$text['label-called']['uk-ua'] = "Дзвінок здійснено";
$text['label-busy']['en-us'] = "Busy";
$text['label-busy']['en-gb'] = "Busy";
@@ -573,6 +636,49 @@ $text['label-action']['ru-ru'] = "Действие";
$text['label-action']['sv-se'] = "Åtgärd";
$text['label-action']['uk-ua'] = "Дія";
$text['label-direction']['en-us'] = "Direction";
$text['label-direction']['en-gb'] = "Direction";
$text['label-direction']['ar-eg'] = "";
$text['label-direction']['de-at'] = "Richtung"; //copied from de-de
$text['label-direction']['de-ch'] = "Richtung"; //copied from de-de
$text['label-direction']['de-de'] = "Richtung";
$text['label-direction']['es-cl'] = "Dirección";
$text['label-direction']['es-mx'] = "Dirección"; //copied from es-cl
$text['label-direction']['fr-ca'] = "Direction"; //copied from fr-fr
$text['label-direction']['fr-fr'] = "Direction";
$text['label-direction']['he-il'] = "";
$text['label-direction']['it-it'] = "Direzione";
$text['label-direction']['nl-nl'] = "";
$text['label-direction']['pl-pl'] = "Kierunek";
$text['label-direction']['pt-br'] = "Direção";
$text['label-direction']['pt-pt'] = "Direcção";
$text['label-direction']['ro-ro'] = "";
$text['label-direction']['ru-ru'] = "Направление";
$text['label-direction']['sv-se'] = "Riktning";
$text['label-direction']['uk-ua'] = "Напрям";
$text['description-direction']['en-us'] = "Select the direction of the calls to block.";
$text['description-direction']['en-gb'] = "Select the direction of the calls to block.";
$text['description-direction']['ar-eg'] = "Select the direction of the calls to block.";
$text['description-direction']['de-at'] = "Select the direction of the calls to block.";
$text['description-direction']['de-ch'] = "Select the direction of the calls to block.";
$text['description-direction']['de-de'] = "Select the direction of the calls to block.";
$text['description-direction']['el-gr'] = "Select the direction of the calls to block.";
$text['description-direction']['es-cl'] = "Select the direction of the calls to block.";
$text['description-direction']['es-mx'] = "Select the direction of the calls to block.";
$text['description-direction']['fr-ca'] = "Sélectionnez la direction des appels à bloquer.";
$text['description-direction']['fr-fr'] = "Sélectionnez la direction des appels à bloquer.";
$text['description-direction']['he-il'] = "Select the direction of the calls to block.";
$text['description-direction']['it-it'] = "Select the direction of the calls to block.";
$text['description-direction']['nl-nl'] = "Select the direction of the calls to block.";
$text['description-direction']['pl-pl'] = "Select the direction of the calls to block.";
$text['description-direction']['pt-br'] = "Select the direction of the calls to block.";
$text['description-direction']['pt-pt'] = "Select the direction of the calls to block.";
$text['description-direction']['ro-ro'] = "Select the direction of the calls to block.";
$text['description-direction']['ru-ru'] = "Select the direction of the calls to block.";
$text['description-direction']['sv-se'] = "Select the direction of the calls to block.";
$text['description-direction']['uk-ua'] = "Select the direction of the calls to block.";
$text['description-call_block_name']['en-us'] = "Enter the Caller ID Name to block.";
$text['description-call_block_name']['en-gb'] = "Enter the Caller ID Name to block.";
$text['description-call_block_name']['ar-eg'] = "";
@@ -595,8 +701,29 @@ $text['description-call_block_name']['ru-ru'] = "";
$text['description-call_block_name']['sv-se'] = "";
$text['description-call_block_name']['uk-ua'] = "";
$text['description-call_block_number']['en-us'] = "Enter the Caller ID Number to block.";
$text['description-call_block_number']['en-gb'] = "Enter the Caller ID Number to block.";
$text['description-country_code']['en-us'] = "Enter the Country Code prefix.";
$text['description-country_code']['en-gb'] = "Enter the Country Code prefix.";
$text['description-country_code']['ar-eg'] = "";
$text['description-country_code']['de-at'] = ""; //copied from de-de
$text['description-country_code']['de-ch'] = ""; //copied from de-de
$text['description-country_code']['de-de'] = "";
$text['description-country_code']['es-cl'] = "";
$text['description-country_code']['es-mx'] = ""; //copied from es-cl
$text['description-country_code']['fr-ca'] = "Entrez le préfixe de destination."; //copied from fr-fr
$text['description-country_code']['fr-fr'] = "Entrez le préfixe de destination.";
$text['description-country_code']['he-il'] = "";
$text['description-country_code']['it-it'] = "";
$text['description-country_code']['nl-nl'] = "Voer de bestemming prefix in.";
$text['description-country_code']['pl-pl'] = "";
$text['description-country_code']['pt-br'] = "Insira o prefixo do destino.";
$text['description-country_code']['pt-pt'] = "";
$text['description-country_code']['ro-ro'] = "";
$text['description-country_code']['ru-ru'] = "";
$text['description-country_code']['sv-se'] = "";
$text['description-country_code']['uk-ua'] = "";
$text['description-call_block_number']['en-us'] = "Enter the Country Code and Caller ID Number to block.";
$text['description-call_block_number']['en-gb'] = "Enter the Country Code and Caller ID Number to block.";
$text['description-call_block_number']['ar-eg'] = "";
$text['description-call_block_number']['de-at'] = "";
$text['description-call_block_number']['de-ch'] = "";
@@ -617,8 +744,8 @@ $text['description-call_block_number']['ru-ru'] = "";
$text['description-call_block_number']['sv-se'] = "";
$text['description-call_block_number']['uk-ua'] = "";
$text['description-extension']['en-us'] = "Select the extension to block.";
$text['description-extension']['en-gb'] = "Select the extension to block.";
$text['description-extension']['en-us'] = "Select the extension to be affected.";
$text['description-extension']['en-gb'] = "Select the extension to be affected.";
$text['description-extension']['ar-eg'] = "";
$text['description-extension']['de-at'] = "";
$text['description-extension']['de-ch'] = "";
@@ -670,7 +797,7 @@ $text['description-call-block']['de-de'] = "Eine Liste von Nummern die gesperrt
$text['description-call-block']['el-gr'] = "Μια λίστα από αριθμούς προς απόρριψη εισερχομένων κλήσεων.";
$text['description-call-block']['es-cl'] = "Un listado de números desde los cuales se bloquean las llamadas";
$text['description-call-block']['es-mx'] = "Un listado de números desde los cuales se bloquean las llamadas"; //copied from es-cl
$text['description-call-block']['fr-ca'] = "Une liste de numéros depuis lesquels vous pouvez bloquer les appels"; //copied from fr-fr
$text['description-call-block']['fr-ca'] = "Une liste de numéros à partir de laquelle vous pouvez bloquer les appels."; //copied from fr-fr
$text['description-call-block']['fr-fr'] = "Une liste de numéros depuis lesquels vous pouvez bloquer les appels";
$text['description-call-block']['he-il'] = "";
$text['description-call-block']['it-it'] = "Una lista di numeri per cui è possibile bloccare le chiamate.";
@@ -714,8 +841,8 @@ $text['confirm-block']['de-de'] = "Do you really want to block this?";
$text['confirm-block']['el-gr'] = "Do you really want to block this?";
$text['confirm-block']['es-cl'] = "Do you really want to block this?";
$text['confirm-block']['es-mx'] = "Do you really want to block this?";
$text['confirm-block']['fr-ca'] = "Do you really want to block this?";
$text['confirm-block']['fr-fr'] = "Do you really want to block this?";
$text['confirm-block']['fr-ca'] = "Voulez-vous vraiment bloquer ceci?";
$text['confirm-block']['fr-fr'] = "Voulez-vous vraiment bloquer ceci?";
$text['confirm-block']['he-il'] = "Do you really want to block this?";
$text['confirm-block']['it-it'] = "Do you really want to block this?";
$text['confirm-block']['nl-nl'] = "Do you really want to block this?";
@@ -737,8 +864,8 @@ $text['button-block']['de-de'] = "Block";
$text['button-block']['el-gr'] = "Block";
$text['button-block']['es-cl'] = "Block";
$text['button-block']['es-mx'] = "Block";
$text['button-block']['fr-ca'] = "Block";
$text['button-block']['fr-fr'] = "Block";
$text['button-block']['fr-ca'] = "Bloquer";
$text['button-block']['fr-fr'] = "Bloquer";
$text['button-block']['he-il'] = "Block";
$text['button-block']['it-it'] = "Block";
$text['button-block']['nl-nl'] = "Block";
@@ -751,4 +878,4 @@ $text['button-block']['sv-se'] = "Block";
$text['button-block']['uk-ua'] = "Block";
$text['button-block']['tr-tr'] = "Block";
?>
?>

View File

@@ -23,8 +23,10 @@
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Call Block is written by Gerrit Visser <gerrit308@gmail.com>
The original Call Block was written by Gerrit Visser <gerrit308@gmail.com>
All of it has been rewritten over years.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
@@ -83,6 +85,7 @@
if (strlen($search) > 0) {
$sql_search = " (";
$sql_search .= "lower(call_block_name) like :search ";
$sql_search .= "or call_block_country_code like :search ";
$sql_search .= "or lower(call_block_number) like :search ";
$sql_search .= "or lower(call_block_description) like :search ";
$sql_search .= ") ";
@@ -91,7 +94,15 @@
//prepare to page the results
$sql = "select count(*) from view_call_block ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "where true ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and (domain_uuid = :domain_uuid) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and extension_uuid in (";
$x = 0;
@@ -106,13 +117,16 @@
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
}
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
unset($parameters);
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".$search;
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
@@ -121,7 +135,15 @@
//get the list
$sql = "select * from view_call_block ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "where true ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and (domain_uuid = :domain_uuid) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and extension_uuid in (";
$x = 0;
@@ -136,7 +158,7 @@
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
}
$sql .= order_by($order_by, $order, 'call_block_number');
$sql .= order_by($order_by, $order, ['call_block_country_code','call_block_number']);
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
@@ -167,6 +189,14 @@
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_forward_all')) {
if ($_GET['show'] == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type).'&show=all'.($search != '' ? "&search=".urlencode($search) : null)]);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_block.php','style'=>($search == '' ? 'display: none;' : null)]);
@@ -202,8 +232,13 @@
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('call_block_direction', $text['label-direction'], $order_by, $order, null, "style='width: 1%;' class='center'");
echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, "class='center'");
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
echo th_order_by('call_block_country_code', $text['label-country_code'], $order_by, $order);
echo th_order_by('call_block_number', $text['label-number'], $order_by, $order);
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "class='center hide-sm-dn'");
echo th_order_by('call_block_action', $text['label-action'], $order_by, $order);
@@ -228,7 +263,16 @@
echo " <input type='hidden' name='call_blocks[".$x."][uuid]' value='".escape($row['call_block_uuid'])."' />\n";
echo " </td>\n";
}
echo " <td>";
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td class='center'>";
switch ($row['call_block_direction']) {
case "inbound": echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png' style='border: none;' title='".$text['label-inbound']."'>\n"; break;
case "outbound": echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png' style='border: none;' title='".$text['label-outbound']."'>\n"; break;
}
echo " </td>\n";
echo " <td class='center'>";
if (strlen($row['extension']) == 0) {
echo $text['label-all'];
}
@@ -238,6 +282,14 @@
echo " </td>\n";
echo " <td>".escape($row['call_block_name'])."</td>\n";
echo " <td>";
if (permission_exists('call_block_edit')) {
echo "<a href='".$list_row_url."'>".escape($row['call_block_country_code'])."</a>";
}
else {
echo escape($row['call_block_country_code']);
}
echo " </td>\n";
echo " <td>";
if (permission_exists('call_block_edit')) {
echo "<a href='".$list_row_url."'>".escape(format_phone($row['call_block_number']))."</a>";
}

View File

@@ -52,8 +52,10 @@
//get http post variables and set them to php variables
if (count($_POST) > 0) {
$call_block_direction = $_POST["call_block_direction"];
$extension_uuid = $_POST["extension_uuid"];
$call_block_name = $_POST["call_block_name"];
$call_block_country_code = $_POST["call_block_country_code"];
$call_block_number = $_POST["call_block_number"];
$call_block_enabled = $_POST["call_block_enabled"];
$call_block_description = $_POST["call_block_description"];
@@ -83,6 +85,7 @@
$xml_cdrs = $_POST['xml_cdrs'];
if (permission_exists('call_block_add') && is_array($xml_cdrs) && @sizeof($xml_cdrs) != 0) {
$obj = new call_block;
$obj->call_block_direction = $call_block_direction;
$obj->extension_uuid = $extension_uuid;
$obj->call_block_app = $call_block_app;
$obj->call_block_data = $call_block_data;
@@ -160,10 +163,12 @@
if ($action == "add") {
$array['call_block'][0]['call_block_uuid'] = uuid();
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
if (is_uuid($extension_uuid)) {
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
}
$array['call_block'][0]['call_block_name'] = $call_block_name;
$array['call_block'][0]['call_block_country_code'] = $call_block_country_code;
$array['call_block'][0]['call_block_number'] = $call_block_number;
$array['call_block'][0]['call_block_count'] = 0;
$array['call_block'][0]['call_block_app'] = $call_block_app;
@@ -184,7 +189,7 @@
return;
}
if ($action == "update") {
$sql = "select c.call_block_number, d.domain_name ";
$sql = "select c.call_block_country_code, c.call_block_number, d.domain_name ";
$sql .= "from v_call_block as c ";
$sql .= "join v_domains as d on c.domain_uuid = d.domain_uuid ";
$sql .= "where c.domain_uuid = :domain_uuid ";
@@ -199,16 +204,18 @@
//clear the cache
$cache = new cache;
$cache->delete("app:call_block:".$domain_name.":".$call_block_number);
$cache->delete("app:call_block:".$domain_name.":".$call_block_country_code.$call_block_number);
}
unset($sql, $parameters);
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
if (is_uuid($extension_uuid)) {
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
}
$array['call_block'][0]['call_block_name'] = $call_block_name;
$array['call_block'][0]['call_block_country_code'] = $call_block_country_code;
$array['call_block'][0]['call_block_number'] = $call_block_number;
$array['call_block'][0]['call_block_app'] = $call_block_app;
$array['call_block'][0]['call_block_data'] = $call_block_data;
@@ -241,8 +248,10 @@
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
$call_block_direction = $row["call_block_direction"];
$extension_uuid = $row["extension_uuid"];
$call_block_name = $row["call_block_name"];
$call_block_country_code = $row["call_block_country_code"];
$call_block_number = $row["call_block_number"];
$call_block_app = $row["call_block_app"];
$call_block_data = $row["call_block_data"];
@@ -318,6 +327,21 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-direction']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='call_block_direction'>\n";
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
echo " <option value='outbound' ".($call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-direction']."\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('call_block_all')) {
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
@@ -356,6 +380,7 @@
echo " ".$text['label-number']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_block_country_code' maxlength='6' style='width: 60px;' value=\"".escape($call_block_country_code)."\">\n";
echo " <input class='formfld' type='text' name='call_block_number' maxlength='255' value=\"".escape($call_block_number)."\">\n";
echo "<br />\n";
echo $text['description-call_block_number']."\n";
@@ -460,57 +485,49 @@
//get recent calls from the db (if not editing an existing call block record)
if (!is_uuid($_REQUEST["id"])) {
if (permission_exists('call_block_all')) {
$sql = "select caller_id_number, caller_id_name, caller_id_number, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
$sql .= "from v_xml_cdr where true ";
$sql .= "and domain_uuid = :domain_uuid ";
$sql .= "and direction != 'outbound' ";
$sql .= "order by start_stamp desc ";
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$result = $database->select($sql, $parameters);
unset($sql, $parameters);
}
//without block all permission, limit to assigned extension(s)
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension'])) {
foreach ($_SESSION['user']['extension'] as $assigned_extension) {
$assigned_extensions[$assigned_extension['extension_uuid']] = $assigned_extension['user'];
}
$sql = "select caller_id_number, caller_id_name, caller_id_number, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
$sql .= "from v_xml_cdr ";
$sql .= "where domain_uuid = :domain_uuid ";
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
$x = 0;
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
//$sql_where_array[] = "caller_id_number = :caller_id_number_".$x;
//$sql_where_array[] = "destination_number = :destination_number_1_".$x;
//$sql_where_array[] = "destination_number = :destination_number_2_".$x;
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
//$parameters['caller_id_number_'.$x] = $assigned_extension;
//$parameters['destination_number_1_'.$x] = $assigned_extension;
//$parameters['destination_number_2_'.$x] = '*99'.$assigned_extension;
$x++;
}
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
$sql .= "and (".implode(' or ', $sql_where_array).") ";
}
unset($sql_where_array);
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
$x = 0;
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
$x++;
}
$sql .= "order by start_stamp desc";
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$result = $database->select($sql, $parameters, 'all');
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
$sql_where .= "and (".implode(' or ', $sql_where_array).") ";
}
unset($sql_where_array);
}
}
//get recent calls
$sql = "select caller_id_name, caller_id_number, caller_destination, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
$sql .= "from v_xml_cdr where domain_uuid = :domain_uuid ";
$sql .= "and direction <> 'local' ";
$sql .= $sql_where;
$sql .= "order by start_stamp desc ";
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$result = $database->select($sql, $parameters);
unset($sql, $parameters);
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value='add'>\n";
echo "<div class='action_bar' id='action_bar_sub'>\n";
echo " <div class='heading'><b id='heading_sub'>".$text['heading-recent_calls']."</b></div>\n";
echo " <div class='heading'>";
echo " <b id='heading_sub'>".$text['heading-recent_calls']."</b>";
echo " <select class='formfld' name='call_block_direction' style='margin-bottom: 6px; margin-left: 15px;' onchange=\"show_direction(this.options[this.selectedIndex].value);\">\n";
echo " <option value='' disabled='disabled'>".$text['label-direction']."</option>\n";
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
echo " <option value='outbound'>".$text['label-outbound']."</option>\n";
echo " </select>\n";
echo " </div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'collapse'=>'hide-xs','style'=>'display: none;','link'=>'call_block.php']);
if ($result) {
@@ -539,83 +556,112 @@
echo modal::create(['id'=>'modal-block','type'=>'general','message'=>$text['confirm-block'],'actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_block','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
}
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
echo "<th style='width: 1%;'>&nbsp;</th>\n";
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
echo th_order_by('start_stamp', $text['label-called-on'], $order_by, $order);
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
echo "</tr>";
foreach (['inbound','outbound'] as $direction) {
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".($result ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
echo "<th style='width: 1%;'>&nbsp;</th>\n";
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order);
echo th_order_by('caller_id_number', $text['label-destination'], $order_by, $order);
echo th_order_by('start_stamp', $text['label-called'], $order_by, $order);
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
echo "</tr>";
if (is_array($result) && @sizeof($result) != 0) {
$x = 0;
foreach ($result as $row) {
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
if (strlen($row['caller_id_number']) >= 7) {
if ($_SESSION['domain']['time_format']['text'] == '24h') {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
}
else {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
echo " </td>\n";
if (
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_failed.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_answered.png")
) {
echo " <td class='center' ".$list_row_onclick_toggle.">";
switch ($row['direction']) {
case "inbound" :
if ($row['billsec'] == 0) {
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png' style='border: none;' alt='".$text['label-inbound']." ".$text['label-missed']."'>\n";
if (is_array($result) && @sizeof($result) != 0) {
foreach ($result as $x => $row) {
if ($row['direction'] == $direction) {
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all_".$direction."').checked = false; }";
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
if (strlen($row['caller_id_number']) >= 7) {
if ($_SESSION['domain']['time_format']['text'] == '24h') {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
}
else {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
}
echo "<tr class='list-row row_".$row['direction']."' href='".$list_row_url."'>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' class='checkbox_".$row['direction']."' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
echo " </td>\n";
if (
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_voicemail.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_failed.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png")
) {
echo " <td class='center' ".$list_row_onclick_toggle.">";
switch ($row['direction']) {
case "inbound":
if ($row['billsec'] == 0) {
$title_mod = " ".$text['label-missed'];
$file_mod = "_voicemail";
}
else {
$file_mod = "_answered";
}
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound".$file_mod.".png' style='border: none;' title='".$text['label-inbound'].$title_mod."'>\n";
break;
case "outbound":
if ($row['billsec'] == 0) {
$title_mod = " ".$text['label-failed'];
$file_mod = "_failed";
}
else {
$file_mod = "_answered";
}
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound".$file_mod.".png' style='border: none;' title='".$text['label-outbound'].$title_mod."'>\n";
break;
}
else {
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_answered.png' style='border: none;' alt='".$text['label-inbound']."'>\n";
}
break;
case "local" :
if ($row['billsec'] == 0) {
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_failed.png' style='border: none;' alt='".$text['label-local']." ".$text['label-failed']."'>\n";
}
else {
echo "<img src='/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_local_answered.png' style='border: none;' alt='".$text['label-local']."'>\n";
}
break;
echo " </td>\n";
}
else {
echo " <td ".$list_row_onclick_toggle.">&nbsp;</td>";
}
echo " <td ".$list_row_onclick_toggle.">".$row['caller_id_name']." </td>\n";
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_id_number'])."</td>\n";
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_destination'])."</td>\n";
echo " <td class='no-wrap' ".$list_row_onclick_toggle.">".$tmp_start_epoch."</td>\n";
$seconds = ($row['hangup_cause'] == "ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; //if they cancelled, show the ring time, not the bill time.
echo " <td class='right hide-sm-dn' ".$list_row_onclick_toggle.">".gmdate("G:i:s", $seconds)."</td>\n";
echo "</tr>\n";
}
echo " </td>\n";
}
else {
echo " <td ".$list_row_onclick_toggle.">&nbsp;</td>";
}
echo " <td ".$list_row_onclick_toggle.">".$row['caller_id_name']." </td>\n";
echo " <td ".$list_row_onclick_toggle.">".format_phone($row['caller_id_number'])."</td>\n";
echo " <td class='no-wrap' ".$list_row_onclick_toggle.">".$tmp_start_epoch."</td>\n";
$seconds = ($row['hangup_cause'] == "ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; //if they cancelled, show the ring time, not the bill time.
echo " <td class='right hide-sm-dn' ".$list_row_onclick_toggle.">".gmdate("G:i:s", $seconds)."</td>\n";
echo "</tr>\n";
$x++;
}
}
unset($result);
echo "</table>\n";
}
unset($result);
echo "</table>\n";
echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//handle hiding and showing of direction recent calls
echo "<script>\n";
echo " function show_direction(direction) {\n";
echo " //determine other direction\n";
echo " direction_other = direction == 'inbound' ? 'outbound' : 'inbound';\n";
echo " //hide other direction list\n";
echo " document.getElementById('list_' + direction_other).style.display='none';\n";
echo " //uncheck all checkboxes\n";
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']\")\n";
echo " if (checkboxes.length > 0) {\n";
echo " for (var i = 0; i < checkboxes.length; ++i) {\n";
echo " checkboxes[i].checked = false;\n";
echo " }\n";
echo " }\n";
echo " //show direction list\n";
echo " document.getElementById('list_' + direction).style.display='inline';\n";
echo " }\n";
echo "</script>\n";
}
//make sub action bar sticky
@@ -639,4 +685,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -23,6 +23,7 @@ if (!class_exists('call_block')) {
/**
* declare public variables
*/
public $call_block_direction;
public $extension_uuid;
public $call_block_app;
public $call_block_data;
@@ -307,7 +308,7 @@ if (!class_exists('call_block')) {
//get the caller id info from cdrs
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select caller_id_name, caller_id_number from v_xml_cdr ";
$sql = "select caller_id_name, caller_id_number, caller_destination from v_xml_cdr ";
$sql .= "where xml_cdr_uuid in (".implode(', ', $uuids).") ";
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
@@ -322,11 +323,17 @@ if (!class_exists('call_block')) {
if (permission_exists('call_block_all')) {
$array['call_block'][$x]['call_block_uuid'] = uuid();
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
if (is_uuid($this->extension_uuid)) {
$array['call_block'][$x]['extension_uuid'] = $this->extension_uuid;
}
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
if ($this->call_block_direction == 'inbound') {
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
}
if ($this->call_block_direction == 'outbound') {
$array['call_block'][$x]['call_block_number'] = trim($row["caller_destination"]);
}
$array['call_block'][$x]['call_block_count'] = 0;
$array['call_block'][$x]['call_block_app'] = $this->call_block_app;
$array['call_block'][$x]['call_block_data'] = $this->call_block_data;
@@ -340,9 +347,15 @@ if (!class_exists('call_block')) {
if (is_uuid($field['extension_uuid'])) {
$array['call_block'][$x]['call_block_uuid'] = uuid();
$array['call_block'][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][$x]['call_block_direction'] = $this->call_block_direction;
$array['call_block'][$x]['extension_uuid'] = $field['extension_uuid'];
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
if ($this->call_block_direction == 'inbound') {
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_number'] = trim($row["caller_id_number"]);
}
if ($this->call_block_direction == 'outbound') {
$array['call_block'][$x]['call_block_number'] = trim($row["caller_destination"]);
}
$array['call_block'][$x]['call_block_count'] = 0;
$array['call_block'][$x]['call_block_app'] = $this->call_block_app;
$array['call_block'][$x]['call_block_data'] = $this->call_block_data;

View File

@@ -155,5 +155,9 @@
$apps[$x]['db'][$y]['fields'][$z]['name'] = "broadcast_accountcode";
$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'] = "broadcast_toll_allow";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
?>

View File

@@ -103,6 +103,7 @@
$broadcast_avmd = $_POST["broadcast_avmd"];
$broadcast_destination_data = $_POST["broadcast_destination_data"];
$broadcast_description = $_POST["broadcast_description"];
$broadcast_toll_allow = $_POST["broadcast_toll_allow"];
if (if_group("superadmin")) {
$broadcast_accountcode = $_POST["broadcast_accountcode"];
@@ -234,6 +235,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$array['call_broadcasts'][0]['broadcast_destination_data'] = $broadcast_destination_data;
$array['call_broadcasts'][0]['broadcast_accountcode'] = $broadcast_accountcode;
$array['call_broadcasts'][0]['broadcast_description'] = $broadcast_description;
$array['call_broadcasts'][0]['broadcast_toll_allow'] = $broadcast_toll_allow;
//execute
$database = new database;
@@ -274,6 +276,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$broadcast_destination_data = $row["broadcast_destination_data"];
$broadcast_accountcode = $row["broadcast_accountcode"];
$broadcast_description = $row["broadcast_description"];
$broadcast_toll_allow = $row["broadcast_toll_allow"];
}
unset($sql, $parameters, $row);
}
@@ -493,6 +496,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-broadcast_toll_allow']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='broadcast_toll_allow' maxlength='255' value=".escape($broadcast_toll_allow).">\n";
echo "<br />\n";
echo $text['description-broadcast_toll_allow']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-description']."\n";

View File

@@ -182,6 +182,7 @@
$channel_variables .= ",domain=".$_SESSION['domain_name'];
$channel_variables .= ",domain_name=".$_SESSION['domain_name'];
$channel_variables .= ",accountcode='$broadcast_accountcode'";
$channel_variables .= ",toll_allow='$broadcast_toll_allow'";
if ($broadcast_avmd == "true") {
$channel_variables .= ",execute_on_answer='avmd start'";
}

View File

@@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['type'] = "sql";
$apps[$x]['destinations'][$y]['label'] = "call_centers";
$apps[$x]['destinations'][$y]['name'] = "call_centers";
$apps[$x]['destinations'][$y]['sql'] = "select queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues";
$apps[$x]['destinations'][$y]['sql'] = "select queue_name as name, queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' ";
$apps[$x]['destinations'][$y]['order_by'] = "queue_name asc";
$apps[$x]['destinations'][$y]['field']['name'] = "queue_name";
@@ -121,7 +121,6 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_center_outbound_caller_id_name";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
@@ -156,6 +155,14 @@
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bc73c8eb-f3eb-4182-adc0-9ac5aeedae2a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "agent_contact_method";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "user";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: user (default)";
//cache details
$apps[$x]['cache']['key'] = "dialplan.\${domain_name}";
@@ -254,6 +261,10 @@
$apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_no_answer_delay_time";
$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'] = "agent_record";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_call_center_queues";
@@ -326,6 +337,10 @@
$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'] = "queue_time_base_score_sec";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Used to set the time base score of the Call Center to prioritize one call center over another.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_max_wait_time";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -30,8 +30,8 @@ $text['title-call_center_tier_edit']['de-ch'] = "Callcenter Ebene"; //copied fro
$text['title-call_center_tier_edit']['de-de'] = "Callcenter Ebene";
$text['title-call_center_tier_edit']['es-cl'] = "Editar Nivel de Centro de Llamados";
$text['title-call_center_tier_edit']['es-mx'] = "Editar Nivel de Centro de Llamados"; //copied from es-cl
$text['title-call_center_tier_edit']['fr-ca'] = "Editer un Niveau du Centre d'Appel"; //copied from fr-fr
$text['title-call_center_tier_edit']['fr-fr'] = "Editer un Niveau du Centre d'Appel";
$text['title-call_center_tier_edit']['fr-ca'] = "Editer un niveau du centre d'appel";
$text['title-call_center_tier_edit']['fr-fr'] = "Editer un niveau du Centre d'appel";
$text['title-call_center_tier_edit']['he-il'] = "";
$text['title-call_center_tier_edit']['it-it'] = "Tier del Call Center";
$text['title-call_center_tier_edit']['nl-nl'] = "Call-center vergelijking";
@@ -177,8 +177,8 @@ $text['title-call_center_agent_status']['de-ch'] = "Callcenter Agenten Status";
$text['title-call_center_agent_status']['de-de'] = "Callcenter Agenten Status";
$text['title-call_center_agent_status']['es-cl'] = "Estado de Agente de Centro de Llamados";
$text['title-call_center_agent_status']['es-mx'] = "Estado de Agente de Centro de Llamados"; //copied from es-cl
$text['title-call_center_agent_status']['fr-ca'] = "Etat de l'Agent"; //copied from fr-fr
$text['title-call_center_agent_status']['fr-fr'] = "Etat de l'Agent";
$text['title-call_center_agent_status']['fr-ca'] = "État de l'agent";
$text['title-call_center_agent_status']['fr-fr'] = "Etat de l'agent";
$text['title-call_center_agent_status']['he-il'] = "";
$text['title-call_center_agent_status']['it-it'] = "Stato Agenti Call Center";
$text['title-call_center_agent_status']['nl-nl'] = "Call-Center agent status";
@@ -198,8 +198,8 @@ $text['title-call_center_agent_edit']['de-ch'] = "Callcenter Agenten"; //copied
$text['title-call_center_agent_edit']['de-de'] = "Callcenter Agenten";
$text['title-call_center_agent_edit']['es-cl'] = "Editar Agente de Centro de Llamados";
$text['title-call_center_agent_edit']['es-mx'] = "Editar Agente de Centro de Llamados"; //copied from es-cl
$text['title-call_center_agent_edit']['fr-ca'] = "Agent de centre d'appel"; //copied from fr-fr
$text['title-call_center_agent_edit']['fr-fr'] = "Agent de centre d'appel";
$text['title-call_center_agent_edit']['fr-ca'] = "Agent du centre d'appel";
$text['title-call_center_agent_edit']['fr-fr'] = "Agent du centre d'appel";
$text['title-call_center_agent_edit']['he-il'] = "";
$text['title-call_center_agent_edit']['it-it'] = "Agente Call Center";
$text['title-call_center_agent_edit']['nl-nl'] = "Call-Center Agent";
@@ -324,8 +324,8 @@ $text['option-top_down']['de-ch'] = "Absteigend"; //copied from de-de
$text['option-top_down']['de-de'] = "Absteigend";
$text['option-top_down']['es-cl'] = "Top Down";
$text['option-top_down']['es-mx'] = "Top Down"; //copied from es-cl
$text['option-top_down']['fr-ca'] = "Haut bas"; //copied from fr-fr
$text['option-top_down']['fr-fr'] = "Haut bas";
$text['option-top_down']['fr-ca'] = "Du haut vers le bas";
$text['option-top_down']['fr-fr'] = "Du haut vers le bas";
$text['option-top_down']['he-il'] = "";
$text['option-top_down']['it-it'] = "Dall'alto al basso";
$text['option-top_down']['nl-nl'] = "Hoog->Laag";
@@ -450,8 +450,8 @@ $text['option-ring_all']['de-ch'] = "Alle läuten"; //copied from de-de
$text['option-ring_all']['de-de'] = "Alle läuten";
$text['option-ring_all']['es-cl'] = "Sonar todos";
$text['option-ring_all']['es-mx'] = "Sonar todos"; //copied from es-cl
$text['option-ring_all']['fr-ca'] = "Sonner tous"; //copied from fr-fr
$text['option-ring_all']['fr-fr'] = "Sonner tous";
$text['option-ring_all']['fr-ca'] = "Sonner partout"; //copied from fr-fr
$text['option-ring_all']['fr-fr'] = "Sonner partout";
$text['option-ring_all']['he-il'] = "";
$text['option-ring_all']['it-it'] = "Squillano tutti";
$text['option-ring_all']['nl-nl'] = "Allen gelijktijdig";
@@ -534,7 +534,7 @@ $text['option-on_break']['de-ch'] = "In Pause"; //copied from de-de
$text['option-on_break']['de-de'] = "In Pause";
$text['option-on_break']['es-cl'] = "En Pausa";
$text['option-on_break']['es-mx'] = "En Pausa"; //copied from es-cl
$text['option-on_break']['fr-ca'] = "En Pause"; //copied from fr-fr
$text['option-on_break']['fr-ca'] = "En pause";
$text['option-on_break']['fr-fr'] = "En Pause";
$text['option-on_break']['he-il'] = "";
$text['option-on_break']['it-it'] = "In Pausa";
@@ -555,7 +555,7 @@ $text['option-no_change']['de-ch'] = "Keine Änderung"; //copied from de-de
$text['option-no_change']['de-de'] = "Keine Änderung";
$text['option-no_change']['es-cl'] = "Sin Cambios";
$text['option-no_change']['es-mx'] = "Sin Cambios"; //copied from es-cl
$text['option-no_change']['fr-ca'] = "Pas de Changement"; //copied from fr-fr
$text['option-no_change']['fr-ca'] = "Pas de changement";
$text['option-no_change']['fr-fr'] = "Pas de Changement";
$text['option-no_change']['he-il'] = "";
$text['option-no_change']['it-it'] = "Nessun Cambiamento";
@@ -576,8 +576,8 @@ $text['option-longest_idle_agent']['de-ch'] = "Agent mit der höchsten Wartezeit
$text['option-longest_idle_agent']['de-de'] = "Agent mit der höchsten Wartezeit";
$text['option-longest_idle_agent']['es-cl'] = "Agente desocupado por más tiempo";
$text['option-longest_idle_agent']['es-mx'] = "Agente desocupado por más tiempo"; //copied from es-cl
$text['option-longest_idle_agent']['fr-ca'] = "Agent logué depuis le plus lontemps"; //copied from fr-fr
$text['option-longest_idle_agent']['fr-fr'] = "Agent logué depuis le plus lontemps";
$text['option-longest_idle_agent']['fr-ca'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['fr-fr'] = "Agent inactif le plus longtemps";
$text['option-longest_idle_agent']['he-il'] = "";
$text['option-longest_idle_agent']['it-it'] = "Da più tempo libero";
$text['option-longest_idle_agent']['nl-nl'] = "Langst wachtende agent";
@@ -702,8 +702,8 @@ $text['option-do_not_disturb']['de-ch'] = "Bitte nicht stören"; //copied from d
$text['option-do_not_disturb']['de-de'] = "Bitte nicht stören";
$text['option-do_not_disturb']['es-cl'] = "No Molestar";
$text['option-do_not_disturb']['es-mx'] = "No Molestar"; //copied from es-cl
$text['option-do_not_disturb']['fr-ca'] = "Ne Pas Derranger"; //copied from fr-fr
$text['option-do_not_disturb']['fr-fr'] = "Ne Pas Derranger";
$text['option-do_not_disturb']['fr-ca'] = "Ne pas ranger"; //copied from fr-fr
$text['option-do_not_disturb']['fr-fr'] = "Ne pas ranger";
$text['option-do_not_disturb']['he-il'] = "";
$text['option-do_not_disturb']['it-it'] = "Non Disturbare";
$text['option-do_not_disturb']['nl-nl'] = "Niet Storen";
@@ -723,8 +723,8 @@ $text['option-available_on_demand']['de-ch'] = "Verfügbar (auf Anfrage)"; //cop
$text['option-available_on_demand']['de-de'] = "Verfügbar (auf Anfrage)";
$text['option-available_on_demand']['es-cl'] = "Disponible (Bajo Demanda)";
$text['option-available_on_demand']['es-mx'] = "Disponible (Bajo Demanda)"; //copied from es-cl
$text['option-available_on_demand']['fr-ca'] = "Disponible (Sur Demande)"; //copied from fr-fr
$text['option-available_on_demand']['fr-fr'] = "Disponible (Sur Demande)";
$text['option-available_on_demand']['fr-ca'] = "Disponible (sur demande)";
$text['option-available_on_demand']['fr-fr'] = "Disponible (sur demande)";
$text['option-available_on_demand']['he-il'] = "";
$text['option-available_on_demand']['it-it'] = "Disponibile (Su Richiesta)";
$text['option-available_on_demand']['nl-nl'] = "beschikbaar (op aanvraag)";
@@ -765,8 +765,8 @@ $text['option-agent_with_least_talk_time']['de-ch'] = "Agent mit geringster Spre
$text['option-agent_with_least_talk_time']['de-de'] = "Agent mit geringster Sprechzeit";
$text['option-agent_with_least_talk_time']['es-cl'] = "Agente con el menor tiempo de comunicación";
$text['option-agent_with_least_talk_time']['es-mx'] = "Agente con el menor tiempo de comunicación"; //copied from es-cl
$text['option-agent_with_least_talk_time']['fr-ca'] = "Agent ayant le plus petit temps de parole"; //copied from fr-fr
$text['option-agent_with_least_talk_time']['fr-fr'] = "Agent ayant le plus petit temps de parole";
$text['option-agent_with_least_talk_time']['fr-ca'] = "Agent avec le moins de temps de conversation";
$text['option-agent_with_least_talk_time']['fr-fr'] = "Agent avec le moins de temps de conversation";
$text['option-agent_with_least_talk_time']['he-il'] = "";
$text['option-agent_with_least_talk_time']['it-it'] = "Agent che ha parlato di meno";
$text['option-agent_with_least_talk_time']['nl-nl'] = "Agent met kostste gesprekstijd";
@@ -807,7 +807,7 @@ $text['message-maximum_queues']['de-ch'] = "Maximale Anzahl Warteschlangen:"; //
$text['message-maximum_queues']['de-de'] = "Maximale Anzahl Warteschlangen:";
$text['message-maximum_queues']['es-cl'] = "Colas Máximo Permitido:";
$text['message-maximum_queues']['es-mx'] = "Colas Máximo Permitido:"; //copied from es-cl
$text['message-maximum_queues']['fr-ca'] = "Files d'attente Maximum Autorisé:"; //copied from fr-fr
$text['message-maximum_queues']['fr-ca'] = "Files d'attente maximum autorisé:";
$text['message-maximum_queues']['fr-fr'] = "Files d'attente Maximum Autorisé:";
$text['message-maximum_queues']['he-il'] = "";
$text['message-maximum_queues']['it-it'] = "Massimo Code:";
@@ -828,8 +828,8 @@ $text['message-duplicate_agent_id']['de-ch'] = "Agenten ID bereits vorhanden"; /
$text['message-duplicate_agent_id']['de-de'] = "Agenten ID bereits vorhanden";
$text['message-duplicate_agent_id']['es-cl'] = "Duplicar ID de Agente detectada";
$text['message-duplicate_agent_id']['es-mx'] = "Duplicar ID de Agente detectada"; //copied from es-cl
$text['message-duplicate_agent_id']['fr-ca'] = "Dupliquer Agent ID détecté"; //copied from fr-fr
$text['message-duplicate_agent_id']['fr-fr'] = "Dupliquer Agent ID détecté";
$text['message-duplicate_agent_id']['fr-ca'] = "ID d'agent duplicat détecté";
$text['message-duplicate_agent_id']['fr-fr'] = "ID d'agent duplicat détecté";
$text['message-duplicate_agent_id']['he-il'] = "";
$text['message-duplicate_agent_id']['it-it'] = "Rilevato ID Agente Duplicato";
$text['message-duplicate_agent_id']['nl-nl'] = "Duplicaat Agent ID ontdekt";
@@ -849,8 +849,8 @@ $text['label-wrap_up_time']['de-ch'] = "Nachbereitungszeit"; //copied from de-de
$text['label-wrap_up_time']['de-de'] = "Nachbereitungszeit";
$text['label-wrap_up_time']['es-cl'] = "Tiempo de Preparación";
$text['label-wrap_up_time']['es-mx'] = "Tiempo de Preparación"; //copied from es-cl
$text['label-wrap_up_time']['fr-ca'] = "temps de Wrap Up"; //copied from fr-fr
$text['label-wrap_up_time']['fr-fr'] = "temps de Wrap Up";
$text['label-wrap_up_time']['fr-ca'] = "Temps de clôture";
$text['label-wrap_up_time']['fr-fr'] = "Temps de clôture";
$text['label-wrap_up_time']['he-il'] = "";
$text['label-wrap_up_time']['it-it'] = "Wrap Up Time";
$text['label-wrap_up_time']['nl-nl'] = "Afrondtijd";
@@ -870,8 +870,8 @@ $text['label-type']['de-ch'] = "Typ"; //copied from de-de
$text['label-type']['de-de'] = "Typ";
$text['label-type']['es-cl'] = "Tipo";
$text['label-type']['es-mx'] = "Tipo"; //copied from es-cl
$text['label-type']['fr-ca'] = "Type"; //copied from fr-fr
$text['label-type']['fr-fr'] = "Type";
$text['label-type']['fr-ca'] = "Genre";
$text['label-type']['fr-fr'] = "Genre";
$text['label-type']['he-il'] = "";
$text['label-type']['it-it'] = "Tipo";
$text['label-type']['nl-nl'] = "Type";
@@ -891,7 +891,7 @@ $text['label-timeout_action']['de-ch'] = "Aktion bei Zeitüberschreitung"; //cop
$text['label-timeout_action']['de-de'] = "Aktion bei Zeitüberschreitung";
$text['label-timeout_action']['es-cl'] = "Acción de Timeout";
$text['label-timeout_action']['es-mx'] = "Acción de Timeout"; //copied from es-cl
$text['label-timeout_action']['fr-ca'] = "Action sur Timeout"; //copied from fr-fr
$text['label-timeout_action']['fr-ca'] = "Action si délai d'attente excédé";
$text['label-timeout_action']['fr-fr'] = "Action sur Timeout";
$text['label-timeout_action']['he-il'] = "";
$text['label-timeout_action']['it-it'] = "Azione al Timeout";
@@ -912,8 +912,8 @@ $text['label-time_base_score']['de-ch'] = "Zeitgeber für Klassifikation"; //cop
$text['label-time_base_score']['de-de'] = "Zeitgeber für Klassifikation";
$text['label-time_base_score']['es-cl'] = "Puntuación basada en tiempo";
$text['label-time_base_score']['es-mx'] = "Puntuación basada en tiempo"; //copied from es-cl
$text['label-time_base_score']['fr-ca'] = "Score Basé sur le Temps"; //copied from fr-fr
$text['label-time_base_score']['fr-fr'] = "Score Basé sur le Temps";
$text['label-time_base_score']['fr-ca'] = "Score basé sur le temps";
$text['label-time_base_score']['fr-fr'] = "Score Basé sur le temps";
$text['label-time_base_score']['he-il'] = "";
$text['label-time_base_score']['it-it'] = "Punteggio su Base Tempo";
$text['label-time_base_score']['nl-nl'] = "Tijd basis score";
@@ -925,6 +925,27 @@ $text['label-time_base_score']['ru-ru'] = "Оценка по времени";
$text['label-time_base_score']['sv-se'] = "Tidsbaserat Resultat";
$text['label-time_base_score']['uk-ua'] = "";
$text['label-time_base_score_sec']['en-us'] = "Time Base Score Seconds";
$text['label-time_base_score_sec']['en-gb'] = "Time Base Score Seconds";
$text['label-time_base_score_sec']['ar-eg'] = "";
$text['label-time_base_score_sec']['de-at'] = "Zeitgeber für Klassifikation Seconden"; //copied from de-de
$text['label-time_base_score_sec']['de-ch'] = "Zeitgeber für Klassifikation Seconden"; //copied from de-de
$text['label-time_base_score_sec']['de-de'] = "Zeitgeber für Klassifikation Seconden";
$text['label-time_base_score_sec']['es-cl'] = "Puntuación basada en tiempo Segundos";
$text['label-time_base_score_sec']['es-mx'] = "Puntuación basada en tiempo Segundos"; //copied from es-cl
$text['label-time_base_score_sec']['fr-ca'] = "Score basé sur le temps Seconds";
$text['label-time_base_score_sec']['fr-fr'] = "Score Basé sur le temps Seconds";
$text['label-time_base_score_sec']['he-il'] = "";
$text['label-time_base_score_sec']['it-it'] = "Punteggio su Base Tempo Secondi";
$text['label-time_base_score_sec']['nl-nl'] = "Tijd basis score";
$text['label-time_base_score_sec']['pl-pl'] = "Wynik oparty na czasie Sekundy";
$text['label-time_base_score_sec']['pt-br'] = "Pontuação baseada no tempo Segundos"; //copied from pt-pt
$text['label-time_base_score_sec']['pt-pt'] = "Pontuação baseada no tempo Segundos";
$text['label-time_base_score_sec']['ro-ro'] = "";
$text['label-time_base_score_sec']['ru-ru'] = "Оценка по времени секунды";
$text['label-time_base_score_sec']['sv-se'] = "Tidsbaserat Resultat Sekunder";
$text['label-time_base_score_sec']['uk-ua'] = "";
$text['label-tiers']['en-us'] = "Tiers";
$text['label-tiers']['en-gb'] = "Tiers";
$text['label-tiers']['ar-eg'] = "";
@@ -933,8 +954,8 @@ $text['label-tiers']['de-ch'] = "Ebenen"; //copied from de-de
$text['label-tiers']['de-de'] = "Ebenen";
$text['label-tiers']['es-cl'] = "Niveles de Centro de Llamados";
$text['label-tiers']['es-mx'] = "Niveles de Centro de Llamados"; //copied from es-cl
$text['label-tiers']['fr-ca'] = "Niveaux du Centre d'Appel"; //copied from fr-fr
$text['label-tiers']['fr-fr'] = "Niveaux du Centre d'Appel";
$text['label-tiers']['fr-ca'] = "Niveaux du centre d'appel";
$text['label-tiers']['fr-fr'] = "Niveaux du Centre d'appel";
$text['label-tiers']['he-il'] = "";
$text['label-tiers']['it-it'] = "Tiers";
$text['label-tiers']['nl-nl'] = "Vergelijkingen";
@@ -954,8 +975,8 @@ $text['label-tier_rules_apply']['de-ch'] = "Ebenen-Regeln werden angewendet"; //
$text['label-tier_rules_apply']['de-de'] = "Ebenen-Regeln werden angewendet";
$text['label-tier_rules_apply']['es-cl'] = "Aplicar Reglas de Nivel";
$text['label-tier_rules_apply']['es-mx'] = "Aplicar Reglas de Nivel"; //copied from es-cl
$text['label-tier_rules_apply']['fr-ca'] = "Appliquer la Règle du Niveau"; //copied from fr-fr
$text['label-tier_rules_apply']['fr-fr'] = "Appliquer la Règle du Niveau";
$text['label-tier_rules_apply']['fr-ca'] = "Appliquer les règles du niveau";
$text['label-tier_rules_apply']['fr-fr'] = "Appliquer les règles du niveau";
$text['label-tier_rules_apply']['he-il'] = "";
$text['label-tier_rules_apply']['it-it'] = "Applica regole del Tier";
$text['label-tier_rules_apply']['nl-nl'] = "Vergelijkingsregels zijn van toepassing";
@@ -975,8 +996,8 @@ $text['label-tier_rule_wait_second']['de-ch'] = "Ebenen-Regel Wartezeit"; //copi
$text['label-tier_rule_wait_second']['de-de'] = "Ebenen-Regel Wartezeit";
$text['label-tier_rule_wait_second']['es-cl'] = "Regla de nível segundo de espera";
$text['label-tier_rule_wait_second']['es-mx'] = "Regla de nível segundo de espera"; //copied from es-cl
$text['label-tier_rule_wait_second']['fr-ca'] = "Attente, en seconde, de la Règle du Tier"; //copied from fr-fr
$text['label-tier_rule_wait_second']['fr-fr'] = "Attente, en seconde, de la Règle du Tier";
$text['label-tier_rule_wait_second']['fr-ca'] = "Délai d'attente, en secondes, de la règle du niveau";
$text['label-tier_rule_wait_second']['fr-fr'] = "Délai d'attente, en secondes, de la règle du niveau";
$text['label-tier_rule_wait_second']['he-il'] = "";
$text['label-tier_rule_wait_second']['it-it'] = "Regola Tier Attesa Secondi";
$text['label-tier_rule_wait_second']['nl-nl'] = "Vergelijkigsregels wachttijd";
@@ -996,8 +1017,8 @@ $text['label-tier_rule_wait_multiply_level']['de-ch'] = "Multiplikator für die
$text['label-tier_rule_wait_multiply_level']['de-de'] = "Multiplikator für die Ebenen-Regel Wartezeit";
$text['label-tier_rule_wait_multiply_level']['es-cl'] = "Regla de nivel multiplicar nivel de espera";
$text['label-tier_rule_wait_multiply_level']['es-mx'] = "Regla de nivel multiplicar nivel de espera"; //copied from es-cl
$text['label-tier_rule_wait_multiply_level']['fr-ca'] = "Règle d'Attente du Niveau Multipliée par Niveau"; //copied from fr-fr
$text['label-tier_rule_wait_multiply_level']['fr-fr'] = "Règle d'Attente du Niveau Multipliée par Niveau";
$text['label-tier_rule_wait_multiply_level']['fr-ca'] = "Règle d'attente du niveau multipliée par niveau";
$text['label-tier_rule_wait_multiply_level']['fr-fr'] = "Règle d'attente du niveau multipliée par niveau";
$text['label-tier_rule_wait_multiply_level']['he-il'] = "";
$text['label-tier_rule_wait_multiply_level']['it-it'] = "Regola Tier Attesa Moltiplica Livello";
$text['label-tier_rule_wait_multiply_level']['nl-nl'] = "Vergelijkingsregels Vermenigvuldigingsfactor";
@@ -1017,8 +1038,8 @@ $text['label-tier_rule_no_agent_no_wait']['de-ch'] = "Ebenen-Regel kein Agent ni
$text['label-tier_rule_no_agent_no_wait']['de-de'] = "Ebenen-Regel kein Agent nicht warten";
$text['label-tier_rule_no_agent_no_wait']['es-cl'] = "Regla de nivel No espera Sin Agente";
$text['label-tier_rule_no_agent_no_wait']['es-mx'] = "Regla de nivel No espera Sin Agente"; //copied from es-cl
$text['label-tier_rule_no_agent_no_wait']['fr-ca'] = "Règle du Niveau Pas d'Agent, Pas d'attente"; //copied from fr-fr
$text['label-tier_rule_no_agent_no_wait']['fr-fr'] = "Règle du Niveau Pas d'Agent, Pas d'attente";
$text['label-tier_rule_no_agent_no_wait']['fr-ca'] = "Règle du niveau pas d'agent, pas d'attente";
$text['label-tier_rule_no_agent_no_wait']['fr-fr'] = "Règle du niveau pas d'agent, pas d'attente";
$text['label-tier_rule_no_agent_no_wait']['he-il'] = "";
$text['label-tier_rule_no_agent_no_wait']['it-it'] = "Regola Tier No Agente No Attesa";
$text['label-tier_rule_no_agent_no_wait']['nl-nl'] = "Vergelijkingsregel Geen agent niet wachten";
@@ -1101,8 +1122,8 @@ $text['label-status']['de-ch'] = "Status"; //copied from de-de
$text['label-status']['de-de'] = "Status";
$text['label-status']['es-cl'] = "Estado";
$text['label-status']['es-mx'] = "Estado"; //copied from es-cl
$text['label-status']['fr-ca'] = "Etat"; //copied from fr-fr
$text['label-status']['fr-fr'] = "Etat";
$text['label-status']['fr-ca'] = "État";
$text['label-status']['fr-fr'] = "État";
$text['label-status']['he-il'] = "";
$text['label-status']['it-it'] = "Status";
$text['label-status']['nl-nl'] = "Status";
@@ -1122,8 +1143,8 @@ $text['label-reject_delay_time']['de-ch'] = "Zeitverzögerung für Zeitüberschr
$text['label-reject_delay_time']['de-de'] = "Zeitverzögerung für Zeitüberschreitung";
$text['label-reject_delay_time']['es-cl'] = "Tiempo de Espera para Rechazar";
$text['label-reject_delay_time']['es-mx'] = "Tiempo de Espera para Rechazar"; //copied from es-cl
$text['label-reject_delay_time']['fr-ca'] = "Délais pour le Rejet"; //copied from fr-fr
$text['label-reject_delay_time']['fr-fr'] = "Délais pour le Rejet";
$text['label-reject_delay_time']['fr-ca'] = "Délai avant de rejeter";
$text['label-reject_delay_time']['fr-fr'] = "Délai avant de rejeter";
$text['label-reject_delay_time']['he-il'] = "";
$text['label-reject_delay_time']['it-it'] = "Tempo Ritardo Rifiuto";
$text['label-reject_delay_time']['nl-nl'] = "Afwijzings vertragingstijd";
@@ -1143,8 +1164,8 @@ $text['label-record_template']['de-ch'] = "Aufnehmen"; //copied from de-de
$text['label-record_template']['de-de'] = "Aufnehmen";
$text['label-record_template']['es-cl'] = "Guardar";
$text['label-record_template']['es-mx'] = "Guardar"; //copied from es-cl
$text['label-record_template']['fr-ca'] = "Enregistrement"; //copied from fr-fr
$text['label-record_template']['fr-fr'] = "Enregistrement";
$text['label-record_template']['fr-ca'] = "Enregistrer";
$text['label-record_template']['fr-fr'] = "Enregistrer";
$text['label-record_template']['he-il'] = "";
$text['label-record_template']['it-it'] = "Registra";
$text['label-record_template']['nl-nl'] = "Opnemen";
@@ -1248,8 +1269,8 @@ $text['label-no_answer_delay_time']['de-ch'] = "Verzögerung für keine Antwort"
$text['label-no_answer_delay_time']['de-de'] = "Verzögerung für keine Antwort";
$text['label-no_answer_delay_time']['es-cl'] = "Tiempo de Espera sin Respuesta";
$text['label-no_answer_delay_time']['es-mx'] = "Tiempo de Espera sin Respuesta"; //copied from es-cl
$text['label-no_answer_delay_time']['fr-ca'] = "Delais de Non Réponse"; //copied from fr-fr
$text['label-no_answer_delay_time']['fr-fr'] = "Delais de Non Réponse";
$text['label-no_answer_delay_time']['fr-ca'] = "Délai de non réponse";
$text['label-no_answer_delay_time']['fr-fr'] = "Délai de non réponse";
$text['label-no_answer_delay_time']['he-il'] = "";
$text['label-no_answer_delay_time']['it-it'] = "Tempo Ritardo Mancata Risposta";
$text['label-no_answer_delay_time']['nl-nl'] = "Geen antwoord vertragingstijd";
@@ -1269,8 +1290,8 @@ $text['label-music_on_hold']['de-ch'] = "Wartemusik"; //copied from de-de
$text['label-music_on_hold']['de-de'] = "Wartemusik";
$text['label-music_on_hold']['es-cl'] = "Música en Espera";
$text['label-music_on_hold']['es-mx'] = "Música en Espera"; //copied from es-cl
$text['label-music_on_hold']['fr-ca'] = "Musique en attente"; //copied from fr-fr
$text['label-music_on_hold']['fr-fr'] = "Musique en attente";
$text['label-music_on_hold']['fr-ca'] = "Musique d'attente";
$text['label-music_on_hold']['fr-fr'] = "Musique d'attente";
$text['label-music_on_hold']['he-il'] = "";
$text['label-music_on_hold']['it-it'] = "Musica d'Attesa";
$text['label-music_on_hold']['nl-nl'] = "Wachtmuziek";
@@ -1290,8 +1311,8 @@ $text['label-max_wait_time_with_no_agent_time_reached']['de-ch'] = "Maximale War
$text['label-max_wait_time_with_no_agent_time_reached']['de-de'] = "Maximale Wartezeit ohne Agent erreicht";
$text['label-max_wait_time_with_no_agent_time_reached']['es-cl'] = "Tiempo máximo de espera sin agente obtenido";
$text['label-max_wait_time_with_no_agent_time_reached']['es-mx'] = "Tiempo máximo de espera sin agente obtenido"; //copied from es-cl
$text['label-max_wait_time_with_no_agent_time_reached']['fr-ca'] = "Max Attente Sans Agent Atteinte"; //copied from fr-fr
$text['label-max_wait_time_with_no_agent_time_reached']['fr-fr'] = "Max Attente Sans Agent Atteinte";
$text['label-max_wait_time_with_no_agent_time_reached']['fr-ca'] = "Temps d'attente maximum sans temps d'agent atteint";
$text['label-max_wait_time_with_no_agent_time_reached']['fr-fr'] = "Temps d'attente maximum sans temps d'agent atteint";
$text['label-max_wait_time_with_no_agent_time_reached']['he-il'] = "";
$text['label-max_wait_time_with_no_agent_time_reached']['it-it'] = "Max Tempo Attesa Raggiungimento Tempo No Agenti";
$text['label-max_wait_time_with_no_agent_time_reached']['nl-nl'] = "Maximale wachttijd zonder agent bereikt";
@@ -1311,8 +1332,8 @@ $text['label-max_wait_time_with_no_agent']['de-ch'] = "Maximale Wartezeit ohne A
$text['label-max_wait_time_with_no_agent']['de-de'] = "Maximale Wartezeit ohne Agent";
$text['label-max_wait_time_with_no_agent']['es-cl'] = "Tiempo máximo de espera sin agente";
$text['label-max_wait_time_with_no_agent']['es-mx'] = "Tiempo máximo de espera sin agente"; //copied from es-cl
$text['label-max_wait_time_with_no_agent']['fr-ca'] = "Temps d'attente maximal Sans Agent"; //copied from fr-fr
$text['label-max_wait_time_with_no_agent']['fr-fr'] = "Temps d'attente maximal Sans Agent";
$text['label-max_wait_time_with_no_agent']['fr-ca'] = "Temps d'attente maximum sans agent";
$text['label-max_wait_time_with_no_agent']['fr-fr'] = "Temps d'attente maximum sans agent";
$text['label-max_wait_time_with_no_agent']['he-il'] = "";
$text['label-max_wait_time_with_no_agent']['it-it'] = "Max Tempo Attesa No Agenti";
$text['label-max_wait_time_with_no_agent']['nl-nl'] = "Maximale wachttijd zonder agent";
@@ -1395,8 +1416,8 @@ $text['label-discard_abandoned_after']['de-ch'] = "Zurückweisen nach Zeitübers
$text['label-discard_abandoned_after']['de-de'] = "Zurückweisen nach Zeitüberschreitung";
$text['label-discard_abandoned_after']['es-cl'] = "Descartar Abandono Despues de";
$text['label-discard_abandoned_after']['es-mx'] = "Descartar Abandono Despues de"; //copied from es-cl
$text['label-discard_abandoned_after']['fr-ca'] = "Ecarter les Abandons fait Après"; //copied from fr-fr
$text['label-discard_abandoned_after']['fr-fr'] = "Ecarter les Abandons fait Après";
$text['label-discard_abandoned_after']['fr-ca'] = "Écarter les abandons après";
$text['label-discard_abandoned_after']['fr-fr'] = "Écarter les abandons après";
$text['label-discard_abandoned_after']['he-il'] = "";
$text['label-discard_abandoned_after']['it-it'] = "Scarta chi Abbandona Dopo";
$text['label-discard_abandoned_after']['nl-nl'] = "Afbreken na tijdsoverschreiding";
@@ -1416,8 +1437,8 @@ $text['label-default_status']['de-ch'] = "Standardzustand"; //copied from de-de
$text['label-default_status']['de-de'] = "Standardzustand";
$text['label-default_status']['es-cl'] = "Estado Predeterminado";
$text['label-default_status']['es-mx'] = "Estado Predeterminado"; //copied from es-cl
$text['label-default_status']['fr-ca'] = "Statut Prédéterminée"; //copied from fr-fr
$text['label-default_status']['fr-fr'] = "Statut Prédéterminée";
$text['label-default_status']['fr-ca'] = "État par défaut";
$text['label-default_status']['fr-fr'] = "État par défaut";
$text['label-default_status']['he-il'] = "";
$text['label-default_status']['it-it'] = "Status di Default";
$text['label-default_status']['nl-nl'] = "Standaard status";
@@ -1458,8 +1479,8 @@ $text['label-caller_id_name_prefix']['de-ch'] = "Anruferkennung (Name) Prefix";
$text['label-caller_id_name_prefix']['de-de'] = "Anruferkennung (Name) Prefix";
$text['label-caller_id_name_prefix']['es-cl'] = "Prefijo de nombre de quien llama";
$text['label-caller_id_name_prefix']['es-mx'] = "Prefijo de nombre de quien llama"; //copied from es-cl
$text['label-caller_id_name_prefix']['fr-ca'] = "Préfixe du Nom d'Appelant"; //copied from fr-fr
$text['label-caller_id_name_prefix']['fr-fr'] = "Préfixe du Nom d'Appelant";
$text['label-caller_id_name_prefix']['fr-ca'] = "Préfixe du nom de l'identification de l'appelant";
$text['label-caller_id_name_prefix']['fr-fr'] = "Préfixe du nom de l'identification de l'appelant";
$text['label-caller_id_name_prefix']['he-il'] = "";
$text['label-caller_id_name_prefix']['it-it'] = "Prefisso Nome Chiamante";
$text['label-caller_id_name_prefix']['nl-nl'] = "CID Naam prefix";
@@ -1479,7 +1500,7 @@ $text['label-outbound_caller_id_name']['de-ch'] = "Ausgehende Anruferkennung (Na
$text['label-outbound_caller_id_name']['de-de'] = "Ausgehende Anruferkennung (Name)";
$text['label-outbound_caller_id_name']['es-cl'] = "Nombre de Caller ID Saliente";
$text['label-outbound_caller_id_name']['es-mx'] = "Nombre de Caller ID Saliente"; //copied from es-cl
$text['label-outbound_caller_id_name']['fr-ca'] = "Nom de l'appelant sortant"; //copied from fr-fr
$text['label-outbound_caller_id_name']['fr-ca'] = "Nom de l'appelant sortant";
$text['label-outbound_caller_id_name']['fr-fr'] = "Nom de l'appelant sortant";
$text['label-outbound_caller_id_name']['he-il'] = "";
$text['label-outbound_caller_id_name']['it-it'] = "ID Nome Chiamante Esterno";
@@ -1521,8 +1542,8 @@ $text['label-caller_announce_sound']['de-ch'] = "Ton für Ankündigung"; //copie
$text['label-caller_announce_sound']['de-de'] = "Ton für Ankündigung";
$text['label-caller_announce_sound']['es-cl'] = "El sonido anuncian";
$text['label-caller_announce_sound']['es-mx'] = "El sonido anuncian"; //copied from es-cl
$text['label-caller_announce_sound']['fr-ca'] = "Annoncer Sonore"; //copied from fr-fr
$text['label-caller_announce_sound']['fr-fr'] = "Annoncer Sonore";
$text['label-caller_announce_sound']['fr-ca'] = "Son d'annonce";
$text['label-caller_announce_sound']['fr-fr'] = "Son d'annonce";
$text['label-caller_announce_sound']['he-il'] = "";
$text['label-caller_announce_sound']['it-it'] = "Audio Annuncio";
$text['label-caller_announce_sound']['nl-nl'] = "Aankondigingsgeluid";
@@ -1542,8 +1563,8 @@ $text['label-caller_announce_frequency']['de-ch'] = "Häufigkeit der Ankündigun
$text['label-caller_announce_frequency']['de-de'] = "Häufigkeit der Ankündigung";
$text['label-caller_announce_frequency']['es-cl'] = "La frecuencia anuncian";
$text['label-caller_announce_frequency']['es-mx'] = "La frecuencia anuncian"; //copied from es-cl
$text['label-caller_announce_frequency']['fr-ca'] = "Annoncer Fréquence"; //copied from fr-fr
$text['label-caller_announce_frequency']['fr-fr'] = "Annoncer Fréquence";
$text['label-caller_announce_frequency']['fr-ca'] = "Fréquence d'annonce";
$text['label-caller_announce_frequency']['fr-fr'] = "Fréquence d'annonce";
$text['label-caller_announce_frequency']['he-il'] = "";
$text['label-caller_announce_frequency']['it-it'] = "Frequenza Annuncio";
$text['label-caller_announce_frequency']['nl-nl'] = "Aantal aankondigingen";
@@ -1563,8 +1584,8 @@ $text['label-exit_keys']['de-ch'] = "Abbruch Taste"; //copied from de-de
$text['label-exit_keys']['de-de'] = "Abbruch Taste";
$text['label-exit_keys']['es-cl'] = "Tecla de salida";
$text['label-exit_keys']['es-mx'] = "Tecla de salida"; //copied from es-cl
$text['label-exit_keys']['fr-ca'] = "Clé pour sortir la queue"; //copied from fr-fr
$text['label-exit_keys']['fr-fr'] = "Clé pour sortir la queue";
$text['label-exit_keys']['fr-ca'] = "Touche pour sortir de la file d'attente";
$text['label-exit_keys']['fr-fr'] = "Touche pour sortir de la file d'attente";
$text['label-exit_keys']['he-il'] = "";
$text['label-exit_keys']['it-it'] = "";
$text['label-exit_keys']['nl-nl'] = "Verlaat toets";
@@ -1584,8 +1605,8 @@ $text['description-exit_keys']['de-ch'] = "Tasten um die aktuelle Warteschlange
$text['description-exit_keys']['de-de'] = "Tasten um die aktuelle Warteschlange zu verlassen.";
$text['description-exit_keys']['es-cl'] = "Teclas para salir de la espera de la cola.";
$text['description-exit_keys']['es-mx'] = "Teclas para salir de la espera de la cola."; //copied from es-cl
$text['description-exit_keys']['fr-ca'] = "Clés pour sortir de l'attendance de la queue."; //copied from fr-fr
$text['description-exit_keys']['fr-fr'] = "Clés pour sortir de l'attendance de la queue.";
$text['description-exit_keys']['fr-ca'] = "Touches pour quitter la file d'attente actuelle.";
$text['description-exit_keys']['fr-fr'] = "Touches pour quitter la file d'attente actuelle";
$text['description-exit_keys']['he-il'] = "";
$text['description-exit_keys']['it-it'] = "";
$text['description-exit_keys']['nl-nl'] = "Toetsen om de huidige wachtrij te verlaten.";
@@ -1605,8 +1626,8 @@ $text['label-call_timeout']['de-ch'] = "Zeitüberschreitung"; //copied from de-d
$text['label-call_timeout']['de-de'] = "Zeitüberschreitung";
$text['label-call_timeout']['es-cl'] = "Timeout de Llamada";
$text['label-call_timeout']['es-mx'] = "Timeout de Llamada"; //copied from es-cl
$text['label-call_timeout']['fr-ca'] = "Timeout d'appel"; //copied from fr-fr
$text['label-call_timeout']['fr-fr'] = "Timeout d'appel";
$text['label-call_timeout']['fr-ca'] = "Délai d'expiration de l'appel";
$text['label-call_timeout']['fr-fr'] = "Délai d'expiration de l'appel";
$text['label-call_timeout']['he-il'] = "";
$text['label-call_timeout']['it-it'] = "Timeout di Chiamata";
$text['label-call_timeout']['nl-nl'] = "Oproep tijdsoverschrijding";
@@ -1626,8 +1647,8 @@ $text['label-busy_delay_time']['de-ch'] = "Verzögerungszeit für Besetzt"; //co
$text['label-busy_delay_time']['de-de'] = "Verzögerungszeit für Besetzt";
$text['label-busy_delay_time']['es-cl'] = "Tiempo de espera para ocupado";
$text['label-busy_delay_time']['es-mx'] = "Tiempo de espera para ocupado"; //copied from es-cl
$text['label-busy_delay_time']['fr-ca'] = "Délais d'occupation"; //copied from fr-fr
$text['label-busy_delay_time']['fr-fr'] = "Délais d'occupation";
$text['label-busy_delay_time']['fr-ca'] = "Délai de temps occupé";
$text['label-busy_delay_time']['fr-fr'] = "Délai de temps occupé";
$text['label-busy_delay_time']['he-il'] = "";
$text['label-busy_delay_time']['it-it'] = "Tempo ritardo su Occupato";
$text['label-busy_delay_time']['nl-nl'] = "Bezet wachttijd";
@@ -1647,8 +1668,8 @@ $text['label-agent_password']['de-ch'] = "Agenten Passwort"; //copied from de-de
$text['label-agent_password']['de-de'] = "Agenten Passwort";
$text['label-agent_password']['es-cl'] = "Agente de Password";
$text['label-agent_password']['es-mx'] = "Agente de Password"; //copied from es-cl
$text['label-agent_password']['fr-ca'] = "Agent Mot de passe"; //copied from fr-fr
$text['label-agent_password']['fr-fr'] = "Agent Mot de passe";
$text['label-agent_password']['fr-ca'] = "Mot de passe d'agent";
$text['label-agent_password']['fr-fr'] = "Mot de passe d'agent";
$text['label-agent_password']['he-il'] = "";
$text['label-agent_password']['it-it'] = "Password Agente";
$text['label-agent_password']['nl-nl'] = "Agent wachtwoord";
@@ -1710,8 +1731,8 @@ $text['label-agent_id']['de-ch'] = "Agenten ID"; //copied from de-de
$text['label-agent_id']['de-de'] = "Agenten ID";
$text['label-agent_id']['es-cl'] = "Agente de identidad";
$text['label-agent_id']['es-mx'] = "Agente de identidad"; //copied from es-cl
$text['label-agent_id']['fr-ca'] = "Identification Agent"; //copied from fr-fr
$text['label-agent_id']['fr-fr'] = "Identification Agent";
$text['label-agent_id']['fr-ca'] = "Identification d'agent";
$text['label-agent_id']['fr-fr'] = "Identification d'agent";
$text['label-agent_id']['he-il'] = "";
$text['label-agent_id']['it-it'] = "ID Agente";
$text['label-agent_id']['nl-nl'] = "Agent ID";
@@ -1773,8 +1794,8 @@ $text['label-abandoned_resume_allowed']['de-ch'] = "Wiederaufnahme nach Zurückw
$text['label-abandoned_resume_allowed']['de-de'] = "Wiederaufnahme nach Zurückweisung erlaubt";
$text['label-abandoned_resume_allowed']['es-cl'] = "Permitir Reanudación de Abandono";
$text['label-abandoned_resume_allowed']['es-mx'] = "Permitir Reanudación de Abandono"; //copied from es-cl
$text['label-abandoned_resume_allowed']['fr-ca'] = "Recupération Permise des Abandons"; //copied from fr-fr
$text['label-abandoned_resume_allowed']['fr-fr'] = "Recupération Permise des Abandons";
$text['label-abandoned_resume_allowed']['fr-ca'] = "Récupération des abandons permis";
$text['label-abandoned_resume_allowed']['fr-fr'] = "Récupération des abandons permis";
$text['label-abandoned_resume_allowed']['he-il'] = "";
$text['label-abandoned_resume_allowed']['it-it'] = "Permetti ripristino chi Abbandona";
$text['label-abandoned_resume_allowed']['nl-nl'] = "Verlaten oproep voortzetten toestaan";
@@ -1794,8 +1815,8 @@ $text['header-call_center_tier_edit']['de-ch'] = "Callcenter Ebene"; //copied fr
$text['header-call_center_tier_edit']['de-de'] = "Callcenter Ebene";
$text['header-call_center_tier_edit']['es-cl'] = "Editar Nivel de Centro de Llamados";
$text['header-call_center_tier_edit']['es-mx'] = "Editar Nivel de Centro de Llamados"; //copied from es-cl
$text['header-call_center_tier_edit']['fr-ca'] = "Niveau du Centre d'Appel"; //copied from fr-fr
$text['header-call_center_tier_edit']['fr-fr'] = "Niveau du Centre d'Appel";
$text['header-call_center_tier_edit']['fr-ca'] = "Niveau du centre d'appel";
$text['header-call_center_tier_edit']['fr-fr'] = "Niveau du centre d'appel";
$text['header-call_center_tier_edit']['he-il'] = "";
$text['header-call_center_tier_edit']['it-it'] = "Tier del Call Center";
$text['header-call_center_tier_edit']['nl-nl'] = "Call-Center vergelijking";
@@ -1899,7 +1920,7 @@ $text['header-call_center_agent_status']['de-ch'] = "Callcenter Agenten-Status";
$text['header-call_center_agent_status']['de-de'] = "Callcenter Agenten-Status";
$text['header-call_center_agent_status']['es-cl'] = "Estado de Agente de Centro de Llamados";
$text['header-call_center_agent_status']['es-mx'] = "Estado de Agente de Centro de Llamados"; //copied from es-cl
$text['header-call_center_agent_status']['fr-ca'] = "Etat de l'agent du Centre d'Appel"; //copied from fr-fr
$text['header-call_center_agent_status']['fr-ca'] = "État de l'agent du Centre d'appel";
$text['header-call_center_agent_status']['fr-fr'] = "Etat de l'agent du Centre d'Appel";
$text['header-call_center_agent_status']['he-il'] = "";
$text['header-call_center_agent_status']['it-it'] = "Stato Agente Call Center";
@@ -1920,7 +1941,7 @@ $text['header-call_center_agent_edit']['de-ch'] = "Callcenter Agent"; //copied f
$text['header-call_center_agent_edit']['de-de'] = "Callcenter Agent";
$text['header-call_center_agent_edit']['es-cl'] = "Editar Agente de Centro de Llamados";
$text['header-call_center_agent_edit']['es-mx'] = "Editar Agente de Centro de Llamados"; //copied from es-cl
$text['header-call_center_agent_edit']['fr-ca'] = "Agent du Centre d'Appel"; //copied from fr-fr
$text['header-call_center_agent_edit']['fr-ca'] = "Agent du Centre d'appel";
$text['header-call_center_agent_edit']['fr-fr'] = "Agent du Centre d'Appel";
$text['header-call_center_agent_edit']['he-il'] = "";
$text['header-call_center_agent_edit']['it-it'] = "Agente Call Center";
@@ -1941,8 +1962,8 @@ $text['header-call_center_agent_add']['de-ch'] = "Callcenter Agenten"; //copied
$text['header-call_center_agent_add']['de-de'] = "Callcenter Agenten";
$text['header-call_center_agent_add']['es-cl'] = "Agregar Agente de Centro de Llamados";
$text['header-call_center_agent_add']['es-mx'] = "Agregar Agente de Centro de Llamados"; //copied from es-cl
$text['header-call_center_agent_add']['fr-ca'] = "Agent du Centre d'Appel"; //copied from fr-fr
$text['header-call_center_agent_add']['fr-fr'] = "Agent du Centre d'Appel";
$text['header-call_center_agent_add']['fr-ca'] = "Agents du centre d'appel";
$text['header-call_center_agent_add']['fr-fr'] = "Agents du centre d'appel";
$text['header-call_center_agent_add']['he-il'] = "";
$text['header-call_center_agent_add']['it-it'] = "Agenti Call Center";
$text['header-call_center_agent_add']['nl-nl'] = "Call-Center agenten";
@@ -1962,8 +1983,8 @@ $text['description-wrap_up_time']['de-ch'] = "Geben Sie die Nachbereitungszeit e
$text['description-wrap_up_time']['de-de'] = "Geben Sie die Nachbereitungszeit ein.";
$text['description-wrap_up_time']['es-cl'] = "Introduzca el tiempo de preparación.";
$text['description-wrap_up_time']['es-mx'] = "Introduzca el tiempo de preparación."; //copied from es-cl
$text['description-wrap_up_time']['fr-ca'] = "choisir le temps de wrap up."; //copied from fr-fr
$text['description-wrap_up_time']['fr-fr'] = "choisir le temps de wrap up.";
$text['description-wrap_up_time']['fr-ca'] = "Choisir le temps de clôture.";
$text['description-wrap_up_time']['fr-fr'] = "Choisir le temps de clôture.";
$text['description-wrap_up_time']['he-il'] = "";
$text['description-wrap_up_time']['it-it'] = "Inserire Tempo di wrap up.";
$text['description-wrap_up_time']['nl-nl'] = "Voer de afwikkeltijd in.";
@@ -2004,8 +2025,8 @@ $text['description-timeout_action']['de-ch'] = "Aktion, wenn die maximale Wartez
$text['description-timeout_action']['de-de'] = "Aktion, wenn die maximale Wartezeit erreicht wurde.";
$text['description-timeout_action']['es-cl'] = "Defina una acción a realizar cuando el tiempo máximo es alcanzado.";
$text['description-timeout_action']['es-mx'] = "Defina una acción a realizar cuando el tiempo máximo es alcanzado."; //copied from es-cl
$text['description-timeout_action']['fr-ca'] = "Choisir l'action à faire quand le temps max d'attente est atteint."; //copied from fr-fr
$text['description-timeout_action']['fr-fr'] = "Choisir l'action à faire quand le temps max d'attente est atteint.";
$text['description-timeout_action']['fr-ca'] = "Définir l'action à exécuter lorsque le temps d'attente maximal est atteint.";
$text['description-timeout_action']['fr-fr'] = "Définir l'action à exécuter lorsque le temps d'attente maximal est atteint.";
$text['description-timeout_action']['he-il'] = "";
$text['description-timeout_action']['it-it'] = "Seleziona l'azione da eseguire quando il tempo di attesa max viene superato.";
$text['description-timeout_action']['nl-nl'] = "Aktie als de maximale wachttijd bereikt wordt";
@@ -2025,8 +2046,8 @@ $text['description-time_base_score']['de-ch'] = "Wählen Sie die Zeitgeber für
$text['description-time_base_score']['de-de'] = "Wählen Sie die Zeitgeber für Klassifikation";
$text['description-time_base_score']['es-cl'] = "Seleccione el tiempo base";
$text['description-time_base_score']['es-mx'] = "Seleccione el tiempo base"; //copied from es-cl
$text['description-time_base_score']['fr-ca'] = "Sélection du score sur base de temps."; //copied from fr-fr
$text['description-time_base_score']['fr-fr'] = "Sélection du score sur base de temps.";
$text['description-time_base_score']['fr-ca'] = "Sélection du score basé sur le temps.";
$text['description-time_base_score']['fr-fr'] = "Sélection du score basé sur le temps.";
$text['description-time_base_score']['he-il'] = "";
$text['description-time_base_score']['it-it'] = "Seleziona il punteggio su base tempo.";
$text['description-time_base_score']['nl-nl'] = "Select de tijdsbasis score.";
@@ -2038,6 +2059,28 @@ $text['description-time_base_score']['ru-ru'] = "Выберие оценку п
$text['description-time_base_score']['sv-se'] = "Ange tids-baserad poäng.";
$text['description-time_base_score']['uk-ua'] = "";
$text['description-time_base_score_sec']['en-us'] = "Set the time base score in seconds. Higher numbers mean higher priority over other call centers.";
$text['description-time_base_score_sec']['en-gb'] = "Set the time base score in seconds. Higher numbers mean higher priority over other call centers.";
$text['description-time_base_score_sec']['ar-eg'] = "";
$text['description-time_base_score_sec']['de-at'] = "";
$text['description-time_base_score_sec']['de-ch'] = "";
$text['description-time_base_score_sec']['de-de'] = "";
$text['description-time_base_score_sec']['es-cl'] = "";
$text['description-time_base_score_sec']['es-mx'] = "";
$text['description-time_base_score_sec']['fr-ca'] = "";
$text['description-time_base_score_sec']['fr-fr'] = "";
$text['description-time_base_score_sec']['he-il'] = "";
$text['description-time_base_score_sec']['it-it'] = "";
$text['description-time_base_score_sec']['nl-nl'] = "";
$text['description-time_base_score_sec']['pl-pl'] = "";
$text['description-time_base_score_sec']['pt-br'] = "";
$text['description-time_base_score_sec']['pt-pt'] = "";
$text['description-time_base_score_sec']['ro-ro'] = "";
$text['description-time_base_score_sec']['ru-ru'] = "";
$text['description-time_base_score_sec']['sv-se'] = "";
$text['description-time_base_score_sec']['uk-ua'] = "";
$text['description-tiers']['en-us'] = "Tiers assign agents to queues.";
$text['description-tiers']['en-gb'] = "Tiers assign agents to queues.";
$text['description-tiers']['ar-eg'] = "";
@@ -2046,8 +2089,8 @@ $text['description-tiers']['de-ch'] = "Agenten einer Warteschlange pro Ebene zuw
$text['description-tiers']['de-de'] = "Agenten einer Warteschlange pro Ebene zuweisen.";
$text['description-tiers']['es-cl'] = "Lista todos los niveles. Los niveles asignan agentes a las colas.";
$text['description-tiers']['es-mx'] = "Lista todos los niveles. Los niveles asignan agentes a las colas."; //copied from es-cl
$text['description-tiers']['fr-ca'] = "Liste tous les Niveaux. Les Niveaux permettent d'affecter les agents aux queues."; //copied from fr-fr
$text['description-tiers']['fr-fr'] = "Liste tous les Niveaux. Les Niveaux permettent d'affecter les agents aux queues.";
$text['description-tiers']['fr-ca'] = "Liste tous les niveaux. Les niveaux permettent d'affecter les agents aux files d'attente.";
$text['description-tiers']['fr-fr'] = "Liste tous les niveaux. Les niveaux permettent d'affecter les agents aux files d'attente.";
$text['description-tiers']['he-il'] = "";
$text['description-tiers']['it-it'] = "I tiers assegnano gli agenti alle code.";
$text['description-tiers']['nl-nl'] = "Vergelijkingen towijzen van agenten aan wachtrij";
@@ -2067,8 +2110,8 @@ $text['description-tier_rules_apply']['de-ch'] = "Setzen Sie die Ebenen-Regel. R
$text['description-tier_rules_apply']['de-de'] = "Setzen Sie die Ebenen-Regel. Regeln sind Ein oder Aus";
$text['description-tier_rules_apply']['es-cl'] = "Defina las reglas de nivel como verdaero o falso.";
$text['description-tier_rules_apply']['es-mx'] = "Defina las reglas de nivel como verdaero o falso."; //copied from es-cl
$text['description-tier_rules_apply']['fr-ca'] = "Choisir l'activation de la règle du Niveau à oui ou non."; //copied from fr-fr
$text['description-tier_rules_apply']['fr-fr'] = "Choisir l'activation de la règle du Niveau à oui ou non.";
$text['description-tier_rules_apply']['fr-ca'] = "Définir l'activation de la règle du niveau à oui ou non.";
$text['description-tier_rules_apply']['fr-fr'] = "Définir l'activation de la règle du niveau à oui ou non.";
$text['description-tier_rules_apply']['he-il'] = "";
$text['description-tier_rules_apply']['it-it'] = "Imposta a vero o falso se si vogliono applicare le regole di tier.";
$text['description-tier_rules_apply']['nl-nl'] = "Kies de vergelijkingsregels, Regels staan aan of uit";
@@ -2109,8 +2152,8 @@ $text['description-tier_rule_wait_multiply_level']['de-ch'] = "Setzen Sie den Mu
$text['description-tier_rule_wait_multiply_level']['de-de'] = "Setzen Sie den Multiplikator für die Ebenen-Regel Wartezeit auf Ein oder Aus.";
$text['description-tier_rule_wait_multiply_level']['es-cl'] = "Ajuste el nidenvel de espera multiplicar regla de nivel de verdadero o falso.";
$text['description-tier_rule_wait_multiply_level']['es-mx'] = "Ajuste el nidenvel de espera multiplicar regla de nivel de verdadero o falso."; //copied from es-cl
$text['description-tier_rule_wait_multiply_level']['fr-ca'] = "Choisir la multiplication du temps d'attente par niveau à oui ou non."; //copied from fr-fr
$text['description-tier_rule_wait_multiply_level']['fr-fr'] = "Choisir la multiplication du temps d'attente par niveau à oui ou non.";
$text['description-tier_rule_wait_multiply_level']['fr-ca'] = "Définir la multiplication du temps d'attente par niveau à oui ou non.";
$text['description-tier_rule_wait_multiply_level']['fr-fr'] = "Définir la multiplication du temps d'attente par niveau à oui ou non.";
$text['description-tier_rule_wait_multiply_level']['he-il'] = "";
$text['description-tier_rule_wait_multiply_level']['it-it'] = "Imposta a vero o falso il tempo attesa moltiplica livello come regola tier.";
$text['description-tier_rule_wait_multiply_level']['nl-nl'] = "Kies vergelijkingsregel vemenigvuldiging aan of uit ";
@@ -2235,8 +2278,8 @@ $text['description-reject_delay_time']['de-ch'] = "Geben Sie die Verzögerung bi
$text['description-reject_delay_time']['de-de'] = "Geben Sie die Verzögerung bis zur Zurückweisung an.";
$text['description-reject_delay_time']['es-cl'] = "Introduzca el tiempo de espera de rechazo.";
$text['description-reject_delay_time']['es-mx'] = "Introduzca el tiempo de espera de rechazo."; //copied from es-cl
$text['description-reject_delay_time']['fr-ca'] = "Choisir le délais de rejet."; //copied from fr-fr
$text['description-reject_delay_time']['fr-fr'] = "Choisir le délais de rejet.";
$text['description-reject_delay_time']['fr-ca'] = "Choisir le délai avant de rejeter.";
$text['description-reject_delay_time']['fr-fr'] = "Choisir le délai avant de rejeter.";
$text['description-reject_delay_time']['he-il'] = "";
$text['description-reject_delay_time']['it-it'] = "Inserire Tempo Ritardo Rifiuto.";
$text['description-reject_delay_time']['nl-nl'] = "Kies afwijzingsvertragingstijd";
@@ -2319,8 +2362,8 @@ $text['description-no_answer_delay_time']['de-ch'] = "Geben Sie die Zeit in Seku
$text['description-no_answer_delay_time']['de-de'] = "Geben Sie die Zeit in Sekunden an, die gewartet werden soll bis ein Agent annimmt.";
$text['description-no_answer_delay_time']['es-cl'] = "Introduzca el tiempo de espera sin responder del agente en segundos.";
$text['description-no_answer_delay_time']['es-mx'] = "Introduzca el tiempo de espera sin responder del agente en segundos."; //copied from es-cl
$text['description-no_answer_delay_time']['fr-ca'] = "Choisir le delais de non réponse de l'agent."; //copied from fr-fr
$text['description-no_answer_delay_time']['fr-fr'] = "Choisir le delais de non réponse de l'agent.";
$text['description-no_answer_delay_time']['fr-ca'] = "Définir le délai maximum sans réponse de l'agent en secondes.";
$text['description-no_answer_delay_time']['fr-fr'] = "Définir le délai maximum sans réponse de l'agent en secondes.";
$text['description-no_answer_delay_time']['he-il'] = "";
$text['description-no_answer_delay_time']['it-it'] = "Inserire il tempo ritardo agente non risponde in secondi.";
$text['description-no_answer_delay_time']['nl-nl'] = "Voer de agent geen antwoord vertragingstijd in (seconden)";
@@ -2340,8 +2383,8 @@ $text['description-music_on_hold']['de-ch'] = "Wählen Sie die gewünschte Warte
$text['description-music_on_hold']['de-de'] = "Wählen Sie die gewünschte Wartemusik.";
$text['description-music_on_hold']['es-cl'] = "Seleccione una música de espera.";
$text['description-music_on_hold']['es-mx'] = "Seleccione una música de espera."; //copied from es-cl
$text['description-music_on_hold']['fr-ca'] = "Sélection de la musique en attente."; //copied from fr-fr
$text['description-music_on_hold']['fr-fr'] = "Sélection de la musique en attente.";
$text['description-music_on_hold']['fr-ca'] = "Sélection de la musique d'attente.";
$text['description-music_on_hold']['fr-fr'] = "Sélection de la musique d'attente.";
$text['description-music_on_hold']['he-il'] = "";
$text['description-music_on_hold']['it-it'] = "Selezionare la musica di attesa desiderata.";
$text['description-music_on_hold']['nl-nl'] = "Kies de gewenste wachtmuziek.";
@@ -2361,8 +2404,8 @@ $text['description-max_wait_time_with_no_agent_time_reached']['de-ch'] = "Geben
$text['description-max_wait_time_with_no_agent_time_reached']['de-de'] = "Geben Sie die maximale Wartezeit in Sekunden an, die ohne Agent gewartet werden soll.";
$text['description-max_wait_time_with_no_agent_time_reached']['es-cl'] = "Introduzca el tiempo máximo de espera sin agente alcanzado.";
$text['description-max_wait_time_with_no_agent_time_reached']['es-mx'] = "Introduzca el tiempo máximo de espera sin agente alcanzado."; //copied from es-cl
$text['description-max_wait_time_with_no_agent_time_reached']['fr-ca'] = " Entrez le temps d'attente maximum avec un rien de temps de l'agent atteint."; //copied from fr-fr
$text['description-max_wait_time_with_no_agent_time_reached']['fr-fr'] = " Entrez le temps d'attente maximum avec un rien de temps de l'agent atteint.";
$text['description-max_wait_time_with_no_agent_time_reached']['fr-ca'] = "Entrer le temps d'attente maximal atteint sans agent.";
$text['description-max_wait_time_with_no_agent_time_reached']['fr-fr'] = "Entrer le temps d'attente maximal atteint sans agent.";
$text['description-max_wait_time_with_no_agent_time_reached']['he-il'] = "";
$text['description-max_wait_time_with_no_agent_time_reached']['it-it'] = "Inserire Max Tempo Attesa Raggiungimento Tempo No Agenti.";
$text['description-max_wait_time_with_no_agent_time_reached']['nl-nl'] = "Voer de maximale wachttijd voor 'geen agent' beschikbaar.";
@@ -2382,7 +2425,7 @@ $text['description-max_wait_time_with_no_agent']['de-ch'] = "Geben Sie die maxim
$text['description-max_wait_time_with_no_agent']['de-de'] = "Geben Sie die maximale Wartezeit ohne Agent an.";
$text['description-max_wait_time_with_no_agent']['es-cl'] = "Introduzca el tiempo máximo de espera sin agente.";
$text['description-max_wait_time_with_no_agent']['es-mx'] = "Introduzca el tiempo máximo de espera sin agente."; //copied from es-cl
$text['description-max_wait_time_with_no_agent']['fr-ca'] = "Entrer le temps max d'attente sans agent."; //copied from fr-fr
$text['description-max_wait_time_with_no_agent']['fr-ca'] = "Entrer le temps maximal d'attente sans agent.";
$text['description-max_wait_time_with_no_agent']['fr-fr'] = "Entrer le temps max d'attente sans agent.";
$text['description-max_wait_time_with_no_agent']['he-il'] = "";
$text['description-max_wait_time_with_no_agent']['it-it'] = "Inserire max tempo attesa senza agenti.";
@@ -2416,16 +2459,16 @@ $text['description-max_wait_time']['ru-ru'] = "Введите максималь
$text['description-max_wait_time']['sv-se'] = "Ange max vänt-tid.";
$text['description-max_wait_time']['uk-ua'] = "";
$text['description-max_no_answer']['en-us'] = "Enter max no answer.";
$text['description-max_no_answer']['en-gb'] = "Enter max no answer.";
$text['description-max_no_answer']['en-us'] = "At max no answer, the agent will be logged out.";
$text['description-max_no_answer']['en-gb'] = "At max no answer, the agent will be logged out.";
$text['description-max_no_answer']['ar-eg'] = "";
$text['description-max_no_answer']['de-at'] = "Geben Sie Max keine Antwort an."; //copied from de-de
$text['description-max_no_answer']['de-ch'] = "Geben Sie Max keine Antwort an."; //copied from de-de
$text['description-max_no_answer']['de-de'] = "Geben Sie Max keine Antwort an.";
$text['description-max_no_answer']['es-cl'] = "Introduza el máximo de no respuestas.";
$text['description-max_no_answer']['es-mx'] = "Introduza el máximo de no respuestas."; //copied from es-cl
$text['description-max_no_answer']['fr-ca'] = "Choisir le maximum pas de réponse."; //copied from fr-fr
$text['description-max_no_answer']['fr-fr'] = "Choisir le maximum pas de réponse.";
$text['description-max_no_answer']['es-cl'] = "Si no hay respuesta como máximo, se cerrará la sesión del agente.";
$text['description-max_no_answer']['es-mx'] = "Si no hay respuesta como máximo, se cerrará la sesión del agente.";
$text['description-max_no_answer']['fr-ca'] = "Au maximum sans réponse, l'agent sera déconnecté";
$text['description-max_no_answer']['fr-fr'] = "Au maximum sans réponse, l'agent sera déconnecté";
$text['description-max_no_answer']['he-il'] = "";
$text['description-max_no_answer']['it-it'] = "Inserire max mancata risposta.";
$text['description-max_no_answer']['nl-nl'] = "Voer maximale geen antwoord tijd in.";
@@ -2445,8 +2488,8 @@ $text['description-extension']['de-ch'] = "Geben Sie die Nebenstelle an."; //cop
$text['description-extension']['de-de'] = "Geben Sie die Nebenstelle an.";
$text['description-extension']['es-cl'] = "Introduzca el número de extensión.";
$text['description-extension']['es-mx'] = "Introduzca el número de extensión."; //copied from es-cl
$text['description-extension']['fr-ca'] = "Entrer un numéro d'extension"; //copied from fr-fr
$text['description-extension']['fr-fr'] = "Entrer un numéro d'extension";
$text['description-extension']['fr-ca'] = "Entrer un numéro de poste";
$text['description-extension']['fr-fr'] = "Entrer un numéro de poste";
$text['description-extension']['he-il'] = "";
$text['description-extension']['it-it'] = "Inserire numero di interno.";
$text['description-extension']['nl-nl'] = "Voer toestelnummer in.";
@@ -2466,8 +2509,8 @@ $text['description-discard_abandoned_after']['de-ch'] = "Setzen Sie die Zeit in
$text['description-discard_abandoned_after']['de-de'] = "Setzen Sie die Zeit in Sekunden, nach der ein Anrufer nicht wieder in die Warteschlange eingereiht wird.";
$text['description-discard_abandoned_after']['es-cl'] = "Defina la cantidad de segundos para el abandono de descarte.";
$text['description-discard_abandoned_after']['es-mx'] = "Defina la cantidad de segundos para el abandono de descarte."; //copied from es-cl
$text['description-discard_abandoned_after']['fr-ca'] = "Choisir d'écartrer les abandons après un nombre de secondes."; //copied from fr-fr
$text['description-discard_abandoned_after']['fr-fr'] = "Choisir d'écartrer les abandons après un nombre de secondes.";
$text['description-discard_abandoned_after']['fr-ca'] = "Définir le nombre de secondes avant écarter les appels abandonnés.";
$text['description-discard_abandoned_after']['fr-fr'] = "Définir le nombre de secondes avant écarter les appels abandonnés.";
$text['description-discard_abandoned_after']['he-il'] = "";
$text['description-discard_abandoned_after']['it-it'] = "Imposta Scarta chi Abbandona Dopo secondi.";
$text['description-discard_abandoned_after']['nl-nl'] = "Stel afwijzings tijd (seconden) in waarna de oproeper wer in de wachtrij gezet wordt.";
@@ -2611,10 +2654,10 @@ $text['description-caller_announce_sound']['ar-eg'] = "";
$text['description-caller_announce_sound']['de-at'] = "Eine Datei, die regelmäßig dem Anrufer vorgespielt werden soll. Benötigt den kompletten Pfad zur wav Datei."; //copied from de-de
$text['description-caller_announce_sound']['de-ch'] = "Eine Datei, die regelmäßig dem Anrufer vorgespielt werden soll. Benötigt den kompletten Pfad zur wav Datei."; //copied from de-de
$text['description-caller_announce_sound']['de-de'] = "Eine Datei, die regelmäßig dem Anrufer vorgespielt werden soll. Benötigt den kompletten Pfad zur wav Datei.";
$text['description-caller_announce_sound']['es-cl'] = " Translate from: English Un sonido jugar a un cada persona que llama anunciar segundos de sonido. Necesita la ruta completa al archivo wav.";
$text['description-caller_announce_sound']['es-mx'] = " Translate from: English Un sonido jugar a un cada persona que llama anunciar segundos de sonido. Necesita la ruta completa al archivo wav."; //copied from es-cl
$text['description-caller_announce_sound']['fr-ca'] = " Un son à jouer à un appelant chaque annoncer secondes sonores. Besoins le chemin complet vers le fichier wav."; //copied from fr-fr
$text['description-caller_announce_sound']['fr-fr'] = " Un son à jouer à un appelant chaque annoncer secondes sonores. Besoins le chemin complet vers le fichier wav.";
$text['description-caller_announce_sound']['es-cl'] = "Translate from: English Un sonido jugar a un cada persona que llama anunciar segundos de sonido. Necesita la ruta completa al archivo wav.";
$text['description-caller_announce_sound']['es-mx'] = "Translate from: English Un sonido jugar a un cada persona que llama anunciar segundos de sonido. Necesita la ruta completa al archivo wav."; //copied from es-cl
$text['description-caller_announce_sound']['fr-ca'] = "Un son à jouer à un appelant à chaque fréquence de son d'annonce. Nécessite le chemin complet du fichier wav.";
$text['description-caller_announce_sound']['fr-fr'] = "Un son à jouer à un appelant à chaque fréquence de son d'annonce. Nécessite le chemin complet du fichier wav.";
$text['description-caller_announce_sound']['he-il'] = "";
$text['description-caller_announce_sound']['it-it'] = "Un audio da suonare al chiamante ogni intervallo in secondi per l'annuncio. E' necessario il percorso completo al file wav.";
$text['description-caller_announce_sound']['nl-nl'] = "Stel geluid in de oproeper hoort om de aankondigings tijd(seconden), volledige pad naar de .wav file.";
@@ -2634,8 +2677,8 @@ $text['description-caller_announce_frequency']['de-ch'] = "Wie häufig soll der
$text['description-caller_announce_frequency']['de-de'] = "Wie häufig soll der Anmeldeton abgespielt werden. Geben Sie eine Zahl in Sekunden an.";
$text['description-caller_announce_frequency']['es-cl'] = "¿Con qué frecuencia deberíamos reproducir el sonido anunciar. Introduzca un número en segundos.";
$text['description-caller_announce_frequency']['es-mx'] = "¿Con qué frecuencia deberíamos reproducir el sonido anunciar. Introduzca un número en segundos."; //copied from es-cl
$text['description-caller_announce_frequency']['fr-ca'] = " Combien de fois devrions-nous jouer le son annonce. Entrez un nombre dans secondes."; //copied from fr-fr
$text['description-caller_announce_frequency']['fr-fr'] = " Combien de fois devrions-nous jouer le son annonce. Entrez un nombre dans secondes.";
$text['description-caller_announce_frequency']['fr-ca'] = "Fréquence auquel le son d'annonce joue. Entrer un nombre en secondes.";
$text['description-caller_announce_frequency']['fr-fr'] = "Fréquence auquel le son d'annonce joue. Entrer un nombre en secondes.";
$text['description-caller_announce_frequency']['he-il'] = "";
$text['description-caller_announce_frequency']['it-it'] = "Quanto spesso deve essere suonato l'annuncio, in secondi.";
$text['description-caller_announce_frequency']['nl-nl'] = "Hoe vaak wordt de annoncering afgespeeld";
@@ -2655,8 +2698,8 @@ $text['description-call_timeout']['de-ch'] = "Geben Sie den Wert für die Zeitü
$text['description-call_timeout']['de-de'] = "Geben Sie den Wert für die Zeitüberschreitung an.";
$text['description-call_timeout']['es-cl'] = "Introduzca el timeout de la llamada.";
$text['description-call_timeout']['es-mx'] = "Introduzca el timeout de la llamada."; //copied from es-cl
$text['description-call_timeout']['fr-ca'] = "Choisir le timeout de l'appel."; //copied from fr-fr
$text['description-call_timeout']['fr-fr'] = "Choisir le timeout de l'appel.";
$text['description-call_timeout']['fr-ca'] = "Définir le délai d'expiration de l'appel.";
$text['description-call_timeout']['fr-fr'] = "Définir le délai d'expiration de l'appel";
$text['description-call_timeout']['he-il'] = "";
$text['description-call_timeout']['it-it'] = "Inserire timeout di chiamata.";
$text['description-call_timeout']['nl-nl'] = "Voer oproep overscheidingstijd in.";
@@ -2739,8 +2782,8 @@ $text['description-busy_delay_time']['de-ch'] = "Geben Sie eine Wartezeit für d
$text['description-busy_delay_time']['de-de'] = "Geben Sie eine Wartezeit für den Agenten an.";
$text['description-busy_delay_time']['es-cl'] = "Introduzca el tiempo de espera de agente ocupado.";
$text['description-busy_delay_time']['es-mx'] = "Introduzca el tiempo de espera de agente ocupado."; //copied from es-cl
$text['description-busy_delay_time']['fr-ca'] = "Choisir le temps d'attente quand l'agent est occupé."; //copied from fr-fr
$text['description-busy_delay_time']['fr-fr'] = "Choisir le temps d'attente quand l'agent est occupé.";
$text['description-busy_delay_time']['fr-ca'] = "Choisir le délai d'attente lorsque l'agent est occupé.";
$text['description-busy_delay_time']['fr-fr'] = "Choisir le délai d'attente lorsque l'agent est occupé.";
$text['description-busy_delay_time']['he-il'] = "";
$text['description-busy_delay_time']['it-it'] = "Inserire il tempo di ritardo su agente occupato.";
$text['description-busy_delay_time']['nl-nl'] = "Voer de agent bezet wachttijd in";
@@ -2865,8 +2908,8 @@ $text['description-abandoned_resume_allowed']['de-ch'] = "Schalten Sie die Wider
$text['description-abandoned_resume_allowed']['de-de'] = "Schalten Sie die Wideraufnahme von Anrufern in der Warteschlange Ein oder Aus.";
$text['description-abandoned_resume_allowed']['es-cl'] = "Defina el permiso para permitir la continuación de abandono a verdadero o falso.";
$text['description-abandoned_resume_allowed']['es-mx'] = "Defina el permiso para permitir la continuación de abandono a verdadero o falso."; //copied from es-cl
$text['description-abandoned_resume_allowed']['fr-ca'] = "choisir l'autorisation de reprise d'abandon à oui ou non."; //copied from fr-fr
$text['description-abandoned_resume_allowed']['fr-fr'] = "choisir l'autorisation de reprise d'abandon à oui ou non.";
$text['description-abandoned_resume_allowed']['fr-ca'] = "Définir l'autorisation de reprise d'abandon à oui ou non.";
$text['description-abandoned_resume_allowed']['fr-fr'] = "Définir l'autorisation de reprise d'abandon à oui ou non.";
$text['description-abandoned_resume_allowed']['he-il'] = "";
$text['description-abandoned_resume_allowed']['it-it'] = "Imposta a vero o falso il permesso di ripristinare chi ha abbandonato.";
$text['description-abandoned_resume_allowed']['nl-nl'] = "Kies de afgebroken vervolgen toestaan aan of uit.";
@@ -2886,8 +2929,8 @@ $text['confirm-copy']['de-ch'] = "Wollen Sie das wirklich kopieren?"; //copied f
$text['confirm-copy']['de-de'] = "Wollen Sie das wirklich kopieren?";
$text['confirm-copy']['es-cl'] = "¿Realmente desea copiar esto?";
$text['confirm-copy']['es-mx'] = "¿Realmente desea copiar esto?"; //copied from es-cl
$text['confirm-copy']['fr-ca'] = "Voulez-vous vraiment copier cela?"; //copied from fr-fr
$text['confirm-copy']['fr-fr'] = "Voulez-vous vraiment copier cela?";
$text['confirm-copy']['fr-ca'] = "Voulez-vous vraiment créer une copie?";
$text['confirm-copy']['fr-fr'] = "Voulez-vous vraiment créer une copie?";
$text['confirm-copy']['he-il'] = "";
$text['confirm-copy']['it-it'] = "Vuoi veramente farne una copia?";
$text['confirm-copy']['nl-nl'] = "Wil je dit werkelijk overnemen?";
@@ -2907,8 +2950,8 @@ $text['button-update_status']['de-ch'] = "Status Aktualisieren"; //copied from d
$text['button-update_status']['de-de'] = "Status Aktualisieren";
$text['button-update_status']['es-cl'] = "Actualizar Estado";
$text['button-update_status']['es-mx'] = "Actualizar Estado"; //copied from es-cl
$text['button-update_status']['fr-ca'] = "Mis à jour état"; //copied from fr-fr
$text['button-update_status']['fr-fr'] = "Mis à jour état";
$text['button-update_status']['fr-ca'] = "Mettre à jour l'état";
$text['button-update_status']['fr-fr'] = "Mettre à jour l'état";
$text['button-update_status']['he-il'] = "";
$text['button-update_status']['it-it'] = "Stato Aggiornato";
$text['button-update_status']['nl-nl'] = "Bijwerk status";
@@ -2928,8 +2971,8 @@ $text['button-tiers']['de-ch'] = "Ebenen"; //copied from de-de
$text['button-tiers']['de-de'] = "Ebenen";
$text['button-tiers']['es-cl'] = "Niveles";
$text['button-tiers']['es-mx'] = "Niveles"; //copied from es-cl
$text['button-tiers']['fr-ca'] = "Tiers"; //copied from fr-fr
$text['button-tiers']['fr-fr'] = "Tiers";
$text['button-tiers']['fr-ca'] = "Niveaux";
$text['button-tiers']['fr-fr'] = "Niveaux";
$text['button-tiers']['he-il'] = "";
$text['button-tiers']['it-it'] = "Tiers";
$text['button-tiers']['nl-nl'] = "Vergelijkingen";

View File

@@ -212,7 +212,4 @@
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//include footer
require_once "resources/footer.php";
?>
?>

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2020
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -93,6 +93,7 @@
$agent_wrap_up_time = $_POST["agent_wrap_up_time"];
$agent_reject_delay_time = $_POST["agent_reject_delay_time"];
$agent_busy_delay_time = $_POST["agent_busy_delay_time"];
$agent_record = $_POST["agent_record"];
//$agent_logout = $_POST["agent_logout"];
}
@@ -152,6 +153,12 @@
$users = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//change the contact string to loopback - Not recommended added for backwards comptability causes multiple problems
if ($_SESSION['call_center']['agent_contact_method']['text'] == 'loopback') {
$agent_contact = str_replace("user/", "loopback/", $agent_contact);
$agent_contact = str_replace("@", "/", $agent_contact);
}
//prepare the array
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_center_agents'][0]['call_center_agent_uuid'] = $call_center_agent_uuid;
@@ -168,6 +175,7 @@
$array['call_center_agents'][0]['agent_wrap_up_time'] = $agent_wrap_up_time;
$array['call_center_agents'][0]['agent_reject_delay_time'] = $agent_reject_delay_time;
$array['call_center_agents'][0]['agent_busy_delay_time'] = $agent_busy_delay_time;
$array['call_center_agents'][0]['agent_record'] = $agent_record;
if (is_uuid($user_uuid)) {
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['users'][0]['user_uuid'] = $user_uuid;
@@ -295,6 +303,7 @@
$agent_wrap_up_time = $row["agent_wrap_up_time"];
$agent_reject_delay_time = $row["agent_reject_delay_time"];
$agent_busy_delay_time = $row["agent_busy_delay_time"];
$agent_record = $row["agent_record"];
//$agent_logout = $row["agent_logout"];
}
unset($sql, $parameters, $row);
@@ -573,6 +582,20 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-record_template']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='agent_record'>\n";
echo " <option value='true' ".($agent_record == "true" ? "selected='selected'" : '')." >".$text['option-true']."</option>\n";
echo " <option value='false' ".($agent_record != "true" ? "selected='selected'" : '').">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-record_template']."\n";
echo "</td>\n";
echo "</tr>\n";
/*
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
@@ -599,4 +622,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -119,6 +119,9 @@
echo " <div class='heading'><b>".$text['header-call_center_agents']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'call_center_queues.php','style'=>'margin-right: 15px;']);
if (permission_exists('call_center_imports')) {
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'link'=>PROJECT_PATH.'/app/call_center_imports/call_center_imports.php?import_type=call_center_agents']);
}
if ($num_rows) {
echo button::create(['type'=>'button','label'=>$text['button-status'],'icon'=>'user-clock','style'=>'margin-right: 15px;','link'=>'call_center_agent_status.php']);
}
@@ -242,4 +245,4 @@
//show the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -86,6 +86,7 @@
$queue_moh_sound = $_POST["queue_moh_sound"];
$queue_record_template = $_POST["queue_record_template"];
$queue_time_base_score = $_POST["queue_time_base_score"];
$queue_time_base_score_sec = $_POST["queue_time_base_score_sec"];
$queue_max_wait_time = $_POST["queue_max_wait_time"];
$queue_max_wait_time_with_no_agent = $_POST["queue_max_wait_time_with_no_agent"];
$queue_max_wait_time_with_no_agent_time_reached = $_POST["queue_max_wait_time_with_no_agent_time_reached"];
@@ -188,6 +189,7 @@
//if (strlen($queue_moh_sound) == 0) { $msg .= $text['message-required'].$text['label-music_on_hold']."<br>\n"; }
//if (strlen($queue_record_template) == 0) { $msg .= $text['message-required'].$text['label-record_template']."<br>\n"; }
//if (strlen($queue_time_base_score) == 0) { $msg .= $text['message-required'].$text['label-time_base_score']."<br>\n"; }
//if (strlen($queue_time_base_score_sec) == 0) { $msg .= $text['message-required'].$text['label-time_base_score_sec']."<br>\n"; }
//if (strlen($queue_max_wait_time) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time']."<br>\n"; }
//if (strlen($queue_max_wait_time_with_no_agent) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent']."<br>\n"; }
//if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent_time_reached']."<br>\n"; }
@@ -269,6 +271,7 @@
$array['call_center_queues'][0]['queue_moh_sound'] = $queue_moh_sound;
$array['call_center_queues'][0]['queue_record_template'] = $queue_record_template;
$array['call_center_queues'][0]['queue_time_base_score'] = $queue_time_base_score;
$array['call_center_queues'][0]['queue_time_base_score_sec'] = $queue_time_base_score_sec;
$array['call_center_queues'][0]['queue_max_wait_time'] = $queue_max_wait_time;
$array['call_center_queues'][0]['queue_max_wait_time_with_no_agent'] = $queue_max_wait_time_with_no_agent;
$array['call_center_queues'][0]['queue_max_wait_time_with_no_agent_time_reached'] = $queue_max_wait_time_with_no_agent_time_reached;
@@ -324,8 +327,19 @@
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$queue_extension."$\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
if ($queue_time_base_score_sec != '') {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$queue_time_base_score_sec."\"/>\n";
}
if ($queue_greeting_path != '') {
$dialplan_xml .= " <action application=\"playback\" data=\"".$queue_greeting_path."\"/>\n";
$greeting_array = explode(':', $queue_greeting_path);
if (count($greeting_array) == 1) {
$dialplan_xml .= " <action application=\"playback\" data=\"".$queue_greeting_path."\"/>\n";
}
else {
if ($greeting_array[0] == 'say' || $greeting_array[0] == 'tone_stream' || $greeting_array[0] == 'phrase') {
$dialplan_xml .= " <action application=\"".$greeting_array[0]."\" data=\"".$greeting_array[1]."\"/>\n";
}
}
}
if (strlen($queue_cid_prefix) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".$queue_cid_prefix."#\${caller_id_name}\"/>\n";
@@ -345,7 +359,7 @@
$array['dialplans'][0]["dialplan_uuid"] = $dialplan_uuid;
$array['dialplans'][0]["dialplan_name"] = $queue_name;
$array['dialplans'][0]["dialplan_number"] = $queue_extension;
$array['dialplans'][0]["dialplan_context"] = $_SESSION['context'];
$array['dialplans'][0]["dialplan_context"] = $_SESSION['domain_name'];
$array['dialplans'][0]["dialplan_continue"] = "false";
$array['dialplans'][0]["dialplan_xml"] = $dialplan_xml;
$array['dialplans'][0]["dialplan_order"] = "230";
@@ -377,7 +391,12 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//redirect the user
if (isset($action)) {
@@ -468,6 +487,7 @@
$queue_moh_sound = $row["queue_moh_sound"];
$queue_record_template = $row["queue_record_template"];
$queue_time_base_score = $row["queue_time_base_score"];
$queue_time_base_score_sec = $row["queue_time_base_score_sec"];
$queue_max_wait_time = $row["queue_max_wait_time"];
$queue_max_wait_time_with_no_agent = $row["queue_max_wait_time_with_no_agent"];
$queue_max_wait_time_with_no_agent_time_reached = $row["queue_max_wait_time_with_no_agent_time_reached"];
@@ -538,6 +558,7 @@
if (strlen($queue_strategy) == 0) { $queue_strategy = "longest-idle-agent"; }
if (strlen($queue_moh_sound) == 0) { $queue_moh_sound = "\$\${hold_music}"; }
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = "system"; }
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = ""; }
if (strlen($queue_max_wait_time) == 0) { $queue_max_wait_time = "0"; }
if (strlen($queue_max_wait_time_with_no_agent) == 0) { $queue_max_wait_time_with_no_agent = "90"; }
if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $queue_max_wait_time_with_no_agent_time_reached = "30"; }
@@ -768,16 +789,17 @@
echo " <tr>\n";
echo " <td class=''>";
if (strlen($field['call_center_tier_uuid']) > 0) {
echo " <input name='call_center_tiers[".$x."][call_center_tier_uuid]' type='hidden' value=\"".escape($field['call_center_tier_uuid'])."\">\n";
echo " <input name='call_center_tiers[".$x."][call_center_tier_uuid]' type='hidden' value=\"".escape($field['call_center_tier_uuid'])."\">\n";
}
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\">\n";
echo " <option value=\"\"></option>\n";
foreach($agents as $row) {
$selected = '';
if ($row['call_center_agent_uuid'] == $field['call_center_agent_uuid']) {
$selected = "selected=\"selected\"";
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\" style=\"width: 200px\">\n";
if (is_uuid($field['call_center_agent_uuid'])) {
echo " <option value=\"".escape($field['call_center_agent_uuid'])."\">".escape($field['agent_name'])."</option>\n";
}
else {
echo " <option value=\"\"></option>\n";
foreach($agents as $row) {
echo " <option value=\"".escape($row['call_center_agent_uuid'])."\">".escape($row['agent_name'])."</option>\n";
}
echo " <option value=\"".escape($row['call_center_agent_uuid'])."\" $selected>".escape($row['agent_name'])."</option>\n";
}
echo " </select>";
echo " </td>\n";
@@ -884,6 +906,17 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-time_base_score_sec']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='queue_time_base_score_sec' maxlength='255' min='0' step='1' value='".escape($queue_time_base_score_sec)."'>\n";
echo "<br />\n";
echo $text['description-time_base_score_sec']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-max_wait_time']."\n";

View File

@@ -124,6 +124,9 @@
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['header-call_center_queues']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
if (permission_exists('call_center_imports')) {
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'link'=>PROJECT_PATH.'/app/call_center_imports/call_center_imports.php?import_type=call_center_queues']);
}
if (permission_exists('call_center_agent_view')) {
echo button::create(['type'=>'button','label'=>$text['button-agents'],'icon'=>'users','link'=>'call_center_agents.php']);
}
@@ -182,6 +185,7 @@
//echo th_order_by('queue_moh_sound', $text['label-music_on_hold'], $order_by, $order);
//echo th_order_by('queue_record_template', $text['label-record_template'], $order_by, $order);
//echo th_order_by('queue_time_base_score', $text['label-time_base_score'], $order_by, $order);
//echo th_order_by('queue_time_base_score_sec', $text['label-time_base_score_sec'], $order_by, $order);
//echo th_order_by('queue_max_wait_time', $text['label-max_wait_time'], $order_by, $order);
//echo th_order_by('queue_max_wait_time_with_no_agent', $text['label-max_wait_time_with_no_agent'], $order_by, $order);
echo th_order_by('queue_tier_rules_apply', $text['label-tier_rules_apply'], $order_by, $order);
@@ -222,6 +226,7 @@
//echo " <td>".escape($row[queue_moh_sound])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_record_template])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_time_base_score])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_time_base_score_sec])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_max_wait_time])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_max_wait_time_with_no_agent])."&nbsp;</td>\n";
echo " <td>".ucwords(escape($row['queue_tier_rules_apply']))."</td>\n";
@@ -253,4 +258,4 @@
//show the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -109,7 +109,7 @@
$dialplan["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_name"] = ($this->queue_name != '') ? $this->queue_name : format_phone($this->destination_number);
$dialplan["dialplan_number"] = $this->destination_number;
$dialplan["dialplan_context"] = $_SESSION['context'];
$dialplan["dialplan_context"] = $_SESSION['domain_name'];
$dialplan["dialplan_continue"] = "false";
$dialplan["dialplan_order"] = "210";
$dialplan["dialplan_enabled"] = "true";
@@ -267,7 +267,7 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION['context']);
$cache->delete("dialplan:".$_SESSION['domain_name']);
//return the dialplan_uuid
return $dialplan_response;
@@ -346,6 +346,17 @@
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//delete the queue in the switch
if ($fp) {
foreach ($uuids as $uuid) {
$cmd = "api callcenter_config queue unload ".$uuid;
$response = event_socket_request($fp, $cmd);
}
}
//grant temporary permissions
$p = new permissions;
$p->add('call_center_tier_delete', 'temp');
@@ -366,9 +377,14 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
remove_config_from_cache('configuration:callcenter.conf');
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//synchronize configuration
save_call_center_xml();
@@ -417,7 +433,7 @@
//build the delete array
if (is_array($uuids) && @sizeof($uuids) != 0) {
foreach ($uuids as $uuid) {
foreach ($uuids as $x => $uuid) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_center_tiers'][$x]['call_center_agent_uuid'] = $uuid;
@@ -592,7 +608,7 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//set message
message::add($text['message-copy']);

View File

@@ -255,6 +255,11 @@
$cache = new cache;
$cache->delete("dialplan:".$call_flow_context);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//redirect the user
if (isset($action)) {
if ($action == "add") {

View File

@@ -158,6 +158,11 @@ if (!class_exists('call_flows')) {
}
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);
}
@@ -250,6 +255,11 @@ if (!class_exists('call_flows')) {
}
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);
}

View File

@@ -51,8 +51,6 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_forward_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_forward_caller_id";
//default settings
$y=0;

View File

@@ -101,7 +101,6 @@
$forward_user_not_registered_destination = $row["forward_user_not_registered_destination"];
$forward_user_not_registered_enabled = $row["forward_user_not_registered_enabled"];
$follow_me_uuid = $row["follow_me_uuid"];
$forward_caller_id_uuid = $row["forward_caller_id_uuid"];
}
else {
echo "access denied";
@@ -123,11 +122,9 @@
$forward_user_not_registered_enabled = $_POST["forward_user_not_registered_enabled"];
$forward_user_not_registered_destination = $_POST["forward_user_not_registered_destination"];
$forward_caller_id_uuid = $_POST["forward_caller_id_uuid"];
$cid_name_prefix = $_POST["cid_name_prefix"];
$cid_number_prefix = $_POST["cid_number_prefix"];
$follow_me_enabled = $_POST["follow_me_enabled"];
$follow_me_caller_id_uuid = $_POST["follow_me_caller_id_uuid"];
$follow_me_ignore_busy = $_POST["follow_me_ignore_busy"];
$n = 0;
@@ -194,7 +191,6 @@
$array['extensions'][0]['forward_no_answer_destination'] = $forward_no_answer_destination;
$array['extensions'][0]['forward_user_not_registered_enabled'] = $forward_user_not_registered_enabled;
$array['extensions'][0]['forward_user_not_registered_destination'] = $forward_user_not_registered_destination;
$array['extensions'][0]['forward_caller_id_uuid'] = $forward_caller_id_uuid;
}
//do not disturb (dnd) config
@@ -226,7 +222,6 @@
$array['follow_me'][0]['follow_me_uuid'] = $follow_me_uuid;
$array['follow_me'][0]['cid_name_prefix'] = $cid_name_prefix;
$array['follow_me'][0]['cid_number_prefix'] = $cid_number_prefix;
$array['follow_me'][0]['follow_me_caller_id_uuid'] = $follow_me_caller_id_uuid;
$array['follow_me'][0]['follow_me_ignore_busy'] = $follow_me_ignore_busy;
if ($destination_found) {
$array['follow_me'][0]['follow_me_enabled'] = $follow_me_enabled;
@@ -297,7 +292,6 @@
$call_forward->extension_uuid = $extension_uuid;
$call_forward->forward_all_destination = $forward_all_destination;
$call_forward->forward_all_enabled = $forward_all_enabled;
$call_forward->forward_caller_id_uuid = $forward_caller_id_uuid;
}
//do not disturb (dnd) config
@@ -328,7 +322,6 @@
$follow_me->extension_uuid = $extension_uuid;
$follow_me->follow_me_uuid = $follow_me_uuid;
$follow_me->follow_me_ignore_busy = $follow_me_ignore_busy;
$follow_me->follow_me_caller_id_uuid = $follow_me_caller_id_uuid;
$follow_me->follow_me_enabled = $follow_me_enabled;
$follow_me->set();
unset($follow_me);
@@ -431,7 +424,6 @@
$cid_name_prefix = $row["cid_name_prefix"];
$cid_number_prefix = $row["cid_number_prefix"];
$follow_me_enabled = $row["follow_me_enabled"];
$follow_me_caller_id_uuid = $row["follow_me_caller_id_uuid"];
$follow_me_ignore_busy = $row["follow_me_ignore_busy"];
unset($row);
@@ -441,6 +433,8 @@
$parameters['follow_me_uuid'] = $follow_me_uuid;
$database = new database;
$result = $database->select($sql, $parameters, 'all');
unset($destinations);
foreach ($result as $x => &$row) {
$destinations[$x]['uuid'] = $row["follow_me_destination_uuid"];
$destinations[$x]['destination'] = $row["follow_me_destination"];
@@ -493,6 +487,7 @@
echo "});\n";
echo "</script>\n";
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -579,43 +574,6 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('call_forward_caller_id')) {
$sql = "select destination_uuid, destination_number, destination_description, destination_caller_id_number, destination_caller_id_name ";
$sql .= "from v_destinations ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and destination_type = 'inbound' ";
$sql .= "order by destination_number asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$result = $database->select($sql, $parameters, 'all');
if (is_array($result) && sizeof($result) != 0) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>";
echo $text['label-cid-number'];
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='forward_caller_id_uuid' id='forward_caller_id_uuid' class='formfld' >\n";
echo " <option value=''></option>\n";
foreach ($result as &$row) {
$selected = $row["destination_uuid"] == $forward_caller_id_uuid ? "selected='selected' " : '';
$caller_id_number = $row['destination_caller_id_number'];
if(strlen($caller_id_number) == 0){
$caller_id_number = $row['destination_number'];
}
$caller_id_name = $row['destination_caller_id_name'];
if(strlen($caller_id_name) == 0){
$caller_id_name = $row['destination_description'];
}
echo " <option value='".escape($row["destination_uuid"])."' ".$selected.">".format_phone(escape($caller_id_number))." : ".escape($caller_id_name)."</option>\n";
}
echo " </select><br />\n";
echo $text['description-cid-number']."\n";
echo "</td>\n";
echo "</tr>\n";
}
unset($sql, $parameters, $result, $row);
}
echo "<tr><td colspan='2'><br /></td></tr>\n";
echo "<tr>\n";
@@ -625,9 +583,6 @@
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('forward_all_disabled').checked=true; ";
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
if (permission_exists('follow_me_caller_id')) {
$on_click .= "document.getElementById('follow_me_caller_id_uuid').focus(); ";
}
echo " <label for='follow_me_disabled'><input type='radio' name='follow_me_enabled' id='follow_me_disabled' onclick=\"$('#tr_follow_me_settings').slideUp('fast');\" value='false' ".(($follow_me_enabled == "false" || $follow_me_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_enabled'><input type='radio' name='follow_me_enabled' id='follow_me_enabled' onclick=\"$('#tr_follow_me_settings').slideDown('fast'); $on_click\" value='true' ".(($follow_me_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
@@ -696,45 +651,6 @@
echo " </tr>\n";
}
if (permission_exists('follow_me_caller_id')) {
$sql = "select destination_uuid, destination_number, destination_description, destination_caller_id_number, destination_caller_id_name ";
$sql .= "from v_destinations ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and destination_type = 'inbound' ";
$sql .= "order by destination_number asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$result = $database->select($sql, $parameters, 'all');
if (is_array($result) && sizeof($result) != 0) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>";
echo $text['label-cid-number'];
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='follow_me_caller_id_uuid' id='follow_me_caller_id_uuid' class='formfld' >\n";
echo " <option value=''></option>\n";
foreach ($result as &$row) {
$selected = $row["destination_uuid"] == $follow_me_caller_id_uuid ? "selected='selected'" : null;
$caller_id_number = $row['destination_caller_id_number'];
if(strlen($caller_id_number) == 0){
$caller_id_number = $row['destination_number'];
}
$caller_id_name = $row['destination_caller_id_name'];
if(strlen($caller_id_name) == 0){
$caller_id_name = $row['destination_description'];
}
echo " <option value='".escape($row["destination_uuid"])."' ".$selected.">".format_phone(escape($caller_id_number))." : ".escape($caller_id_name)."</option>\n";
}
echo " </select><br />\n";
echo $text['description-cid-number']."\n";
echo "</td>\n";
echo "</tr>\n";
}
unset($sql, $parameters, $result, $row);
}
if (permission_exists('follow_me_cid_name_prefix')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";

View File

@@ -194,16 +194,6 @@
}
require_once "resources/header.php";
//javascript for toggle select box
echo "<script language='javascript' type='text/javascript'>\n";
echo " function toggle_select() {\n";
echo " $('#call_control_feature').fadeToggle(400, function() {\n";
echo " document.getElementById('call_control_feature').selectedIndex = 0;\n";
echo " document.getElementById('call_control_feature').focus();\n";
echo " });\n";
echo " }\n";
echo "</script>\n";
//show the content
if ($is_included) {
echo "<div class='action_bar sub'>\n";
@@ -222,21 +212,17 @@
echo " <div class='actions'>\n";
if ($extensions) {
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"toggle_select(); this.blur();"]);
if (permission_exists('call_forward')) {
echo button::create(['type' => 'button', 'label' => $text['label-call_forward'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_cfwd', 'onclick' => "list_action_set('toggle_call_forward'); modal_open('modal-toggle','btn_toggle');"]);
}
if (permission_exists('follow_me')) {
echo button::create(['type' => 'button', 'label' => $text['label-follow_me'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_follow', 'onclick' => "list_action_set('toggle_follow_me'); modal_open('modal-toggle','btn_toggle');"]);
}
if (permission_exists('do_not_disturb')) {
echo button::create(['type' => 'button', 'label' => $text['label-dnd'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_dnd', 'onclick' => "list_action_set('toggle_do_not_disturb'); modal_open('modal-toggle','btn_toggle');"]);
}
}
echo "<select class='formfld' style='display: none; width: auto;' id='call_control_feature' onchange=\"if (this.selectedIndex != 0) { modal_open('modal-toggle','btn_toggle'); }\">";
echo " <option value='' selected='selected'>".$text['label-select']."</option>";
if (permission_exists('call_forward')) {
echo " <option value='call_forward'>".$text['label-call_forward']."</option>";
}
if (permission_exists('follow_me')) {
echo " <option value='follow_me'>".$text['label-follow_me']."</option>";
}
if (permission_exists('do_not_disturb')) {
echo " <option value='do_not_disturb'>".$text['label-dnd']."</option>";
}
echo " </select>";
if ($_GET['show'] !== 'all' && permission_exists('call_forward_all')) {
if ($_GET['show'] !== 'all' && permission_exists('call_forward_all')) {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all'.($params ? '&'.implode('&', $params) : null)]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
@@ -255,7 +241,7 @@
echo "</div>\n";
if ($extensions) {
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle_' + document.getElementById('call_control_feature').options[document.getElementById('call_control_feature').selectedIndex].value); list_form_submit('form_list');"])]);
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
}
echo $text['description-call_routing']."\n";

View File

@@ -42,7 +42,6 @@ include "root.php";
private $dial_string;
private $toll_allow;
public $accountcode;
public $forward_caller_id_uuid;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
@@ -280,4 +279,4 @@ include "root.php";
}// class
?>
?>

View File

@@ -43,38 +43,40 @@ include "root.php";
//feature_event method
public function send_notify() {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
//get the sip profile name
$command = "sofia_contact */".$this->extension."@".$this->domain_name;
$contact_string = event_socket_request($fp, "api ".$command);
if (substr($contact_string, 0, 5) == "sofia") {
$contact_array = explode("/", $contact_string);
$sip_profile_name = $contact_array[1];
}
else {
$sip_profile_name = 'internal';
}
//send the event
$event = "sendevent SWITCH_EVENT_PHONE_FEATURE\n";
$event .= "profile: ".$sip_profile_name."\n";
$event .= "user: ".$this->extension."\n";
$event .= "host: ".$this->domain_name."\n";
$event .= "device: \n";
$event .= "Feature-Event: init\n";
$event .= "forward_immediate_enabled: ".$this->forward_all_enabled."\n";
$event .= "forward_immediate: ".$this->forward_all_destination."\n";
$event .= "forward_busy_enabled: ".$this->forward_busy_enabled."\n";
$event .= "forward_busy: ".$this->forward_busy_destination."\n";
$event .= "forward_no_answer_enabled: ".$this->forward_no_answer_enabled."\n";
$event .= "forward_no_answer: ".$this->forward_no_answer_destination."\n";
$event .= "doNotDisturbOn: ".$this->do_not_disturb."\n";
$event .= "ringCount: ".$this->ring_count."\n";
event_socket_request($fp, $event);
fclose($fp);
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
// Get the SIP profiles for the extension
$command = "sofia_contact */{$this->extension}@{$this->domain_name}";
$contact_string = event_socket_request($fp, "api ".$command);
// The first value in the array will be full matching text, the second one will be the array of profile matches
preg_match_all('/sofia\/([^,]+)\/(?:[^,]+)/', $contact_string, $matches);
if (sizeof($matches) != 2 || sizeof($matches[1]) < 1) {
$profiles = array("internal");
} else {
// We have at least one profile, get all of the unique profiles
$profiles = array_unique($matches[1]);
}
foreach ($profiles as $profile) {
//send the event
$event = "sendevent SWITCH_EVENT_PHONE_FEATURE\n";
$event .= "profile: " . $profile . "\n";
$event .= "user: " . $this->extension . "\n";
$event .= "host: " . $this->domain_name . "\n";
$event .= "device: \n";
$event .= "Feature-Event: init\n";
$event .= "forward_immediate_enabled: " . $this->forward_all_enabled . "\n";
$event .= "forward_immediate: " . $this->forward_all_destination . "\n";
$event .= "forward_busy_enabled: " . $this->forward_busy_enabled . "\n";
$event .= "forward_busy: " . $this->forward_busy_destination . "\n";
$event .= "forward_no_answer_enabled: " . $this->forward_no_answer_enabled . "\n";
$event .= "forward_no_answer: " . $this->forward_no_answer_destination . "\n";
$event .= "doNotDisturbOn: " . $this->do_not_disturb . "\n";
$event .= "ringCount: " . $this->ring_count . "\n";
event_socket_request($fp, $event);
}
fclose($fp);
}
} //function
} //class

View File

@@ -39,7 +39,6 @@ include "root.php";
public $cid_number_prefix;
public $accountcode;
public $follow_me_enabled;
public $follow_me_caller_id_uuid;
public $follow_me_ignore_busy;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
@@ -89,7 +88,7 @@ include "root.php";
if (strlen($this->cid_number_prefix) > 0) {
$array['follow_me'][0]['cid_number_prefix'] = $this->cid_number_prefix;
}
$array['follow_me'][0]['follow_me_caller_id_uuid'] = is_uuid($this->follow_me_caller_id_uuid) ? $this->follow_me_caller_id_uuid : null;
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions
@@ -114,7 +113,6 @@ include "root.php";
$array['follow_me'][0]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me'][0]['cid_name_prefix'] = $this->cid_name_prefix;
$array['follow_me'][0]['cid_number_prefix'] = $this->cid_number_prefix;
$array['follow_me'][0]['follow_me_caller_id_uuid'] = is_uuid($this->follow_me_caller_id_uuid) ? $this->follow_me_caller_id_uuid : null;
$array['follow_me'][0]['follow_me_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions
@@ -459,4 +457,4 @@ include "root.php";
} //class
?>
?>

View File

@@ -450,8 +450,8 @@ $text['desc-ringback']['de-ch'] = "Geben Sie an, was Sie hören möchten, währe
$text['desc-ringback']['de-de'] = "Geben Sie an, was Sie hören möchten, während die Verbindung aufgebaut wird. Zur Auswahl stehen musik (Wartemusik) oder Rufton";
$text['desc-ringback']['es-cl'] = "Defina qué desea escuchar mientras se llama al destinatario. Las opciones son música (música en espera) o tono de marcado";
$text['desc-ringback']['es-mx'] = "Defina qué desea escuchar mientras se llama al destinatario. Las opciones son música (música en espera) o tono de marcado"; //copied from es-cl
$text['desc-ringback']['fr-ca'] = "Défini ce vous entendrez pendant que la destination sera appelée. Les choix sont musique (musique de garde) sonnerie."; //copied from fr-fr
$text['desc-ringback']['fr-fr'] = "Défini ce vous entendrez pendant que la destination sera appelée. Les choix sont musique (musique de garde) sonnerie.";
$text['desc-ringback']['fr-ca'] = "Défini ce vous entendrez pendant que la destination sera appelée. Les choix sont musique (musique d'attente) sonnerie."; //copied from fr-fr
$text['desc-ringback']['fr-fr'] = "Défini ce vous entendrez pendant que la destination sera appelée. Les choix sont musique (musique d'attente) sonnerie.";
$text['desc-ringback']['he-il'] = "";
$text['desc-ringback']['it-it'] = "Definisce cosa sentirai mentre il destinatario è chiamato. Le scelte sono musica (music on hold) o tono (ring tone).";
$text['desc-ringback']['nl-nl'] = "Kies wachtmuziek terwijl de bestemming gebeld wordt. De keuze is wachtmuziek of beltoon.";

View File

@@ -2,7 +2,7 @@
/* $Id$ */
/*
click_to_call.php
Copyright (C) 2008, 2018 Mark J Crane
Copyright (C) 2008, 2021 Mark J Crane
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@
$auto_answer = check_str($_GET['auto_answer']); //true,false
$rec = check_str($_GET['rec']); //true,false
$ringback = check_str($_GET['ringback']);
$context = $_SESSION['context'];
$context = $_SESSION['domain_name'];
//clean up variable values
$src = str_replace(array('.','(',')','-',' '), '', $src);
@@ -209,7 +209,7 @@
else {
//display the last command
$switch_cmd = "api originate ".$source.$switch_cmd;
echo "<div align='center'>".$switch_cmd."<br /><br /><strong>".$src." has called ".$dest."</strong></div>\n";
echo "<div align='center'><strong>".escape($src)." has called ".escape($dest)."</strong></div>\n";
//show the command result
$result = trim(event_socket_request($fp, $switch_cmd));
if (substr($result, 0,3) == "+OK") {
@@ -218,11 +218,13 @@
//use the server's time zone to ensure it matches the time zone used by freeswitch
date_default_timezone_set($_SESSION['time_zone']['system']);
//create the api record command and send it over event socket
$switch_cmd = "api uuid_record ".$origination_uuid." start ".$record_path."/".$record_name;
if (is_uuid($origination_uuid) && file_exists($record_path)) {
$switch_cmd = "api uuid_record ".$origination_uuid." start ".$record_path."/".$record_name;
}
$result2 = trim(event_socket_request($fp, $switch_cmd));
}
}
echo "<div align='center'><br />".$result."<br /><br /></div>\n";
echo "<div align='center'><br />".escape($result)."<br /><br /></div>\n";
}
}
@@ -291,7 +293,7 @@
echo "<tr>\n";
echo " <td class='vncellreq'>".$text['label-src-num']."</td>\n";
echo " <td class='vtable' align='left'>\n";
echo " <input name=\"src\" value='$src' class='formfld'>\n";
echo " <input name=\"src\" value='".escape($src)."' class='formfld'>\n";
echo " <br />\n";
echo " ".$text['desc-src-num']."\n";
echo " </td>\n";
@@ -300,7 +302,7 @@
echo "<tr>\n";
echo " <td class='vncellreq'>".$text['label-dest-num']."</td>\n";
echo " <td class='vtable' align='left'>\n";
echo " <input name=\"dest\" value='$dest' class='formfld'>\n";
echo " <input name=\"dest\" value='".escape($dest)."' class='formfld'>\n";
echo " <br />\n";
echo " ".$text['desc-dest-num']."\n";
echo " </td>\n";

View File

@@ -147,7 +147,7 @@
$array['dialplans'][0]["dialplan_uuid"] = $dialplan_uuid;
$array['dialplans'][0]["dialplan_name"] = $conference_center_name;
$array['dialplans'][0]["dialplan_number"] = $conference_center_extension;
$array['dialplans'][0]["dialplan_context"] = $_SESSION['context'];
$array['dialplans'][0]["dialplan_context"] = $_SESSION['domain_name'];
$array['dialplans'][0]["dialplan_continue"] = "false";
$array['dialplans'][0]["dialplan_xml"] = $dialplan_xml;
$array['dialplans'][0]["dialplan_order"] = "333";
@@ -183,7 +183,12 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//redirect the user
if (isset($action)) {

View File

@@ -89,12 +89,11 @@
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = '';
if (isset($_GET['page'])) {
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
}
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_conference_sessions ";

View File

@@ -89,7 +89,7 @@ if (!class_exists('conference_centers')) {
}
$sql = "select count(*) from v_conference_rooms as r, v_meetings as p ";
if ($not_admin) {
$sql .= "v_meeting_users as u, ";
$sql .= ",v_meeting_users as u ";
}
$sql .= "where r.domain_uuid = :domain_uuid ";
$sql .= "and r.meeting_uuid = p.meeting_uuid ";
@@ -373,7 +373,12 @@ if (!class_exists('conference_centers')) {
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//apply settings reminder
$_SESSION["reload_xml"] = true;
@@ -604,7 +609,12 @@ if (!class_exists('conference_centers')) {
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);

View File

@@ -205,7 +205,7 @@
$array['dialplans'][0]['app_uuid'] = 'b81412e8-7253-91f4-e48e-42fc2c9a38d9';
$array['dialplans'][0]['dialplan_xml'] = $dialplan_xml;
$array['dialplans'][0]['dialplan_order'] = '333';
$array['dialplans'][0]['dialplan_context'] = $_SESSION['context'];
$array['dialplans'][0]['dialplan_context'] = $_SESSION['domain_name'];
$array['dialplans'][0]['dialplan_enabled'] = $conference_enabled;
$array['dialplans'][0]['dialplan_description'] = $conference_description;
@@ -241,7 +241,12 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//redirect the browser
header("Location: conferences.php");

View File

@@ -141,7 +141,12 @@ if (!class_exists('conferences')) {
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);
@@ -227,7 +232,12 @@ if (!class_exists('conferences')) {
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);
@@ -362,7 +372,7 @@ if (!class_exists('conferences')) {
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["context"]);
$cache->delete("dialplan:".$_SESSION["domain_name"]);
//set message
message::add($text['message-copy']);

View File

@@ -4753,8 +4753,8 @@ $text['description-contacts_import_google']['ru-ru'] = "Выберите нуж
$text['description-contacts_import_google']['sv-se'] = "Välj de kontakter som skall importeras.";
$text['description-contacts_import_google']['uk-ua'] = "";
$text['description-contacts_import']['en-us'] = "Export your contacts from outlook to a comma delimitted csv file. Then use this tool to upload and add the contacts from that file.";
$text['description-contacts_import']['en-gb'] = "Export your contacts from outlook to a comma delimitted csv file. Then use this tool to upload and add the contacts from that file.";
$text['description-contacts_import']['en-us'] = "Submit or upload delimited data to add multiple records.";
$text['description-contacts_import']['en-gb'] = "Submit or upload delimited data to add multiple records.";
$text['description-contacts_import']['ar-eg'] = "";
$text['description-contacts_import']['de-at'] = "Exportieren Sie Ihre Kontakte aus Outlook in eine CSV Datei und benützen Sie diese Funktion um Ihre Kontakte zu importieren."; //copied from de-de
$text['description-contacts_import']['de-ch'] = "Exportieren Sie Ihre Kontakte aus Outlook in eine CSV Datei und benützen Sie diese Funktion um Ihre Kontakte zu importieren."; //copied from de-de

View File

@@ -143,7 +143,7 @@
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: extension_imports.php');
header('Location: contact_import.php');
exit;
}
@@ -172,21 +172,44 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
//define phone label options
if (is_array($_SESSION["contact"]["phone_label"]) && @sizeof($_SESSION["contact"]["phone_label"]) != 0) {
sort($_SESSION["contact"]["phone_label"]);
foreach($_SESSION["contact"]["phone_label"] as $row) {
$label_options[] = "<option value='".$row.">".$row."</option>";
}
}
else {
$default_labels[] = $text['option-work'];
$default_labels[] = $text['option-home'];
$default_labels[] = $text['option-mobile'];
$default_labels[] = $text['option-main'];
$default_labels[] = $text['option-fax'];
$default_labels[] = $text['option-pager'];
$default_labels[] = $text['option-voicemail'];
$default_labels[] = $text['option-text'];
$default_labels[] = $text['option-other'];
foreach ($default_labels as $default_label) {
$label_options[] = "<option value='".$default_label."'>".$default_label."</option>";
}
}
//loop through user columns
$x = 0;
foreach ($line_fields as $line_field) {
$line_field = trim(trim($line_field), $enclosure);
echo "<tr>\n";
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-zzz']."\n";
echo $line_field;
echo " </td>\n";
echo " <td width='70%' class='vtable' align='left'>\n";
echo " <select class='formfld' style='' name='fields[$x]'>\n";
echo " <select class='formfld' style='' name='fields[$x]' onchange=\"document.getElementById('labels_$x').style.display = this.options[this.selectedIndex].value == 'contact_phones.phone_number' ? 'inline' : 'none';\">\n";
echo " <option value=''></option>\n";
foreach($schema as $row) {
echo " <optgroup label='".$row['table']."'>\n";
foreach($row['fields'] as $field) {
if ($field == 'phone_label') { continue; }
if ($field == 'contact_url') { continue; } // can remove this after field is removed from the table
$selected = '';
if ($field == $line_field) {
$selected = "selected='selected'";
@@ -198,8 +221,9 @@
echo " </optgroup>\n";
}
echo " </select>\n";
//echo "<br />\n";
//echo $text['description-zzz']."\n";
echo " <select class='formfld' style='display: none;' id='labels_$x' name='labels[$x]'>\n";
echo is_array($label_options) ? implode("\n", $label_options) : null;
echo " </select>\n";
echo " </td>\n";
echo "</tr>\n";
$x++;
@@ -247,12 +271,13 @@
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: extension_imports.php');
header('Location: contact_import.php');
exit;
}
//user selected fields
//user selected fields, labels
$fields = $_POST['fields'];
$labels = $_POST['labels'];
//set the domain_uuid
$domain_uuid = $_SESSION['domain_uuid'];
@@ -312,6 +337,9 @@
if ($field_name != "username" && $field_name != "group_name") {
$array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid;
$array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key];
if ($field_name == 'phone_number') {
$array[$parent][$row_id][$table_name][$y]['phone_label'] = $labels[$key];
}
}
}
@@ -337,11 +365,12 @@
}
}
}
if (is_array($array[$parent][$row_id])) { $y++; }
}
//process a chunk of the array
if ($row_id === 1000) {
//save to the data
$database = new database;
$database->app_name = 'contacts';
@@ -349,8 +378,8 @@
$database->save($array);
//clear the array
unset($array);
unset($array);
//set the row id back to 0
$row_id = 0;
}
@@ -359,6 +388,7 @@
$row_number++;
$row_id++;
} //end while
fclose($handle);
//save to the data

View File

@@ -64,6 +64,27 @@ $text['description-database_transactions']['ru-ru'] = "Изменения в б
$text['description-database_transactions']['sv-se'] = "Databas Transaktioner";
$text['description-database_transactions']['uk-ua'] = "";
$text['label-user']['en-us'] = "User";
$text['label-user']['en-gb'] = "User";
$text['label-user']['ar-eg'] = "";
$text['label-user']['de-at'] = "Benutzer"; //copied from de-de
$text['label-user']['de-ch'] = "Benutzer"; //copied from de-de
$text['label-user']['de-de'] = "Benutzer";
$text['label-user']['es-cl'] = "";
$text['label-user']['es-mx'] = "";
$text['label-user']['fr-ca'] = "Utilisateur";
$text['label-user']['fr-fr'] = "Utilisateur";
$text['label-user']['he-il'] = "";
$text['label-user']['it-it'] = "";
$text['label-user']['nl-nl'] = "Gebruiker";
$text['label-user']['pl-pl'] = "";
$text['label-user']['pt-br'] = "";
$text['label-user']['pt-pt'] = "";
$text['label-user']['ro-ro'] = "";
$text['label-user']['ru-ru'] = "Пользователь";
$text['label-user']['sv-se'] = "Användare";
$text['label-user']['uk-ua'] = "";
$text['label-user_uuid']['en-us'] = "User";
$text['label-user_uuid']['en-gb'] = "User";
$text['label-user_uuid']['ar-eg'] = "";

View File

@@ -47,7 +47,8 @@
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//add the search term
//add the user filter and search term
$user_uuid = $_GET['user_uuid'];
$search = strtolower($_GET["search"]);
if ($search != '') {
$sql_search = "and (";
@@ -62,10 +63,14 @@
}
//prepare to page the results
$sql = "select count(*) from v_database_transactions as t ";
$sql = "select count(t.database_transaction_uuid) from v_database_transactions as t ";
$sql .= "left outer join v_domains as d using (domain_uuid) ";
$sql .= "left outer join v_users as u using (user_uuid) ";
$sql .= "where t.domain_uuid = :domain_uuid ";
if (is_uuid($user_uuid)) {
$sql .= "and t.user_uuid = :user_uuid ";
$parameters['user_uuid'] = $user_uuid;
}
$sql .= $sql_search;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
@@ -81,12 +86,26 @@
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)','t.database_transaction_uuid, d.domain_name, u.username, t.user_uuid, t.app_name, t.app_uuid, t.transaction_code, t.transaction_address, t.transaction_type, t.transaction_date', $sql);
$sql = str_replace('count(t.database_transaction_uuid)','t.database_transaction_uuid, d.domain_name, u.username, t.user_uuid, t.app_name, t.app_uuid, t.transaction_code, t.transaction_address, t.transaction_type, t.transaction_date', $sql);
$sql .= order_by($order_by, $order, 't.transaction_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
unset($sql);
unset($sql, $parameters);
//get users
$sql = "select user_uuid, username from v_users ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by username ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$users[$row['user_uuid']] = $row['username'];
}
}
unset($sql, $parameters, $rows, $row);
//additional includes
$document['title'] = $text['title-database_transactions'];
@@ -97,9 +116,19 @@
echo " <div class='heading'><b>".$text['title-database_transactions']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
echo "<form id='form_search' class='inline' method='get'>\n";
if (is_array($users) && @sizeof($users) != 0) {
echo "<select class='formfld' name='user_uuid' onchange=\"document.getElementById('form_search').submit();\">\n";
echo " <option value=''>".$text['label-user']."...</option>\n";
echo " <option value=''>".$text['label-all']."</option>\n";
foreach ($users as $uuid => $username) {
$selected = $user_uuid == $uuid ? "selected='selected'" : null;
echo " <option value='".escape($uuid)."' ".$selected.">".escape($username)."</option>\n";
}
echo " </select>";
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'database_transactions.php','style'=>($search == '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','onclick'=>"document.getElementById('search').value = ''; document.getElementById('form_search').submit();",'style'=>(!$search ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}

View File

@@ -45,6 +45,29 @@
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination_number} XML \${destination_context}";
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "loopback/\${destination_number}";
$apps[$x]['destinations'][$y]['select_label'] = "\${destination_number} \${destination_description}";
/*
$y++;
$apps[$x]['destinations'][$y]['type'] = 'array';
$apps[$x]['destinations'][$y]['label'] = 'other';
$apps[$x]['destinations'][$y]['name'] = 'dialplans';
$apps[$x]['destinations'][$y]['field']['name'] = 'name';
$apps[$x]['destinations'][$y]['field']['destination'] = 'destination';
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination}";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
$apps[$x]['destinations'][$y]['select_label'] = "\${name}";
$z=0;
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'check_voicemail';
$apps[$x]['destinations'][$y]['result']['data'][$z]['destination'] = '*98 XML ${context}';
$z++;
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'company_directory';
$apps[$x]['destinations'][$y]['result']['data'][$z]['destination'] = '*411 XML ${context}';
$z++;
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'hangup';
$apps[$x]['destinations'][$y]['result']['data'][$z]['destination'] = 'hangup';
$z++;
$apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'company_directory';
$apps[$x]['destinations'][$y]['result']['data'][$z]['destination'] = '*732 XML ${context}';
*/
//permission details
$y=0;
@@ -97,13 +120,24 @@
$apps[$x]['permissions'][$y]['name'] = "destination_context";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_accountcode";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_fax";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_emergency";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "destination_destinations";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "other_destinations";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
//default settings
$y = 0;
@@ -129,7 +163,24 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "multiple";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: multiple, single";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b132ff5a-da8d-4846-b46d-2f0bfa9ae96b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "destinations";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "unique";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Require destinations to be unique true or false.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d6cf39aa-edc0-4682-9868-5f8198b3383c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "destinations";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "select_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "default";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Options: default, dynamic";
$y++;
//cache details
$apps[$x]['cache']['key'] = "dialplan.\${destination_context}";
@@ -243,6 +294,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for fax calls.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_emergency";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used to place emergency calls.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_text";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for text messages.";
@@ -264,6 +319,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the alternate data.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_order";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Set the destination order.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -39,8 +39,7 @@
if (is_array($extensions) && @sizeof($extensions) != 0) {
foreach($extensions as $row) {
$sql = "update v_destinations ";
$sql .= "set destination_app = :destination_app ";
$sql .= "destination_data = :destination_data ";
$sql .= "set destination_app = :destination_app, destination_data = :destination_data ";
$sql .= "where dialplan_uuid = :dialplan_uuid ";
$parameters['destination_app'] = $row['destination_app'];
$parameters['destination_data'] = $row['destination_data'];

View File

@@ -723,8 +723,8 @@ $text['label-destination_hold_music']['de-ch'] = "Wartemusik"; //copied from de-
$text['label-destination_hold_music']['de-de'] = "Wartemusik";
$text['label-destination_hold_music']['es-cl'] = "Música en Espera";
$text['label-destination_hold_music']['es-mx'] = "Música en Espera"; //copied from es-cl
$text['label-destination_hold_music']['fr-ca'] = "Musique de Garde"; //copied from fr-fr
$text['label-destination_hold_music']['fr-fr'] = "Musique de Garde";
$text['label-destination_hold_music']['fr-ca'] = "Musique d'attente"; //copied from fr-fr
$text['label-destination_hold_music']['fr-fr'] = "Musique d'attente";
$text['label-destination_hold_music']['he-il'] = "מוסיקה בהמתנה";
$text['label-destination_hold_music']['it-it'] = "Musica di Attesa";
$text['label-destination_hold_music']['nl-nl'] = "Wachtmuziek";
@@ -883,6 +883,27 @@ $text['label-text']['ru-ru'] = "Текст";
$text['label-text']['sv-se'] = "Text";
$text['label-text']['uk-ua'] = "Текст";
$text['label-emergency']['en-us'] = "Emergency";
$text['label-emergency']['en-gb'] = "Emergency";
$text['label-emergency']['ar-eg'] = "";
$text['label-emergency']['de-at'] = "Anruferkennung"; //copied from de-de
$text['label-emergency']['de-ch'] = "Anruferkennung";
$text['label-emergency']['de-de'] = "Notruf Anruferkennung";
$text['label-emergency']['es-cl'] = "Emergencia";
$text['label-emergency']['es-mx'] = "Emergencia"; //copied from es-cl
$text['label-emergency']['fr-ca'] = "Urgence"; //copied from fr-fr
$text['label-emergency']['fr-fr'] = "Urgence";
$text['label-emergency']['he-il'] = "";
$text['label-emergency']['it-it'] = "Emergenze";
$text['label-emergency']['nl-nl'] = "Noodnummer";
$text['label-emergency']['pl-pl'] = "Prezentacja nazwy dzwoniącego (emergency)";
$text['label-emergency']['pt-br'] = "Emergência";
$text['label-emergency']['pt-pt'] = "Emergência";
$text['label-emergency']['ro-ro'] = "";
$text['label-emergency']['ru-ru'] = "Идентификатор (Caller ID) имени экстренного вызова";
$text['label-emergency']['sv-se'] = "Nöd Namnpresentation";
$text['label-emergency']['uk-ua'] = "";
$text['header-destinations']['en-us'] = "Destinations";
$text['header-destinations']['en-gb'] = "Destinations";
$text['header-destinations']['ar-eg'] = "جهات الأتصال";

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2020
Portions created by the Initial Developer are Copyright (C) 2008-2021
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -95,6 +95,7 @@
$destination_cid_name_prefix = trim($_POST["destination_cid_name_prefix"]);
$destination_context = trim($_POST["destination_context"]);
$fax_uuid = trim($_POST["fax_uuid"]);
$destination_order= trim($_POST["destination_order"]);
$destination_enabled = trim($_POST["destination_enabled"]);
$destination_description = trim($_POST["destination_description"]);
$destination_sell = check_float($_POST["destination_sell"]);
@@ -107,6 +108,7 @@
$destination_type_voice = $_POST["destination_type_voice"];
$destination_type_fax = $_POST["destination_type_fax"];
$destination_type_text = $_POST["destination_type_text"];
$destination_type_emergency = $_POST["destination_type_emergency"];
$destination_carrier = trim($_POST["destination_carrier"]);
//get the destination app and data
@@ -161,7 +163,7 @@
if (strlen($destination_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-destination_enabled']."<br>\n"; }
//check for duplicates
if ($destination_type == 'inbound' && $destination_number != $db_destination_number) {
if ($destination_type == 'inbound' && $destination_number != $db_destination_number && $_SESSION['destinations']['unique']['boolean'] == 'true') {
$sql = "select count(*) from v_destinations ";
$sql .= "where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number) ";
$sql .= "and destination_type = 'inbound' ";
@@ -195,12 +197,12 @@
//array cleanup
if (is_array($dialplan_details)) {
foreach ($dialplan_details as $index => $row) {
//unset the empty row
if (strlen($row["dialplan_detail_data"]) == 0) {
unset($dialplan_details[$index]);
}
foreach ($dialplan_details as $index => $row) {
//unset the empty row
if (strlen($row["dialplan_detail_data"]) == 0) {
unset($dialplan_details[$index]);
}
}
}
//get the fax information
@@ -258,7 +260,21 @@
}
//convert the number to a regular expression
$destination_number_regex = string_to_regex($destination_area_code.$destination_number, $destination_prefix);
if (isset($destination_prefix) && strlen($destination_prefix) > 0) {
$destination_numbers['destination_prefix'] = $destination_prefix;
}
if (isset($destination_trunk_prefix) && strlen($destination_trunk_prefix) > 0) {
$destination_numbers['destination_trunk_prefix'] = $destination_trunk_prefix;
}
if (isset($destination_area_code) && strlen($destination_area_code) > 0) {
$destination_numbers['destination_area_code'] = $destination_area_code;
}
if (isset($destination_number) && strlen($destination_number) > 0) {
$destination_numbers['destination_number'] = $destination_number;
}
$destination = new destinations;
$destination_number_regex = $destination->to_regex($destination_numbers);
unset($destination_numbers);
//if empty then get new uuid
if (!is_uuid($dialplan_uuid)) {
@@ -281,7 +297,7 @@
$dialplan["dialplan_number"] = $destination_area_code.$destination_number;
$dialplan["dialplan_context"] = $destination_context;
$dialplan["dialplan_continue"] = "false";
$dialplan["dialplan_order"] = "100";
$dialplan["dialplan_order"] = $destination_order;
$dialplan["dialplan_enabled"] = $destination_enabled;
$dialplan["dialplan_description"] = ($dialplan_description != '') ? $dialplan_description : $destination_description;
$dialplan_detail_order = 10;
@@ -321,7 +337,7 @@
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"hold_music=".$destination_hold_music."\" inline=\"true\"/>\n";
}
if (strlen($destination_accountcode) > 0) {
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"accountcode=".$destination_accountcode."\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"accountcode=".$destination_accountcode."\" inline=\"true\"/>\n";
}
if (strlen($destination_carrier) > 0) {
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"carrier=".$destination_carrier."\" inline=\"true\"/>\n";
@@ -425,7 +441,7 @@
if (strlen($destination_accountcode) > 0) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "export";
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "accountcode=".$destination_accountcode;
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
@@ -657,6 +673,9 @@
$array['destinations'][0]["destination_type_voice"] = $destination_type_voice ? 1 : null;
$array['destinations'][0]["destination_type_fax"] = $destination_type_fax ? 1 : null;
$array['destinations'][0]["destination_type_text"] = $destination_type_text ? 1 : null;
if (permission_exists('destination_emergency')){
$array['destinations'][0]["destination_type_emergency"] = $destination_type_emergency ? 1 : null;
}
if ($destination->valid($destination_app.':'.$destination_data)) {
$array['destinations'][0]["destination_app"] = $destination_app;
$array['destinations'][0]["destination_data"] = $destination_data;
@@ -665,8 +684,10 @@
$array['destinations'][0]["destination_alternate_app"] = $destination_alternate_app;
$array['destinations'][0]["destination_alternate_data"] = $destination_alternate_data;
}
$array['destinations'][0]["destination_order"] = $destination_order;
$array['destinations'][0]["destination_enabled"] = $destination_enabled;
$array['destinations'][0]["destination_description"] = $destination_description;
//prepare the array
$array['dialplans'][] = $dialplan;
unset($dialplan);
@@ -731,6 +752,12 @@
$database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139';
$database->save($array);
$dialplan_response = $database->message;
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
}
//redirect the user
@@ -746,7 +773,7 @@
}
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
if (is_array($_GET) > 0 && $_POST["persistformvar"] != "true") {
if (is_uuid($_GET["id"])) {
$destination_uuid = $_GET["id"];
$sql = "select * from v_destinations ";
@@ -772,19 +799,21 @@
$destination_type_voice = $row["destination_type_voice"];
$destination_type_fax = $row["destination_type_fax"];
$destination_type_text = $row["destination_type_text"];
$destination_type_emergency = $row["destination_type_emergency"];
$destination_context = $row["destination_context"];
$destination_app = $row["destination_app"];
$destination_data = $row["destination_data"];
$destination_alternate_app = $row["destination_alternate_app"];
$destination_alternate_data = $row["destination_alternate_data"];
$fax_uuid = $row["fax_uuid"];
$destination_enabled = $row["destination_enabled"];
$destination_description = $row["destination_description"];
$currency = $row["currency"];
$destination_sell = $row["destination_sell"];
$destination_buy = $row["destination_buy"];
$currency_buy = $row["currency_buy"];
$destination_carrier = $row["destination_carrier"];
$destination_order = $row["destination_order"];
$destination_enabled = $row["destination_enabled"];
$destination_description = $row["destination_description"];
}
unset($sql, $parameters, $row);
}
@@ -802,7 +831,7 @@
unset($sql, $parameters);
//add an empty row to the array
$x = count($dialplan_details);
$x = (is_array($dialplan_details)) ? count($dialplan_details) : $x = 0;
$limit = $x + 1;
while($x < $limit) {
$dialplan_details[$x]['domain_uuid'] = $domain_uuid;
@@ -840,6 +869,7 @@
}
//set the defaults
if (strlen($destination_order) == 0) { $destination_order = '100'; }
if (strlen($destination_type) == 0) { $destination_type = 'inbound'; }
if (strlen($destination_context) == 0) { $destination_context = 'public'; }
if ($destination_type =="outbound") { $destination_context = $_SESSION['domain_name']; }
@@ -1098,7 +1128,7 @@
if (is_array($dialplan_details) && @sizeof($dialplan_details) != 0) {
foreach($dialplan_details as $row) {
if ($row["dialplan_detail_tag"] != "condition") {
if ($row["dialplan_detail_tag"] == "action" && $row["dialplan_detail_type"] == "set" && strpos($row["dialplan_detail_data"], "accountcode") == 0) { continue; } //exclude set:accountcode actions
if ($row["dialplan_detail_tag"] == "action" && ($row["dialplan_detail_type"] == "set" || $row["dialplan_detail_type"] == "export") && strpos($row["dialplan_detail_data"], "accountcode") == 0) { continue; } //exclude set:accountcode actions
if (strlen($row['dialplan_detail_uuid']) > 0) {
echo " <input name='dialplan_details[".$x."][dialplan_detail_uuid]' type='hidden' value=\"".escape($row['dialplan_detail_uuid'])."\">\n";
}
@@ -1201,15 +1231,17 @@
echo "</tr>\n";
}
echo "<tr id='tr_account_code'>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-account_code']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='destination_accountcode' maxlength='255' value=\"".escape($destination_accountcode)."\">\n";
echo "<br />\n";
echo $text['description-account_code']."\n";
echo "</td>\n";
if (permission_exists("destination_accountcode")) {
echo "<tr id='tr_account_code'>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-account_code']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='destination_accountcode' maxlength='255' value=\"".escape($destination_accountcode)."\">\n";
echo "<br />\n";
echo $text['description-account_code']."\n";
echo "</td>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
@@ -1218,7 +1250,10 @@
echo "<td class='vtable' align='left'>\n";
echo " <label><input type='checkbox' name='destination_type_voice' id='destination_type_voice' value='1' ".($destination_type_voice ? "checked='checked'" : null)."> ".$text['label-voice']."</label>&nbsp;\n";
echo " <label><input type='checkbox' name='destination_type_fax' id='destination_type_fax' value='1' ".($destination_type_fax ? "checked='checked'" : null)."> ".$text['label-fax']."</label>&nbsp;\n";
echo " <label><input type='checkbox' name='destination_type_text' id='destination_type_text' value='1' ".($destination_type_text ? "checked='checked'" : null)."> ".$text['label-text']."</label>\n";
echo " <label><input type='checkbox' name='destination_type_text' id='destination_type_text' value='1' ".($destination_type_text ? "checked='checked'" : null)."> ".$text['label-text']."</label>&nbsp;\n";
if (permission_exists('destination_emergency')){
echo " <label><input type='checkbox' name='destination_type_emergency' id='destination_type_emergency' value='1' ".($destination_type_emergency ? "checked='checked'" : null)."> ".$text['label-emergency']."</label>\n";
}
echo "<br />\n";
echo $text['description-usage']."\n";
echo "</td>\n";
@@ -1255,6 +1290,31 @@
echo "<input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
}
echo " <tr>\n";
echo " <td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='30%'>\n";
echo " ".$text['label-order']."\n";
echo " </td>\n";
echo " <td class='vtable' align='left' width='70%'>\n";
echo " <select name='destination_order' class='formfld'>\n";
$i=0;
while($i<=999) {
$selected = ($i == $destination_order) ? "selected" : null;
if (strlen($i) == 1) {
echo " <option value='00$i' ".$selected.">00$i</option>\n";
}
if (strlen($i) == 2) {
echo " <option value='0$i' ".$selected.">0$i</option>\n";
}
if (strlen($i) == 3) {
echo " <option value='$i' ".$selected.">$i</option>\n";
}
$i++;
}
echo " </select>\n";
echo " <br />\n";
echo " </td>\n";
echo " </tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_enabled']."\n";

View File

@@ -110,22 +110,6 @@
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$sql_search = "and (";
$sql_search .= "lower(destination_type) like :search ";
$sql_search .= "or lower(destination_number) like :search ";
$sql_search .= "or lower(destination_context) like :search ";
$sql_search .= "or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
$sql_search .= "or lower(destination_caller_id_name) like :search ";
$sql_search .= "or destination_caller_id_number like :search ";
}
$sql_search .= "or lower(destination_enabled) like :search ";
$sql_search .= "or lower(destination_description) like :search ";
$sql_search .= "or lower(destination_data) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
//prepare to page the results
$sql = "select count(*) from v_destinations ";
@@ -134,7 +118,22 @@
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $domain_uuid;
}
$sql .= $sql_search;
if (strlen($search) > 0) {
$sql .= "and (";
$sql .= "lower(destination_type) like :search ";
$sql .= "or lower(destination_number) like :search ";
$sql .= "or lower(destination_context) like :search ";
$sql .= "or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
$sql .= "or lower(destination_caller_id_name) like :search ";
$sql .= "or destination_caller_id_number like :search ";
}
$sql .= "or lower(destination_enabled) like :search ";
$sql .= "or lower(destination_description) like :search ";
$sql .= "or lower(destination_data) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$parameters['destination_type'] = $destination_type;
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
@@ -152,8 +151,29 @@
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)', '*', $sql);
$sql .= order_by($order_by, $order, 'destination_number', 'asc');
$sql = "select * from v_destinations ";
$sql .= "where destination_type = :destination_type ";
if ($_GET['show'] != "all" || !permission_exists('destination_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $domain_uuid;
}
if (strlen($search) > 0) {
$sql .= "and (";
$sql .= "lower(destination_type) like :search ";
$sql .= "or lower(destination_number) like :search ";
$sql .= "or lower(destination_context) like :search ";
$sql .= "or lower(destination_accountcode) like :search ";
if (permission_exists('outbound_caller_id_select')) {
$sql .= "or lower(destination_caller_id_name) like :search ";
$sql .= "or destination_caller_id_number like :search ";
}
$sql .= "or lower(destination_enabled) like :search ";
$sql .= "or lower(destination_description) like :search ";
$sql .= "or lower(destination_data) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, 'destination_number, destination_order ', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$destinations = $database->select($sql, $parameters, 'all');

View File

@@ -78,6 +78,84 @@ if (!class_exists('destinations')) {
}
}
/**
* Convert destination number to a regular expression
* @var string $array destination_prefix, destination_trunk_prefix, destination_area_code, destination_number
*/
public function to_regex($array) {
if (isset($array['destination_prefix']) && isset($array['destination_trunk_prefix']) && isset($array['destination_area_code']) && isset($array['destination_number'])) {
$destination_regex = "(\+?".$array['destination_prefix'].$array['destination_area_code'].$array['destination_number']."\$|";
$destination_regex .= "^".$array['destination_trunk_prefix'].$array['destination_area_code'].$array['destination_number']."\$|";
$destination_regex .= "^".$array['destination_area_code'].$array['destination_number']."\$|";
$destination_regex .= "^".$array['destination_number']."\$)";
}
elseif (isset($array['destination_prefix']) && isset($array['destination_area_code']) && isset($array['destination_number'])) {
$destination_regex = "(\+?".$array['destination_prefix'].$array['destination_area_code'].$array['destination_number']."\$|";
$destination_regex .= "^".$array['destination_area_code'].$array['destination_number']."\$|";
$destination_regex .= "^".$array['destination_number']."\$)";
}
elseif ((isset($array['destination_prefix']) && isset($array['destination_number'])) || isset($array['destination_number'])) {
//set the variables
$destination_prefix = $array['destination_prefix'];
$destination_number = $array['destination_number'];
$destination_regex = $array['destination_number'];
//escape the plus
if (substr($destination_number, 0, 1) == "+") {
$destination_regex = "^\\+(".substr($destination_number, 1).")$";
}
//add prefix
if (strlen($destination_prefix) > 0) {
if (strlen($destination_prefix) > 0 && strlen($destination_prefix) < 4) {
$plus = (substr($destination_prefix, 0, 1) == "+") ? '' : '\+?';
$destination_prefix = $plus.$destination_prefix.'?';
}
else {
$destination_prefix = '(?:'.$destination_prefix.')?';
}
}
//convert N,X,Z syntax to regex
$destination_regex = str_ireplace("N", "[2-9]", $destination_regex);
$destination_regex = str_ireplace("X", "[0-9]", $destination_regex);
$destination_regex = str_ireplace("Z", "[1-9]", $destination_regex);
//add ^ to the start of the string if missing
if (substr($destination_regex, 0, 1) != "^") {
$destination_regex = "^".$destination_regex;
}
//add $ to the end of the string if missing
if (substr($destination_regex, -1) != "$") {
$destination_regex = $destination_regex."$";
}
//add the round brackets
if (!strstr($destination_regex, '(')) {
if (strstr($destination_regex, '^')) {
$destination_regex = str_replace("^", "^".$destination_prefix."(", $destination_regex);
}
else {
$destination_regex = '^('.$destination_regex;
}
if (strstr($destination_regex, '$')) {
$destination_regex = str_replace("$", ")$", $destination_regex);
}
else {
$destination_regex = $destination_regex.')$';
}
}
}
return $destination_regex;
}
/**
* Build the destination select list
* @var string $destination_type can be ivr, dialplan, call_center_contact or bridge
@@ -96,247 +174,358 @@ if (!class_exists('destinations')) {
$database = new database;
$this->domain_name = $database->select($sql, $parameters, 'column');
//get the destinations
if (!is_array($this->destinations)) {
//create a single destination select list
if ($_SESSION['destinations']['select_mode']['text'] == 'default') {
//get the destinations
if (!is_array($this->destinations)) {
//get the array from the app_config.php files
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as &$config_path) {
include($config_path);
$x++;
}
$i = 0;
foreach ($apps as $x => &$app) {
if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) {
if (permission_exists($this->singular($row["name"])."_destinations")) {
$this->destinations[] = $row;
}
}
}
//put the array in order
if ($this->destinations !== null && is_array($this->destinations)) {
foreach ($this->destinations as $row) {
$option_groups[] = $row['label'];
}
array_multisort($option_groups, SORT_ASC, $this->destinations);
}
//add the sql and data to the array
if ($this->destinations !== null && is_array($this->destinations)) {
//get the array from the app_config.php files
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($this->destinations as $row) {
if ($row['type'] === 'sql') {
$table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']);
if (isset($row['sql'])) {
if (is_array($row['sql'])) {
$sql = trim($row['sql'][$db_type])." ";
}
else {
$sql = trim($row['sql'])." ";
}
}
else {
$field_count = count($row['field']);
$fields = '';
$c = 1;
foreach ($row['field'] as $key => $value) {
$key = preg_replace('#[^a-zA-Z0-9_]#', '', $key);
$value = preg_replace('#[^a-zA-Z0-9_]#', '', $value);
if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; }
$fields .= $value." as ".$key.$delimiter." ";
$c++;
}
$sql = "select ".$fields;
$sql .= " from v_".$table_name." ";
}
if (isset($row['where'])) {
$sql .= trim($row['where'])." ";
}
$sql .= "order by ".trim($row['order_by']);
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
$database = new database;
$result = $database->select($sql, null, 'all');
$this->destinations[$x]['result']['sql'] = $sql;
$this->destinations[$x]['result']['data'] = $result;
foreach ($config_list as &$config_path) {
try {
include($config_path);
}
if ($row['type'] === 'array') {
$this->destinations[$x] = $row;
catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
$x++;
}
}
$this->destinations[$x]['type'] = 'array';
$this->destinations[$x]['label'] = 'other';
$this->destinations[$x]['name'] = 'dialplans';
$this->destinations[$x]['field']['name'] = "name";
$this->destinations[$x]['field']['destination'] = "destination";
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
$this->destinations[$x]['select_label'] = "\${name}";
$y = 0;
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
$y++;
}
//remove special characters from the name
$destination_id = str_replace("]", "", $destination_name);
$destination_id = str_replace("[", "_", $destination_id);
//set the css style
$select_style = 'width: 200px;';
//add additional
if (if_group("superadmin")) {
$response = "<script>\n";
$response .= "var Objs;\n";
$response .= "\n";
$response .= "function changeToInput".$destination_id."(obj){\n";
$response .= " tb=document.createElement('INPUT');\n";
$response .= " tb.type='text';\n";
$response .= " tb.name=obj.name;\n";
$response .= " tb.className='formfld';\n";
$response .= " tb.setAttribute('id', '".$destination_id."');\n";
$response .= " tb.setAttribute('style', '".$select_style."');\n";
if ($onchange != '') {
$response .= " tb.setAttribute('onchange', \"".$onchange."\");\n";
$response .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n";
}
$response .= " tb.value=obj.options[obj.selectedIndex].value;\n";
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n";
$response .= " tbb=document.createElement('INPUT');\n";
$response .= " tbb.setAttribute('class', 'btn');\n";
$response .= " tbb.setAttribute('style', 'margin-left: 4px;');\n";
$response .= " tbb.type='button';\n";
$response .= " tbb.value=$('<div />').html('&#9665;').text();\n";
$response .= " tbb.objs=[obj,tb,tbb];\n";
$response .= " tbb.onclick=function(){ Replace".$destination_id."(this.objs); }\n";
$response .= " obj.parentNode.insertBefore(tb,obj);\n";
$response .= " obj.parentNode.insertBefore(tbb,obj);\n";
$response .= " obj.parentNode.removeChild(obj);\n";
$response .= " Replace".$destination_id."(this.objs);\n";
$response .= "}\n";
$response .= "\n";
$response .= "function Replace".$destination_id."(obj){\n";
$response .= " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
$response .= " obj[0].parentNode.removeChild(obj[1]);\n";
$response .= " obj[0].parentNode.removeChild(obj[2]);\n";
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n";
if ($onchange != '') {
$response .= " ".$onchange.";\n";
}
$response .= "}\n";
$response .= "</script>\n";
$response .= "\n";
}
//set default to false
$select_found = false;
$response .= " <select name='".$destination_name."' id='".$destination_id."' class='formfld' style='".$select_style."' onchange=\"".$onchange."\">\n";
$response .= " <option value=''></option>\n";
foreach ($this->destinations as $row) {
$name = $row['name'];
$label = $row['label'];
$destination = $row['field']['destination'];
//add multi-lingual support
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
$language2 = new text;
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
}
if (is_array($row['result']['data']) && count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
$label2 = $label;
foreach ($row['result']['data'] as $data) {
$select_value = $row['select_value'][$destination_type];
$select_label = $row['select_label'];
foreach ($row['field'] as $key => $value) {
if ($key == 'destination' and is_array($value)){
if ($value['type'] === 'csv') {
$array = explode($value['delimiter'], $data[$key]);
$select_value = str_replace("\${destination}", $array[0], $select_value);
$select_label = str_replace("\${destination}", $array[0], $select_label);
}
$i = 0;
foreach ($apps as $x => &$app) {
if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) {
if (permission_exists($this->singular($row["name"])."_destinations")) {
$this->destinations[] = $row;
}
else {
if (strpos($value,',') !== false) {
$keys = explode(",", $value);
foreach ($keys as $k) {
if (strlen($data[$k]) > 0) {
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
if (strlen($data['label']) == 0) {
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
}
else {
$label = $data['label'];
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
}
}
}
}
//put the array in order
if ($this->destinations !== null && is_array($this->destinations)) {
foreach ($this->destinations as $row) {
$option_groups[] = $row['label'];
}
array_multisort($option_groups, SORT_ASC, $this->destinations);
}
//add the sql and data to the array
if ($this->destinations !== null && is_array($this->destinations)) {
$x = 0;
foreach ($this->destinations as $row) {
if ($row['type'] === 'sql') {
$table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']);
if (isset($row['sql'])) {
if (is_array($row['sql'])) {
$sql = trim($row['sql'][$db_type])." ";
}
else {
$sql = trim($row['sql'])." ";
}
}
else {
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
if (strlen($data['label']) == 0) {
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
$field_count = count($row['field']);
$fields = '';
$c = 1;
foreach ($row['field'] as $key => $value) {
$key = preg_replace('#[^a-zA-Z0-9_]#', '', $key);
$value = preg_replace('#[^a-zA-Z0-9_]#', '', $value);
if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; }
$fields .= $value." as ".$key.$delimiter." ";
$c++;
}
$sql = "select ".$fields;
$sql .= " from v_".$table_name." ";
}
if (isset($row['where'])) {
$sql .= trim($row['where'])." ";
}
$sql .= "order by ".trim($row['order_by']);
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
$database = new database;
$result = $database->select($sql, null, 'all');
$this->destinations[$x]['result']['sql'] = $sql;
$this->destinations[$x]['result']['data'] = $result;
}
if ($row['type'] === 'array') {
$this->destinations[$x] = $row;
}
$x++;
}
}
$this->destinations[$x]['type'] = 'array';
$this->destinations[$x]['label'] = 'other';
$this->destinations[$x]['name'] = 'dialplans';
$this->destinations[$x]['field']['name'] = "name";
$this->destinations[$x]['field']['destination'] = "destination";
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
$this->destinations[$x]['select_label'] = "\${name}";
$y = 0;
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
$y++;
}
//remove special characters from the name
$destination_id = str_replace("]", "", $destination_name);
$destination_id = str_replace("[", "_", $destination_id);
//set the css style
$select_style = 'width: 200px;';
//add additional
if (if_group("superadmin")) {
$response = "<script>\n";
$response .= "var Objs;\n";
$response .= "\n";
$response .= "function changeToInput".$destination_id."(obj){\n";
$response .= " tb=document.createElement('INPUT');\n";
$response .= " tb.type='text';\n";
$response .= " tb.name=obj.name;\n";
$response .= " tb.className='formfld';\n";
$response .= " tb.setAttribute('id', '".$destination_id."');\n";
$response .= " tb.setAttribute('style', '".$select_style."');\n";
if ($onchange != '') {
$response .= " tb.setAttribute('onchange', \"".$onchange."\");\n";
$response .= " tb.setAttribute('onkeyup', \"".$onchange."\");\n";
}
$response .= " tb.value=obj.options[obj.selectedIndex].value;\n";
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'hidden';\n";
$response .= " tbb=document.createElement('INPUT');\n";
$response .= " tbb.setAttribute('class', 'btn');\n";
$response .= " tbb.setAttribute('style', 'margin-left: 4px;');\n";
$response .= " tbb.type='button';\n";
$response .= " tbb.value=$('<div />').html('&#9665;').text();\n";
$response .= " tbb.objs=[obj,tb,tbb];\n";
$response .= " tbb.onclick=function(){ Replace".$destination_id."(this.objs); }\n";
$response .= " obj.parentNode.insertBefore(tb,obj);\n";
$response .= " obj.parentNode.insertBefore(tbb,obj);\n";
$response .= " obj.parentNode.removeChild(obj);\n";
$response .= " Replace".$destination_id."(this.objs);\n";
$response .= "}\n";
$response .= "\n";
$response .= "function Replace".$destination_id."(obj){\n";
$response .= " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
$response .= " obj[0].parentNode.removeChild(obj[1]);\n";
$response .= " obj[0].parentNode.removeChild(obj[2]);\n";
$response .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n";
if ($onchange != '') {
$response .= " ".$onchange.";\n";
}
$response .= "}\n";
$response .= "</script>\n";
$response .= "\n";
}
//set default to false
$select_found = false;
$response .= " <select name='".$destination_name."' id='".$destination_id."' class='formfld' style='".$select_style."' onchange=\"".$onchange."\">\n";
$response .= " <option value=''></option>\n";
foreach ($this->destinations as $row) {
$name = $row['name'];
$label = $row['label'];
$destination = $row['field']['destination'];
//add multi-lingual support
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) {
$language2 = new text;
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
}
if (is_array($row['result']['data']) && count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
$label2 = $label;
foreach ($row['result']['data'] as $data) {
$select_value = $row['select_value'][$destination_type];
$select_label = $row['select_label'];
foreach ($row['field'] as $key => $value) {
if ($key == 'destination' and is_array($value)){
if ($value['type'] === 'csv') {
$array = explode($value['delimiter'], $data[$key]);
$select_value = str_replace("\${destination}", $array[0], $select_value);
$select_label = str_replace("\${destination}", $array[0], $select_label);
}
}
else {
if (strpos($value,',') !== false) {
$keys = explode(",", $value);
foreach ($keys as $k) {
if (strlen($data[$k]) > 0) {
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
if (strlen($data['label']) == 0) {
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
}
else {
$label = $data['label'];
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
}
}
}
}
else {
$label = $data['label'];
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
if (strlen($data['label']) == 0) {
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
}
else {
$label = $data['label'];
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
}
}
//application: hangup
if (strlen($data['application']) > 0) {
$select_value = str_replace("transfer", $data['application'], $select_value);
}
}
//application: hangup
if (strlen($data['application']) > 0) {
$select_value = str_replace("transfer", $data['application'], $select_value);
}
}
}
$select_value = str_replace("\${domain_name}", $this->domain_name, $select_value);
$select_value = str_replace("\${context}", $this->domain_name, $select_value);
$select_label = str_replace("\${domain_name}", $this->domain_name, $select_label);
$select_label = str_replace("\${context}", $this->domain_name, $select_label);
$select_label = str_replace("&#9993", 'email-icon', $select_label);
$select_label = escape(trim($select_label));
$select_label = str_replace('email-icon', '&#9993', $select_label);
if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; }
if ($label2 == 'destinations') { $select_label = format_phone($select_label); }
$response .= " <option value='".escape($select_value)."' ".$selected.">".$select_label."</option>\n";
$select_value = str_replace("\${domain_name}", $this->domain_name, $select_value);
$select_value = str_replace("\${context}", $this->domain_name, $select_value);
$select_label = str_replace("\${domain_name}", $this->domain_name, $select_label);
$select_label = str_replace("\${context}", $this->domain_name, $select_label);
$select_label = str_replace("&#9993", 'email-icon', $select_label);
$select_label = escape(trim($select_label));
$select_label = str_replace('email-icon', '&#9993', $select_label);
if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; }
if ($label2 == 'destinations') { $select_label = format_phone($select_label); }
$response .= " <option value='".escape($select_value)."' ".$selected.">".$select_label."</option>\n";
}
$response .= " </optgroup>\n";
unset($text);
}
$response .= " </optgroup>\n";
unset($text);
}
if (!$select_found) {
$destination_label = str_replace(":", " ", $destination_value);
$destination_label = str_replace("menu-exec-app", "", $destination_label);
$destination_label = str_replace("transfer", "", $destination_label);
$destination_label = str_replace("XML ".$this->domain_name, "", $destination_label);
if ($destination_value != '' || $destination_label != '') {
$response .= " <option value='".escape($destination_value)."' selected='selected'>".trim($destination_label)."</option>\n";
}
}
$response .= " </select>\n";
if (if_group("superadmin")) {
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='&#9665;'>";
}
}
if (!$select_found) {
$destination_label = str_replace(":", " ", $destination_value);
$destination_label = str_replace("menu-exec-app", "", $destination_label);
$destination_label = str_replace("transfer", "", $destination_label);
$destination_label = str_replace("XML ".$this->domain_name, "", $destination_label);
if ($destination_value != '' || $destination_label != '') {
$response .= " <option value='".escape($destination_value)."' selected='selected'>".trim($destination_label)."</option>\n";
//create a dynamic destination select list
if ($_SESSION['destinations']['select_mode']['text'] == 'dynamic') {
//remove special characters from the name
$destination_id = str_replace("]", "", $destination_name);
$destination_id = str_replace("[", "_", $destination_id);
//$destination_id = preg_replace('/[^a-zA-Z_,.]/', '', $destination_name);
?>
<script type="text/javascript">
function get_destinations(id, destination_type, action, search) {
//alert(action);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById(id).innerHTML = this.responseText;
}
};
if (action) {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type+"&action="+action, true);
}
else {
xhttp.open("GET", "/app/destinations/resources/destinations.php?destination_type="+destination_type, true);
}
xhttp.send();
}
</script>
<?php
//get the destinations
$destination = new destinations;
if (!isset($_SESSION['destinations']['array'][$destination_type])) {
$_SESSION['destinations']['array'][$destination_type] = $destination->get($destination_type);
}
}
$response .= " </select>\n";
if (if_group("superadmin")) {
$response .= "<input type='button' id='btn_select_to_input_".$destination_id."' class='btn' name='' alt='back' onclick='changeToInput".$destination_id."(document.getElementById(\"".$destination_id."\"));this.style.visibility = \"hidden\";' value='&#9665;'>";
//get the destination label
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
foreach($value as $k => $row) {
if ($destination_value == $row['destination']) {
$destination_key = $key;
$destination_label = $row['label'];
break;
}
}
}
//add the language object
$language2 = new text;
//build the destination select list in html
$response .= " <select id='{$destination_id}_type' class='formfld' style='".$select_style."' onchange=\"get_destinations('".$destination_id."', '".$destination_type."', this.value);\">\n";
$response .= " <option value=''></option>\n";
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
$singular = $this->singular($key);
if (permission_exists("{$singular}_destinations")) {
//determine if selected
$selected = ($key == $destination_key) ? "selected='selected'" : '';
//add multi-lingual support
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$key."/app_languages.php")) {
$language2 = new text;
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$key);
$found = 'true';
}
if ($key == 'other') {
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/dialplans');
}
//add the application to the select list
$response .= " <option id='{$singular}' class='{$key}' value='".$key."' $selected>".$text2['title-'.$key]."</option>\n";
}
}
$response .= " </select>\n";
$response .= " <select id='".$destination_id."' name='".$destination_name."' class='formfld' style='".$select_style."'>\n";
foreach($_SESSION['destinations']['array'][$destination_type] as $key => $value) {
if ($key == $destination_key) {
foreach($value as $k => $row) {
$selected = ($row['destination'] == $destination_value) ? "selected='selected'" : '';
$uuid = isset($row[$this->singular($key).'_uuid']) ? $row[$this->singular($key).'_uuid'] : $row['uuid'];
$response .= " <option id='{$uuid}' value='".$row['destination']."' $selected>".$row['label']."</option>\n";
}
}
}
$response .= " </select>";
$response .= button::create([
'type'=>'button',
'icon'=>'external-link-alt',
'id'=>'btn_dest_go',
'title'=>$text['label-edit'],
'onclick'=>"let types = document.getElementById('{$destination_id}_type').options; let opts = document.getElementById('{$destination_id}').options; if(opts[opts.selectedIndex].id && opts[opts.selectedIndex].id.length > 0) {window.open('/app/'+types[types.selectedIndex].className+'/'+types[types.selectedIndex].id+'_edit.php?id='+opts[opts.selectedIndex].id, '_blank');}"
])."\n";
//debug information
//echo $response;
//echo "destination_key $destination_key\n";
//echo "destination_id $destination_id\n";
//echo "destination_type $destination_type\n";
//echo "destination_name $destination_name\n";
//echo "destination_value $destination_value\n";
//exit;
}
//return the formatted destinations
@@ -366,7 +555,12 @@ if (!class_exists('destinations')) {
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as &$config_path) {
include($config_path);
try {
include($config_path);
}
catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
$x++;
}
$i = 0;
@@ -436,22 +630,18 @@ if (!class_exists('destinations')) {
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
$this->destinations[$x]['select_label'] = "\${name}";
$y = 0;
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
$y=0;
$this->destinations[$x]['result']['data'][$y]['name'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
$this->destinations[$x]['result']['data'][$y]['name'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
$this->destinations[$x]['result']['data'][$y]['name'] = 'record';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
$y++;
}
@@ -570,7 +760,12 @@ if (!class_exists('destinations')) {
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as &$config_path) {
include($config_path);
try {
include($config_path);
}
catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
$x++;
}
$i = 0;
@@ -628,40 +823,39 @@ if (!class_exists('destinations')) {
$this->destinations[$x]['result']['data'] = $result;
}
if ($row['type'] === 'array') {
$this->destinations[$x] = $row['result']['data'];
$this->destinations[$x] = $row;
}
$x++;
}
$this->destinations[$x]['type'] = 'array';
$this->destinations[$x]['label'] = 'other';
$this->destinations[$x]['name'] = 'dialplans';
$this->destinations[$x]['name'] = 'other';
$this->destinations[$x]['field']['label'] = "label";
$this->destinations[$x]['field']['name'] = "name";
$this->destinations[$x]['field']['extension'] = "extension";
$this->destinations[$x]['field']['destination'] = "destination";
$this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}";
$this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}";
$this->destinations[$x]['select_label'] = "\${name}";
$y = 0;
$this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['name'] = '*98';
$this->destinations[$x]['result']['data'][$y]['name'] = 'check_voicemail';
$this->destinations[$x]['result']['data'][$y]['extension'] = '*98';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['name'] = '*411';
$this->destinations[$x]['result']['data'][$y]['name'] = 'company_directory';
$this->destinations[$x]['result']['data'][$y]['extension'] = '*411';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['name'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['application'] = 'hangup';
$this->destinations[$x]['result']['data'][$y]['destination'] = '';
$y++;
$this->destinations[$x]['result']['data'][$y]['label'] = 'record';
$this->destinations[$x]['result']['data'][$y]['name'] = '*732';
$this->destinations[$x]['result']['data'][$y]['name'] = 'record';
$this->destinations[$x]['result']['data'][$y]['extension'] = '*732';
$this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}';
$y++;
}
//remove special characters from the name
@@ -684,11 +878,12 @@ if (!class_exists('destinations')) {
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
}
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
if (is_array($row['result']['data']) && strlen($row['select_value'][$destination_type]) > 0) {
$label2 = $label;
foreach ($row['result']['data'] as $data) {
$select_value = $row['select_value'][$destination_type];
$select_label = $row['select_label'];
//echo $select_label." ".__line__." ".$name."<br />\n";
foreach ($row['field'] as $key => $value) {
if ($key == 'destination' and is_array($value)) {
if ($value['type'] == 'csv') {
@@ -730,6 +925,12 @@ if (!class_exists('destinations')) {
}
}
//view_array($data, false);
//echo "name ".$name."\n";
//echo "select_value ".$select_value."\n";
//echo "select_label ".$select_label."\n";
//echo "\n";
$select_value = str_replace("\${domain_name}", $this->domain_name, $select_value);
$select_value = str_replace("\${context}", $this->domain_name, $select_value);
$select_label = str_replace("\${domain_name}", $this->domain_name, $select_label);
@@ -751,10 +952,12 @@ if (!class_exists('destinations')) {
$i++;
}
$i = 0;
unset($text);
}
}
if (!$selected) {
$destination_label = str_replace(":", " ", $destination_value);
$destination_label = str_replace("menu-exec-app", "", $destination_label);
@@ -767,7 +970,7 @@ if (!class_exists('destinations')) {
//$array[$name][$i]['select_name'] = $select_name;
//$array[$name][$i]['select_value'] = $select_value;
$array[$name][$i]['destination'] = $destination_value;
$i++;
}
@@ -869,6 +1072,11 @@ if (!class_exists('destinations')) {
}
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);

View File

@@ -0,0 +1,62 @@
<?php
//includes
include_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('destination_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//get the action
$action = $_REQUEST['action'];
$destination_type = $_REQUEST['destination_type'];
//sanitize the variables
$action = preg_replace('#[^a-zA-Z0-9_\-]#', '', $action);
$destination_type = preg_replace('#[^a-zA-Z0-9_\-]#', '', $destination_type);
//get the destinations
$destination = new destinations;
$destinations = $destination->get($destination_type);
//show the select
echo " <select name='subaction' id='action' class='formfld' style='".$select_style."'>\n";
echo " <option value=''></option>\n";
foreach($destinations as $key => $rows) {
$singular = $destination->singular($key);
if ($key == $action && permission_exists("{$singular}_destinations")) {
if (is_array($rows)) {
foreach($rows as $row) {
//set the variables
$select_label = $row['label'];
$select_value = $row['destination'];
//update the select values
$select_value = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_value);
$select_value = str_replace("\${context}", $_SESSION['domain_name'], $select_value);
$select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label);
$select_label = str_replace("\${context}", $_SESSION['domain_name'], $select_label);
$select_label = str_replace('&low_bar;', '_', $select_label);
$select_label = str_replace("&#9993", 'email-icon', $select_label);
//$select_label = escape(trim($select_label));
$select_label = str_replace('email-icon', '&#9993', $select_label);
//add the select option
$uuid = isset($row[$singular.'_uuid']) ? $row[$singular.'_uuid'] : $row['uuid'];
echo " <option id='{$uuid}' value='".$select_value."'>".$select_label."</option>\n";
}
}
}
}
echo " </select>\n";
?>

View File

@@ -0,0 +1,90 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>

View File

@@ -2152,6 +2152,13 @@
$vendors[$y]['functions'][$z]['value'] = "none";
$vendors[$y]['functions'][$z]['groups'][] = "superadmin";
$vendors[$y]['functions'][$z]['groups'][] = "admin";
$z++;
$vendors[$y]['functions'][$z]['uuid'] = "5fab2239-b72c-404a-a392-251e22770ec5";
$vendors[$y]['functions'][$z]['label'] = "label-phonebook";
$vendors[$y]['functions'][$z]['name'] = "phonebook";
$vendors[$y]['functions'][$z]['value'] = "phonebook";
$vendors[$y]['functions'][$z]['groups'][] = "superadmin";
$vendors[$y]['functions'][$z]['groups'][] = "admin";
//mitel
$y++;
$vendors[$y]['uuid'] = "03931359-917e-455b-b4fc-f875c530b79c";

View File

@@ -1650,8 +1650,8 @@ $text['label-keys']['de-ch'] = "Tasten"; //copied from de-de
$text['label-keys']['de-de'] = "Tasten";
$text['label-keys']['es-cl'] = "Claves";
$text['label-keys']['es-mx'] = "Claves"; //copied from es-cl
$text['label-keys']['fr-ca'] = "Clés"; //copied from fr-fr
$text['label-keys']['fr-fr'] = "Clés";
$text['label-keys']['fr-ca'] = "Touches"; //copied from fr-fr
$text['label-keys']['fr-fr'] = "Touches";
$text['label-keys']['he-il'] = "";
$text['label-keys']['it-it'] = "Tasti";
$text['label-keys']['nl-nl'] = "Toetsen";
@@ -4583,6 +4583,27 @@ $text['label-custom']['ru-ru'] = "";
$text['label-custom']['sv-se'] = "";
$text['label-custom']['uk-ua'] = "";
$text['label-fields']['en-us'] = "Fields";
$text['label-fields']['en-gb'] = "Fields";
$text['label-fields']['ar-eg'] = "Fields";
$text['label-fields']['de-at'] = "Fields";
$text['label-fields']['de-ch'] = "Fields";
$text['label-fields']['de-de'] = "Fields";
$text['label-fields']['es-cl'] = "Fields";
$text['label-fields']['es-mx'] = "Fields";
$text['label-fields']['fr-ca'] = "Fields";
$text['label-fields']['fr-fr'] = "Fields";
$text['label-fields']['he-il'] = "Fields";
$text['label-fields']['it-it'] = "Fields";
$text['label-fields']['nl-nl'] = "Fields";
$text['label-fields']['pl-pl'] = "Fields";
$text['label-fields']['pt-br'] = "Fields";
$text['label-fields']['pt-pt'] = "Fields";
$text['label-fields']['ro-ro'] = "Fields";
$text['label-fields']['ru-ru'] = "Fields";
$text['label-fields']['sv-se'] = "Fields";
$text['label-fields']['uk-ua'] = "Fields";
$text['header-device_import']['en-us'] = "Device Import";
$text['header-device_import']['en-gb'] = "Device Import";
$text['header-device_import']['ar-eg'] = "";
@@ -4713,6 +4734,29 @@ $text['header-device']['ru-ru'] = "Устройство";
$text['header-device']['sv-se'] = "Enhet";
$text['header-device']['uk-ua'] = "";
$text['description-device_export']['en-us'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['en-gb'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['ar-eg'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['de-at'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['de-ch'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['de-de'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['ek-gr'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['es-cl'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['es-mx'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['fr-ca'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['fr-fr'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['he-il'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['it-it'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['nl-nl'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['pl-pl'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['pt-br'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['pt-pt'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['ro-ro'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['ru-ru'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['sv-se'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['uk-ua'] = "Select the fields you wish to include in the export.";
$text['description-device_export']['tr-tr'] = "Select the fields you wish to include in the export.";
$text['description-user']['en-us'] = "Assign a user to this device.";
$text['description-user']['en-gb'] = "Assign a user to this device.";
$text['description-user']['ar-eg'] = "";

View File

@@ -41,7 +41,6 @@ else {
//set the variables
$cmd = check_str($_GET['cmd']);
$rdr = check_str($_GET['rdr']);
$profile = check_str($_GET['profile']);
$domain = check_str($_GET['domain']);
$show = check_str($_GET['show']);
$user = check_str($_GET['user']);
@@ -51,26 +50,39 @@ else {
//create the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
// Get the SIP profiles for the user
$command = "sofia_contact */{$user}";
$contact_string = event_socket_request($fp, "api ".$command);
// The first value in the array will be full matching text, the second one will be the array of profile matches
preg_match_all('/sofia\/([^,]+)\/(?:[^,]+)/', $contact_string, $matches);
if (sizeof($matches) != 2 || sizeof($matches[1]) < 1) {
$profiles = array("internal");
} else {
// We have at least one profile, get all of the unique profiles
$profiles = array_unique($matches[1]);
}
//prepare the command
foreach ($profiles as $profile) {
//prepare the command
if ($cmd == "unregister") {
$command = "sofia profile ".$profile." flush_inbound_reg ".$user." reboot";
$command = "sofia profile {$profile} flush_inbound_reg {$user} reboot";
}
else {
$command = "lua app.lua event_notify ".$profile." ".$cmd." ".$user." ".$vendor;
$command = "lua app.lua event_notify {$profile} {$cmd} {$user} {$vendor}";
//if ($cmd == "check_sync") {
// $command = "sofia profile ".$profile." check_sync ".$user;
//}
}
//send the command
$response = event_socket_request($fp, "api ".$command);
$response = event_socket_request($fp, "api log notice ".$command);
//send the command
$response = event_socket_request($fp, "api {$command}");
event_socket_request($fp, "api log notice {$command}");
//show the response
//show the response
message::add($text['label-event']." ".ucwords($cmd)."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$text['label-response'].htmlentities($response));
}
//close the connection
fclose($fp);
fclose($fp);
}
//redirect the user

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2016
Portions created by the Initial Developer are Copyright (C) 2008-2020
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -28,7 +28,6 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
//check permissions
if (permission_exists('device_export')) {
@@ -75,14 +74,40 @@
header("Content-Transfer-Encoding: binary");
}
//define possible columns in the array
$available_columns[] = 'device_uuid';
$available_columns[] = 'domain_uuid';
$available_columns[] = 'device_mac_address';
$available_columns[] = 'device_label';
$available_columns[] = 'device_template';
$available_columns[] = 'device_description';
$available_columns['devices'][] = 'device_uuid';
$available_columns['devices'][] = 'device_profile_uuid';
$available_columns['devices'][] = 'device_mac_address';
$available_columns['devices'][] = 'device_label';
$available_columns['devices'][] = 'device_vendor';
$available_columns['devices'][] = 'device_template';
$available_columns['devices'][] = 'device_enabled_date';
$available_columns['devices'][] = 'device_username';
$available_columns['devices'][] = 'device_password';
$available_columns['devices'][] = 'device_uuid_alternate';
$available_columns['devices'][] = 'device_provisioned_date';
$available_columns['devices'][] = 'device_provisioned_method';
$available_columns['devices'][] = 'device_provisioned_ip';
$available_columns['devices'][] = 'device_enabled';
$available_columns['devices'][] = 'device_description';
$available_columns['device_lines'][] = 'device_line_uuid';
$available_columns['device_lines'][] = 'device_uuid';
$available_columns['device_lines'][] = 'line_number';
$available_columns['device_lines'][] = 'server_address';
$available_columns['device_lines'][] = 'server_address_primary';
$available_columns['device_lines'][] = 'server_address_secondary';
$available_columns['device_lines'][] = 'outbound_proxy_primary';
$available_columns['device_lines'][] = 'outbound_proxy_secondary';
$available_columns['device_lines'][] = 'display_name';
$available_columns['device_lines'][] = 'user_id';
$available_columns['device_lines'][] = 'auth_id';
$available_columns['device_lines'][] = 'password';
$available_columns['device_lines'][] = 'sip_port';
$available_columns['device_lines'][] = 'sip_transport';
$available_columns['device_lines'][] = 'register_expires';
$available_columns['device_lines'][] = 'shared_line';
$available_columns['device_lines'][] = 'enabled';
//get the devices and send them as output
$column_group = $_REQUEST["column_group"];
@@ -96,23 +121,56 @@
exit;
}
//validate table names
foreach($column_group as $table_name => $columns) {
if (!isset($available_columns[$table_name])) {
unset($column_group[$table_name]);
}
}
//validate columns
foreach ($column_group as $index => $column_name) {
if (!in_array($column_name, $available_columns)) {
unset($column_group[$index]);
foreach($column_group as $table_name => $columns) {
foreach ($columns as $column_name) {
if (!in_array($column_name, $available_columns[$table_name])) {
unset($column_group[$table_name][$column_name]);
}
}
}
//iterate columns
if (is_array($column_group) && @sizeof($column_group) != 0) {
$column_names = implode(", ", $column_group);
$column_names = implode(", ", $column_group['devices']);
$sql = "select ".$column_names." from v_devices ";
$sql .= " where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$devices = $database->select($sql, $parameters, 'all');
unset($sql, $parameters, $column_names);
//print_r($extensions);
foreach($column_group as $table_name => $columns) {
if ($table_name !== 'devices') {
$column_names = implode(", ", $columns);
$sql = "select ".$column_names." from v_".$table_name." ";
$sql .= " where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$$table_name = $database->select($sql, $parameters, 'all');
$x = 0;
foreach($devices as $device) {
foreach($$table_name as $row) {
if ($device['device_uuid'] == $row['device_uuid']) {
foreach($row as $key => $value) {
$devices[$x][$key] = $value;
}
break;
}
}
$x++;
}
unset($sql, $parameters, $column_names);
}
}
if (is_array($devices) && @sizeof($devices) != 0) {
download_send_headers("device_export_".date("Y-m-d").".csv");
@@ -143,30 +201,44 @@
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($available_columns ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
echo " <th>".$text['label-column_name']."</th>\n";
echo "</tr>\n";
echo $text['description-device_export'];
echo "<br /><br />\n";
if (is_array($available_columns) && @sizeof($available_columns) != 0) {
$x = 0;
foreach ($available_columns as $column_name) {
$list_row_onclick = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='column_group[]' id='checkbox_".$x."' value=\"".$column_name."\" onclick=\"".$list_row_onclick."\">\n";
echo " </td>\n";
echo " <td onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick."\">".$column_name."</td>";
echo "</tr>";
$x++;
foreach ($available_columns as $table_name => $columns) {
$table_name_label = ucwords(str_replace(['-','_',],' ', $table_name));
echo "<div class='category'>\n";
echo "<b>".$table_name_label."</b>\n";
echo "<br>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all_".$table_name."' name='checkbox_all' onclick=\"list_all_toggle('".$table_name."');\" ".($available_columns ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
echo " <th>".$text['label-column_name']."</th>\n";
echo "</tr>\n";
foreach ($columns as $column_name) {
$list_row_onclick = "if (!this.checked) { document.getElementById('checkbox_all').checked = false; }";
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' class='checkbox_".$table_name."' name='column_group[".$table_name."][".$column_name."]' id='checkbox_".$x."' value=\"".$column_name."\" onclick=\"".$list_row_onclick."\">\n";
echo " </td>\n";
echo " <td onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick."\">".$column_name."</td>";
echo "</tr>";
$x++;
}
echo "</table>\n";
echo "<br>\n";
echo "</div>\n";
}
}
//test the validation
//echo " <input type='hidden' name='column_group[devices][xxx]' value=\"xxx\">\n";
//echo " <input type='hidden' name='column_group[device_lines][yyy]' value=\"yyy\">\n";
//echo " <input type='hidden' name='column_group[device_zzz][zzz]' value=\"zzz\">\n";
echo "</table>\n";
echo "<br />\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";

View File

@@ -120,7 +120,6 @@
$device_firmware_version = $_POST["device_firmware_version"];
$device_enabled = $_POST["device_enabled"];
$device_template = $_POST["device_template"];
$device_profile_uuid = $_POST["device_profile_uuid"];
$device_description = $_POST["device_description"];
//lines
$device_lines = $_POST["device_lines"];
@@ -273,8 +272,8 @@
if (permission_exists('device_template')) {
$array['devices'][0]['device_template'] = $device_template;
}
if (permission_exists('device_profile_edit') && is_uuid($device_profile_uuid)) {
$array['devices'][0]['device_profile_uuid'] = $device_profile_uuid;
if (permission_exists('device_profile_edit')) {
$array['devices'][0]['device_profile_uuid'] = is_uuid($device_profile_uuid) ? $device_profile_uuid : null;
}
if (permission_exists('device_description')) {
$array['devices'][0]['device_description'] = $device_description;
@@ -284,11 +283,13 @@
$y = 0;
foreach ($device_lines as $row) {
if (strlen($row['line_number']) > 0) {
$new_line = false;
if (is_uuid($row["device_line_uuid"])) {
$device_line_uuid = $row["device_line_uuid"];
}
else {
$device_line_uuid = uuid();
$new_line = true;
}
$array['devices'][0]['device_lines'][$y]['domain_uuid'] = $domain_uuid;
$array['devices'][0]['device_lines'][$y]['device_uuid'] = $device_uuid;
@@ -297,15 +298,23 @@
$array['devices'][0]['device_lines'][$y]['server_address'] = $row["server_address"];
if (permission_exists('device_line_outbound_proxy_primary')) {
$array['devices'][0]['device_lines'][$y]['outbound_proxy_primary'] = $row["outbound_proxy_primary"];
} else if ($new_line && isset($_SESSION['provision']['outbound_proxy_primary'])) {
$array['devices'][0]['device_lines'][$y]['outbound_proxy_primary'] = $_SESSION['provision']['outbound_proxy_primary']['text'];
}
if (permission_exists('device_line_outbound_proxy_secondary')) {
$array['devices'][0]['device_lines'][$y]['outbound_proxy_secondary'] = $row["outbound_proxy_secondary"];
} else if ($new_line && isset($_SESSION['provision']['outbound_proxy_secondary'])) {
$array['devices'][0]['device_lines'][$y]['outbound_proxy_secondary'] = $_SESSION['provision']['outbound_proxy_secondary']['text'];
}
if (permission_exists('device_line_server_address_primary')) {
$array['devices'][0]['device_lines'][$y]['server_address_primary'] = $row["server_address_primary"];
} else if ($new_line && isset($_SESSION['provision']['server_address_primary'])) {
$array['devices'][0]['device_lines'][$y]['server_address_primary'] = $_SESSION['provision']['server_address_primary']['text'];
}
if (permission_exists('device_line_server_address_secondary')) {
$array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $row["server_address_secondary"];
} else if ($new_line && isset($_SESSION['provision']['server_address_secondary'])) {
$array['devices'][0]['device_lines'][$y]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text'];
}
$array['devices'][0]['device_lines'][$y]['display_name'] = $row["display_name"];
$array['devices'][0]['device_lines'][$y]['user_id'] = $row["user_id"];
@@ -616,20 +625,6 @@
}
}
//get the sip profile name
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$command = "sofia_contact */".$user_id."@".$server_address;
$contact_string = event_socket_request($fp, "api ".$command);
if (substr($contact_string, 0, 5) == "sofia") {
$contact_array = explode("/", $contact_string);
$sip_profile_name = $contact_array[1];
}
else {
$sip_profile_name = 'internal';
}
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -807,7 +802,7 @@
echo button::create(['type'=>'button','label'=>$text['button-qr_code'],'icon'=>'qrcode','style'=>$button_margin,'onclick'=>"$('#qr_code_container').fadeIn(400);"]);
unset($button_margin);
}
echo button::create(['type'=>'button','label'=>$text['button-provision'],'icon'=>'fax','style'=>$button_margin,'link'=>PROJECT_PATH."/app/devices/cmd.php?cmd=check_sync&profile=".urlencode($sip_profile_name)."&user=".urlencode($user_id)."@".urlencode($server_address)."&domain=".urlencode($server_address)."&agent=".urlencode($device_vendor)]);
echo button::create(['type'=>'button','label'=>$text['button-provision'],'icon'=>'fax','style'=>$button_margin,'link'=>PROJECT_PATH."/app/devices/cmd.php?cmd=check_sync"."&user=".urlencode($user_id)."@".urlencode($server_address)."&domain=".urlencode($server_address)."&agent=".urlencode($device_vendor)]);
unset($button_margin);
if (permission_exists("device_files")) {
//get the template directory
@@ -1020,10 +1015,12 @@
$element['hidden'] = true;
$element['visibility'] = "visibility:hidden;";
}
//add the primary key uuid
if (is_uuid($row['device_line_uuid'])) {
echo " <input name='device_lines[".$x."][device_line_uuid]' type='hidden' value=\"".escape($row['device_line_uuid'])."\"/>\n";
}
//show each row in the array
echo " <tr>\n";
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
@@ -1047,10 +1044,7 @@
if (permission_exists('device_line_server_address_primary')) {
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
if (is_uuid($_SESSION['provision']['server_address_primary']['uuid'])) {
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
}
else {
if (isset($_SESSION['provision']['server_address_primary']) && !isset($_SESSION['provision']['server_address_primary']['text'])) {
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_primary]'>\n";
echo " <option value=''></option>\n";
foreach($_SESSION['provision']['server_address_primary'] as $field) {
@@ -1058,15 +1052,15 @@
}
echo " </select>\n";
}
else {
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_primary]' maxlength='255' value=\"".escape($row['server_address_primary'])."\"/>\n";
}
echo " </td>\n";
}
if (permission_exists('device_line_server_address_secondary')) {
echo " <td valign='top' align='left' nowrap='nowrap'>\n";
if (isset($_SESSION['provision']['server_address_secondary']['text'])) {
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
}
else {
if (isset($_SESSION['provision']['server_address_secondary']) && !isset($_SESSION['provision']['server_address_secondary']['text'])) {
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][server_address_secondary]'>\n";
echo " <option value=''></option>\n";
foreach($_SESSION['provision']['server_address_secondary'] as $field) {
@@ -1074,15 +1068,15 @@
}
echo " </select>\n";
}
else {
echo " <input class='formfld' style='width: 100px; width: 100%;' type='text' name='device_lines[".$x."][server_address_secondary]' maxlength='255' value=\"".escape($row['server_address_secondary'])."\"/>\n";
}
echo " </td>\n";
}
if (permission_exists('device_line_outbound_proxy_primary')) {
echo " <td align='left'>\n";
if (isset($_SESSION['provision']['outbound_proxy_primary']['text'])) {
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($text['label-primary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
}
else {
if (isset($_SESSION['provision']['outbound_proxy_primary']) && !isset($_SESSION['provision']['outbound_proxy_primary']['text'])) {
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_primary]'>\n";
echo " <option value=''></option>\n";
foreach($_SESSION['provision']['outbound_proxy_primary'] as $field) {
@@ -1090,15 +1084,15 @@
}
echo " </select>\n";
}
else {
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_primary]' placeholder=\"".escape($text['label-primary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_primary'])."\"/>\n";
}
echo " </td>\n";
}
if (permission_exists('device_line_outbound_proxy_secondary')) {
echo " <td align='left'>\n";
if (isset($_SESSION['provision']['outbound_proxy_secondary']['text'])) {
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".escape($text['label-secondary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
}
else {
if (isset($_SESSION['provision']['outbound_proxy_secondary']) && !isset($_SESSION['provision']['outbound_proxy_secondary']['text'])) {
echo " <select class='formfld' style='width: 75px;' name='device_lines[".$x."][outbound_proxy_secondary]'>\n";
echo " <option value=''></option>\n";
foreach($_SESSION['provision']['outbound_proxy_secondary'] as $field) {
@@ -1106,6 +1100,9 @@
}
echo " </select>\n";
}
else {
echo " <input class='formfld' style='width: 65px;' type='text' name='device_lines[".$x."][outbound_proxy_secondary]' placeholder=\"".escape($text['label-secondary'])."\" maxlength='255' value=\"".escape($row['outbound_proxy_secondary'])."\"/>\n";
}
echo " </td>\n";
}
@@ -1174,16 +1171,11 @@
echo " </select>\n";
echo " </td>\n";
if (is_array($device_lines) && @sizeof($device_lines) > 1 && permission_exists('device_line_delete')) {
if (is_uuid($row['device_line_uuid'])) {
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
echo " <input type='checkbox' name='device_lines_delete[".$x."][checked]' value='true' class='chk_delete checkbox_lines' onclick=\"edit_delete_action('lines');\">\n";
echo " <input type='hidden' name='device_lines_delete[".$x."][uuid]' value='".escape($row['device_line_uuid'])."' />\n";
}
else {
echo " <td>\n";
}
echo " </td>\n";
if (is_array($device_lines) && @sizeof($device_lines) > 1 && permission_exists('device_line_delete') && is_uuid($row['device_line_uuid'])) {
echo " <td class='vtable' style='text-align: center; padding-bottom: 3px;'>\n";
echo " <input type='checkbox' name='device_lines_delete[".$x."][checked]' value='true' class='chk_delete checkbox_lines' onclick=\"edit_delete_action('lines');\">\n";
echo " <input type='hidden' name='device_lines_delete[".$x."][uuid]' value='".escape($row['device_line_uuid'])."' />\n";
echo " <td>\n";
}
echo "</tr>\n";

View File

@@ -66,25 +66,24 @@
//save the data to the csv file
if (isset($_POST['data'])) {
$file = $_SESSION['server']['temp']['dir']."/devices-".$_SESSION['domain_name'].".csv";
file_put_contents($file, $_POST['data']);
$_SESSION['file'] = $file;
}
//copy the csv file
//$_POST['submit'] == "Upload" &&
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('device_imports')) {
if ($_POST['type'] == 'csv') {
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']);
$save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']);
//system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*');
unset($_POST['txtCommand']);
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
if (file_put_contents($file, $_POST['data'])) {
$_SESSION['file'] = $file;
}
}
//copy the csv file
//$_POST['submit'] == "Upload" &&
if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('device_import')) {
if ($_POST['type'] == 'csv') {
$file = $_SESSION['server']['temp']['dir']."/devices-".$_SESSION['domain_name'].".csv";
if (move_uploaded_file($_FILES['ulfile']['tmp_name'], $file)) {
$_SESSION['file'] = $file;
}
}
}
//get the schema
if (strlen($delimiter) > 0) {
if (strlen($delimiter) > 0 && file_exists($_SESSION['file'])) {
//get the first line
$line = fgets(fopen($_SESSION['file'], 'r'));
$line_fields = explode($delimiter, $line);
@@ -292,6 +291,12 @@
$result[$key] = preg_replace('{\D}', '', $result[$key]);
}
//normalize the MAC address
if ($field_name == "device_mac_address") {
$result[$key] = strtolower($result[$key]);
$result[$key] = preg_replace('#[^a-fA-F0-9./]#', '', $result[$key]);
}
//build the data array
if (strlen($table_name) > 0) {
if (strlen($parent) == 0) {
@@ -352,6 +357,12 @@
$database->save($array);
//$message = $database->message;
}
if (strlen($_SESSION['provision']['path']['text']) > 0) {
$prov = new provision;
$prov->domain_uuid = $domain_uuid;
$response = $prov->write();
}
//send the redirect header
header("Location: devices.php");

View File

@@ -49,6 +49,10 @@
$profiles = $_POST['profiles'];
}
//get the search
$search = strtolower($_REQUEST["search"]);
$fields = strtolower($_REQUEST["fields"]);
//process the http post data by action
if ($action != '' && is_array($profiles) && @sizeof($profiles) != 0) {
switch ($action) {
@@ -72,7 +76,7 @@
break;
}
header('Location: device_profiles.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: device_profiles.php'.($search != '' ? '?search='.urlencode($search).'&fields='.urlencode($fields) : null));
exit;
}
@@ -81,11 +85,25 @@
$order = $_GET["order"];
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$sql_search = "and (";
$sql_search .= " lower(device_profile_name) like :search ";
$sql_search .= " or lower(device_profile_description) like :search ";
if ($fields == 'all' || $fields == 'keys') {
$sql_search .= " or device_profile_uuid in ( ";
$sql_search .= " select dpk.device_profile_uuid from v_device_profile_keys as dpk ";
$sql_search .= " where dpk.profile_key_value like :search ";
$sql_search .= " or dpk.profile_key_label like :search ";
$sql_search .= " ) ";
}
if ($fields == 'all' || $fields == 'settings') {
$sql_search .= " or device_profile_uuid in ( ";
$sql_search .= " select dps.device_profile_uuid from v_device_profile_settings as dps ";
$sql_search .= " where dps.profile_setting_name like :search ";
$sql_search .= " or dps.profile_setting_value like :search ";
$sql_search .= " or dps.profile_setting_description like :search ";
$sql_search .= " ) ";
}
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
@@ -103,7 +121,10 @@
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".$search;
if ($search) {
$param = "&search=".$search;
$param .= "&fields=".$fields;
}
if ($_GET['show'] == "all" && permission_exists('device_profile_all')) {
$param .= "&show=all";
}
@@ -155,7 +176,15 @@
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all']);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo "<select class='formfld' name='fields' id='select_fields' style='width: auto; margin-left: 15px;' onchange=\"if (document.getElementById('search').value != '') { this.form.submit(); }\">\n";
echo " <option value=''>".$text['label-fields']."...</option>\n";
echo " <option value=''>".$text['label-default']."</option>\n";
echo " <option value='keys' ".($fields == 'keys' ? " selected='selected'" : null).">".$text['label-keys']."</option>\n";
echo " <option value='settings' ".($fields == 'settings' ? " selected='selected'" : null).">".$text['label-settings']."</option>\n";
echo " <option value='all' ".($fields == 'all' ? " selected='selected'" : null).">".$text['label-all']."</option>\n";
echo " </select>";
echo "<input type='text' class='txt list-search' name='search' id='search' style='margin-left: 0 !important;' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'device_profiles.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
@@ -182,6 +211,7 @@
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<input type='hidden' name='fields' value=\"".escape($fields)."\">\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";

View File

@@ -51,6 +51,7 @@
//get the search
$search = strtolower($_REQUEST["search"]);
$fields = strtolower($_REQUEST["fields"]);
//process the http post data by action
if ($action != '' && is_array($devices) && @sizeof($devices) != 0) {
@@ -69,7 +70,7 @@
break;
}
header('Location: devices.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: devices.php'.($search != '' ? '?search='.urlencode($search).'&fields='.urlencode($fields) : null));
exit;
}
@@ -126,6 +127,29 @@
$sql .= " or lower(d.device_description) like :search ";
$sql .= " or lower(d.device_provisioned_method) like :search ";
$sql .= " or lower(d.device_provisioned_ip) like :search ";
if ($fields == 'all' || $fields == 'lines') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select dl.device_uuid from v_device_lines as dl ";
$sql .= " where dl.display_name like :search ";
$sql .= " or dl.user_id like :search ";
$sql .= " or dl.auth_id like :search ";
$sql .= " ) ";
}
if ($fields == 'all' || $fields == 'keys') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select dk.device_uuid from v_device_keys as dk ";
$sql .= " where dk.device_key_value like :search ";
$sql .= " or dk.device_key_label like :search ";
$sql .= " ) ";
}
if ($fields == 'all' || $fields == 'settings') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select ds.device_uuid from v_device_settings as ds ";
$sql .= " where ds.device_setting_subcategory like :search ";
$sql .= " or ds.device_setting_value like :search ";
$sql .= " or ds.device_setting_description like :search ";
$sql .= " ) ";
}
$sql .= ") ";
$parameters['search'] = '%'.strtolower($search).'%';
}
@@ -135,11 +159,12 @@
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
$param = "&search=".$search."&show=all";
}
else {
if ($search) {
$param = "&search=".$search;
$param .= "&fields=".$fields;
}
if ($_GET['show'] == "all" && permission_exists('device_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
@@ -155,7 +180,10 @@
}
$sql .= "where ( ";
$sql .= " d.device_uuid_alternate = d2.device_uuid ";
$sql .= " or d.device_uuid_alternate is null and d.device_uuid = d2.device_uuid ";
$sql .= " or ( ";
$sql .= " d.device_uuid_alternate is null and ";
$sql .= " d.device_uuid = d2.device_uuid ";
$sql .= " ) ";
$sql .= ") ";
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
$sql .= " and d.domain_uuid = d3.domain_uuid ";
@@ -183,6 +211,29 @@
$sql .= " or lower(d.device_description) like :search ";
$sql .= " or lower(d.device_provisioned_method) like :search ";
$sql .= " or lower(d.device_provisioned_ip) like :search ";
if ($fields == 'all' || $fields == 'lines') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select dl.device_uuid from v_device_lines as dl ";
$sql .= " where dl.display_name like :search ";
$sql .= " or dl.user_id like :search ";
$sql .= " or dl.auth_id like :search ";
$sql .= " ) ";
}
if ($fields == 'all' || $fields == 'keys') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select dk.device_uuid from v_device_keys as dk ";
$sql .= " where dk.device_key_value like :search ";
$sql .= " or dk.device_key_label like :search ";
$sql .= " ) ";
}
if ($fields == 'all' || $fields == 'settings') {
$sql .= " or d.device_uuid in ( ";
$sql .= " select ds.device_uuid from v_device_settings as ds ";
$sql .= " where ds.device_setting_subcategory like :search ";
$sql .= " or ds.device_setting_value like :search ";
$sql .= " or ds.device_setting_description like :search ";
$sql .= " ) ";
}
$sql .= ") ";
$parameters['search'] = '%'.strtolower($search).'%';
}
@@ -255,7 +306,15 @@
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo "<select class='formfld' name='fields' id='select_fields' style='width: auto; margin-left: 15px;' onchange=\"if (document.getElementById('search').value != '') { this.form.submit(); }\">\n";
echo " <option value=''>".$text['label-fields']."...</option>\n";
echo " <option value=''>".$text['label-default']."</option>\n";
echo " <option value='lines' ".($fields == 'lines' ? " selected='selected'" : null).">".$text['label-lines']."</option>\n";
echo " <option value='keys' ".($fields == 'keys' ? " selected='selected'" : null).">".$text['label-keys']."</option>\n";
echo " <option value='settings' ".($fields == 'settings' ? " selected='selected'" : null).">".$text['label-settings']."</option>\n";
echo " <option value='all' ".($fields == 'all' ? " selected='selected'" : null).">".$text['label-all']."</option>\n";
echo " </select>";
echo "<input type='text' class='txt list-search' name='search' id='search' style='margin-left: 0 !important;' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'devices.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
@@ -279,6 +338,7 @@
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<input type='hidden' name='fields' value=\"".escape($fields)."\">\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";

View File

@@ -311,6 +311,12 @@ include "root.php";
//build the delete array
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$sql = "update v_devices set device_uuid_alternate = null where device_uuid_alternate = :device_uuid_alternate; ";
$parameters['device_uuid_alternate'] = $record['uuid'];
$database = new database;
$database->execute($sql, $parameters);
unset($sql, $parameters);
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
$array['device_settings'][$x]['device_uuid'] = $record['uuid'];
$array['device_lines'][$x]['device_uuid'] = $record['uuid'];

View File

@@ -392,7 +392,7 @@
if (strlen($dialplan_order) == 0) {
$dialplan_order ='333';
}
$dialplan_context = $_SESSION['context'];
$dialplan_context = $_SESSION['domain_name'];
$dialplan_continue = 'false';
$app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3';
@@ -684,6 +684,11 @@
} //end foreach
}
//add the dialplan permission
$p = new permissions;
$p->add("dialplan_add", "temp");
$p->add("dialplan_detail_add", "temp");
//save to the data
$database = new database;
$database->app_name = 'outbound_routes';
@@ -699,6 +704,10 @@
$dialplans->uuid = $dialplan_uuid;
$dialplans->xml();
//remove the temporary permission
$p->delete("dialplan_add", "temp");
$p->delete("dialplan_detail_add", "temp");
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$dialplan_context);
@@ -720,12 +729,13 @@
$sql = "select * from v_gateways ";
$sql .= "where enabled = 'true' ";
if (permission_exists('outbound_route_any_gateway')) {
$sql .= "order by domain_uuid, gateway ";
$sql .= "order by domain_uuid = :domain_uuid DESC, gateway ";
}
else {
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
}
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$gateways = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
@@ -806,50 +816,49 @@ function type_onchange(dialplan_detail_type) {
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
if (if_group("superadmin")) {
echo "<script>\n";
echo "var Objs;\n";
echo "\n";
echo "function changeToInput(obj){\n";
echo " tb=document.createElement('INPUT');\n";
echo " tb.type='text';\n";
echo " tb.name=obj.name;\n";
echo " tb.setAttribute('class', 'formfld');\n";
echo " tb.setAttribute('style', 'width: 400px;');\n";
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
echo " tbb=document.createElement('INPUT');\n";
echo " tbb.setAttribute('class', 'btn');\n";
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
echo " tbb.type='button';\n";
echo " tbb.value=$('<div />').html('&#9665;').text();\n";
echo " tbb.objs=[obj,tb,tbb];\n";
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
echo " obj.parentNode.insertBefore(tb,obj);\n";
echo " obj.parentNode.insertBefore(tbb,obj);\n";
echo " obj.parentNode.removeChild(obj);\n";
echo "}\n";
echo "\n";
echo "function Replace(obj){\n";
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
echo " obj[0].parentNode.removeChild(obj[1]);\n";
echo " obj[0].parentNode.removeChild(obj[2]);\n";
echo "}\n";
echo "function update_dialplan_expression() {\n";
echo " if ( document.getElementById('dialplan_expression_select').value == 'CUSTOM_PREFIX' ) {\n";
echo " document.getElementById('outbound_prefix').value = '';\n";
echo " $('#enter_custom_outbound_prefix_box').slideDown();\n";
echo " } else { \n";
echo " document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\\n';\n";
echo " document.getElementById('outbound_prefix').value = '';\n";
echo " $('#enter_custom_outbound_prefix_box').slideUp();\n";
echo " }\n";
echo "}\n";
echo "function update_outbound_prefix() {\n";
echo " document.getElementById('dialplan_expression').value += '^' + document.getElementById('outbound_prefix').value + '(\\\d*)\$' + '\\n';\n";
echo "}\n";
echo "</script>\n";
echo "\n";
}
echo "<script>\n";
echo "var Objs;\n";
echo "\n";
echo "function changeToInput(obj){\n";
echo " tb=document.createElement('INPUT');\n";
echo " tb.type='text';\n";
echo " tb.name=obj.name;\n";
echo " tb.setAttribute('class', 'formfld');\n";
echo " tb.setAttribute('style', 'width: 400px;');\n";
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
echo " tbb=document.createElement('INPUT');\n";
echo " tbb.setAttribute('class', 'btn');\n";
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
echo " tbb.type='button';\n";
echo " tbb.value=$('<div />').html('&#9665;').text();\n";
echo " tbb.objs=[obj,tb,tbb];\n";
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
echo " obj.parentNode.insertBefore(tb,obj);\n";
echo " obj.parentNode.insertBefore(tbb,obj);\n";
echo " obj.parentNode.removeChild(obj);\n";
echo "}\n";
echo "\n";
echo "function Replace(obj){\n";
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
echo " obj[0].parentNode.removeChild(obj[1]);\n";
echo " obj[0].parentNode.removeChild(obj[2]);\n";
echo "}\n";
echo "function update_dialplan_expression() {\n";
echo " if ( document.getElementById('dialplan_expression_select').value == 'CUSTOM_PREFIX' ) {\n";
echo " document.getElementById('outbound_prefix').value = '';\n";
echo " $('#enter_custom_outbound_prefix_box').slideDown();\n";
echo " } else { \n";
echo " document.getElementById('dialplan_expression').value += document.getElementById('dialplan_expression_select').value + '\\n';\n";
echo " document.getElementById('outbound_prefix').value = '';\n";
echo " $('#enter_custom_outbound_prefix_box').slideUp();\n";
echo " }\n";
echo "}\n";
echo "function update_outbound_prefix() {\n";
echo " document.getElementById('dialplan_expression').value += '^' + document.getElementById('outbound_prefix').value + '(\\\d*)\$' + '\\n';\n";
echo "}\n";
echo "</script>\n";
echo "\n";
//set the onchange
$onchange = '';

View File

@@ -226,5 +226,9 @@
$apps[$x]['db'][$y]['fields'][$z]['name'] = "dialplan_detail_order";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "dialplan_detail_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "boolean";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>

View File

@@ -80,7 +80,7 @@
}
//set the default
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['context']; }
if (strlen($dialplan_context) == 0) { $dialplan_context = $_SESSION['domain_name']; }
//add or update data from http post
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {

View File

@@ -232,6 +232,7 @@
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_inline'] = $row["dialplan_detail_inline"];
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = ($row["dialplan_detail_group"] != '') ? $row["dialplan_detail_group"] : '0';
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $row["dialplan_detail_order"];
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = $row["dialplan_detail_enabled"];
}
$y++;
}
@@ -267,8 +268,16 @@
//clear the cache
$cache = new cache;
if ($dialplan_context == "\${domain_name}" or $dialplan_context == "global") {
$dialplan_context = "*";
}
$cache->delete("dialplan:".$dialplan_context);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set the message
if ($action == "add") {
message::add($text['message-add']);
@@ -315,7 +324,10 @@
}
//get the dialplan details in an array
$sql = "select * from v_dialplan_details ";
$sql = "select ";
$sql .= "domain_uuid, dialplan_uuid, dialplan_detail_uuid, dialplan_detail_tag, dialplan_detail_type, dialplan_detail_data, ";
$sql .= "dialplan_detail_break, dialplan_detail_inline, dialplan_detail_group, dialplan_detail_order, cast(dialplan_detail_enabled as text) ";
$sql .= "from v_dialplan_details ";
$sql .= "where dialplan_uuid = :dialplan_uuid ";
$sql .= "order by dialplan_detail_group asc, dialplan_detail_order asc";
$parameters['dialplan_uuid'] = $dialplan_uuid;
@@ -403,6 +415,8 @@
$details[$group][$x]['dialplan_detail_inline'] = '';
$details[$group][$x]['dialplan_detail_group'] = $group;
$details[$group][$x]['dialplan_detail_order'] = $dialplan_detail_order;
$details[$group][$x]['dialplan_detail_enabled'] = 'true';
}
}
//sort the details array by group number
@@ -740,6 +754,7 @@
echo "<td class='vncellcol' style='text-align: center;'>".$text['label-inline']."</td>\n";
echo "<td class='vncellcolreq' style='text-align: center;'>".$text['label-group']."</td>\n";
echo "<td class='vncellcolreq' style='text-align: center;'>".$text['label-order']."</td>\n";
echo "<td class='vncellcolreq' style='text-align: center;'>".$text['label-enabled']."</td>\n";
if (permission_exists('dialplan_detail_delete')) {
echo "<td class='vncellcol edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_group_".$g."', 'delete_toggle_group_".$g."');\" onmouseout=\"swap_display('delete_label_group_".$g."', 'delete_toggle_group_".$g."');\">\n";
echo " <span id='delete_label_group_".$g."'>".$text['label-delete']."</span>\n";
@@ -760,6 +775,12 @@
$dialplan_detail_inline = $row['dialplan_detail_inline'];
$dialplan_detail_group = $row['dialplan_detail_group'];
$dialplan_detail_order = $row['dialplan_detail_order'];
$dialplan_detail_enabled = $row['dialplan_detail_enabled'];
//default to enabled true
if (strlen($dialplan_detail_enabled) == 0) {
$dialplan_detail_enabled = 'true';
}
//no border on last row
$no_border = ($index == 999) ? "border: none;" : null;
@@ -959,6 +980,17 @@
echo " </select>\n";
*/
echo "</td>\n";
//enabled
echo "<td class='vtablerow' style='".$no_border." text-align: center;' onclick=\"label_to_form('label_dialplan_detail_enabled_".$x."','dialplan_detail_enabled_".$x."');\" nowrap='nowrap'>\n";
if ($element['hidden']) {
echo " <label id=\"label_dialplan_detail_enabled_".$x."\">".escape($dialplan_detail_enabled)."</label>\n";
}
echo " <select id='dialplan_detail_enabled_".$x."' name='dialplan_details[".$x."][dialplan_detail_enabled]' class='formfld' style='width: auto; ".$element['visibility']."'>\n";
echo " <option></option>\n";
echo " <option value='true' ".($dialplan_detail_enabled == "true" ? $selected : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($dialplan_detail_enabled == "false" ? $selected : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "</td>\n";
//tools
if (permission_exists('dialplan_detail_delete')) {
if (is_uuid($dialplan_detail_uuid)) {

View File

@@ -92,8 +92,11 @@
$database->save($array);
unset($array);
//clear the cache
//clear the cache
$cache = new cache;
if ($dialplan_context == "\${domain_name}" or $dialplan_context == "global") {
$dialplan_context = "*";
}
$cache->delete("dialplan:".$dialplan_context);
//save the message to a session variable
@@ -320,4 +323,4 @@
//show the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -148,7 +148,7 @@
$sql .= "and app_uuid <> 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4' ";
$sql .= "and dialplan_context <> 'public' ";
//hide outbound routes
$sql .= "and app_uuid <> '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
//$sql .= "and app_uuid <> '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3' ";
}
else {
if ($app_uuid == 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4') {

View File

@@ -1,3 +1,4 @@
<?php
/*
FusionPBX
@@ -118,6 +119,10 @@
$database->app_uuid = '742714e5-8cdf-32fd-462c-cbe7e3d655db';
$database->save($array);
unset($array);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//revoke temporary permissions
$p->delete('dialplan_add', 'temp');
}
@@ -342,6 +347,12 @@
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_inline'] = null;
}
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = $group;
if (isset($row2['@attributes']['enabled'])) {
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = $row2['@attributes']['enabled'];
}
else {
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true';
}
$y++;
//increase the order number
@@ -363,6 +374,12 @@
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_inline'] = null;
}
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = $group;
if (isset($row2['@attributes']['enabled'])) {
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = $row2['@attributes']['enabled'];
}
else {
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true';
}
$y++;
//increase the order number
@@ -414,6 +431,14 @@
$p->delete('dialplan_edit', 'temp');
$p->delete('dialplan_detail_add', 'temp');
$p->delete('dialplan_detail_edit', 'temp');
//add dialplan xml when the dialplan_xml is null
$this->source = 'details';
$this->destination = 'database';
$this->context = $domain['domain_name'];
$this->is_empty = 'dialplan_xml';
$this->xml();
} //foreach domains
}
@@ -575,7 +600,7 @@
$sql .= "dialplan_order asc ";
$database = new database;
$results = $database->select($sql, $parameters, 'all');
if (is_array($result) && @sizeof($result) != 0) {
if (is_array($results) && @sizeof($results) != 0) {
foreach ($results as $row) {
$dialplans[$row["dialplan_uuid"]] = $row["dialplan_xml"];
}
@@ -587,42 +612,43 @@
if ($this->source == "details") {
//get the data using a join between the dialplans and dialplan details tables
$sql = "select ";
$sql .= "p.domain_uuid, p.dialplan_uuid, p.app_uuid, p.dialplan_context, p.dialplan_name, p.dialplan_number, ";
$sql .= "p.dialplan_continue, p.dialplan_order, p.dialplan_enabled, p.dialplan_description, ";
$sql .= "s.dialplan_detail_uuid, s.dialplan_detail_tag, s.dialplan_detail_type, s.dialplan_detail_data, ";
$sql .= "s.dialplan_detail_break, s.dialplan_detail_inline, s.dialplan_detail_group, s.dialplan_detail_order ";
$sql .= "from v_dialplans as p, v_dialplan_details as s ";
$sql .= "where p.dialplan_uuid = s.dialplan_uuid ";
$sql = "select \n";
$sql .= "p.domain_uuid, p.dialplan_uuid, p.app_uuid, p.dialplan_context, p.dialplan_name, p.dialplan_number, \n";
$sql .= "p.dialplan_continue, p.dialplan_order, p.dialplan_enabled, p.dialplan_description, \n";
$sql .= "s.dialplan_detail_uuid, s.dialplan_detail_tag, s.dialplan_detail_type, s.dialplan_detail_data, \n";
$sql .= "s.dialplan_detail_break, s.dialplan_detail_inline, s.dialplan_detail_group, s.dialplan_detail_order, s.dialplan_detail_enabled \n";
$sql .= "from v_dialplans as p, v_dialplan_details as s \n";
$sql .= "where p.dialplan_uuid = s.dialplan_uuid \n";
if ($this->is_empty == "dialplan_xml") {
$sql .= "and p.dialplan_xml is null ";
$sql .= "and p.dialplan_xml is null \n";
}
if (isset($this->context)) {
if ($this->context == "public" || substr($this->context, 0, 7) == "public@" || substr($this->context, -7) == ".public") {
$sql .= "and p.dialplan_context = :dialplan_context ";
$sql .= "and p.dialplan_context = :dialplan_context \n";
}
else {
$sql .= "and (p.dialplan_context = :dialplan_context or p.dialplan_context = '\${domain_name}') ";
$sql .= "and (p.dialplan_context = :dialplan_context or p.dialplan_context = '\${domain_name}') \n";
}
$sql .= "and p.dialplan_enabled = 'true' ";
$sql .= "and p.dialplan_enabled = 'true' \n";
$parameters['dialplan_context'] = $this->context;
}
if (is_uuid($this->uuid)) {
$sql .= "and p.dialplan_uuid = :dialplan_uuid ";
$sql .= "and s.dialplan_uuid = :dialplan_uuid ";
$sql .= "and p.dialplan_uuid = :dialplan_uuid \n";
$sql .= "and s.dialplan_uuid = :dialplan_uuid \n";
$parameters['dialplan_uuid'] = $this->uuid;
}
$sql .= "order by ";
$sql .= "p.dialplan_order asc, ";
$sql .= "p.dialplan_name asc, ";
$sql .= "p.dialplan_uuid asc, ";
$sql .= "s.dialplan_detail_group asc, ";
$sql .= "case s.dialplan_detail_tag ";
$sql .= "when 'condition' then 1 ";
$sql .= "when 'action' then 2 ";
$sql .= "when 'anti-action' then 3 ";
$sql .= "else 100 end, ";
$sql .= "s.dialplan_detail_order asc ";
$sql .= "and (s.dialplan_detail_enabled = 'true' or s.dialplan_detail_enabled is null) \n";
$sql .= "order by \n";
$sql .= "p.dialplan_order asc, \n";
$sql .= "p.dialplan_name asc, \n";
$sql .= "p.dialplan_uuid asc, \n";
$sql .= "s.dialplan_detail_group asc, \n";
$sql .= "case s.dialplan_detail_tag \n";
$sql .= "when 'condition' then 1 \n";
$sql .= "when 'action' then 2 \n";
$sql .= "when 'anti-action' then 3 \n";
$sql .= "else 100 end, \n";
$sql .= "s.dialplan_detail_order asc \n";
$database = new database;
$results = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
@@ -1054,6 +1080,11 @@
}
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete'].': '.@sizeof($array[$this->table]));
@@ -1209,9 +1240,11 @@
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_context from v_".$this->table." ";
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
if (!permission_exists('dialplan_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
@@ -1257,6 +1290,11 @@
}
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);
}

View File

@@ -1,6 +1,6 @@
<context name="{v_context}">
<extension name="call_block" number="" continue="true" app_uuid="b1b31930-d0ee-4395-a891-04df94599f1f" enabled="false" order="40">
<condition field="${call_direction}" expression="^inbound$" >
<condition field="${call_direction}" expression="^(inbound|outbound)$" >
<action application="lua" data="app.lua call_block"/>
</condition>
</extension>

View File

@@ -41,7 +41,8 @@
<condition field="${from_user_record}" expression="^local$" break="never">
<action application="set" data="record_session=true" inline="true"/>
</condition>
<condition field="${record_session}" expression="^true$">
<condition field="${record_session}" expression="^true$"/>
<condition field="destination_number" expression="^(?:(?!\*).|\*59|\*\*|\*8|\*67|\*69)+$">
<action application="set" data="record_path=${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}" inline="true"/>
<action application="set" data="record_name=${uuid}.${record_ext}" inline="true"/>
<!--<action application="set" data="record_name=${destination_number}-${caller_id_number}_${strftime(%Y-%m-%d %H:%M)}.${record_ext}" inline="true"/>-->

View File

@@ -0,0 +1,8 @@
<context name="${domain_name}">
<extension name="rtp_has_crypto" number="" continue="true" app_uuid="e23d96cc-20db-4fa5-98a0-a75c402fa291" global="true" order="55">
<condition field="${rtp_has_crypto}" expression="^(AEAD_AES_256_GCM_8|AEAD_AES_128_GCM_8|AES_CM_256_HMAC_SHA1_80|AES_CM_192_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_80|AES_CM_256_HMAC_SHA1_32|AES_CM_192_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_32|AES_CM_128_NULL_AUTH)$">
<action application="set" data="rtp_secure_media=optional" inline="true"/>
<action application="export" data="rtp_secure_media=optional" inline="true"/>
</condition>
</extension>
</context>

View File

@@ -1,11 +1,15 @@
<context name="{v_context}">
<extension name="default_caller_id" number="" continue="true" app_uuid="9660e536-976d-47cb-872e-85957c51bd3d" order="80">
<condition field="${emergency_caller_id_number}" expression="^$" break="never">
<condition field="${emergency_caller_id_name}" expression="^$" break="never">
<action application="set" data="emergency_caller_id_name=${default_emergency_caller_id_name}" inline="true"/>
</condition>
<condition field="${emergency_caller_id_number}" expression="^$" break="never">
<action application="set" data="emergency_caller_id_number=${default_emergency_caller_id_number}" inline="true"/>
</condition>
<condition field="${outbound_caller_id_number}" expression="^$" break="never">
<condition field="${outbound_caller_id_name}" expression="^$" break="never">
<action application="set" data="outbound_caller_id_name=${default_outbound_caller_id_name}" inline="true"/>
</condition>
<condition field="${outbound_caller_id_number}" expression="^$" break="never">
<action application="set" data="outbound_caller_id_number=${default_outbound_caller_id_number}" inline="true"/>
</condition>
</extension>

View File

@@ -1,7 +1,7 @@
<context name="{v_context}">
<extension name="valet_park_in" number="park+*5900" continue="false" app_uuid="c192ee50-084d-40d8-8d9a-6959369382c8" enabled="false" order="470">
<condition field="destination_number" expression="^(park\+)?(\*5900)$">
<condition field="destination_number" expression="^(?:(?:park\+\*?)|(?:\*))(5900)$">
<action application="valet_park" data="park@${domain_name} auto in 5901 5999"/>
</condition>
</extension>
</extension>
</context>

View File

@@ -1,8 +1,8 @@
<context name="{v_context}">
<extension name="valet_park_out" number="park+*5901-*5999" continue="false" app_uuid="242130d4-61d6-4daf-9dd1-b139a2b3b166" enabled="false" order="475">
<condition field="destination_number" expression="^(park\+)?\*(59[0-9][0-9])$">
<condition field="destination_number" expression="^(?:(?:park\+\*?)|(?:\*))(59[0-9][0-9])$">
<action application="answer"/>
<action application="valet_park" data="park@${domain_name} $2"/>
<action application="valet_park" data="park@${domain_name} $1"/>
</condition>
</extension>
</extension>
</context>

View File

@@ -2,6 +2,8 @@
<extension name="follow-me-destinations" continue="false" app_uuid="846bbc43-683b-49e9-b697-c4714b17c528" global="true" order="500">
<condition field="${user_exists}" expression="^true$"/>
<condition field="${follow_me_enabled}" expression="^true$">
<action application="set" data="outbound_caller_id_name=${user_data ${destination_number}@${domain_name} var outbound_caller_id_name}" inline="true" enabled="false"/>
<action application="set" data="outbound_caller_id_number=${user_data ${destination_number}@${domain_name} var outbound_caller_id_number}" inline="true" enabled="false"/>
<action application="unset" data="call_timeout" inline="true"/>
<action application="lua" data="app.lua follow_me"/>
</condition>

View File

@@ -1,9 +1,11 @@
<context name="${domain_name}">
<extension name="call-forward-all" number="" app_uuid="57cf8f1f-9a2e-4996-bd80-d9300249b1ca" global="true" order="505">
<condition field="${user_exists}" expression="true"/>
<condition field="${forward_all_enabled}" expression="true">
<action application="export" data="sip_h_Diversion=&lt;sip:${caller_destination}@${external_sip_ip}:5060&gt;;reason=unconditional"/>
<action application="transfer" data="${forward_all_destination} XML ${domain_name}"/>
</condition>
</extension>
<extension name="call-forward-all" number="" app_uuid="57cf8f1f-9a2e-4996-bd80-d9300249b1ca" global="true" order="505">
<condition field="${user_exists}" expression="true"/>
<condition field="${forward_all_enabled}" expression="true">
<action application="export" data="sip_h_Diversion=&lt;sip:${caller_destination}@${external_sip_ip}:5060&gt;;reason=unconditional" inline="true" enabled="true"/>
<action application="set" data="outbound_caller_id_name=${user_data ${destination_number}@${domain_name} var outbound_caller_id_name}" inline="true" enabled="false"/>
<action application="set" data="outbound_caller_id_number=${user_data ${destination_number}@${domain_name} var outbound_caller_id_number}" inline="true" enabled="false"/>
<action application="transfer" data="${forward_all_destination} XML ${domain_name}"/>
</condition>
</extension>
</context>

View File

@@ -35,63 +35,58 @@
$text = $language->get();
//send email
if (valid_email($_POST['to'])) {
//validate the token
$token = new token;
if (!$token->validate('/app/email_logs/email_logs.php')) {
//message::add($text['message-invalid_token'],'negative');
echo "<script>display_message('".$text['message-invalid_token']."', 'negative');</script>";
echo "<center>\n";
echo $text['message-invalid_token'];
echo " <br><br>\n";
echo " <input type='button' class='btn' style='margin-top: 15px;' value='".$text['button-close']."' onclick=\"$('#test_result_layer').fadeOut(200);\">\n";
echo "</center>\n";
exit;
//validate the token
$token = new token;
if (!$token->validate('/app/email_logs/email_logs.php')) {
//message::add($text['message-invalid_token'],'negative');
echo "<script>display_message('".$text['message-invalid_token']."', 'negative');</script>";
echo "<center>\n";
echo $text['message-invalid_token'];
echo " <br><br>\n";
echo " <input type='button' class='btn' style='margin-top: 15px;' value='".$text['button-close']."' onclick=\"$('#test_result_layer').fadeOut(200);\">\n";
echo "</center>\n";
exit;
}
$recipient = check_str($_POST['to']);
echo "<b>".$text['header-settings']."</b>\n";
echo "<br><br>\n";
ksort($_SESSION['email']);
foreach ($_SESSION['email'] as $name => $setting) {
foreach ($setting as $type => $value) {
if ($type == 'uuid') { $uuid = $value; continue; }
if ($name == 'smtp_password') { $value = '[REDACTED]'; }
if (permission_exists('default_setting_edit')) {
echo "<a href='../../core/default_settings/default_setting_edit.php?id=".$uuid."' target='_blank'>".$name.'</a>: '.$value."<br>\n";
}
$recipient = check_str($_POST['to']);
echo "<b>".$text['header-settings']."</b>\n";
echo "<br><br>\n";
ksort($_SESSION['email']);
foreach ($_SESSION['email'] as $name => $setting) {
foreach ($setting as $type => $value) {
if ($type == 'uuid') { $uuid = $value; continue; }
if ($name == 'smtp_password') { $value = '[REDACTED]'; }
if (permission_exists('default_setting_edit')) {
echo "<a href='../../core/default_settings/default_setting_edit.php?id=".$uuid."' target='_blank'>".$name.'</a>: '.$value."<br>\n";
}
else {
echo $name.': '.$value."<br>\n";
}
else {
echo $name.': '.$value."<br>\n";
}
}
echo "<br><br>\n";
echo "<b>".$text['header-connection']."</b>\n";
echo "<br><br>\n";
$eml_body = "<b>Test Message</b><br /><br />\n";
$eml_body .= "This message is a test of the SMTP settings configured within your PBX.<br />\n";
$eml_body .= "If you received this message, your current SMTP settings are valid.<br /><br />\n";
ob_start();
$sent = !send_email($recipient, 'Test Message', $eml_body, $eml_error, null, null, 3, 3) ? false : true;
$response = ob_get_clean();
echo $response;
echo "<br><br>\n";
echo "<b>".$text['header-result']."</b>\n";
echo "<br><br>\n";
echo $sent ? "Message Sent Successfully<br>Receipient: <a href='mailto:".$recipient."'>".$recipient."</a>" : "Message Failed...<br>".$eml_error;
}
else {
echo "Error: Invalid Recipient Address";
}
echo "<br><br>\n";
echo "<b>".$text['header-connection']."</b>\n";
echo "<br><br>\n";
$eml_body = "<b>Test Message</b><br /><br />\n";
$eml_body .= "This message is a test of the SMTP settings configured within your PBX.<br />\n";
$eml_body .= "If you received this message, your current SMTP settings are valid.<br /><br />\n";
ob_start();
$sent = !send_email($recipient, 'Test Message', $eml_body, $eml_error, null, null, 3, 3) ? false : true;
$response = ob_get_clean();
echo $response;
echo "<br><br>\n";
echo "<b>".$text['header-result']."</b>\n";
echo "<br><br>\n";
echo $sent ? "Message Sent Successfully<br>Receipient: <a href='mailto:".$recipient."'>".$recipient."</a>" : "Message Failed...<br>".$eml_error;
echo "<br>\n";
echo "<center>\n";

View File

@@ -165,6 +165,13 @@
unset($sql, $parameters, $row);
}
//load editor preferences/defaults
$setting_size = $_SESSION["editor"]["font_size"]["text"] != '' ? $_SESSION["editor"]["font_size"]["text"] : '12px';
$setting_theme = $_SESSION["editor"]["theme"]["text"] != '' ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
$setting_invisibles = $_SESSION["editor"]["invisibles"]["boolean"] != '' ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
$setting_indenting = $_SESSION["editor"]["indent_guides"]["boolean"] != '' ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
$setting_numbering = $_SESSION["editor"]["line_numbers"]["boolean"] != '' ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -173,6 +180,69 @@
$document['title'] = $text['title-email_template'];
require_once "resources/header.php";
echo "<script language='JavaScript' type='text/javascript'>\n";
echo " function toggle_option(opt) {\n";
echo " switch (opt) {\n";
echo " case 'numbering':\n";
echo " toggle_option_do('showLineNumbers');\n";
echo " toggle_option_do('fadeFoldWidgets');\n";
echo " break;\n";
echo " case 'invisibles':\n";
echo " toggle_option_do('showInvisibles');\n";
echo " break;\n";
echo " case 'indenting':\n";
echo " toggle_option_do('displayIndentGuides');\n";
echo " break;\n";
echo " }\n";
echo " focus_editor();\n";
echo " }\n";
echo " function toggle_option_do(opt_name) {\n";
echo " var opt_val = editor.getOption(opt_name);\n";
echo " editor.setOption(opt_name, ((opt_val) ? false : true));\n";
echo " }\n";
echo " function focus_editor() {\n";
echo " editor.focus();\n";
echo " }\n";
//copy the value from the editor on submit
echo " function set_value() {\n";
echo " $('#template_body').val(editor.session.getValue());\n";
echo " }\n";
//load editor value from hidden textarea
echo " function load_value() {\n";
echo " editor.session.setValue($('#template_body').val());";
echo " }\n";
echo "</script>\n";
echo "<style>\n";
echo " img.control {\n";
echo " cursor: pointer;\n";
echo " width: auto;\n";
echo " height: 23px;\n";
echo " border: none;\n";
echo " opacity: 0.5;\n";
echo " }\n";
echo " img.control:hover {\n";
echo " opacity: 1.0;\n";
echo " }\n";
echo " div#editor {\n";
//echo " box-shadow: 0 3px 10px #333;\n";
echo " text-align: left;\n";
echo " width: 100%;\n";
echo " height: 600px;\n";
echo " font-size: 12px;\n";
echo " }\n";
echo "</style>\n";
//show the content
echo "<form name='frm' id='frm' method='post'>\n";
@@ -180,7 +250,7 @@
echo " <div class='heading'><b>".$text['title-email_template']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'email_templates.php']);
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','onclick'=>"set_value(); $('#frm').submit();"]);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@@ -236,7 +306,77 @@
echo " ".$text['label-template_body']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <textarea class='formfld' name='template_body' style='min-width: 100%; height: 350px; font-family: monospace;'>".$template_body."</textarea>\n";
echo " <textarea class='formfld' name='template_body' id='template_body' style='display: none;'>".$template_body."</textarea>\n";
echo " <div id='editor'></div>\n";
echo " <table cellpadding='0' cellspacing='0' border='0' style='float: right; padding-top: 5px;'>\n";
echo " <tr>\n";
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_numbering.png' title='Toggle Line Numbers' class='control' onclick=\"toggle_option('numbering');\"></td>\n";
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_invisibles.png' title='Toggle Invisibles' class='control' onclick=\"toggle_option('invisibles');\"></td>\n";
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_indenting.png' title='Toggle Indent Guides' class='control' onclick=\"toggle_option('indenting');\"></td>\n";
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_replace.png' title='Show Find/Replace [Ctrl+H]' class='control' onclick=\"editor.execCommand('replace');\"></td>\n";
echo " <td valign='middle' style='padding-left: 6px;'><img src='resources/images/icon_goto.png' title='Show Go To Line' class='control' onclick=\"editor.execCommand('gotoline');\"></td>\n";
echo " <td valign='middle' style='padding-left: 4px;'>\n";
echo " <select id='size' class='formfld' onchange=\"document.getElementById('editor').style.fontSize = this.options[this.selectedIndex].value; focus_editor();\">\n";
$sizes = explode(',','9px,10px,11px,12px,14px,16px,18px,20px');
if (!in_array($setting_size, $sizes)) {
echo " <option value='".$setting_size."'>".escape($setting_size)."</option>\n";
echo " <option value='' disabled='disabled'></option>\n";
}
foreach ($sizes as $size) {
$selected = $size == $setting_size ? 'selected' : null;
echo " <option value='".$size."' ".$selected.">".escape($size)."</option>\n";
}
echo " </select>\n";
echo " </td>\n";
echo " <td valign='middle' style='padding-left: 4px; padding-right: 0px;'>\n";
echo " <select id='theme' class='formfld' onchange=\"editor.setTheme('ace/theme/' + this.options[this.selectedIndex].value); focus_editor();\">\n";
$themes['Light']['chrome']= 'Chrome';
$themes['Light']['clouds']= 'Clouds';
$themes['Light']['crimson_editor']= 'Crimson Editor';
$themes['Light']['dawn']= 'Dawn';
$themes['Light']['dreamweaver']= 'Dreamweaver';
$themes['Light']['eclipse']= 'Eclipse';
$themes['Light']['github']= 'GitHub';
$themes['Light']['iplastic']= 'IPlastic';
$themes['Light']['solarized_light']= 'Solarized Light';
$themes['Light']['textmate']= 'TextMate';
$themes['Light']['tomorrow']= 'Tomorrow';
$themes['Light']['xcode']= 'XCode';
$themes['Light']['kuroir']= 'Kuroir';
$themes['Light']['katzenmilch']= 'KatzenMilch';
$themes['Light']['sqlserver']= 'SQL Server';
$themes['Dark']['ambiance']= 'Ambiance';
$themes['Dark']['chaos']= 'Chaos';
$themes['Dark']['clouds_midnight']= 'Clouds Midnight';
$themes['Dark']['cobalt']= 'Cobalt';
$themes['Dark']['idle_fingers']= 'idle Fingers';
$themes['Dark']['kr_theme']= 'krTheme';
$themes['Dark']['merbivore']= 'Merbivore';
$themes['Dark']['merbivore_soft']= 'Merbivore Soft';
$themes['Dark']['mono_industrial']= 'Mono Industrial';
$themes['Dark']['monokai']= 'Monokai';
$themes['Dark']['pastel_on_dark']= 'Pastel on dark';
$themes['Dark']['solarized_dark']= 'Solarized Dark';
$themes['Dark']['terminal']= 'Terminal';
$themes['Dark']['tomorrow_night']= 'Tomorrow Night';
$themes['Dark']['tomorrow_night_blue']= 'Tomorrow Night Blue';
$themes['Dark']['tomorrow_night_bright']= 'Tomorrow Night Bright';
$themes['Dark']['tomorrow_night_eighties']= 'Tomorrow Night 80s';
$themes['Dark']['twilight']= 'Twilight';
$themes['Dark']['vibrant_ink']= 'Vibrant Ink';
foreach ($themes as $optgroup => $theme) {
echo "<optgroup label='".$optgroup."'>\n";
foreach ($theme as $value => $label) {
$selected = strtolower($label) == strtolower($setting_theme) ? 'selected' : null;
echo "<option value='".$value."' ".$selected.">".escape($label)."</option>\n";
}
echo "</optgroup>\n";
}
echo " </select>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "<br />\n";
echo $text['description-template_body']."\n";
echo "</td>\n";
@@ -327,6 +467,39 @@
echo "</form>";
echo "<script type='text/javascript' src='".PROJECT_PATH."/resources/ace/ace.js' charset='utf-8'></script>\n";
echo "<script type='text/javascript'>\n";
//load editor
echo " var editor = ace.edit('editor');\n";
echo " editor.setOptions({\n";
echo " mode: 'ace/mode/html',\n";
echo " theme: 'ace/theme/'+document.getElementById('theme').options[document.getElementById('theme').selectedIndex].value,\n";
echo " selectionStyle: 'text',\n";
echo " cursorStyle: 'smooth',\n";
echo " showInvisibles: ".$setting_invisibles.",\n";
echo " displayIndentGuides: ".$setting_indenting.",\n";
echo " showLineNumbers: ".$setting_numbering.",\n";
echo " showGutter: true,\n";
echo " scrollPastEnd: true,\n";
echo " fadeFoldWidgets: ".$setting_numbering.",\n";
echo " showPrintMargin: false,\n";
echo " highlightGutterLine: false,\n";
echo " useSoftTabs: false\n";
echo " });\n";
echo " document.getElementById('editor').style.fontSize='".$setting_size."';\n";
echo " focus_editor();\n";
//load value into editor
echo " load_value();\n";
//remove certain keyboard shortcuts
echo " editor.commands.bindKey('Ctrl-T', null);\n"; //disable transpose letters - prefer new browser tab
echo " editor.commands.bindKey('Ctrl-F', null);\n"; //disable find - control broken with bootstrap
echo " editor.commands.bindKey('Ctrl-H', null);\n"; //disable replace - control broken with bootstrap
echo "</script>\n";
//include the footer
require_once "resources/footer.php";

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View File

@@ -46,4 +46,5 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Path to web server error log file.";
$y++;
?>
?>

View File

@@ -295,4 +295,4 @@ $text['error-open_file']['ru-ru'] = "Невозможно открыть фай
$text['error-open_file']['sv-se'] = "Kan inte öppna fil!";
$text['error-open_file']['uk-ua'] = "Неможливо відкрити файл!";
?>
?>

View File

@@ -26,4 +26,4 @@
$apps[$x]['menu'][$y]['path'] = "/app/errors/errors.php";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
?>
?>

View File

@@ -0,0 +1,87 @@
<?php
//application details
$apps[$x]['name'] = 'Extension Settings';
$apps[$x]['uuid'] = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$apps[$x]['category'] = '';
$apps[$x]['subcategory'] = '';
$apps[$x]['version'] = '';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en-us'] = '';
//permission details
$y = 0;
$apps[$x]['permissions'][$y]['name'] = 'extension_setting_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'extension_setting_add';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'extension_setting_edit';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'extension_setting_delete';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'extension_setting_all';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
//Extension Settings
$y = 0;
$apps[$x]['db'][$y]['table']['name'] = 'v_extension_settings';
$apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_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'] = 'extension_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]['search_by'] = 'false';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_type';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the extension subcategory.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_name';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the extension name.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_value';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'false';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the extension value.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_enabled';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean';
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the extension enabled.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_setting_description';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the extension description.';
$z++;
?>

View File

@@ -0,0 +1,7 @@
<?php
if ($domains_processed == 1) {
}
?>

View File

@@ -0,0 +1,302 @@
<?php
//Extension Settings
$text['title-extension_settings']['en-us'] = 'Extension Settings';
$text['title-extension_settings']['ar-eg'] = '';
$text['title-extension_settings']['de-at'] = '';
$text['title-extension_settings']['de-ch'] = '';
$text['title-extension_settings']['de-de'] = '';
$text['title-extension_settings']['es-cl'] = '';
$text['title-extension_settings']['es-mx'] = '';
$text['title-extension_settings']['fr-ca'] = '';
$text['title-extension_settings']['fr-fr'] = '';
$text['title-extension_settings']['he-il'] = '';
$text['title-extension_settings']['it-it'] = '';
$text['title-extension_settings']['nl-nl'] = '';
$text['title-extension_settings']['pl-pl'] = '';
$text['title-extension_settings']['pt-br'] = '';
$text['title-extension_settings']['pt-pt'] = '';
$text['title-extension_settings']['ro-ro'] = '';
$text['title-extension_settings']['ru-ru'] = '';
$text['title-extension_settings']['sv-se'] = '';
$text['title-extension_settings']['uk-ua'] = '';
$text['title-extension_setting']['en-us'] = 'Extension Setting';
$text['title-extension_setting']['ar-eg'] = '';
$text['title-extension_setting']['de-at'] = '';
$text['title-extension_setting']['de-ch'] = '';
$text['title-extension_setting']['de-de'] = '';
$text['title-extension_setting']['es-cl'] = '';
$text['title-extension_setting']['es-mx'] = '';
$text['title-extension_setting']['fr-ca'] = '';
$text['title-extension_setting']['fr-fr'] = '';
$text['title-extension_setting']['he-il'] = '';
$text['title-extension_setting']['it-it'] = '';
$text['title-extension_setting']['nl-nl'] = '';
$text['title-extension_setting']['pl-pl'] = '';
$text['title-extension_setting']['pt-br'] = '';
$text['title-extension_setting']['pt-pt'] = '';
$text['title-extension_setting']['ro-ro'] = '';
$text['title-extension_setting']['ru-ru'] = '';
$text['title-extension_setting']['sv-se'] = '';
$text['title-extension_setting']['uk-ua'] = '';
$text['title_description-extension_settings']['en-us'] = 'Assign variables and parameters to this extension.';
$text['title_description-extension_settings']['ar-eg'] = '';
$text['title_description-extension_settings']['de-at'] = '';
$text['title_description-extension_settings']['de-ch'] = '';
$text['title_description-extension_settings']['de-de'] = '';
$text['title_description-extension_settings']['es-cl'] = '';
$text['title_description-extension_settings']['es-mx'] = '';
$text['title_description-extension_settings']['fr-ca'] = '';
$text['title_description-extension_settings']['fr-fr'] = '';
$text['title_description-extension_settings']['he-il'] = '';
$text['title_description-extension_settings']['it-it'] = '';
$text['title_description-extension_settings']['nl-nl'] = '';
$text['title_description-extension_settings']['pl-pl'] = '';
$text['title_description-extension_settings']['pt-br'] = '';
$text['title_description-extension_settings']['pt-pt'] = '';
$text['title_description-extension_settings']['ro-ro'] = '';
$text['title_description-extension_settings']['ru-ru'] = '';
$text['title_description-extension_settings']['sv-se'] = '';
$text['title_description-extension_settings']['uk-ua'] = '';
$text['label-extension_setting_type']['en-us'] = 'Type';
$text['label-extension_setting_type']['ar-eg'] = '';
$text['label-extension_setting_type']['de-at'] = '';
$text['label-extension_setting_type']['de-ch'] = '';
$text['label-extension_setting_type']['de-de'] = '';
$text['label-extension_setting_type']['es-cl'] = '';
$text['label-extension_setting_type']['es-mx'] = '';
$text['label-extension_setting_type']['fr-ca'] = '';
$text['label-extension_setting_type']['fr-fr'] = '';
$text['label-extension_setting_type']['he-il'] = '';
$text['label-extension_setting_type']['it-it'] = '';
$text['label-extension_setting_type']['nl-nl'] = '';
$text['label-extension_setting_type']['pl-pl'] = '';
$text['label-extension_setting_type']['pt-br'] = '';
$text['label-extension_setting_type']['pt-pt'] = '';
$text['label-extension_setting_type']['ro-ro'] = '';
$text['label-extension_setting_type']['ru-ru'] = '';
$text['label-extension_setting_type']['sv-se'] = '';
$text['label-extension_setting_type']['uk-ua'] = '';
$text['description-extension_setting_type']['en-us'] = 'Enter the extension subcategory.';
$text['description-extension_setting_type']['ar-eg'] = '';
$text['description-extension_setting_type']['de-at'] = '';
$text['description-extension_setting_type']['de-ch'] = '';
$text['description-extension_setting_type']['de-de'] = '';
$text['description-extension_setting_type']['es-cl'] = '';
$text['description-extension_setting_type']['es-mx'] = '';
$text['description-extension_setting_type']['fr-ca'] = '';
$text['description-extension_setting_type']['fr-fr'] = '';
$text['description-extension_setting_type']['he-il'] = '';
$text['description-extension_setting_type']['it-it'] = '';
$text['description-extension_setting_type']['nl-nl'] = '';
$text['description-extension_setting_type']['pl-pl'] = '';
$text['description-extension_setting_type']['pt-br'] = '';
$text['description-extension_setting_type']['pt-pt'] = '';
$text['description-extension_setting_type']['ro-ro'] = '';
$text['description-extension_setting_type']['ru-ru'] = '';
$text['description-extension_setting_type']['sv-se'] = '';
$text['description-extension_setting_type']['uk-ua'] = '';
$text['label-param']['en-us'] = 'param';
$text['label-param']['ar-eg'] = '';
$text['label-param']['de-at'] = '';
$text['label-param']['de-ch'] = '';
$text['label-param']['de-de'] = '';
$text['label-param']['es-mx'] = '';
$text['label-param']['fr-ca'] = '';
$text['label-param']['fr-fr'] = '';
$text['label-param']['he-il'] = '';
$text['label-param']['it-it'] = '';
$text['label-param']['nl-nl'] = '';
$text['label-param']['pl-pl'] = '';
$text['label-param']['pt-br'] = '';
$text['label-param']['pt-pt'] = '';
$text['label-param']['ro-ro'] = '';
$text['label-param']['ru-ru'] = '';
$text['label-param']['sv-se'] = '';
$text['label-param']['uk-ua'] = '';
$text['label-variable']['en-us'] = 'variable';
$text['label-variable']['ar-eg'] = '';
$text['label-variable']['de-at'] = '';
$text['label-variable']['de-ch'] = '';
$text['label-variable']['de-de'] = '';
$text['label-variable']['es-mx'] = '';
$text['label-variable']['fr-ca'] = '';
$text['label-variable']['fr-fr'] = '';
$text['label-variable']['he-il'] = '';
$text['label-variable']['it-it'] = '';
$text['label-variable']['nl-nl'] = '';
$text['label-variable']['pl-pl'] = '';
$text['label-variable']['pt-br'] = '';
$text['label-variable']['pt-pt'] = '';
$text['label-variable']['ro-ro'] = '';
$text['label-variable']['ru-ru'] = '';
$text['label-variable']['sv-se'] = '';
$text['label-variable']['uk-ua'] = '';
$text['label-extension_setting_name']['en-us'] = 'Name';
$text['label-extension_setting_name']['ar-eg'] = '';
$text['label-extension_setting_name']['de-at'] = '';
$text['label-extension_setting_name']['de-ch'] = '';
$text['label-extension_setting_name']['de-de'] = '';
$text['label-extension_setting_name']['es-cl'] = '';
$text['label-extension_setting_name']['es-mx'] = '';
$text['label-extension_setting_name']['fr-ca'] = '';
$text['label-extension_setting_name']['fr-fr'] = '';
$text['label-extension_setting_name']['he-il'] = '';
$text['label-extension_setting_name']['it-it'] = '';
$text['label-extension_setting_name']['nl-nl'] = '';
$text['label-extension_setting_name']['pl-pl'] = '';
$text['label-extension_setting_name']['pt-br'] = '';
$text['label-extension_setting_name']['pt-pt'] = '';
$text['label-extension_setting_name']['ro-ro'] = '';
$text['label-extension_setting_name']['ru-ru'] = '';
$text['label-extension_setting_name']['sv-se'] = '';
$text['label-extension_setting_name']['uk-ua'] = '';
$text['description-extension_setting_name']['en-us'] = 'Enter the extension name.';
$text['description-extension_setting_name']['ar-eg'] = '';
$text['description-extension_setting_name']['de-at'] = '';
$text['description-extension_setting_name']['de-ch'] = '';
$text['description-extension_setting_name']['de-de'] = '';
$text['description-extension_setting_name']['es-cl'] = '';
$text['description-extension_setting_name']['es-mx'] = '';
$text['description-extension_setting_name']['fr-ca'] = '';
$text['description-extension_setting_name']['fr-fr'] = '';
$text['description-extension_setting_name']['he-il'] = '';
$text['description-extension_setting_name']['it-it'] = '';
$text['description-extension_setting_name']['nl-nl'] = '';
$text['description-extension_setting_name']['pl-pl'] = '';
$text['description-extension_setting_name']['pt-br'] = '';
$text['description-extension_setting_name']['pt-pt'] = '';
$text['description-extension_setting_name']['ro-ro'] = '';
$text['description-extension_setting_name']['ru-ru'] = '';
$text['description-extension_setting_name']['sv-se'] = '';
$text['description-extension_setting_name']['uk-ua'] = '';
$text['label-extension_setting_value']['en-us'] = 'Value';
$text['label-extension_setting_value']['ar-eg'] = '';
$text['label-extension_setting_value']['de-at'] = '';
$text['label-extension_setting_value']['de-ch'] = '';
$text['label-extension_setting_value']['de-de'] = '';
$text['label-extension_setting_value']['es-cl'] = '';
$text['label-extension_setting_value']['es-mx'] = '';
$text['label-extension_setting_value']['fr-ca'] = '';
$text['label-extension_setting_value']['fr-fr'] = '';
$text['label-extension_setting_value']['he-il'] = '';
$text['label-extension_setting_value']['it-it'] = '';
$text['label-extension_setting_value']['nl-nl'] = '';
$text['label-extension_setting_value']['pl-pl'] = '';
$text['label-extension_setting_value']['pt-br'] = '';
$text['label-extension_setting_value']['pt-pt'] = '';
$text['label-extension_setting_value']['ro-ro'] = '';
$text['label-extension_setting_value']['ru-ru'] = '';
$text['label-extension_setting_value']['sv-se'] = '';
$text['label-extension_setting_value']['uk-ua'] = '';
$text['description-extension_setting_value']['en-us'] = 'Enter the extension value.';
$text['description-extension_setting_value']['ar-eg'] = '';
$text['description-extension_setting_value']['de-at'] = '';
$text['description-extension_setting_value']['de-ch'] = '';
$text['description-extension_setting_value']['de-de'] = '';
$text['description-extension_setting_value']['es-cl'] = '';
$text['description-extension_setting_value']['es-mx'] = '';
$text['description-extension_setting_value']['fr-ca'] = '';
$text['description-extension_setting_value']['fr-fr'] = '';
$text['description-extension_setting_value']['he-il'] = '';
$text['description-extension_setting_value']['it-it'] = '';
$text['description-extension_setting_value']['nl-nl'] = '';
$text['description-extension_setting_value']['pl-pl'] = '';
$text['description-extension_setting_value']['pt-br'] = '';
$text['description-extension_setting_value']['pt-pt'] = '';
$text['description-extension_setting_value']['ro-ro'] = '';
$text['description-extension_setting_value']['ru-ru'] = '';
$text['description-extension_setting_value']['sv-se'] = '';
$text['description-extension_setting_value']['uk-ua'] = '';
$text['label-extension_setting_enabled']['en-us'] = 'Enabled';
$text['label-extension_setting_enabled']['ar-eg'] = '';
$text['label-extension_setting_enabled']['de-at'] = '';
$text['label-extension_setting_enabled']['de-ch'] = '';
$text['label-extension_setting_enabled']['de-de'] = '';
$text['label-extension_setting_enabled']['es-cl'] = '';
$text['label-extension_setting_enabled']['es-mx'] = '';
$text['label-extension_setting_enabled']['fr-ca'] = '';
$text['label-extension_setting_enabled']['fr-fr'] = '';
$text['label-extension_setting_enabled']['he-il'] = '';
$text['label-extension_setting_enabled']['it-it'] = '';
$text['label-extension_setting_enabled']['nl-nl'] = '';
$text['label-extension_setting_enabled']['pl-pl'] = '';
$text['label-extension_setting_enabled']['pt-br'] = '';
$text['label-extension_setting_enabled']['pt-pt'] = '';
$text['label-extension_setting_enabled']['ro-ro'] = '';
$text['label-extension_setting_enabled']['ru-ru'] = '';
$text['label-extension_setting_enabled']['sv-se'] = '';
$text['label-extension_setting_enabled']['uk-ua'] = '';
$text['description-extension_setting_enabled']['en-us'] = 'Enter the extension enabled.';
$text['description-extension_setting_enabled']['ar-eg'] = '';
$text['description-extension_setting_enabled']['de-at'] = '';
$text['description-extension_setting_enabled']['de-ch'] = '';
$text['description-extension_setting_enabled']['de-de'] = '';
$text['description-extension_setting_enabled']['es-cl'] = '';
$text['description-extension_setting_enabled']['es-mx'] = '';
$text['description-extension_setting_enabled']['fr-ca'] = '';
$text['description-extension_setting_enabled']['fr-fr'] = '';
$text['description-extension_setting_enabled']['he-il'] = '';
$text['description-extension_setting_enabled']['it-it'] = '';
$text['description-extension_setting_enabled']['nl-nl'] = '';
$text['description-extension_setting_enabled']['pl-pl'] = '';
$text['description-extension_setting_enabled']['pt-br'] = '';
$text['description-extension_setting_enabled']['pt-pt'] = '';
$text['description-extension_setting_enabled']['ro-ro'] = '';
$text['description-extension_setting_enabled']['ru-ru'] = '';
$text['description-extension_setting_enabled']['sv-se'] = '';
$text['description-extension_setting_enabled']['uk-ua'] = '';
$text['label-extension_setting_description']['en-us'] = 'Description';
$text['label-extension_setting_description']['ar-eg'] = '';
$text['label-extension_setting_description']['de-at'] = '';
$text['label-extension_setting_description']['de-ch'] = '';
$text['label-extension_setting_description']['de-de'] = '';
$text['label-extension_setting_description']['es-cl'] = '';
$text['label-extension_setting_description']['es-mx'] = '';
$text['label-extension_setting_description']['fr-ca'] = '';
$text['label-extension_setting_description']['fr-fr'] = '';
$text['label-extension_setting_description']['he-il'] = '';
$text['label-extension_setting_description']['it-it'] = '';
$text['label-extension_setting_description']['nl-nl'] = '';
$text['label-extension_setting_description']['pl-pl'] = '';
$text['label-extension_setting_description']['pt-br'] = '';
$text['label-extension_setting_description']['pt-pt'] = '';
$text['label-extension_setting_description']['ro-ro'] = '';
$text['label-extension_setting_description']['ru-ru'] = '';
$text['label-extension_setting_description']['sv-se'] = '';
$text['label-extension_setting_description']['uk-ua'] = '';
$text['description-extension_setting_description']['en-us'] = 'Enter the extension description.';
$text['description-extension_setting_description']['ar-eg'] = '';
$text['description-extension_setting_description']['de-at'] = '';
$text['description-extension_setting_description']['de-ch'] = '';
$text['description-extension_setting_description']['de-de'] = '';
$text['description-extension_setting_description']['es-cl'] = '';
$text['description-extension_setting_description']['es-mx'] = '';
$text['description-extension_setting_description']['fr-ca'] = '';
$text['description-extension_setting_description']['fr-fr'] = '';
$text['description-extension_setting_description']['he-il'] = '';
$text['description-extension_setting_description']['it-it'] = '';
$text['description-extension_setting_description']['nl-nl'] = '';
$text['description-extension_setting_description']['pl-pl'] = '';
$text['description-extension_setting_description']['pt-br'] = '';
$text['description-extension_setting_description']['pt-pt'] = '';
$text['description-extension_setting_description']['ro-ro'] = '';
$text['description-extension_setting_description']['ru-ru'] = '';
$text['description-extension_setting_description']['sv-se'] = '';
$text['description-extension_setting_description']['uk-ua'] = '';
?>

View File

@@ -0,0 +1,375 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021
the Initial Developer. All Rights Reserved.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('extension_setting_add') || permission_exists('extension_setting_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//action add or update
if (is_uuid($_REQUEST["id"])) {
$action = "update";
$extension_setting_uuid = $_REQUEST["id"];
$id = $_REQUEST["id"];
}
else {
$action = "add";
}
//get the extension id
if (is_uuid($_REQUEST["extension_setting_uuid"])) {
$extension_setting_uuid = $_REQUEST["extension_setting_uuid"];
}
if (is_uuid($_REQUEST["extension_uuid"])) {
$extension_uuid = $_REQUEST["extension_uuid"];
}
//get http post variables and set them to php variables
if (is_array($_POST)) {
$domain_uuid = $_POST["domain_uuid"];
$extension_setting_type = $_POST["extension_setting_type"];
$extension_setting_name = $_POST["extension_setting_name"];
$extension_setting_value = $_POST["extension_setting_value"];
$extension_setting_enabled = $_POST["extension_setting_enabled"];
$extension_setting_description = $_POST["extension_setting_description"];
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: extension_settings.php?id='.$extension_uuid);
exit;
}
//process the http post data by submitted action
if ($_POST['action'] != '' && strlen($_POST['action']) > 0) {
//prepare the array(s)
//send the array to the database class
switch ($_POST['action']) {
case 'copy':
if (permission_exists('extension_setting_add')) {
$obj = new database;
$obj->copy($array);
}
break;
case 'delete':
if (permission_exists('extension_setting_delete')) {
$obj = new database;
$obj->delete($array);
}
break;
case 'toggle':
if (permission_exists('extension_setting_update')) {
$obj = new database;
$obj->toggle($array);
}
break;
}
//redirect the user
if (in_array($_POST['action'], array('copy', 'delete', 'toggle')) && is_uuid($id) && is_uuid($extension_uuid)) {
header('Location: extension_setting_edit.php?id='.$id.'&extension_uuid='.$extension_uuid);
exit;
}
}
//check for all required data
$msg = '';
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
if (strlen($extension_setting_type) == 0) { $msg .= $text['message-required']." ".$text['label-extension_setting_type']."<br>\n"; }
if (strlen($extension_setting_name) == 0) { $msg .= $text['message-required']." ".$text['label-extension_setting_name']."<br>\n"; }
//if (strlen($extension_setting_value) == 0) { $msg .= $text['message-required']." ".$text['label-extension_setting_value']."<br>\n"; }
if (strlen($extension_setting_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-extension_setting_enabled']."<br>\n"; }
//if (strlen($extension_setting_description) == 0) { $msg .= $text['message-required']." ".$text['label-extension_setting_description']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
echo "<table><tr><td>\n";
echo $msg."<br />";
echo "</td></tr></table>\n";
persistformvar($_POST);
echo "</div>\n";
require_once "resources/footer.php";
return;
}
//add the extension_setting_uuid
if (!is_uuid($extension_setting_uuid)) {
$extension_setting_uuid = uuid();
}
//prepare the array
$array['extension_settings'][0]['extension_setting_uuid'] = $extension_setting_uuid;
$array['extension_settings'][0]['extension_uuid'] = $extension_uuid;
$array['extension_settings'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
//$array['extension_settings'][0]['domain_uuid'] = $domain_uuid;
$array['extension_settings'][0]['extension_setting_type'] = $extension_setting_type;
$array['extension_settings'][0]['extension_setting_name'] = $extension_setting_name;
$array['extension_settings'][0]['extension_setting_value'] = $extension_setting_value;
$array['extension_settings'][0]['extension_setting_enabled'] = $extension_setting_enabled;
$array['extension_settings'][0]['extension_setting_description'] = $extension_setting_description;
//save the data
$database = new database;
$database->app_name = 'extension settings';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
//clear the cache
$sql = "select extension, number_alias, user_context from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$extension = $database->select($sql, $parameters, 'row');
$cache = new cache;
$cache->delete("directory:".$extension["extension"]."@".$extension["user_context"]);
$cache->delete("directory:".$extension["number_alias"]."@".$extension["user_context"]);
//redirect the user
if (isset($action)) {
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
}
if ($action == "update") {
$_SESSION["message"] = $text['message-update'];
}
//header('Location: extension_settings.php');
header('Location: extension_setting_edit.php?id='.urlencode($extension_setting_uuid).'&extension_uuid='.$extension_uuid);
return;
}
}
//pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
$sql = "select ";
//$sql .= "extension_uuid, ";
//$sql .= "domain_uuid, ";
$sql .= "extension_setting_uuid, ";
$sql .= "extension_setting_type, ";
$sql .= "extension_setting_name, ";
$sql .= "extension_setting_value, ";
$sql .= "cast(extension_setting_enabled as text), ";
$sql .= "extension_setting_description ";
$sql .= "from v_extension_settings ";
$sql .= "where extension_setting_uuid = :extension_setting_uuid ";
//$sql .= "and domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['extension_setting_uuid'] = $extension_setting_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (is_uuid($row["extension_uuid"])) {
$extension_uuid = $row["extension_uuid"];
}
//$domain_uuid = $row["domain_uuid"];
$extension_setting_type = $row["extension_setting_type"];
$extension_setting_name = $row["extension_setting_name"];
$extension_setting_value = $row["extension_setting_value"];
$extension_setting_enabled = $row["extension_setting_enabled"];
$extension_setting_description = $row["extension_setting_description"];
}
unset($sql, $parameters, $row);
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//show the header
$document['title'] = $text['title-extension_setting'];
require_once "resources/header.php";
//show the content
echo "<form name='frm' id='frm' method='post' action=''>\n";
echo "<input class='formfld' type='hidden' name='extension_setting_uuid' value='".escape($extension_setting_uuid)."'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-extension_setting']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'extension_settings.php?id='.$extension_uuid]);
if ($action == 'update') {
if (permission_exists('_add')) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
}
if (permission_exists('_delete')) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
}
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'hide-xs']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['title_description-extension_settings']."\n";
echo "<br /><br />\n";
if ($action == 'update') {
if (permission_exists('extension_setting_add')) {
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]);
}
if (permission_exists('extension_setting_delete')) {
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
}
}
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
//echo "<tr>\n";
//echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-domain_uuid']."\n";
//echo "</td>\n";
//echo "<td class='vtable' style='position: relative;' align='left'>\n";
//echo " <select class='formfld' name='domain_uuid'>\n";
//if (strlen($domain_uuid) == 0) {
// echo " <option value='' selected='selected'>".$text['select-global']."</option>\n";
//}
//else {
// echo " <option value=''>".$text['label-global']."</option>\n";
//}
//foreach ($_SESSION['domains'] as $row) {
// if ($row['domain_uuid'] == $domain_uuid) {
// echo " <option value='".$row['domain_uuid']."' selected='selected'>".escape($row['domain_name'])."</option>\n";
// }
// else {
// echo " <option value='".$row['domain_uuid']."'>".$row['domain_name']."</option>\n";
// }
//}
//echo " </select>\n";
//echo "<br />\n";
//echo $text['description-domain_uuid']."\n";
//echo "</td>\n";
//echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension_setting_type']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='extension_setting_type'>\n";
echo " <option value=''></option>\n";
if ($extension_setting_type == "param") {
echo " <option value='param' selected='selected'>".$text['label-param']."</option>\n";
}
else {
echo " <option value='param'>".$text['label-param']."</option>\n";
}
if ($extension_setting_type == "variable") {
echo " <option value='variable' selected='selected'>".$text['label-variable']."</option>\n";
}
else {
echo " <option value='variable'>".$text['label-variable']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-extension_setting_type']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension_setting_name']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='extension_setting_name' maxlength='255' value='".escape($extension_setting_name)."'>\n";
echo "<br />\n";
echo $text['description-extension_setting_name']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension_setting_value']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='extension_setting_value' maxlength='255' value='".escape($extension_setting_value)."'>\n";
echo "<br />\n";
echo $text['description-extension_setting_value']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension_setting_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='extension_setting_enabled'>\n";
if ($extension_setting_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($extension_setting_enabled == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-extension_setting_enabled']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-extension_setting_description']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='extension_setting_description' maxlength='255' value='".escape($extension_setting_description)."'>\n";
echo "<br />\n";
echo $text['description-extension_setting_description']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br /><br />\n";
echo "<input type='hidden' name='extension_uuid' value='".$extension_uuid."'>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -0,0 +1,327 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021
the Initial Developer. All Rights Reserved.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('extension_setting_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get the http post data
if (is_array($_POST['extension_settings'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$extension_settings = $_POST['extension_settings'];
}
//action add or update
if (is_uuid($_REQUEST["id"])) {
$extension_uuid = $_REQUEST["id"];
}
//process the http post data by action
if ($action != '' && is_array($extension_settings) && @sizeof($extension_settings) != 0) {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: extension_settings.php');
exit;
}
//prepare the array
foreach($extension_settings as $row) {
$array['extension_settings'][$x]['checked'] = $row['checked'];
$array['extension_settings'][$x]['extension_setting_uuid'] = $row['extension_setting_uuid'];
$array['extension_settings'][$x]['extension_setting_enabled'] = $row['extension_setting_enabled'];
$x++;
}
//prepare the database object
$database = new database;
$database->app_name = 'extension_settings';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
//send the array to the database class
switch ($action) {
case 'copy':
if (permission_exists('extension_setting_add')) {
$database->copy($array);
}
break;
case 'toggle':
if (permission_exists('extension_setting_edit')) {
$database->toggle($array);
}
break;
case 'delete':
if (permission_exists('extension_setting_delete')) {
$database->delete($array);
}
break;
}
//redirect the user
header('Location: extension_settings.php?id='.urlencode($extension_uuid).'&'.($search != '' ? '?search='.urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//add the search
if (isset($_GET["search"])) {
$search = strtolower($_GET["search"]);
}
//get the count
$sql = "select count(extension_setting_uuid) ";
$sql .= "from v_extension_settings ";
$sql .= "where extension_uuid = :extension_uuid ";
if (isset($search)) {
$sql .= "and (";
$sql .= " lower(extension_setting_type) like :search ";
$sql .= " or lower(extension_setting_name) like :search ";
$sql .= " or lower(extension_setting_description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
else {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
}
$parameters['domain_uuid'] = $domain_uuid;
}
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
//get the list
$sql = "select ";
//$sql .= "d.domain_name, ";
$sql .= "extension_setting_uuid, ";
$sql .= "extension_setting_type, ";
$sql .= "extension_setting_name, ";
$sql .= "extension_setting_value, ";
$sql .= "cast(extension_setting_enabled as text), ";
$sql .= "extension_setting_description ";
$sql .= "from v_extension_settings as e ";
//$sql .= ",v_domains as d ";
$sql .= "where extension_uuid = :extension_uuid ";
$sql .= "and (e.domain_uuid = :domain_uuid or e.domain_uuid is null) ";
//$sql .= "and d.domain_uuid = e.domain_uuid ";
if (isset($_GET["search"])) {
$sql .= "and (";
$sql .= " lower(extension_setting_type) like :search ";
$sql .= " or lower(extension_setting_name) like :search ";
$sql .= " or lower(extension_setting_description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, 'extension_setting_type', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$parameters['extension_uuid'] = $extension_uuid;
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$extension_settings = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//additional includes
$document['title'] = $text['title-extension_settings'];
require_once "resources/header.php";
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-extension_settings']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_add','name'=>'btn_add','link'=>'/app/extensions/extension_edit.php?id='.$extension_uuid]);
if (permission_exists('extension_setting_add')) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','name'=>'btn_add','link'=>'extension_setting_edit.php?extension_uuid='.$extension_uuid]);
}
if (permission_exists('extension_setting_add') && $extension_settings) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display:none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
}
if (permission_exists('extension_setting_edit') && $extension_settings) {
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','name'=>'btn_toggle','style'=>'display:none;','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
}
if (permission_exists('extension_setting_delete') && $extension_settings) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
//if (permission_exists('extension_setting_all')) {
// if ($_GET['show'] == 'all') {
// echo " <input type='hidden' name='show' value='all'>\n";
// }
// else {
// echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all&id='.$extension_uuid]);
// }
//}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'extension_settings.php?id='.$extension_uuid,'style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " <input type='hidden' name='id' value='".$extension_uuid."'>\n";
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (permission_exists('extension_setting_add') && $extension_settings) {
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
}
if (permission_exists('extension_setting_edit') && $extension_settings) {
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
}
if (permission_exists('extension_setting_delete') && $extension_settings) {
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
}
echo $text['title_description-extension_settings']."\n";
echo "<br /><br />\n";
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<table class='list'>\n";
if (is_array($extension_settings) && @sizeof($extension_settings) != 0) {
$x = 0;
foreach ($extension_settings as $row) {
$extension_setting_type = $row['extension_setting_type'];
$extension_setting_type = strtolower($extension_setting_type);
$label_extension_setting_type = $row['extension_setting_type'];
$label_extension_setting_type = str_replace("_", " ", $label_extension_setting_type);
$label_extension_setting_type = str_replace("-", " ", $label_extension_setting_type);
$label_extension_setting_type = ucwords($label_extension_setting_type);
if ($previous_extension_setting_type !== $row['extension_setting_type']) {
echo " <tr>";
echo " <td align='left' colspan='999'>&nbsp;</td>\n";
echo " </tr>";
echo " <tr>";
echo " <td align='left' colspan='999' nowrap='nowrap'><b>".escape($label_extension_setting_type)."</b></td>\n";
echo " </tr>";
echo "<tr class='list-header'>\n";
if (permission_exists('extension_setting_add') || permission_exists('extension_setting_edit') || permission_exists('extension_setting_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all_".$extension_setting_type."' name='checkbox_all' onclick=\"list_all_toggle('".$extension_setting_type."'); checkbox_on_change(this);\">\n";
echo " </th>\n";
}
//if ($_GET['show'] == 'all' && permission_exists('extension_setting_all')) {
// echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
//}
//echo th_order_by('extension_setting_type', $text['label-extension_setting_type'], $order_by, $order);
//echo th_order_by('extension_setting_name', $text['label-extension_setting_name'], $order_by, $order);
//echo th_order_by('extension_setting_value', $text['label-extension_setting_value'], $order_by, $order);
//echo th_order_by('extension_setting_enabled', $text['label-extension_setting_enabled'], $order_by, $order, null, "class='center'");
echo " <th>".$text['label-extension_setting_type']."</th>\n";
echo " <th>".$text['label-extension_setting_name']."</th>\n";
echo " <th>".$text['label-extension_setting_value']."</th>\n";
echo " <th class='center'>".$text['label-extension_setting_enabled']."</th>\n";
echo " <th class='hide-sm-dn'>".$text['label-extension_setting_description']."</th>\n";
if (permission_exists('extension_setting_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
}
if (permission_exists('extension_setting_edit')) {
$list_row_url = "extension_setting_edit.php?id=".urlencode($row['extension_setting_uuid'])."&extension_uuid=".urlencode($extension_uuid);
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('extension_setting_add') || permission_exists('extension_setting_edit') || permission_exists('extension_setting_delete')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='extension_settings[$x][checked]' id='checkbox_".$x."' class='checkbox_".$extension_setting_type."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all_".$extension_setting_type."').checked = false; }\">\n";
echo " <input type='hidden' name='extension_settings[$x][extension_setting_uuid]' value='".escape($row['extension_setting_uuid'])."' />\n";
echo " </td>\n";
}
//if ($_GET['show'] == 'all' && permission_exists('extension_setting_all')) {
// echo " <td>".escape($row['domain_name'])."</td>\n";
//}
echo " <td>".escape($row['extension_setting_type'])."</td>\n";
echo " <td>".escape($row['extension_setting_name'])."</td>\n";
echo " <td>".escape($row['extension_setting_value'])."</td>\n";
if (permission_exists('extension_setting_edit')) {
echo " <td class='no-link center'>\n";
echo " <input type='hidden' name='number_translations[$x][extension_setting_enabled]' value='".escape($row['extension_setting_enabled'])."' />\n";
echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.$row['extension_setting_enabled']],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]);
}
else {
echo " <td class='center'>\n";
echo $text['label-'.$row['extension_setting_enabled']];
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['extension_setting_description'])."</td>\n";
if (permission_exists('extension_setting_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";
//set the previous category
$previous_extension_setting_type = $row['extension_setting_type'];
$x++;
}
unset($extension_settings);
}
echo "</table>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$id."' value='".$extension_uuid."'>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -0,0 +1,276 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
/**
* extension_settings class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('extension_settings')) {
class extension_settings {
/**
* declare the variables
*/
private $app_name;
private $app_uuid;
private $name;
private $table;
private $toggle_field;
private $toggle_values;
private $description_field;
private $location;
/**
* called when the object is created
*/
public function __construct() {
//assign the variables
$this->app_name = 'extension_settings';
$this->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$this->name = 'extension_setting';
$this->table = 'extension_settings';
$this->toggle_field = 'extension_setting_enabled';
$this->toggle_values = ['true','false'];
$this->description_field = 'extension_setting_description';
$this->location = 'extension_settings.php';
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete rows from the database
*/
public function delete($records) {
if (permission_exists($this->name.'_delete')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//delete multiple records
if (is_array($records) && @sizeof($records) != 0) {
//build the delete array
$x = 0;
foreach ($records as $record) {
//add to the array
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$array[$this->table][$x][$this->name.'_uuid'] = $record['uuid'];
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
}
//increment the id
$x++;
}
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//execute delete
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->delete($array);
unset($array);
//clear the cache
$sql = "select extension, number_alias, user_context from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$extension = $database->select($sql, $parameters, 'row');
$cache = new cache;
$cache->delete("directory:".$extension["extension"]."@".$extension["user_context"]);
$cache->delete("directory:".$extension["number_alias"]."@".$extension["user_context"]);
//set message
message::add($text['message-delete']);
}
unset($records);
}
}
}
/**
* toggle a field between two values
*/
public function toggle($records) {
if (permission_exists($this->name.'_edit')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->name."_uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$states[$row['uuid']] = $row['toggle'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach($states as $uuid => $state) {
//create the array
$array[$this->table][$x][$this->name.'_uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $state == $this->toggle_values[0] ? $this->toggle_values[1] : $this->toggle_values[0];
//increment the id
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//set message
message::add($text['message-toggle']);
}
unset($records, $states);
}
}
}
/**
* copy rows from the database
*/
public function copy($records) {
if (permission_exists($this->name.'_add')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//copy the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get checked records
foreach($records as $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
//create the array from existing data
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select * from v_".$this->table." ";
$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
$x = 0;
foreach ($rows as $row) {
//copy data
$array[$this->table][$x] = $row;
//add copy to the description
$array[$this->table][$x][$this->name.'_uuid'] = uuid();
$array[$this->table][$x][$this->description_field] = trim($row[$this->description_field]).' ('.$text['label-copy'].')';
//increment the id
$x++;
}
}
unset($sql, $parameters, $rows, $row);
}
//save the changes and set the message
if (is_array($array) && @sizeof($array) != 0) {
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//set message
message::add($text['message-copy']);
}
unset($records);
}
}
}
}
}
?>

90
app/extension_settings/root.php Executable file
View File

@@ -0,0 +1,90 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>

View File

@@ -48,22 +48,9 @@
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${description}";
$y++;
$apps[$x]['destinations'][$y]['type'] = "sql";
$apps[$x]['destinations'][$y]['label'] = "loopback";
$apps[$x]['destinations'][$y]['name'] = "extensions";
$apps[$x]['destinations'][$y]['sql'] = "select extension_uuid, extension, number_alias, user_context as context, description from v_extensions ";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc";
$apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid";
$apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension";
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
$apps[$x]['destinations'][$y]['field']['description'] = "description";
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "loopback/\${destination}/\${context}";
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${description}";
$y++;
$apps[$x]['destinations'][$y]['type'] = "sql";
$apps[$x]['destinations'][$y]['label'] = "call_groups";
$apps[$x]['destinations'][$y]['name'] = "extensions";
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select extension_uuid, distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
$apps[$x]['destinations'][$y]['sql']['pgsql'] = "select distinct(unnest(string_to_array(call_group, ','))) as destination from v_extensions ";
$apps[$x]['destinations'][$y]['sql']['sqlite'] = "select distinct(call_group) as destination from v_extensions";
$apps[$x]['destinations'][$y]['sql']['mysql'] = "select distinct(call_group) as destination from v_extensions";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_group <> '' and enabled = 'true' ";
@@ -97,6 +84,10 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_extension";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "number_alias";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
@@ -169,6 +160,8 @@
$apps[$x]['permissions'][$y]['name'] = "emergency_caller_id_number";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "emergency_caller_id_select";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_user_record";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
@@ -213,6 +206,26 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_directory";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_limit";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_call_group";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_hold_music";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
//default settings
@@ -578,12 +591,6 @@
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_follow_me";
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "follow_me_uuid";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "forward_caller_id_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]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "follow_me_enabled";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -1150,8 +1150,8 @@ $text['label-hold_music']['de-ch'] = "Wartemusik"; //copied from de-de
$text['label-hold_music']['de-de'] = "Wartemusik";
$text['label-hold_music']['es-cl'] = "Música en Espera";
$text['label-hold_music']['es-mx'] = "Música en Espera"; //copied from es-cl
$text['label-hold_music']['fr-ca'] = "Musique de Garde"; //copied from fr-fr
$text['label-hold_music']['fr-fr'] = "Musique de Garde";
$text['label-hold_music']['fr-ca'] = "Musique d'attente"; //copied from fr-fr
$text['label-hold_music']['fr-fr'] = "Musique d'attente";
$text['label-hold_music']['he-il'] = "מוסיקה בהמתנה";
$text['label-hold_music']['it-it'] = "Musica di Attesa";
$text['label-hold_music']['nl-nl'] = "Wachtmuziek";
@@ -2460,8 +2460,8 @@ $text['description-hold_music']['de-ch'] = "Wählen Sie die Wartemusik Kategorie
$text['description-hold_music']['de-de'] = "Wählen Sie die Wartemusik Kategorie.";
$text['description-hold_music']['es-cl'] = "Ingrese la categoría de música en espera aquí";
$text['description-hold_music']['es-mx'] = "Ingrese la categoría de música en espera aquí"; //copied from es-cl
$text['description-hold_music']['fr-ca'] = "Choisir la musique de garde."; //copied from fr-fr
$text['description-hold_music']['fr-fr'] = "Choisir la musique de garde.";
$text['description-hold_music']['fr-ca'] = "Choisir la musique d'attente'."; //copied from fr-fr
$text['description-hold_music']['fr-fr'] = "Choisir la musique d'attente.";
$text['description-hold_music']['he-il'] = "";
$text['description-hold_music']['it-it'] = "Seleziona la categoria di Musica d'attesa.";
$text['description-hold_music']['nl-nl'] = "Kies Wachtmuziek hier.";
@@ -2746,8 +2746,8 @@ $text['description-dial_string']['ru-ru'] = "Местоположение кон
$text['description-dial_string']['sv-se'] = "Plats för enheten.";
$text['description-dial_string']['uk-ua'] = "";
$text['description-cidr']['en-us'] = "Enter the CIDR here.";
$text['description-cidr']['en-gb'] = "Enter the CIDR here.";
$text['description-cidr']['en-us'] = "Enter allowed address/ranges in CIDR notation (comma separated).";
$text['description-cidr']['en-gb'] = "Enter allowed address/ranges in CIDR notation (comma separated).";
$text['description-cidr']['ar-eg'] = "";
$text['description-cidr']['de-at'] = "Geben Sie hier die Beschränkung der IP Adresse an (z.B. 1.2.3.4/32)"; //copied from de-de
$text['description-cidr']['de-ch'] = "Geben Sie hier die Beschränkung der IP Adresse an (z.B. 1.2.3.4/32)"; //copied from de-de

View File

@@ -92,7 +92,6 @@
$available_columns[] = 'follow_me_uuid';
$available_columns[] = 'enabled';
$available_columns[] = 'description';
$available_columns[] = 'forward_caller_id_uuid';
$available_columns[] = 'absolute_codec_string';
$available_columns[] = 'forward_user_not_registered_destination';
$available_columns[] = 'forward_user_not_registered_enabled';
@@ -210,4 +209,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -76,7 +76,16 @@
if (count($_POST) > 0) {
//get the values from the HTTP POST and save them as PHP variables
$extension = str_replace(' ','-',$_POST["extension"]);
if ($action == 'add' || permission_exists("extension_extension")) {
$extension = str_replace(' ','-',$_POST["extension"]);
}
else { //lookup extension based on submitted uuid
$sql = "select extension from v_extensions where extension_uuid = :extension_uuid";
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$extension = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
}
$number_alias = $_POST["number_alias"];
$password = $_POST["password"];
@@ -133,6 +142,24 @@
$voicemail_id = null;
}
$cidrs = preg_split("/[\s,]+/", $cidr);
$ips = array();
foreach ($cidrs as $ipaddr){
$cx = strpos($ipaddr, '/');
if ($cx){
$subnet = (int)(substr($ipaddr, $cx+1));
$ipaddr = substr($ipaddr, 0, $cx);
}
else{
$subnet = 32;
}
if(($addr = inet_pton($ipaddr)) !== false){
$ips[] = $ipaddr.'/'.$subnet;
}
}
$cidr = implode(',',$ips);
//change toll allow delimiter
$toll_allow = str_replace(',',':', $toll_allow);
@@ -267,15 +294,6 @@
return;
}
//set the default user context
if (permission_exists("extension_user_context")) {
//allow a user assigned to super admin to change the user_context
}
else {
//if the user_context was not set then set the default value
$user_context = $_SESSION['domain_name'];
}
//prevent users from bypassing extension limit by using range
if ($_SESSION['limit']['extensions']['numeric'] != '') {
if ($total_extensions + $range > $_SESSION['limit']['extensions']['numeric']){
@@ -396,13 +414,24 @@
if (permission_exists("emergency_caller_id_number")) {
$array["extensions"][$i]["emergency_caller_id_number"] = $emergency_caller_id_number;
}
$array["extensions"][$i]["directory_first_name"] = $directory_first_name;
$array["extensions"][$i]["directory_last_name"] = $directory_last_name;
$array["extensions"][$i]["directory_visible"] = $directory_visible;
$array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
$array["extensions"][$i]["limit_max"] = $limit_max;
$array["extensions"][$i]["limit_destination"] = $limit_destination;
$array["extensions"][$i]["user_context"] = $user_context;
if (permission_exists("extension_directory")) {
$array["extensions"][$i]["directory_first_name"] = $directory_first_name;
$array["extensions"][$i]["directory_last_name"] = $directory_last_name;
$array["extensions"][$i]["directory_visible"] = $directory_visible;
$array["extensions"][$i]["directory_exten_visible"] = $directory_exten_visible;
}
if (permission_exists("extension_limit")) {
$array["extensions"][$i]["limit_max"] = $limit_max;
$array["extensions"][$i]["limit_destination"] = $limit_destination;
}
if (permission_exists("extension_user_context")) {
$array["extensions"][$i]["user_context"] = $user_context;
}
else {
if ($action == "add") {
$array["extensions"][$i]["user_context"] = $_SESSION['domain_name'];
}
}
if (permission_exists('extension_missed_call')) {
$array["extensions"][$i]["missed_call_app"] = $missed_call_app;
$array["extensions"][$i]["missed_call_data"] = $missed_call_data;
@@ -413,12 +442,16 @@
if (strlen($call_timeout) > 0) {
$array["extensions"][$i]["call_timeout"] = $call_timeout;
}
$array["extensions"][$i]["call_group"] = $call_group;
if (permission_exists("extension_call_group")) {
$array["extensions"][$i]["call_group"] = $call_group;
}
$array["extensions"][$i]["call_screen_enabled"] = $call_screen_enabled;
if (permission_exists('extension_user_record')) {
$array["extensions"][$i]["user_record"] = $user_record;
}
$array["extensions"][$i]["hold_music"] = $hold_music;
if (permission_exists('extension_hold_music')) {
$array["extensions"][$i]["hold_music"] = $hold_music;
}
$array["extensions"][$i]["auth_acl"] = $auth_acl;
if (permission_exists("extension_cidr")) {
$array["extensions"][$i]["cidr"] = $cidr;
@@ -535,6 +568,7 @@
$array["voicemails"][$i]["voicemail_enabled"] = $voicemail_enabled;
$array["voicemails"][$i]["voicemail_description"] = $description;
$array["voicemails"][$i]["voicemail_tutorial"] = $voicemail_tutorial;
$array["voicemails"][$i]["voicemail_transcription_enabled"] = $_SESSION['voicemail']['transcription_enabled_default']['boolean'] ?: false;
}
}
@@ -622,11 +656,24 @@
}
//clear the cache
if (!permission_exists("extension_user_context") && $action == "update") {
$sql = "select user_context from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$user_context = $database->select($sql, $parameters, 'column');
}
$cache = new cache;
$cache->delete("directory:".$extension."@".$user_context);
if (permission_exists('number_alias') && strlen($number_alias) > 0) {
$cache->delete("directory:".$number_alias."@".$user_context);
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
}
//set the message and redirect
@@ -802,6 +849,19 @@
$destinations = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//get the emergency destinations
if (permission_exists('emergency_caller_id_select')) {
$sql = "select * from v_destinations ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and destination_type = 'inbound' ";
$sql .= "and destination_type_emergency = 1 ";
$sql .= "order by destination_number asc ";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$emergency_destinations = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
}
//change toll allow delimiter
$toll_allow = str_replace(':',',', $toll_allow);
@@ -836,7 +896,7 @@
echo " document.iform.range_to.disabled = endis;\n";
echo "}\n";
echo "\n";
if (permission_exists(extension_advanced)) {
if (permission_exists('extension_advanced')) {
echo "function show_advanced_config() {\n";
echo " $('#show_advanced_box').slideToggle();\n";
echo " $('#show_advanced').slideToggle();\n";
@@ -884,12 +944,13 @@
echo button::create(['type'=>'button','label'=>$text['button-call_forward'],'icon'=>'project-diagram','style'=>$button_margin,'link'=>'../calls/call_edit.php?id='.urlencode($extension_uuid)]);
unset($button_margin);
}
if (permission_exists('extension_setting_view')) {
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
}
if (permission_exists('extension_copy')) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]);
}
if (permission_exists('domain_setting_view') && file_exists(PROJECT_PATH.'/app/extension_settings/app_config.php')) {
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
}
}
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
echo " </div>\n";
@@ -903,10 +964,15 @@
echo " ".$text['label-extension']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension)."\" required='required'>\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-extension']."\n";
if ($action == "add" || permission_exists("extension_extension")) {
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension)."\" required='required'>\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-extension']."\n";
}
else {
echo escape($extension);
}
echo "</td>\n";
echo "</tr>\n";
@@ -1300,7 +1366,31 @@
echo " ".$text['label-emergency_caller_id_name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (permission_exists('outbound_caller_id_select')) {
if (permission_exists('emergency_caller_id_select')) {
if (count($emergency_destinations) > 0) {
echo " <select name='emergency_caller_id_name' id='emergency_caller_id_name' class='formfld'>\n";
echo " <option value=''></option>\n";
foreach ($emergency_destinations as &$row) {
$tmp = $row["destination_caller_id_name"];
if(strlen($tmp) == 0){
$tmp = $row["destination_description"];
}
if(strlen($tmp) > 0){
if ($emergency_caller_id_name == $tmp) {
echo " <option value='".escape($tmp)."' selected='selected'>".escape($tmp)."</option>\n";
}
else {
echo " <option value='".escape($tmp)."'>".escape($tmp)."</option>\n";
}
}
}
echo " </select>\n";
}
else {
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
elseif (permission_exists('outbound_caller_id_select')) {
if (count($destinations) > 0) {
echo " <select name='emergency_caller_id_name' id='emergency_caller_id_name' class='formfld'>\n";
echo " <option value=''></option>\n";
@@ -1344,14 +1434,38 @@
echo " ".$text['label-emergency_caller_id_number']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (permission_exists('outbound_caller_id_select')) {
if (permission_exists('emergency_caller_id_select')) {
if (count($emergency_destinations) > 0) {
echo " <select name='emergency_caller_id_number' id='emergency_caller_id_number' class='formfld'>\n";
//echo " <option value=''></option>\n"; Don't allow no selection when validating emergency numbers this way
foreach ($emergency_destinations as &$row) {
$tmp = $row["destination_caller_id_number"];
if(strlen($tmp) == 0){
$tmp = $row["destination_number"];
}
if(strlen($tmp) > 0){
if ($emergency_caller_id_number == $tmp) {
echo " <option value='".escape($tmp)."' selected='selected'>".escape($tmp)."</option>\n";
}
else {
echo " <option value='".escape($tmp)."'>".escape($tmp)."</option>\n";
}
}
}
echo " </select>\n";
}
else {
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
}
}
elseif (permission_exists('outbound_caller_id_select')) {
if (count($destinations) > 0) {
echo " <select name='emergency_caller_id_number' id='emergency_caller_id_number' class='formfld'>\n";
echo " <option value=''></option>\n";
foreach ($destinations as &$row) {
$tmp = $row["destination_caller_id_number"];
if(strlen($tmp) == 0){
$tmp = $row["destination_description"];
$tmp = $row["destination_number"];
}
if(strlen($tmp) > 0){
if ($emergency_caller_id_number == $tmp) {
@@ -1372,7 +1486,10 @@
echo " <input class='formfld' type='text' name='emergency_caller_id_number' maxlength='255' min='0' step='1' value=\"".escape($emergency_caller_id_number)."\">\n";
}
echo "<br />\n";
if (permission_exists('outbound_caller_id_select') && count($destinations) > 0) {
if (permission_exists('emergency_caller_id_select') && count($emergency_destinations) > 0){
echo $text['description-emergency_caller_id_number-select']."\n";
}
elseif (permission_exists('outbound_caller_id_select') && count($destinations) > 0) {
echo $text['description-emergency_caller_id_number-select']."\n";
}
else {
@@ -1382,89 +1499,93 @@
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_full_name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='directory_first_name' maxlength='255' value=\"".escape($directory_first_name)."\">\n";
echo " <input class='formfld' type='text' name='directory_last_name' maxlength='255' value=\"".escape($directory_last_name)."\">\n";
echo "<br />\n";
echo $text['description-directory_full_name']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists("extension_directory")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_full_name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='directory_first_name' maxlength='255' value=\"".escape($directory_first_name)."\">\n";
echo " <input class='formfld' type='text' name='directory_last_name' maxlength='255' value=\"".escape($directory_last_name)."\">\n";
echo "<br />\n";
echo $text['description-directory_full_name']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_visible']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='directory_visible'>\n";
if ($directory_visible == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($directory_visible == "false") {
echo " <option value='false' selected >".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "<br />\n";
echo $text['description-directory_visible']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_visible']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='directory_visible'>\n";
if ($directory_visible == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($directory_visible == "false") {
echo " <option value='false' selected >".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "<br />\n";
echo $text['description-directory_visible']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_exten_visible']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='directory_exten_visible'>\n";
if ($directory_exten_visible == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-directory_exten_visible']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='directory_exten_visible'>\n";
if ($directory_exten_visible == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($directory_exten_visible == "false") {
echo " <option value='false' selected >".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "<br />\n";
echo $text['description-directory_exten_visible']."\n";
echo "</td>\n";
echo "</tr>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($directory_exten_visible == "false") {
echo " <option value='false' selected >".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "<br />\n";
echo $text['description-directory_exten_visible']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-limit_max']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='limit_max' maxlength='255' value=\"".escape($limit_max)."\">\n";
echo "<br />\n";
echo $text['description-limit_max']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists("extension_limit")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-limit_max']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='limit_max' maxlength='255' value=\"".escape($limit_max)."\">\n";
echo "<br />\n";
echo $text['description-limit_max']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-limit_destination']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='limit_destination' maxlength='255' value=\"".escape($limit_destination)."\">\n";
echo "<br />\n";
echo $text['description-limit_destination']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-limit_destination']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='limit_destination' maxlength='255' value=\"".escape($limit_destination)."\">\n";
echo "<br />\n";
echo $text['description-limit_destination']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('voicemail_edit') && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
echo "<tr>\n";
@@ -1593,30 +1714,32 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-call_group']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (is_array($_SESSION['call group']['name'])) {
echo " <select class='formfld' name='call_group'>\n";
echo " <option value=''></option>\n";
foreach ($_SESSION['call group']['name'] as $name) {
if ($name == $call_group) {
echo " <option value='".escape($name)."' selected='selected'>".escape($name)."</option>\n";
}
else {
echo " <option value='".escape($name)."'>".escape($name)."</option>\n";
if (permission_exists("extension_call_group")) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-call_group']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (is_array($_SESSION['call group']['name'])) {
echo " <select class='formfld' name='call_group'>\n";
echo " <option value=''></option>\n";
foreach ($_SESSION['call group']['name'] as $name) {
if ($name == $call_group) {
echo " <option value='".escape($name)."' selected='selected'>".escape($name)."</option>\n";
}
else {
echo " <option value='".escape($name)."'>".escape($name)."</option>\n";
}
}
echo " </select>\n";
} else {
echo " <input class='formfld' type='text' name='call_group' maxlength='255' value=\"".escape($call_group)."\">\n";
}
echo " </select>\n";
} else {
echo " <input class='formfld' type='text' name='call_group' maxlength='255' value=\"".escape($call_group)."\">\n";
echo "<br />\n";
echo $text['description-call_group']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<br />\n";
echo $text['description-call_group']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('extension_call_screen')) {
echo "<tr>\n";
@@ -1683,7 +1806,7 @@
echo "</tr>\n";
}
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold') && permission_exists('extension_hold_music')) {
echo "<tr>\n";
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-hold_music']."\n";

View File

@@ -79,6 +79,16 @@
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//get total extension count for domain
if (is_numeric($_SESSION['limit']['extensions']['numeric'])) {
$sql = "select count(*) from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$total_extensions = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
}
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
@@ -101,15 +111,7 @@
$parameters['search'] = '%'.$search.'%';
}
//get total extension count for domain
if (is_numeric($_SESSION['limit']['extensions']['numeric'])) {
$sql = "select count(*) from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$total_extensions = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
}
//get total extension count
$sql = "select count(*) from v_extensions where true ";

View File

@@ -625,12 +625,12 @@ if (!class_exists('extension')) {
$this->delete_voicemail
&& permission_exists('voicemail_delete')
&& is_array($voicemail_ids)
&& @sizeof($voicemail_ids)
&& @sizeof($voicemail_ids) != 0
) {
//retrieve voicemail uuids
$sql = "select voicemail_uuid as uuid from v_voicemails ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and voicemail_id in (".implode(',', $voicemail_ids).") ";
$sql .= "and voicemail_id in ('".implode("','", $voicemail_ids)."') ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
@@ -683,6 +683,11 @@ if (!class_exists('extension')) {
$this->xml();
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);
@@ -787,6 +792,11 @@ if (!class_exists('extension')) {
}
unset($extensions);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);

View File

@@ -655,334 +655,6 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server Port";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "68feb973-be9a-42ac-94a1-54263dfde589";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_tx_enable";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " LLDP Transmit. 0-Disabled, 1-Enabled";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f0d1dd5b-7130-428c-bddb-a975d85587f5";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_refresh";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "60";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "LLDP Refresh Timer. Default 60 seconds";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "10af1d27-ef61-4c7c-94cf-8db797a84ebc";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lldp_learn";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use LLDP learned information such as voip vlan";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b4cc791a-5389-4e1f-9f87-e8394b399d64";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_vlan";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable VLAN Support. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "16d74bd9-7f44-4780-a202-3cfcbaa6ef5a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_lan_port_vlan";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "256";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone LAN port.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "530564ac-17aa-4167-b047-bf764250d91a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_pc_port_vlan";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone PC port.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2b72e19b-2437-45c0-9df5-4fef6ac078c6";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_diffserv";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable DiffServ(DSCP) Support. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "86081f7e-af03-41b9-a5af-b5593182c9ff";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_voice";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Voice media";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8050cfbd-44d1-46db-b553-2cc0defd5fc2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_rtp_video";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for RTP Video media";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ddf89377-7303-435c-917a-bdd32579cf36";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_qos_sip";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 2 QoS 802.1p Priority Value for SIP signaling";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b6a89aa6-2e21-489c-8f1f-e819e6ced17b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_voice";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Voice media";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9a22bd5b-c2b0-4c06-bd19-63ef58837011";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_rtp_video";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "46";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for RTP Video media";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "94effa7d-8c0f-4cca-b617-9d2d24748aa7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_dscp_sip";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "-1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Layer 3 QoS DSCP Value for SIP signaling (Disabled by default)";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "49f2ff3f-0628-44fa-a8d2-82cb38fbaf98";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_video_codec";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "H264";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable video codec on sip lines (Only h264 currently supported)";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "be8c1341-3cb6-4aa8-bef5-642ff11199e8";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_enable";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable Syslog server";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8281507b-80fa-450a-94b7-6f58a7a9e6e1";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server ip";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "db7595a1-318b-49d8-86a6-8ff4b44e30f5";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_syslog_server_port";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Syslog Server Port number";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "67a916be-35df-44f1-ab12-81756fd1f911";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_answer_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "2";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Answer call as audio only or audio with video. 1-Audio, 2-Video";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bbbdf01c-d760-43cf-958d-e47c54dd3997";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_default_dial_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial call as audio only or audio with video. 1-Audio, 2-Video Note: If you set this to video, then video is offered in the first invite which can cause your call to hang or not complete if going through a sip trunk provider.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "37ddabf0-8d7c-494f-b381-5bc4e3048bff";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_enable_auto_upgrade";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable firmware auto upgrade 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5a2a79c3-befb-4b7a-998d-3f0bfc9fcde4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_1";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/fanvil/resources/firmware";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 1.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "de60a8fb-628a-4ee3-a76a-ff3e0a7f045f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_server_2";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server2.yourdomain.com/app/fanvil/resources/firmware";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto upgrade firmware server 2.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "09134520-647a-4a86-bffd-d927aff2b33b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_upgrade_interval";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "24";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Check for firmware every X hours.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3ca2b12b-21f1-4a6d-a0eb-8670105c77d9";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i20s";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i20S2.1.1.3664T20180809203309.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i20S firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d07be0b3-a34b-4739-a227-766231e5bb52";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i23s";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i23S2.1.1.3664T20180809204215.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i23S firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6e0d313d-e44a-446f-9274-99e778d87cf5";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i30";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i302.1.1.3664T20180809203614.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i30 firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3cf0c35-4f92-4607-84a6-b06b29d67134";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_i31s";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "i31S2.1.1.3664T20180809203916.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the i31S firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "235ccea6-5ed0-45ff-a03f-d0cbc6ebaf01";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x2p";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x2-mono2.8.0.6251T20181017203533.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X2P firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8912437c-7142-4a85-b4aa-f83c1e50ad30";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x3";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x3s2.8.0.6251T20181017202549.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X3S/G firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "756059c7-b754-4285-be22-0d51c82d62b3";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x4";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x42.8.0.6251T20181017202853.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X4/G firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "122ba840-7dee-4c8e-a93c-739681b4b1d4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x5s";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x5s-6900-P0.13.3-1.8.0-2698T2018-09-30-15.23.04.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X5S firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32635e1c-dcb8-44e1-a0c4-5209b4f84392";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_firmware_x6";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "x6-6914-P0.13.3-1.8.0-2697T2018-09-30-15.10.00.z";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the X6 firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4b7f56f3-31a9-46dd-b588-35b253024b1f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_switch_mode";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "0 - Monostable, 1 - Bistable";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "316ce083-69ba-4932-be02-845d3ed8f585";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_card_reader";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable RFID Card Reader. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7226d18c-7d49-449b-be7b-8cfb46c1ddb3";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_indoor_open";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Use indoor switch to unlock the door. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "83dce10f-6254-490c-af89-a2a004890c47";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_access_table";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: Enabled. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d4ffbf45-5abe-4ef3-9cf7-f222257d5633";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_remote";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "*";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: *";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c51013fc-765e-4758-99a9-2738cfe9a7dd";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_opening_door_code_local";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "6789";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default: 6789";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0c5fe247-0361-4c69-a247-d14b5417e53e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_enable_syslog";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable EGS Syslog. 0 - NO, 1 - Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1a74a177-49fc-432e-b10e-39c7d0c7ddc4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_server";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0.0.0.0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server. Hostname or IP";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3fb2a87b-89b1-4d53-923d-c1478aec4f58";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_egs_log_port";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "514";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "EGS Syslog Server Port";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "108f26c5-568d-4cc0-af94-097ecb600b8f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "fanvil_provision_url";

Some files were not shown because too many files have changed in this diff Show More