Event Socket settings auto defaults or custom using config.conf

This commit is contained in:
FusionPBX 2023-09-16 15:07:41 -06:00 committed by GitHub
parent 0e55637bf6
commit bf47bbcc47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 221 additions and 1711 deletions

View File

@ -158,7 +158,7 @@
//create the event socket connection
if (!$fp) {
$fp = event_socket_create($setting->get('switch','event_socket_ip_address'), $setting->get('switch','event_socket_port'), $setting->get('switch','event_socket_password'));
$fp = event_socket_create();
}
//reload the acl

View File

@ -142,7 +142,7 @@ if ($domains_processed == 1) {
//save_phrases_xml();
//delete the phrase from memcache
$fp = event_socket_create($setting->get('switch','event_socket_ip_address'), $setting->get('switch','event_socket_port'), $setting->get('switch','event_socket_password'));
$fp = event_socket_create();
if ($fp) {
//get phrase languages
$sql = "select distinct phrase_language from v_phrases order by phrase_language asc ";

View File

@ -1,143 +0,0 @@
<?php
//application details
$apps[$x]['name'] = "Settings";
$apps[$x]['uuid'] = "b6b1b2e5-4ba5-044c-8a5c-18709a15eb60";
$apps[$x]['category'] = "Switch";;
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "PBX Settings.";
$apps[$x]['description']['en-gb'] = "PBX Settings.";
$apps[$x]['description']['ar-eg'] = "";
$apps[$x]['description']['de-at'] = "PBX Einstellungen.";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-de'] = "PBX Einstellungen.";
$apps[$x]['description']['es-cl'] = "Configuraciones del PBX";
$apps[$x]['description']['es-mx'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-fr'] = "Confs PBX";
$apps[$x]['description']['he-il'] = "";
$apps[$x]['description']['it-it'] = "";
$apps[$x]['description']['nl-nl'] = "Centrale intellingen.";
$apps[$x]['description']['pl-pl'] = "";
$apps[$x]['description']['pt-br'] = "";
$apps[$x]['description']['pt-pt'] = "Definições do PBX.";
$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'] = "setting_view";
$apps[$x]['permissions'][$y]['menu']['uuid'] = "148ea42a-3711-3d64-181b-07a6a3c3ed60";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "setting_edit";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//$y++;
//$apps[$x]['permissions'][$y]['name'] = "setting_add";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//$y++;
//$apps[$x]['permissions'][$y]['name'] = "setting_delete";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//schema details
$y=0;
$apps[$x]['db'][$y]['table']['name'] = "v_settings";
$apps[$x]['db'][$y]['table']['parent'] = "";
$z=0;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "setting_id";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "setting_uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "numbering_plan";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "event_socket_ip_address";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "event_socket_port";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "event_socket_password";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "event_socket_acl";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "xml_rpc_http_port";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "xml_rpc_auth_realm";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "xml_rpc_auth_user";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "xml_rpc_auth_pass";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "admin_pin";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "mod_shout_decoder";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "mod_shout_volume";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>

View File

@ -1,91 +0,0 @@
<?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-2014
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
if ($domains_processed == 1) {
//get the data from the database
$sql = "select event_socket_ip_address from v_settings ";
$database = new database;
$event_socket_ip_address = $database->select($sql, null, 'column');
//check the row count
if (empty($event_socket_ip_address)) {
//add default settings
$event_socket_ip_address = "127.0.0.1";
$event_socket_port = "8021";
$event_socket_password = "ClueCon";
$xml_rpc_http_port = "8080";
$xml_rpc_auth_realm = "freeswitch";
$xml_rpc_auth_user = "freeswitch";
$xml_rpc_auth_pass = "works";
$mod_shout_decoder = "";
$mod_shout_volume = "0.3";
//build array
$array['settings'][0]['setting_uuid'] = uuid();
$array['settings'][0]['event_socket_ip_address'] = $event_socket_ip_address;
$array['settings'][0]['event_socket_port'] = $event_socket_port;
$array['settings'][0]['event_socket_password'] = $event_socket_password;
$array['settings'][0]['xml_rpc_http_port'] = $xml_rpc_http_port;
$array['settings'][0]['xml_rpc_auth_realm'] = $xml_rpc_auth_realm;
$array['settings'][0]['xml_rpc_auth_user'] = $xml_rpc_auth_user;
$array['settings'][0]['xml_rpc_auth_pass'] = $xml_rpc_auth_pass;
$array['settings'][0]['mod_shout_decoder'] = $mod_shout_decoder;
$array['settings'][0]['mod_shout_volume'] = $mod_shout_volume;
//grant temporary permissions
$p = new permissions;
$p->add('setting_add', 'temp');
//execute insert
$database = new database;
$database->app_name = 'settings';
$database->app_uuid = 'b6b1b2e5-4ba5-044c-8a5c-18709a15eb60';
$database->save($array, false);
unset($array);
//revoke temporary permissions
$p->delete('setting_add', 'temp');
}
if (isset($_SESSION['event_socket_ip_address'])) {
$event_socket_ip_address = $_SESSION['event_socket_ip_address'];
if (isset($_SESSION['event_socket_port'])) { $event_socket_port = $_SESSION['event_socket_port']; }
if (isset($_SESSION['event_socket_password'])) { $event_socket_password = $_SESSION['event_socket_password']; }
//build array
$array['settings'][0]['event_socket_ip_address'] = $event_socket_ip_address;
$array['settings'][0]['event_socket_port'] = $event_socket_port;
$array['settings'][0]['event_socket_password'] = $event_socket_password;
//grant temporary permissions
$p = new permissions;
$p->add('setting_edit', 'temp');
//execute update
$database = new database;
$database->app_name = 'settings';
$database->app_uuid = 'b6b1b2e5-4ba5-044c-8a5c-18709a15eb60';
$database->save($array, false);
unset($array);
//revoke temporary permissions
$p->delete('setting_edit', 'temp');
}
}
?>

View File

@ -1,507 +0,0 @@
<?php
$text['title-settings_update']['en-us'] = "Setting Update";
$text['title-settings_update']['en-gb'] = "Setting Update";
$text['title-settings_update']['ar-eg'] = "تحديث الإعداد";
$text['title-settings_update']['de-at'] = "Einstellungen aktualisieren";
$text['title-settings_update']['de-ch'] = "Einstellungen aktualisieren";
$text['title-settings_update']['de-de'] = "Einstellungen aktualisieren";
$text['title-settings_update']['es-cl'] = "Actualizar Configuración";
$text['title-settings_update']['es-mx'] = "Actualizar Configuración";
$text['title-settings_update']['fr-ca'] = "Mise à jour de la configuration";
$text['title-settings_update']['fr-fr'] = "Mise à jour de la configuration";
$text['title-settings_update']['he-il'] = "קביעת עדכון";
$text['title-settings_update']['it-it'] = "Aggiornamento Parametri";
$text['title-settings_update']['nl-nl'] = "Instellingen bijwerken";
$text['title-settings_update']['pl-pl'] = "Aktualizacja ustawienia";
$text['title-settings_update']['pt-br'] = "Atualizar configurações";
$text['title-settings_update']['pt-pt'] = "Actualizar a Configuração";
$text['title-settings_update']['ro-ro'] = "Actualizare setări";
$text['title-settings_update']['ru-ru'] = "Обновление Параметров";
$text['title-settings_update']['sv-se'] = "Ändra Inställningar";
$text['title-settings_update']['uk-ua'] = "Оновлення налаштувань";
$text['title-settings_update']['zh-cn'] = "设置更新";
$text['title-settings_update']['ja-jp'] = "設定更新";
$text['title-settings_update']['ko-kr'] = "설정 업데이트";
$text['title-settings_add']['en-us'] = "Setting Add";
$text['title-settings_add']['en-gb'] = "Setting Add";
$text['title-settings_add']['ar-eg'] = "إضافة الإعداد";
$text['title-settings_add']['de-at'] = "Einstellung hinzufügen";
$text['title-settings_add']['de-ch'] = "Einstellung hinzufügen";
$text['title-settings_add']['de-de'] = "Einstellung hinzufügen";
$text['title-settings_add']['es-cl'] = "Añadir Configuración";
$text['title-settings_add']['es-mx'] = "Añadir Configuración";
$text['title-settings_add']['fr-ca'] = "Ajouter Cadre";
$text['title-settings_add']['fr-fr'] = "Ajouter Cadre";
$text['title-settings_add']['he-il'] = "המונחים Add";
$text['title-settings_add']['it-it'] = "Inserire Parametro";
$text['title-settings_add']['nl-nl'] = "Instellingen toevoegen";
$text['title-settings_add']['pl-pl'] = "Dodaj ustawienie";
$text['title-settings_add']['pt-br'] = "Adionar configuração";
$text['title-settings_add']['pt-pt'] = "Adicionar Configuração";
$text['title-settings_add']['ro-ro'] = "Setarea Adăugați";
$text['title-settings_add']['ru-ru'] = "Параметры добавлены";
$text['title-settings_add']['sv-se'] = "Lägg Till Inställning";
$text['title-settings_add']['uk-ua'] = "Додавання налаштувань";
$text['title-settings_add']['zh-cn'] = "设置添加";
$text['title-settings_add']['ja-jp'] = "設定追加";
$text['title-settings_add']['ko-kr'] = "설정 추가";
$text['label-xml_rpc_auth_user']['en-us'] = "XML RPC Auth User";
$text['label-xml_rpc_auth_user']['en-gb'] = "XML RPC Auth User";
$text['label-xml_rpc_auth_user']['ar-eg'] = "مستعمل في وقت لاحق";
$text['label-xml_rpc_auth_user']['de-at'] = "XML RPC Auth Benutzer";
$text['label-xml_rpc_auth_user']['de-ch'] = "XML RPC Auth Benutzer";
$text['label-xml_rpc_auth_user']['de-de'] = "XML RPC Auth Benutzer";
$text['label-xml_rpc_auth_user']['es-cl'] = "Usuario XML RPC";
$text['label-xml_rpc_auth_user']['es-mx'] = "Usuario XML RPC";
$text['label-xml_rpc_auth_user']['fr-ca'] = "Auth usager XML RPC";
$text['label-xml_rpc_auth_user']['fr-fr'] = "Auth usager XML RPC";
$text['label-xml_rpc_auth_user']['he-il'] = "xml rpc auth User";
$text['label-xml_rpc_auth_user']['it-it'] = "XML RPC Auth User";
$text['label-xml_rpc_auth_user']['nl-nl'] = "XML RPC autorisatie gebruiker";
$text['label-xml_rpc_auth_user']['pl-pl'] = "Użytkownik XML RPC";
$text['label-xml_rpc_auth_user']['pt-br'] = "Utilizar autenticação de XML RPC";
$text['label-xml_rpc_auth_user']['pt-pt'] = "Utilizador de autenticação de XML RPC";
$text['label-xml_rpc_auth_user']['ro-ro'] = "Utilizator XML RPC Auth";
$text['label-xml_rpc_auth_user']['ru-ru'] = "Использовать XML RPC для подлинности Пользователя";
$text['label-xml_rpc_auth_user']['sv-se'] = "XML RPC Auth User";
$text['label-xml_rpc_auth_user']['uk-ua'] = "XML RPC Auth User ";
$text['label-xml_rpc_auth_user']['zh-cn'] = "XML RPC 授权用户";
$text['label-xml_rpc_auth_user']['ja-jp'] = "XML RPC 認証ユーザー";
$text['label-xml_rpc_auth_user']['ko-kr'] = "XML RPC 인증 사용자";
$text['label-xml_rpc_auth_realm']['en-us'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['en-gb'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['ar-eg'] = "نطاق مصادقة XML RPC";
$text['label-xml_rpc_auth_realm']['de-at'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['de-ch'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['de-de'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['es-cl'] = "Reino de Autenticación XML RPC";
$text['label-xml_rpc_auth_realm']['es-mx'] = "Reino de Autenticación XML RPC";
$text['label-xml_rpc_auth_realm']['fr-ca'] = "Domaine d'authentification RPC XML";
$text['label-xml_rpc_auth_realm']['fr-fr'] = "Domaine d'authentification RPC XMLm";
$text['label-xml_rpc_auth_realm']['he-il'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['it-it'] = "Reame di autenticazione RPC XML";
$text['label-xml_rpc_auth_realm']['nl-nl'] = "XML RPC authorisatie domein";
$text['label-xml_rpc_auth_realm']['pl-pl'] = "Realm (domena) XML RPC";
$text['label-xml_rpc_auth_realm']['pt-br'] = "Reutilizar autenticação de XML RPC";
$text['label-xml_rpc_auth_realm']['pt-pt'] = "Realm de autenticação do XML RPC";
$text['label-xml_rpc_auth_realm']['ro-ro'] = "Domeniul de autentificare XML RPC";
$text['label-xml_rpc_auth_realm']['ru-ru'] = "Область проверки подлинности XML RPC";
$text['label-xml_rpc_auth_realm']['sv-se'] = "XML RPC Auth Realm";
$text['label-xml_rpc_auth_realm']['uk-ua'] = "XML RPC Auth Realm ";
$text['label-xml_rpc_auth_realm']['zh-cn'] = "XML RPC 认证领域";
$text['label-xml_rpc_auth_realm']['ja-jp'] = "XML RPC 認証レルム";
$text['label-xml_rpc_auth_realm']['ko-kr'] = "XML RPC 인증 영역";
$text['label-xml_rpc_auth_pass']['en-us'] = "XML RPC Auth Password";
$text['label-xml_rpc_auth_pass']['en-gb'] = "XML RPC Auth Password";
$text['label-xml_rpc_auth_pass']['ar-eg'] = "كلمة مرور XML RPC Auth";
$text['label-xml_rpc_auth_pass']['de-at'] = "XML RPC Auth Passwort";
$text['label-xml_rpc_auth_pass']['de-ch'] = "XML RPC Auth Passwort";
$text['label-xml_rpc_auth_pass']['de-de'] = "XML RPC Auth Passwort";
$text['label-xml_rpc_auth_pass']['es-cl'] = "Ingrese la contraseña XML RPC";
$text['label-xml_rpc_auth_pass']['es-mx'] = "Ingrese la contraseña XML RPC";
$text['label-xml_rpc_auth_pass']['fr-ca'] = "Mot de passe XML RPC";
$text['label-xml_rpc_auth_pass']['fr-fr'] = "Mot de passe XML RPC";
$text['label-xml_rpc_auth_pass']['he-il'] = "xml rpc authסיסמה";
$text['label-xml_rpc_auth_pass']['it-it'] = "XML RPC Auth Password";
$text['label-xml_rpc_auth_pass']['nl-nl'] = "XML RPC authorisatie wachtwoord";
$text['label-xml_rpc_auth_pass']['pl-pl'] = "Hasło XML RPC";
$text['label-xml_rpc_auth_pass']['pt-br'] = "Palavra chave de autenticação do XML RPC";
$text['label-xml_rpc_auth_pass']['pt-pt'] = "Palavra-passe de autenticação do XML RPC";
$text['label-xml_rpc_auth_pass']['ro-ro'] = "Domeniul de autentificare XML RPC";
$text['label-xml_rpc_auth_pass']['ru-ru'] = "XML RPC Пароль проверки подлинности";
$text['label-xml_rpc_auth_pass']['sv-se'] = "XML RPC Auth Password";
$text['label-xml_rpc_auth_pass']['uk-ua'] = "XML RPC Auth Password ";
$text['label-xml_rpc_auth_pass']['zh-cn'] = "XML RPC 验证密码";
$text['label-xml_rpc_auth_pass']['ja-jp'] = "XML RPC 認証パスワード";
$text['label-xml_rpc_auth_pass']['ko-kr'] = "XML RPC 인증 비밀번호";
$text['label-xml_rpc_http_port']['en-us'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['en-gb'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['ar-eg'] = "منفذ XML RPC HTTP";
$text['label-xml_rpc_http_port']['de-at'] = "XML RPC HTTP Port ";
$text['label-xml_rpc_http_port']['de-ch'] = "XML RPC HTTP Port ";
$text['label-xml_rpc_http_port']['de-de'] = "XML RPC HTTP Port ";
$text['label-xml_rpc_http_port']['es-cl'] = "Puerto XML RPC HTTP";
$text['label-xml_rpc_http_port']['es-mx'] = "Puerto XML RPC HTTP";
$text['label-xml_rpc_http_port']['fr-ca'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['fr-fr'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['he-il'] = "כתובת: RPC HTTP Port";
$text['label-xml_rpc_http_port']['it-it'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['nl-nl'] = "XML RPC HTTP poort";
$text['label-xml_rpc_http_port']['pl-pl'] = "Port HTTP XML RPC";
$text['label-xml_rpc_http_port']['pt-br'] = "Porta HTTP do XML RPC";
$text['label-xml_rpc_http_port']['pt-pt'] = "Porto HTTP do XML RPC";
$text['label-xml_rpc_http_port']['ro-ro'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['ru-ru'] = "XML RPC HTTP Порт";
$text['label-xml_rpc_http_port']['sv-se'] = "XML RPC HTTP Port";
$text['label-xml_rpc_http_port']['uk-ua'] = "XML RPC HTTP Port ";
$text['label-xml_rpc_http_port']['zh-cn'] = "XML RPC HTTP 端口";
$text['label-xml_rpc_http_port']['ja-jp'] = "XML RPC HTTP ポート";
$text['label-xml_rpc_http_port']['ko-kr'] = "XML RPC HTTP 포트";
$text['label-mod_shout_volume']['en-us'] = "Mod Shout Volume";
$text['label-mod_shout_volume']['en-gb'] = "Mod Shout Volume";
$text['label-mod_shout_volume']['ar-eg'] = "وزارة الدفاع حجم الصوت";
$text['label-mod_shout_volume']['de-at'] = "Mod Shout Lautstärke";
$text['label-mod_shout_volume']['de-ch'] = "Mod Shout Lautstärke";
$text['label-mod_shout_volume']['de-de'] = "Mod Shout Lautstärke";
$text['label-mod_shout_volume']['es-cl'] = "Volumen Mod Shout";
$text['label-mod_shout_volume']['es-mx'] = "Volumen Mod Shout";
$text['label-mod_shout_volume']['fr-ca'] = "Mod Shout Volume";
$text['label-mod_shout_volume']['fr-fr'] = "Mod Shout Volume";
$text['label-mod_shout_volume']['he-il'] = "תגית: Shout Volume";
$text['label-mod_shout_volume']['it-it'] = "Volume Mod Shout";
$text['label-mod_shout_volume']['nl-nl'] = "Volume Module Shout";
$text['label-mod_shout_volume']['pl-pl'] = "Głośność modułu mod_shout";
$text['label-mod_shout_volume']['pt-br'] = "Volume do Mod Shout";
$text['label-mod_shout_volume']['pt-pt'] = "Volume do Mod Shout";
$text['label-mod_shout_volume']['ro-ro'] = "Volum strigăt mod";
$text['label-mod_shout_volume']['ru-ru'] = "Громкость крика мода";
$text['label-mod_shout_volume']['sv-se'] = "Mod Shout Volym";
$text['label-mod_shout_volume']['uk-ua'] = "Mod Shout Volume ";
$text['label-mod_shout_volume']['zh-cn'] = "模组音量";
$text['label-mod_shout_volume']['ja-jp'] = "Modシャウトの音量";
$text['label-mod_shout_volume']['ko-kr'] = "모드 샤우트 볼륨";
$text['label-mod_shout_decoder']['en-us'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['en-gb'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['ar-eg'] = "وزارة الدفاع صيحة فك";
$text['label-mod_shout_decoder']['de-at'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['de-ch'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['de-de'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['es-cl'] = "Descodificador Mod Shout (MP3)";
$text['label-mod_shout_decoder']['es-mx'] = "Descodificador Mod Shout (MP3)";
$text['label-mod_shout_decoder']['fr-ca'] = "Décodeur Mod Shout (MP3)";
$text['label-mod_shout_decoder']['fr-fr'] = "Décodeur Mod Shout (MP3)";
$text['label-mod_shout_decoder']['he-il'] = "עקבו אחרי Shout Decoder";
$text['label-mod_shout_decoder']['it-it'] = "Mod Grido Decodificatore";
$text['label-mod_shout_decoder']['nl-nl'] = "Mod Shout decoder";
$text['label-mod_shout_decoder']['pl-pl'] = "Dekoder modułu mod_shout";
$text['label-mod_shout_decoder']['pt-br'] = "Decodificador do Mod Shout (MP3) ";
$text['label-mod_shout_decoder']['pt-pt'] = "Descodificador do Mod Shout (MP3)";
$text['label-mod_shout_decoder']['ro-ro'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['ru-ru'] = "Мод Декодер Крика";
$text['label-mod_shout_decoder']['sv-se'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['uk-ua'] = "Mod Shout Decoder";
$text['label-mod_shout_decoder']['zh-cn'] = "国防部喊解码器";
$text['label-mod_shout_decoder']['ja-jp'] = "モッドシャウトデコーダー";
$text['label-mod_shout_decoder']['ko-kr'] = "모드 샤우트 디코더";
$text['label-event_socket_password']['en-us'] = "Event Socket Password";
$text['label-event_socket_password']['en-gb'] = "Event Socket Password";
$text['label-event_socket_password']['ar-eg'] = "كلمة مرور مأخذ توصيل الحدث";
$text['label-event_socket_password']['de-at'] = "Event Socket Passwort";
$text['label-event_socket_password']['de-ch'] = "Event Socket Passwort";
$text['label-event_socket_password']['de-de'] = "Event Socket Passwort";
$text['label-event_socket_password']['es-cl'] = "Contraseña del Docket de Eventos";
$text['label-event_socket_password']['es-mx'] = "Contraseña del Docket de Eventos";
$text['label-event_socket_password']['fr-ca'] = "Mot de Passe Event Socket";
$text['label-event_socket_password']['fr-fr'] = "Mot de Passe Event Socket";
$text['label-event_socket_password']['he-il'] = "תגית: Socket Password";
$text['label-event_socket_password']['it-it'] = "Password Event Socket";
$text['label-event_socket_password']['nl-nl'] = "Event-Socket wachtwoord";
$text['label-event_socket_password']['pl-pl'] = "Hasło 'Event Socket'";
$text['label-event_socket_password']['pt-br'] = "Palavra-chave do Evento Socket ";
$text['label-event_socket_password']['pt-pt'] = "Palavra-chave do Event Socket";
$text['label-event_socket_password']['ro-ro'] = "Parolă socket eveniment";
$text['label-event_socket_password']['ru-ru'] = "Пароль сокета событий";
$text['label-event_socket_password']['sv-se'] = "Event Socket Password";
$text['label-event_socket_password']['uk-ua'] = "Event Socket Password ";
$text['label-event_socket_password']['zh-cn'] = "事件套接字密码";
$text['label-event_socket_password']['ja-jp'] = "イベントソケットのパスワード";
$text['label-event_socket_password']['ko-kr'] = "이벤트 소켓 비밀번호";
$text['label-event_socket_port']['en-us'] = "Event Socket Port";
$text['label-event_socket_port']['en-gb'] = "Event Socket Port";
$text['label-event_socket_port']['ar-eg'] = "منفذ مقبس الحدث";
$text['label-event_socket_port']['de-at'] = "Event Socket Port";
$text['label-event_socket_port']['de-ch'] = "Event Socket Port";
$text['label-event_socket_port']['de-de'] = "Event Socket Port";
$text['label-event_socket_port']['es-cl'] = "Puerto del Socket de Eventos";
$text['label-event_socket_port']['es-mx'] = "Puerto del Socket de Eventos";
$text['label-event_socket_port']['fr-ca'] = "Event Socket Port";
$text['label-event_socket_port']['fr-fr'] = "Event Socket Port";
$text['label-event_socket_port']['he-il'] = "נמל Socket Port";
$text['label-event_socket_port']['it-it'] = "Porta Event Socket";
$text['label-event_socket_port']['nl-nl'] = "Event-Socket poort";
$text['label-event_socket_port']['pl-pl'] = "Port 'Event Socket'";
$text['label-event_socket_port']['pt-br'] = "Porta do Evento Socket ";
$text['label-event_socket_port']['pt-pt'] = "Porto do Event Socket";
$text['label-event_socket_port']['ro-ro'] = "Port Socket pentru evenimente";
$text['label-event_socket_port']['ru-ru'] = "Порт сокета событий";
$text['label-event_socket_port']['sv-se'] = "Event Socket Port ";
$text['label-event_socket_port']['uk-ua'] = "Event Socket Port ";
$text['label-event_socket_port']['zh-cn'] = "事件套接字端口";
$text['label-event_socket_port']['ja-jp'] = "イベントソケットポート";
$text['label-event_socket_port']['ko-kr'] = "이벤트 소켓 포트";
$text['label-event_socket_ip']['en-us'] = "Event Socket IP Address";
$text['label-event_socket_ip']['en-gb'] = "Event Socket IP Address";
$text['label-event_socket_ip']['ar-eg'] = "عنوان IP لمقبس الحدث";
$text['label-event_socket_ip']['de-at'] = "Event Socket IP Adresse";
$text['label-event_socket_ip']['de-ch'] = "Event Socket IP Adresse";
$text['label-event_socket_ip']['de-de'] = "Event Socket IP Adresse";
$text['label-event_socket_ip']['es-cl'] = "Dirección IP del Socket de Eventos";
$text['label-event_socket_ip']['es-mx'] = "Dirección IP del Socket de Eventos";
$text['label-event_socket_ip']['fr-ca'] = "Adresse IP pour Event Socket";
$text['label-event_socket_ip']['fr-fr'] = "Adresse IP pour Event Socket";
$text['label-event_socket_ip']['he-il'] = "כתובת IP של שקע אירוע";
$text['label-event_socket_ip']['it-it'] = "IP Address Event Socket";
$text['label-event_socket_ip']['nl-nl'] = "Event-Socket IP adres";
$text['label-event_socket_ip']['pl-pl'] = "Adres IP 'Event Socket'";
$text['label-event_socket_ip']['pt-br'] = "Endreço IP do Evento Socket ";
$text['label-event_socket_ip']['pt-pt'] = "Endreço IP do Event Socket";
$text['label-event_socket_ip']['ro-ro'] = "Adresa IP a soclului evenimentului";
$text['label-event_socket_ip']['ru-ru'] = "IP Address сокета событий";
$text['label-event_socket_ip']['sv-se'] = "Event Socket IP Address";
$text['label-event_socket_ip']['uk-ua'] = "Event Socket IP Address";
$text['label-event_socket_ip']['zh-cn'] = "事件套接字 IP 地址";
$text['label-event_socket_ip']['ja-jp'] = "イベントソケットIPアドレス";
$text['label-event_socket_ip']['ko-kr'] = "이벤트 소켓 IP 주소";
$text['label-event_socket_acl']['en-us'] = "Event Socket ACL";
$text['label-event_socket_acl']['en-gb'] = "Event Socket ACL";
$text['label-event_socket_acl']['ar-eg'] = "جوربة المزلاج";
$text['label-event_socket_acl']['de-at'] = "Veranstaltungsdose acl";
$text['label-event_socket_acl']['de-ch'] = "Veranstaltungsdose acl";
$text['label-event_socket_acl']['de-de'] = "Event Socket ACL";
$text['label-event_socket_acl']['es-cl'] = "ACL del Socket de Eventos";
$text['label-event_socket_acl']['es-mx'] = "ACL del Socket de Eventos";
$text['label-event_socket_acl']['fr-ca'] = "ACL pour Event Socket";
$text['label-event_socket_acl']['fr-fr'] = "ACL IP pour Event Socket";
$text['label-event_socket_acl']['he-il'] = "אירוע Socket ACL";
$text['label-event_socket_acl']['it-it'] = "IP Address ACL";
$text['label-event_socket_acl']['nl-nl'] = "Event-Socket ACL";
$text['label-event_socket_acl']['pl-pl'] = "ACL 'Event Socket'";
$text['label-event_socket_acl']['pt-br'] = "ACL do Evento Socket ";
$text['label-event_socket_acl']['pt-pt'] = "ACL do Event Socket";
$text['label-event_socket_acl']['ro-ro'] = "Event Socket ACL";
$text['label-event_socket_acl']['ru-ru'] = "ACL сокета событий";
$text['label-event_socket_acl']['sv-se'] = "Event Socket ACL";
$text['label-event_socket_acl']['uk-ua'] = "Event Socket ACL";
$text['label-event_socket_acl']['zh-cn'] = "事件套接字访问控制列表";
$text['label-event_socket_acl']['ja-jp'] = "イベントソケットACL";
$text['label-event_socket_acl']['ko-kr'] = "이벤트 소켓 ACL";
$text['description-xml_rpc_auth_user']['en-us'] = "Enter the XML RPC Auth User. default: xmlrpc";
$text['description-xml_rpc_auth_user']['en-gb'] = "Enter the XML RPC Auth User. default: xmlrpc";
$text['description-xml_rpc_auth_user']['ar-eg'] = "إدخلْ المستعملَ الأصيلِ XML. التقصير: xmlrpc";
$text['description-xml_rpc_auth_user']['de-at'] = "Geben Sie den XML RPC Auth Benutzer an. Standard: xmlrpc";
$text['description-xml_rpc_auth_user']['de-ch'] = "Geben Sie den XML RPC Auth Benutzer an. Standard: xmlrpc";
$text['description-xml_rpc_auth_user']['de-de'] = "Geben Sie den XML RPC Auth Benutzer an. Standard: xmlrpc";
$text['description-xml_rpc_auth_user']['es-cl'] = "Ingrese usuario XML RPC. Predeterminado: xmlrpc";
$text['description-xml_rpc_auth_user']['es-mx'] = "Ingrese usuario XML RPC. Predeterminado: xmlrpc";
$text['description-xml_rpc_auth_user']['fr-ca'] = "Usager XML RPC. défaut: xmlrpc";
$text['description-xml_rpc_auth_user']['fr-fr'] = "Usager XML RPC. défaut: xmlrpc";
$text['description-xml_rpc_auth_user']['he-il'] = "הזן את XML RPC Auth User. המונחים: xmlrpc";
$text['description-xml_rpc_auth_user']['it-it'] = "Inserire the XML RPC Auth User. standaard: xmlrpc";
$text['description-xml_rpc_auth_user']['nl-nl'] = "Geef de XML RPC authorisatie gebruiker. default: xmlrpc";
$text['description-xml_rpc_auth_user']['pl-pl'] = "Wprowadź użytkownika XML RPC (domyślny xmlrpc)";
$text['description-xml_rpc_auth_user']['pt-br'] = "Introduza o utilizador de autenticação do XML RPC.xmlrpc ";
$text['description-xml_rpc_auth_user']['pt-pt'] = "Introduza o utilizador de autenticação do XML RPC. omissão: xmlrpc";
$text['description-xml_rpc_auth_user']['ro-ro'] = "Introduceți utilizatorul XML RPC Auth. implicit: xmlrpc";
$text['description-xml_rpc_auth_user']['ru-ru'] = "Введите XML RPC для авторизации пользователя. По умолчанию: xmlrpc";
$text['description-xml_rpc_auth_user']['sv-se'] = "Fyll i XML RPC Auth User. default: xmlrpc";
$text['description-xml_rpc_auth_user']['uk-ua'] = "Enter the XML RPC Auth User. default: xmlrpc ";
$text['description-xml_rpc_auth_user']['zh-cn'] = "输入 XML RPC 身份验证用户。 默认值xmlrpc";
$text['description-xml_rpc_auth_user']['ja-jp'] = "XML RPC 認証ユーザーを入力します。 デフォルト: xmlrpc";
$text['description-xml_rpc_auth_user']['ko-kr'] = "XML RPC 인증 사용자를 입력합니다. 기본값: xmlrpc";
$text['description-xml_rpc_auth_realm']['en-us'] = "Enter the XML RPC Auth Realm. default: freeswitch";
$text['description-xml_rpc_auth_realm']['en-gb'] = "Enter the XML RPC Auth Realm. default: freeswitch";
$text['description-xml_rpc_auth_realm']['ar-eg'] = "إدخلْ اكسML RPC Auth Realm. العجز: المحررة";
$text['description-xml_rpc_auth_realm']['de-at'] = "Geben Sie den XML RPC Auth Realm an. Standard: freeswitch";
$text['description-xml_rpc_auth_realm']['de-ch'] = "Geben Sie den XML RPC Auth Realm an. Standard: freeswitch";
$text['description-xml_rpc_auth_realm']['de-de'] = "Geben Sie den XML RPC Auth Realm an. Standard: freeswitch";
$text['description-xml_rpc_auth_realm']['es-cl'] = "Ingrese el reino de autenticación XML RPC. Predeterminado: freeswitch";
$text['description-xml_rpc_auth_realm']['es-mx'] = "Ingrese el reino de autenticación XML RPC. Predeterminado: freeswitch";
$text['description-xml_rpc_auth_realm']['fr-ca'] = "Royaume d'authentification XML RPC. défaut: freeswitch";
$text['description-xml_rpc_auth_realm']['fr-fr'] = "Royaume d'authentification XML RPC. défaut: freeswitch";
$text['description-xml_rpc_auth_realm']['he-il'] = "עקבו אחרי XML RPC Auth Realm ברירת מחדל: freeswitch";
$text['description-xml_rpc_auth_realm']['it-it'] = "Inserire lo XML RPC Auth Realm. default: freeswitch";
$text['description-xml_rpc_auth_realm']['nl-nl'] = "Geef de XML RPC authorisatie domein, standaard: freeswitch";
$text['description-xml_rpc_auth_realm']['pl-pl'] = "Wprowadź realm (domenę) XML RPC (domyślna freeswitch).";
$text['description-xml_rpc_auth_realm']['pt-br'] = "Introduza o dominio de autenticação do XML RPC. freeswitch ";
$text['description-xml_rpc_auth_realm']['pt-pt'] = "Introduza o Realm de autenticação do XML RPC. omissão: freeswitch";
$text['description-xml_rpc_auth_realm']['ro-ro'] = "Introduceți domeniul de autentificare XML RPC. implicit: comutare liberă";
$text['description-xml_rpc_auth_realm']['ru-ru'] = "Введите XML RPC области аутентификации. По умолчанию: freeswitch";
$text['description-xml_rpc_auth_realm']['sv-se'] = "Fyll i XML RPC Auth Realm. default: freeswitch ";
$text['description-xml_rpc_auth_realm']['uk-ua'] = "Enter the XML RPC Auth Realm. default: freeswitch ";
$text['description-xml_rpc_auth_realm']['zh-cn'] = "输入 XML RPC Auth 领域。 默认值:自由切换";
$text['description-xml_rpc_auth_realm']['ja-jp'] = "XML RPC 認証レルムを入力します。 デフォルト: フリースイッチ";
$text['description-xml_rpc_auth_realm']['ko-kr'] = "XML RPC 인증 영역을 입력합니다. 기본값: 프리스위치";
$text['description-xml_rpc_auth_pass']['en-us'] = "Enter the XML RPC Auth Password.";
$text['description-xml_rpc_auth_pass']['en-gb'] = "Enter the XML RPC Auth Password.";
$text['description-xml_rpc_auth_pass']['ar-eg'] = "أدخل كلمة مرور مصادقة XML RPC.";
$text['description-xml_rpc_auth_pass']['de-at'] = "Geben Sie das XML RPC Auth Passwort an.";
$text['description-xml_rpc_auth_pass']['de-ch'] = "Geben Sie das XML RPC Auth Passwort an.";
$text['description-xml_rpc_auth_pass']['de-de'] = "Geben Sie das XML RPC Auth Passwort an.";
$text['description-xml_rpc_auth_pass']['es-cl'] = "Ingrese la contraseña XML RPC.";
$text['description-xml_rpc_auth_pass']['es-mx'] = "Ingrese la contraseña XML RPC.";
$text['description-xml_rpc_auth_pass']['fr-ca'] = "Mot de passe pour XML RPC.";
$text['description-xml_rpc_auth_pass']['fr-fr'] = "Mot de passe pour XML RPC.";
$text['description-xml_rpc_auth_pass']['he-il'] = "היכנס ל-XML RPC Auth Password.";
$text['description-xml_rpc_auth_pass']['it-it'] = "Inserire la XML RPC Auth Password.";
$text['description-xml_rpc_auth_pass']['nl-nl'] = "Voer het XML RPC autorisatie wachtwoord in.";
$text['description-xml_rpc_auth_pass']['pl-pl'] = "Wprowadź hasło XML RPC";
$text['description-xml_rpc_auth_pass']['pt-br'] = "Introduza a palavra-chave de autenticação do XML RPC. ";
$text['description-xml_rpc_auth_pass']['pt-pt'] = "Introduza a palavra-passe de autenticação do XML RPC.";
$text['description-xml_rpc_auth_pass']['ro-ro'] = "Introduceți parola de autentificare XML RPC.";
$text['description-xml_rpc_auth_pass']['ru-ru'] = "Введите XML RPC Пароль для авторизации.";
$text['description-xml_rpc_auth_pass']['sv-se'] = "Fyll i XML RPC Auth Password.";
$text['description-xml_rpc_auth_pass']['uk-ua'] = "Enter the XML RPC Auth Password. ";
$text['description-xml_rpc_auth_pass']['zh-cn'] = "输入 XML RPC 验证密码。";
$text['description-xml_rpc_auth_pass']['ja-jp'] = "XML RPC 認証パスワードを入力します。";
$text['description-xml_rpc_auth_pass']['ko-kr'] = "XML RPC 인증 암호를 입력합니다.";
$text['description-xml_rpc_http_port']['en-us'] = "Enter the XML RPC HTTP Port. default: 8080";
$text['description-xml_rpc_http_port']['en-gb'] = "Enter the XML RPC HTTP Port. default: 8080";
$text['description-xml_rpc_http_port']['ar-eg'] = 'أدخلي الـ "إكسميل" إلى المرفأ العجز: 8080';
$text['description-xml_rpc_http_port']['de-at'] = "Geben Sie den XML RPC HTTP Port an. Standard: 8080";
$text['description-xml_rpc_http_port']['de-ch'] = "Geben Sie den XML RPC HTTP Port an. Standard: 8080";
$text['description-xml_rpc_http_port']['de-de'] = "Geben Sie den XML RPC HTTP Port an. Standard: 8080";
$text['description-xml_rpc_http_port']['es-cl'] = "Ingrese el puerto XML RPC HTTP. Predeterminado: 8080";
$text['description-xml_rpc_http_port']['es-mx'] = "Ingrese el puerto XML RPC HTTP. Predeterminado: 8080";
$text['description-xml_rpc_http_port']['fr-ca'] = "Port pour joindre le service XML RPC HTTP. défaut: 8080";
$text['description-xml_rpc_http_port']['fr-fr'] = "Port pour joindre le service XML RPC HTTP. défaut: 8080";
$text['description-xml_rpc_http_port']['he-il'] = "היכנס ל-XML RPC HTTP Port כברירת מחדל: 8080";
$text['description-xml_rpc_http_port']['it-it'] = "Inserire la XML RPC HTTP Port. default: 8080";
$text['description-xml_rpc_http_port']['nl-nl'] = "Voer het XML RPC HTTP poort. standaard: 8080";
$text['description-xml_rpc_http_port']['pl-pl'] = "Wprowadź port HTTP XML RPC";
$text['description-xml_rpc_http_port']['pt-br'] = "Introduza a oirta HTTP para o XML RPC. 8080 ";
$text['description-xml_rpc_http_port']['pt-pt'] = "Introduza o porto HTTP para o XML RPC. omissão: 8080";
$text['description-xml_rpc_http_port']['ro-ro'] = "Introduceți portul XML RPC HTTP. implicit: 8080";
$text['description-xml_rpc_http_port']['ru-ru'] = "Введите XML RPC HTTP Порт. По умолчанию: 8080";
$text['description-xml_rpc_http_port']['sv-se'] = "Fyll i XML RPC HTTP Port. default: 8080";
$text['description-xml_rpc_http_port']['uk-ua'] = "Enter the XML RPC HTTP Port. default: 8080 ";
$text['description-xml_rpc_http_port']['zh-cn'] = "输入 XML RPC HTTP 端口。 默认值8080";
$text['description-xml_rpc_http_port']['ja-jp'] = "XML RPC HTTP ポートを入力します。 デフォルト: 8080";
$text['description-xml_rpc_http_port']['ko-kr'] = "XML RPC HTTP 포트를 입력합니다. 기본값: 8080";
$text['description-mod_shout_volume']['en-us'] = "Enter Mod Shout Volume.";
$text['description-mod_shout_volume']['en-gb'] = "Enter Mod Shout Volume.";
$text['description-mod_shout_volume']['ar-eg'] = "أدخل (مود شوت فولوم)";
$text['description-mod_shout_volume']['de-at'] = "Geben Sie Mod Shout Lautstärke an.";
$text['description-mod_shout_volume']['de-ch'] = "Geben Sie Mod Shout Lautstärke an.";
$text['description-mod_shout_volume']['de-de'] = "Geben Sie Mod Shout Lautstärke an.";
$text['description-mod_shout_volume']['es-cl'] = "Ingrese el volumen del Mod Shout.";
$text['description-mod_shout_volume']['es-mx'] = "Ingrese el volumen del Mod Shout.";
$text['description-mod_shout_volume']['fr-ca'] = "Choisir l'amplification du volume pour Mod Shout.";
$text['description-mod_shout_volume']['fr-fr'] = "Choisir l'amplification du volume pour Mod Shout.";
$text['description-mod_shout_volume']['he-il'] = "עקבו אחרי Mod Shout Volume";
$text['description-mod_shout_volume']['it-it'] = "Inserire Volume Mod Shout.";
$text['description-mod_shout_volume']['nl-nl'] = "Voer het Shout Module volume in.";
$text['description-mod_shout_volume']['pl-pl'] = "Wprowadź głośność modułu Mod Shout";
$text['description-mod_shout_volume']['pt-br'] = "Introduza o volume do Mod Shout. ";
$text['description-mod_shout_volume']['pt-pt'] = "Introduza o volume do Mod Shout.";
$text['description-mod_shout_volume']['ro-ro'] = "Introduceți volumul strigăt mod.";
$text['description-mod_shout_volume']['ru-ru'] = "Введите Mod Shout Volume.";
$text['description-mod_shout_volume']['sv-se'] = "Fyll i Mod Shout Volume.";
$text['description-mod_shout_volume']['uk-ua'] = "Enter Mod Shout Volume. ";
$text['description-mod_shout_volume']['zh-cn'] = "输入 Mod 音量。";
$text['description-mod_shout_volume']['ja-jp'] = "Modシャウトボリュームを入力します。";
$text['description-mod_shout_volume']['ko-kr'] = "Mod Shout Volume을 입력합니다.";
$text['description-mod_shout_decoder']['en-us'] = "Enter the Decoder. default: i386";
$text['description-mod_shout_decoder']['en-gb'] = "Enter the Decoder. default: i386";
$text['description-mod_shout_decoder']['ar-eg'] = "أدخل الدّاكن العجز: i386";
$text['description-mod_shout_decoder']['de-at'] = "Wählen Sie den Decoder. Standard: i386";
$text['description-mod_shout_decoder']['de-ch'] = "Wählen Sie den Decoder. Standard: i386";
$text['description-mod_shout_decoder']['de-de'] = "Wählen Sie den Decoder. Standard: i386";
$text['description-mod_shout_decoder']['es-cl'] = "Ingrese el tipo de descodificador. Predeterminado: i386";
$text['description-mod_shout_decoder']['es-mx'] = "Ingrese el tipo de descodificador. Predeterminado: i386";
$text['description-mod_shout_decoder']['fr-ca'] = "Type de Décodeur. défaut: i386";
$text['description-mod_shout_decoder']['fr-fr'] = "Type de Décodeur. défaut: i386";
$text['description-mod_shout_decoder']['he-il'] = "היכנסו לדקודר. ברירת מחדל: i386";
$text['description-mod_shout_decoder']['it-it'] = "Inserire il Decoder. default: i386";
$text['description-mod_shout_decoder']['nl-nl'] = "Voer de decoder in. standaard: i386";
$text['description-mod_shout_decoder']['pl-pl'] = "Wprowadź rodzaj dekodera (domyślny i386)";
$text['description-mod_shout_decoder']['pt-br'] = "Tipo de descodificador. i386 ";
$text['description-mod_shout_decoder']['pt-pt'] = "Tipo de descodificador. omissão: i386";
$text['description-mod_shout_decoder']['ro-ro'] = "Introduceți decodorul. implicit: i386";
$text['description-mod_shout_decoder']['ru-ru'] = "Введите Decoder. По умолчанию: i386";
$text['description-mod_shout_decoder']['sv-se'] = "Fyll i Decoder. default: i386";
$text['description-mod_shout_decoder']['uk-ua'] = "Enter the Decoder. default: i386 ";
$text['description-mod_shout_decoder']['zh-cn'] = "输入解码器。 默认值i386";
$text['description-mod_shout_decoder']['ja-jp'] = "デコーダーを入力します。 デフォルト: i386";
$text['description-mod_shout_decoder']['ko-kr'] = "디코더를 입력하십시오. 기본값: i386";
$text['description-event_socket_password']['en-us'] = "Enter the event socket password.";
$text['description-event_socket_password']['en-gb'] = "Enter the event socket password.";
$text['description-event_socket_password']['ar-eg'] = "أدخل كلمة سر جورب الحدث";
$text['description-event_socket_password']['de-at'] = "Geben Sie das Event Socket Passwort an.";
$text['description-event_socket_password']['de-ch'] = "Geben Sie das Event Socket Passwort an.";
$text['description-event_socket_password']['de-de'] = "Geben Sie das Event Socket Passwort an.";
$text['description-event_socket_password']['es-cl'] = "Ingrese la contraseña del socket de eventos.";
$text['description-event_socket_password']['es-mx'] = "Ingrese la contraseña del socket de eventos.";
$text['description-event_socket_password']['fr-ca'] = "Mot de passe pour se connecter au module Event Socket.";
$text['description-event_socket_password']['fr-fr'] = "Mot de passe pour se connecter au module Event Socket.";
$text['description-event_socket_password']['he-il'] = "היכנס לסיסמת השקעים של האירוע.";
$text['description-event_socket_password']['it-it'] = "Inserire la password della event socket.";
$text['description-event_socket_password']['nl-nl'] = "Voer het Event-Socket wachtwoord in.";
$text['description-event_socket_password']['pl-pl'] = "Wprowadź hasło 'Event Socket'";
$text['description-event_socket_password']['pt-br'] = "Introduza a palavra-chave do event socket. ";
$text['description-event_socket_password']['pt-pt'] = "Introduza a palavra-chave do event socket.";
$text['description-event_socket_password']['ro-ro'] = "Introduceți parola socket-ului evenimentului.";
$text['description-event_socket_password']['ru-ru'] = "Введите пароль сокета событий.";
$text['description-event_socket_password']['sv-se'] = "Fyll i event socket password.";
$text['description-event_socket_password']['uk-ua'] = "Enter the event socket password. ";
$text['description-event_socket_password']['zh-cn'] = "输入事件套接字密码。";
$text['description-event_socket_password']['ja-jp'] = "イベントソケットのパスワードを入力します。";
$text['description-event_socket_password']['ko-kr'] = "이벤트 소켓 암호를 입력하십시오.";
$text['description-event_socket_port']['en-us'] = "Enter the event socket port. default: 8021";
$text['description-event_socket_port']['en-gb'] = "Enter the event socket port. default: 8021";
$text['description-event_socket_port']['ar-eg'] = "أدخل مرفأ جورب الحدث العجز: 8021";
$text['description-event_socket_port']['de-at'] = "Geben Sie den Event Socket Port an. Standard: 8021";
$text['description-event_socket_port']['de-ch'] = "Geben Sie den Event Socket Port an. Standard: 8021";
$text['description-event_socket_port']['de-de'] = "Geben Sie den Event Socket Port an. Standard: 8021";
$text['description-event_socket_port']['es-cl'] = "Puerto del Socket de eventos. Predeterminado: 8021";
$text['description-event_socket_port']['es-mx'] = "Puerto del Socket de eventos. Predeterminado: 8021";
$text['description-event_socket_port']['fr-ca'] = "Port du module Event Socket. défaut: 8021";
$text['description-event_socket_port']['fr-fr'] = "Port du module Event Socket. défaut: 8021";
$text['description-event_socket_port']['he-il'] = "היכנסו אל נמל שקע האירוע. ברירת מחדל: 8021";
$text['description-event_socket_port']['it-it'] = "Inserire la porta della event socket. default: 8021";
$text['description-event_socket_port']['nl-nl'] = "Voer het Event-Socket poort. standaard: 8021";
$text['description-event_socket_port']['pl-pl'] = "Wprowadź port 'Event Socket' (domyślny 8021)";
$text['description-event_socket_port']['pt-br'] = "Introduza o porto do evento socket. 8021 ";
$text['description-event_socket_port']['pt-pt'] = "Introduza o porto do event socket. omissão: 8021";
$text['description-event_socket_port']['ro-ro'] = "Introduceți portul socket-ului evenimentului. implicit: 8021";
$text['description-event_socket_port']['ru-ru'] = "Введите порт сокета событий. По умолчанию: 8021";
$text['description-event_socket_port']['sv-se'] = "Fyll i event socket port. default: 8021";
$text['description-event_socket_port']['uk-ua'] = "Enter the event socket port. default: 8021 ";
$text['description-event_socket_port']['zh-cn'] = "输入事件套接字端口。 默认值8021";
$text['description-event_socket_port']['ja-jp'] = "イベントソケットポートを入力します。 デフォルト: 8021";
$text['description-event_socket_port']['ko-kr'] = "이벤트 소켓 포트를 입력하십시오. 기본값: 8021";
$text['description-event_socket_ip']['en-us'] = "Enter the event socket IP address. default: 127.0.0.1";
$text['description-event_socket_ip']['en-gb'] = "Enter the event socket IP address. default: 127.0.0.1";
$text['description-event_socket_ip']['ar-eg'] = "أدخل عنوان IP لمأخذ الحدث. الافتراضي: 127.0.0.1";
$text['description-event_socket_ip']['de-at'] = "Geben Sie die Event Socket IP Addresse an. Standard: 127.0.0.1";
$text['description-event_socket_ip']['de-ch'] = "Geben Sie die Event Socket IP Addresse an. Standard: 127.0.0.1";
$text['description-event_socket_ip']['de-de'] = "Geben Sie die Event Socket IP Addresse an. Standard: 127.0.0.1";
$text['description-event_socket_ip']['es-cl'] = "Dirección IP del socket de eventos. Predeterminada: 127.0.0.1";
$text['description-event_socket_ip']['es-mx'] = "Dirección IP del socket de eventos. Predeterminada: 127.0.0.1";
$text['description-event_socket_ip']['fr-ca'] = "Adresse IP pour le module Event Socket. défaut: 127.0.0.1";
$text['description-event_socket_ip']['fr-fr'] = "Adresse IP pour le module Event Socket. défaut: 127.0.0.1";
$text['description-event_socket_ip']['he-il'] = "הכנס את כתובת IP של האירוע. ברירת מחדל: 127.0.0.1";
$text['description-event_socket_ip']['it-it'] = "Inserire l'IP address della event socket. default: 127.0.0.1";
$text['description-event_socket_ip']['nl-nl'] = "Voer het Event-Socket IP adres in. Standaard 127.0.0.1";
$text['description-event_socket_ip']['pl-pl'] = "Wprowadź adres IP 'Event Socket' (domyślny 127.0.0.1)";
$text['description-event_socket_ip']['pt-br'] = "Introduza o endereço IP do evento socket. omissão: 127.0.0.1 ";
$text['description-event_socket_ip']['pt-pt'] = "Introduza o endereço IP do event socket. omissão: 127.0.0.1";
$text['description-event_socket_ip']['ro-ro'] = "Introduceți adresa IP a soclului evenimentului. implicit: 127.0.0.1";
$text['description-event_socket_ip']['ru-ru'] = "Введите IP адрес сокета событий. по умолчанию: 127.0.0.1";
$text['description-event_socket_ip']['sv-se'] = "Fyll i event socket IP address. default: 127.0.0.1";
$text['description-event_socket_ip']['uk-ua'] = "Enter the event socket IP address. default: 127.0.0.1 ";
$text['description-event_socket_ip']['zh-cn'] = "输入事件套接字 IP 地址。 默认值127.0.0.1";
$text['description-event_socket_ip']['ja-jp'] = "イベントソケットのIPアドレスを入力します。 デフォルト: 127.0.0.1";
$text['description-event_socket_ip']['ko-kr'] = "이벤트 소켓 IP 주소를 입력합니다. 기본값: 127.0.0.1";
?>

View File

@ -1,35 +0,0 @@
<?php
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Settings";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Settings";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الترتيبات";
$apps[$x]['menu'][$y]['title']['de-at'] = "Einstellungen";
$apps[$x]['menu'][$y]['title']['de-de'] = "Einstellungen";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Configuraciones";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Ajustes";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Réglages";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Configuration";
$apps[$x]['menu'][$y]['title']['he-il'] = "הגדרות הגדרות";
$apps[$x]['menu'][$y]['title']['it-it'] = "Parametri";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Instellingen";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Ustawienia";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Definições";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Definições";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Setări";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Конфигурация";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Inställningar";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Налаштування";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "设置";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "設定";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "설정";
$apps[$x]['menu'][$y]['uuid'] = "148ea42a-3711-3d64-181b-07a6a3c3ed60";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/settings/setting_edit.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>

View File

@ -1,362 +0,0 @@
<?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-2020
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('setting_view') || if_group("superadmin")) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get the number of rows in v_extensions
$sql = " select count(*) from v_settings ";
$database = new database;
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//set the action
$action = $num_rows == 0 ? "add" : "update";
//get the http values and set them as php variables
if (!empty($_POST)) {
//$numbering_plan = $_POST["numbering_plan"];
//$default_gateway = $_POST["default_gateway"];
$setting_uuid = $_POST["setting_uuid"];
$event_socket_ip_address = $_POST["event_socket_ip_address"];
if (empty($event_socket_ip_address)) { $event_socket_ip_address = '127.0.0.1'; }
$event_socket_port = $_POST["event_socket_port"];
$event_socket_password = $_POST["event_socket_password"];
$event_socket_acl = $_POST["event_socket_acl"];
$xml_rpc_http_port = $_POST["xml_rpc_http_port"];
$xml_rpc_auth_realm = $_POST["xml_rpc_auth_realm"];
$xml_rpc_auth_user = $_POST["xml_rpc_auth_user"];
$xml_rpc_auth_pass = $_POST["xml_rpc_auth_pass"];
//$admin_pin = $_POST["admin_pin"];
$mod_shout_decoder = $_POST["mod_shout_decoder"];
$mod_shout_volume = $_POST["mod_shout_volume"];
}
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//check for all required data
$msg = '';
//if (empty($numbering_plan)) { $msg .= "Please provide: Numbering Plan<br>\n"; }
//if (empty($default_gateway)) { $msg .= "Please provide: Default Gateway<br>\n"; }
if (empty($event_socket_port)) { $msg .= "Please provide: Event Socket Port<br>\n"; }
if (empty($event_socket_password)) { $msg .= "Please provide: Event Socket Password<br>\n"; }
//if (empty($event_socket_acl)) { $msg .= "Please provide: Event Socket ACL<br>\n"; }
//if (empty($xml_rpc_http_port)) { $msg .= "Please provide: XML RPC HTTP Port<br>\n"; }
//if (empty($xml_rpc_auth_realm)) { $msg .= "Please provide: XML RPC Auth Realm<br>\n"; }
//if (empty($xml_rpc_auth_user)) { $msg .= "Please provide: XML RPC Auth User<br>\n"; }
//if (empty($xml_rpc_auth_pass)) { $msg .= "Please provide: XML RPC Auth Password<br>\n"; }
//if (empty($admin_pin)) { $msg .= "Please provide: Admin PIN Number<br>\n"; }
//if (empty($mod_shout_decoder)) { $msg .= "Please provide: Mod Shout Decoder<br>\n"; }
//if (empty($mod_shout_volume)) { $msg .= "Please provide: Mod Shout Volume<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
echo "<table><tr><td>\n";
echo $msg."<br />";
echo "</td></tr></table>\n";
persistformvar($_POST);
echo "</div>\n";
require_once "resources/footer.php";
return;
}
//add or update the database
if (empty($_POST["persistformvar"])) {
if (permission_exists('setting_edit')) {
//build array
$array['settings'][0]['setting_uuid'] = $action == "add" ? uuid() : $setting_uuid;
$array['settings'][0]['event_socket_ip_address'] = $event_socket_ip_address;
$array['settings'][0]['event_socket_port'] = $event_socket_port;
$array['settings'][0]['event_socket_password'] = $event_socket_password;
$array['settings'][0]['event_socket_acl'] = $event_socket_acl;
$array['settings'][0]['xml_rpc_http_port'] = $xml_rpc_http_port;
$array['settings'][0]['xml_rpc_auth_realm'] = $xml_rpc_auth_realm;
$array['settings'][0]['xml_rpc_auth_user'] = $xml_rpc_auth_user;
$array['settings'][0]['xml_rpc_auth_pass'] = $xml_rpc_auth_pass;
$array['settings'][0]['mod_shout_decoder'] = $mod_shout_decoder;
$array['settings'][0]['mod_shout_volume'] = $mod_shout_volume;
//grant temporary permissions
$p = new permissions;
if ($action == 'add') {
$p->add('setting_add', 'temp');
}
else if ($action == 'update') {
$p->add('setting_edit', 'temp');
}
//execute insert
$database = new database;
$database->app_name = 'settings';
$database->app_uuid = 'b6b1b2e5-4ba5-044c-8a5c-18709a15eb60';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('setting_add', 'temp');
$p->delete('setting_edit', 'temp');
//synchronize settings
save_setting_xml();
//set message
if ($action == 'add') {
message::add($text['message-add']);
}
else if ($action == 'update') {
message::add($text['message-update']);
}
//redirect
header("Location: setting_edit.php");
exit;
}
}
}
//pre-populate the form
if (empty($_POST["persistformvar"])) {
$sql = "select * from v_settings ";
$database = new database;
$row = $database->select($sql, null, 'row');
if (!empty($row)) {
$setting_uuid = $row['setting_uuid'];
$event_socket_ip_address = $row["event_socket_ip_address"];
$event_socket_port = $row["event_socket_port"];
$event_socket_password = $row["event_socket_password"];
$event_socket_acl = $row["event_socket_acl"];
$xml_rpc_http_port = $row["xml_rpc_http_port"];
$xml_rpc_auth_realm = $row["xml_rpc_auth_realm"];
$xml_rpc_auth_user = $row["xml_rpc_auth_user"];
$xml_rpc_auth_pass = $row["xml_rpc_auth_pass"];
$mod_shout_decoder = $row["mod_shout_decoder"];
$mod_shout_volume = $row["mod_shout_volume"];
}
unset($sql, $row);
}
//show the header
if ($action == "add") {
$document['title'] = $text['title-settings_add'];
}
else if ($action == "update") {
$document['title'] = $text['title-settings_update'];
}
require_once "resources/header.php";
//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'>";
if ($action == "add") {
echo "<b>".$text['title-settings_add']."</b>";
}
else if ($action == "update") {
echo "<b>".$text['title-settings_update']."</b>";
}
echo " </div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','collapse'=>'never','onclick'=>'submit_form();']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-event_socket_ip']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='event_socket_ip_address' maxlength='255' value=\"".escape($event_socket_ip_address)."\">\n";
echo "<br />\n";
echo $text['description-event_socket_ip']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-event_socket_port']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='event_socket_port' maxlength='255' autocomplete='new-password' value=\"".escape($event_socket_port)."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-event_socket_port']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-event_socket_password']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input type='password' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo " <input class='formfld' type='password' name='event_socket_password' id='event_socket_password' autocomplete='new-password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($event_socket_password)."\">\n";
echo "<br />\n";
echo $text['description-event_socket_password']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-event_socket_acl']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='event_socket_acl' id='event_socket_acl' maxlength='50' value=\"".escape($event_socket_acl)."\">\n";
echo "<br />\n";
echo !empty($text['description-event_socket_acl'])."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-xml_rpc_http_port']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='xml_rpc_http_port' maxlength='255' value=\"".escape($xml_rpc_http_port)."\">\n";
echo "<br />\n";
echo $text['description-xml_rpc_http_port']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-xml_rpc_auth_realm']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='xml_rpc_auth_realm' maxlength='255' value=\"".escape($xml_rpc_auth_realm)."\">\n";
echo "<br />\n";
echo $text['description-xml_rpc_auth_realm']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-xml_rpc_auth_user']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='xml_rpc_auth_user' maxlength='255' autocomplete='new-password' value=\"".escape($xml_rpc_auth_user)."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-xml_rpc_auth_user']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-xml_rpc_auth_pass']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input type='password' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo " <input class='formfld' type='password' name='xml_rpc_auth_pass' id='xml_rpc_auth_pass' autocomplete='new-password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='50' value=\"".escape($xml_rpc_auth_pass)."\">\n";
echo "<br />\n";
echo $text['description-xml_rpc_auth_pass']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-mod_shout_decoder']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='mod_shout_decoder'>\n";
echo " <option value=''></option>\n";
if ($mod_shout_decoder == "i486") {
echo " <option value='i486' selected='selected'>i486</option>\n";
}
else {
echo " <option value='i486'>i486</option>\n";
}
if ($mod_shout_decoder == "i586") {
echo " <option value='i586' selected='selected'>i586</option>\n";
}
else {
echo " <option value='i586'>i586</option>\n";
}
if ($mod_shout_decoder == "i686") {
echo " <option value='i686' selected='selected'>i686</option>\n";
}
else {
echo " <option value='i686'>i686</option>\n";
}
if ($mod_shout_decoder == "amd64") {
echo " <option value='amd64' selected='selected'>amd64</option>\n";
}
else {
echo " <option value='amd64'>amd64</option>\n";
}
if ($mod_shout_decoder == "generic") {
echo " <option value='generic' selected='selected'>generic</option>\n";
}
else {
echo " <option value='generic'>generic</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-mod_shout_decoder']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-mod_shout_volume']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='mod_shout_volume' maxlength='255' value=\"$mod_shout_volume\">\n";
echo "<br />\n";
echo $text['description-mod_shout_volume']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "<br><br>";
echo "<input type='hidden' name='setting_uuid' value='".$setting_uuid."'>\n";
echo "</form>";
echo "<script>\n";
//hide password fields before submit
echo " function submit_form() {\n";
echo " hide_password_fields();\n";
echo " $('form#frm').submit();\n";
echo " }\n";
echo "</script>\n";
//show the footer
require_once "resources/footer.php";
?>

View File

@ -82,68 +82,5 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7ca40076-b66b-4fe5-90e8-ceb4fe27391c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "event_socket_ip_address";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "127.0.0.1";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "IP Address used to connect to event socket.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "570804f2-65b9-423a-9758-f09c1b4b1482";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "event_socket_port";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "8021";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Port to connect to event socket.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ecd4923b-8396-4d83-b52d-809fe179f93a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "event_socket_password";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "ClueCon";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Password to connect to event socket.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2541e9e5-ac09-46f2-8d22-ebc3756b22b7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "event_socket_acl";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Access control list required to connect to event socket.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "90c7638c-8ecc-4210-bd7b-c301aef3ae7a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "xml_rpc_http_port";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "8080";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d7a91830-6faf-4b26-80e6-c9f9e1898425";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "xml_rpc_auth_realm";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "freeswitch";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4a1a4b4c-1a5b-45bb-8393-36c1cb42c875";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "xml_rpc_auth_user";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "freeswitch";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8b51edfe-13f7-4ca3-989a-516072bec0b7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "switch";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "xml_rpc_auth_pass";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "works";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
?>

View File

@ -27,109 +27,10 @@
//process this only one time
if ($domains_processed == 1) {
//includes files
require 'app/switch/resources/classes/scripts.php';
//copy the switch scripts
$obj = new scripts;
$obj->copy_files();
//move the default settings
$database = new database;
if ($database->table_exists('v_settings')) {
$sql = "select * from v_settings ";
$database = new database;
$row = $database->select($sql, null, 'row');
if (!empty($row)) {
//initialize the setting object
$setting = new settings(["category" => "switch"]);
//save the default settings
if ($setting->get('switch', 'event_socket_ip_address') !== $row["event_socket_ip_address"]) {
$array['setting_uuid'] = "7ca40076-b66b-4fe5-90e8-ceb4fe27391c";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "event_socket_ip_address";
$array['setting_name'] = "text";
$array['setting_value'] = $row["event_socket_ip_address"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'event_socket_port') !== $row["event_socket_port"]) {
$array['setting_uuid'] = "570804f2-65b9-423a-9758-f09c1b4b1482";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "event_socket_port";
$array['setting_name'] = "numeric";
$array['setting_value'] = $row["event_socket_port"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'event_socket_password') !== $row["event_socket_password"]) {
$array['setting_uuid'] = "ecd4923b-8396-4d83-b52d-809fe179f93a";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "event_socket_password";
$array['setting_name'] = "text";
$array['setting_value'] = $row["event_socket_password"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'event_socket_acl') !== $row["event_socket_acl"]) {
$array['setting_uuid'] = "2541e9e5-ac09-46f2-8d22-ebc3756b22b7";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "event_socket_acl";
$array['setting_name'] = "text";
$array['setting_value'] = $row["event_socket_acl"];
$array['setting_enabled'] = (empty($row["event_socket_acl"])) ? "false" : "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'xml_rpc_http_port') !== $row["xml_rpc_http_port"]) {
$array['setting_uuid'] = "90c7638c-8ecc-4210-bd7b-c301aef3ae7a";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "xml_rpc_http_port";
$array['setting_name'] = "numeric";
$array['setting_value'] = $row["xml_rpc_http_port"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'xml_rpc_auth_realm') !== $row["xml_rpc_auth_realm"]) {
$array['setting_uuid'] = "d7a91830-6faf-4b26-80e6-c9f9e1898425";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "xml_rpc_auth_realm";
$array['setting_name'] = "text";
$array['setting_value'] = $row["xml_rpc_auth_realm"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'xml_rpc_auth_user') !== $row["xml_rpc_auth_user"]) {
$array['setting_uuid'] = "4a1a4b4c-1a5b-45bb-8393-36c1cb42c875";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "xml_rpc_auth_user";
$array['setting_name'] = "text";
$array['setting_value'] = $row["xml_rpc_auth_user"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
if ($setting->get('switch', 'xml_rpc_auth_pass') !== $row["xml_rpc_auth_pass"]) {
$array['setting_uuid'] = "8b51edfe-13f7-4ca3-989a-516072bec0b7";
$array['setting_category'] = "switch";
$array['setting_subcategory'] = "xml_rpc_auth_pass";
$array['setting_name'] = "text";
$array['setting_value'] = $row["xml_rpc_auth_pass"];
$array['setting_enabled'] = "true";
$array['setting_description'] = "";
$setting->set($array);
}
}
unset($sql, $row);
}
}
?>

View File

@ -1,131 +0,0 @@
-- xml_handler.lua
-- Part of FusionPBX
-- Copyright (C) 2023 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--include xml library
local Xml = require "resources.functions.xml";
--get the cache
local cache = require "resources.functions.cache"
local event_socket_cache_key = "configuration:event_socket.conf"
XML_STRING, err = cache.get(event_socket_cache_key)
--set the cache
if not XML_STRING then
--log cache error
if (debug["cache"]) then
freeswitch.consoleLog("warning", "[xml_handler] configuration:event_socket.conf can not get from the cache: " .. tostring(err) .. "\n");
end
--set a default value
if (expire["acl"] == nil) then
expire["acl"]= "3600";
end
--connect to the database
local Database = require "resources.functions.database";
dbh = Database.new('system');
--include json library
local json
if (debug["sql"]) then
json = require "resources.functions.lunajson"
end
--exits the script if we didn't connect properly
assert(dbh:connected());
--start the xml array
local xml = Xml:new();
xml:append([[<configuration name="event_socket.conf" description="Socket Client">]]);
xml:append([[ <settings>]]);
--run the query
sql = "select default_setting_subcategory as name, default_setting_value as value from v_default_settings ";
sql = sql .. "where default_setting_category = 'switch' ";
sql = sql .. "and default_setting_subcategory like 'event_socket_%' ";
sql = sql .. "and default_setting_enabled = 'true' ";
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
end
x = 0;
dbh:query(sql, function(row)
if (row.name == 'event_socket_nat_map') then
xml:append([[ <param name="nat-map" value="]] .. xml.sanitize(row.value) .. [[" />]]);
end
if (row.name == 'event_socket_ip_address') then
xml:append([[ <param name="listen-ip" value="]] .. xml.sanitize(row.value) .. [["/>]]);
end
if (row.name == 'event_socket_port') then
xml:append([[ <param name="listen-port" value="]] .. xml.sanitize(row.value) .. [["/>]]);
end
if (row.name == 'event_socket_password') then
xml:append([[ <param name="password" value="]] .. xml.sanitize(row.value) .. [["/>]]);
end
if (row.name == 'event_socket_acl') then
xml:append([[ <param name="apply-inbound-acl" value="]] .. xml.sanitize(row.value) .. [["/>]]);
end
end)
--close the extension tag if it was left open
xml:append([[ </settings>]]);
xml:append([[</configuration>]]);
XML_STRING = xml:build();
-- if (debug["xml_string"]) then
-- freeswitch.consoleLog("notice", "[xml_handler] XML_STRING: " .. XML_STRING .. "\n");
-- end
--close the database connection
dbh:release();
--set the cache
local ok, err = cache.set(event_socket_cache_key, XML_STRING, expire["acl"]);
if debug["cache"] then
if ok then
freeswitch.consoleLog("notice", "[xml_handler] " .. event_socket_cache_key .. " stored in the cache\n");
else
freeswitch.consoleLog("warning", "[xml_handler] " .. event_socket_cache_key .. " can not be stored in the cache: " .. tostring(err) .. "\n");
end
end
--send to the console
if (debug["cache"]) then
freeswitch.consoleLog("notice", "[xml_handler] " .. event_socket_cache_key .. " source: database\n");
end
else
--send to the console
if (debug["cache"]) then
freeswitch.consoleLog("notice", "[xml_handler] " .. event_socket_cache_key .. " source: cache\n");
end
end --if XML_STRING
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open(temp_dir .. "/event_socket.conf.xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@ -1,191 +1,207 @@
-- add file_exists function
require "resources.functions.file_exists";
require "resources.functions.explode";
require "resources.functions.trim";
require "resources.functions.file_exists";
require "resources.functions.explode";
require "resources.functions.trim";
--find and return path to the config.conf
function config()
if (file_exists("/usr/local/etc/fusionpbx/config.conf")) then
return "/usr/local/etc/fusionpbx/config.conf";
elseif (file_exists("/etc/fusionpbx/config.conf")) then
return "/etc/fusionpbx/config.conf";
else
require "resources.config";
return config_file;
end
function config()
if (file_exists("/usr/local/etc/fusionpbx/config.conf")) then
return "/usr/local/etc/fusionpbx/config.conf";
elseif (file_exists("/etc/fusionpbx/config.conf")) then
return "/etc/fusionpbx/config.conf";
else
require "resources.config";
return config_file;
end
end
--load config
function load_config()
--get the config file
config_file = config();
function load_config()
--get the config file
config_file = config();
--define arrays
database = {}
database.system = {}
database.switch = {}
database.backend = {}
switch = {}
xml_handler = {}
cache = {}
--define arrays
database = {}
database.system = {}
database.switch = {}
database.backend = {}
switch = {}
xml_handler = {}
cache = {}
--read the config file
file = io.open(config_file);
lines = file:lines();
for line in lines do
if (line and string.match(line, "=")) then
--parse the setings
a = explode("=", line);
k = trim(a[1])
v = trim(a[2])
--read the config file
file = io.open(config_file);
lines = file:lines();
for line in lines do
if (line and string.match(line, "=")) then
--parse the setings
a = explode("=", line);
k = trim(a[1])
v = trim(a[2])
--debug information
--freeswitch.consoleLog("notice","line " .. line .. "\n");
--freeswitch.consoleLog("notice","key: " .. k .. ", value: ".. v .. "\n");
--debug information
--freeswitch.consoleLog("notice","line " .. line .. "\n");
--freeswitch.consoleLog("notice","key: " .. k .. ", value: ".. v .. "\n");
--database system settings
if (k == "database.0.type") then database.system.type = v; end
if (k == "database.0.host") then database.system.host = v; end
if (k == "database.0.path") then database.system.path = v; end
if (k == "database.0.hostaddr") then database.system.hostaddr = v; end
if (k == "database.0.port") then database.system.port = v; end
if (k == "database.0.sslmode") then database.system.sslmode = v; end
if (k == "database.0.name") then database.system.name = v; end
if (k == "database.0.username") then database.system.username = v; end
if (k == "database.0.password") then database.system.password = v; end
if (k == "database.0.backend.base64") then database.system.backend.base64 = v; end
--database system settings
if (k == "database.0.type") then database.system.type = v; end
if (k == "database.0.host") then database.system.host = v; end
if (k == "database.0.path") then database.system.path = v; end
if (k == "database.0.hostaddr") then database.system.hostaddr = v; end
if (k == "database.0.port") then database.system.port = v; end
if (k == "database.0.sslmode") then database.system.sslmode = v; end
if (k == "database.0.name") then database.system.name = v; end
if (k == "database.0.username") then database.system.username = v; end
if (k == "database.0.password") then database.system.password = v; end
if (k == "database.0.backend.base64") then database.system.backend.base64 = v; end
--database switch settings
if (k == "database.1.type") then database.switch.type = v; end
if (k == "database.1.path") then database.switch.path = v; end
if (k == "database.1.name") then database.switch.name = v; end
if (k == "database.1.host") then database.switch.host = v; end
if (k == "database.1.hostaddr") then database.switch.hostaddr = v; end
if (k == "database.1.port") then database.switch.port = v; end
if (k == "database.1.sslmode") then database.switch.sslmode = v; end
if (k == "database.1.username") then database.switch.username = v; end
if (k == "database.1.password") then database.switch.password = v; end
if (k == "database.1.backend.base64") then database.backend.base64 = v; end
--database switch settings
if (k == "database.1.type") then database.switch.type = v; end
if (k == "database.1.path") then database.switch.path = v; end
if (k == "database.1.name") then database.switch.name = v; end
if (k == "database.1.host") then database.switch.host = v; end
if (k == "database.1.hostaddr") then database.switch.hostaddr = v; end
if (k == "database.1.port") then database.switch.port = v; end
if (k == "database.1.sslmode") then database.switch.sslmode = v; end
if (k == "database.1.username") then database.switch.username = v; end
if (k == "database.1.password") then database.switch.password = v; end
if (k == "database.1.backend.base64") then database.backend.base64 = v; end
--switch settings
if (k == "switch.conf.dir") then conf_dir = v; end
if (k == "switch.sounds.dir") then sounds_dir = v; end
if (k == "switch.database.dir") then database_dir = v; end
if (k == "switch.database.name") then database_name = v; end
if (k == "switch.recordings.dir") then recordings_dir = v; end
if (k == "switch.storage.dir") then storage_dir = v; end
if (k == "switch.voicemail.dir") then voicemail_dir = v; end
if (k == "switch.scripts.dir") then scripts_dir = v; end
--switch settings
if (k == "switch.conf.dir") then conf_dir = v; end
if (k == "switch.sounds.dir") then sounds_dir = v; end
if (k == "switch.database.dir") then database_dir = v; end
if (k == "switch.database.name") then database_name = v; end
if (k == "switch.recordings.dir") then recordings_dir = v; end
if (k == "switch.storage.dir") then storage_dir = v; end
if (k == "switch.voicemail.dir") then voicemail_dir = v; end
if (k == "switch.scripts.dir") then scripts_dir = v; end
--switch xml handler
if (k == "xml_handler.fs_path") then xml_handler.fs_path = v; end
if (k == "xml_handler.reg_as_number_alias") then xml_handler.reg_as_number_alias = v; end
if (k == "xml_handler.number_as_presence_id") then xml_handler.number_as_presence_id = v; end
--switch event socket settings
if (k == "switch.event_socket.host") then event_socket_host = v; end
if (k == "switch.event_socket.port") then event_socket_port = v; end
if (k == "switch.event_socket.password") then event_socket_password = v; end
--general settings
if (k == "php.dir") then php_dir = v; end
if (k == "php.bin") then php_bin = v; end
if (k == "document.root") then document_root = v; end
if (k == "project.path") then project_path = v; end
if (k == "temp.dir") then temp_dir = v; end
--switch xml handler
if (k == "xml_handler.fs_path") then xml_handler.fs_path = v; end
if (k == "xml_handler.reg_as_number_alias") then xml_handler.reg_as_number_alias = v; end
if (k == "xml_handler.number_as_presence_id") then xml_handler.number_as_presence_id = v; end
--cache settings
if (k == "cache.method") then cache.method = v; end
if (k == "cache.location") then cache.location = v; end
if (k == "cache.settings") then cache.settings = v; end
--general settings
if (k == "php.dir") then php_dir = v; end
if (k == "php.bin") then php_bin = v; end
if (k == "document.root") then document_root = v; end
if (k == "project.path") then project_path = v; end
if (k == "temp.dir") then temp_dir = v; end
--show the array
--for i,v in ipairs(a) do
-- freeswitch.consoleLog("notice","key " .. i .. " value ".. v .. "\n");
--end
end
--cache settings
if (k == "cache.method") then cache.method = v; end
if (k == "cache.location") then cache.location = v; end
if (k == "cache.settings") then cache.settings = v; end
--show the array
--for i,v in ipairs(a) do
-- freeswitch.consoleLog("notice","key " .. i .. " value ".. v .. "\n");
--end
end
io.close(file);
end
io.close(file);
--set the database values
database.type = database.switch.type;
if (database.type == 'sqlite') then
database.path = database.switch.path;
database.name = database.switch.name;
end
--database system dsn
system_dsn = {}
if (database.system.type == 'pgsql') then
--create the system_dsn array
table.insert(system_dsn, [[pgsql://]]);
if (database.system.host) then
table.insert(system_dsn, [[host=]] .. database.system.host .. [[ ]]);
end
if (database.system.hostaddr) then
table.insert(system_dsn, [[hostaddr=]] .. database.system.hostaddr .. [[ ]]);
end
table.insert(system_dsn, [[port=]] .. database.system.port .. [[ ]]);
if (database.switch.sslmode) then
table.insert(system_dsn, [[sslmode=]] .. database.system.sslmode .. [[ ]]);
end
table.insert(system_dsn, [[dbname=]] .. database.system.name .. [[ ]]);
table.insert(system_dsn, [[user=]] .. database.system.username .. [[ ]]);
table.insert(system_dsn, [[password=]] .. database.system.password .. [[ ]]);
elseif (database.system.type == 'sqlite') then
--create the system_dsn array
table.insert(system_dsn, [[sqlite://]] .. database.system.path .. [[/]].. database.system.name ..[[ ]]);
end
database.system = table.concat(system_dsn, '');
--database switch dsn
switch_dsn = {}
if (database.switch.type == 'pgsql') then
--create the switch_dsn array
table.insert(switch_dsn, [[pgsql://]]);
if (database.switch.host) then
table.insert(switch_dsn, [[host=]] .. database.switch.host .. [[ ]]);
end
if (database.switch.hostaddr) then
table.insert(switch_dsn, [[hostaddr=]] .. database.switch.hostaddr .. [[ ]]);
end
table.insert(switch_dsn, [[host=]] .. database.switch.host .. [[ ]]);
table.insert(switch_dsn, [[port=]] .. database.switch.port .. [[ ]]);
if (database.switch.sslmode) then
table.insert(switch_dsn, [[sslmode=]] .. database.switch.sslmode .. [[ ]]);
end
table.insert(switch_dsn, [[dbname=]] .. database.switch.name .. [[ ]]);
table.insert(switch_dsn, [[user=]] .. database.switch.username .. [[ ]]);
table.insert(switch_dsn, [[password=]] .. database.switch.password .. [[ ]]);
database.switch = table.concat(switch_dsn, '');
elseif (database.switch.type == 'sqlite') then
--create the switch_dsn array
table.insert(switch_dsn, [[sqlite://]] .. database.switch.path .. [[/]].. database.switch.name ..[[ ]]);
end
database.switch = table.concat(switch_dsn, '');
--set defaults
expire = {}
expire.default = "3600";
expire.directory = "3600";
expire.dialplan = "3600";
expire.languages = "3600";
expire.sofia = "3600";
expire.acl = "3600";
expire.ivr = "3600";
--set settings
settings = {}
settings.recordings = {}
settings.voicemail = {}
settings.fax = {}
settings.recordings.storage_type = "";
settings.voicemail.storage_type = "";
settings.fax.storage_type = "";
--set the debug options
debug = {}
debug.params = false;
debug.sql = false;
debug.xml_request = false;
debug.xml_string = false;
--set the database values
database.type = database.switch.type;
if (database.type == 'sqlite') then
database.path = database.switch.path;
database.name = database.switch.name;
end
--database system dsn
system_dsn = {}
if (database.system.type == 'pgsql') then
--create the system_dsn array
table.insert(system_dsn, [[pgsql://]]);
if (database.system.host) then
table.insert(system_dsn, [[host=]] .. database.system.host .. [[ ]]);
end
if (database.system.hostaddr) then
table.insert(system_dsn, [[hostaddr=]] .. database.system.hostaddr .. [[ ]]);
end
table.insert(system_dsn, [[port=]] .. database.system.port .. [[ ]]);
if (database.switch.sslmode) then
table.insert(system_dsn, [[sslmode=]] .. database.system.sslmode .. [[ ]]);
end
table.insert(system_dsn, [[dbname=]] .. database.system.name .. [[ ]]);
table.insert(system_dsn, [[user=]] .. database.system.username .. [[ ]]);
table.insert(system_dsn, [[password=]] .. database.system.password .. [[ ]]);
elseif (database.system.type == 'sqlite') then
--create the system_dsn array
table.insert(system_dsn, [[sqlite://]] .. database.system.path .. [[/]].. database.system.name ..[[ ]]);
end
database.system = table.concat(system_dsn, '');
--database switch dsn
switch_dsn = {}
if (database.switch.type == 'pgsql') then
--create the switch_dsn array
table.insert(switch_dsn, [[pgsql://]]);
if (database.switch.host) then
table.insert(switch_dsn, [[host=]] .. database.switch.host .. [[ ]]);
end
if (database.switch.hostaddr) then
table.insert(switch_dsn, [[hostaddr=]] .. database.switch.hostaddr .. [[ ]]);
end
table.insert(switch_dsn, [[host=]] .. database.switch.host .. [[ ]]);
table.insert(switch_dsn, [[port=]] .. database.switch.port .. [[ ]]);
if (database.switch.sslmode) then
table.insert(switch_dsn, [[sslmode=]] .. database.switch.sslmode .. [[ ]]);
end
table.insert(switch_dsn, [[dbname=]] .. database.switch.name .. [[ ]]);
table.insert(switch_dsn, [[user=]] .. database.switch.username .. [[ ]]);
table.insert(switch_dsn, [[password=]] .. database.switch.password .. [[ ]]);
database.switch = table.concat(switch_dsn, '');
elseif (database.switch.type == 'sqlite') then
--create the switch_dsn array
table.insert(switch_dsn, [[sqlite://]] .. database.switch.path .. [[/]].. database.switch.name ..[[ ]]);
end
database.switch = table.concat(switch_dsn, '');
--event socket settings
if (event_socket_host == nil) then
event_socket_host = '127.0.0.1';
end
if (event_socket_port == nil) then
event_socket_port = '8021';
end
if (event_socket_password == nil) then
event_socket_password = 'ClueCon';
end
--set defaults
expire = {}
expire.default = "3600";
expire.directory = "3600";
expire.dialplan = "3600";
expire.languages = "3600";
expire.sofia = "3600";
expire.acl = "3600";
expire.ivr = "3600";
--set settings
settings = {}
settings.recordings = {}
settings.voicemail = {}
settings.fax = {}
settings.recordings.storage_type = "";
settings.voicemail.storage_type = "";
settings.fax.storage_type = "";
--set the debug options
debug = {}
debug.params = false;
debug.sql = false;
debug.xml_request = false;
debug.xml_string = false;
end
--autoload the configuration
load_config();
load_config();

View File

@ -34,15 +34,10 @@ local host, port, auth
function EventSocket:__init()
if not host then
local db = Database.new('system')
local sql = [[SELECT
MAX(CASE WHEN default_setting_subcategory = 'event_socket_ip_address' THEN default_setting_value END) AS event_socket_address,
MAX(CASE WHEN default_setting_subcategory = 'event_socket_port' THEN default_setting_value END) AS event_socket_port,
MAX(CASE WHEN default_setting_subcategory = 'event_socket_password' THEN default_setting_value END) AS event_socket_password
FROM v_default_settings]];
local settings, err = db:first_row(sql)
if not settings then return nil, err end
host, port, auth = settings.event_socket_ip_address, settings.event_socket_port, settings.event_socket_password
require "resources.functions.config";
host = event_socket_host;
port = event_socket_port;
auth = event_socket_password;
end
return self:_connect(host, port, auth)

View File

@ -101,12 +101,33 @@ class event_socket {
return $content;
}
public function connect($host, $port, $password) {
//set defaults
if ($host == '') { $host = '127.0.0.1'; }
if ($port == '') { $port = '8021'; }
if ($password == '') { $password = 'ClueCon'; }
public function connect($host = null, $port = null, $password = null) {
global $conf;
//get the database connection settings
if (empty($host) && empty($conf['event_socket.ip_address'])) {
$host = '127.0.0.1';
}
if (empty($port) && empty($conf['event_socket.port'])) {
$port = '8021';
}
if (empty($password) && empty($conf['switch.event_socket.password'])) {
$password = 'ClueCon';
}
//set the event socket variables
if (!empty($conf['switch.event_socket.host'])) {
$host = $conf['switch.event_socket.host'];
}
if (!empty($conf['switch.event_socket.port'])) {
$port = $conf['switch.event_socket.port'];
}
if (!empty($conf['switch.event_socket.password'])) {
$password = $conf['switch.event_socket.password'];
}
//open the socket connection
$fp = @fsockopen($host, $port, $errno, $errdesc, 3);
if (!$fp) {

View File

@ -29,15 +29,7 @@
//includes files
require_once __DIR__ . "/require.php";
//get the event socket information
if (empty($_SESSION['event_socket_ip_address'])) {
$setting = new settings(["category" => "switch"]);
$_SESSION['event_socket_ip_address'] = $setting->get('switch', 'event_socket_ip_address');
$_SESSION['event_socket_port'] = $setting->get('switch', 'event_socket_port');
$_SESSION['event_socket_password'] = $setting->get('switch', 'event_socket_password');
}
function event_socket_create($host, $port, $password) {
function event_socket_create($host = null, $port = null, $password = null) {
$esl = new event_socket;
if ($esl->connect($host, $port, $password)) {
return $esl->reset_fp();
@ -53,26 +45,8 @@ function event_socket_request($fp, $cmd) {
}
function event_socket_request_cmd($cmd) {
//get the database connection
require_once "resources/classes/database.php";
$database = new database;
$database->connect();
$db = $database->db;
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/settings/app_config.php")) {
$sql = "select * from v_settings ";
$database = new database;
$row = $database->select($sql, null, 'row');
if (!empty($row)) {
$event_socket_ip_address = $row["event_socket_ip_address"];
$event_socket_port = $row["event_socket_port"];
$event_socket_password = $row["event_socket_password"];
}
unset($sql, $row);
}
$esl = new event_socket;
if (!$esl->connect($event_socket_ip_address, $event_socket_port, $event_socket_password)) {
if (!$esl->connect()) {
return false;
}
$response = $esl->request($cmd);
@ -110,71 +84,6 @@ function ListFiles($dir) {
}
}
function save_setting_xml() {
global $domain_uuid, $host, $config;
$sql = "select * from v_settings ";
$database = new database;
$row = $database->select($sql, null, 'row');
if (!empty($row) && !empty($_SESSION['switch']['conf']['dir'])) {
//event_socket.conf.xml
$event_socket_ip_address = $row['event_socket_ip_address'];
if (empty($event_socket_ip_address)) { $event_socket_ip_address = '127.0.0.1'; }
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/event_socket.conf.xml","w");
$xml = "<configuration name=\"event_socket.conf\" description=\"Socket Client\">\n";
$xml .= " <settings>\n";
$xml .= " <param name=\"listen-ip\" value=\"" . $event_socket_ip_address . "\"/>\n";
$xml .= " <param name=\"listen-port\" value=\"" . $row['event_socket_port'] . "\"/>\n";
$xml .= " <param name=\"password\" value=\"" . $row['event_socket_password'] . "\"/>\n";
if (!empty($row['event_socket_acl'])) {
$xml .= " <param name=\"apply-inbound-acl\" value=\"" . $row['event_socket_acl'] . "\"/>\n";
}
$xml .= " </settings>\n";
$xml .= "</configuration>";
fwrite($fout, $xml);
unset($xml, $event_socket_password);
fclose($fout);
//xml_rpc.conf.xml
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/xml_rpc.conf.xml","w");
$xml = "<configuration name=\"xml_rpc.conf\" description=\"XML RPC\">\n";
$xml .= " <settings>\n";
$xml .= " <!-- The port where you want to run the http service (default 8080) -->\n";
$xml .= " <param name=\"http-port\" value=\"" . $row['xml_rpc_http_port'] . "\"/>\n";
$xml .= " <!-- if all 3 of the following params exist all http traffic will require auth -->\n";
$xml .= " <param name=\"auth-realm\" value=\"" . $row['xml_rpc_auth_realm'] . "\"/>\n";
$xml .= " <param name=\"auth-user\" value=\"" . $row['xml_rpc_auth_user'] . "\"/>\n";
$xml .= " <param name=\"auth-pass\" value=\"" . $row['xml_rpc_auth_pass'] . "\"/>\n";
$xml .= " </settings>\n";
$xml .= "</configuration>\n";
fwrite($fout, $xml);
unset($xml);
fclose($fout);
//shout.conf.xml
$fout = fopen($_SESSION['switch']['conf']['dir']."/autoload_configs/shout.conf.xml","w");
$xml = "<configuration name=\"shout.conf\" description=\"mod shout config\">\n";
$xml .= " <settings>\n";
$xml .= " <!-- Don't change these unless you are insane -->\n";
$xml .= " <param name=\"decoder\" value=\"" . $row['mod_shout_decoder'] . "\"/>\n";
$xml .= " <param name=\"volume\" value=\"" . $row['mod_shout_volume'] . "\"/>\n";
$xml .= " <!--<param name=\"outscale\" value=\"8192\"/>-->\n";
$xml .= " </settings>\n";
$xml .= "</configuration>";
fwrite($fout, $xml);
unset($xml);
fclose($fout);
}
unset($sql, $row);
//apply settings
$_SESSION["reload_xml"] = true;
//$cmd = "api reloadxml";
//event_socket_request_cmd($cmd);
//unset($cmd);
}
function filename_safe($filename) {
//lower case
$filename = strtolower($filename);