Rename app/calls to app/call_forward

This commit is contained in:
markjcrane
2021-11-09 17:08:06 -07:00
parent b02cb75620
commit 75e83ff879
11 changed files with 2 additions and 2 deletions
+84
View File
@@ -0,0 +1,84 @@
<?php
//application details
$apps[$x]['name'] = "Call Forward";
$apps[$x]['uuid'] = "19806921-e8ed-dcff-b325-dd3e5da4959d";
$apps[$x]['category'] = "Switch";;
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.2";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "Call Forward, Follow Me and Do Not Disturb.";
$apps[$x]['description']['en-gb'] = "Call Forward, Follow Me and Do Not Disturb.";
$apps[$x]['description']['ar-eg'] = "";
$apps[$x]['description']['de-at'] = "Anrufweiterleitung, Follow Me und Nicht-Stören.";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-de'] = "Anrufweiterleitung, Follow Me und Nicht-Stören.";
$apps[$x]['description']['es-cl'] = "Reenvio de llamada, Sígueme y No Molestar.";
$apps[$x]['description']['es-mx'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-fr'] = "Renvoi d'appel, Follow Me et ne pas deranger.";
$apps[$x]['description']['he-il'] = "";
$apps[$x]['description']['it-it'] = "";
$apps[$x]['description']['nl-nl'] = "Oproep doorsturen, Volg mij en Niet storen";
$apps[$x]['description']['pl-pl'] = "";
$apps[$x]['description']['pt-br'] = "Desvio de chamadas, Siga-me e Não perturbe (DND).";
$apps[$x]['description']['pt-pt'] = "Desvio de Chamadas, Seguir-me e Não Perturbar.";
$apps[$x]['description']['ro-ro'] = "";
$apps[$x]['description']['ru-ru'] = "";
$apps[$x]['description']['sv-se'] = "";
$apps[$x]['description']['uk-ua'] = "";
//permission details
$y=0;
$apps[$x]['permissions'][$y]['name'] = "follow_me";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "agent";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_forward";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "agent";
$y++;
$apps[$x]['permissions'][$y]['name'] = "do_not_disturb";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$apps[$x]['permissions'][$y]['groups'][] = "agent";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_forward_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//default settings
$y=0;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "655447f1-e969-4885-b3da-28889b531568";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "follow_me";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "follow_me_autocomplete";
$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'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_order'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "follow me destinations autocomplete list. true=autocomplete On, false=autocomplete Off";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4fedc226-caca-4ebf-b4eb-31de93e5bed3";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "follow_me";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "max_destinations";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "5";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_order'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the maximum number of Follow Me Destinations.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ce105d64-2d1b-4d19-ae34-ccb818cc9c6e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "follow_me";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "timeout";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_order'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default Follow Me Timeout value.";
?>
+31
View File
@@ -0,0 +1,31 @@
<?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-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//process this only one time
if ($domains_processed == 1) {
}
?>
+970
View File
@@ -0,0 +1,970 @@
<?php
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
$text['title-call_forward']['en-us'] = "Call Forward";
$text['title-call_forward']['en-gb'] = "Call Forward";
$text['title-call_forward']['ar-eg'] = "";
$text['title-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
$text['title-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
$text['title-call_forward']['de-de'] = "Rufumleitung";
$text['title-call_forward']['es-cl'] = "Reenvio de Llamadas";
$text['title-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
$text['title-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
$text['title-call_forward']['fr-fr'] = "Renvoi d'appel";
$text['title-call_forward']['he-il'] = "";
$text['title-call_forward']['it-it'] = "Inoltro";
$text['title-call_forward']['nl-nl'] = "Oproep doorsturen";
$text['title-call_forward']['pl-pl'] = "Przekierowanie";
$text['title-call_forward']['pt-br'] = "Encaminhamento de chamadas";
$text['title-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
$text['title-call_forward']['ro-ro'] = "";
$text['title-call_forward']['ru-ru'] = "Переадресация";
$text['title-call_forward']['sv-se'] = "Vidarekoppling";
$text['title-call_forward']['uk-ua'] = "Переадресація";
$text['header-call_forward']['en-us'] = "Call Forward";
$text['header-call_forward']['en-gb'] = "Call Forward";
$text['header-call_forward']['ar-eg'] = "";
$text['header-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
$text['header-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
$text['header-call_forward']['de-de'] = "Rufumleitung";
$text['header-call_forward']['es-cl'] = "Reenvio de Llamadas";
$text['header-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
$text['header-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
$text['header-call_forward']['fr-fr'] = "Renvoi d'appel";
$text['header-call_forward']['he-il'] = "";
$text['header-call_forward']['it-it'] = "Inoltro";
$text['header-call_forward']['nl-nl'] = "Oproep doorsturen";
$text['header-call_forward']['pl-pl'] = "Przekierowanie";
$text['header-call_forward']['pt-br'] = "Encaminhamento de chamadas";
$text['header-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
$text['header-call_forward']['ro-ro'] = "";
$text['header-call_forward']['ru-ru'] = "Переадресация";
$text['header-call_forward']['sv-se'] = "Vidarekoppling";
$text['header-call_forward']['uk-ua'] = "Переадресація";
$text['table-tools']['en-us'] = "Tools";
$text['table-tools']['en-gb'] = "Tools";
$text['table-tools']['ar-eg'] = "";
$text['table-tools']['de-at'] = "Funktionen"; //copied from de-de
$text['table-tools']['de-ch'] = "Funktionen"; //copied from de-de
$text['table-tools']['de-de'] = "Funktionen";
$text['table-tools']['es-cl'] = "Herramientas";
$text['table-tools']['es-mx'] = "Herramientas"; //copied from es-cl
$text['table-tools']['fr-ca'] = "Outils"; //copied from fr-fr
$text['table-tools']['fr-fr'] = "Outils";
$text['table-tools']['he-il'] = "";
$text['table-tools']['it-it'] = "Strumenti";
$text['table-tools']['nl-nl'] = "Gereedschappen";
$text['table-tools']['pl-pl'] = "Narzędzia";
$text['table-tools']['pt-br'] = "Ferramentas"; //copied from pt-pt
$text['table-tools']['pt-pt'] = "Ferramentas";
$text['table-tools']['ro-ro'] = "";
$text['table-tools']['ru-ru'] = "Инструменты";
$text['table-tools']['sv-se'] = "Verktyg";
$text['table-tools']['uk-ua'] = "Інструменти";
$text['table-extension']['en-us'] = "Extension";
$text['table-extension']['en-gb'] = "Extension";
$text['table-extension']['ar-eg'] = "";
$text['table-extension']['de-at'] = "Nebenstelle"; //copied from de-de
$text['table-extension']['de-ch'] = "Nebenstelle"; //copied from de-de
$text['table-extension']['de-de'] = "Nebenstelle";
$text['table-extension']['es-cl'] = "Extensión";
$text['table-extension']['es-mx'] = "Extensión"; //copied from es-cl
$text['table-extension']['fr-ca'] = "Extension"; //copied from fr-fr
$text['table-extension']['fr-fr'] = "Extension";
$text['table-extension']['he-il'] = "";
$text['table-extension']['it-it'] = "Interno";
$text['table-extension']['nl-nl'] = "Toestel";
$text['table-extension']['pl-pl'] = "Numer wewnętrzny";
$text['table-extension']['pt-br'] = "Ramal";
$text['table-extension']['pt-pt'] = "Extensão";
$text['table-extension']['ro-ro'] = "";
$text['table-extension']['ru-ru'] = "Внутренний номер";
$text['table-extension']['sv-se'] = "Anknytning";
$text['table-extension']['uk-ua'] = "Розширення (Extention)";
$text['table-description']['en-us'] = "Description";
$text['table-description']['en-gb'] = "Description";
$text['table-description']['ar-eg'] = "";
$text['table-description']['de-at'] = "Beschreibung"; //copied from de-de
$text['table-description']['de-ch'] = "Beschreibung"; //copied from de-de
$text['table-description']['de-de'] = "Beschreibung";
$text['table-description']['es-cl'] = "Descripción";
$text['table-description']['es-mx'] = "Descripción"; //copied from es-cl
$text['table-description']['fr-ca'] = "Description"; //copied from fr-fr
$text['table-description']['fr-fr'] = "Description";
$text['table-description']['he-il'] = "";
$text['table-description']['it-it'] = "Descrizione";
$text['table-description']['nl-nl'] = "Omschrijving";
$text['table-description']['pl-pl'] = "Opis";
$text['table-description']['pt-br'] = "Descrição"; //copied from pt-pt
$text['table-description']['pt-pt'] = "Descrição";
$text['table-description']['ro-ro'] = "";
$text['table-description']['ru-ru'] = "Описание";
$text['table-description']['sv-se'] = "Beskrivning";
$text['table-description']['uk-ua'] = "Опис";
$text['label-ring-timeout']['en-us'] = "Timeout";
$text['label-ring-timeout']['en-gb'] = "Timeout";
$text['label-ring-timeout']['ar-eg'] = "";
$text['label-ring-timeout']['de-at'] = "Abwurfzeit"; //copied from de-de
$text['label-ring-timeout']['de-ch'] = "Abwurfzeit"; //copied from de-de
$text['label-ring-timeout']['de-de'] = "Abwurfzeit";
$text['label-ring-timeout']['es-cl'] = "Timeout";
$text['label-ring-timeout']['es-mx'] = "Timeout"; //copied from es-cl
$text['label-ring-timeout']['fr-ca'] = "Timeout"; //copied from fr-fr
$text['label-ring-timeout']['fr-fr'] = "Timeout";
$text['label-ring-timeout']['he-il'] = "";
$text['label-ring-timeout']['it-it'] = "Timeout";
$text['label-ring-timeout']['nl-nl'] = "Timeout";
$text['label-ring-timeout']['pl-pl'] = "Przekroczenie czasu oczekiwania ";
$text['label-ring-timeout']['pt-br'] = "Tempo limite";
$text['label-ring-timeout']['pt-pt'] = "Timeout";
$text['label-ring-timeout']['ro-ro'] = "";
$text['label-ring-timeout']['ru-ru'] = "Тайм-аут";
$text['label-ring-timeout']['sv-se'] = "Tidsgräns";
$text['label-ring-timeout']['uk-ua'] = "Таймаут";
$text['label-ring-order']['en-us'] = "Ring Order";
$text['label-ring-order']['en-gb'] = "Ring Order";
$text['label-ring-order']['ar-eg'] = "";
$text['label-ring-order']['de-at'] = "Ruf Reihenfolge"; //copied from de-de
$text['label-ring-order']['de-ch'] = "Ruf Reihenfolge"; //copied from de-de
$text['label-ring-order']['de-de'] = "Ruf Reihenfolge";
$text['label-ring-order']['es-cl'] = "Solicitar Llamado";
$text['label-ring-order']['es-mx'] = "Solicitar Llamado"; //copied from es-cl
$text['label-ring-order']['fr-ca'] = "Ordre de sonnerie"; //copied from fr-fr
$text['label-ring-order']['fr-fr'] = "Ordre de sonnerie";
$text['label-ring-order']['he-il'] = "";
$text['label-ring-order']['it-it'] = "Ordine di Squillo";
$text['label-ring-order']['nl-nl'] = "Oproep volgorde";
$text['label-ring-order']['pl-pl'] = "Kolejność dzwonienia";
$text['label-ring-order']['pt-br'] = "Solicitar chamada";
$text['label-ring-order']['pt-pt'] = "Pedir Chamada";
$text['label-ring-order']['ro-ro'] = "";
$text['label-ring-order']['ru-ru'] = "Последовательность вызовов";
$text['label-ring-order']['sv-se'] = "Ring Ordning";
$text['label-ring-order']['uk-ua'] = "Послідовність набору";
$text['label-ring-delay']['en-us'] = "Delay";
$text['label-ring-delay']['en-gb'] = "Delay";
$text['label-ring-delay']['ar-eg'] = "";
$text['label-ring-delay']['de-at'] = "Verzögerung"; //copied from de-de
$text['label-ring-delay']['de-ch'] = "Verzögerung"; //copied from de-de
$text['label-ring-delay']['de-de'] = "Verzögerung";
$text['label-ring-delay']['es-cl'] = "Retardo";
$text['label-ring-delay']['es-mx'] = "Retardo"; //copied from es-cl
$text['label-ring-delay']['fr-ca'] = "Délais"; //copied from fr-fr
$text['label-ring-delay']['fr-fr'] = "Délais";
$text['label-ring-delay']['he-il'] = "";
$text['label-ring-delay']['it-it'] = "Ritardo";
$text['label-ring-delay']['nl-nl'] = "Vertraging";
$text['label-ring-delay']['pl-pl'] = "Opóznienie";
$text['label-ring-delay']['pt-br'] = "Atraso"; //copied from pt-pt
$text['label-ring-delay']['pt-pt'] = "Atraso";
$text['label-ring-delay']['ro-ro'] = "";
$text['label-ring-delay']['ru-ru'] = "Задержка";
$text['label-ring-delay']['sv-se'] = "Fördröjning";
$text['label-ring-delay']['uk-ua'] = "Затримка";
$text['label-prompt']['en-us'] = "Prompt to accept the call";
$text['label-prompt']['en-gb'] = "Prompt to accept the call";
$text['label-prompt']['ar-eg'] = "";
$text['label-prompt']['de-at'] = "Ansage um den Anruf anzunehmen"; //copied from de-de
$text['label-prompt']['de-ch'] = "Ansage um den Anruf anzunehmen"; //copied from de-de
$text['label-prompt']['de-de'] = "Ansage um den Anruf anzunehmen";
$text['label-prompt']['es-cl'] = "Preguntar para aceptar una llamada";
$text['label-prompt']['es-mx'] = "Preguntar para aceptar una llamada"; //copied from es-cl
$text['label-prompt']['fr-ca'] = "Annonce pour accepter l'appel"; //copied from fr-fr
$text['label-prompt']['fr-fr'] = "Annonce pour accepter l'appel";
$text['label-prompt']['he-il'] = "";
$text['label-prompt']['it-it'] = "Domanda se accettare la chiamata";
$text['label-prompt']['nl-nl'] = "Melding om de oproep te accepteren";
$text['label-prompt']['pl-pl'] = "Podpowiedz, aby odebrać rozmowę";
$text['label-prompt']['pt-br'] = "Perguntar para aceitar a chamada"; //copied from pt-pt
$text['label-prompt']['pt-pt'] = "Perguntar para aceitar a chamada";
$text['label-prompt']['ro-ro'] = "";
$text['label-prompt']['ru-ru'] = "Подтверждение приема вызова";
$text['label-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal.";
$text['label-prompt']['uk-ua'] = "";
$text['label-on-busy']['en-us'] = "On Busy";
$text['label-on-busy']['en-gb'] = "On Busy";
$text['label-on-busy']['ar-eg'] = "";
$text['label-on-busy']['de-at'] = "Bei Besetzt"; //copied from de-de
$text['label-on-busy']['de-ch'] = "Bei Besetzt"; //copied from de-de
$text['label-on-busy']['de-de'] = "Bei Besetzt";
$text['label-on-busy']['es-cl'] = "Concurrida";
$text['label-on-busy']['es-mx'] = "Concurrida"; //copied from es-cl
$text['label-on-busy']['fr-ca'] = "Sur Occupé"; //copied from fr-fr
$text['label-on-busy']['fr-fr'] = "Sur Occupé";
$text['label-on-busy']['he-il'] = "";
$text['label-on-busy']['it-it'] = "Su Occupato";
$text['label-on-busy']['nl-nl'] = "Bij bezet";
$text['label-on-busy']['pl-pl'] = "Kiedy zajęty";
$text['label-on-busy']['pt-br'] = "Ocupado";
$text['label-on-busy']['pt-pt'] = "Movimentado";
$text['label-on-busy']['ro-ro'] = "";
$text['label-on-busy']['ru-ru'] = "При занятости";
$text['label-on-busy']['sv-se'] = "Vid Upptaget";
$text['label-on-busy']['uk-ua'] = "Якщо зайнято";
$text['label-number']['en-us'] = "Number";
$text['label-number']['en-gb'] = "Number";
$text['label-number']['ar-eg'] = "";
$text['label-number']['de-at'] = "Nummer"; //copied from de-de
$text['label-number']['de-ch'] = "Nummer"; //copied from de-de
$text['label-number']['de-de'] = "Nummer";
$text['label-number']['es-cl'] = "Número";
$text['label-number']['es-mx'] = "Número"; //copied from es-cl
$text['label-number']['fr-ca'] = "Numéro"; //copied from fr-fr
$text['label-number']['fr-fr'] = "Numéro";
$text['label-number']['he-il'] = "";
$text['label-number']['it-it'] = "Numero";
$text['label-number']['nl-nl'] = "Nummer";
$text['label-number']['pl-pl'] = "Numer";
$text['label-number']['pt-br'] = "Número"; //copied from pt-pt
$text['label-number']['pt-pt'] = "Número";
$text['label-number']['ro-ro'] = "";
$text['label-number']['ru-ru'] = "Номер";
$text['label-number']['sv-se'] = "Nummer";
$text['label-number']['uk-ua'] = "Номер";
$text['label-no_answer']['en-us'] = "No Answer";
$text['label-no_answer']['en-gb'] = "No Answer";
$text['label-no_answer']['ar-eg'] = "";
$text['label-no_answer']['de-at'] = "Keine Antwort"; //copied from de-de
$text['label-no_answer']['de-ch'] = "Keine Antwort"; //copied from de-de
$text['label-no_answer']['de-de'] = "Keine Antwort";
$text['label-no_answer']['es-cl'] = "Sin Respuesta";
$text['label-no_answer']['es-mx'] = "Sin Respuesta"; //copied from es-cl
$text['label-no_answer']['fr-ca'] = "Pas de réponse"; //copied from fr-fr
$text['label-no_answer']['fr-fr'] = "Pas de réponse";
$text['label-no_answer']['he-il'] = "";
$text['label-no_answer']['it-it'] = "Su Mancata Risposta";
$text['label-no_answer']['nl-nl'] = "Geen antwoord";
$text['label-no_answer']['pl-pl'] = "Brak odpowiedzi";
$text['label-no_answer']['pt-br'] = "Sem resposta";
$text['label-no_answer']['pt-pt'] = "Sem Resposta";
$text['label-no_answer']['ro-ro'] = "";
$text['label-no_answer']['ru-ru'] = "Нет ответа";
$text['label-no_answer']['sv-se'] = "Inget Svar";
$text['label-no_answer']['uk-ua'] = "Без відповіді";
$text['label-not_registered']['en-us'] = "Not Registered";
$text['label-not_registered']['en-gb'] = "Not Registered";
$text['label-not_registered']['ar-eg'] = "";
$text['label-not_registered']['de-at'] = "Nicht registriert"; //copied from de-de
$text['label-not_registered']['de-ch'] = "Nicht registriert"; //copied from de-de
$text['label-not_registered']['de-de'] = "Nicht registriert";
$text['label-not_registered']['es-cl'] = "";
$text['label-not_registered']['es-mx'] = "";
$text['label-not_registered']['fr-ca'] = "Non enregistré";
$text['label-not_registered']['fr-fr'] = "Non enregistré";
$text['label-not_registered']['he-il'] = "";
$text['label-not_registered']['it-it'] = "Su Mancata Registrazione";
$text['label-not_registered']['nl-nl'] = "Niet geregistreerd";
$text['label-not_registered']['pl-pl'] = "";
$text['label-not_registered']['pt-br'] = "Sem registro"; //copied from pt-pt
$text['label-not_registered']['pt-pt'] = "Sem registro";
$text['label-not_registered']['ro-ro'] = "";
$text['label-not_registered']['ru-ru'] = "Не зарегистрирован";
$text['label-not_registered']['sv-se'] = "Ej Registrerad";
$text['label-not_registered']['uk-ua'] = "";
$text['label-ignore_busy']['en-us'] = "Ignore Busy";
$text['label-ignore_busy']['en-gb'] = "Ignore Busy";
$text['label-ignore_busy']['ar-eg'] = "";
$text['label-ignore_busy']['de-at'] = "Besetzt ignorieren"; //copied from de-de
$text['label-ignore_busy']['de-ch'] = "Besetzt ignorieren"; //copied from de-de
$text['label-ignore_busy']['de-de'] = "Besetzt ignorieren";
$text['label-ignore_busy']['es-cl'] = "";
$text['label-ignore_busy']['es-mx'] = "";
$text['label-ignore_busy']['fr-ca'] = "Ignorer occupé";
$text['label-ignore_busy']['fr-fr'] = "Ignorer occupé";
$text['label-ignore_busy']['he-il'] = "";
$text['label-ignore_busy']['it-it'] = "Ignora Occupato";
$text['label-ignore_busy']['nl-nl'] = "Bezet negeren";
$text['label-ignore_busy']['pl-pl'] = "";
$text['label-ignore_busy']['pt-br'] = "Ignorar ocupado"; //copied from pt-pt
$text['label-ignore_busy']['pt-pt'] = "Ignorar ocupado";
$text['label-ignore_busy']['ro-ro'] = "";
$text['label-ignore_busy']['ru-ru'] = "Игногировать занятость";
$text['label-ignore_busy']['sv-se'] = "Ignorera Upptaget";
$text['label-ignore_busy']['uk-ua'] = "";
$text['label-follow_me']['en-us'] = "Follow Me";
$text['label-follow_me']['en-gb'] = "Follow Me";
$text['label-follow_me']['ar-eg'] = "";
$text['label-follow_me']['de-at'] = "Anrufweiterschaltung"; //copied from de-de
$text['label-follow_me']['de-ch'] = "Anrufweiterschaltung"; //copied from de-de
$text['label-follow_me']['de-de'] = "Anrufweiterschaltung";
$text['label-follow_me']['es-cl'] = "Sígueme";
$text['label-follow_me']['es-mx'] = "Sígueme"; //copied from es-cl
$text['label-follow_me']['fr-ca'] = "Suis moi"; //copied from fr-fr
$text['label-follow_me']['fr-fr'] = "Suis moi";
$text['label-follow_me']['he-il'] = "";
$text['label-follow_me']['it-it'] = "Seguimi";
$text['label-follow_me']['nl-nl'] = "Volg mij";
$text['label-follow_me']['pl-pl'] = "Podążaj za mną";
$text['label-follow_me']['pt-br'] = "Siga-me";
$text['label-follow_me']['pt-pt'] = "Segue-me";
$text['label-follow_me']['ro-ro'] = "";
$text['label-follow_me']['ru-ru'] = "Перенаправление";
$text['label-follow_me']['sv-se'] = "Följ Mig";
$text['label-follow_me']['uk-ua'] = "";
$text['label-dnd']['en-us'] = "Do Not Disturb";
$text['label-dnd']['en-gb'] = "Do Not Disturb";
$text['label-dnd']['ar-eg'] = "";
$text['label-dnd']['de-at'] = "Bitte nicht stören"; //copied from de-de
$text['label-dnd']['de-ch'] = "Bitte nicht stören"; //copied from de-de
$text['label-dnd']['de-de'] = "Bitte nicht stören";
$text['label-dnd']['es-cl'] = "No Molestar";
$text['label-dnd']['es-mx'] = "No Molestar"; //copied from es-cl
$text['label-dnd']['fr-ca'] = "Ne pas déranger"; //copied from fr-fr
$text['label-dnd']['fr-fr'] = "Ne pas déranger";
$text['label-dnd']['he-il'] = "";
$text['label-dnd']['it-it'] = "Non Disturbare";
$text['label-dnd']['nl-nl'] = "Niet Storen";
$text['label-dnd']['pl-pl'] = "Nie przeszkadzaj (DND)";
$text['label-dnd']['pt-br'] = "Não Pertube (DND)";
$text['label-dnd']['pt-pt'] = "Não Perturbar";
$text['label-dnd']['ro-ro'] = "";
$text['label-dnd']['ru-ru'] = "Не беспокоить";
$text['label-dnd']['sv-se'] = "Stör Ej";
$text['label-dnd']['uk-ua'] = "Не турбувати";
$text['label-destinations']['en-us'] = "Destinations";
$text['label-destinations']['en-gb'] = "Destinations";
$text['label-destinations']['ar-eg'] = "";
$text['label-destinations']['de-at'] = "Ziele"; //copied from de-de
$text['label-destinations']['de-ch'] = "Ziele"; //copied from de-de
$text['label-destinations']['de-de'] = "Ziele";
$text['label-destinations']['es-cl'] = "Destinos";
$text['label-destinations']['es-mx'] = "Destinos"; //copied from es-cl
$text['label-destinations']['fr-ca'] = "Destinations"; //copied from fr-fr
$text['label-destinations']['fr-fr'] = "Destinations";
$text['label-destinations']['he-il'] = "";
$text['label-destinations']['it-it'] = "Destinazioni";
$text['label-destinations']['nl-nl'] = "Bestemmingen";
$text['label-destinations']['pl-pl'] = "Destynacje";
$text['label-destinations']['pt-br'] = "Destinos"; //copied from pt-pt
$text['label-destinations']['pt-pt'] = "Destinos";
$text['label-destinations']['ro-ro'] = "";
$text['label-destinations']['ru-ru'] = "Направления";
$text['label-destinations']['sv-se'] = "Destinationer";
$text['label-destinations']['uk-ua'] = "Номери";
$text['label-destination_timeout']['en-us'] = "Timeout";
$text['label-destination_timeout']['en-gb'] = "Timeout";
$text['label-destination_timeout']['ar-eg'] = "";
$text['label-destination_timeout']['de-at'] = "Abwurfzeit"; //copied from de-de
$text['label-destination_timeout']['de-ch'] = "Abwurfzeit"; //copied from de-de
$text['label-destination_timeout']['de-de'] = "Abwurfzeit";
$text['label-destination_timeout']['es-cl'] = "Timeout";
$text['label-destination_timeout']['es-mx'] = "Timeout"; //copied from es-cl
$text['label-destination_timeout']['fr-ca'] = "Timeout"; //copied from fr-fr
$text['label-destination_timeout']['fr-fr'] = "Timeout";
$text['label-destination_timeout']['he-il'] = "";
$text['label-destination_timeout']['it-it'] = "Timeout";
$text['label-destination_timeout']['nl-nl'] = "Timeout";
$text['label-destination_timeout']['pl-pl'] = "Limit czasowy";
$text['label-destination_timeout']['pt-br'] = "Tempo limite";
$text['label-destination_timeout']['pt-pt'] = "Timeout";
$text['label-destination_timeout']['ro-ro'] = "";
$text['label-destination_timeout']['ru-ru'] = "Тайм-аут";
$text['label-destination_timeout']['sv-se'] = "Tidsgräns";
$text['label-destination_timeout']['uk-ua'] = "Таймаут";
$text['label-destination_prompt_confirm']['en-us'] = "Confirm";
$text['label-destination_prompt_confirm']['en-gb'] = "Confirm";
$text['label-destination_prompt_confirm']['ar-eg'] = "";
$text['label-destination_prompt_confirm']['de-at'] = "Bestätigen"; //copied from de-de
$text['label-destination_prompt_confirm']['de-ch'] = "Bestätigen"; //copied from de-de
$text['label-destination_prompt_confirm']['de-de'] = "Bestätigen";
$text['label-destination_prompt_confirm']['es-cl'] = "Confirmar";
$text['label-destination_prompt_confirm']['es-mx'] = "Confirmar"; //copied from es-cl
$text['label-destination_prompt_confirm']['fr-ca'] = "Confirmer"; //copied from fr-fr
$text['label-destination_prompt_confirm']['fr-fr'] = "Confirmer";
$text['label-destination_prompt_confirm']['he-il'] = "";
$text['label-destination_prompt_confirm']['it-it'] = "Conferma";
$text['label-destination_prompt_confirm']['nl-nl'] = "Bevestig";
$text['label-destination_prompt_confirm']['pl-pl'] = "Potwierdź";
$text['label-destination_prompt_confirm']['pt-br'] = "Confirmar"; //copied from pt-pt
$text['label-destination_prompt_confirm']['pt-pt'] = "Confirmar";
$text['label-destination_prompt_confirm']['ro-ro'] = "";
$text['label-destination_prompt_confirm']['ru-ru'] = "Подтвердить";
$text['label-destination_prompt_confirm']['sv-se'] = "Bekräfta";
$text['label-destination_prompt_confirm']['uk-ua'] = "Підтвердити";
$text['label-destination_prompt_announce']['en-us'] = "Announce";
$text['label-destination_prompt_announce']['en-gb'] = "Announce";
$text['label-destination_prompt_announce']['ar-eg'] = "";
$text['label-destination_prompt_announce']['de-at'] = "Ankündigen"; //copied from de-de
$text['label-destination_prompt_announce']['de-ch'] = "Ankündigen"; //copied from de-de
$text['label-destination_prompt_announce']['de-de'] = "Ankündigen";
$text['label-destination_prompt_announce']['es-cl'] = "Anunciar";
$text['label-destination_prompt_announce']['es-mx'] = "Anunciar"; //copied from es-cl
$text['label-destination_prompt_announce']['fr-ca'] = "Annonce"; //copied from fr-fr
$text['label-destination_prompt_announce']['fr-fr'] = "Annonce";
$text['label-destination_prompt_announce']['he-il'] = "";
$text['label-destination_prompt_announce']['it-it'] = "Annuncio";
$text['label-destination_prompt_announce']['nl-nl'] = "Aankondigen";
$text['label-destination_prompt_announce']['pl-pl'] = "Rozgłoś/powiadom";
$text['label-destination_prompt_announce']['pt-br'] = "Anunciar"; //copied from pt-pt
$text['label-destination_prompt_announce']['pt-pt'] = "Anunciar";
$text['label-destination_prompt_announce']['ro-ro'] = "";
$text['label-destination_prompt_announce']['ru-ru'] = "Сообщение";
$text['label-destination_prompt_announce']['sv-se'] = "Meddela";
$text['label-destination_prompt_announce']['uk-ua'] = "";
$text['label-destination_prompt']['en-us'] = "Prompt";
$text['label-destination_prompt']['en-gb'] = "Prompt";
$text['label-destination_prompt']['ar-eg'] = "";
$text['label-destination_prompt']['de-at'] = "Nachfragen"; //copied from de-de
$text['label-destination_prompt']['de-ch'] = "Nachfragen"; //copied from de-de
$text['label-destination_prompt']['de-de'] = "Nachfragen";
$text['label-destination_prompt']['es-cl'] = "Prompt";
$text['label-destination_prompt']['es-mx'] = "Prompt"; //copied from es-cl
$text['label-destination_prompt']['fr-ca'] = "Prompt"; //copied from fr-fr
$text['label-destination_prompt']['fr-fr'] = "Prompt";
$text['label-destination_prompt']['he-il'] = "";
$text['label-destination_prompt']['it-it'] = "Prompt";
$text['label-destination_prompt']['nl-nl'] = "Navragen";
$text['label-destination_prompt']['pl-pl'] = "Potwierdź aby odebrac rozmowę";
$text['label-destination_prompt']['pt-br'] = "Prompt"; //copied from pt-pt
$text['label-destination_prompt']['pt-pt'] = "Prompt";
$text['label-destination_prompt']['ro-ro'] = "";
$text['label-destination_prompt']['ru-ru'] = "Приглашение";
$text['label-destination_prompt']['sv-se'] = "Verifiering";
$text['label-destination_prompt']['uk-ua'] = "";
$text['label-destination_number']['en-us'] = "Destination";
$text['label-destination_number']['en-gb'] = "Destination";
$text['label-destination_number']['ar-eg'] = "";
$text['label-destination_number']['de-at'] = "Ziel"; //copied from de-de
$text['label-destination_number']['de-ch'] = "Ziel"; //copied from de-de
$text['label-destination_number']['de-de'] = "Ziel";
$text['label-destination_number']['es-cl'] = "Destino";
$text['label-destination_number']['es-mx'] = "Destino"; //copied from es-cl
$text['label-destination_number']['fr-ca'] = "Destination"; //copied from fr-fr
$text['label-destination_number']['fr-fr'] = "Destination";
$text['label-destination_number']['he-il'] = "";
$text['label-destination_number']['it-it'] = "Destinazione";
$text['label-destination_number']['nl-nl'] = "Bestemming";
$text['label-destination_number']['pl-pl'] = "Destynacja";
$text['label-destination_number']['pt-br'] = "Destino"; //copied from pt-pt
$text['label-destination_number']['pt-pt'] = "Destino";
$text['label-destination_number']['ro-ro'] = "";
$text['label-destination_number']['ru-ru'] = "Назначение";
$text['label-destination_number']['sv-se'] = "Destination Nummer";
$text['label-destination_number']['uk-ua'] = "Номер";
$text['label-destination_delay']['en-us'] = "Delay";
$text['label-destination_delay']['en-gb'] = "Delay";
$text['label-destination_delay']['ar-eg'] = "";
$text['label-destination_delay']['de-at'] = "Verzögerung"; //copied from de-de
$text['label-destination_delay']['de-ch'] = "Verzögerung"; //copied from de-de
$text['label-destination_delay']['de-de'] = "Verzögerung";
$text['label-destination_delay']['es-cl'] = "Retraso";
$text['label-destination_delay']['es-mx'] = "Retraso"; //copied from es-cl
$text['label-destination_delay']['fr-ca'] = "Délais"; //copied from fr-fr
$text['label-destination_delay']['fr-fr'] = "Délais";
$text['label-destination_delay']['he-il'] = "";
$text['label-destination_delay']['it-it'] = "Ritardo";
$text['label-destination_delay']['nl-nl'] = "Vertraging";
$text['label-destination_delay']['pl-pl'] = "Opóźnienie";
$text['label-destination_delay']['pt-br'] = "Atraso"; //copied from pt-pt
$text['label-destination_delay']['pt-pt'] = "Atraso";
$text['label-destination_delay']['ro-ro'] = "";
$text['label-destination_delay']['ru-ru'] = "Задержка";
$text['label-destination_delay']['sv-se'] = "Fördröjning";
$text['label-destination_delay']['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'] = "Bestemming";
$text['label-destination']['pl-pl'] = "Destynacja";
$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-cid-number-prefix']['en-us'] = "Number Prefix";
$text['label-cid-number-prefix']['en-gb'] = "Number Prefix";
$text['label-cid-number-prefix']['ar-eg'] = "";
$text['label-cid-number-prefix']['de-at'] = "Anruferkennung (Nummer)"; //copied from de-de
$text['label-cid-number-prefix']['de-ch'] = "Anruferkennung (Nummer)"; //copied from de-de
$text['label-cid-number-prefix']['de-de'] = "Anruferkennung (Nummer)";
$text['label-cid-number-prefix']['es-cl'] = "Número de Caller ID";
$text['label-cid-number-prefix']['es-mx'] = "Número de Caller ID"; //copied from es-cl
$text['label-cid-number-prefix']['fr-ca'] = "CID Nombre Préfixe"; //copied from fr-fr
$text['label-cid-number-prefix']['fr-fr'] = "CID Nombre Préfixe";
$text['label-cid-number-prefix']['he-il'] = "";
$text['label-cid-number-prefix']['it-it'] = "Numero Chiamante";
$text['label-cid-number-prefix']['nl-nl'] = "Voorloopnummer";
$text['label-cid-number-prefix']['pl-pl'] = "Prefiks prezentacji numeru dzwoniącego";
$text['label-cid-number-prefix']['pt-br'] = "Número do discador";
$text['label-cid-number-prefix']['pt-pt'] = "Número do Chamador";
$text['label-cid-number-prefix']['ro-ro'] = "";
$text['label-cid-number-prefix']['ru-ru'] = "Префикс номера";
$text['label-cid-number-prefix']['sv-se'] = "Nummerpresentation";
$text['label-cid-number-prefix']['uk-ua'] = "Caller ID Номер";
$text['label-cid-number']['en-us'] = "Caller ID Number";
$text['label-cid-number']['en-gb'] = "Caller ID Number";
$text['label-cid-number']['ar-eg'] = "";
$text['label-cid-number']['de-at'] = "Anruferkennung (Nummer)"; //copied from de-de
$text['label-cid-number']['de-ch'] = "Anruferkennung (Nummer)"; //copied from de-de
$text['label-cid-number']['de-de'] = "Anruferkennung (Nummer)";
$text['label-cid-number']['es-cl'] = "Número de Caller ID";
$text['label-cid-number']['es-mx'] = "Número de Caller ID"; //copied from es-cl
$text['label-cid-number']['fr-ca'] = "CID Nombre Préfixe"; //copied from fr-fr
$text['label-cid-number']['fr-fr'] = "CID Nombre Préfixe";
$text['label-cid-number']['he-il'] = "";
$text['label-cid-number']['it-it'] = "Numero Caller ID";
$text['label-cid-number']['nl-nl'] = "CID nummer";
$text['label-cid-number']['pl-pl'] = "Prefiks prezentacji numeru dzwoniącego";
$text['label-cid-number']['pt-br'] = "Número do discador";
$text['label-cid-number']['pt-pt'] = "Número do Chamador";
$text['label-cid-number']['ro-ro'] = "";
$text['label-cid-number']['ru-ru'] = "Caller ID Номер";
$text['label-cid-number']['sv-se'] = "Nummerpresentation";
$text['label-cid-number']['uk-ua'] = "Caller ID Номер";
$text['label-cid-name-prefix']['en-us'] = "Name Prefix";
$text['label-cid-name-prefix']['en-gb'] = "Name Prefix";
$text['label-cid-name-prefix']['ar-eg'] = "";
$text['label-cid-name-prefix']['de-at'] = "Anruferkennung (Name)"; //copied from de-de
$text['label-cid-name-prefix']['de-ch'] = "Anruferkennung (Name)"; //copied from de-de
$text['label-cid-name-prefix']['de-de'] = "Anruferkennung (Name)";
$text['label-cid-name-prefix']['es-cl'] = "Nombre de Caller ID";
$text['label-cid-name-prefix']['es-mx'] = "Nombre de Caller ID"; //copied from es-cl
$text['label-cid-name-prefix']['fr-ca'] = "Préfixe de l'appelant"; //copied from fr-fr
$text['label-cid-name-prefix']['fr-fr'] = "Préfixe de l'appelant";
$text['label-cid-name-prefix']['he-il'] = "";
$text['label-cid-name-prefix']['it-it'] = "Nome Chiamante";
$text['label-cid-name-prefix']['nl-nl'] = "Voorloop Naam ";
$text['label-cid-name-prefix']['pl-pl'] = "Prefiks prezentacji nazwy dzwoniącego";
$text['label-cid-name-prefix']['pt-br'] = "Nome (ID) de origem";
$text['label-cid-name-prefix']['pt-pt'] = "Nome do Chamador";
$text['label-cid-name-prefix']['ro-ro'] = "";
$text['label-cid-name-prefix']['ru-ru'] = "Caller ID Имя";
$text['label-cid-name-prefix']['sv-se'] = "Namnpresentation";
$text['label-cid-name-prefix']['uk-ua'] = "Caller ID Ім’я";
$text['label-call-prompt']['en-us'] = "Call Prompt";
$text['label-call-prompt']['en-gb'] = "Call Prompt";
$text['label-call-prompt']['ar-eg'] = "";
$text['label-call-prompt']['de-at'] = "Nachfragen"; //copied from de-de
$text['label-call-prompt']['de-ch'] = "Nachfragen"; //copied from de-de
$text['label-call-prompt']['de-de'] = "Nachfragen";
$text['label-call-prompt']['es-cl'] = "Aviso de Llamadas";
$text['label-call-prompt']['es-mx'] = "Aviso de Llamadas"; //copied from es-cl
$text['label-call-prompt']['fr-ca'] = "Annonce d'appel"; //copied from fr-fr
$text['label-call-prompt']['fr-fr'] = "Annonce d'appel";
$text['label-call-prompt']['he-il'] = "";
$text['label-call-prompt']['it-it'] = "Prompt di chiamata";
$text['label-call-prompt']['nl-nl'] = "Oproep melden";
$text['label-call-prompt']['pl-pl'] = "Potwierdź przed odebraniem rozmowy";
$text['label-call-prompt']['pt-br'] = "Prompt de chamada";
$text['label-call-prompt']['pt-pt'] = "Espoletar Chamada";
$text['label-call-prompt']['ro-ro'] = "";
$text['label-call-prompt']['ru-ru'] = "Запрос вызова";
$text['label-call-prompt']['sv-se'] = "Samtals Verifiering";
$text['label-call-prompt']['uk-ua'] = "";
$text['label-call_forward']['en-us'] = "Call Forward";
$text['label-call_forward']['en-gb'] = "Call Forward";
$text['label-call_forward']['ar-eg'] = "";
$text['label-call_forward']['de-at'] = "Rufumleitung"; //copied from de-de
$text['label-call_forward']['de-ch'] = "Rufumleitung"; //copied from de-de
$text['label-call_forward']['de-de'] = "Rufumleitung";
$text['label-call_forward']['es-cl'] = "Reenvio de Llamadas";
$text['label-call_forward']['es-mx'] = "Reenvio de Llamadas"; //copied from es-cl
$text['label-call_forward']['fr-ca'] = "Renvoi d'appel"; //copied from fr-fr
$text['label-call_forward']['fr-fr'] = "Renvoi d'appel";
$text['label-call_forward']['he-il'] = "";
$text['label-call_forward']['it-it'] = "Inoltro";
$text['label-call_forward']['nl-nl'] = "Oproep doorsturen";
$text['label-call_forward']['pl-pl'] = "Przekierowanie";
$text['label-call_forward']['pt-br'] = "Encaminhamento de chamadas";
$text['label-call_forward']['pt-pt'] = "Encaminhamento de Chamadas";
$text['label-call_forward']['ro-ro'] = "";
$text['label-call_forward']['ru-ru'] = "Переадресация";
$text['label-call_forward']['sv-se'] = "Vidarekoppling";
$text['label-call_forward']['uk-ua'] = "Переадресація";
$text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
$text['description-on-busy']['en-gb'] = "If enabled, it overrides the value of voicemail enabling in extension.";
$text['description-on-busy']['ar-eg'] = "";
$text['description-on-busy']['de-at'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben."; //copied from de-de
$text['description-on-busy']['de-ch'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben."; //copied from de-de
$text['description-on-busy']['de-de'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben.";
$text['description-on-busy']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
$text['description-on-busy']['es-mx'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión."; //copied from es-cl
$text['description-on-busy']['fr-ca'] = "Remplace la messagerie vocale si activé."; //copied from fr-fr
$text['description-on-busy']['fr-fr'] = "Remplace la messagerie vocale si activé.";
$text['description-on-busy']['he-il'] = "";
$text['description-on-busy']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
$text['description-on-busy']['nl-nl'] = "Indien aangezet, wordt de het antwoordapparaat bij het toestel genegeerd.";
$text['description-on-busy']['pl-pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
$text['description-on-busy']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo algum ramal atender quando estiver ocupado.";
$text['description-on-busy']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
$text['description-on-busy']['ro-ro'] = "";
$text['description-on-busy']['ru-ru'] = "Если включено, этот параметр переопределяет голосовую почту в настройках внутренного номера";
$text['description-on-busy']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen.";
$text['description-on-busy']['uk-ua'] = "Якщо цей параметр включений, то вона перекриває значення голосової пошти, що дозволяє в розширенні.";
$text['description-no_answer']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
$text['description-no_answer']['en-gb'] = "If enabled, it overrides the value of voicemail enabling in extension.";
$text['description-no_answer']['ar-eg'] = "";
$text['description-no_answer']['de-at'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben."; //copied from de-de
$text['description-no_answer']['de-ch'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben."; //copied from de-de
$text['description-no_answer']['de-de'] = "Falls aktiviert, wird die aktive Mailbox der Nebenstelle überschrieben.";
$text['description-no_answer']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
$text['description-no_answer']['es-mx'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión."; //copied from es-cl
$text['description-no_answer']['fr-ca'] = "Remplace la messagerie vocale si activé."; //copied from fr-fr
$text['description-no_answer']['fr-fr'] = "Remplace la messagerie vocale si activé.";
$text['description-no_answer']['he-il'] = "";
$text['description-no_answer']['it-it'] = "Se abilitato, esegue l'override del valore di abilitazione voicemail nell'estensione.";
$text['description-no_answer']['nl-nl'] = "Indien aangezet, wordt de het antwoordapparaat bij het toestel genegeerd.";
$text['description-no_answer']['pl-pl'] = "Jeżeli włączone, ustawienie włączenia poczty głosowej zostaje nadpisane.";
$text['description-no_answer']['pt-br'] = "Se ativado, substitui o valor do correio de voz permitindo uma extensão quando estiver chamando";
$text['description-no_answer']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
$text['description-no_answer']['ro-ro'] = "";
$text['description-no_answer']['ru-ru'] = "Если включено, этот параметр переопределяет голосовую почту в настройках внутренного номера.";
$text['description-no_answer']['sv-se'] = "Om aktiverad, så tar den överhand framför röstbrevlåda hos anknytningen.";
$text['description-no_answer']['uk-ua'] = "Якщо цей параметр включений, то вона перекриває значення голосової пошти, що дозволяє в розширенні.";
$text['description-not_registered']['en-us'] = "If endpoint is not reachable, forward to this destination before going to voicemail.";
$text['description-not_registered']['en-gb'] = "If endpoint is not reachable, forward to this destination before going to voicemail.";
$text['description-not_registered']['ar-eg'] = "";
$text['description-not_registered']['de-at'] = "Rufweiterleitung an neues Ziel, wenn ursprüngliches Ziel nicht erreichbar ist, bevor die Mailbox aktiviert wird."; //copied from de-de
$text['description-not_registered']['de-ch'] = "Rufweiterleitung an neues Ziel, wenn ursprüngliches Ziel nicht erreichbar ist, bevor die Mailbox aktiviert wird."; //copied from de-de
$text['description-not_registered']['de-de'] = "Rufweiterleitung an neues Ziel, wenn ursprüngliches Ziel nicht erreichbar ist, bevor die Mailbox aktiviert wird.";
$text['description-not_registered']['es-cl'] = "Si el punto extremo no es alcanzable, remitir a este destino antes de ir al correo de voz.";
$text['description-not_registered']['es-mx'] = "Si el punto extremo no es alcanzable, remitir a este destino antes de ir al correo de voz."; //copied from es-cl
$text['description-not_registered']['fr-ca'] = "Si extrémité est pas accessible, transmettre à cette destination avant d'aller à la messagerie vocale."; //copied from fr-fr
$text['description-not_registered']['fr-fr'] = "Si extrémité est pas accessible, transmettre à cette destination avant d'aller à la messagerie vocale.";
$text['description-not_registered']['he-il'] = "";
$text['description-not_registered']['it-it'] = "Se l'endpoint non è raggiungibile, inoltra la chiamata a questa destinazione prima della voicemail.";
$text['description-not_registered']['nl-nl'] = "Als het eindpunt niet bereikbaar is, fordt dit de bestemming voordat het antwoordapparaat geactiveerd wordt.";
$text['description-not_registered']['pl-pl'] = "Jeśli punkt końcowy nie jest osiągalny, przekazania do tego celu przed udaniem się na pocztę głosową.";
$text['description-not_registered']['pt-br'] = "Se o destino não for alcançável, desvia a chamata para este destino antes de enviar para o correio de voz. ";
$text['description-not_registered']['pt-pt'] = "Se endpoint não está acessível, encaminhar para este destino antes de ir para a caixa postal.";
$text['description-not_registered']['ro-ro'] = "";
$text['description-not_registered']['ru-ru'] = "Если номер недоступен, переадресовать на это направление до голосовой почты.";
$text['description-not_registered']['sv-se'] = "Om endpoint är inte nås, vidarebefordra till denna destination innan du går till röstbrevlådan.";
$text['description-not_registered']['uk-ua'] = "Якщо кінцева точка не можна досягти, вперед до цієї мети, перш ніж йти на голосову пошту.";
$text['description-ignore_busy']['en-us'] = "Interrupt the call if a destination is busy.";
$text['description-ignore_busy']['en-gb'] = "Interrupt the call if a destination is busy.";
$text['description-ignore_busy']['ar-eg'] = "";
$text['description-ignore_busy']['de-at'] = "Anruf unterbrechen wenn ein Ziel besetzt ist."; //copied from de-de
$text['description-ignore_busy']['de-ch'] = "Anruf unterbrechen wenn ein Ziel besetzt ist."; //copied from de-de
$text['description-ignore_busy']['de-de'] = "Anruf unterbrechen wenn ein Ziel besetzt ist.";
$text['description-ignore_busy']['es-cl'] = "Interrumpir la llamada si un destino está ocupado.";
$text['description-ignore_busy']['es-mx'] = "Interrumpir la llamada si un destino está ocupado."; //copied from es-cl
$text['description-ignore_busy']['fr-ca'] = "Interrompez l'appel si une destination est occupé."; //copied from fr-fr
$text['description-ignore_busy']['fr-fr'] = "Interrompez l'appel si une destination est occupé.";
$text['description-ignore_busy']['he-il'] = "";
$text['description-ignore_busy']['it-it'] = "Interrompe la chiamata se la destinazione è occupata.";
$text['description-ignore_busy']['nl-nl'] = "Onderbreek de oproep indien de bestemming bezet is.";
$text['description-ignore_busy']['pl-pl'] = "Przerwanie połączenia, jeśli docelowy jest zajęty.";
$text['description-ignore_busy']['pt-br'] = "Interromper a chamada, se um destino está ocupado."; //copied from pt-pt
$text['description-ignore_busy']['pt-pt'] = "Interromper a chamada, se um destino está ocupado.";
$text['description-ignore_busy']['ro-ro'] = "";
$text['description-ignore_busy']['ru-ru'] = "Прервать вызов, если конечная точка занята.";
$text['description-ignore_busy']['sv-se'] = "Avbryt samtal om en destination är upptagen.";
$text['description-ignore_busy']['uk-ua'] = "Переривання виклику, якщо абонент зайнятий.";
$text['description-cid-number-prefix']['en-us'] = "Set the caller ID number prefix.";
$text['description-cid-number-prefix']['en-gb'] = "Set the caller ID number prefix.";
$text['description-cid-number-prefix']['ar-eg'] = "";
$text['description-cid-number-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Nummer)"; //copied from de-de
$text['description-cid-number-prefix']['de-ch'] = "Setzen Sie ein Präfix für die Anruferkennung (Nummer)"; //copied from de-de
$text['description-cid-number-prefix']['de-de'] = "Setzen Sie ein Präfix für die Anruferkennung (Nummer)";
$text['description-cid-number-prefix']['es-cl'] = "Configure el prefijo de número de caller ID.";
$text['description-cid-number-prefix']['es-mx'] = "Configure el prefijo de número de caller ID."; //copied from es-cl
$text['description-cid-number-prefix']['fr-ca'] = "Définir un préfixe sur le nombre d'ID d'appelant."; //copied from fr-fr
$text['description-cid-number-prefix']['fr-fr'] = "Définir un préfixe sur le nombre d'ID d'appelant.";
$text['description-cid-number-prefix']['he-il'] = "";
$text['description-cid-number-prefix']['it-it'] = "Imposta il prefisso per il numero chiamante.";
$text['description-cid-number-prefix']['nl-nl'] = "Stel het CID voorloopnummer in";
$text['description-cid-number-prefix']['pl-pl'] = "Prefiks prezentacji numeru dzwoniącego.";
$text['description-cid-number-prefix']['pt-br'] = "Defina o número do prefixo.";
$text['description-cid-number-prefix']['pt-pt'] = "Defina o número do Chamador";
$text['description-cid-number-prefix']['ro-ro'] = "";
$text['description-cid-number-prefix']['ru-ru'] = "Задайте префикс Caller ID Номер.";
$text['description-cid-number-prefix']['sv-se'] = "Ange nummerpresentation prefix.";
$text['description-cid-number-prefix']['uk-ua'] = "Задайте номер префікса ідентифікації абонента.";
$text['description-cid-number']['en-us'] = "Select a number to override the original caller ID number.";
$text['description-cid-number']['en-gb'] = "Select a number to override the original caller ID number.";
$text['description-cid-number']['ar-eg'] = "";
$text['description-cid-number']['de-at'] = "Wählen Sie eine Nummer mit der die ursprüngliche Anrufer-ID-Nummer überschreiben werden soll."; //copied from de-de
$text['description-cid-number']['de-ch'] = "Wählen Sie eine Nummer mit der die ursprüngliche Anrufer-ID-Nummer überschreiben werden soll."; //copied from de-de
$text['description-cid-number']['de-de'] = "Wählen Sie eine Nummer mit der die ursprüngliche Anrufer-ID-Nummer überschreiben werden soll.";
$text['description-cid-number']['es-cl'] = "Seleccionar un número para anular el número de ID de llamada original.";
$text['description-cid-number']['es-mx'] = "Seleccionar un número para anular el número de ID de llamada original."; //copied from es-cl
$text['description-cid-number']['fr-ca'] = "Sélectionnez un numéro pour remplacer le numéro d'origine identification de l'appelant."; //copied from fr-fr
$text['description-cid-number']['fr-fr'] = "Sélectionnez un numéro pour remplacer le numéro d'origine identification de l'appelant.";
$text['description-cid-number']['he-il'] = "";
$text['description-cid-number']['it-it'] = "Seleziona un numero per sovrascrivere il numero Caller ID originale.";
$text['description-cid-number']['nl-nl'] = "Selecteer een nummer dat het originele CID nummer moet vervangen.";
$text['description-cid-number']['pl-pl'] = "Wybierz numer, aby zastąpić oryginalny numer ID.";
$text['description-cid-number']['pt-br'] = "Selecione um número para substituir o número de identificação de chamada inicial."; //copied from pt-pt
$text['description-cid-number']['pt-pt'] = "Selecione um número para substituir o número de identificação de chamada inicial.";
$text['description-cid-number']['ro-ro'] = "";
$text['description-cid-number']['ru-ru'] = "Выберите номер для переопределения оригинального Caller ID Номер.";
$text['description-cid-number']['sv-se'] = "Välj ett nummer för att åsidosätta den ursprungliga uppringaren ID-nummer.";
$text['description-cid-number']['uk-ua'] = "Виберіть номер, щоб перевизначити вихідний ідентифікаційний номер абонента.";
$text['description-cid-name-prefix']['en-us'] = "Set the caller ID name prefix.";
$text['description-cid-name-prefix']['en-gb'] = "Set the caller ID name prefix.";
$text['description-cid-name-prefix']['ar-eg'] = "";
$text['description-cid-name-prefix']['de-at'] = "Setzen Sie ein Präfix für die Anruferkennung (Name)"; //copied from de-de
$text['description-cid-name-prefix']['de-ch'] = "Setzen Sie ein Präfix für die Anruferkennung (Name)"; //copied from de-de
$text['description-cid-name-prefix']['de-de'] = "Setzen Sie ein Präfix für die Anruferkennung (Name)";
$text['description-cid-name-prefix']['es-cl'] = "Configure el prefijo de nombre de caller ID";
$text['description-cid-name-prefix']['es-mx'] = "Configure el prefijo de nombre de caller ID"; //copied from es-cl
$text['description-cid-name-prefix']['fr-ca'] = "Choisir le péfixe du nom d'appelant."; //copied from fr-fr
$text['description-cid-name-prefix']['fr-fr'] = "Choisir le péfixe du nom d'appelant.";
$text['description-cid-name-prefix']['he-il'] = "";
$text['description-cid-name-prefix']['it-it'] = "Imposta il prefisso per il nome chiamante.";
$text['description-cid-name-prefix']['nl-nl'] = "Stel de CID naam prefix in.";
$text['description-cid-name-prefix']['pl-pl'] = "Prefiks prezentacji nazwy dzwoniącego.";
$text['description-cid-name-prefix']['pt-br'] = "Defina o nome (ID) do discador.";
$text['description-cid-name-prefix']['pt-pt'] = "Defina o nome do Chamador";
$text['description-cid-name-prefix']['ro-ro'] = "";
$text['description-cid-name-prefix']['ru-ru'] = "ВЗадайте префикс Caller ID Имя.";
$text['description-cid-name-prefix']['sv-se'] = "Ange namnpresentation prefix.";
$text['description-cid-name-prefix']['uk-ua'] = "Встановіть префікс ідентифікаційного імені абонента.";
$text['description-call-prompt']['en-us'] = "Prompt to accept the call for external destinations.";
$text['description-call-prompt']['en-gb'] = "Prompt to accept the call for external destinations.";
$text['description-call-prompt']['ar-eg'] = "";
$text['description-call-prompt']['de-at'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll."; //copied from de-de
$text['description-call-prompt']['de-ch'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll."; //copied from de-de
$text['description-call-prompt']['de-de'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll.";
$text['description-call-prompt']['es-cl'] = "Preguntar para aceptar un llamado para destinos externos";
$text['description-call-prompt']['es-mx'] = "Preguntar para aceptar un llamado para destinos externos"; //copied from es-cl
$text['description-call-prompt']['fr-ca'] = "Annonce pour accepter l'appel venant de destinations externes."; //copied from fr-fr
$text['description-call-prompt']['fr-fr'] = "Annonce pour accepter l'appel venant de destinations externes.";
$text['description-call-prompt']['he-il'] = "";
$text['description-call-prompt']['it-it'] = "Prompt per accettare le chiamate per le destinazioni esterne.";
$text['description-call-prompt']['nl-nl'] = "Navragen of de oproep voor externe verbindingen acceptabel is.";
$text['description-call-prompt']['pl-pl'] = "Zapytaj czy akceptować rozmowę do zewnętrznych destynacji.";
$text['description-call-prompt']['pt-br'] = "Perguntar para aceitar chamados de destinatários externos.";
$text['description-call-prompt']['pt-pt'] = "Aceitar chamada para destinos externos.";
$text['description-call-prompt']['ro-ro'] = "";
$text['description-call-prompt']['ru-ru'] = "Сообщение о приеме вызова для внешних направлений.";
$text['description-call-prompt']['sv-se'] = "Kräv verifiering för att ta emot samtal för externa destinationer.";
$text['description-call-prompt']['uk-ua'] = "";
$text['description-call_routing']['en-us'] = "Define alternate inbound call handling for the following extensions.";
$text['description-call_routing']['en-gb'] = "Define alternate inbound call handling for the following extensions.";
$text['description-call_routing']['ar-eg'] = "";
$text['description-call_routing']['de-at'] = "Definieren Sie eine alternative Handhabung von eingehenden Anrufen für nachfolgende Nebenstellen."; //copied from de-de
$text['description-call_routing']['de-ch'] = "Definieren Sie eine alternative Handhabung von eingehenden Anrufen für nachfolgende Nebenstellen."; //copied from de-de
$text['description-call_routing']['de-de'] = "Definieren Sie eine alternative Handhabung von eingehenden Anrufen für nachfolgende Nebenstellen.";
$text['description-call_routing']['es-cl'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes.";
$text['description-call_routing']['es-mx'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes."; //copied from es-cl
$text['description-call_routing']['fr-ca'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant."; //copied from fr-fr
$text['description-call_routing']['fr-fr'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant.";
$text['description-call_routing']['he-il'] = "";
$text['description-call_routing']['it-it'] = "Definisce gestione alternativa per le chiamate in ingresso per i seguenti interni.";
$text['description-call_routing']['nl-nl'] = "Deinieer alternatief inkomend gesprek afhandeling in voor de volgende toestellen.";
$text['description-call_routing']['pl-pl'] = "Definiowanie alternatywnego połączenia przychodzącego obsługi dla następujących rozszerzeń.";
$text['description-call_routing']['pt-br'] = "Defina o tratamento de entradas alternativas para os seguintes ramais. ";
$text['description-call_routing']['pt-pt'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
$text['description-call_routing']['ro-ro'] = "";
$text['description-call_routing']['ru-ru'] = "Установливает альтернативный вариант приема входящих для следующих внутренних номеров.";
$text['description-call_routing']['sv-se'] = "Definiera alternativa inkommande samtalshantering för följande tillägg.";
$text['description-call_routing']['uk-ua'] = "Визначити обробку для наступних розширень альтернативного вхідного дзвінка.";
$text['description-call_forward']['en-us'] = "Forward all calls to the specified destination.";
$text['description-call_forward']['en-gb'] = "Forward all calls to the specified destination.";
$text['description-call_forward']['ar-eg'] = "";
$text['description-call_forward']['de-at'] = "Leiten Sie alle Anrufe an das angegebene Ziel."; //copied from de-de
$text['description-call_forward']['de-ch'] = "Leiten Sie alle Anrufe an das angegebene Ziel."; //copied from de-de
$text['description-call_forward']['de-de'] = "Leiten Sie alle Anrufe an das angegebene Ziel.";
$text['description-call_forward']['es-cl'] = "Desviar todas las llamadas al destino especificado.";
$text['description-call_forward']['es-mx'] = "Desviar todas las llamadas al destino especificado."; //copied from es-cl
$text['description-call_forward']['fr-ca'] = "Transférer tous les appels vers la destination spécifiée."; //copied from fr-fr
$text['description-call_forward']['fr-fr'] = "Transférer tous les appels vers la destination spécifiée.";
$text['description-call_forward']['he-il'] = "";
$text['description-call_forward']['it-it'] = "Inoltra tutte le chiamate ad una destinazione specifica.";
$text['description-call_forward']['nl-nl'] = "Stuur all oproepen naar de ingestelde bestemming.";
$text['description-call_forward']['pl-pl'] = "Przekazywanie wszystkich połączeń do określonego przeznaczenia.";
$text['description-call_forward']['pt-br'] = "Encaminhar todas as chamadas para o destino especificado."; //copied from pt-pt
$text['description-call_forward']['pt-pt'] = "Encaminhar todas as chamadas para o destino especificado.";
$text['description-call_forward']['ro-ro'] = "";
$text['description-call_forward']['ru-ru'] = "Переадресовать все вызовы на указанные направления.";
$text['description-call_forward']['sv-se'] = "Vidarekoppla alla samtal till den angivna destinationen.";
$text['description-call_forward']['uk-ua'] = "Усі дзвінки скеровуються на вказане місце призначення.";
$text['description']['en-us'] = "Directs incoming calls for extension:";
$text['description']['en-gb'] = "Directs incoming calls for extension:";
$text['description']['ar-eg'] = "";
$text['description']['de-at'] = "Leitet eingehende Gespräche für die Nebenstelle:"; //copied from de-de
$text['description']['de-ch'] = "Leitet eingehende Gespräche für die Nebenstelle:"; //copied from de-de
$text['description']['de-de'] = "Leitet eingehende Gespräche für die Nebenstelle:";
$text['description']['es-cl'] = "Dirige las llamadas entrantes hacia una extensión:";
$text['description']['es-mx'] = "Dirige las llamadas entrantes hacia una extensión:"; //copied from es-cl
$text['description']['fr-ca'] = "Rediriger les appels entrant pour l'extension:"; //copied from fr-fr
$text['description']['fr-fr'] = "Rediriger les appels entrant pour l'extension:";
$text['description']['he-il'] = "";
$text['description']['it-it'] = "Dirotta le chiamate in ingresso per l'interno:";
$text['description']['nl-nl'] = "Verwijs inkomende oproepen voor toestel: ";
$text['description']['pl-pl'] = "Kieruj rozmowy przychodzące na numer wewnętrzny:";
$text['description']['pt-br'] = "Direciona as chamadas que estão entrando para um ramal.";
$text['description']['pt-pt'] = "Direciona as chamadas recebidas para a extensão:";
$text['description']['ro-ro'] = "";
$text['description']['ru-ru'] = "Прямые входящие для внутеннего номера:";
$text['description']['sv-se'] = "Styr inkommande samtal för anknytning:";
$text['description']['uk-ua'] = "Керування вхідними дзвінками для розширення";
$text['confirm-update']['en-us'] = "Update Complete";
$text['confirm-update']['en-gb'] = "Update Complete";
$text['confirm-update']['ar-eg'] = "";
$text['confirm-update']['de-at'] = "Aktualisierung durchgeführt"; //copied from de-de
$text['confirm-update']['de-ch'] = "Aktualisierung durchgeführt"; //copied from de-de
$text['confirm-update']['de-de'] = "Aktualisierung durchgeführt";
$text['confirm-update']['es-cl'] = "Actualización Completa";
$text['confirm-update']['es-mx'] = "Actualización Completa"; //copied from es-cl
$text['confirm-update']['fr-ca'] = "Mis à jour"; //copied from fr-fr
$text['confirm-update']['fr-fr'] = "Mis à jour";
$text['confirm-update']['he-il'] = "";
$text['confirm-update']['it-it'] = "Aggiornamento Completato";
$text['confirm-update']['nl-nl'] = "Bijwerken gereed";
$text['confirm-update']['pl-pl'] = "Aktualizacja zakonczona";
$text['confirm-update']['pt-br'] = "Atualização Efetuada";
$text['confirm-update']['pt-pt'] = "Actualização Efectuada";
$text['confirm-update']['ro-ro'] = "";
$text['confirm-update']['ru-ru'] = "Обновление завершено";
$text['confirm-update']['sv-se'] = "Uppdatering Klar";
$text['confirm-update']['uk-ua'] = "Оновлено";
$text['check-true']['en-us'] = "True";
$text['check-true']['en-gb'] = "True";
$text['check-true']['ar-eg'] = "";
$text['check-true']['de-at'] = "An"; //copied from de-de
$text['check-true']['de-ch'] = "An"; //copied from de-de
$text['check-true']['de-de'] = "An";
$text['check-true']['es-cl'] = "Verdadero";
$text['check-true']['es-mx'] = "Verdadero"; //copied from es-cl
$text['check-true']['fr-ca'] = "Oui"; //copied from fr-fr
$text['check-true']['fr-fr'] = "Oui";
$text['check-true']['he-il'] = "";
$text['check-true']['it-it'] = "Vero";
$text['check-true']['nl-nl'] = "Ja";
$text['check-true']['pl-pl'] = "Tak";
$text['check-true']['pt-br'] = "Sim"; //copied from pt-pt
$text['check-true']['pt-pt'] = "Sim";
$text['check-true']['ro-ro'] = "";
$text['check-true']['ru-ru'] = "Да";
$text['check-true']['sv-se'] = "Sann";
$text['check-true']['uk-ua'] = "Так";
$text['check-simultaneous']['en-us'] = "simultaneous";
$text['check-simultaneous']['en-gb'] = "simultaneous";
$text['check-simultaneous']['ar-eg'] = "";
$text['check-simultaneous']['de-at'] = "gleichzeitig"; //copied from de-de
$text['check-simultaneous']['de-ch'] = "gleichzeitig"; //copied from de-de
$text['check-simultaneous']['de-de'] = "gleichzeitig";
$text['check-simultaneous']['es-cl'] = "simultaneo";
$text['check-simultaneous']['es-mx'] = "simultaneo"; //copied from es-cl
$text['check-simultaneous']['fr-ca'] = "simultanément"; //copied from fr-fr
$text['check-simultaneous']['fr-fr'] = "simultanément";
$text['check-simultaneous']['he-il'] = "";
$text['check-simultaneous']['it-it'] = "Simultaneo";
$text['check-simultaneous']['nl-nl'] = "Gelijktijdig";
$text['check-simultaneous']['pl-pl'] = "jednoczesne";
$text['check-simultaneous']['pt-br'] = "Simultâneo";
$text['check-simultaneous']['pt-pt'] = "simultâneo";
$text['check-simultaneous']['ro-ro'] = "";
$text['check-simultaneous']['ru-ru'] = "одновременно";
$text['check-simultaneous']['sv-se'] = "Samtidig";
$text['check-simultaneous']['uk-ua'] = "одночасно";
$text['check-sequence']['en-us'] = "sequence";
$text['check-sequence']['en-gb'] = "sequence";
$text['check-sequence']['ar-eg'] = "";
$text['check-sequence']['de-at'] = "sequenziell"; //copied from de-de
$text['check-sequence']['de-ch'] = "sequenziell"; //copied from de-de
$text['check-sequence']['de-de'] = "sequenziell";
$text['check-sequence']['es-cl'] = "secuencia";
$text['check-sequence']['es-mx'] = "secuencia"; //copied from es-cl
$text['check-sequence']['fr-ca'] = "séquence"; //copied from fr-fr
$text['check-sequence']['fr-fr'] = "séquence";
$text['check-sequence']['he-il'] = "";
$text['check-sequence']['it-it'] = "Sequenza";
$text['check-sequence']['nl-nl'] = "Volgorde";
$text['check-sequence']['pl-pl'] = "kolejność";
$text['check-sequence']['pt-br'] = "Sequência";
$text['check-sequence']['pt-pt'] = "sequência";
$text['check-sequence']['ro-ro'] = "";
$text['check-sequence']['ru-ru'] = "последовательно";
$text['check-sequence']['sv-se'] = "sekvens";
$text['check-sequence']['uk-ua'] = "послідовно";
$text['check-false']['en-us'] = "False";
$text['check-false']['en-gb'] = "False";
$text['check-false']['ar-eg'] = "";
$text['check-false']['de-at'] = "Aus"; //copied from de-de
$text['check-false']['de-ch'] = "Aus"; //copied from de-de
$text['check-false']['de-de'] = "Aus";
$text['check-false']['es-cl'] = "Falso";
$text['check-false']['es-mx'] = "Falso"; //copied from es-cl
$text['check-false']['fr-ca'] = "Non"; //copied from fr-fr
$text['check-false']['fr-fr'] = "Non";
$text['check-false']['he-il'] = "";
$text['check-false']['it-it'] = "Falso";
$text['check-false']['nl-nl'] = "Nee";
$text['check-false']['pl-pl'] = "Nie";
$text['check-false']['pt-br'] = "Não"; //copied from pt-pt
$text['check-false']['pt-pt'] = "Não";
$text['check-false']['ro-ro'] = "";
$text['check-false']['ru-ru'] = "Нет";
$text['check-false']['sv-se'] = "Falsk";
$text['check-false']['uk-ua'] = "Ні";
$text['button-view_all']['en-us'] = "View All";
$text['button-view_all']['en-gb'] = "View All";
$text['button-view_all']['ar-eg'] = "";
$text['button-view_all']['de-at'] = "Alle anzeigen"; //copied from de-de
$text['button-view_all']['de-ch'] = "Alle anzeigen"; //copied from de-de
$text['button-view_all']['de-de'] = "Alle anzeigen";
$text['button-view_all']['es-cl'] = "Mostrar Todos";
$text['button-view_all']['es-mx'] = "Mostrar Todos"; //copied from es-cl
$text['button-view_all']['fr-ca'] = "Tout Montrer"; //copied from fr-fr
$text['button-view_all']['fr-fr'] = "Tout Montrer";
$text['button-view_all']['he-il'] = "הצג הכל";
$text['button-view_all']['it-it'] = "Mostra Tutto";
$text['button-view_all']['nl-nl'] = "Toon alles";
$text['button-view_all']['pl-pl'] = "Pokaż wszystkie";
$text['button-view_all']['pt-br'] = "Mostrar Todos"; //copied from pt-pt
$text['button-view_all']['pt-pt'] = "Mostrar Todos";
$text['button-view_all']['ro-ro'] = "";
$text['button-view_all']['ru-ru'] = "Показать все";
$text['button-view_all']['sv-se'] = "Visa Allt";
$text['button-view_all']['uk-ua'] = "Показати всі";
?>
+33
View File
@@ -0,0 +1,33 @@
<?php
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Forward";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Forward";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['de-at'] = "Rufumleitung";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rufumleitung";
$apps[$x]['menu'][$y]['title']['de-de'] = "Rufumleitung";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Reenvio de Llamadas";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Reenvio de Llamadas";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Renvoi d'appel";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Renvoi d'appel";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['it-it'] = "Inoltro";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep doorsturen";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przekierowanie";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Encaminhamento de chamadas";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Encaminhamento de Chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переадресация";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Vidarekoppling";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Переадресація";
$apps[$x]['menu'][$y]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['path'] = "/app/call_forward/call_forward.php";
$apps[$x]['menu'][$y]['groups'][] = "user";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
?>
+407
View File
@@ -0,0 +1,407 @@
<?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-2019
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
//check permissions
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], 'app/calls');
//get posted data
if (is_array($_POST['extensions'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$extensions = $_POST['extensions'];
}
//process the http post data by action
if ($action != '' && is_array($extensions) && @sizeof($extensions) != 0) {
switch ($action) {
case 'toggle_call_forward':
if (permission_exists('call_forward')) {
$obj = new call_forward;
$obj->toggle($extensions);
}
break;
case 'toggle_follow_me':
if (permission_exists('follow_me')) {
$obj = new follow_me;
$obj->toggle($extensions);
}
break;
case 'toggle_do_not_disturb':
if (permission_exists('do_not_disturb')) {
$obj = new do_not_disturb;
$obj->toggle($extensions);
}
break;
}
header('Location: calls.php'.($search != '' ? '?search='.urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//get the search
$search = strtolower($_GET["search"]);
//define select count query
$sql = "select count(*) from v_extensions ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "where true ";
}
else {
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (strlen($search) > 0) {
$sql .= "and ( ";
$sql .= "extension like :search ";
$sql .= "or lower(description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= "and enabled = 'true' ";
if (!permission_exists('extension_edit')) {
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = '".$row['user']."' ";
$x++;
}
$sql .= ")";
}
else {
//used to hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$sql .= $sql_search;
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
unset($parameters);
//prepare the paging
if ($is_included) {
$rows_per_page = 10;
}
else {
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
}
$params[] = "app_uuid=".$app_uuid;
if ($search) { $params[] = "search=".$search; }
if ($order_by) { $params[] = "order_by=".$order_by; }
if ($order) { $params[] = "order=".$order; }
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$params[] .= "show=all";
}
$param = $params ? implode('&', $params) : null;
unset($params);
$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);
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_extensions ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "where true ";
}
else {
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (strlen($search) > 0) {
$sql .= "and ( ";
$sql .= "extension like :search ";
$sql .= "or lower(description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= "and enabled = 'true' ";
if (!permission_exists('extension_edit')) {
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = '".$row['user']."' ";
$x++;
}
$sql .= ")";
}
else {
//used to hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$sql .= $sql_search;
$sql .= order_by($order_by, $order, 'extension', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$extensions = $database->select($sql, $parameters, 'all');
unset($parameters);
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include header
if (!$is_included) {
$document['title'] = $text['title-call_forward'];
}
require_once "resources/header.php";
//show the content
if ($is_included) {
echo "<div class='action_bar sub'>\n";
echo " <div class='heading'><b>".$text['header-call_forward']."</b></div>\n";
echo " <div class='actions'>\n";
if ($num_rows > 10) {
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/calls/calls.php']);
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
}
else {
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['header-call_forward']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
if ($extensions) {
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');"]);
}
}
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";
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
echo " <input type='hidden' name='show' value='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 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'=>'calls.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
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_form_submit('form_list');"])]);
}
echo $text['description-call_routing']."\n";
echo "<br /><br />\n";
echo "<form id='form_list' method='post'>\n";
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
echo " <input type='hidden' name='show' value='all'>";
}
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";
echo "<tr class='list-header'>\n";
if (!$is_included) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($extensions ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
echo "<th>".$text['label-domain']."</th>\n";
}
}
echo " <th>".$text['label-extension']."</th>\n";
if (permission_exists('call_forward')) {
echo " <th>".$text['label-call_forward']."</th>\n";
}
if (permission_exists('follow_me')) {
echo " <th>".$text['label-follow_me']."</th>\n";
}
if (permission_exists('do_not_disturb')) {
echo " <th>".$text['label-dnd']."</th>\n";
}
echo " <th class='".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".$text['label-description']."</th>\n";
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($extensions)) {
$x = 0;
foreach($extensions as $row) {
$list_row_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']);
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='extensions[$x][uuid]' value='".escape($row['extension_uuid'])."' />\n";
echo " </td>\n";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
$domain = $text['label-global'];
}
echo " <td>".escape($domain)."</td>\n";
}
}
echo " <td><a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
if (permission_exists('call_forward')) {
//-- inline toggle -----------------
//$button_label = $row['forward_all_enabled'] == 'true' ? ($row['forward_all_destination'] != '' ? escape(format_phone($row['forward_all_destination'])) : '('.$text['label-invalid'].')') : null;
//if (!$is_included) {
// echo " <td class='no-link'>";
// echo button::create(['type'=>'submit','class'=>'link','label'=>($button_label != '' ? $button_label : $text['label-disabled']),'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle_call_forward'); list_form_submit('form_list')"]);
// echo " </td>\n";
//}
//else {
// echo " <td>".$button_label."</td>";
//}
//unset($button_label);
//----------------------------------
echo " <td>\n";
echo $row['forward_all_enabled'] == 'true' ? escape(format_phone($row['forward_all_destination'])) : '&nbsp;';
echo " </td>\n";
}
if (permission_exists('follow_me')) {
//-- inline toggle -----------------
//get destination count
//if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
// $sql = "select count(*) from v_follow_me_destinations ";
// $sql .= "where follow_me_uuid = :follow_me_uuid ";
// $sql .= "and domain_uuid = :domain_uuid ";
// $parameters['follow_me_uuid'] = $row['follow_me_uuid'];
// $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
// $database = new database;
// $follow_me_destination_count = $database->select($sql, $parameters, 'column');
// $button_label = $follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : $text['label-invalid'];
// unset($sql, $parameters);
//}
//if (!$is_included) {
// echo " <td class='no-link'>\n";
// echo button::create(['type'=>'submit','class'=>'link','label'=>($button_label != '' ? $button_label : $text['label-disabled']),'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle_follow_me'); list_form_submit('form_list')"]);
// echo " </td>\n";
//}
//else {
// echo " <td>".$button_label."</td>";
//}
//unset($button_label);
//----------------------------------
//get destination count
$follow_me_destination_count = 0;
if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
$sql = "select count(*) from v_follow_me_destinations ";
$sql .= "where follow_me_uuid = :follow_me_uuid ";
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['follow_me_uuid'] = $row['follow_me_uuid'];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$follow_me_destination_count = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
}
echo " <td>\n";
echo $follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : '&nbsp;';
echo " </td>\n";
}
if (permission_exists('do_not_disturb')) {
//-- inline toggle -----------------
//$button_label = $row['do_not_disturb'] == 'true' ? $text['label-enabled'] : null;
//if (!$is_included) {
// echo " <td class='no-link'>";
// echo button::create(['type'=>'submit','class'=>'link','label'=>($button_label != '' ? $button_label : $text['label-disabled']),'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle_do_not_disturb'); list_form_submit('form_list')"]);
// echo " </td>\n";
//}
//else {
// echo " <td>".$button_label."</td>";
//}
//----------------------------------
echo " <td>\n";
echo $row['do_not_disturb'] == 'true' ? $text['label-enabled'] : '&nbsp;';
echo " </td>\n";
}
echo " <td class='description overflow ".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".escape($row['description'])."&nbsp;</td>\n";
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>";
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";
$x++;
}
unset($extensions);
}
echo "</table>\n";
if (!$is_included) {
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
require_once "resources/footer.php";
}
?>
+709
View File
@@ -0,0 +1,709 @@
<?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-2021
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//define the destination_select function
function destination_select($select_name, $select_value, $select_default) {
if (strlen($select_value) == 0) { $select_value = $select_default; }
echo " <select class='formfld' style='width: 55px;' name='$select_name'>\n";
$i = 0;
while($i <= 100) {
echo " <option value='".$i."' ".(($select_value == $i) ? "selected='selected'" : null).">".$i."</option>\n";
$i = $i + 5;
}
echo "</select>\n";
}
//get the extension_uuid
$extension_uuid = $_REQUEST["id"];
//get the extension number
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and extension_uuid = :extension_uuid ";
if (!permission_exists('extension_edit')) {
if (count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $index => $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = :extension_".$index." ";
$parameters['extension_'.$index] = $row['user'];
$x++;
}
$sql .= ")";
}
else {
//hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
$extension = $row["extension"];
$number_alias = $row["number_alias"];
$accountcode = $row["accountcode"];
$effective_caller_id_name = $row["effective_caller_id_name"];
$effective_caller_id_number = $row["effective_caller_id_number"];
$outbound_caller_id_name = $row["outbound_caller_id_name"];
$outbound_caller_id_number = $row["outbound_caller_id_number"];
$do_not_disturb = $row["do_not_disturb"] != '' ? $row["do_not_disturb"] : 'false';
$forward_all_destination = $row["forward_all_destination"];
$forward_all_enabled = $row["forward_all_enabled"];
$forward_busy_destination = $row["forward_busy_destination"];
$forward_busy_enabled = $row["forward_busy_enabled"];
$forward_no_answer_destination = $row["forward_no_answer_destination"];
$forward_no_answer_enabled = $row["forward_no_answer_enabled"];
$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"];
}
else {
echo "access denied";
exit;
}
unset($sql, $parameters, $row);
//process post vars
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//get http post variables and set them to php variables
if (count($_POST) > 0) {
$forward_all_enabled = $_POST["forward_all_enabled"];
$forward_all_destination = $_POST["forward_all_destination"];
$forward_busy_enabled = $_POST["forward_busy_enabled"];
$forward_busy_destination = $_POST["forward_busy_destination"];
$forward_no_answer_enabled = $_POST["forward_no_answer_enabled"];
$forward_no_answer_destination = $_POST["forward_no_answer_destination"];
$forward_user_not_registered_enabled = $_POST["forward_user_not_registered_enabled"];
$forward_user_not_registered_destination = $_POST["forward_user_not_registered_destination"];
$cid_name_prefix = $_POST["cid_name_prefix"];
$cid_number_prefix = $_POST["cid_number_prefix"];
$follow_me_enabled = $_POST["follow_me_enabled"];
$follow_me_ignore_busy = $_POST["follow_me_ignore_busy"];
$n = 0;
$destination_found = false;
foreach ($_POST["destinations"] as $field) {
$destinations[$n]['uuid'] = $field['uuid'];
$destinations[$n]['destination'] = $field['destination'];
$destinations[$n]['delay'] = $field['delay'];
$destinations[$n]['prompt'] = $field['prompt'];
$destinations[$n]['timeout'] = $field['timeout'];
if ($field['destination'] != '') {
$destination_found = true;
}
$n++;
}
$dnd_enabled = $_POST["dnd_enabled"];
}
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: calls.php');
exit;
}
//check for all required data
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
$document['title'] = $text['title-call_routing'];
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;
}
//include the classes
include "resources/classes/call_forward.php";
include "resources/classes/follow_me.php";
include "resources/classes/do_not_disturb.php";
//call forward config
if (permission_exists('call_forward')) {
//sanitize the destinations
$forward_all_destination = preg_replace('#[^\*0-9]#', '', $forward_all_destination);
$forward_busy_destination = preg_replace('#[^\*0-9]#', '', $forward_busy_destination);
$forward_no_answer_destination = preg_replace('#[^\*0-9]#', '', $forward_no_answer_destination);
$forward_user_not_registered_destination = preg_replace('#[^\*0-9]#', '', $forward_user_not_registered_destination);
//build the array
$array['extensions'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['extensions'][0]['extension_uuid'] = $extension_uuid;
$array['extensions'][0]['forward_all_enabled'] = $forward_all_enabled;
$array['extensions'][0]['forward_all_destination'] = $forward_all_destination;
$array['extensions'][0]['forward_busy_enabled'] = $forward_busy_enabled;
$array['extensions'][0]['forward_busy_destination'] = $forward_busy_destination;
$array['extensions'][0]['forward_no_answer_enabled'] = $forward_no_answer_enabled;
$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;
}
//do not disturb (dnd) config
if (permission_exists('do_not_disturb')) {
$array['extensions'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['extensions'][0]['extension_uuid'] = $extension_uuid;
$array['extensions'][0]['do_not_disturb'] = $dnd_enabled;
}
//follow me config
if (permission_exists('follow_me')) {
//add follow_me_uuid and follow_me_enabled to the extensions array
if ($follow_me_uuid == '') {
$follow_me_uuid = uuid();
$array['extensions'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['extensions'][0]['extension_uuid'] = $extension_uuid;
$array['extensions'][0]['follow_me_uuid'] = $follow_me_uuid;
}
if ($destination_found) {
$array['extensions'][0]['follow_me_enabled'] = $follow_me_enabled;
}
else {
$array['extensions'][0]['follow_me_enabled'] = 'false';
}
//build the follow me array
$array['follow_me'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$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_ignore_busy'] = $follow_me_ignore_busy;
if ($destination_found) {
$array['follow_me'][0]['follow_me_enabled'] = $follow_me_enabled;
}
else {
$array['follow_me'][0]['follow_me_enabled'] = 'false';
}
$d = 0;
$destination_found = false;
foreach ($destinations as $field) {
if ($field['destination'] != '') {
//sanitize the destination
$field['destination'] = preg_replace('#[^\*0-9]#', '', $field['destination']);
//build the array
$array['follow_me'][0]['follow_me_destinations'][$d]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_uuid'] = $follow_me_uuid;
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_destination_uuid'] = $field['uuid'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_destination'] = $field['destination'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_delay'] = $field['delay'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_prompt'] = $field['prompt'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_timeout'] = $field['timeout'];
$array['follow_me'][0]['follow_me_destinations'][$d]['follow_me_order'] = $d;
$destination_found = true;
$d++;
}
else {
$follow_me_delete_uuids[] = $field['uuid'];
}
}
}
//add the dialplan permission
$p = new permissions;
$p->add("extension_edit", "temp");
//save the data
$database = new database;
$database->app_name = 'call_routing';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//$message = $database->message;
//remove the temporary permission
$p->delete("extension_edit", "temp");
//delete empty destination records
if (is_array($follow_me_delete_uuids) && sizeof($follow_me_delete_uuids) > 0) {
foreach ($follow_me_delete_uuids as $follow_me_delete_uuid) {
$array['follow_me_destinations'][]['follow_me_destination_uuid'] = $follow_me_delete_uuid;
}
$database = new database;
$database->app_name = 'call_routing';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->delete($array);
unset($array);
}
/*
//call forward config
if (permission_exists('call_forward')) {
$call_forward = new call_forward;
$call_forward->domain_uuid = $_SESSION['domain_uuid'];
$call_forward->domain_name = $_SESSION['domain_name'];
$call_forward->extension_uuid = $extension_uuid;
$call_forward->forward_all_destination = $forward_all_destination;
$call_forward->forward_all_enabled = $forward_all_enabled;
}
//do not disturb (dnd) config
if (permission_exists('do_not_disturb')) {
$dnd = new do_not_disturb;
$dnd->domain_uuid = $_SESSION['domain_uuid'];
$dnd->domain_name = $_SESSION['domain_name'];
$dnd->extension_uuid = $extension_uuid;
$dnd->extension = $extension;
$dnd->enabled = $dnd_enabled;
}
//if follow me is enabled then process call forward and dnd first
if ($follow_me_enabled == "true") {
//call forward
$call_forward->set();
unset($call_forward);
//dnd
$dnd->set();
$dnd->user_status();
unset($dnd);
}
//follow me config and process
if (permission_exists('follow_me')) {
$follow_me = new follow_me;
$follow_me->domain_uuid = $_SESSION['domain_uuid'];
$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_enabled = $follow_me_enabled;
$follow_me->set();
unset($follow_me);
}
//if dnd or call forward are enabled process them last
if ($follow_me_enabled != "true") {
if ($forward_all_enabled == "true") {
//dnd
$dnd->set();
$dnd->user_status();
unset($dnd);
//call forward
$call_forward->set();
unset($call_forward);
}
else{
//call forward
$call_forward->set();
unset($call_forward);
//dnd
$dnd->set();
$dnd->user_status();
unset($dnd);
}
}
*/
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
$ring_count = ceil($call_timeout / 6);
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension;
$feature_event_notify->do_not_disturb = $dnd_enabled;
$feature_event_notify->ring_count = $ring_count;
$feature_event_notify->forward_all_enabled = $forward_all_enabled;
$feature_event_notify->forward_busy_enabled = $forward_busy_enabled;
$feature_event_notify->forward_no_answer_enabled = $forward_no_answer_enabled;
//workaround for freeswitch not sending NOTIFY when destination values are nil. Send 0.
if ($forward_all_destination == "") {
$feature_event_notify->forward_all_destination = "0";
}
else {
$feature_event_notify->forward_all_destination = $forward_all_destination;
}
if ($forward_busy_destination == "") {
$feature_event_notify->forward_busy_destination = "0";
}
else {
$feature_event_notify->forward_busy_destination = $forward_busy_destination;
}
if ($forward_no_answer_destination == "") {
$feature_event_notify->forward_no_answer_destination = "0";
}
else {
$feature_event_notify->forward_no_answer_destination = $forward_no_answer_destination;
}
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
$cache->delete("directory:".$extension."@".$_SESSION['domain_name']);
if (strlen($number_alias) > 0) {
$cache->delete("directory:".$number_alias."@".$_SESSION['domain_name']);
}
//add the message
message::add($text['confirm-update']);
}
//show the header
$document['title'] = $text['title-call_routing'];
require_once "resources/header.php";
//pre-populate the form
if (is_uuid($follow_me_uuid)) {
$sql = "select * from v_follow_me ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and follow_me_uuid = :follow_me_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['follow_me_uuid'] = $follow_me_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
unset($sql, $parameters);
if (is_array($row) && sizeof($row) != 0) {
$cid_name_prefix = $row["cid_name_prefix"];
$cid_number_prefix = $row["cid_number_prefix"];
$follow_me_enabled = $row["follow_me_enabled"];
$follow_me_ignore_busy = $row["follow_me_ignore_busy"];
unset($row);
$sql = "select * from v_follow_me_destinations ";
$sql .= "where follow_me_uuid = :follow_me_uuid ";
$sql .= "order by follow_me_order asc ";
$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"];
$destinations[$x]['delay'] = $row["follow_me_delay"];
$destinations[$x]['prompt'] = $row["follow_me_prompt"];
$destinations[$x]['timeout'] = $row["follow_me_timeout"];
}
unset($sql, $parameters, $result, $row);
}
}
//get the extensions array - used with autocomplete
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by extension, number_alias asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$extensions = $database->select($sql, $parameters, 'all');
unset($sql, $parameters, $row);
//set the default
if (!isset($dnd_enabled)) {
//set the value from the database
$dnd_enabled = $do_not_disturb;
}
//prepare the autocomplete
if($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
echo "<script type=\"text/javascript\">\n";
echo "\$(function() {\n";
echo " var extensions = [\n";
foreach ($extensions as &$row) {
if (strlen($number_alias) == 0) {
echo " \"".escape($row["extension"])."\",\n";
}
else {
echo " \"".escape($row["number_alias"])."\",\n";
}
}
echo " ];\n";
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
echo " \$(\"#destination_".$n."\").autocomplete({\n";
echo " source: extensions\n";
echo " });\n";
}
echo "});\n";
echo "</script>\n";
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//show the content
echo "<form method='post' name='frm' id='frm'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call_forward']."</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'=>'calls.php']);
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['description']." <strong>".escape($extension)."</strong>\n";
echo "<br /><br />\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " <strong>".$text['label-call_forward']."</strong>\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
$on_click .= "$('#tr_follow_me_settings').slideUp('fast'); ";
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
$on_click .= "document.getElementById('forward_all_destination').focus(); ";
$on_click2 .= "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
echo " <label for='forward_all_disabled'><input type='radio' name='forward_all_enabled' id='forward_all_disabled' onclick=\"$on_click2\" value='false' ".(($forward_all_enabled == "false" || $forward_all_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_all_enabled'><input type='radio' name='forward_all_enabled' id='forward_all_enabled' onclick=\"$on_click\" value='true' ".(($forward_all_enabled == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "&nbsp;&nbsp;&nbsp;";
echo " <input class='formfld' type='text' name='forward_all_destination' id='forward_all_destination' maxlength='255' placeholder=\"".$text['label-destination']."\" value=\"".escape($forward_all_destination)."\">\n";
echo " <br />".$text['description-call_forward']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-on-busy']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('dnd_disabled').checked=true;";
$on_click .= "document.getElementById('forward_busy_destination').focus();";
echo " <label for='forward_busy_disabled'><input type='radio' name='forward_busy_enabled' id='forward_busy_disabled' onclick=\"\" value='false' ".(($forward_busy_enabled == "false" || $forward_busy_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_busy_enabled'><input type='radio' name='forward_busy_enabled' id='forward_busy_enabled' onclick=\"$on_click\" value='true' ".(($forward_busy_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "&nbsp;&nbsp;&nbsp;";
echo " <input class='formfld' type='text' name='forward_busy_destination' id='forward_busy_destination' maxlength='255' placeholder=\"".$text['label-destination']."\" value=\"".escape($forward_busy_destination)."\">\n";
echo " <br />".$text['description-on-busy']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-no_answer']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('dnd_disabled').checked=true;";
$on_click .= "document.getElementById('forward_no_answer_destination').focus();";
echo " <label for='forward_no_answer_disabled'><input type='radio' name='forward_no_answer_enabled' id='forward_no_answer_disabled' onclick=\"\" value='false' ".(($forward_no_answer_enabled == "false" || $forward_no_answer_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_no_answer_enabled'><input type='radio' name='forward_no_answer_enabled' id='forward_no_answer_enabled' onclick=\"$on_click\" value='true' ".(($forward_no_answer_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "&nbsp;&nbsp;&nbsp;";
echo " <input class='formfld' type='text' name='forward_no_answer_destination' id='forward_no_answer_destination' maxlength='255' placeholder=\"".$text['label-destination']."\" value=\"".escape($forward_no_answer_destination)."\">\n";
echo " <br />".$text['description-no_answer']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-not_registered']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('forward_user_not_registered_destination').focus();";
echo " <label for='forward_user_not_registered_disabled'><input type='radio' name='forward_user_not_registered_enabled' id='forward_user_not_registered_disabled' onclick=\"\" value='false' ".(($forward_user_not_registered_enabled == "false" || $forward_user_not_registered_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_user_not_registered_enabled'><input type='radio' name='forward_user_not_registered_enabled' id='forward_user_not_registered_enabled' onclick=\"$on_click\" value='true' ".(($forward_user_not_registered_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "&nbsp;&nbsp;&nbsp;";
echo " <input class='formfld' type='text' name='forward_user_not_registered_destination' id='forward_user_not_registered_destination' maxlength='255' placeholder=\"".$text['label-destination']."\" value=\"".escape($forward_user_not_registered_destination)."\">\n";
echo " <br />".$text['description-not_registered']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan='2'><br /></td></tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " <strong>".$text['label-follow_me']."</strong>\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('forward_all_disabled').checked=true; ";
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
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);
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
if ($follow_me_enabled == "true" && $dnd_enabled != "true" && $forward_all_enabled != "true") { $style = ''; } else { $style = 'display: none;'; }
echo "<div id='tr_follow_me_settings' style='$style'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destinations']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <table border='0' cellpadding='2' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td class='vtable'>".$text['label-destination_number']."</td>\n";
echo " <td class='vtable'>".$text['label-destination_delay']."</td>\n";
echo " <td class='vtable'>".$text['label-destination_timeout']."</td>\n";
if (permission_exists('follow_me_prompt')) {
echo " <td class='vtable'>".$text['label-destination_prompt']."</td>\n";
}
echo " </tr>\n";
//output destinations
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
echo " <input type='hidden' name='destinations[".$n."][uuid]' value='".(($destinations[$n]['uuid'] != '') ? $destinations[$n]['uuid'] : uuid())."'>\n";
echo " <tr>\n";
echo " <td><input class='formfld' style='min-width: 135px;' type='text' name='destinations[".$n."][destination]' id='destination_".$n."' maxlength='255' value=\"".escape($destinations[$n]['destination'])."\"></td>\n";
echo " <td>\n";
destination_select('destinations['.$n.'][delay]', $destinations[$n]['delay'], '0');
echo " </td>\n";
echo " <td>\n";
destination_select('destinations['.$n.'][timeout]', $destinations[$n]['timeout'], (($_SESSION['follow_me']['timeout']['numeric'] != '') ? $_SESSION['follow_me']['timeout']['numeric'] : 30));
echo " </td>\n";
if (permission_exists('follow_me_prompt')) {
echo " <td>\n";
echo " <select class='formfld' style='width: 90px;' name='destinations[".$n."][prompt]'>\n";
echo " <option value=''></option>\n";
echo " <option value='1' ".(($destinations[$n]['prompt'])?"selected='selected'":null).">".$text['label-destination_prompt_confirm']."</option>\n";
//echo " <option value='2'>".$text['label-destination_prompt_announce]."</option>\n";
echo " </select>\n";
echo " </td>\n";
}
echo " </tr>\n";
}
echo " </table>\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('follow_me_ignore_busy')) {
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap='nowrap'>";
echo $text['label-ignore_busy'];
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " <label for='follow_me_ignore_busy_false'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_false' value='false' onclick=\"\" ".(($follow_me_ignore_busy == "false" || $follow_me_ignore_busy == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_ignore_busy_true'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_true' value='true' onclick=\"$on_click\" ".(($follow_me_ignore_busy == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
echo " <br />\n";
echo $text['description-ignore_busy']."\n";
echo " </td>\n";
echo " </tr>\n";
}
if (permission_exists('follow_me_cid_name_prefix')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-cid-name-prefix']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='cid_name_prefix' maxlength='255' value='".escape($cid_name_prefix)."'>\n";
echo "<br />\n";
echo $text['description-cid-name-prefix']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('follow_me_cid_number_prefix')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-cid-number-prefix']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='cid_number_prefix' maxlength='255' value='".escape($cid_number_prefix)."'>\n";
echo "<br />\n";
echo $text['description-cid-number-prefix']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "</div>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr><td colspan='2'><br /></td></tr>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " <strong>".$text['label-dnd']."</strong>\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
$on_click = "document.getElementById('forward_all_disabled').checked=true;";
$on_click .= "$('#tr_follow_me_settings').slideUp('fast'); ";
$on_click2 .= "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
echo " <label for='dnd_disabled'><input type='radio' name='dnd_enabled' id='dnd_disabled' value='false' onclick=\"$on_click2\" ".(($dnd_enabled == "false" || $dnd_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='dnd_enabled'><input type='radio' name='dnd_enabled' id='dnd_enabled' value='true' onclick=\"$on_click\" ".(($dnd_enabled == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
echo " <br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "<br /><br />";
if ($action == "update") {
echo "<input type='hidden' name='id' value='".escape($extension_uuid)."'>\n";
}
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>
@@ -0,0 +1,279 @@
<?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>
Copyright (C) 2010 - 2016
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Errol Samuels <voiptology@gmail.com>
*/
include "root.php";
//define the call_forward class
class call_forward {
public $debug;
public $domain_uuid;
public $domain_name;
public $extension_uuid;
private $extension;
private $number_alias;
public $forward_all_destination;
public $forward_all_enabled;
private $toll_allow;
public $accountcode;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
public function set() {
//determine whether to update the dial string
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and extension_uuid = :extension_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$parameters['extension_uuid'] = $this->extension_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$this->extension = $row["extension"];
$this->number_alias = $row["number_alias"];
$this->accountcode = $row["accountcode"];
$this->toll_allow = $row["toll_allow"];
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
}
unset($sql, $parameters, $row);
//build extension update array
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
$array['extensions'][0]['forward_all_destination'] = strlen($this->forward_all_destination) != 0 ? $this->forward_all_destination : null;
if (strlen($this->forward_all_destination) == 0 || $this->forward_all_enabled == "false") {
$array['extensions'][0]['forward_all_enabled'] = 'false';
}
else {
$array['extensions'][0]['forward_all_enabled'] = 'true';
}
//grant temporary permissions
$p = new permissions;
$p->add('extension_add', 'temp');
//execute update
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_add', 'temp');
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$this->extension."@".$this->domain_name);
if(strlen($this->number_alias) > 0){
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
}
}
/**
* declare private variables
*/
private $app_name;
private $app_uuid;
private $permission;
private $list_page;
private $table;
private $uuid_prefix;
private $toggle_field;
private $toggle_values;
/**
* toggle records
*/
public function toggle($records) {
//assign private variables
$this->app_name = 'calls';
$this->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$this->permission = 'call_forward';
$this->list_page = 'calls.php';
$this->table = 'extensions';
$this->uuid_prefix = 'extension_';
$this->toggle_field = 'forward_all_enabled';
$this->toggle_values = ['true','false'];
if (permission_exists($this->permission)) {
//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->list_page);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, extension, number_alias, ";
$sql .= "call_timeout, do_not_disturb, ";
$sql .= "forward_all_enabled, forward_all_destination, ";
$sql .= "forward_busy_enabled, forward_busy_destination, ";
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
$sql .= $this->toggle_field." as toggle, follow_me_uuid ";
$sql .= "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'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$extensions[$row['uuid']]['extension'] = $row['extension'];
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
$extensions[$row['uuid']]['state'] = $row['toggle'];
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach ($extensions as $uuid => $extension) {
//check destination
$destination_exists = $extension['forward_all_destination'] != '' ? true : false;
//determine new state
$new_state = $extension['state'] == $this->toggle_values[1] && $destination_exists ? $this->toggle_values[0] : $this->toggle_values[1];
//toggle feature
if ($new_state != $extension['state']) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $new_state;
}
//disable other features
if ($new_state == $this->toggle_values[0]) { //true
$array[$this->table][$x]['do_not_disturb'] = $this->toggle_values[1]; //false
$array[$this->table][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
if (is_uuid($extension['follow_me_uuid'])) {
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
$array['follow_me'][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
}
}
//increment counter
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension['extension'];
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
foreach ($extensions as $uuid => $extension) {
$cache->delete("directory:".$extension['extension']."@".$_SESSION['domain_name']);
if ($extension['number_alias'] != '') {
$cache->delete("directory:".$extension['number_alias']."@".$_SESSION['domain_name']);
}
}
//set message
message::add($text['message-toggle']);
}
unset($records, $extensions, $extension);
}
}
} //function
}// class
?>
@@ -0,0 +1,293 @@
<?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>
Copyright (C) 2010 - 2016
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
//define the dnd class
class do_not_disturb {
public $debug;
public $domain_uuid;
public $domain_name;
public $extension_uuid;
public $extension;
public $enabled;
//update the user_status
public function user_status() {
//update the status
if ($this->enabled == "true") {
//update the call center status
$user_status = "Logged Out";
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['username']."@".$this->domain_name." '".$user_status."'";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//update the database user_status
$user_status = "Do Not Disturb";
$sql = "update v_users set ";
$sql .= "user_status = :user_status ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and username = :username ";
$parameters['user_status'] = "Do Not Disturb";
$parameters['domain_uuid'] = $this->domain_uuid;
$parameters['username'] = $_SESSION['username'];
$database = new database;
$database->execute($sql);
}
}
public function set() {
//determine whether to update the dial string
$sql = "select extension_uuid, extension, number_alias ";
$sql .= "from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
if (is_uuid($this->extension_uuid)) {
$sql .= "and extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $this->extension_uuid;
}
else {
$sql .= "and extension = :extension ";
$parameters['extension'] = $this->extension;
}
$parameters['domain_uuid'] = $this->domain_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (is_uuid($this->extension_uuid)) {
$this->extension_uuid = $row["extension_uuid"];
}
if (strlen($this->extension) == 0) {
if (strlen($row["number_alias"]) == 0) {
$this->extension = $row["extension"];
}
else {
$this->extension = $row["number_alias"];
}
}
}
unset($sql, $parameters, $row);
//build extension update array
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
$array['extensions'][0]['do_not_disturb'] = $this->enabled;
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
//execute update
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$this->extension."@".$this->domain_name);
if(strlen($this->number_alias) > 0){
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
}
} //function
/**
* declare private variables
*/
private $app_name;
private $app_uuid;
private $permission;
private $list_page;
private $table;
private $uuid_prefix;
private $toggle_field;
private $toggle_values;
/**
* toggle records
*/
public function toggle($records) {
//assign private variables
$this->app_name = 'calls';
$this->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$this->permission = 'do_not_disturb';
$this->list_page = 'calls.php';
$this->table = 'extensions';
$this->uuid_prefix = 'extension_';
$this->toggle_field = 'do_not_disturb';
$this->toggle_values = ['true','false'];
if (permission_exists($this->permission)) {
//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->list_page);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, extension, number_alias, ";
$sql .= "call_timeout, do_not_disturb, ";
$sql .= "forward_all_enabled, forward_all_destination, ";
$sql .= "forward_busy_enabled, forward_busy_destination, ";
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
$sql .= $this->toggle_field." as toggle, follow_me_uuid ";
$sql .= "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'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$extensions[$row['uuid']]['extension'] = $row['extension'];
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
$extensions[$row['uuid']]['state'] = $row['toggle'];
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach ($extensions as $uuid => $extension) {
//toggle feature
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $extension['state'] == $this->toggle_values[0] ? $this->toggle_values[1] : $this->toggle_values[0];
//disable other features
if ($array[$this->table][$x][$this->toggle_field] == $this->toggle_values[0]) { //true
$array[$this->table][$x]['forward_all_enabled'] = $this->toggle_values[1]; //false
$array[$this->table][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
if (is_uuid($extension['follow_me_uuid'])) {
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
$array['follow_me'][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
}
}
//increment counter
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension['extension'];
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
foreach ($extensions as $uuid => $extension) {
$cache->delete("directory:".$extension['extension']."@".$_SESSION['domain_name']);
if ($extension['number_alias'] != '') {
$cache->delete("directory:".$extension['number_alias']."@".$_SESSION['domain_name']);
}
}
//set message
message::add($text['message-toggle']);
}
unset($records, $extensions, $extension);
}
}
} //function
} //class
?>
@@ -0,0 +1,84 @@
<?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-2017
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
KonradSC <konrd@yahoo.com>
*/
include "root.php";
//define the feature_event_notify class
class feature_event_notify {
public $debug;
public $domain_name;
public $extension;
public $forward_all_destination;
public $forward_all_enabled;
public $forward_busy_destination;
public $forward_busy_enabled;
public $forward_no_answer_destination;
public $forward_no_answer_enabled;
public $do_not_disturb;
public $ring_count;
//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 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
?>
@@ -0,0 +1,458 @@
<?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>
Copyright (C) 2010 - 2019
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Salvatore Caruso <salvatore.caruso@nems.it>
Riccardo Granchi <riccardo.granchi@nems.it>
Errol Samuels <voiptology@gmail.com>
*/
include "root.php";
//define the follow me class
class follow_me {
public $domain_uuid;
private $domain_name;
public $db_type;
public $follow_me_uuid;
public $cid_name_prefix;
public $cid_number_prefix;
public $accountcode;
public $follow_me_enabled;
public $follow_me_ignore_busy;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
private $extension;
private $number_alias;
private $toll_allow;
public $destination_data_1;
public $destination_type_1;
public $destination_delay_1;
public $destination_prompt_1;
public $destination_timeout_1;
public $destination_data_2;
public $destination_type_2;
public $destination_delay_2;
public $destination_prompt_2;
public $destination_timeout_2;
public $destination_data_3;
public $destination_type_3;
public $destination_delay_3;
public $destination_prompt_3;
public $destination_timeout_3;
public $destination_data_4;
public $destination_type_4;
public $destination_delay_4;
public $destination_prompt_4;
public $destination_timeout_4;
public $destination_data_5;
public $destination_type_5;
public $destination_delay_5;
public $destination_prompt_5;
public $destination_timeout_5;
public $destination_timeout = 0;
public $destination_order = 1;
public function add() {
//build follow me insert array
$array['follow_me'][0]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me'][0]['domain_uuid'] = $this->domain_uuid;
$array['follow_me'][0]['cid_name_prefix'] = $this->cid_name_prefix;
if (strlen($this->cid_number_prefix) > 0) {
$array['follow_me'][0]['cid_number_prefix'] = $this->cid_number_prefix;
}
$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
$p = new permissions;
$p->add('follow_me_add', 'temp');
//execute insert
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('follow_me_add', 'temp');
$this->follow_me_destinations();
}
public function update() {
//build follow me update array
$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_enabled'] = $this->follow_me_enabled;
$array['follow_me'][0]['follow_me_ignore_busy'] = $this->follow_me_ignore_busy;
//grant temporary permissions
$p = new permissions;
$p->add('follow_me_add', 'temp');
//execute update
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('follow_me_add', 'temp');
$this->follow_me_destinations();
}
public function follow_me_destinations() {
//delete related follow me destinations
$array['follow_me_destinations'][0]['follow_me_uuid'] = $this->follow_me_uuid;
//grant temporary permissions
$p = new permissions;
$p->add('follow_me_destination_delete', 'temp');
//execute delete
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->delete($array);
unset($array);
//revoke temporary permissions
$p->delete('follow_me_destination_delete', 'temp');
//build follow me destinations insert array
$x = 0;
if (strlen($this->destination_data_1) > 0) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me_destinations'][$x]['follow_me_destination'] = $this->destination_data_1;
$array['follow_me_destinations'][$x]['follow_me_timeout'] = $this->destination_timeout_1;
$array['follow_me_destinations'][$x]['follow_me_delay'] = $this->destination_delay_1;
$array['follow_me_destinations'][$x]['follow_me_prompt'] = $this->destination_prompt_1;
$array['follow_me_destinations'][$x]['follow_me_order'] = '1';
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_2) > 0) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me_destinations'][$x]['follow_me_destination'] = $this->destination_data_2;
$array['follow_me_destinations'][$x]['follow_me_timeout'] = $this->destination_timeout_2;
$array['follow_me_destinations'][$x]['follow_me_delay'] = $this->destination_delay_2;
$array['follow_me_destinations'][$x]['follow_me_prompt'] = $this->destination_prompt_2;
$array['follow_me_destinations'][$x]['follow_me_order'] = '2';
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_3) > 0) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me_destinations'][$x]['follow_me_destination'] = $this->destination_data_3;
$array['follow_me_destinations'][$x]['follow_me_timeout'] = $this->destination_timeout_3;
$array['follow_me_destinations'][$x]['follow_me_delay'] = $this->destination_delay_3;
$array['follow_me_destinations'][$x]['follow_me_prompt'] = $this->destination_prompt_3;
$array['follow_me_destinations'][$x]['follow_me_order'] = '3';
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_4) > 0) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me_destinations'][$x]['follow_me_destination'] = $this->destination_data_4;
$array['follow_me_destinations'][$x]['follow_me_timeout'] = $this->destination_timeout_4;
$array['follow_me_destinations'][$x]['follow_me_delay'] = $this->destination_delay_4;
$array['follow_me_destinations'][$x]['follow_me_prompt'] = $this->destination_prompt_4;
$array['follow_me_destinations'][$x]['follow_me_order'] = '4';
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_5) > 0) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me_destinations'][$x]['follow_me_destination'] = $this->destination_data_5;
$array['follow_me_destinations'][$x]['follow_me_timeout'] = $this->destination_timeout_5;
$array['follow_me_destinations'][$x]['follow_me_delay'] = $this->destination_delay_5;
$array['follow_me_destinations'][$x]['follow_me_prompt'] = $this->destination_prompt_5;
$array['follow_me_destinations'][$x]['follow_me_order'] = '5';
$this->destination_order++;
$x++;
}
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('follow_me_destination_add', 'temp');
//execute insert
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('follow_me_destination_add', 'temp');
}
}
public function set() {
//get the extension_uuid
$parameters['follow_me_uuid'] = $this->follow_me_uuid;
$sql = "select extension_uuid from v_extensions ";
$sql .= "where follow_me_uuid = :follow_me_uuid ";
$database = new database;
$result = $database->select($sql, $parameters);
$extension_uuid = $result[0]['extension_uuid'];
//grant temporary permissions
$p = new permissions;
$p->add("follow_me_edit", 'temp');
$p->add("extension_edit", 'temp');
//add follow me to the array
$array['follow_me'][0]["follow_me_uuid"] = $this->follow_me_uuid;
$array['follow_me'][0]["domain_uuid"] = $this->domain_uuid;
//add extensions to the array
$array['extensions'][0]["extension_uuid"] = $extension_uuid;
$array['extensions'][0]["dial_domain"] = $this->domain_name;
$array['extensions'][0]["follow_me_destinations"] = '';
$array['extensions'][0]["follow_me_enabled"] = $this->follow_me_enabled;
//save the destination
$database = new database;
$database->app_name = 'follow_me';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
//remove the temporary permission
$p->delete("follow_me_edit", 'temp');
$p->delete("extension_edit", 'temp');
} //function
/**
* declare private variables
*/
private $app_name;
private $app_uuid;
private $permission;
private $list_page;
private $table;
private $uuid_prefix;
private $toggle_field;
private $toggle_values;
/**
* toggle records
*/
public function toggle($records) {
//assign private variables
$this->app_name = 'calls';
$this->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$this->permission = 'follow_me';
$this->list_page = 'calls.php';
$this->table = 'extensions';
$this->uuid_prefix = 'extension_';
$this->toggle_field = 'follow_me_enabled';
$this->toggle_values = ['true','false'];
if (permission_exists($this->permission)) {
//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->list_page);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, extension, number_alias, ";
$sql .= "call_timeout, do_not_disturb, ";
$sql .= "forward_all_enabled, forward_all_destination, ";
$sql .= "forward_busy_enabled, forward_busy_destination, ";
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
$sql .= $this->toggle_field." as toggle, follow_me_uuid ";
$sql .= "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'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$extensions[$row['uuid']]['extension'] = $row['extension'];
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
$extensions[$row['uuid']]['state'] = $row['toggle'];
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach ($extensions as $uuid => $extension) {
//count destinations
$destinations_exist = false;
if (
$extension['state'] == $this->toggle_values[1] //false becoming true
&& is_uuid($extension['follow_me_uuid'])
) {
$sql .= "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
$parameters['follow_me_uuid'] = $extension['follow_me_uuid'];
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$destinations_exist = $num_rows ? true : false;
unset($sql, $parameters, $num_rows);
}
//determine new state
$new_state = $extension['state'] == $this->toggle_values[1] && $destinations_exist ? $this->toggle_values[0] : $this->toggle_values[1];
//toggle feature
if ($new_state != $extension['state']) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $new_state;
if (is_uuid($extension['follow_me_uuid'])) {
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
$array['follow_me'][$x]['follow_me_enabled'] = $new_state;
}
}
//disable other features
if ($new_state == $this->toggle_values[0]) { //true
$array[$this->table][$x]['forward_all_enabled'] = $this->toggle_values[1]; //false
$array[$this->table][$x]['do_not_disturb'] = $this->toggle_values[1]; //false
}
//increment counter
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
$p->add('follow_me_edit', 'temp');
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
$p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension['extension'];
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
foreach ($extensions as $uuid => $extension) {
$cache->delete("directory:".$extension['extension']."@".$_SESSION['domain_name']);
if ($extension['number_alias'] != '') {
$cache->delete("directory:".$extension['number_alias']."@".$_SESSION['domain_name']);
}
}
//set message
message::add($text['message-toggle']);
}
unset($records, $extensions, $extension);
}
}
} //function
} //class
?>
+90
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"]);
}
?>