mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 18:36:31 +00:00
Improve the dialplan manager so that it looks nicer and is faster to make changes. This change effects the dialplan manager, inbound routes, outbound routes, time conditions, and queues.
This commit is contained in:
@@ -5,24 +5,31 @@
|
||||
$text['title-dialplan_manager']['en-us'] = "Dialplan Manager";
|
||||
$text['title-dialplan_manager']['pt-pt'] = "Gestor de Dialplans";
|
||||
$text['title-dialplan_manager']['fr-fr'] = "Gestion du plan de numérotation";
|
||||
|
||||
$text['title-inbound_routes']['en-us'] = "Inbound Routes";
|
||||
$text['title-inbound_routes']['pt-pt'] = "Rotas de Entrada";
|
||||
$text['title-inbound_routes']['fr-fr'] = "Routes Entrantes";
|
||||
|
||||
$text['title-outbound_routes']['en-us'] = "Outbound Routes";
|
||||
$text['title-outbound_routes']['pt-pt'] = "Rotas de Saídas";
|
||||
$text['title-outbound_routes']['fr-fr'] = "Routes Sortantes";
|
||||
|
||||
$text['title-time_conditions']['en-us'] = "Time Conditions";
|
||||
$text['title-time_conditions']['pt-pt'] = "Condições Temporais";
|
||||
$text['title-time_conditions']['fr-fr'] = "Conditions Temporelles";
|
||||
|
||||
$text['title-dialplan_add']['en-us'] = "Dialplan Add";
|
||||
$text['title-dialplan_add']['pt-pt'] = "Adicionar Dialplan";
|
||||
$text['title-dialplan_add']['fr-fr'] = "Ajout au plan de num";
|
||||
$text['title-dialplan_edit']['en-us'] = "Dialplan Edit";
|
||||
$text['title-dialplan_edit']['pt-pt'] = "Editar Dialplan";
|
||||
|
||||
$text['title-dialplan_edit']['en-us'] = "Dialplan";
|
||||
$text['title-dialplan_edit']['pt-pt'] = "Dialplan";
|
||||
$text['title-dialplan_edit']['fr-fr'] = "Edition du plan de num";
|
||||
|
||||
$text['title-dialplan_detail']['en-us'] = "Dialplan Detail";
|
||||
$text['title-dialplan_detail']['pt-pt'] = "Detalhes dos Dialplans";
|
||||
$text['title-dialplan_detail']['fr-fr'] = "Détail du plan de num";
|
||||
|
||||
$text['title-default_dialplan']['en-us'] = "Default Dialplan";
|
||||
$text['title-default_dialplan']['pt-pt'] = "Dialplan por omissão";
|
||||
$text['title-default_dialplan']['fr-fr'] = "Plan de num par Défaut";
|
||||
@@ -30,254 +37,338 @@
|
||||
$text['header-dialplan_manager']['en-us'] = "Dialplan Manager";
|
||||
$text['header-dialplan_manager']['pt-pt'] = "Gestor de Dialplans";
|
||||
$text['header-dialplan_manager']['fr-fr'] = "Gestion du plan de numérotation";
|
||||
|
||||
$text['header-inbound_routes']['en-us'] = "Inbound Routes";
|
||||
$text['header-inbound_routes']['pt-pt'] = "Rotas de Entrada";
|
||||
$text['header-inbound_routes']['fr-fr'] = "Routes Entrantes";
|
||||
|
||||
$text['header-outbound_routes']['en-us'] = "Outbound Routes";
|
||||
$text['header-outbound_routes']['pt-pt'] = "Rotas de Saída";
|
||||
$text['header-outbound_routes']['fr-fr'] = "Routes Sortantes";
|
||||
|
||||
$text['header-time_conditions']['en-us'] = "Time Conditions";
|
||||
$text['header-time_conditions']['pt-pt'] = "Condições Temporais";
|
||||
$text['header-time_conditions']['fr-fr'] = "Conditions Temporelles";
|
||||
|
||||
$text['header-dialplan-add']['en-us'] = "Dialplan Add";
|
||||
$text['header-dialplan-add']['pt-pt'] = "Adicionar Dialplan";
|
||||
$text['header-dialplan-add']['fr-fr'] = "Ajout au plan de num";
|
||||
$text['header-dialplan-edit']['en-us'] = "Dialplan Edit";
|
||||
$text['header-dialplan-edit']['pt-pt'] = "Editar Dialplan";
|
||||
|
||||
$text['header-dialplan-edit']['en-us'] = "Dialplan";
|
||||
$text['header-dialplan-edit']['pt-pt'] = "Dialplan";
|
||||
$text['header-dialplan-edit']['fr-fr'] = "Edition du plan de num";
|
||||
|
||||
$text['header-conditions_and_actions']['en-us'] = "Conditions and Actions";
|
||||
$text['header-conditions_and_actions']['pt-pt'] = "Condições e Acções";
|
||||
$text['header-conditions_and_actions']['fr-fr'] = "Conditions et Actions";
|
||||
|
||||
$text['header-dialplan_detail']['en-us'] = "Dialplan Detail";
|
||||
$text['header-dialplan_detail']['pt-pt'] = "Detalhes dos Dialplans";
|
||||
$text['header-dialplan_detail']['fr-fr'] = "Détail du plan de num";
|
||||
|
||||
$text['header-default_dialplan']['en-us'] = "Default Dialplan";
|
||||
$text['header-default_dialplan']['pt-pt'] = "Dialplan por omissão";
|
||||
$text['header-default_dialplan']['fr-fr'] = "Plan de num par Défaut";
|
||||
|
||||
$text['header-queues']['en-us'] = "Queues";
|
||||
$text['header-queues']['pt-pt'] = "Filas";
|
||||
|
||||
$text['description-dialplan_manager']['en-us'] = "The dialplan provides a view of some of the feature codes, as well as the IVR Menu, Conferences, Queues and other destinations.";
|
||||
$text['description-dialplan_manager']['pt-pt'] = "O Dialplan fornece uma perspectiva de alguns dos feature codes, bem como dos menus de IVR, Conferências, Filas e outros destinos.";
|
||||
$text['description-dialplan_manager']['fr-fr'] = "Le plan de numérotation donne une vue des services, menus SVI, Conférences, Files d'attente et tout autre destination.";
|
||||
|
||||
$text['description-dialplan_manager-superadmin']['en-us'] = "The dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.";
|
||||
$text['description-dialplan_manager-superadmin']['pt-pt'] = "O Dialplan é usado para configurar destinos de chamadas baseados em condições específicas. Pode ser utilizado para encaminhar chamadas para gateways, atendimento automático, números externos, scrips ou qualquer destino.";
|
||||
$text['description-dialplan_manager-superadmin']['fr-fr'] = "Le plan de numérotation sert à sélectionner des destinations en fonction de différentes conditions et contextes. Le plan de numérotation est utilisé pour acheminer les appels aux passerelles, opératrices auto, numéros externes, scripts ou tout autre destination.";
|
||||
|
||||
$text['description-inbound_routes']['en-us'] = "Route incoming calls to destinations based on one or more conditions. It can send incoming calls to an IVR Menu, Call Group, Extension, External Number, Script. Order is important when an anti-action is used or when there are multiple conditions that match.";
|
||||
$text['description-inbound_routes']['pt-pt'] = "Encaminhamento de chamadas de entrada para os respectivos destinos baseados em uma ou mais condições. As chamadas internas podem ser enviadas para menus de IVR, grupos, extensões, números externos, scripts. A ordem é importante quando é utilizada uma anti-acção ou quando existem múltiplas condições que funcionam.";
|
||||
$text['description-inbound_routes']['fr-fr'] = "Acheminer les appels entrants en fonction d'une ou plusieures conditions. Ces appels peuvent être acheminés à un menu SVI, un groupe d'appel, une extension, un numéro externe, un script. L'ordre est important quand une anti-action est utilisée ou que plusieures conditions sont remplies.";
|
||||
|
||||
$text['description-outbound_routes']['en-us'] = "Route outbound calls to gateways, tdm, enum and more. When a call matches the conditions the call to outbound routes.";
|
||||
$text['description-outbound_routes']['pt-pt'] = "Encaminhamento de chamadas externas para gateways, tdm, enum e mais.";
|
||||
$text['description-outbound_routes']['fr-fr'] = "Acheminer les appels sortant sur une passerelle, RTC, enum ou autre. Lorsqu'un appel rempli les conditions, l'appel utilise la route sortante.";
|
||||
|
||||
$text['description-time_conditions']['en-us'] = "Time conditions route calls based on time conditions. You can use time conditions to send calls to an IVR Menu, External numbers, Scripts, or other destinations.";
|
||||
$text['description-time_conditions']['pt-pt'] = "As Condições Temporais encaminham as chamadas com base no tempo. Podem ser usadas para enviar chamadas para menus de IVR, números externos, scripts ou outros destinos.";
|
||||
$text['description-time_conditions']['fr-fr'] = "Achemine les appels en fonction des Conditions Temporelles tels que la date, la jour de la semaine, l'heure, minutes... Ces appels peuvent être acheminés à un menu SVI, un numéro externe, un script ou tout autre numéro.";
|
||||
|
||||
$text['description-dialplan-edit']['en-us'] = "Dialplan include general settings.";
|
||||
$text['description-dialplan-edit']['pt-pt'] = "O Dialplan inclui definições globais.";
|
||||
$text['description-dialplan-edit']['fr-fr'] = "Le Plan de numérotation incluant les configurations générales.";
|
||||
|
||||
$text['description-conditions_and_actions']['en-us'] = "The following conditions, actions and anti-actions are used in the dialplan to direct call flow. Each is processed in order that it is given. Use as many conditions, actions or anti-actions as needed.";
|
||||
$text['description-conditions_and_actions']['pt-pt'] = "As seguintes condições, acções e anti-acções são usadas no dialplan para direccionar o fluxo da chamada. Cada uma é processada pela ordem em que aparece. Utilize tantas condições, acções e anti-acções quantas precise.";
|
||||
$text['description-conditions_and_actions']['fr-fr'] = "Les conditions suivantes, actions et anti-actions sont utilisées dans le dialplan pour acheminer les appels. Elles sont traitées dans l'ordre donné. Utiliser autant de conditions, actions ou anti-actions que nécessaire.";
|
||||
|
||||
$text['description-default_dialplan']['en-us'] = "The default dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.";
|
||||
$text['description-default_dialplan']['pt-pt'] = "O dialplan por omissão é utilizado para configurar destinos da chamada baseados em condições e contexto. Pode utilizar o dialplan para enviar chamadas para gateways, atendimento automático, números externos, scripts ou para qualquer outro destino.";
|
||||
$text['description-default_dialplan']['fr-fr'] = "Le plan de numérotation par défaut est utilisé pour configurer les destinations en fonction de conditions et du contexte. Le plan de numérotation ser à acheminer les appels aux passerelles, opératrices auto, numéros externes, script, ou tout autre destination.";
|
||||
|
||||
$text['description-queues']['en-us'] = "Queues are used to setup waiting lines for callers. Also known as FIFO Queues.";
|
||||
$text['description-queues']['pt-pt'] = "As filas são utilizadas para configurar linhas de espera para chamadas externas. Também são conhecidas como filas FIFO.";
|
||||
$text['description-queues']['fr-fr'] = "";
|
||||
|
||||
$text['label-name']['en-us'] = "Name";
|
||||
$text['label-name']['pt-pt'] = "Nome";
|
||||
$text['label-name']['fr-fr'] = "Nom";
|
||||
|
||||
$text['label-condition_1']['en-us'] = "Condition 1";
|
||||
$text['label-condition_1']['pt-pt'] = "condição 1";
|
||||
$text['label-condition_1']['fr-fr'] = "Condition 1";
|
||||
|
||||
$text['label-condition_2']['en-us'] = "Condition 2";
|
||||
$text['label-condition_2']['pt-pt'] = "Condição 2";
|
||||
$text['label-condition_2']['fr-fr'] = "Condition 2";
|
||||
|
||||
$text['label-field']['en-us'] = "Field";
|
||||
$text['label-field']['pt-pt'] = "Campo";
|
||||
$text['label-field']['fr-fr'] = "Champs";
|
||||
|
||||
$text['label-expression']['en-us'] = "Expression";
|
||||
$text['label-expression']['pt-pt'] = "Expressão";
|
||||
$text['label-expression']['fr-fr'] = "Expression";
|
||||
|
||||
$text['label-action_1']['en-us'] = "Action 1";
|
||||
$text['label-action_1']['pt-pt'] = "Acção 1";
|
||||
$text['label-action_1']['fr-fr'] = "Action 1";
|
||||
|
||||
$text['label-action_2']['pt-pt'] = "Acção 2";
|
||||
$text['label-action_2']['en-us'] = "Action 2";
|
||||
$text['label-action_2']['fr-fr'] = "Action 2";
|
||||
|
||||
$text['label-number']['en-us'] = "Number";
|
||||
$text['label-number']['pt-pt'] = "Número";
|
||||
$text['label-number']['fr-fr'] = "Numéro";
|
||||
|
||||
$text['label-context']['en-us'] = "Context";
|
||||
$text['label-context']['pt-pt'] = "Contexto";
|
||||
$text['label-context']['fr-fr'] = "Contexte";
|
||||
|
||||
$text['label-continue']['en-us'] = "Continue";
|
||||
$text['label-continue']['pt-pt'] = "Continuar";
|
||||
$text['label-continue']['fr-fr'] = "Continue";
|
||||
|
||||
$text['label-dialplan_detail']['en-us'] = "Dialplan Details";
|
||||
$text['label-dialplan_detail']['pt-pt'] = "Detalhes dos Dialplans";
|
||||
$text['label-dialplan_detail']['fr-fr'] = "Détail du plan de num";
|
||||
|
||||
$text['label-order']['en-us'] = "Order";
|
||||
$text['label-order']['pt-pt'] = "Ordem";
|
||||
$text['label-order']['fr-fr'] = "Ordre";
|
||||
|
||||
$text['label-enabled']['en-us'] = "Enabled";
|
||||
$text['label-enabled']['pt-pt'] = "Activado";
|
||||
$text['label-enabled']['fr-fr'] = "Activé";
|
||||
|
||||
$text['label-description']['en-us'] = "Description";
|
||||
$text['label-description']['pt-pt'] = "Descrição";
|
||||
$text['label-description']['fr-fr'] = "Description";
|
||||
|
||||
$text['label-tag']['en-us'] = "Tag";
|
||||
$text['label-tag']['pt-pt'] = "Tag";
|
||||
$text['label-tag']['fr-fr'] = "Tag";
|
||||
|
||||
$text['label-type']['en-us'] = "Type";
|
||||
$text['label-type']['pt-pt'] = "Tipo";
|
||||
$text['label-type']['fr-fr'] = "Type";
|
||||
|
||||
$text['label-data']['en-us'] = "Data";
|
||||
$text['label-data']['pt-pt'] = "Data";
|
||||
$text['label-data']['fr-fr'] = "Donnée";
|
||||
|
||||
$text['label-group']['en-us'] = "Group";
|
||||
$text['label-group']['pt-pt'] = "Grupo";
|
||||
$text['label-group']['fr-fr'] = "Groupe";
|
||||
|
||||
$text['label-break']['en-us'] = "Break";
|
||||
$text['label-break']['pt-pt'] = "Parar";
|
||||
$text['label-break']['fr-fr'] = "Pause";
|
||||
|
||||
$text['label-inline']['en-us'] = "Inline";
|
||||
$text['label-inline']['pt-pt'] = "Em linha";
|
||||
$text['label-inline']['fr-fr'] = "Inline";
|
||||
|
||||
$text['label-application']['en-us'] = "Application";
|
||||
$text['label-application']['pt-pt'] = "Aplicação";
|
||||
$text['label-application']['fr-fr'] = "Application";
|
||||
|
||||
$text['label-value']['en-us'] = "Value";
|
||||
$text['label-value']['pt-pt'] = "Valor";
|
||||
$text['label-value']['fr-fr'] = "Valeur";
|
||||
|
||||
$text['optgroup-conditions_or_regular_expressions']['en-us'] = "Conditions or Regular Expressions";
|
||||
$text['optgroup-conditions_or_regular_expressions']['pt-pt'] = "Condições ou Expressões Regulares";
|
||||
$text['optgroup-conditions_or_regular_expressions']['fr-fr'] = "Conditions ou Expressions Régulières";
|
||||
$text['optgroup-condition_or_regex']['en-us'] = "Condition or Regex";
|
||||
$text['optgroup-condition_or_regex']['pt-pt'] = "Condições ou Expressões Regulares";
|
||||
$text['optgroup-condition_or_regex']['fr-fr'] = "Conditions ou Expressions Régulières";
|
||||
|
||||
$text['optgroup-applications']['en-us'] = "Applications";
|
||||
$text['optgroup-applications']['pt-pt'] = "Aplicações";
|
||||
$text['optgroup-applications']['fr-fr'] = "Applications";
|
||||
|
||||
$text['option-context']['en-us'] = "Context";
|
||||
$text['option-context']['pt-pt'] = "Contexto";
|
||||
$text['option-context']['fr-fr'] = "Context";
|
||||
|
||||
$text['option-username']['en-us'] = "Username";
|
||||
$text['option-username']['pt-pt'] = "Nome de Utilizador";
|
||||
$text['option-username']['fr-fr'] = "Username";
|
||||
|
||||
$text['option-rdnis']['en-us'] = "RDNIS";
|
||||
$text['option-rdnis']['pt-pt'] = "RDNIS";
|
||||
$text['option-rdnis']['fr-fr'] = "RDNIS";
|
||||
|
||||
$text['option-destination_number']['en-us'] = "Destination Number";
|
||||
$text['option-destination_number']['pt-pt'] = "Número de Destino";
|
||||
$text['option-destination_number']['fr-fr'] = "Numéro de Destination";
|
||||
|
||||
$text['option-dialplan']['en-us'] = "Dialplan";
|
||||
$text['option-dialplan']['pt-pt'] = "Dialplan";
|
||||
$text['option-dialplan']['fr-fr'] = "Plan de Num";
|
||||
|
||||
$text['option-public']['en-us'] = "Public";
|
||||
$text['option-public']['pt-pt'] = "Público";
|
||||
$text['option-public']['fr-fr'] = "Public";
|
||||
|
||||
$text['option-caller_id_name']['en-us'] = "Caller ID Name";
|
||||
$text['option-caller_id_name']['pt-pt'] = "Nome do Originador";
|
||||
$text['option-caller_id_name']['fr-fr'] = "Caller ID Name";
|
||||
|
||||
$text['option-caller_id_number']['en-us'] = "Caller ID Number";
|
||||
$text['option-caller_id_number']['pt-pt'] = "Número do Originador";
|
||||
$text['option-caller_id_number']['fr-fr'] = "Caller ID Number";
|
||||
|
||||
$text['option-ani']['en-us'] = "ANI";
|
||||
$text['option-ani']['pt-pt'] = "ANI";
|
||||
$text['option-ani']['fr-fr'] = "ANI";
|
||||
|
||||
$text['option-ani2']['en-us'] = "ANI2";
|
||||
$text['option-ani2']['pt-pt'] = "ANI2";
|
||||
$text['option-ani2']['fr-fr'] = "ANI2";
|
||||
|
||||
$text['option-uuid']['en-us'] = "UUID";
|
||||
$text['option-uuid']['pt-pt'] = "UUID";
|
||||
$text['option-uuid']['fr-fr'] = "UUID";
|
||||
|
||||
$text['option-source']['en-us'] = "Source";
|
||||
$text['option-source']['pt-pt'] = "Fonte";
|
||||
$text['option-source']['fr-fr'] = "Source";
|
||||
|
||||
$text['option-chan_name']['en-us'] = "Channel Name";
|
||||
$text['option-chan_name']['pt-pt'] = "Nome do Canal";
|
||||
$text['option-chan_name']['fr-fr'] = "Nom du Canal";
|
||||
|
||||
$text['option-network_addr']['en-us'] = "Network Address";
|
||||
$text['option-network_addr']['pt-pt'] = "Endereço de Rede";
|
||||
$text['option-network_addr']['fr-fr'] = "Adresse Réseau";
|
||||
|
||||
$text['option-hour']['en-us'] = "Hour";
|
||||
$text['option-hour']['pt-pt'] = "Hora";
|
||||
$text['option-hour']['fr-fr'] = "Heure";
|
||||
|
||||
$text['option-minute']['en-us'] = "Minute";
|
||||
$text['option-minute']['pt-pt'] = "Minuto";
|
||||
$text['option-minute']['fr-fr'] = "Minute";
|
||||
|
||||
$text['option-minute_of_day']['en-us'] = "Minute of Day";
|
||||
$text['option-minute_of_day']['pt-pt'] = "Minuto do Dia";
|
||||
$text['option-minute_of_day']['fr-fr'] = "Minute de la journée";
|
||||
|
||||
$text['option-day_of_month']['en-us'] = "Day of Month";
|
||||
$text['option-day_of_month']['pt-pt'] = "Dia do Mês";
|
||||
$text['option-day_of_month']['fr-fr'] = "Jour du Mois";
|
||||
|
||||
$text['option-week_of_month']['en-us'] = "Week of Month";
|
||||
$text['option-week_of_month']['pt-pt'] = "Semana do Mês";
|
||||
$text['option-week_of_month']['fr-fr'] = "Semaine du Mois";
|
||||
|
||||
$text['option-month']['en-us'] = "Month";
|
||||
$text['option-month']['pt-pt'] = "Mês";
|
||||
$text['option-month']['fr-fr'] = "Mois";
|
||||
|
||||
$text['option-day_of_year']['en-us'] = "Day of Year";
|
||||
$text['option-day_of_year']['pt-pt'] = "Dia do Ano";
|
||||
$text['option-day_of_year']['fr-fr'] = "Jour de l'année";
|
||||
|
||||
$text['option-year']['en-us'] = "Year";
|
||||
$text['option-year']['pt-pt'] = "Ano";
|
||||
$text['option-year']['fr-fr'] = "Année";
|
||||
|
||||
$text['option-day_of_week']['en-us'] = "Day of Week";
|
||||
$text['option-day_of_week']['pt-pt'] = "Dia da Semana";
|
||||
$text['option-day_of_week']['fr-fr'] = "Jour de la Semaine";
|
||||
|
||||
$text['option-week']['en-us'] = "Week";
|
||||
$text['option-week']['pt-pt'] = "Semana";
|
||||
$text['option-week']['fr-fr'] = "Semaine";
|
||||
$text['option-true']['en-us'] = "True";
|
||||
|
||||
$text['option-true']['en-us'] = "true";
|
||||
$text['option-true']['pt-pt'] = "Sim";
|
||||
$text['option-true']['fr-fr'] = "Oui";
|
||||
$text['option-false']['en-us'] = "False";
|
||||
|
||||
$text['option-false']['en-us'] = "false";
|
||||
$text['option-false']['pt-pt'] = "Não";
|
||||
$text['option-false']['fr-fr'] = "Non";
|
||||
$text['option-condition']['en-us'] = "Condition";
|
||||
|
||||
$text['option-condition']['en-us'] = "condition";
|
||||
$text['option-condition']['pt-pt'] = "Condição";
|
||||
$text['option-condition']['fr-fr'] = "Condition";
|
||||
$text['option-action']['en-us'] = "Action";
|
||||
|
||||
$text['option-action']['en-us'] = "action";
|
||||
$text['option-action']['pt-pt'] = "Acção";
|
||||
$text['option-action']['fr-fr'] = "Action";
|
||||
$text['option-anti-action']['en-us'] = "Anti-Action";
|
||||
|
||||
$text['option-anti-action']['en-us'] = "anti-action";
|
||||
$text['option-anti-action']['pt-pt'] = "Anti-Acção";
|
||||
$text['option-anti-action']['fr-fr'] = "Anti-Action";
|
||||
$text['option-regex']['en-us'] = "Regular Expression";
|
||||
|
||||
$text['option-regex']['en-us'] = "regex";
|
||||
$text['option-regex']['pt-pt'] = "Expressão Regular";
|
||||
$text['option-regex']['fr-fr'] = "Expression Régulière";
|
||||
$text['option-on_true']['en-us'] = "On True";
|
||||
|
||||
$text['option-on_true']['en-us'] = "on true";
|
||||
$text['option-on_true']['pt-pt'] = "Quando Verdadeiro";
|
||||
$text['option-on_true']['fr-fr'] = "On True";
|
||||
$text['option-on_false']['en-us'] = "On False";
|
||||
|
||||
$text['option-on_false']['en-us'] = "on false";
|
||||
$text['option-on_false']['pt-pt'] = "Quando Falso";
|
||||
$text['option-on_false']['fr-fr'] = "On False";
|
||||
$text['option-always']['en-us'] = "Always";
|
||||
|
||||
$text['option-always']['en-us'] = "always";
|
||||
$text['option-always']['pt-pt'] = "Sempre";
|
||||
$text['option-always']['fr-fr'] = "Toujours";
|
||||
$text['option-never']['en-us'] = "Never";
|
||||
|
||||
$text['option-never']['en-us'] = "never";
|
||||
$text['option-never']['pt-pt'] = "Nunca";
|
||||
$text['option-never']['fr-fr'] = "Jamais";
|
||||
|
||||
$text['button-add']['en-us'] = "Add";
|
||||
$text['button-add']['pt-pt'] = "Adicionar";
|
||||
$text['button-add']['fr-fr'] = "Ajouter";
|
||||
|
||||
$text['button-edit']['en-us'] = "Edit";
|
||||
$text['button-edit']['pt-pt'] = "Editar";
|
||||
$text['button-edit']['fr-fr'] = "Editer";
|
||||
|
||||
$text['button-delete']['en-us'] = "Delete";
|
||||
$text['button-delete']['pt-pt'] = "Remover";
|
||||
$text['button-delete']['fr-fr'] = "Supprimer";
|
||||
|
||||
$text['button-advanced']['en-us'] = "Advanced";
|
||||
$text['button-advanced']['pt-pt'] = "Avançadas";
|
||||
$text['button-advanced']['fr-fr'] = "Avancé";
|
||||
|
||||
$text['button-back']['en-us'] = "Back";
|
||||
$text['button-back']['pt-pt'] = "Voltar";
|
||||
$text['button-back']['fr-fr'] = "Retour";
|
||||
|
||||
$text['button-copy']['en-us'] = "Copy";
|
||||
$text['button-copy']['pt-pt'] = "Copiar";
|
||||
$text['button-copy']['fr-fr'] = "Copier";
|
||||
|
||||
$text['button-save']['en-us'] = "Save";
|
||||
$text['button-save']['pt-pt'] = "Guardar";
|
||||
$text['button-save']['fr-fr'] = "Sauvegarder";
|
||||
|
||||
$text['button-restore']['en-us'] = "Restore Default";
|
||||
$text['button-restore']['pt-pt'] = "Restaurar Defaults";
|
||||
$text['button-restore']['fr-fr'] = "Restaurer conf par défaut";
|
||||
@@ -285,6 +376,7 @@
|
||||
$text['confirm-delete']['en-us'] = "Do you really want to delete this?";
|
||||
$text['confirm-delete']['pt-pt'] = "Deseja realmente remover isto?";
|
||||
$text['confirm-delete']['fr-fr'] = "Voulez-vous vraiment supprimer cela?";
|
||||
|
||||
$text['confirm-copy']['en-us'] = "Do you really want to copy this?";
|
||||
$text['confirm-copy']['pt-pt'] = "Deseja realmente copiar isto?";
|
||||
$text['confirm-copy']['fr-fr'] = "Voulez-vous vraiment copier cela?";
|
||||
@@ -292,15 +384,19 @@
|
||||
$text['message-add']['en-us'] = "Add Completed";
|
||||
$text['message-add']['pt-pt'] = "Adição Efectuada";
|
||||
$text['message-add']['fr-fr'] = "Ajouté";
|
||||
|
||||
$text['message-update']['en-us'] = "Update Completed";
|
||||
$text['message-update']['pt-pt'] = "Actualização Efectuada";
|
||||
$text['message-update']['fr-fr'] = "Mis à jour";
|
||||
|
||||
$text['message-delete']['en-us'] = "Delete Completed";
|
||||
$text['message-delete']['pt-pt'] = "Remoção Efectuada";
|
||||
$text['message-delete']['fr-fr'] = "Supprimé";
|
||||
|
||||
$text['message-copy']['en-us'] = "Copy Completed";
|
||||
$text['message-copy']['pt-pt'] = "Cópia Efectuada";
|
||||
$text['message-copy']['fr-fr'] = "Copié";
|
||||
|
||||
$text['message-required']['en-us'] = "Please provide: ";
|
||||
$text['message-required']['pt-pt'] = "Por favor indique: ";
|
||||
$text['message-required']['fr-fr'] = "Merci d'indiquer: ";
|
||||
|
||||
@@ -44,19 +44,18 @@ else {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = $_GET["id"];
|
||||
if (count($_GET) > 0) {
|
||||
$dialplan_detail_uuid = check_str($_GET["id"]);
|
||||
$app_uuid = check_str($_REQUEST["app_uuid"]);
|
||||
$dialplan_uuid = check_str($_REQUEST["id2"]);
|
||||
$dialplan_uuid = check_str($_REQUEST["dialplan_uuid"]);
|
||||
}
|
||||
|
||||
if (strlen($id)>0) {
|
||||
if (strlen($dialplan_detail_uuid) > 0) {
|
||||
|
||||
//delete child data
|
||||
$sql = "delete from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and dialplan_detail_uuid = '$id' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$sql .= "and dialplan_detail_uuid = '$dialplan_detail_uuid' ";
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
@@ -73,7 +72,7 @@ if (strlen($id)>0) {
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid."\">\n";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;url=dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid."\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
|
||||
@@ -56,18 +56,13 @@ else {
|
||||
}
|
||||
else {
|
||||
$action = "add";
|
||||
$dialplan_uuid = check_str($_REQUEST["id2"]);
|
||||
}
|
||||
if (isset($_REQUEST["id2"])) {
|
||||
$dialplan_uuid = check_str($_REQUEST["id2"]);
|
||||
}
|
||||
$dialplan_uuid = check_str($_REQUEST["dialplan_uuid"]);
|
||||
|
||||
//get the http values and set them as php variables
|
||||
$app_uuid = check_str($_REQUEST["app_uuid"]);
|
||||
if (count($_POST)>0) {
|
||||
if (isset($_REQUEST["dialplan_uuid"])) {
|
||||
$dialplan_uuid = check_str($_POST["dialplan_uuid"]);
|
||||
}
|
||||
$dialplan_uuid = check_str($_POST["dialplan_uuid"]);
|
||||
$dialplan_detail_tag = check_str($_POST["dialplan_detail_tag"]);
|
||||
$dialplan_detail_order = check_str($_POST["dialplan_detail_order"]);
|
||||
$dialplan_detail_type = check_str($_POST["dialplan_detail_type"]);
|
||||
@@ -241,37 +236,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid."';\" value='".$text['button-back']."'></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function public_include_details_tag_onchange() {
|
||||
var dialplan_detail_tag = document.getElementById("form_tag").value;
|
||||
if (dialplan_detail_tag == "condition") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-field']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-expression']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "regex") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-field']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-expression']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "action") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-application']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "anti-action") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-application']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "param") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-name']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-value']?>";
|
||||
}
|
||||
if (dialplan_detail_tag == "") {
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-type']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
echo "<tr>\n";
|
||||
echo " <td>\n";
|
||||
echo " \n";
|
||||
@@ -283,59 +247,15 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " ".$text['label-tag'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_tag' class='formfld' id='form_tag' onchange='public_include_details_tag_onchange();'>\n";
|
||||
echo " <option></option>\n";
|
||||
switch ($dialplan_detail_tag) {
|
||||
case "condition":
|
||||
echo " <option value='condition' selected='yes'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "regex":
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex' selected='yes'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "action":
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action' selected='yes'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "anti-action":
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action' selected='yes'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "param":
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
default:
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
|
||||
//condition
|
||||
//field expression
|
||||
//action
|
||||
//application
|
||||
//data
|
||||
//antiaction
|
||||
//application
|
||||
//data
|
||||
//param
|
||||
//name
|
||||
//value
|
||||
//echo " <input class='formfld' type='text' name='dialplan_detail_tag' maxlength='255' value=\"$dialplan_detail_tag\">\n";
|
||||
echo " <select name='dialplan_detail_tag' class='formfld' id='form_tag'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='condition' ".($dialplan_detail_tag == "condition" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " <option value='regex' ".($dialplan_detail_tag == "regex" ? $selected:"").">".$text['option-regex']."</option>\n";
|
||||
echo " <option value='action' ".($dialplan_detail_tag == "action" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " <option value='anti-action' ".($dialplan_detail_tag == "anti-action" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " <option value='param' ".($dialplan_detail_tag == "param" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " <option value='condition' ".($dialplan_detail_tag == "condition" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
@@ -372,7 +292,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
<script language="javascript">
|
||||
var Objs;
|
||||
|
||||
function changeToInput_dialplan_detail_type(obj){
|
||||
function change_to_input(obj){
|
||||
tb=document.createElement('INPUT');
|
||||
tb.type='text';
|
||||
tb.name=obj.name;
|
||||
@@ -386,14 +306,14 @@ function changeToInput_dialplan_detail_type(obj){
|
||||
tbb.type='button';
|
||||
tbb.value='<';
|
||||
tbb.objs=[obj,tb,tbb];
|
||||
tbb.onclick=function(){ Replaceivr_menu_option_param(this.objs); }
|
||||
tbb.onclick=function(){ replace_param(this.objs); }
|
||||
obj.parentNode.insertBefore(tb,obj);
|
||||
obj.parentNode.insertBefore(tbb,obj);
|
||||
obj.parentNode.removeChild(obj);
|
||||
Replaceivr_menu_option_param(this.objs);
|
||||
replace_param(this.objs);
|
||||
}
|
||||
|
||||
function Replaceivr_menu_option_param(obj){
|
||||
function replace_param(obj){
|
||||
obj[2].parentNode.insertBefore(obj[0],obj[2]);
|
||||
obj[0].parentNode.removeChild(obj[1]);
|
||||
obj[0].parentNode.removeChild(obj[2]);
|
||||
@@ -406,7 +326,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
echo " ".$text['label-type'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<select name='dialplan_detail_type' id='dialplan_detail_type' class='formfld' onchange='changeToInput_dialplan_detail_type(this);'>\n";
|
||||
echo "<select name='dialplan_detail_type' id='dialplan_detail_type' class='formfld' onchange='change_to_input(this);'>\n";
|
||||
if (strlen($dialplan_detail_type) > 0) {
|
||||
echo "<optgroup label='selected'>\n";
|
||||
echo " <option value='".htmlspecialchars($dialplan_detail_type)."'>".htmlspecialchars($dialplan_detail_type)."</option>\n";
|
||||
@@ -459,7 +379,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
echo "<input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_dialplan_detail_type(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo "<input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' name='' alt='".$text['button-back']."' onclick='change_to_input(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
@@ -63,18 +63,19 @@ else {
|
||||
$app_uuid = check_str($_REQUEST["app_uuid"]);
|
||||
|
||||
//get the http post values and set them as php variables
|
||||
if (count($_POST)>0) {
|
||||
if (count($_POST) > 0) {
|
||||
$dialplan_name = check_str($_POST["dialplan_name"]);
|
||||
$dialplan_number = check_str($_POST["dialplan_number"]);
|
||||
$dialplan_order = check_str($_POST["dialplan_order"]);
|
||||
$dialplan_continue = check_str($_POST["dialplan_continue"]);
|
||||
$dialplan_details = $_POST["dialplan_details"];
|
||||
if (strlen($dialplan_continue) == 0) { $dialplan_continue = "false"; }
|
||||
$dialplan_context = check_str($_POST["dialplan_context"]);
|
||||
$dialplan_enabled = check_str($_POST["dialplan_enabled"]);
|
||||
$dialplan_description = check_str($_POST["dialplan_description"]);
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
@@ -107,8 +108,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if ($action == "add" && permission_exists('dialplan_add')) {
|
||||
//add the data into the database
|
||||
//add the data into the database
|
||||
if ($action == "add" && permission_exists('dialplan_add')) {
|
||||
$dialplan_context = $_SESSION['context'];
|
||||
$dialplan_uuid = uuid();
|
||||
$sql = "insert into v_dialplans ";
|
||||
@@ -139,38 +140,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
switch ($app_uuid) {
|
||||
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4":
|
||||
//inbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
|
||||
//outbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "4b821450-926b-175a-af93-a03c441818b1":
|
||||
//time conditions
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
default:
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo $text['message-add']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update" && permission_exists('dialplan_edit')) {
|
||||
//update the database
|
||||
//update the dialplan
|
||||
if ($action == "update" && permission_exists('dialplan_edit')) {
|
||||
$sql = "update v_dialplans set ";
|
||||
$sql .= "dialplan_name = '$dialplan_name', ";
|
||||
$sql .= "dialplan_number = '$dialplan_number', ";
|
||||
@@ -183,42 +156,130 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//delete the dialplan context from memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "memcache delete dialplan:".$dialplan_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//add or update the dialplan details
|
||||
foreach ($dialplan_details as $row) {
|
||||
//set the variables
|
||||
$dialplan_detail_uuid = check_str($row["dialplan_detail_uuid"]);
|
||||
$dialplan_detail_tag = check_str($row["dialplan_detail_tag"]);
|
||||
$dialplan_detail_order = check_str($row["dialplan_detail_order"]);
|
||||
$dialplan_detail_type = check_str($row["dialplan_detail_type"]);
|
||||
$dialplan_detail_data = check_str($row["dialplan_detail_data"]);
|
||||
$dialplan_detail_break = check_str($row["dialplan_detail_break"]);
|
||||
$dialplan_detail_inline = check_str($row["dialplan_detail_inline"]);
|
||||
$dialplan_detail_group = check_str($row["dialplan_detail_group"]);
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
//add the details
|
||||
if (strlen($dialplan_detail_uuid) == 0 && permission_exists('dialplan_detail_add')) {
|
||||
$dialplan_detail_uuid = uuid();
|
||||
$sql = "insert into v_dialplan_details ";
|
||||
$sql .= "(";
|
||||
$sql .= "dialplan_uuid, ";
|
||||
$sql .= "dialplan_detail_uuid, ";
|
||||
$sql .= "dialplan_detail_tag, ";
|
||||
$sql .= "dialplan_detail_order, ";
|
||||
$sql .= "dialplan_detail_type, ";
|
||||
$sql .= "dialplan_detail_data, ";
|
||||
$sql .= "dialplan_detail_break, ";
|
||||
$sql .= "dialplan_detail_inline, ";
|
||||
$sql .= "dialplan_detail_group, ";
|
||||
$sql .= "domain_uuid ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$dialplan_uuid', ";
|
||||
$sql .= "'$dialplan_detail_uuid', ";
|
||||
$sql .= "'$dialplan_detail_tag', ";
|
||||
$sql .= "'$dialplan_detail_order', ";
|
||||
$sql .= "'$dialplan_detail_type', ";
|
||||
$sql .= "'$dialplan_detail_data', ";
|
||||
$sql .= "'$dialplan_detail_break', ";
|
||||
$sql .= "'$dialplan_detail_inline', ";
|
||||
if (strlen($dialplan_detail_group) == 0) {
|
||||
$sql .= "null, ";
|
||||
}
|
||||
else {
|
||||
$sql .= "'$dialplan_detail_group', ";
|
||||
}
|
||||
$sql .= "'".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
require_once "resources/header.php";
|
||||
switch ($app_uuid) {
|
||||
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4":
|
||||
//inbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
|
||||
//outbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "4b821450-926b-175a-af93-a03c441818b1":
|
||||
//time conditions
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
default:
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
//update the details
|
||||
if (strlen($dialplan_detail_uuid) > 0 && permission_exists('dialplan_detail_edit')) {
|
||||
$sql = "update v_dialplan_details set ";
|
||||
$sql .= "dialplan_uuid = '".$dialplan_uuid."', ";
|
||||
$sql .= "dialplan_detail_tag = '".$dialplan_detail_tag."', ";
|
||||
$sql .= "dialplan_detail_order = '".$dialplan_detail_order."', ";
|
||||
$sql .= "dialplan_detail_type = '".$dialplan_detail_type."', ";
|
||||
$sql .= "dialplan_detail_data = '".$dialplan_detail_data."', ";
|
||||
$sql .= "dialplan_detail_break = '".$dialplan_detail_break."', ";
|
||||
$sql .= "dialplan_detail_inline = '".$dialplan_detail_inline."', ";
|
||||
if (strlen($dialplan_detail_group) == 0) {
|
||||
$sql .= "dialplan_detail_group = null ";
|
||||
}
|
||||
else {
|
||||
$sql .= "dialplan_detail_group = '".$dialplan_detail_group."' ";
|
||||
}
|
||||
$sql .= "where dialplan_detail_uuid = '".$dialplan_detail_uuid."'";
|
||||
$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
}
|
||||
|
||||
//delete the dialplan context from memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "memcache delete dialplan:".$dialplan_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//redirect the user
|
||||
/*
|
||||
require_once "resources/header.php";
|
||||
switch ($app_uuid) {
|
||||
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4":
|
||||
//inbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;url=".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
|
||||
//outbound routes
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;url=".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
case "4b821450-926b-175a-af93-a03c441818b1":
|
||||
//time conditions
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;url=".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=$app_uuid\">\n";
|
||||
break;
|
||||
default:
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;url=".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."\">\n";
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
if ($action == "add") {
|
||||
echo $text['message-add']."\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
}
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
*/
|
||||
|
||||
//set the message
|
||||
if ($action == "add") {
|
||||
$_SESSION['message'] = $text['message-add'];
|
||||
}
|
||||
if ($action == "update") {
|
||||
$_SESSION['message'] = $text['message-update'];
|
||||
}
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
@@ -244,10 +305,124 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//get the dialplan details in an array
|
||||
$sql = "select * from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$sql .= "order by dialplan_detail_group asc, dialplan_detail_order asc";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//create a new array that is sorted into groups and put the tags in order conditions, actions, anti-actions
|
||||
$x = 0;
|
||||
$details = '';
|
||||
//conditions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "condition") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//regex
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "regex") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//actions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "action") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//anti-actions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "anti-action") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
unset($result);
|
||||
//blank row
|
||||
foreach($details as $group => $row) {
|
||||
//set the array key for the empty row
|
||||
$x = "999";
|
||||
//get the highest dialplan_detail_order
|
||||
foreach ($row as $key => $field) {
|
||||
$dialplan_detail_order = 0;
|
||||
if ($dialplan_detail_order < $field['dialplan_detail_order']) {
|
||||
$dialplan_detail_order = $field['dialplan_detail_order'];
|
||||
}
|
||||
}
|
||||
//increment the highest order by 5
|
||||
$dialplan_detail_order = $dialplan_detail_order + 5;
|
||||
//set the rest of the empty array
|
||||
//$details[$group][$x]['domain_uuid'] = '';
|
||||
//$details[$group][$x]['dialplan_uuid'] = '';
|
||||
$details[$group][$x]['dialplan_detail_tag'] = '';
|
||||
$details[$group][$x]['dialplan_detail_type'] = '';
|
||||
$details[$group][$x]['dialplan_detail_data'] = '';
|
||||
$details[$group][$x]['dialplan_detail_break'] = '';
|
||||
$details[$group][$x]['dialplan_detail_inline'] = '';
|
||||
$details[$group][$x]['dialplan_detail_group'] = $group;
|
||||
$details[$group][$x]['dialplan_detail_order'] = $dialplan_detail_order;
|
||||
}
|
||||
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
$page["title"] = $text['title-dialplan_edit'];
|
||||
|
||||
//javascript to change select to input and back again
|
||||
?><script language="javascript">
|
||||
var objs;
|
||||
|
||||
function change_to_input(obj){
|
||||
tb=document.createElement('INPUT');
|
||||
tb.type='text';
|
||||
tb.name=obj.name;
|
||||
tb.className='formfld';
|
||||
//tb.setAttribute('id', 'ivr_menu_option_param');
|
||||
tb.setAttribute('style', '');
|
||||
tb.value=obj.options[obj.selectedIndex].value;
|
||||
tbb=document.createElement('INPUT');
|
||||
tbb.setAttribute('class', 'btn');
|
||||
tbb.type='button';
|
||||
tbb.value='<';
|
||||
tbb.objs=[obj,tb,tbb];
|
||||
tbb.onclick=function(){ replace_param(this.objs); }
|
||||
obj.parentNode.insertBefore(tb,obj);
|
||||
obj.parentNode.insertBefore(tbb,obj);
|
||||
obj.parentNode.removeChild(obj);
|
||||
replace_param(this.objs);
|
||||
}
|
||||
|
||||
function replace_param(obj){
|
||||
obj[2].parentNode.insertBefore(obj[0],obj[2]);
|
||||
obj[0].parentNode.removeChild(obj[1]);
|
||||
obj[0].parentNode.removeChild(obj[2]);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
@@ -340,6 +515,278 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['header-dialplan_detail'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
//dialplan details
|
||||
if ($action == "update") {
|
||||
//start the table
|
||||
echo "<div align='left'>";
|
||||
echo "<table width='70%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"center\">\n";
|
||||
|
||||
//define the alternating row styles
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//display the results
|
||||
echo "<div align='left'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-break']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-inline']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-group']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'> </td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
$x = 0;
|
||||
foreach($details as $group) {
|
||||
if ($x > 0) {
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<div align='left'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-break']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-inline']."</th>\n";
|
||||
echo "<th align='center' width='90px'>".$text['label-group']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'> </td>\n";
|
||||
echo "<tr>\n";
|
||||
}
|
||||
|
||||
foreach($group as $row) {
|
||||
|
||||
//get the values from the database and set as variables
|
||||
$dialplan_detail_uuid = $row['dialplan_detail_uuid'];
|
||||
$dialplan_detail_tag = $row['dialplan_detail_tag'];
|
||||
$dialplan_detail_type = $row['dialplan_detail_type'];
|
||||
$dialplan_detail_data = $row['dialplan_detail_data'];
|
||||
$dialplan_detail_break = $row['dialplan_detail_break'];
|
||||
$dialplan_detail_inline = $row['dialplan_detail_inline'];
|
||||
$dialplan_detail_group = $row['dialplan_detail_group'];
|
||||
$dialplan_detail_order = $row['dialplan_detail_order'];
|
||||
|
||||
//view
|
||||
/*
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_tag']."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_type']."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".wordwrap($row['dialplan_detail_data'],180,"<br>",1)."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_break']."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_inline']."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_group']."</td>\n";
|
||||
echo " <td valign='top' class='vtable'> ".$row['dialplan_detail_order']."</td>\n";
|
||||
echo " <td valign='top' align='right' nowrap='nowrap'>\n";
|
||||
echo " <a href='dialplan_detail_edit.php?id=".$row['dialplan_detail_uuid']."&dialplan_uuid=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_detail_delete.php?id=".$row['dialplan_detail_uuid']."&dialplan_uuid=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
*/
|
||||
|
||||
?>
|
||||
<!--javascript to change select to input and back again-->
|
||||
<script language="javascript">
|
||||
|
||||
function label_to_form(label_id, form_id, form_width) {
|
||||
if (document.getElementById(label_id) != null) {
|
||||
label = document.getElementById(label_id);
|
||||
label.parentNode.removeChild(label);
|
||||
}
|
||||
document.getElementById(form_id).style.visibility='visible';
|
||||
document.getElementById(form_id).style.left='0px';
|
||||
document.getElementById(form_id).style.width=form_width+'px';
|
||||
}
|
||||
|
||||
</script>
|
||||
<?php
|
||||
|
||||
//begin the row
|
||||
echo "<tr>\n";
|
||||
//add the primary key uuid
|
||||
echo " <input name='dialplan_details[".$x."][dialplan_detail_uuid]' type='hidden' value=\"".$dialplan_detail_uuid."\">\n";
|
||||
//tag
|
||||
$selected = "selected=\"selected\" ";
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_tag_".$x."','dialplan_detail_tag_".$x."','97');\" style='width:97px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_tag_".$x."\">".$dialplan_detail_tag."</label>\n";
|
||||
echo " <select id='dialplan_detail_tag_".$x."' name='dialplan_details[".$x."][dialplan_detail_tag]' class='formfld' style='width:0px; visibility:hidden;'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='condition' ".($dialplan_detail_tag == "condition" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " <option value='regex' ".($dialplan_detail_tag == "regex" ? $selected:"").">".$text['option-regex']."</option>\n";
|
||||
echo " <option value='action' ".($dialplan_detail_tag == "action" ? $selected:"").">".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action' ".($dialplan_detail_tag == "anti-action" ? $selected:"").">".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='param' ".($dialplan_detail_tag == "param" ? $selected:"").">".$text['option-param']."</option>\n";
|
||||
//echo " <option value='condition' ".($dialplan_detail_tag == "condition" ? $selected:"").">".$text['option-condition']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
//type
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_type_".$x."','dialplan_detail_type_".$x."','170');\" style='width:195px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_type_".$x."\">".$dialplan_detail_type."</label>\n";
|
||||
echo " <select id='dialplan_detail_type_".$x."' name='dialplan_details[".$x."][dialplan_detail_type]' class='formfld' style='width:0px; visibility:hidden;' onchange='change_to_input(this);'>\n";
|
||||
if (strlen($dialplan_detail_type) > 0) {
|
||||
echo " <optgroup label='selected'>\n";
|
||||
echo " <option value='".htmlspecialchars($dialplan_detail_type)."'>".htmlspecialchars($dialplan_detail_type)."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value=''></option>\n";
|
||||
}
|
||||
//if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "condition" || $dialplan_detail_tag == "regex") {
|
||||
echo " <optgroup label='".$text['optgroup-condition_or_regex']."'>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='dialplan'>".$text['option-dialplan']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " <option value='\${number_alias}'>\${number_alias}</option>\n";
|
||||
echo " <option value='\${sip_from_uri}'>\${sip_from_uri}</option>\n";
|
||||
echo " <option value='\${sip_from_user}'>\${sip_from_user}</option>\n";
|
||||
echo " <option value='\${sip_from_host}'>\${sip_from_host}</option>\n";
|
||||
echo " <option value='\${sip_contact_uri}'>\${sip_contact_uri}</option>\n";
|
||||
echo " <option value='\${sip_contact_user}'>\${sip_contact_user}</option>\n";
|
||||
echo " <option value='\${sip_contact_host}'>\${sip_contact_host}</option>\n";
|
||||
echo " <option value='\${sip_to_uri}'>\${sip_to_uri}</option>\n";
|
||||
echo " <option value='\${sip_to_user}'>\${sip_to_user}</option>\n";
|
||||
echo " <option value='\${sip_to_host}'>\${sip_to_host}</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
//}
|
||||
//if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "action" || $dialplan_detail_tag == "anti-action") {
|
||||
echo " <optgroup label='".$text['optgroup-applications']."'>\n";
|
||||
//get the list of applications
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$result = event_socket_request($fp, 'api show application');
|
||||
$tmp = explode("\n\n", $result);
|
||||
$tmp = explode("\n", $tmp[0]);
|
||||
foreach ($tmp as $row) {
|
||||
if (strlen($row) > 0) {
|
||||
$application = explode(",", $row);
|
||||
if ($application[0] != "name" && stristr($application[0], "[") != true) {
|
||||
echo " <option value='".$application[0]."'>".$application[0]."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo " </optgroup>\n";
|
||||
//}
|
||||
echo " </select>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' style='visibility:hidden;' name='' alt='".$text['button-back']."' onclick='change_to_input(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo "</td>\n";
|
||||
//data
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_data_".$x."','dialplan_detail_data_".$x."','200');\" style='width:200px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_data_".$x."\">".$dialplan_detail_data."</label>\n";
|
||||
echo " <input id='dialplan_detail_data_".$x."' name='dialplan_details[".$x."][dialplan_detail_data]' class='formfld' type='text' style='width:0px; visibility:hidden;' value=\"".htmlspecialchars($dialplan_detail_data)."\">\n";
|
||||
echo "</td>\n";
|
||||
//break
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_break_".$x."','dialplan_detail_break_".$x."','88');\" style='width:88px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_break_".$x."\">".$dialplan_detail_break."</label>\n";
|
||||
echo " <select id='dialplan_detail_break_".$x."' name='dialplan_details[".$x."][dialplan_detail_break]' class='formfld' style='width:0px; visibility:hidden;'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='on-true' ".($dialplan_detail_break == "on-true" ? $selected:"").">".$text['option-on_true']."</option>\n";
|
||||
echo " <option value='on-false' ".($dialplan_detail_break == "on-false" ? $selected:"").">".$text['option-on_false']."</option>\n";
|
||||
echo " <option value='always' ".($dialplan_detail_break == "always" ? $selected:"").">".$text['option-always']."</option>\n";
|
||||
echo " <option value='never' ".($dialplan_detail_break == "never" ? $selected:"").">".$text['option-never']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
//inline
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_inline_".$x."','dialplan_detail_inline_".$x."','65');\" style='width:65px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_inline_".$x."\">".$dialplan_detail_inline."</label>\n";
|
||||
echo " <select id='dialplan_detail_inline_".$x."' name='dialplan_details[".$x."][dialplan_detail_inline]' class='formfld' style='width:0px; visibility:hidden;'>\n";
|
||||
echo " <option></option>\n";
|
||||
echo " <option value='true' ".($dialplan_detail_inline == "true" ? $selected:"").">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($dialplan_detail_inline == "false" ? $selected:"").">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
//group
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_group_".$x."','dialplan_detail_group_".$x."','45');\" style='width:45px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_group_".$x."\">".$dialplan_detail_group."</label>\n";
|
||||
echo " <select id='dialplan_detail_group_".$x."' name='dialplan_details[".$x."][dialplan_detail_group]' class='formfld' style='width:45px; visibility:hidden;'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (strlen($dialplan_detail_group)> 0) {
|
||||
echo " <option $selected value='".htmlspecialchars($dialplan_detail_group)."'>".htmlspecialchars($dialplan_detail_group)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
//order
|
||||
echo "<td class='vtable' onclick=\"label_to_form('label_dialplan_detail_order_".$x."','dialplan_detail_order_".$x."','55');\" style='width:55px;' nowrap='nowrap'>\n";
|
||||
echo " <label id=\"label_dialplan_detail_order_".$x."\">".$dialplan_detail_order."</label>\n";
|
||||
echo " <select id='dialplan_detail_order_".$x."' name='dialplan_details[".$x."][dialplan_detail_order]' class='formfld' style='width:0px; visibility:hidden;'>\n";
|
||||
if (strlen($dialplan_detail_order)> 0) {
|
||||
echo " <option $selected value='".htmlspecialchars($dialplan_detail_order)."'>".htmlspecialchars($dialplan_detail_order)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
if (strlen($i) == 1) {
|
||||
echo " <option value='00$i'>00$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 2) {
|
||||
echo " <option value='0$i'>0$i</option>\n";
|
||||
}
|
||||
if (strlen($i) == 3) {
|
||||
echo " <option value='$i'>$i</option>\n";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "</td>\n";
|
||||
//tools
|
||||
echo " <td style='width:55px;' nowrap='nowrap'>\n";
|
||||
//echo " <a href='dialplan_detail_edit.php?id=".$dialplan_detail_uuid."&dialplan_uuid=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_detail_delete.php?id=".$dialplan_detail_uuid."&dialplan_uuid=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
//end the row
|
||||
echo "</tr>\n";
|
||||
//increment the value
|
||||
$x++;
|
||||
}
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
$x++;
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
} //end if update
|
||||
|
||||
//echo " <br />\n";
|
||||
//echo " ".$text['description-conditions_and_actions']."</td>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-order'].":\n";
|
||||
@@ -400,9 +847,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <textarea class='formfld' name='dialplan_description' rows='4'>".htmlspecialchars($dialplan_description)."</textarea>\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
@@ -419,171 +866,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
|
||||
//dialplan details
|
||||
if ($action == "update") {
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
echo "<tr class='border'>\n";
|
||||
echo " <td align=\"center\">\n";
|
||||
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"6\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'><span class=\"title\">".$text['header-conditions_and_actions']."</span>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-conditions_and_actions']."</td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>";
|
||||
echo "<br />\n";
|
||||
|
||||
$sql = "select * from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$sql .= "order by dialplan_detail_group asc, dialplan_detail_order asc";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//create a new array that is sorted into groups and put the tags in order conditions, actions, anti-actions
|
||||
$x = 0;
|
||||
$details = '';
|
||||
//conditions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "condition") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//regex
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "regex") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//actions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "action") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
//anti-actions
|
||||
foreach($result as $row) {
|
||||
if ($row['dialplan_detail_tag'] == "anti-action") {
|
||||
$group = $row['dialplan_detail_group'];
|
||||
foreach ($row as $key => $val) {
|
||||
$details[$group][$x][$key] = $val;
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
unset($result);
|
||||
|
||||
//define the alternating row styles
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//display the results
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
$x = 0;
|
||||
foreach($details as $group) {
|
||||
if ($x > 0) {
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='6'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
}
|
||||
|
||||
foreach($group as $row) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_tag']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_type']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".wordwrap($row['dialplan_detail_data'],180,"<br>",1)."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_order']."</td>\n";
|
||||
echo " <td valign='top' align='right' nowrap='nowrap'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_details_delete.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
$x++;
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='6'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."&app_uuid=".$app_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<br><br>";
|
||||
} //end if update
|
||||
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
Reference in New Issue
Block a user