Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb540e047b | ||
|
|
10f1d7a2b2 | ||
|
|
6603eaab05 | ||
|
|
9fc3541382 | ||
|
|
2fb79825ea | ||
|
|
72094f870f | ||
|
|
7b401b39a0 | ||
|
|
0bfd1fb885 | ||
|
|
e3c330017b | ||
|
|
950b764485 | ||
|
|
9f0d14efd2 | ||
|
|
641e026474 | ||
|
|
ba64113e51 | ||
|
|
bbf902a104 | ||
|
|
3a23176948 | ||
|
|
22959fb2bc | ||
|
|
7b4fa99857 | ||
|
|
f16b7851d6 | ||
|
|
283253ac17 | ||
|
|
a8dc026574 | ||
|
|
87e481d285 | ||
|
|
4eb8d5c53f | ||
|
|
a579f82192 | ||
|
|
7b47ee638c | ||
|
|
3835477219 | ||
|
|
eae6c0aa92 | ||
|
|
ae6b922736 | ||
|
|
baeb2fbae9 | ||
|
|
3cdae74fde | ||
|
|
d419a459f7 | ||
|
|
98f20b78f2 | ||
|
|
10926f1721 | ||
|
|
b853b7253c | ||
|
|
070eef4334 | ||
|
|
ff6a9c4247 | ||
|
|
2d2fc2c787 | ||
|
|
e5df85049d | ||
|
|
f2d4c4d990 | ||
|
|
dff02c733c | ||
|
|
63863a8839 | ||
|
|
7411592da8 | ||
|
|
c370b5097f | ||
|
|
efd22e1b68 | ||
|
|
6c2266f099 | ||
|
|
3e9a030380 | ||
|
|
db9778c87a | ||
|
|
5c63d07d0c | ||
|
|
ac16421c0c | ||
|
|
2d45fb0cca | ||
|
|
ef7a71cab4 | ||
|
|
f4b445cad3 | ||
|
|
5fae9183e1 | ||
|
|
c0a5ed67a5 | ||
|
|
d5a4f263c3 | ||
|
|
829444f962 | ||
|
|
56d1eabda9 | ||
|
|
f92e5c7543 | ||
|
|
93cf491c2e | ||
|
|
732c08ca2b | ||
|
|
e46cd9a48e | ||
|
|
46b14657bc | ||
|
|
28b20fc174 | ||
|
|
77aee41478 | ||
|
|
cb9067debc | ||
|
|
efd77c36be | ||
|
|
b2a49aaddf | ||
|
|
c99753bddc | ||
|
|
fa3292a766 | ||
|
|
061c819a78 | ||
|
|
c236b72ea7 | ||
|
|
d52bcd79fb | ||
|
|
f7d56f40a1 | ||
|
|
1d353f6248 | ||
|
|
20dceb8aca | ||
|
|
ebeef3a9cc | ||
|
|
fc0b617b4e | ||
|
|
c179800bb6 | ||
|
|
1fbffe797d | ||
|
|
391a056f8e | ||
|
|
688be0fe52 | ||
|
|
bf4f8269b1 | ||
|
|
fecea0d123 | ||
|
|
872278e6cb | ||
|
|
8a7385c3cc | ||
|
|
29e10444b6 | ||
|
|
7b3362241d | ||
|
|
c26c4b3316 | ||
|
|
48771882e1 | ||
|
|
667056829c | ||
|
|
fe00529fb1 | ||
|
|
27e709f32d | ||
|
|
18047f2611 | ||
|
|
b4019239ba | ||
|
|
2bfbce7ec8 | ||
|
|
884290378d | ||
|
|
3f495272a6 | ||
|
|
03447bb335 | ||
|
|
f68487d7bd | ||
|
|
884be60f99 | ||
|
|
fe68eadaf7 | ||
|
|
8880a42a1a | ||
|
|
f7760858da | ||
|
|
819e391f23 | ||
|
|
fee4e876d3 | ||
|
|
bf7a5f17fa | ||
|
|
250650789a | ||
|
|
d3b23f7dfc | ||
|
|
039e776a67 | ||
|
|
e2284ba408 | ||
|
|
352f6c4ca5 | ||
|
|
d5e798a2d1 | ||
|
|
5dc38ccc24 | ||
|
|
af1bb175a8 | ||
|
|
96afdfb809 | ||
|
|
86b17a986f | ||
|
|
654c1a4762 | ||
|
|
e58b19c643 | ||
|
|
517f7fb6da | ||
|
|
88187232d4 | ||
|
|
7eca3bd4e0 | ||
|
|
f414d866e5 | ||
|
|
3eebd937e3 | ||
|
|
2760559529 | ||
|
|
8a6a1a4277 | ||
|
|
b773a6db26 | ||
|
|
d45ceabe19 | ||
|
|
af75971b63 | ||
|
|
df8470fe06 | ||
|
|
906356002e | ||
|
|
ca38f4a529 | ||
|
|
c923f11d36 | ||
|
|
ae293c932e | ||
|
|
aa7ed46939 | ||
|
|
bc80ed0435 | ||
|
|
b5ed79277c | ||
|
|
0e9c4e7751 | ||
|
|
f66d0af99f | ||
|
|
33b2b48d2a | ||
|
|
44c0065f0d | ||
|
|
3112a5a170 | ||
|
|
13c601b88b | ||
|
|
641bff350f | ||
|
|
3315b12146 | ||
|
|
17777e7c42 | ||
|
|
e935a67feb | ||
|
|
e4765042e9 | ||
|
|
fa24fc8716 | ||
|
|
a1fe9379ec | ||
|
|
186828f63e | ||
|
|
9c53fdb3ef |
@@ -129,10 +129,12 @@
|
||||
unset($prep_statement);
|
||||
|
||||
//rename the file
|
||||
rename($xml_dir.'/acl.conf.xml', $xml_dir.'/acl.conf');
|
||||
if (file_exists($xml_dir.'/acl.conf.xml')) {
|
||||
rename($xml_dir.'/acl.conf.xml', $xml_dir.'/acl.conf');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+34
-23
@@ -1,27 +1,38 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Adminer";
|
||||
$apps[$x]['uuid'] = "214b9f02-547b-d49d-f4e9-02987d9581c5";
|
||||
$apps[$x]['category'] = "System";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "3.2.2";
|
||||
$apps[$x]['license'] = "http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0";
|
||||
$apps[$x]['url'] = "http://www.adminer.org/";
|
||||
$apps[$x]['description']['en-us'] = "Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle.";
|
||||
$apps[$x]['description']['es-cl'] = "Adminer (anteriormente phpMinAdmin) es una herramienta completa para la gestión de bases de datos escrita en PHP. Adminer está disponible para MySQL, PostgreSQL, SQLite, MS SQL y Oracle)";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Adminer (précédemment phpMinAdmin) est un outil gestion de base de données complet écrite en php. Adminer est disponible pour MySQL, PostgreSQL, SQLite, MS SQL et Oracle.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Adminer (anteriormente phpMinAdmin) é uma ferramenta completa para gestão de bases de dados escrita em PHP. O Adminer está disponível para MySQL, PostgreSQL, SQLite, MS SQL e Oracle.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
//application details
|
||||
$apps[$x]['name'] = "Adminer";
|
||||
$apps[$x]['uuid'] = "214b9f02-547b-d49d-f4e9-02987d9581c5";
|
||||
$apps[$x]['category'] = "System";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "3.2.2";
|
||||
$apps[$x]['license'] = "http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0";
|
||||
$apps[$x]['url'] = "http://www.adminer.org/";
|
||||
$apps[$x]['description']['en-us'] = "Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle.";
|
||||
$apps[$x]['description']['es-cl'] = "Adminer (anteriormente phpMinAdmin) es una herramienta completa para la gestión de bases de datos escrita en PHP. Adminer está disponible para MySQL, PostgreSQL, SQLite, MS SQL y Oracle)";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Adminer (précédemment phpMinAdmin) est un outil gestion de base de données complet écrite en php. Adminer est disponible pour MySQL, PostgreSQL, SQLite, MS SQL et Oracle.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Adminer (anteriormente phpMinAdmin) é uma ferramenta completa para gestão de bases de dados escrita em PHP. O Adminer está disponível para MySQL, PostgreSQL, SQLite, MS SQL e Oracle.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = "adminer";
|
||||
$apps[$x]['permissions'][0]['menu']['uuid'] = "1f59d07b-b4f7-4f9e-bde9-312cf491d66e";
|
||||
$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = "adminer";
|
||||
$apps[$x]['permissions'][0]['menu']['uuid'] = "1f59d07b-b4f7-4f9e-bde9-312cf491d66e";
|
||||
$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'e34b276a-1b64-4d11-9470-ae3ea977c47e';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'adminer';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'auto_login';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set whether to auto-login to Adminer, or require a username and password.';
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
||||
@@ -27,39 +27,6 @@
|
||||
//proccess this only one time
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'adminer';
|
||||
$array[$x]['default_setting_subcategory'] = 'auto_login';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set whether to auto-login to Adminer, or require a username and password.';
|
||||
$x++;
|
||||
|
||||
//iterate and add each, if necessary
|
||||
foreach ($array as $index => $default_settings) {
|
||||
//add the default setting
|
||||
$sql = "select count(*) as num_rows from v_default_settings ";
|
||||
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
||||
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
||||
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
unset($prep_statement);
|
||||
if ($row['num_rows'] == 0) {
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($array[$index]);
|
||||
$message = $orm->message;
|
||||
//print_r($message);
|
||||
}
|
||||
unset($row);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -631,8 +631,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (permission_exists('call_center_tier_add')) {
|
||||
//get agents
|
||||
$sql = "select agent_name from v_call_center_agents where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
foreach($assigned_agents as $assigned_agent) {
|
||||
$sql .= "and agent_name <> '".$assigned_agent."' ";
|
||||
if ($assigned_agents){
|
||||
foreach($assigned_agents as $assigned_agent) {
|
||||
$sql .= "and agent_name <> '".$assigned_agent."' ";
|
||||
}
|
||||
}
|
||||
$sql .= "order by agent_name asc";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -965,4 +967,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+55
-34
@@ -1,38 +1,59 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Calls";
|
||||
$apps[$x]['uuid'] = "19806921-e8ed-dcff-b325-dd3e5da4959d";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Call Forward, Follow Me and Do Not Disturb.";
|
||||
$apps[$x]['description']['es-cl'] = "Reenvio de llamada, Sígueme y No Molestar.";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Renvoi d'appel, Follow Me et ne pas deranger.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Desvio de Chamadas, Seguir-me e Não Perturbar.";
|
||||
$apps[$x]['description']['pt-br'] = "Desvio de chamadas, Siga-me e Não perturbe (DND).";
|
||||
//application details
|
||||
$apps[$x]['name'] = "Calls";
|
||||
$apps[$x]['uuid'] = "19806921-e8ed-dcff-b325-dd3e5da4959d";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Call Forward, Follow Me and Do Not Disturb.";
|
||||
$apps[$x]['description']['es-cl'] = "Reenvio de llamada, Sígueme y No Molestar.";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Renvoi d'appel, Follow Me et ne pas deranger.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Desvio de Chamadas, Seguir-me e Não Perturbar.";
|
||||
$apps[$x]['description']['pt-br'] = "Desvio de chamadas, Siga-me e Não perturbe (DND).";
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][$y]['name'] = "follow_me";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_forward";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "do_not_disturb";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//permission details
|
||||
$apps[$x]['permissions'][$y]['name'] = "follow_me";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "call_forward";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "do_not_disturb";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '4fedc226-caca-4ebf-b4eb-31de93e5bed3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'follow_me';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'max_destinations';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_order'] = '0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the maximum number of Follow Me Destinations.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'ce105d64-2d1b-4d19-ae34-ccb818cc9c6e';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'follow_me';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'timeout';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '30';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_order'] = '0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default Follow Me Timeout value.';
|
||||
$y++;
|
||||
|
||||
?>
|
||||
|
||||
@@ -43,6 +43,7 @@ include "root.php";
|
||||
public $outbound_caller_id_name;
|
||||
public $outbound_caller_id_number;
|
||||
private $extension;
|
||||
private $number_alias;
|
||||
private $toll_allow;
|
||||
|
||||
public $destination_data_1;
|
||||
@@ -248,6 +249,7 @@ include "root.php";
|
||||
$this->extension = $row["extension"];
|
||||
$this->accountcode = $row["accountcode"];
|
||||
$this->toll_allow = $row["toll_allow"];
|
||||
$this->number_alias = $row["number_alias"];
|
||||
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
|
||||
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
|
||||
}
|
||||
@@ -266,150 +268,171 @@ include "root.php";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//add follow me
|
||||
if (strlen($follow_me_uuid) == 0) {
|
||||
$this->add();
|
||||
//set the extension dial string
|
||||
$sql = "select * from v_follow_me_destinations ";
|
||||
$sql .= "where follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||
$sql .= "order by follow_me_order asc ";
|
||||
$prep_statement_2 = $db->prepare(check_sql($sql));
|
||||
$prep_statement_2->execute();
|
||||
$result = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
|
||||
$dial_string = "{";
|
||||
if ($this->follow_me_ignore_busy != 'true') {
|
||||
$dial_string .= "fail_on_single_reject=USER_BUSY,";
|
||||
}
|
||||
$dial_string .= "instant_ringback=true,";
|
||||
$dial_string .= "ignore_early_media=true";
|
||||
$dial_string .= ",domain_uuid=".$_SESSION['domain_uuid'];
|
||||
$dial_string .= ",sip_invite_domain=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",domain_name=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",domain=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",extension_uuid=".$this->extension_uuid;
|
||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua";
|
||||
|
||||
$dial_string_caller_id_name = "\${effective_caller_id_name}";
|
||||
$dial_string_caller_id_number = "\${effective_caller_id_number}";
|
||||
|
||||
if (strlen($this->follow_me_caller_id_uuid) > 0){
|
||||
$sql_caller = "select destination_number, destination_description, destination_caller_id_number, destination_caller_id_name from v_destinations where domain_uuid = '$this->domain_uuid' and destination_type = 'inbound' and destination_uuid = '$this->follow_me_caller_id_uuid'";
|
||||
$prep_statement_caller = $db->prepare($sql_caller);
|
||||
if ($prep_statement_caller) {
|
||||
$prep_statement_caller->execute();
|
||||
$row_caller = $prep_statement_caller->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$caller_id_number = $row_caller['destination_caller_id_number'];
|
||||
if(strlen($caller_id_number) == 0){
|
||||
$caller_id_number = $row_caller['destination_number'];
|
||||
}
|
||||
$caller_id_name = $row_caller['destination_caller_id_name'];
|
||||
if(strlen($caller_id_name) == 0){
|
||||
$caller_id_name = $row_caller['destination_description'];
|
||||
}
|
||||
|
||||
if (strlen($caller_id_name) > 0) {
|
||||
$dial_string_caller_id_name = $caller_id_name;
|
||||
}
|
||||
if (strlen($caller_id_number) > 0) {
|
||||
$dial_string_caller_id_number = $caller_id_number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set the extension dial string
|
||||
$sql = "select * from v_follow_me_destinations ";
|
||||
$sql .= "where follow_me_uuid = '".$this->follow_me_uuid."' ";
|
||||
$sql .= "order by follow_me_order asc ";
|
||||
$prep_statement_2 = $db->prepare(check_sql($sql));
|
||||
$prep_statement_2->execute();
|
||||
$result = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
|
||||
$dial_string = "{";
|
||||
if ($this->follow_me_ignore_busy != 'true') {
|
||||
$dial_string .= "fail_on_single_reject=USER_BUSY,";
|
||||
}
|
||||
$dial_string .= "instant_ringback=true,";
|
||||
$dial_string .= "ignore_early_media=true";
|
||||
$dial_string .= ",domain_uuid=".$_SESSION['domain_uuid'];
|
||||
$dial_string .= ",sip_invite_domain=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",domain_name=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",domain=".$_SESSION['domain_name'];
|
||||
$dial_string .= ",extension_uuid=".$this->extension_uuid;
|
||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua";
|
||||
if (strlen($this->cid_name_prefix) > 0) {
|
||||
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."$dial_string_caller_id_name";
|
||||
}
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_name=$dial_string_caller_id_name";
|
||||
}
|
||||
|
||||
$dial_string_caller_id_name = "\${effective_caller_id_name}";
|
||||
$dial_string_caller_id_number = "\${effective_caller_id_number}";
|
||||
if (strlen($this->cid_number_prefix) > 0) {
|
||||
//$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."";
|
||||
$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."$dial_string_caller_id_number";
|
||||
}
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_number=$dial_string_caller_id_number";
|
||||
}
|
||||
|
||||
if (strlen($this->follow_me_caller_id_uuid) > 0){
|
||||
$sql_caller = "select destination_number, destination_description, destination_caller_id_number, destination_caller_id_name from v_destinations where domain_uuid = '$this->domain_uuid' and destination_type = 'inbound' and destination_uuid = '$this->follow_me_caller_id_uuid'";
|
||||
$prep_statement_caller = $db->prepare($sql_caller);
|
||||
if ($prep_statement_caller) {
|
||||
$prep_statement_caller->execute();
|
||||
$row_caller = $prep_statement_caller->fetch(PDO::FETCH_ASSOC);
|
||||
if (strlen($this->accountcode) == 0) {
|
||||
$dial_string .= ",sip_h_X-accountcode=\${accountcode}";
|
||||
}
|
||||
else {
|
||||
$dial_string .= ",sip_h_X-accountcode=".$this->accountcode;
|
||||
$dial_string .= ",accountcode=".$this->accountcode;
|
||||
}
|
||||
|
||||
$caller_id_number = $row_caller['destination_caller_id_number'];
|
||||
if(strlen($caller_id_number) == 0){
|
||||
$caller_id_number = $row_caller['destination_number'];
|
||||
}
|
||||
$caller_id_name = $row_caller['destination_caller_id_name'];
|
||||
if(strlen($caller_id_name) == 0){
|
||||
$caller_id_name = $row_caller['destination_description'];
|
||||
}
|
||||
|
||||
if (strlen($caller_id_name) > 0) {
|
||||
$dial_string_caller_id_name = $caller_id_name;
|
||||
}
|
||||
if (strlen($caller_id_number) > 0) {
|
||||
$dial_string_caller_id_number = $caller_id_number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($this->cid_name_prefix) > 0) {
|
||||
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."$dial_string_caller_id_name";
|
||||
}
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_name=$dial_string_caller_id_name";
|
||||
}
|
||||
|
||||
if (strlen($this->cid_number_prefix) > 0) {
|
||||
//$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."";
|
||||
$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."$dial_string_caller_id_number";
|
||||
}
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_number=$dial_string_caller_id_number";
|
||||
}
|
||||
|
||||
if (strlen($this->accountcode) > 0) {
|
||||
$dial_string .= ",sip_h_X-accountcode=".$this->accountcode;
|
||||
$dial_string .= ",accountcode=".$this->accountcode;
|
||||
}
|
||||
if ($this->toll_allow != '') {
|
||||
$dial_string .= ",toll_allow='".$this->toll_allow."'";
|
||||
$dial_string .= "}";
|
||||
$x = 0;
|
||||
if (is_array($result)) foreach ($result as &$row) {
|
||||
if ($x > 0) {
|
||||
$dial_string .= ",";
|
||||
}
|
||||
|
||||
$dial_string .= "}";
|
||||
$x = 0;
|
||||
if (is_array($result)) foreach ($result as &$row) {
|
||||
if ($x > 0) {
|
||||
$dial_string .= ",";
|
||||
}
|
||||
if (($presence_id = extension_presence_id($row["follow_me_destination"])) !== false) {
|
||||
//set the dial string
|
||||
// using here `sofia_contact` instead of `user/` allows add registered device
|
||||
// so you can make follow me for extension `100` like `100` and avoid recusion
|
||||
// but it ignores DND/CallForwad settings
|
||||
if (strlen($_SESSION['domain']['dial_string']['text']) == 0) {
|
||||
$dial_string .= "[";
|
||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number,";
|
||||
$dial_string .= "presence_id=".$presence_id."@".$_SESSION['domain_name'].',';
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||
}
|
||||
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
||||
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")}";
|
||||
}
|
||||
if (extension_exists($row["follow_me_destination"])) {
|
||||
//set the dial string
|
||||
if (strlen($_SESSION['domain']['dial_string']['text']) == 0) {
|
||||
$dial_string .= "[";
|
||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number,";
|
||||
$dial_string .= "presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||
}
|
||||
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
||||
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")}";
|
||||
else {
|
||||
//get the session dial string
|
||||
$dial_string_template = $_SESSION['domain']['dial_string']['text'];
|
||||
|
||||
//replace the variables with the values
|
||||
$dial_string_template = str_replace("sip_invite_domain=\${domain_name},", "", $dial_string_template);
|
||||
$dial_string_template = str_replace("presence_id=\${dialed_user}@\${dialed_domain}", "", $dial_string_template);
|
||||
$dial_string_template = str_replace("\${dialed_user}", $row["follow_me_destination"], $dial_string_template);
|
||||
$dial_string_template = str_replace("\${dialed_domain}", $_SESSION['domain_name'], $dial_string_template);
|
||||
$dial_string_template = str_replace("\${call_timeout}", $row["follow_me_timeout"], $dial_string_template);
|
||||
$dial_string_template = str_replace("\${leg_timeout}", $row["follow_me_timeout"], $dial_string_template);
|
||||
|
||||
//seperate the variables from the bridge statement
|
||||
preg_match_all('/{((?:[^{}]|(?R))*)}/', $dial_string_template, $matches, PREG_PATTERN_ORDER);
|
||||
$dial_string_variables = $matches[1][0];
|
||||
$dial_string_bridge = $matches[1][1];
|
||||
|
||||
//add to the dial string
|
||||
$dial_string .= "[";
|
||||
$dial_string .= $dial_string_variables;
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true";
|
||||
}
|
||||
$dial_string .= "]";
|
||||
$dial_string .= $dial_string_bridge;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$presence_id = extension_presence_id($this->extension, $this->number_alias);
|
||||
$dial_string .= "[";
|
||||
if ($_SESSION['cdr']['follow_me_fix']['boolean'] == "true"){
|
||||
$dial_string .= "outbound_caller_id_name=".$this->outbound_caller_id_name;
|
||||
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
|
||||
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
|
||||
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
|
||||
}
|
||||
else{
|
||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number";
|
||||
}
|
||||
$dial_string .= ",presence_id=".$presence_id."@".$_SESSION['domain_name'];
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||
}
|
||||
$dial_string .= ",leg_delay_start=".$row["follow_me_delay"];
|
||||
$dial_string .= ",leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
if (is_numeric($row["follow_me_destination"])) {
|
||||
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
|
||||
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
||||
$dial_string .= $bridge[0];
|
||||
}
|
||||
elseif ($_SESSION['domain']['bridge']['text'] == "loopback") {
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||
}
|
||||
elseif ($_SESSION['domain']['bridge']['text'] == "lcr") {
|
||||
$dial_string .= "lcr/".$_SESSION['lcr']['profile']['text']."/".$_SESSION['domain_name']."/".$row["follow_me_destination"];
|
||||
}
|
||||
else {
|
||||
$replace_value = $row["follow_me_destination"];
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$replace_value .= "[group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true]";
|
||||
}
|
||||
$local_dial_string = $_SESSION['domain']['dial_string']['text'];
|
||||
$local_dial_string = str_replace("\${dialed_user}", $replace_value, $local_dial_string);
|
||||
$local_dial_string = str_replace("\${dialed_domain}", $_SESSION['domain_name'], $local_dial_string);
|
||||
$local_dial_string = str_replace("\${call_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
||||
$local_dial_string = str_replace("\${leg_timeout}", $row["follow_me_timeout"], $local_dial_string);
|
||||
$dial_string .= $local_dial_string;
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$dial_string .= "[";
|
||||
if ($_SESSION['cdr']['follow_me_fix']['boolean'] == "true"){
|
||||
$dial_string .= "outbound_caller_id_name=".$this->outbound_caller_id_name;
|
||||
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
|
||||
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
|
||||
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
|
||||
}
|
||||
else{
|
||||
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number";
|
||||
}
|
||||
$dial_string .= ",presence_id=".$this->extension."@".$_SESSION['domain_name'];
|
||||
if ($row["follow_me_prompt"] == "1") {
|
||||
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
|
||||
}
|
||||
$dial_string .= ",leg_delay_start=".$row["follow_me_delay"];
|
||||
$dial_string .= ",leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
if (is_numeric($row["follow_me_destination"])) {
|
||||
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
|
||||
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
||||
$dial_string .= $bridge[0];
|
||||
}
|
||||
elseif ($_SESSION['domain']['bridge']['text'] == "loopback") {
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||
}
|
||||
elseif ($_SESSION['domain']['bridge']['text'] == "lcr") {
|
||||
$dial_string .= "lcr/".$_SESSION['lcr']['profile']['text']."/".$_SESSION['domain_name']."/".$row["follow_me_destination"];
|
||||
}
|
||||
else {
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"]."/".$_SESSION['domain_name'];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$dial_string .= $row["follow_me_destination"];
|
||||
}
|
||||
$dial_string .= $row["follow_me_destination"];
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$this->dial_string = $dial_string;
|
||||
$x++;
|
||||
}
|
||||
$dial_string = str_replace(",]", "]", $dial_string);
|
||||
$this->dial_string = $dial_string;
|
||||
|
||||
$sql = "update v_follow_me set ";
|
||||
$sql .= "dial_string = '".$this->dial_string."' ";
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
}
|
||||
elseif (file_exists($xml_file_alt)) {
|
||||
$xml_string = file_get_contents(xml_file_alt);
|
||||
$xml_string = file_get_contents($xml_file_alt);
|
||||
}
|
||||
$xml_object = simplexml_load_string($xml_string);
|
||||
$json = json_encode($xml_object);
|
||||
@@ -128,4 +128,4 @@
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
}
|
||||
elseif (file_exists($xml_file_alt)) {
|
||||
$xml_string = file_get_contents(xml_file_alt);
|
||||
$xml_string = file_get_contents($xml_file_alt);
|
||||
}
|
||||
$xml_object = simplexml_load_string($xml_string);
|
||||
$json = json_encode($xml_object);
|
||||
|
||||
@@ -198,8 +198,8 @@
|
||||
$sql .= "where device_vendor_function_uuid = '$device_vendor_function_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$device_vendor_functions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($device_vendor_functions as &$row) {
|
||||
//$label = $row["label"];
|
||||
$name = $row["name"];
|
||||
$value = $row["value"];
|
||||
@@ -217,15 +217,13 @@
|
||||
$sql .= " v_groups as g ";
|
||||
$sql .= "where ";
|
||||
$sql .= " fg.group_uuid = g.group_uuid ";
|
||||
//$sql .= " and fg.device_vendor_uuid = :device_vendor_uuid ";
|
||||
$sql .= " and fg.device_vendor_uuid = '$device_vendor_uuid' ";
|
||||
//$sql .= " and fg.device_vendor_function_uuid = :device_vendor_function_uuid ";
|
||||
$sql .= " and fg.device_vendor_function_uuid = '$device_vendor_function_uuid' ";
|
||||
$sql .= " and fg.device_vendor_uuid = :device_vendor_uuid ";
|
||||
//$sql .= " and fg.device_vendor_uuid = '$device_vendor_uuid' ";
|
||||
$sql .= " and fg.device_vendor_function_uuid = :device_vendor_function_uuid ";
|
||||
//$sql .= " and fg.device_vendor_function_uuid = '$device_vendor_function_uuid' ";
|
||||
$sql .= "order by ";
|
||||
$sql .= " g.domain_uuid desc, ";
|
||||
$sql .= " g.group_name asc ";
|
||||
//echo $sql;
|
||||
//exit;
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->bindParam(':device_vendor_uuid', $device_vendor_uuid);
|
||||
$prep_statement->bindParam(':device_vendor_function_uuid', $device_vendor_function_uuid);
|
||||
@@ -234,9 +232,11 @@
|
||||
unset($sql, $prep_statement);
|
||||
|
||||
//set the assigned_groups array
|
||||
foreach($menu_item_groups as $field) {
|
||||
if (strlen($field['group_name']) > 0) {
|
||||
$assigned_groups[] = $field['group_uuid'];
|
||||
if (is_array($menu_item_groups)) {
|
||||
foreach($menu_item_groups as $field) {
|
||||
if (strlen($field['group_name']) > 0) {
|
||||
$assigned_groups[] = $field['group_uuid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
<?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) 2016-2017
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
@@ -121,10 +145,10 @@
|
||||
$sql .= " v_groups as g ";
|
||||
$sql .= "where ";
|
||||
$sql .= " fg.group_uuid = g.group_uuid ";
|
||||
//$sql .= " and fg.device_vendor_uuid = :device_vendor_uuid ";
|
||||
$sql .= " and fg.device_vendor_uuid = '$device_vendor_uuid' ";
|
||||
//$sql .= " and fg.device_vendor_function_uuid = :device_vendor_function_uuid ";
|
||||
$sql .= " and fg.device_vendor_function_uuid = '".$row['device_vendor_function_uuid']."' ";
|
||||
$sql .= " and fg.device_vendor_uuid = :device_vendor_uuid ";
|
||||
//$sql .= " and fg.device_vendor_uuid = '$device_vendor_uuid' ";
|
||||
$sql .= " and fg.device_vendor_function_uuid = :device_vendor_function_uuid ";
|
||||
//$sql .= " and fg.device_vendor_function_uuid = '".$row['device_vendor_function_uuid']."' ";
|
||||
$sql .= "order by ";
|
||||
$sql .= " g.domain_uuid desc, ";
|
||||
$sql .= " g.group_name asc ";
|
||||
|
||||
@@ -68,6 +68,16 @@
|
||||
$dialplan_context = check_str($_REQUEST["dialplan_context"]);
|
||||
$app_uuid = check_str($_REQUEST["app_uuid"]);
|
||||
|
||||
//make sure all dialplans with context of public have the inbound route app_uuid
|
||||
if ($app_uuid == 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4') {
|
||||
$sql = "update v_dialplans set ";
|
||||
$sql .= "app_uuid = 'c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4' ";
|
||||
$sql .= "where dialplan_context = 'public' ";
|
||||
$sql .= "and app_uuid is null; ";
|
||||
$db->exec($sql);
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//includes
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<context name="{v_context}">
|
||||
<extension name="extension-to-voicemail" number="[ext]" continue="false" app_uuid="8a2e7b81-996c-4d6b-87df-b879b972a572">
|
||||
<condition field="${user_exists}" expression="^true$" />
|
||||
<condition field="username" expression="^${caller_id_number}$" />
|
||||
<condition field="destination_number" expression="^${caller_id_number}$">
|
||||
<action application="answer"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<action application="set" data="park_lot=$2" inline="true"/>
|
||||
</condition>
|
||||
<condition field="destination_number" expression="^(park\+)?(\*59[0-9][0-9])$"/>
|
||||
<condition field="${cond ${sip_h_Referred-By} == 0 ? false : true}" expression="true" break="never">
|
||||
<condition field="${cond ${sip_h_Referred-By} == '' ? false : true}" expression="true" break="never">
|
||||
<action application="set" data="park_in_use=${regex ${valet_info park@${domain_name}}|${park_lot}}" inline="true"/>
|
||||
</condition>
|
||||
<condition field="${park_in_use}" expression="true" break="never">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -26,17 +26,21 @@
|
||||
|
||||
//make sure that enum uses sofia internal in the enum.conf.xml file
|
||||
if ($domains_processed == 1) {
|
||||
$switch_conf_dir = $_SESSION['switch']['conf']['dir'];
|
||||
$file_contents = file_get_contents($switch_conf_dir."/autoload_configs/enum.conf.xml");
|
||||
$file_contents_new = str_replace("service=\"E2U+SIP\" regex=\"sip:(.*)\" replace=\"sofia/\${use_profile}/\$1", "service=\"E2U+SIP\" regex=\"sip:(.*)\" replace=\"sofia/internal/\$1", $file_contents);
|
||||
if ($file_contents != $file_contents_new) {
|
||||
$fout = fopen($switch_conf_dir."/autoload_configs/enum.conf.xml","w");
|
||||
fwrite($fout, $file_contents_new);
|
||||
fclose($fout);
|
||||
if ($display_type == "text") {
|
||||
echo " enum.conf.xml: updated\n";
|
||||
if (is_array($_SESSION['switch']['conf'])) {
|
||||
$switch_conf_dir = $_SESSION['switch']['conf']['dir'];
|
||||
if (file_exists($switch_conf_dir."/autoload_configs/enum.conf.xml")) {
|
||||
$file_contents = file_get_contents($switch_conf_dir."/autoload_configs/enum.conf.xml");
|
||||
$file_contents_new = str_replace("service=\"E2U+SIP\" regex=\"sip:(.*)\" replace=\"sofia/\${use_profile}/\$1", "service=\"E2U+SIP\" regex=\"sip:(.*)\" replace=\"sofia/internal/\$1", $file_contents);
|
||||
if ($file_contents != $file_contents_new) {
|
||||
$fout = fopen($switch_conf_dir."/autoload_configs/enum.conf.xml","w");
|
||||
fwrite($fout, $file_contents_new);
|
||||
fclose($fout);
|
||||
if ($display_type == "text") {
|
||||
echo " enum.conf.xml: updated\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+155
-104
@@ -1,109 +1,160 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Edit";
|
||||
$apps[$x]['uuid'] = "17e628ee-ccfa-49c0-29ca-9894a0384b9b";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Script Editor can be used to edit lua, javascript or other scripts.";
|
||||
$apps[$x]['description']['es-cl'] = "Editor de scripts. Puede ser utilizado para editar archivos lua, javascript, etc.";
|
||||
$apps[$x]['description']['es-mx'] = "";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "L'éditeur permet de modifier les scripts lua, javascript ou autres.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Editor de script pode ser usado para editar lua, javascript ou outros scripts.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
//application details
|
||||
$apps[$x]['name'] = "Edit";
|
||||
$apps[$x]['uuid'] = "17e628ee-ccfa-49c0-29ca-9894a0384b9b";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Script Editor can be used to edit lua, javascript or other scripts.";
|
||||
$apps[$x]['description']['es-cl'] = "Editor de scripts. Puede ser utilizado para editar archivos lua, javascript, etc.";
|
||||
$apps[$x]['description']['es-mx'] = "";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "L'éditeur permet de modifier les scripts lua, javascript ou autres.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Editor de script pode ser usado para editar lua, javascript ou outros scripts.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "script_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "f1905fec-0577-daef-6045-59d09b7d3f94";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "script_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "provision_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "57773542-a565-1a29-605d-6535da1a0870";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "provision_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "16013877-606a-2a05-7d6a-c1b215839131";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "php_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "eae1f2d6-789b-807c-cc26-44501e848693";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "php_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "grammar_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "grammar_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "script_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "f1905fec-0577-daef-6045-59d09b7d3f94";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "script_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "provision_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "57773542-a565-1a29-605d-6535da1a0870";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "provision_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "16013877-606a-2a05-7d6a-c1b215839131";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "php_editor_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "eae1f2d6-789b-807c-cc26-44501e848693";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "php_editor_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "grammar_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "c3db739e-89f9-0fa2-44ce-0f4c2ff43b1a";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "grammar_save";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "clip_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_clips";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_folder";
|
||||
$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'] = "clip_text_start";
|
||||
$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'] = "clip_text_end";
|
||||
$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'] = "clip_order";
|
||||
$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'] = "clip_desc";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '2e217303-53ff-4dda-b74e-7f07738d83c2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'font_size';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '14px';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default text size for Editor.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8701cdca-64a1-4ff4-85a1-a09b1389ce92';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'indent_guides';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default visibility of indent guides for Editor.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '5669f8cf-f0a0-4d9c-ad75-caf239e9f5cd';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'invisibles';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default state of invisible characters for Editor.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '7122cb30-d557-4001-af94-d8d21f964a63';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'line_numbers';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default visibility of line numbers for Editor.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '62cfc1ac-6566-45ba-8c7d-f4234ab1b31e';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'live_previews';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable or disable live previewing of syntax, text size and theme changes.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '7b403afd-e4d6-4e96-8c8f-2cf5d6187191';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'editor';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'theme';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'Cobalt';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default theme.';
|
||||
$y++;
|
||||
|
||||
?>
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_clips";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "clip_folder";
|
||||
$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'] = "clip_text_start";
|
||||
$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'] = "clip_text_end";
|
||||
$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'] = "clip_order";
|
||||
$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'] = "clip_desc";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
<?php
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of editor settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'font_size';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '14px';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the default text size for Editor.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'indent_guides';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'false';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the default visibility of indent guides for Editor.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'invisibles';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'false';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the default state of invisible characters for Editor.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'line_numbers';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'false';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the default visibility of line numbers for Editor.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'live_previews';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'false';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Enable or disable live previewing of syntax, text size and theme changes.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'editor';
|
||||
$array[$x]['default_setting_subcategory'] = 'theme';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'Cobalt';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the default theme.';
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_category = 'editor' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//find the missing default settings
|
||||
$x = 0;
|
||||
foreach ($array as $setting) {
|
||||
$found = false;
|
||||
$missing[$x] = $setting;
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||
$found = true;
|
||||
//remove items from the array that were found
|
||||
unset($missing[$x]);
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) foreach ($missing as $row) {
|
||||
//add the default settings
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($row);
|
||||
$message = $orm->message;
|
||||
unset($orm);
|
||||
//print_r($message);
|
||||
}
|
||||
unset($missing);
|
||||
|
||||
//unset the array variable
|
||||
unset($array);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
+45
-31
@@ -1,39 +1,53 @@
|
||||
<?php
|
||||
if (PHP_SAPI === 'cli') {
|
||||
$argument1 = $argv[1];
|
||||
} else {
|
||||
die();
|
||||
}
|
||||
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
$sql = "select email from v_emails";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
$msg = $row['email'];
|
||||
|
||||
require_once "secure/v_mailto.php";
|
||||
if ($mailer_error == '') {
|
||||
$_SESSION["message"] = $text['message-message_resent'];
|
||||
if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') {
|
||||
header("Location: email_delete.php?id=".$email_uuid."&showall=true");
|
||||
} else {
|
||||
header("Location: email_delete.php?id=".$email_uuid);
|
||||
}
|
||||
}
|
||||
|
||||
//restrict to command line only
|
||||
if(defined('STDIN')) {
|
||||
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
|
||||
preg_match("/^(.*)\/app\/.*$/", $document_root, $matches);
|
||||
$document_root = $matches[1];
|
||||
set_include_path($document_root);
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/classes/text.php";
|
||||
$_SERVER["DOCUMENT_ROOT"] = $document_root;
|
||||
$format = 'text'; //html, text
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
}
|
||||
else {
|
||||
die('access denied');
|
||||
}
|
||||
}
|
||||
unset ($prep_statement, $sql, $result, $result_count);
|
||||
|
||||
//get the failed emails
|
||||
$sql = "select email_uuid, email from v_emails";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$emails = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
//process the emails
|
||||
if (is_array($emails)) {
|
||||
foreach($emails as $row) {
|
||||
$email_uuid = $row['email_uuid'];
|
||||
$msg = $row['email'];
|
||||
|
||||
require_once "secure/v_mailto.php";
|
||||
if ($mailer_error == '') {
|
||||
//get the message
|
||||
$_SESSION["message"] = $text['message-message_resent'];
|
||||
|
||||
exit;
|
||||
//delete the email
|
||||
$sql = "delete from v_emails ";
|
||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
}
|
||||
unset($mailer_error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset ($prep_statement, $sql, $emails);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,22 +17,26 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('exec_sql')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('exec_sql')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -120,8 +124,7 @@ if (count($_POST)>0) {
|
||||
if ($table_name != '') { $sql_array[] = "select * from ".$table_name; }
|
||||
$show_query = (sizeof($sql_array) > 1) ? true : false;
|
||||
|
||||
reset($sql_array);
|
||||
foreach($sql_array as $sql_index => $sql) {
|
||||
if (is_array($sql_array)) foreach($sql_array as $sql_index => $sql) {
|
||||
$sql = trim($sql);
|
||||
|
||||
if (sizeof($sql_array) > 1 || $show_query) {
|
||||
@@ -147,20 +150,25 @@ if (count($_POST)>0) {
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
$x = 0;
|
||||
foreach ($result[0] as $key => $value) {
|
||||
echo "<th>".$key."</th>";
|
||||
$column_array[$x++] = $key;
|
||||
}
|
||||
|
||||
$x = 1;
|
||||
foreach ($result as &$row) {
|
||||
if ($x++ > 1000) { break; }
|
||||
echo "<tr>\n";
|
||||
foreach ($column_array as $column_index => $column) {
|
||||
echo "<td class='".$row_style[$c]."' ".(($column_index == 0) ? "style='border-left: none;'" : null).">".$row[$column]." </td>";
|
||||
if (is_array($result[0])) {
|
||||
foreach ($result[0] as $key => $value) {
|
||||
echo "<th>".$key."</th>";
|
||||
$column_array[$x++] = $key;
|
||||
}
|
||||
}
|
||||
$x = 1;
|
||||
if (is_array($result)) {
|
||||
foreach ($result as &$row) {
|
||||
if ($x++ > 1000) { break; }
|
||||
echo "<tr>\n";
|
||||
if (is_array($column_array)) {
|
||||
foreach ($column_array as $column_index => $column) {
|
||||
echo "<td class='".$row_style[$c]."' ".(($column_index == 0) ? "style='border-left: none;'" : null).">".$row[$column]." </td>";
|
||||
}
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$c = ($c == 0) ? 1 : 0;
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$c = ($c == 0) ? 1 : 0;
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "<br>\n";
|
||||
@@ -193,31 +201,36 @@ if (count($_POST)>0) {
|
||||
}
|
||||
|
||||
$x = 0;
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$column_array[$x++] = $key;
|
||||
if (is_array($result[0])) {
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$column_array[$x++] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
$column_array_count = count($column_array);
|
||||
|
||||
foreach ($result as &$row) {
|
||||
if (is_array($result)) foreach ($result as &$row) {
|
||||
echo "insert into ".$table_name." (";
|
||||
$x = 1;
|
||||
foreach ($column_array as $column) {
|
||||
if ($column != "menuid" && $column != "menuparentid") {
|
||||
$columns[] = $column;
|
||||
if (is_array($column_array)) {
|
||||
foreach ($column_array as $column) {
|
||||
if ($column != "menuid" && $column != "menuparentid") {
|
||||
$columns[] = $column;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
if (is_array($columns) && sizeof($columns) > 0) {
|
||||
echo implode(', ', $columns);
|
||||
}
|
||||
echo ") values (";
|
||||
$x = 1;
|
||||
foreach ($column_array as $column) {
|
||||
if ($column != "menuid" && $column != "menuparentid") {
|
||||
$values[] = ($row[$column] != '') ? "'".check_str($row[$column])."'" : 'null';
|
||||
if (is_array($column_array)) {
|
||||
foreach ($column_array as $column) {
|
||||
if ($column != "menuid" && $column != "menuparentid") {
|
||||
$values[] = ($row[$column] != '') ? "'".check_str($row[$column])."'" : 'null';
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
if (is_array($values) && sizeof($values) > 0) {
|
||||
echo implode(', ', $values);
|
||||
@@ -253,18 +266,22 @@ if (count($_POST)>0) {
|
||||
}
|
||||
|
||||
$x = 0;
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$column_array[$x++] = $key;
|
||||
if (is_array($result[0])) {
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$column_array[$x++] = $key;
|
||||
}
|
||||
}
|
||||
//column names
|
||||
echo '"'.implode('","', $column_array).'"'."\r\n";
|
||||
//column values
|
||||
foreach ($result as &$row) {
|
||||
$x = 1;
|
||||
foreach ($column_array as $column) {
|
||||
echo '"'.check_str($row[$column]).'"'.(($x++ < count($column_array)) ? ',' : null);
|
||||
if (is_array($result)) {
|
||||
foreach ($result as &$row) {
|
||||
$x = 1;
|
||||
foreach ($column_array as $column) {
|
||||
echo '"'.check_str($row[$column]).'"'.(($x++ < count($column_array)) ? ',' : null);
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,15 +334,13 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
|
||||
//set the default user context
|
||||
if (permission_exists("extension_user_context")) {
|
||||
//allow a user assigned to super admin to change the user_context
|
||||
}
|
||||
else {
|
||||
//if the user_context was not set then set the default value
|
||||
if (strlen($user_context) == 0) {
|
||||
$user_context = $_SESSION['domain_name'];
|
||||
}
|
||||
}
|
||||
if (permission_exists("extension_user_context")) {
|
||||
//allow a user assigned to super admin to change the user_context
|
||||
}
|
||||
else {
|
||||
//if the user_context was not set then set the default value
|
||||
$user_context = $_SESSION['domain_name'];
|
||||
}
|
||||
|
||||
//prevent users from bypassing extension limit by using range
|
||||
if ($_SESSION['limit']['extensions']['numeric'] != '') {
|
||||
@@ -1808,8 +1806,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "<td width=\"70%\" class='vtable' align='left'>\n";
|
||||
require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php";
|
||||
$options = '';
|
||||
$moh = new switch_music_on_hold;
|
||||
echo $moh->select('hold_music', $hold_music);
|
||||
echo $moh->select('hold_music', $hold_music, $options);
|
||||
echo " <br />\n";
|
||||
echo $text['description-hold_music']."\n";
|
||||
echo "</td>\n";
|
||||
|
||||
+164
-1
@@ -154,6 +154,169 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = 'fax_active_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '6840bdb0-eb9d-45bd-a79a-ccb64d08fd97';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '.pdf';
|
||||
$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'] = '7031d8ec-4610-4696-b5b4-9b5f89f2bff1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '.tif';
|
||||
$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'] = 'c3c4487d-62f1-48d1-9fda-048fca830fb9';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '.tiff';
|
||||
$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'] = 'cec88775-8aaf-4667-a04d-414b3274e545';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'cover_logo';
|
||||
$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'] = 'Path to image/logo file displayed in the header of the cover sheet.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '6aba55ae-ced9-4853-81d0-33667be763e5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'cover_font';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'times';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Font used to generate cover page. Can be full path to .ttf file or font name alredy installed.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '549f8854-2377-448f-892c-58a85ac83a56';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'cover_footer';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Notice displayed in the footer of the cover sheet.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'e907df99-6b3a-4864-bd11-681888f20289';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'cover_header';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Default information displayed beneath the logo in the header of the cover sheet.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8338a404-3966-416e-b4f9-a1ac36c37bd1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'page_size';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'letter';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default page size of new faxes.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '9fd6cb5f-5824-4cbb-89b2-53066649272e';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'resolution';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'normal';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default transmission quality of new faxes.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '63e55b19-8bf2-4aaa-b7df-a514c62ecfcc';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'variable';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'fax_enable_t38=true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable T.38';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '0f07d24a-296a-4798-8478-e6ef1a59f54f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'variable';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'fax_enable_t38_request=false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Send a T38 reinvite when a fax tone is detected.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '7681e5d8-1462-420b-9276-acf4b2156982';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'variable';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'ignore_early_media=true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Ignore ringing to improve fax success rate.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '80eee263-a22c-4ec9-9df1-397908a274f6';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'keep_local';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Keep the file after sending or receiving the fax.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '63d2cb3c-708a-43c2-b233-a3f4e3367224';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_mode';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'queue';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd2977fe1-ee7e-4403-b44f-8d86aeb5f310';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_retry_limit';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Number of attempts to send fax (count only calls with answer)';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '6ca1712b-5a53-4c54-ba53-b2046c89280d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_retry_interval';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '15';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Delay before we make next call after answered call';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '2c5640d0-493f-4426-b76d-04e378c86d76';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_no_answer_retry_limit';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Number of unanswered attempts in sequence';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '03820df1-f242-4358-950f-ede87f502e9a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_no_answer_retry_interval';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '30';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Delay before we make next call after no answered call';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '9ed2e73c-6b82-4a79-83db-b7588f78c675';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_no_answer_limit';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Giveup reach the destination after this number of sequences';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c97457b7-da9a-44a6-a4a4-442dbf5fa4fa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'fax';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'send_no_answer_interval';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '300';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Delay before next call sequence';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
@@ -591,4 +754,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
|
||||
$z++;
|
||||
?>
|
||||
?>
|
||||
|
||||
+1
-170
@@ -2,175 +2,6 @@
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = '.pdf';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = '.tif';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'allowed_extension';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = '.tiff';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'cover_logo';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Path to image/logo file displayed in the header of the cover sheet.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'cover_font';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'times';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Font used to generate cover page. Can be full path to .ttf file or font name alredy installed.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'cover_footer';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Notice displayed in the footer of the cover sheet.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'cover_header';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Default information displayed beneath the logo in the header of the cover sheet.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'page_size';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'letter';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the default page size of new faxes.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'resolution';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'normal';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the default transmission quality of new faxes.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'variable';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'fax_enable_t38=true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable T.38';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'variable';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'fax_enable_t38_request=false';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Send a T38 reinvite when a fax tone is detected.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Keep the file after sending or receiving the fax.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_mode';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'queue';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_retry_limit';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '5';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Number of attempts to send fax (count only calls with answer)';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_retry_interval';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '15';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Delay before we make next call after answered call';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_limit';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '3';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Number of unanswered attempts in sequence';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_retry_interval';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '30';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Delay before we make next call after no answered call';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_limit';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '3';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Giveup reach the destination after this number of sequences';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'fax';
|
||||
$array[$x]['default_setting_subcategory'] = 'send_no_answer_interval';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '300';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Delay before next call sequence';
|
||||
$x++;
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings where default_setting_category = 'fax'";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//find the missing default settings
|
||||
$x = 0;
|
||||
foreach ($array as $setting) {
|
||||
$found = false;
|
||||
$missing[$x] = $setting;
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||
$found = true;
|
||||
//remove items from the array that were found
|
||||
unset($missing[$x]);
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) foreach ($missing as $row) {
|
||||
//add the default settings
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($row);
|
||||
$message = $orm->message;
|
||||
unset($orm);
|
||||
}
|
||||
unset($missing);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -359,7 +359,9 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
|
||||
//convert uploaded file to pdf, if necessary
|
||||
if ($fax_file_extension != "pdf" && $fax_file_extension != "tif") {
|
||||
chdir($dir_fax_temp);
|
||||
exec("libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
|
||||
if ($IS_WINDOWS) { $command = ''; } else { $command = 'export HOME=/tmp && '; }
|
||||
$command .= "libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension;
|
||||
exec($command);
|
||||
@unlink($dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
|
||||
}
|
||||
|
||||
@@ -540,7 +542,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
|
||||
$pdf -> SetTopMargin(0.6);
|
||||
$pdf -> SetFont($pdf_font, "", 12);
|
||||
$pdf -> SetXY($x + 0.75, $y + 3.65);
|
||||
$pdf -> MultiCell(7, 5.75, $fax_message, 0, 'L', false);
|
||||
$pdf -> MultiCell(7, 5.40, $fax_message, 0, 'L', false);
|
||||
}
|
||||
|
||||
$pages = $pdf -> getNumPages();
|
||||
|
||||
@@ -63,8 +63,9 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "follow_me_ignore_busy";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "follow_me_cid_name_prefix";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
@@ -178,4 +179,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = "";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//application details
|
||||
$apps[$x]['name'] = "IVR Menu";
|
||||
$apps[$x]['uuid'] = "a5788e9b-58bc-bd1b-df59-fff5d51253ab";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
@@ -32,7 +32,7 @@
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}";
|
||||
$apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}";
|
||||
//if ($_SESSION['ivr menu']['application']['text'] != "lua") {
|
||||
//if ($_SESSION['ivr_menu']['application']['text'] != "lua") {
|
||||
// $y++;
|
||||
// $apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
// $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub";
|
||||
@@ -85,6 +85,25 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'ce17d7af-650a-49c0-b3e4-3bb8c1dad566';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'ivr_menu';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'option_add_rows';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '74376817-89de-49e1-bddd-868a8ebb49ec';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'ivr_menu';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'option_edit_rows';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
@@ -294,4 +313,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2010
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -26,19 +26,7 @@
|
||||
|
||||
//process this only one time
|
||||
if ($domains_processed == 1) {
|
||||
//set the sip_profiles directory for older installs
|
||||
if (isset($_SESSION['switch']['gateways']['dir'])) {
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->uuid($_SESSION['switch']['gateways']['uuid']);
|
||||
$array['default_setting_category'] = 'switch';
|
||||
$array['default_setting_subcategory'] = 'sip_profiles';
|
||||
$array['default_setting_name'] = 'dir';
|
||||
//$array['default_setting_value'] = '';
|
||||
//$array['default_setting_enabled'] = 'true';
|
||||
$orm->save($array);
|
||||
unset($array);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -297,20 +297,20 @@
|
||||
|
||||
//add an empty row to the options array
|
||||
if (count($ivr_menu_options) == 0) {
|
||||
$count = 5;
|
||||
$x = 0;
|
||||
$rows = $_SESSION['ivr_menu']['option_add_rows']['numeric'];
|
||||
$id = 0;
|
||||
}
|
||||
if (count($ivr_menu_options) > 0) {
|
||||
$count = 1;
|
||||
$x = '';
|
||||
$rows = $_SESSION['ivr_menu']['option_edit_rows']['numeric'];
|
||||
$id = count($ivr_menu_options)+1;
|
||||
}
|
||||
while ($x < $count) {
|
||||
$ivr_menu_options[$x]['ivr_menu_option_digits'] = '';
|
||||
$ivr_menu_options[$x]['ivr_menu_option_action'] = '';
|
||||
$ivr_menu_options[$x]['ivr_menu_option_param'] = '';
|
||||
$ivr_menu_options[$x]['ivr_menu_option_order'] = '';
|
||||
$ivr_menu_options[$x]['ivr_menu_option_description'] = '';
|
||||
$x++;
|
||||
for ($x = 0; $x < $rows; $x++) {
|
||||
$ivr_menu_options[$id]['ivr_menu_option_digits'] = '';
|
||||
$ivr_menu_options[$id]['ivr_menu_option_action'] = '';
|
||||
$ivr_menu_options[$id]['ivr_menu_option_param'] = '';
|
||||
$ivr_menu_options[$id]['ivr_menu_option_order'] = '';
|
||||
$ivr_menu_options[$id]['ivr_menu_option_description'] = '';
|
||||
$id++;
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
|
||||
@@ -27,93 +27,99 @@
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//set the directory
|
||||
$xml_dir = $_SESSION["switch"]["conf"]["dir"].'/autoload_configs';
|
||||
$xml_file = $xml_dir."/local_stream.conf";
|
||||
if (is_array($_SESSION["switch"]["conf"])) {
|
||||
$xml_dir = $_SESSION["switch"]["conf"]["dir"].'/autoload_configs';
|
||||
$xml_file = $xml_dir."/local_stream.conf";
|
||||
}
|
||||
|
||||
//rename the file
|
||||
if (file_exists($xml_dir.'/local_stream.conf.xml')) {
|
||||
rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file);
|
||||
}
|
||||
if (file_exists($xml_dir.'/local_stream.conf.xml.noload')) {
|
||||
rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file);
|
||||
if (is_array($_SESSION["switch"]["conf"])) {
|
||||
if (file_exists($xml_dir.'/local_stream.conf.xml')) {
|
||||
rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file);
|
||||
}
|
||||
if (file_exists($xml_dir.'/local_stream.conf.xml.noload')) {
|
||||
rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file);
|
||||
}
|
||||
}
|
||||
|
||||
//add the music_on_hold list to the database
|
||||
$sql = "select count(*) as num_rows from v_music_on_hold; ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
|
||||
//set the alternate directory
|
||||
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/resources/templates/conf/autoload_configs/local_stream.conf';
|
||||
|
||||
//load the xml and save it into an array
|
||||
if (file_exists($xml_file)) {
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
}
|
||||
elseif (file_exists($xml_file_alt)) {
|
||||
$xml_string = file_get_contents(xml_file_alt);
|
||||
}
|
||||
$xml_object = simplexml_load_string($xml_string);
|
||||
$json = json_encode($xml_object);
|
||||
$conf_array = json_decode($json, true);
|
||||
|
||||
//process the array
|
||||
foreach ($conf_array['directory'] as $row) {
|
||||
//get the data from the array
|
||||
$stream_name = $row['@attributes']['name'];
|
||||
$stream_path = $row['@attributes']['path'];
|
||||
foreach ($row['param'] as $p) {
|
||||
$name = $p['@attributes']['name'];
|
||||
$name = str_replace("-", "_", $name);
|
||||
$$name = $p['@attributes']['value'];
|
||||
$attributes[] = $name;
|
||||
}
|
||||
|
||||
//strip the domain name and rate from the name
|
||||
$array = explode('/', $stream_name);
|
||||
if (count($array) == 3) { $stream_name = $array[1]; }
|
||||
if (count($array) == 2) { $stream_name = $array[0]; }
|
||||
|
||||
//insert the data into the database
|
||||
$music_on_hold_uuid = uuid();
|
||||
$sql = "insert into v_music_on_hold ";
|
||||
$sql .= "(";
|
||||
$sql .= "music_on_hold_uuid, ";
|
||||
$sql .= "music_on_hold_name, ";
|
||||
if (isset($rate)) $sql .= "music_on_hold_rate, ";
|
||||
if (isset($shuffle)) $sql .= "music_on_hold_shuffle, ";
|
||||
if (isset($timer_name)) $sql .= "music_on_hold_timer_name, ";
|
||||
if (isset($chime_list)) $sql .= "music_on_hold_chime_list, ";
|
||||
if (isset($chime_freq)) $sql .= "music_on_hold_chime_freq, ";
|
||||
if (isset($chime_max)) $sql .= "music_on_hold_chime_max, ";
|
||||
$sql .= "music_on_hold_path ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$music_on_hold_uuid."', ";
|
||||
$sql .= "'".check_str($stream_name)."', ";
|
||||
if (isset($rate)) $sql .= "'".check_str($rate)."', ";
|
||||
if (isset($shuffle)) $sql .= "'".check_str($shuffle)."', ";
|
||||
if (isset($timer_name)) $sql .= "'".check_str($timer_name)."', ";
|
||||
if (isset($chime_list)) $sql .= "'".check_str($chime_list)."', ";
|
||||
if (isset($chime_max)) $sql .= "'".check_str($chime_max)."', ";
|
||||
$sql .= "'".check_str($stream_path)."' ";
|
||||
$sql .= ");";
|
||||
//echo $sql."\n";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//unset the attribute variables
|
||||
foreach ($attributes as $value) {
|
||||
unset($$value);
|
||||
}
|
||||
}
|
||||
if (is_array($_SESSION["switch"]["conf"])) {
|
||||
$sql = "select count(music_on_hold_uuid) as num_rows from v_music_on_hold; ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
|
||||
} //if num_rows
|
||||
} //if prep_statement
|
||||
//set the alternate directory
|
||||
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/resources/templates/conf/autoload_configs/local_stream.conf';
|
||||
|
||||
//load the xml and save it into an array
|
||||
if (file_exists($xml_file)) {
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
}
|
||||
elseif (file_exists($xml_file_alt)) {
|
||||
$xml_string = file_get_contents($xml_file_alt);
|
||||
}
|
||||
$xml_object = simplexml_load_string($xml_string);
|
||||
$json = json_encode($xml_object);
|
||||
$conf_array = json_decode($json, true);
|
||||
|
||||
//process the array
|
||||
foreach ($conf_array['directory'] as $row) {
|
||||
//get the data from the array
|
||||
$stream_name = $row['@attributes']['name'];
|
||||
$stream_path = $row['@attributes']['path'];
|
||||
foreach ($row['param'] as $p) {
|
||||
$name = $p['@attributes']['name'];
|
||||
$name = str_replace("-", "_", $name);
|
||||
$$name = $p['@attributes']['value'];
|
||||
$attributes[] = $name;
|
||||
}
|
||||
|
||||
//strip the domain name and rate from the name
|
||||
$array = explode('/', $stream_name);
|
||||
if (count($array) == 3) { $stream_name = $array[1]; }
|
||||
if (count($array) == 2) { $stream_name = $array[0]; }
|
||||
|
||||
//insert the data into the database
|
||||
$music_on_hold_uuid = uuid();
|
||||
$sql = "insert into v_music_on_hold ";
|
||||
$sql .= "(";
|
||||
$sql .= "music_on_hold_uuid, ";
|
||||
$sql .= "music_on_hold_name, ";
|
||||
if (isset($rate)) $sql .= "music_on_hold_rate, ";
|
||||
if (isset($shuffle)) $sql .= "music_on_hold_shuffle, ";
|
||||
if (isset($timer_name)) $sql .= "music_on_hold_timer_name, ";
|
||||
if (isset($chime_list)) $sql .= "music_on_hold_chime_list, ";
|
||||
if (isset($chime_freq)) $sql .= "music_on_hold_chime_freq, ";
|
||||
if (isset($chime_max)) $sql .= "music_on_hold_chime_max, ";
|
||||
$sql .= "music_on_hold_path ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$music_on_hold_uuid."', ";
|
||||
$sql .= "'".check_str($stream_name)."', ";
|
||||
if (isset($rate)) $sql .= "'".check_str($rate)."', ";
|
||||
if (isset($shuffle)) $sql .= "'".check_str($shuffle)."', ";
|
||||
if (isset($timer_name)) $sql .= "'".check_str($timer_name)."', ";
|
||||
if (isset($chime_list)) $sql .= "'".check_str($chime_list)."', ";
|
||||
if (isset($chime_max)) $sql .= "'".check_str($chime_max)."', ";
|
||||
$sql .= "'".check_str($stream_path)."' ";
|
||||
$sql .= ");";
|
||||
//echo $sql."\n";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//unset the attribute variables
|
||||
foreach ($attributes as $value) {
|
||||
unset($$value);
|
||||
}
|
||||
}
|
||||
|
||||
} //if num_rows
|
||||
} //if prep_statement
|
||||
} //if is_array
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -24,17 +24,20 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
if (permission_exists('operator_panel_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('operator_panel_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -42,33 +45,38 @@ else {
|
||||
|
||||
//set user status
|
||||
if (isset($_REQUEST['status']) && $_REQUEST['status'] != '') {
|
||||
$user_status = check_str($_REQUEST['status']);
|
||||
//sql update
|
||||
$sql = "update v_users set ";
|
||||
$sql .= "user_status = '".$user_status."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
||||
if (permission_exists("user_account_setting_edit")) {
|
||||
$count = $db->exec(check_sql($sql));
|
||||
}
|
||||
//update the status
|
||||
$user_status = check_str($_REQUEST['status']);
|
||||
$sql = "update v_users set ";
|
||||
$sql .= "user_status = '".$user_status."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and user_uuid = '".$_SESSION['user']['user_uuid']."' ";
|
||||
if (permission_exists("user_account_setting_edit")) {
|
||||
$count = $db->exec(check_sql($sql));
|
||||
}
|
||||
|
||||
//if call center app is installed then update the user_status
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/call_centers')) {
|
||||
//update the user_status
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." '".$user_status."'";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
//if call center app is installed then update the user_status
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/call_centers')) {
|
||||
//update the user_status
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." '".$user_status."'";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
|
||||
//update the user state
|
||||
$cmd = "api callcenter_config agent set state ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." Waiting";
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
//update the user state
|
||||
$cmd = "api callcenter_config agent set state ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." Waiting";
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
}
|
||||
|
||||
exit;
|
||||
//stop execution
|
||||
exit;
|
||||
}
|
||||
|
||||
$document['title'] = $text['title-operator_panel'];
|
||||
require_once "resources/header.php";
|
||||
//set the title
|
||||
$document['title'] = $text['title-operator_panel'];
|
||||
|
||||
//include the header
|
||||
require_once "resources/header.php";
|
||||
|
||||
?>
|
||||
|
||||
<!-- virtual_drag function holding elements -->
|
||||
@@ -427,11 +435,15 @@ require_once "resources/header.php";
|
||||
</style>
|
||||
|
||||
<?php
|
||||
|
||||
//create simple array of users own extensions
|
||||
unset($_SESSION['user']['extensions']);
|
||||
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
||||
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
|
||||
if (is_array($_SESSION['user']['extension'])) {
|
||||
foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
||||
$_SESSION['user']['extensions'][] = $assigned_extensions['user'];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id='ajax_reponse'></div>
|
||||
@@ -439,5 +451,6 @@ foreach ($_SESSION['user']['extension'] as $assigned_extensions) {
|
||||
<br><br>
|
||||
|
||||
<?php
|
||||
require_once "resources/footer.php";
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
|
||||
@@ -17,46 +17,56 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "./resources/functions/get_call_activity.php";
|
||||
if (permission_exists('operator_panel_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "./resources/functions/get_call_activity.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('operator_panel_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
$activity = get_call_activity();
|
||||
|
||||
if (is_array($activity)) foreach ($activity as $extension => $fields) {
|
||||
if (substr_count($fields['call_group'], ',')) {
|
||||
$tmp = explode(',', $fields['call_group']);
|
||||
if (is_array($tmp)) foreach ($tmp as $tmp_index => $tmp_value) {
|
||||
if (trim($tmp_value) == '') { unset($tmp[$tmp_index]); }
|
||||
else { $groups[] = $tmp_value; }
|
||||
//get the call activity
|
||||
$activity = get_call_activity();
|
||||
if (is_array($activity)) foreach ($activity as $extension => $fields) {
|
||||
if (substr_count($fields['call_group'], ',')) {
|
||||
$tmp = explode(',', $fields['call_group']);
|
||||
if (is_array($tmp)) foreach ($tmp as $tmp_index => $tmp_value) {
|
||||
if (trim($tmp_value) == '') { unset($tmp[$tmp_index]); }
|
||||
else { $groups[] = $tmp_value; }
|
||||
}
|
||||
}
|
||||
else if ($fields['call_group'] != '') {
|
||||
$groups[] = $fields['call_group'];
|
||||
}
|
||||
}
|
||||
else if ($fields['call_group'] != '') {
|
||||
$groups[] = $fields['call_group'];
|
||||
if (is_array($groups)) {
|
||||
$groups = array_unique($groups);
|
||||
sort($groups);
|
||||
}
|
||||
}
|
||||
if (is_array($groups)) {
|
||||
$groups = array_unique($groups);
|
||||
sort($groups);
|
||||
}
|
||||
|
||||
//prevent warnings
|
||||
if (!is_array($_SESSION['user']['extensions'])) {
|
||||
$_SESSION['user']['extensions'] = array();
|
||||
}
|
||||
|
||||
|
||||
$onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'";
|
||||
|
||||
|
||||
+284
-10
@@ -1,19 +1,293 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
//$apps[$x]['name'] = "Provision";
|
||||
//$apps[$x]['uuid'] = "abf28ead-92ef-3de6-ebbb-023fbc2b6dd3";
|
||||
//$apps[$x]['category'] = "Switch";;
|
||||
//$apps[$x]['subcategory'] = "";
|
||||
//$apps[$x]['version'] = "";
|
||||
//$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
//$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
//$apps[$x]['description']['en-us'] = "Writes the provisioning files from templates.";
|
||||
//$apps[$x]['description']['fr-fr'] = "Ecrit les fichiers de provisioning à partir des modèles.";
|
||||
$apps[$x]['name'] = "Provision";
|
||||
$apps[$x]['uuid'] = "abf28ead-92ef-3de6-ebbb-023fbc2b6dd3";
|
||||
$apps[$x]['category'] = "Switch";;
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Writes the provisioning files from templates.";
|
||||
$apps[$x]['description']['fr-fr'] = "Ecrit les fichiers de provisioning à partir des modèles.";
|
||||
|
||||
//permission details
|
||||
//$apps[$x]['permissions'][0]['name'] = "zzz";
|
||||
//$apps[$x]['permissions'][0]['groups'][] = "admin";
|
||||
//$apps[$x]['permissions'][0]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '931f9369-9aac-4620-8d4b-7d2bf642b1d2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'enabled';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3790e46b-ef9e-4cdc-bfd2-6b3708751843';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'auto_insert_enabled';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '27b7ccfd-58d7-409c-80ff-cca014349d70';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'http_auth_type';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'digest';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c6a5b05b-210d-484f-bbb6-c1dd2223992e';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'http_auth_username';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'ed380d7d-b3b8-40b4-8528-f10d521ddef0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'http_auth_password';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd376fe0f-fb89-4418-8fb4-590e4cac483f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'cidr';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'a5323190-b733-49c1-99c4-396ab8950bb8';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin_name';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'ae3f809e-81af-4ed4-82f7-275251210d3a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin_password';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'cd2173be-aa43-4fd2-9c75-02f49c199485';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'path';
|
||||
$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'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '559cd2d6-8ca0-4e6e-ae9d-565c8eed898d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'voicemail_number';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '*97';
|
||||
$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'] = 'a9dc7f4a-0a19-40cb-829a-093bf81d00db';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'line_sip_port';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '5060';
|
||||
$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'] = '472300e4-267a-4f0d-83ab-04d2017c7d0f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'line_sip_transport';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'tcp';
|
||||
$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'] = '5bc38b86-089f-44cb-9fff-38be38c497e8';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'line_register_expires';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '80';
|
||||
$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'] = '1752b247-873b-4d41-9846-b9df93efe8df';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'polycom_gmt_offset';
|
||||
$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'] = '3600 * GMT offset';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '098b2abd-3af3-4104-8fba-fabf9573f925';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'polycom_digitmap';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '[*]xxxx|[2-9]11|0T|011xxx.T|[0-1][2-9]xxxxxxxxx|[2-9]xxxxxxxxx|[1-9]xxT|**x.T';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '5aa7f396-d742-48f1-b53f-c609b9a6759a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_start_month';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '3';
|
||||
$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'] = '7d742914-9c55-4cee-a295-c19501389f41';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_start_day';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '13';
|
||||
$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'] = '7b444c2f-bed7-4da5-8cf3-4cc79df8625f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_start_time';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'f8e7b78b-1b84-42da-9e14-ec03dbb67c52';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_stop_month';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '11';
|
||||
$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'] = '6f4a9657-e130-4003-bc96-22a1312d76f4';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_stop_day';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '6';
|
||||
$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'] = 'd3e72ae2-b887-443d-8523-96726343bb55';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'daylight_savings_stop_time';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '931d6cc7-ca82-4813-ae92-7015e0c2ea1b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'http_domain_filter';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'fc2fa8cd-b14e-48e3-99bd-7c01c9d6208d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_time_zone';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '-6';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Time zone ranges from -11 to +12';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '7f4a1607-4cbe-49f5-8cd2-6d599b89bd9b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_time_format';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '0-12 Hour, 1-24 Hour';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '166b27d1-1860-4154-88d3-5e15781e7bbb';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_date_format';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '0-WWW MMM DD (default), 1-DD-MMM-YY, 2-YYYY-MM-DD, 3-DD/MM/YYYY, 4-MM/DD/YY, 5-DD MMM YYYY, 6-WWW DD MMM';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '05bcbb47-06f6-4c81-a1c9-cdf2982d60a7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_rport';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Send the response back to the source it came from.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '70894b7b-2edd-41ad-8526-060589df4e11';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_session_timer';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'SIP Session Timers';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'aa200d6f-c048-4203-9838-8dd05fa31bd5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'yealink_retransmission';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Retransmission';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '6c4430f6-3713-4c8b-9da3-eaf1705d7dc3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'contact_users';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c5196771-f408-40b3-81c7-b4ce525620c3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'contact_groups';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8854358d-c6a4-4eeb-b21b-37ced80a4fbb';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'contact_extensions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'allow extensions to be provisioned as contacts as $extensions in provision templates';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd157078e-b363-4f34-a6d4-8a86990a40b7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'number_as_presence_id';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '48dd60fe-d7de-417c-85c4-2d2d897a709c';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'ntp_server_primary';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'pool.ntp.org';
|
||||
$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'] = '7bcc3c26-ac55-4934-be9f-e0edfbc7193b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'ntp_server_secondary';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '2.us.pool.ntp.org';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
|
||||
?>
|
||||
|
||||
+18
-315
@@ -24,329 +24,32 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//normalize the mac address
|
||||
//process this code online once
|
||||
if ($domains_processed == 1) {
|
||||
//normalize the mac address
|
||||
$sql = "select device_uuid, device_mac_address ";
|
||||
$sql .= "from v_devices ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and (device_mac_address like '%-%' or device_mac_address like '%:%') ";
|
||||
$sql .= "where (device_mac_address like '%-%' or device_mac_address like '%:%') ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach($result as $row) {
|
||||
$device_uuid = $row["device_uuid"];
|
||||
$device_mac_address = $row["device_mac_address"];
|
||||
$device_mac_address = strtolower($device_mac_address);
|
||||
$device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address);
|
||||
if (is_array($result)) {
|
||||
foreach($result as $row) {
|
||||
$device_uuid = $row["device_uuid"];
|
||||
$device_mac_address = $row["device_mac_address"];
|
||||
$device_mac_address = strtolower($device_mac_address);
|
||||
$device_mac_address = preg_replace('#[^a-fA-F0-9./]#', '', $device_mac_address);
|
||||
|
||||
$sql = "update v_devices set ";
|
||||
$sql .= "device_mac_address = '".$device_mac_address."' ";
|
||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$sql = "update v_devices set ";
|
||||
$sql .= "device_mac_address = '".$device_mac_address."' ";
|
||||
$sql .= "where device_uuid = '".$device_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
}
|
||||
unset($prep_statement, $result);
|
||||
}
|
||||
}
|
||||
|
||||
//process this code online once
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'enabled';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'auto_insert_enabled';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'http_auth_type';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'digest';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'http_auth_username';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'http_auth_password';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'cidr';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin_name';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin_password';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'path';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'voicemail_number';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '*97';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'line_sip_port';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '5060';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'line_sip_transport';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'tcp';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'line_register_expires';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '80';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'polycom_gmt_offset';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '3600 * GMT offset';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'polycom_digitmap';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '[*]xxxx|[2-9]11|0T|011xxx.T|[0-1][2-9]xxxxxxxxx|[2-9]xxxxxxxxx|[1-9]xxT|**x.T';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_start_month';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '3';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_start_day';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '13';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_start_time';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '2';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_stop_month';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '11';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_stop_day';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '6';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'daylight_savings_stop_time';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '2';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'http_domain_filter';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'false';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'yealink_time_zone';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '-6';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Time zone ranges from -11 to +12';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'yealink_time_format';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '1';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '0-12 Hour, 1-24 Hour';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'yealink_date_format';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '3';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '0-WWW MMM DD (default), 1-DD-MMM-YY, 2-YYYY-MM-DD, 3-DD/MM/YYYY, 4-MM/DD/YY, 5-DD MMM YYYY, 6-WWW DD MMM';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'contact_users';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'contact_groups';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'contact_extensions';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'allow extensions to be provisioned as contacts as $extensions in provision templates';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'ntp_server_primary';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'pool.ntp.org';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'ntp_server_secondary';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '2.us.pool.ntp.org';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_category = 'provision' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//find the missing default settings
|
||||
$x = 0;
|
||||
foreach ($array as $setting) {
|
||||
$found = false;
|
||||
$missing[$x] = $setting;
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||
$found = true;
|
||||
//remove items from the array that were found
|
||||
unset($missing[$x]);
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) foreach ($missing as $row) {
|
||||
//add the default settings
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($row);
|
||||
$message = $orm->message;
|
||||
unset($orm);
|
||||
//print_r($message);
|
||||
}
|
||||
unset($missing);
|
||||
|
||||
//move the dynamic provision variables that from v_vars table to v_default_settings
|
||||
if (count($_SESSION['provision']) == 0) {
|
||||
$sql = "select * from v_vars ";
|
||||
$sql .= "where var_cat = 'Provision' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
//set the variable
|
||||
$var_name = check_str($row['var_name']);
|
||||
//remove the 'v_' prefix from the variable name
|
||||
if (substr($var_name, 0, 2) == "v_") {
|
||||
$var_name = substr($var_name, 2);
|
||||
}
|
||||
//add the provision variable to the default settings table
|
||||
$sql = "insert into v_default_settings ";
|
||||
$sql .= "(";
|
||||
$sql .= "default_setting_uuid, ";
|
||||
$sql .= "default_setting_category, ";
|
||||
$sql .= "default_setting_subcategory, ";
|
||||
$sql .= "default_setting_name, ";
|
||||
$sql .= "default_setting_value, ";
|
||||
$sql .= "default_setting_enabled, ";
|
||||
$sql .= "default_setting_description ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'provision', ";
|
||||
$sql .= "'".$var_name."', ";
|
||||
$sql .= "'var', ";
|
||||
$sql .= "'".check_str($row['var_value'])."', ";
|
||||
$sql .= "'".check_str($row['var_enabled'])."', ";
|
||||
$sql .= "'".check_str($row['var_description'])."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
unset($prep_statement);
|
||||
//delete the provision variables from system -> variables
|
||||
//$sql = "delete from v_vars ";
|
||||
//$sql .= "where var_cat = 'Provision' ";
|
||||
//echo $sql ."\n";
|
||||
//$db->exec(check_sql($sql));
|
||||
//echo "$var_name $var_value \n";
|
||||
}
|
||||
|
||||
//unset the array variable
|
||||
unset($array);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -672,7 +672,7 @@ include "root.php";
|
||||
$sql .= "WHEN 'programmable' THEN 3 ";
|
||||
$sql .= "WHEN 'expansion' THEN 4 ";
|
||||
$sql .= "ELSE 100 END, ";
|
||||
if ($db_type == "mysql") {
|
||||
if ($GLOBALS['db_type'] == "mysql") {
|
||||
$sql .= "device_key_id ASC, ";
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -17,29 +17,29 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//if the recordings directory doesn't exist then create it
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']."/".$domain_name) > 0) {
|
||||
if (!is_readable($_SESSION['switch']['recordings']['dir']."/".$domain_name)) { event_socket_mkdir($_SESSION['switch']['recordings']['dir']."/".$domain_name,02770,true); }
|
||||
}
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//if the recordings directory doesn't exist then create it
|
||||
if (is_array($_SESSION['switch']['recordings']) && strlen($_SESSION['switch']['recordings']['dir']."/".$domain_name) > 0) {
|
||||
if (!is_readable($_SESSION['switch']['recordings']['dir']."/".$domain_name)) { event_socket_mkdir($_SESSION['switch']['recordings']['dir']."/".$domain_name,02770,true); }
|
||||
}
|
||||
|
||||
//if base64, populate from existing recording files, then remove
|
||||
if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
|
||||
if (is_array($_SESSION['recordings']['storage_type']) && $_SESSION['recordings']['storage_type']['text'] == 'base64') {
|
||||
//get recordings without base64 in db
|
||||
$sql = "select recording_uuid, domain_uuid, recording_filename ";
|
||||
$sql .= "from v_recordings where recording_base64 is null or recording_base64 = '' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) {
|
||||
if (is_array($result)) {
|
||||
foreach ($result as &$row) {
|
||||
$recording_uuid = $row['recording_uuid'];
|
||||
$recording_domain_uuid = $row['domain_uuid'];
|
||||
@@ -64,7 +64,7 @@ if ($domains_processed == 1) {
|
||||
unset($sql, $prep_statement, $result, $row);
|
||||
}
|
||||
//if not base64, decode to local files, remove base64 data from db
|
||||
else if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||
else if (is_array($_SESSION['recordings']['storage_type']) && $_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||
//get recordings with base64 in db
|
||||
$sql = "select recording_uuid, domain_uuid, recording_filename, recording_base64 ";
|
||||
$sql .= "from v_recordings where recording_base64 is not null ";
|
||||
@@ -99,4 +99,4 @@ if ($domains_processed == 1) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -361,12 +361,14 @@
|
||||
if (file_exists($file_name)) {
|
||||
$file_size = filesize($file_name);
|
||||
$file_size = byte_convert($file_size);
|
||||
$file_date = date("M d, Y H:i:s", filemtime($file_name));
|
||||
}
|
||||
else {
|
||||
$file_size = '';
|
||||
$file_date = '';
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center; white-space: nowrap;'>".$file_size."</td>\n";
|
||||
$file_date = date("M d, Y H:i:s", filemtime($file_name));
|
||||
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: right;'>".$file_date."</td>\n";
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -37,17 +37,26 @@ function get_registrations($sip_profile_name) {
|
||||
$registrations[$x]['mwi-account'] = $row->{'mwi-account'} ?: " ";
|
||||
$registrations[$x]['status'] = $row->{'status'} ?: " ";
|
||||
$registrations[$x]['ping-time'] = $row->{'ping-time'} ?: " ";
|
||||
|
||||
|
||||
//get network-ip to url or blank
|
||||
if(isset($row->{'network-ip'})) {
|
||||
$registrations[$x]['network-ip'] = "<a href='http://".$row->{'network-ip'}."' target='_blank'>".$row->{'network-ip'}."</a>";
|
||||
$registrations[$x]['network-ip'] = "<a href='http://".$row->{'network-ip'}."' target='_blank'>".$row->{'network-ip'}."</a>";
|
||||
}else{
|
||||
$registrations[$x]['network-ip'] = " ";
|
||||
}
|
||||
//get the LAN IP address if it exists replace the external ip
|
||||
$call_id_array = explode('@', $row->{'call-id'});
|
||||
if (isset($call_id_array[1])) {
|
||||
$registrations[$x]['lan-ip'] = "<a href='http://".$call_id_array[1]."' target='_blank'>".$call_id_array[1]."</a>";
|
||||
$agent = $row->{'agent'};
|
||||
$lan_ip = $call_id_array[1];
|
||||
if (false !== stripos($agent, 'grandstream')) {
|
||||
$lan_ip = str_ireplace(
|
||||
array('A','B','C','D','E','F','G','H','I','J'),
|
||||
array('0','1','2','3','4','5','6','7','8','9'),
|
||||
$lan_ip
|
||||
);
|
||||
}
|
||||
$registrations[$x]['lan-ip'] = "<a href='http://".$lan_ip."' target='_blank'>".$lan_ip."</a>";
|
||||
}else{
|
||||
$registrations[$x]['lan-ip'] = " ";
|
||||
}
|
||||
@@ -61,7 +70,7 @@ function get_registrations($sip_profile_name) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//increment the array id
|
||||
$x++;
|
||||
}
|
||||
@@ -70,5 +79,5 @@ function get_registrations($sip_profile_name) {
|
||||
//return the registrations array
|
||||
return $registrations;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -97,6 +97,25 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '745d8fdc-57bc-4f43-97d7-508fda8f70a8';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'ring_group';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'destination_add_rows';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'ddf306c9-6f58-40f7-910e-2f27dc33fa57';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'ring_group';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'destination_edit_rows';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//process this only one time
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -25,17 +25,21 @@
|
||||
James Rose <james.o.rose@gmail.com>
|
||||
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/ringbacks.php";
|
||||
if (permission_exists('ring_group_add') || permission_exists('ring_group_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/classes/ringbacks.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('ring_group_add') || permission_exists('ring_group_edit')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -420,18 +424,24 @@ else {
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$ring_group_destinations = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$x = count($ring_group_destinations);
|
||||
$limit = $x + 1;
|
||||
}
|
||||
|
||||
while($x < $limit) {
|
||||
$ring_group_destinations[$x]['destination_number'] = '';
|
||||
$ring_group_destinations[$x]['destination_delay'] = '';
|
||||
$ring_group_destinations[$x]['destination_timeout'] = '';
|
||||
$ring_group_destinations[$x]['destination_prompt'] = '';
|
||||
$x++;
|
||||
//add an empty row to the options array
|
||||
if (count($ring_group_destinations) == 0) {
|
||||
$rows = $_SESSION['ring_group']['destination_add_rows']['numeric'];
|
||||
$id = 0;
|
||||
}
|
||||
if (count($ring_group_destinations) > 0) {
|
||||
$rows = $_SESSION['ring_group']['destination_edit_rows']['numeric'];
|
||||
$id = count($ring_group_destinations)+1;
|
||||
}
|
||||
for ($x = 0; $x < $rows; $x++) {
|
||||
$ring_group_destinations[$id]['destination_number'] = '';
|
||||
$ring_group_destinations[$id]['destination_delay'] = '';
|
||||
$ring_group_destinations[$id]['destination_timeout'] = '';
|
||||
$ring_group_destinations[$id]['destination_prompt'] = '';
|
||||
$id++;
|
||||
}
|
||||
unset($limit);
|
||||
|
||||
//get the ring group users
|
||||
if (strlen($ring_group_uuid) > 0) {
|
||||
|
||||
@@ -93,7 +93,7 @@ if (!class_exists('scripts')) {
|
||||
* Copy the switch scripts from the web directory to the switch directory
|
||||
*/
|
||||
public function copy_files() {
|
||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
||||
if (is_array($_SESSION['switch']['scripts'])) {
|
||||
$dst_dir = $_SESSION['switch']['scripts']['dir'];
|
||||
if(strlen($dst_dir) == 0) {
|
||||
throw new Exception("Cannot copy scripts the 'script_dir' is empty");
|
||||
@@ -122,7 +122,7 @@ if (!class_exists('scripts')) {
|
||||
* Writes the config.lua
|
||||
*/
|
||||
public function write_config() {
|
||||
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
|
||||
if (is_array($_SESSION['switch']['scripts'])) {
|
||||
|
||||
//replace the backslash with a forward slash
|
||||
$this->db_path = str_replace("\\", "/", $this->db_path);
|
||||
@@ -143,13 +143,15 @@ if (!class_exists('scripts')) {
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$this->dsn_name = $row["database_name"];
|
||||
$this->dsn_username = $row["database_username"];
|
||||
$this->dsn_password = $row["database_password"];
|
||||
break; //limit to 1 row
|
||||
if (is_array($result)) {
|
||||
foreach ($result as &$row) {
|
||||
$this->dsn_name = $row["database_name"];
|
||||
$this->dsn_username = $row["database_username"];
|
||||
$this->dsn_password = $row["database_password"];
|
||||
break; //limit to 1 row
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
else {
|
||||
$odbc_num_rows = '0';
|
||||
|
||||
@@ -58,6 +58,19 @@
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "sip_profile_setting_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'sip_profile_domain_view';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'sip_profile_domain_add';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'sip_profile_domain_edit';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'sip_profile_domain_delete';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
@@ -89,6 +102,36 @@
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = 'v_sip_profile_domains';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sip_profile_domain_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sip_profile_uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_sip_profile';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'sip_profile_uuid';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sip_profile_domain_name';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the name.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sip_profile_domain_alias';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enable or disable the alias.';
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'sip_profile_domain_parse';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enable or disable the parsing.';
|
||||
$z++;
|
||||
|
||||
$y = 2; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_sip_profile_settings";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_profile_setting_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
@@ -119,4 +162,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -100,6 +100,32 @@
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//get the domain, alias and parse values and set as variables
|
||||
$sip_profile_domain_name = $sip_profile['domains']['domain']['@attributes']['name'];
|
||||
$sip_profile_domain_alias = $sip_profile['domains']['domain']['@attributes']['alias'];
|
||||
$sip_profile_domain_parse = $sip_profile['domains']['domain']['@attributes']['parse'];
|
||||
|
||||
//add the sip profile domains name, alias and parse
|
||||
$sip_profile_domain_uuid = uuid();
|
||||
$sql = "insert into v_sip_profile_domains";
|
||||
$sql .= "(";
|
||||
$sql .= "sip_profile_domain_uuid, ";
|
||||
$sql .= "sip_profile_uuid, ";
|
||||
$sql .= "sip_profile_domain_name, ";
|
||||
$sql .= "sip_profile_domain_alias, ";
|
||||
$sql .= "sip_profile_domain_parse ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$sip_profile_domain_uuid."', ";
|
||||
$sql .= "'".$sip_profile_uuid."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_name)."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_alias)."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_parse)."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//add the sip profile settings
|
||||
foreach ($sip_profile['settings']['param'] as $row) {
|
||||
//get the name and value pair
|
||||
@@ -142,6 +168,85 @@
|
||||
}
|
||||
unset($prep_statement);
|
||||
}
|
||||
|
||||
//upgrade - add missing sip profiles domain settings
|
||||
$sql = "select count(*) as num_rows from v_sip_profile_domains ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
if (file_exists('/usr/share/examples/fusionpbx/resources/templates/conf/sip_profiles')) {
|
||||
$sip_profile_dir = '/usr/share/examples/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
elseif (file_exists('/usr/local/share/fusionpbx/resources/templates/conf/sip_profiles')) {
|
||||
$sip_profile_dir = '/usr/local/share/fusionpbx/resources/templates/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
else {
|
||||
$sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
$db->beginTransaction();
|
||||
$xml_files = glob($sip_profile_dir);
|
||||
foreach ($xml_files as &$xml_file) {
|
||||
//load the sip profile xml and save it into an array
|
||||
$sip_profile_xml = file_get_contents($xml_file);
|
||||
$xml = simplexml_load_string($sip_profile_xml);
|
||||
$json = json_encode($xml);
|
||||
$sip_profile = json_decode($json, true);
|
||||
$sip_profile_name = $sip_profile['@attributes']['name'];
|
||||
$sip_profile_enabled = $sip_profile['@attributes']['enabled'];
|
||||
//echo "sip profile name: ".$sip_profile_name."\n";
|
||||
|
||||
//get the domain, alias and parse values and set as variables
|
||||
$sip_profile_domain_name = $sip_profile['domains']['domain']['@attributes']['name'];
|
||||
$sip_profile_domain_alias = $sip_profile['domains']['domain']['@attributes']['alias'];
|
||||
$sip_profile_domain_parse = $sip_profile['domains']['domain']['@attributes']['parse'];
|
||||
|
||||
//get the sip_profile_uuid using the sip profile name
|
||||
$sql = "select sip_profile_uuid from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_name = '$sip_profile_name' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$sip_profile_uuid = $result[0]["sip_profile_uuid"];
|
||||
unset ($prep_statement);
|
||||
|
||||
//add the sip profile domains name, alias and parse
|
||||
if ($sip_profile_uuid) {
|
||||
$sip_profile_domain_uuid = uuid();
|
||||
$sql = "insert into v_sip_profile_domains";
|
||||
$sql .= "(";
|
||||
$sql .= "sip_profile_domain_uuid, ";
|
||||
$sql .= "sip_profile_uuid, ";
|
||||
$sql .= "sip_profile_domain_name, ";
|
||||
$sql .= "sip_profile_domain_alias, ";
|
||||
$sql .= "sip_profile_domain_parse ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$sip_profile_domain_uuid."', ";
|
||||
$sql .= "'".$sip_profile_uuid."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_name)."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_alias)."', ";
|
||||
$sql .= "'".check_str($sip_profile_domain_parse)."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//unset the sip_profile_uuid
|
||||
unset($sip_profile_uuid);
|
||||
}
|
||||
$db->commit();
|
||||
|
||||
//save the sip profile xml
|
||||
save_sip_profile_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
unset($prep_statement);
|
||||
}
|
||||
}
|
||||
|
||||
//if empty, set sip_profile_enabled = true
|
||||
|
||||
+28
-2
@@ -19,5 +19,31 @@
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
?>
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'e13895b7-ef2f-43ed-8d2a-e739ccffccc2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'tftp_service_address';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '0.0.0.0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'the address for the TFTP service to listen for connection on';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3fe87ea5-9633-4af0-bb5c-a61dbba2772c';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'tftp_service_port';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '69';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'the port for the TFTP service to listen for connection on';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '5e21c189-ac27-42aa-acaf-57c8cdcbbcef';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'provision';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'tftp_service_file_path';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '/tmp';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'the location for static files e.g. firmware';
|
||||
|
||||
?>
|
||||
|
||||
@@ -28,62 +28,5 @@
|
||||
//process this code online once
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'tftp_service_address';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '0.0.0.0';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'the address for the TFTP service to listen for connection on';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'tftp_service_port';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '69';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'the port for the TFTP service to listen for connection on';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'provision';
|
||||
$array[$x]['default_setting_subcategory'] = 'tftp_service_file_path';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '/tmp';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'the location for static files e.g. firmware';
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "SELECT * FROM v_default_settings ";
|
||||
$sql .= "WHERE default_setting_category = 'provision' AND default_setting_subcategory LIKE 'tftp_service_%'";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//find the missing default settings
|
||||
$missing = [];
|
||||
foreach ($array as $setting) {
|
||||
$found = false;
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory'])) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) $missing[] = $setting;
|
||||
}
|
||||
|
||||
//add the missing default settings
|
||||
foreach ($missing as $row) {
|
||||
//add the default settings
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($row);
|
||||
$message = $orm->message;
|
||||
unset($orm);
|
||||
//print_r($message);
|
||||
}
|
||||
unset($missing);
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -58,4 +58,147 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = "time_condition_domain";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
//define region presets
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c8cbb0eb-850b-4afd-a918-cceaf8af3957';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'region';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'What region to use by default when choosing Time Conditions';
|
||||
|
||||
//define English holiday presets
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '528ec73e-03bb-4ea1-9ce1-19b81fb3f584';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"new_years_day":{"mday":"1","mon":"1"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '420b7282-2e49-4d63-9eb3-48b3b96bc184';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"may_day":{"mon":"5","mday":"1-7","wday":"2"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c9ab6e93-63e0-4098-9290-7a721e813450';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"spring_bank_holiday":{"mon":"5","mday":"25-31","wday":"2"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'b7eac3ac-a99d-4fc8-8e3e-682a17a5b463';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"august_bank_holiday":{"mon":"8","mday":"25-31","wday":"2"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'cde53fd6-713e-43f9-beed-3cace375de56';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"christmas_day":{"mday":"25","mon":"12"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3ddfd3b3-5c2e-45ef-b3ca-7f361ecc0a93';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_england';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"boxing_day":{"mday":"26","mon":"12"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'England Holiday';
|
||||
|
||||
//define USA holiday presets
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3df036bb-ae96-4735-96da-a32e90b51940';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"new_years_day":{"mday":"1","mon":"1"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '7a12b17c-67d9-439e-98fb-70039d27cf21';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"martin_luther_king_jr_day":{"wday":"2","mon":"1","mday":"15-21"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '1ce5c94b-7181-4b33-92b0-2cf4a97f2fa3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"presidents_day":{"wday":"2","mon":"2","mday":"15-21"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '0957bbc4-60e8-44d1-b51d-943de4ee5b2f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"memorial_day":{"mday":"25-31","wday":"2","mon":"5"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '0aa94174-a339-47d6-b6ab-c264b3786074';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"independence_day":{"mday":"4","mon":"7"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'be512c08-029e-49a0-937d-1a62fc029609';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"labor_day":{"wday":"2","mon":"9","mday":"1-7"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '261a0ea4-26a3-4261-95e5-888afd221ca0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"columbus_day":{"wday":"2","mon":"10","mday":"8-14"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '829d346b-b0ed-4690-8641-8ed01052e303';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"veterans_day":{"mday":"11","mon":"11"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'c1fdfebe-3544-4b01-8a83-d0fee8e9a47a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"thanksgiving_day":{"wday":"5-6","mon":"11","mday":"22-28"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '82e3eb39-27a4-4d70-8436-11059d3e51e7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'time_conditions';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'preset_usa';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"christmas_day":{"mday":"25","mon":"12"}}';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'USA Holiday';
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,116 +2,6 @@
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define holiday presets
|
||||
$preset['usa'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
||||
$preset['usa'][] = json_encode(array("martin_luther_king_jr_day" => array("wday" => "2", "mon" => "1", "mday" => "15-21")));
|
||||
$preset['usa'][] = json_encode(array("presidents_day" => array("wday" => "2", "mon" => "2", "mday" => "15-21")));
|
||||
$preset['usa'][] = json_encode(array("memorial_day" => array("mday" => "25-31", "wday" => "2", "mon" => "5")));
|
||||
$preset['usa'][] = json_encode(array("independence_day" => array("mday" => "4", "mon" => "7")));
|
||||
$preset['usa'][] = json_encode(array("labor_day" => array("wday" => "2", "mon" => "9", "mday" => "1-7")));
|
||||
$preset['usa'][] = json_encode(array("columbus_day" => array("wday" => "2", "mon" => "10", "mday" => "8-14")));
|
||||
$preset['usa'][] = json_encode(array("veterans_day" => array("mday" => "11", "mon" => "11")));
|
||||
$preset['usa'][] = json_encode(array("thanksgiving_day" => array("wday" => "5-6", "mon" => "11", "mday" => "22-28")));
|
||||
$preset['usa'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
||||
|
||||
$preset['england'][] = json_encode(array("new_years_day" => array("mday" => "1", "mon" => "1")));
|
||||
$preset['england'][] = json_encode(array("christmas_day" => array("mday" => "25", "mon" => "12")));
|
||||
$preset['england'][] = json_encode(array("boxing_day" => array("mday" => "26", "mon" => "12")));
|
||||
$preset['england'][] = json_encode(array("may_day" => array("mon" => "5", "mday" => "1-7", "wday" => "2")));
|
||||
$preset['england'][] = json_encode(array("spring_bank_holiday" => array("mon" => "5", "mday" => "25-31", "wday" => "2")));
|
||||
$preset['england'][] = json_encode(array("august_bank_holiday" => array("mon" => "8", "mday" => "25-31", "wday" => "2")));
|
||||
|
||||
//iterate and migrate old presets first
|
||||
$sql = "update v_default_settings ";
|
||||
$sql .= "set default_setting_subcategory = 'preset_usa' ";
|
||||
$sql .= ", default_setting_description = 'usa Holiday' ";
|
||||
$sql .= "where default_setting_category = 'time_conditions' ";
|
||||
$sql .= "and default_setting_subcategory = 'preset' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
unset ($prep_statement, $sql);
|
||||
}
|
||||
|
||||
//iterate and add each, if necessary
|
||||
$x = 0;
|
||||
foreach ($preset as $region => $data) {
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_category = 'time_conditions' ";
|
||||
$sql .= "and default_setting_subcategory = 'preset_$region' ";
|
||||
$sql .= "and default_setting_name = 'array' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
foreach ($data as $json) {
|
||||
$found = false;
|
||||
$missing[$x]['default_setting_category'] = 'time_conditions';
|
||||
$missing[$x]['default_setting_subcategory'] = "preset_$region";
|
||||
$missing[$x]['default_setting_name'] = 'array';
|
||||
$missing[$x]['default_setting_value'] = $json;
|
||||
$missing[$x]['default_setting_enabled'] = 'true';
|
||||
$missing[$x]['default_setting_description'] = "$region Holiday";
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_value']) == trim($json)) {
|
||||
$found = true;
|
||||
//remove items from the array that were found
|
||||
unset($missing[$x]);
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) foreach ($missing as $row) {
|
||||
//add the default settings
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($row);
|
||||
$message = $orm->message;
|
||||
unset($orm);
|
||||
//print_r($message);
|
||||
}
|
||||
unset($missing);
|
||||
|
||||
$array[$x]['default_setting_category'] = 'time_conditions';
|
||||
$array[$x]['default_setting_subcategory'] = 'region';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'usa';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'What region to use by default when choosing Time Conditions';
|
||||
$x++;
|
||||
|
||||
//iterate and add each, if necessary
|
||||
foreach ($array as $index => $default_settings) {
|
||||
|
||||
//add the default setting
|
||||
$sql = "select count(*) as num_rows from v_default_settings ";
|
||||
$sql .= "where default_setting_category = '".$default_settings['default_setting_category']."' ";
|
||||
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
|
||||
$sql .= "and default_setting_name = '".$default_settings['default_setting_name']."' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
unset($prep_statement);
|
||||
if ($row['num_rows'] == 0) {
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($array[$index]);
|
||||
$message = $orm->message;
|
||||
//print_r($message);
|
||||
}
|
||||
unset($row);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//unset the array variable
|
||||
unset($array);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -259,7 +259,6 @@ EOD;
|
||||
//migrate old ringtones
|
||||
$sql = "update v_vars ";
|
||||
$sql .= "set var_cat = 'Ringtones' ";
|
||||
$sql .= "set var_description = 'TWlncmF0ZWQgZnJvbSBEZWZhdWx0cw==' ";
|
||||
$sql .= "where var_name like '%-ring' ";
|
||||
$sql .= "and var_cat = 'Defaults' ";
|
||||
$sql .= "and var_description = '' ";
|
||||
@@ -372,4 +371,4 @@ EOD;
|
||||
//save the vars.xml file
|
||||
save_var_xml();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
+19
-15
@@ -17,22 +17,26 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('var_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('var_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -110,9 +114,9 @@ else {
|
||||
if ($result_count > 0) {
|
||||
$prev_var_cat = '';
|
||||
foreach($result as $row) {
|
||||
$var_value = $row[var_value];
|
||||
$var_value = $row['var_value'];
|
||||
$var_value = substr($var_value, 0, 50);
|
||||
if ($prev_var_cat != $row[var_cat]) {
|
||||
if ($prev_var_cat != $row['var_cat']) {
|
||||
$c=0;
|
||||
if (strlen($prev_var_cat) > 0) {
|
||||
echo "<tr>\n";
|
||||
@@ -166,7 +170,7 @@ else {
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$prev_var_cat = $row[var_cat];
|
||||
$prev_var_cat = $row['var_cat'];
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
@@ -194,4 +198,4 @@ else {
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -64,6 +64,66 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "voicemail_sms_edit";
|
||||
$y++;
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '1cf61dea-42b5-4799-b9fa-f2c3bd29e933';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'voicemail_file';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'attach';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Define whether to attach voicemail files to email notifications, or only include a link.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '4723fe3b-e7ec-409e-a4a8-15ae274253fb';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'keep_local';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Define whether to keep voicemail files on the local system after sending attached via email.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '9a4879c0-87ac-42e5-99f2-2ca2c77dbd98';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'storage_type';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'base64';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Define which storage type (base_64 stores in the database).';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '690a36a8-b6d3-47ea-8780-1af609c1966c';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'message_max_length';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '300';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Maximum length of a voicemail (in seconds).';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'bfe802b1-fcad-41a3-9da2-6b0efdb0c05f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_length';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '8';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'The default length of characters in a voicemail password.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'b127ca03-c682-4d71-b412-4e50f1aca339';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'greeting_max_length';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '90';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Maximum length of a voicemail greeting (in seconds).';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'dd09f9d8-6662-4270-9dac-b87191b77012';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'display_domain_name';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable display of @domain_name after voicemail_id when rendering emails.';
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
@@ -95,10 +155,18 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select the greeting id.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_alternate_greet_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Used to provide an alternate id for the voicemail announcement.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_mail_to";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the email address to send voicemail to.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_sms_to";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the sms did to send voicemail to.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_attach_file";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose whether to attach the file to the email.";
|
||||
@@ -184,6 +252,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Voicemail file encoded in base64.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "message_transcription";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Voicemail transcription.";
|
||||
$z++;
|
||||
|
||||
$y = 2; //table array index
|
||||
$z = 0; //field array index
|
||||
@@ -264,4 +336,5 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
|
||||
@@ -61,6 +61,40 @@
|
||||
$apps[$x]['permissions'][$y]['name'] = "xml_cdr_all";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'dbbadd02-f95d-480b-85d5-2a4113d4cccc';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'cdr';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'format';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'json';
|
||||
$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'] = '23335ac0-9466-4d16-af3f-81aa347159b1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'cdr';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'storage';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'db';
|
||||
$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'] = 'cdb19dda-234b-407a-9eda-e8af74597d4b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'cdr';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'limit';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '800';
|
||||
$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'] = 'cea53099-96c0-405f-ada6-219d0b398944';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'cdr';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'http_enabled';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
@@ -326,4 +360,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Save who hung up or cancelled the leg.";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -39,61 +39,6 @@
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//add CDR settings to default settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'cdr';
|
||||
$array[$x]['default_setting_subcategory'] = 'format';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'json';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'cdr';
|
||||
$array[$x]['default_setting_subcategory'] = 'storage';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'db';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'cdr';
|
||||
$array[$x]['default_setting_subcategory'] = 'limit';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '800';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'cdr';
|
||||
$array[$x]['default_setting_subcategory'] = 'http_enabled';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_category = 'cdr' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
$x = 0;
|
||||
if (isset($array)) foreach ($array as $row) {
|
||||
$found = false;
|
||||
foreach ($default_settings as $field) {
|
||||
if ($row['default_setting_subcategory'] == $field['default_setting_subcategory']) {
|
||||
$found = true;
|
||||
$break;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$orm = new orm;
|
||||
$orm->name('default_settings');
|
||||
$orm->save($array[$x]);
|
||||
$message = $orm->message;
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -142,6 +142,11 @@ if (!class_exists('xml_cdr')) {
|
||||
$this->fields[] = "hangup_cause";
|
||||
$this->fields[] = "hangup_cause_q850";
|
||||
$this->fields[] = "sip_hangup_disposition";
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$this->fields[] = $field;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -342,6 +347,24 @@ if (!class_exists('xml_cdr')) {
|
||||
}
|
||||
}
|
||||
|
||||
//dynamic cdr fields
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$fields = explode(",", $field);
|
||||
$field_name = end($fields);
|
||||
$this->fields[] = $field_name;
|
||||
if (count($fields) == 1) {
|
||||
$this->array[$key][$field_name] = urldecode($xml->variables->$fields[0]);
|
||||
}
|
||||
if (count($fields) == 2) {
|
||||
$this->array[$key][$field_name] = urldecode($xml->$fields[0]->$fields[1]);
|
||||
}
|
||||
if (count($fields) == 3) {
|
||||
$this->array[$key][$field_name] = urldecode($xml->$fields[0]->$fields[1]->$fields[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//send the domain name to the cdr log
|
||||
//$this->log("\ndomain_name is `$domain_name`; domain_uuid is '$domain_uuid'\n");
|
||||
|
||||
@@ -627,19 +650,19 @@ if (!class_exists('xml_cdr')) {
|
||||
$sql_date_range .= " and start_stamp between '".$this->start_stamp_begin.":00.000' and '".$this->start_stamp_end.":59.999' \n";
|
||||
}
|
||||
else {
|
||||
if (strlen($this->start_stamp_begin) > 0) { $sql_date_range .= "and start_stamp >= '".$this->start_stamp_begin.":00.000' \n"; }
|
||||
if (strlen($this->start_stamp_end) > 0) { $sql_date_range .= "and start_stamp <= '".$this->start_stamp_end.":59.999' \n"; }
|
||||
if (strlen($this->start_stamp_begin) > 0) { $sql_date_range .= "AND start_stamp >= '".$this->start_stamp_begin.":00.000' \n"; }
|
||||
if (strlen($this->start_stamp_end) > 0) { $sql_date_range .= "AND start_stamp <= '".$this->start_stamp_end.":59.999' \n"; }
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch ($this->quick_select) {
|
||||
case 1: $sql_date_range .= "and start_stamp >= '".date('Y-m-d H:i:s.000', strtotime("-1 week"))."' \n"; break; //last 7 days
|
||||
case 2: $sql_date_range .= "and start_stamp >= '".date('Y-m-d H:i:s.000', strtotime("-1 hour"))."' \n"; break; //last hour
|
||||
case 3: $sql_date_range .= "and start_stamp >= '".date('Y-m-d')." "."00:00:00.000' \n"; break; //today
|
||||
case 4: $sql_date_range .= "and start_stamp between '".date('Y-m-d',strtotime("-1 day"))." "."00:00:00.000' and '".date('Y-m-d',strtotime("-1 day"))." "."23:59:59.999' \n"; break; //yesterday
|
||||
case 5: $sql_date_range .= "and start_stamp >= '".date('Y-m-d',strtotime("this week"))." "."00:00:00.000' \n"; break; //this week
|
||||
case 6: $sql_date_range .= "and start_stamp >= '".date('Y-m-')."01 "."00:00:00.000' \n"; break; //this month
|
||||
case 7: $sql_date_range .= "and start_stamp >= '".date('Y-')."01-01 "."00:00:00.000' \n"; break; //this year
|
||||
case 1: $sql_date_range .= "AND start_stamp >= '".date('Y-m-d H:i:s.000', strtotime("-1 week"))."' \n"; break; //last 7 days
|
||||
case 2: $sql_date_range .= "AND start_stamp >= '".date('Y-m-d H:i:s.000', strtotime("-1 hour"))."' \n"; break; //last hour
|
||||
case 3: $sql_date_range .= "AND start_stamp >= '".date('Y-m-d')." "."00:00:00.000' \n"; break; //today
|
||||
case 4: $sql_date_range .= "AND start_stamp between '".date('Y-m-d',strtotime("-1 day"))." "."00:00:00.000' and '".date('Y-m-d',strtotime("-1 day"))." "."23:59:59.999' \n"; break; //yesterday
|
||||
case 5: $sql_date_range .= "AND start_stamp >= '".date('Y-m-d',strtotime("this week"))." "."00:00:00.000' \n"; break; //this week
|
||||
case 6: $sql_date_range .= "AND start_stamp >= '".date('Y-m-')."01 "."00:00:00.000' \n"; break; //this month
|
||||
case 7: $sql_date_range .= "AND start_stamp >= '".date('Y-')."01-01 "."00:00:00.000' \n"; break; //this year
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,156 +673,228 @@ if (!class_exists('xml_cdr')) {
|
||||
$sql .= "e.extension, \n";
|
||||
$sql .= "e.number_alias, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and (answer_stamp is not null and bridge_uuid is not null) \n";
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER( \n";
|
||||
$sql .= " WHERE c.domain_uuid = e.domain_uuid \n";
|
||||
$sql .= " AND ((\n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL and ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND (\n";
|
||||
$sql .= " c.answer_stamp IS NOT NULL \n";
|
||||
$sql .= " and \n";
|
||||
$sql .= " c.bridge_uuid IS NOT NULL) \n";
|
||||
|
||||
if ($this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
$sql .= "AND direction = 'inbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as answered, \n";
|
||||
$sql .= "AS answered, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and (answer_stamp is null and bridge_uuid is null) \n";
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
if (!$this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'outbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as missed, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and hangup_cause = 'NO_ANSWER' \n";
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR (\n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.answer_stamp IS NULL \n";
|
||||
$sql .= " AND \n";
|
||||
$sql .= " c.bridge_uuid IS NULL) \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'outbound'))";
|
||||
} else {
|
||||
$sql .= " AND direction = 'inbound')";
|
||||
}
|
||||
$sql .= "AS missed, \n";
|
||||
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND c.hangup_cause = 'NO_ANSWER' \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'local') \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "AND direction = 'inbound' \n";
|
||||
}
|
||||
$sql .= ") AS no_answer, \n";
|
||||
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND \n";
|
||||
$sql .= " c.hangup_cause = 'USER_BUSY' \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
$sql .= " AND direction = 'inbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as no_answer, \n";
|
||||
$sql .= "AS busy, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and hangup_cause = 'USER_BUSY' \n";
|
||||
$sql .= "SUM(c.billsec) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
|
||||
$sql .= " AND (direction = 'inbound' OR 'direction = 'outbound') \n";
|
||||
}
|
||||
$sql .= " ) / \n";
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " AND (direction = 'inbound' OR 'direction = 'outbound') \n";
|
||||
}
|
||||
$sql .= " ) AS aloc, \n";
|
||||
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
$sql .= " AND direction = 'inbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as busy, \n";
|
||||
$sql .= "AS inbound_calls, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select SUM(billsec) / count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
if (!$this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'outbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as aloc, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "SUM(c.billsec) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
|
||||
$sql .= " AND (direction = 'inbound' OR direction = 'local')) \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
$sql .= " AND direction = 'inbound') \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as inbound_calls, \n";
|
||||
$sql .= "AS inbound_duration, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select SUM(billsec) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
if ($this->include_internal) {
|
||||
$sql .= " and (direction = 'inbound' or direction = 'local') \n";
|
||||
}
|
||||
else {
|
||||
$sql .= "and direction = 'inbound' \n";
|
||||
}
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as inbound_duration, \n";
|
||||
$sql .= "COUNT(*) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND \n";
|
||||
$sql .= " c.direction = 'outbound') \n";
|
||||
$sql .= "AS outbound_calls, \n";
|
||||
|
||||
$sql .= "(\n";
|
||||
$sql .= "select count(*) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and direction = 'outbound' \n";
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as outbound_calls, \n";
|
||||
|
||||
$sql .= "(";
|
||||
$sql .= "select SUM(billsec) from v_xml_cdr \n";
|
||||
$sql .= "where domain_uuid = e.domain_uuid\n";
|
||||
$sql .= "and (\n";
|
||||
$sql .= " (caller_id_number = e.extension or destination_number = e.extension)\n";
|
||||
$sql .= " or \n";
|
||||
$sql .= " (e.number_alias is not null and (caller_id_number = e.number_alias or destination_number = e.number_alias))\n";
|
||||
$sql .= ")\n";
|
||||
$sql .= "and direction = 'outbound' \n";
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") as outbound_duration, \n";
|
||||
$sql .= "SUM(c.billsec) \n";
|
||||
$sql .= "FILTER ( \n";
|
||||
$sql .= " WHERE (( \n";
|
||||
$sql .= " c.caller_id_number = e.extension \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.extension) \n";
|
||||
$sql .= " OR ( \n";
|
||||
$sql .= " e.number_alias IS NOT NULL \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.caller_id_number = e.number_alias \n";
|
||||
$sql .= " OR \n";
|
||||
$sql .= " c.destination_number = e.number_alias))) \n";
|
||||
$sql .= " AND ( \n";
|
||||
$sql .= " c.direction = 'outbound')) \n";
|
||||
$sql .= "AS outbound_duration, \n";
|
||||
|
||||
$sql .= "e.description \n";
|
||||
$sql .= "FROM v_extensions as e, v_domains as d \n";
|
||||
$sql .= "WHERE d.domain_uuid = e.domain_uuid \n";
|
||||
|
||||
$sql .= "FROM v_extensions AS e, v_domains AS d, \n";
|
||||
$sql .= "( SELECT \n";
|
||||
$sql .= " domain_uuid, \n";
|
||||
$sql .= " caller_id_number, \n";
|
||||
$sql .= " destination_number, \n";
|
||||
$sql .= " answer_stamp, \n";
|
||||
$sql .= " bridge_uuid, \n";
|
||||
$sql .= " direction, \n";
|
||||
$sql .= " start_stamp, \n";
|
||||
$sql .= " hangup_cause, \n";
|
||||
$sql .= " billsec \n";
|
||||
$sql .= " FROM v_xml_cdr \n";
|
||||
$sql .= " WHERE domain_uuid = '".$this->domain_uuid."' \n";
|
||||
$sql .= $sql_date_range;
|
||||
$sql .= ") AS c \n";
|
||||
|
||||
$sql .= "WHERE \n";
|
||||
$sql .= "d.domain_uuid = e.domain_uuid \n";
|
||||
if (!($_GET['showall'] && permission_exists('xml_cdr_all'))) {
|
||||
$sql .= "AND e.domain_uuid = '".$this->domain_uuid."' \n";
|
||||
$sql .= "AND e.domain_uuid = '".$this->domain_uuid."' \n";
|
||||
}
|
||||
$sql .= "ORDER BY extension ASC\n";
|
||||
//echo $sql;
|
||||
$sql .= "GROUP BY e.extension, e.domain_uuid, d.domain_uuid, e.number_alias, e.description \n";
|
||||
$sql .= "ORDER BY extension ASC \n";
|
||||
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$summary = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
@@ -239,6 +239,23 @@
|
||||
$database->fields['recording_file'] = $recording_file;
|
||||
}
|
||||
|
||||
//dynamic cdr fields
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$fields = explode(",", $field);
|
||||
$field_name = end($fields);
|
||||
if (count($fields) == 1) {
|
||||
$database->fields[$field_name] = urldecode($xml->variables->$fields[0]);
|
||||
}
|
||||
if (count($fields) == 2) {
|
||||
$database->fields[$field_name] = urldecode($xml->$fields[0]->$fields[1]);
|
||||
}
|
||||
if (count($fields) == 3) {
|
||||
$database->fields[$field_name] = urldecode($xml->$fields[0]->$fields[1]->$fields[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//save to the database in xml format
|
||||
if ($_SESSION['cdr']['format']['text'] == "xml" && $_SESSION['cdr']['storage']['text'] == "db") {
|
||||
$database->fields['xml'] = check_str($xml_string);
|
||||
|
||||
+36
-4
@@ -109,11 +109,20 @@
|
||||
echo " <input type='hidden' name='remote_media_ip' value='".$remote_media_ip."'>\n";
|
||||
echo " <input type='hidden' name='network_addr' value='".$network_addr."'>\n";
|
||||
echo " <input type='hidden' name='bridge_uuid' value='".$bridge_uuid."'>\n";
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = $array[count($array) - 1];
|
||||
if (isset($_REQUEST[$field_name])) {
|
||||
echo " <input type='hidden' name='$field_name' value='".$$field_name."'>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($order_by)) {
|
||||
echo " <input type='hidden' name='order_by' value='".$order_by."'>\n";
|
||||
echo " <input type='hidden' name='order' value='".$order."'>\n";
|
||||
}
|
||||
if (permission_exists('xml_cdr_all' && $_REQUEST['showall'] == 'true')) {
|
||||
if (permission_exists('xml_cdr_all') && $_REQUEST['showall'] == 'true') {
|
||||
echo " <input type='hidden' name='showall' value='true'>\n";
|
||||
}
|
||||
echo " <table cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
@@ -143,7 +152,7 @@
|
||||
echo " <option value='pdf'>PDF</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
if ($paging_controls_mini != '') {
|
||||
if ($result_count == $rows_per_page && $paging_controls_mini != '') {
|
||||
echo " <td style='vertical-align: top; padding-left: 15px;'>".$paging_controls_mini."</td>\n";
|
||||
}
|
||||
echo " </tr>\n";
|
||||
@@ -361,6 +370,17 @@
|
||||
echo "<th>".$text['label-recording']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = $array[count($array) - 1];
|
||||
$field_label = ucwords(str_replace("_", " ", $field_name));
|
||||
$field_label = str_replace("Sip", "SIP", $field_label);
|
||||
if ($field_name != "destination_number") {
|
||||
echo th_order_by($field_name, $field_label, $order_by, $order, null, "style='text-align: right;'", $param);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: center;'", $param);
|
||||
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param);
|
||||
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param);
|
||||
@@ -545,6 +565,16 @@
|
||||
echo " <td valign='top' align='center' class='".$row_style[$c]."'> </td>\n";
|
||||
}
|
||||
}
|
||||
//dynamic cdr fields
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = $array[count($array) - 1];
|
||||
if ($field_name != "destination_number") {
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;' nowrap='nowrap'>".$row[$field_name] ."</td>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
//start
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;' nowrap='nowrap'>".$tmp_start_epoch."</td>\n";
|
||||
//tta (time to answer)
|
||||
@@ -648,7 +678,9 @@
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
echo "<br><br>";
|
||||
echo $paging_controls;
|
||||
if ($result_count == $rows_per_page) {
|
||||
echo $paging_controls;
|
||||
}
|
||||
echo "<br><br>";
|
||||
|
||||
// check or uncheck all checkboxes
|
||||
@@ -668,4 +700,4 @@
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -75,6 +75,15 @@
|
||||
$bridge_uuid = check_str($_REQUEST["network_addr"]);
|
||||
$order_by = check_str($_REQUEST["order_by"]);
|
||||
$order = check_str($_REQUEST["order"]);
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = end($array);
|
||||
if (isset($_REQUEST[$field_name])) {
|
||||
$$field_name = check_str($_REQUEST[$field_name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen(check_str($_REQUEST["mos_comparison"])) > 0) {
|
||||
switch(check_str($_REQUEST["mos_comparison"])) {
|
||||
case 'less': $mos_comparison = "<"; break;
|
||||
@@ -115,6 +124,18 @@
|
||||
$sql_where_ands[] = "destination_number like '".$mod_destination_number."'";
|
||||
}
|
||||
if (strlen($context) > 0) { $sql_where_ands[] = "context like '%".$context."%'"; }
|
||||
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = end($array);
|
||||
if (isset($$field_name)) {
|
||||
$$field_name = check_str($_REQUEST[$field_name]);
|
||||
$sql_where_ands[] = "$field_name like '%".$$field_name."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($start_stamp_begin) > 0 && strlen($start_stamp_end) > 0) { $sql_where_ands[] = "start_stamp BETWEEN '".$start_stamp_begin.":00.000' AND '".$start_stamp_end.":59.999'"; }
|
||||
else {
|
||||
if (strlen($start_stamp_begin) > 0) { $sql_where_ands[] = "start_stamp >= '".$start_stamp_begin.":00.000'"; }
|
||||
@@ -256,6 +277,15 @@
|
||||
$param .= "&bridge_uuid=".$bridge_uuid;
|
||||
$param .= "&mos_comparison=".$mos_comparison;
|
||||
$param .= "&mos_score=".$mos_score;
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = end($array);
|
||||
if (isset($$field_name)) {
|
||||
$param .= "&".$field_name."=".$$field_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($_GET['showall'] == 'true' && permission_exists('xml_cdr_all')) {
|
||||
$param .= "&showall=true";
|
||||
}
|
||||
@@ -343,7 +373,9 @@
|
||||
$sql .= "(xml IS NOT NULL OR json IS NOT NULL) AS raw_data_exists, ";
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$sql .= $field.", ";
|
||||
$array = explode(",", $field);
|
||||
$field_name = end($array);
|
||||
$sql .= $field_name.", ";
|
||||
}
|
||||
}
|
||||
$sql .= "accountcode, ";
|
||||
|
||||
+245
-226
@@ -23,245 +23,264 @@
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('xml_cdr_search_advanced')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//include
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('xml_cdr_search_advanced')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//send the header
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/header.php";
|
||||
|
||||
//javascript to toggle input/select boxes
|
||||
echo "<script type='text/javascript'>";
|
||||
echo " function toggle(field) {";
|
||||
echo " if (field == 'source') {";
|
||||
echo " document.getElementById('caller_extension_uuid').selectedIndex = 0;";
|
||||
echo " document.getElementById('caller_id_number').value = '';";
|
||||
echo " $('#caller_extension_uuid').toggle();";
|
||||
echo " $('#caller_id_number').toggle();";
|
||||
echo " if ($('#caller_id_number').is(':visible')) { $('#caller_id_number').focus(); } else { $('#caller_extension_uuid').focus(); }";
|
||||
echo " }";
|
||||
echo " }";
|
||||
echo "</script>";
|
||||
echo "<script type='text/javascript'>";
|
||||
echo " function toggle(field) {";
|
||||
echo " if (field == 'source') {";
|
||||
echo " document.getElementById('caller_extension_uuid').selectedIndex = 0;";
|
||||
echo " document.getElementById('caller_id_number').value = '';";
|
||||
echo " $('#caller_extension_uuid').toggle();";
|
||||
echo " $('#caller_id_number').toggle();";
|
||||
echo " if ($('#caller_id_number').is(':visible')) { $('#caller_id_number').focus(); } else { $('#caller_extension_uuid').focus(); }";
|
||||
echo " }";
|
||||
echo " }";
|
||||
echo "</script>";
|
||||
|
||||
//start the html form
|
||||
if (strlen(check_str($_GET['redirect'])) > 0) {
|
||||
echo "<form method='get' action='" . $_GET['redirect'] . ".php'>\n";
|
||||
} else {
|
||||
echo "<form method='get' action='xml_cdr.php'>\n";
|
||||
}
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='30%' nowrap='nowrap' valign='top'><b>Advanced Search</b></td>\n";
|
||||
echo " <td width='70%' align='right' valign='top'>";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php'\" value='Back'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='Search'>";
|
||||
echo " <br /><br />";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='30%' class='vncell' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-direction']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select name='direction' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($direction == "inbound") {
|
||||
echo " <option value='inbound' selected='selected'>".$text['label-inbound']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
||||
}
|
||||
if ($direction == "outbound") {
|
||||
echo " <option value='outbound' selected='selected'>".$text['label-outbound']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='outbound'>".$text['label-outbound']."</option>\n";
|
||||
}
|
||||
if ($direction == "local") {
|
||||
echo " <option value='local' selected='selected'>".$text['label-local']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='local'>".$text['label-local']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-caller_id_name']."</td>"; //source name
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='caller_id_name' value='$caller_id_name'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-caller_id_number']."</td>"; //source number
|
||||
echo " <td class='vtable'>";
|
||||
echo " <select class='formfld' name='caller_extension_uuid' id='caller_extension_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
$sql = "select extension_uuid, extension, number_alias from v_extensions ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "order by ";
|
||||
$sql .= "extension asc ";
|
||||
$sql .= ", number_alias asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement -> execute();
|
||||
$result_e = $prep_statement -> fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result_e as &$row) {
|
||||
$selected = ($row['extension_uuid'] == $caller_extension_uuid) ? "selected" : null;
|
||||
echo " <option value='".$row['extension_uuid']."' ".$selected.">".((is_numeric($row['extension'])) ? $row['extension'] : $row['number_alias']." (".$row['extension'].")")."</option>";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
echo " </select>\n";
|
||||
echo " <input type='text' class='formfld' style='display: none;' name='caller_id_number' id='caller_id_number' value='".$caller_id_number."'>\n";
|
||||
echo " <input type='button' id='btn_toggle_source' class='btn' name='' alt='".$text['button-back']."' value='◁' onclick=\"toggle('source');\">\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-destination']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='destination_number' value='$destination_number'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-context']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='context' value='$context'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-start_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_begin' placeholder='".$text['label-from']."' value='$start_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_end' placeholder='".$text['label-to']."' value='$start_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-answer_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_begin' placeholder='".$text['label-from']."' value='$answer_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_end' placeholder='".$text['label-to']."' value='$answer_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-end_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_begin' placeholder='".$text['label-from']."' value='$end_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_end' placeholder='".$text['label-to']."' value='$end_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-duration']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='duration' value='$duration'></td>";
|
||||
echo " </tr>";
|
||||
if (permission_exists('xml_cdr_all')) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['button-show_all']."</td>";
|
||||
echo " <td class='vtable'>\n";
|
||||
if (permission_exists('xml_cdr_all') && $_REQUEST['showall'] == "true") {
|
||||
echo " <input type='checkbox' class='formfld' name='showall' checked='checked' value='true'>";
|
||||
if (strlen(check_str($_GET['redirect'])) > 0) {
|
||||
echo "<form method='get' action='" . $_GET['redirect'] . ".php'>\n";
|
||||
} else {
|
||||
echo "<form method='get' action='xml_cdr.php'>\n";
|
||||
}
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='30%' nowrap='nowrap' valign='top'><b>Advanced Search</b></td>\n";
|
||||
echo " <td width='70%' align='right' valign='top'>";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php'\" value='Back'>";
|
||||
echo " <input type='submit' name='submit' class='btn' value='Search'>";
|
||||
echo " <br /><br />";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='30%' class='vncell' valign='top' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-direction']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <select name='direction' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($direction == "inbound") {
|
||||
echo " <option value='inbound' selected='selected'>".$text['label-inbound']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input type='checkbox' class='formfld' name='showall' value='true'>";
|
||||
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
||||
}
|
||||
echo " <td>";
|
||||
if ($direction == "outbound") {
|
||||
echo " <option value='outbound' selected='selected'>".$text['label-outbound']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='outbound'>".$text['label-outbound']."</option>\n";
|
||||
}
|
||||
if ($direction == "local") {
|
||||
echo " <option value='local' selected='selected'>".$text['label-local']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='local'>".$text['label-local']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-caller_id_name']."</td>"; //source name
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='caller_id_name' value='$caller_id_name'></td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-caller_id_number']."</td>"; //source number
|
||||
echo " <td class='vtable'>";
|
||||
echo " <select class='formfld' name='caller_extension_uuid' id='caller_extension_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
$sql = "select extension_uuid, extension, number_alias from v_extensions ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "order by ";
|
||||
$sql .= "extension asc ";
|
||||
$sql .= ", number_alias asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement -> execute();
|
||||
$result_e = $prep_statement -> fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result_e as &$row) {
|
||||
$selected = ($row['extension_uuid'] == $caller_extension_uuid) ? "selected" : null;
|
||||
echo " <option value='".$row['extension_uuid']."' ".$selected.">".((is_numeric($row['extension'])) ? $row['extension'] : $row['number_alias']." (".$row['extension'].")")."</option>";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
echo " </select>\n";
|
||||
echo " <input type='text' class='formfld' style='display: none;' name='caller_id_number' id='caller_id_number' value='".$caller_id_number."'>\n";
|
||||
echo " <input type='button' id='btn_toggle_source' class='btn' name='' alt='".$text['button-back']."' value='◁' onclick=\"toggle('source');\">\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-destination']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='destination_number' value='$destination_number'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-context']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='context' value='$context'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-start_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_begin' placeholder='".$text['label-from']."' value='$start_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='start_stamp_end' placeholder='".$text['label-to']."' value='$start_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-answer_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_begin' placeholder='".$text['label-from']."' value='$answer_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='answer_stamp_end' placeholder='".$text['label-to']."' value='$answer_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-end_range']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <div class='row'>\n";
|
||||
echo " <div class='col-sm-12'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_begin' placeholder='".$text['label-from']."' value='$end_stamp_begin'>";
|
||||
echo " <input type='text' class='formfld datetimepicker' style='min-width: 115px; width: 115px;' name='end_stamp_end' placeholder='".$text['label-to']."' value='$end_stamp_end'>";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-duration']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='duration' value='$duration'></td>";
|
||||
echo " </tr>";
|
||||
if (permission_exists('xml_cdr_all')) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['button-show_all']."</td>";
|
||||
echo " <td class='vtable'>\n";
|
||||
if (permission_exists('xml_cdr_all') && $_REQUEST['showall'] == "true") {
|
||||
echo " <input type='checkbox' class='formfld' name='showall' checked='checked' value='true'>";
|
||||
}
|
||||
else {
|
||||
echo " <input type='checkbox' class='formfld' name='showall' value='true'>";
|
||||
}
|
||||
echo " <td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
echo " </td>";
|
||||
echo " <td width='50%' style='vertical-align: top;'>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>";
|
||||
echo " <td width='30%' class='vncell'>".$text['label-billsec']."</td>";
|
||||
echo " <td width='70%' class='vtable'><input type='text' class='formfld' name='billsec' value='$billsec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-hangup_cause']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='hangup_cause' value='$hangup_cause'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-uuid']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='uuid' value='$uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-bridge_uuid']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='bleg_uuid' value='$bridge_uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-accountcode']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='accountcode' value='$accountcode'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-read_codec']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='read_codec' value='$read_codec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-write_codec']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='write_codec' value='$write_codec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-remote_media_ip']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='remote_media_ip' value='$remote_media_ip'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-network_addr']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='network_addr' value='$network_addr'></td>";
|
||||
echo " </tr>";
|
||||
if (is_array($_SESSION['cdr']['field'])) {
|
||||
foreach ($_SESSION['cdr']['field'] as $field) {
|
||||
$array = explode(",", $field);
|
||||
$field_name = end($array);
|
||||
$field_label = ucwords(str_replace("_", " ", $field_name));
|
||||
$field_label = str_replace("Sip", "SIP", $field_label);
|
||||
if ($field_name != "destination_number") {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$field_label."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='".$field_name."' value='".$$field_name."'></td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-mos_score']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <select name='mos_comparison' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " <option value='less'><</option>\n";
|
||||
echo " <option value='greater'>></option>\n";
|
||||
echo " <option value='lessorequal'><=</option>\n";
|
||||
echo " <option value='greaterorequal'>>=</option>\n";
|
||||
echo " <option value='equal'>=</option>\n";
|
||||
echo " <option value='notequal'><></option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='text' class='formfld' name='mos_score' value='$mos_score'>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'><br>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-search']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo " </td>";
|
||||
echo " <td width='50%' style='vertical-align: top;'>\n";
|
||||
//include footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>";
|
||||
echo " <td width='30%' class='vncell'>".$text['label-billsec']."</td>";
|
||||
echo " <td width='70%' class='vtable'><input type='text' class='formfld' name='billsec' value='$billsec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-hangup_cause']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='hangup_cause' value='$hangup_cause'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-uuid']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='uuid' value='$uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-bridge_uuid']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='bleg_uuid' value='$bridge_uuid'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-accountcode']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='accountcode' value='$accountcode'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-read_codec']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='read_codec' value='$read_codec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-write_codec']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='write_codec' value='$write_codec'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-remote_media_ip']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='remote_media_ip' value='$remote_media_ip'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-network_addr']."</td>";
|
||||
echo " <td class='vtable'><input type='text' class='formfld' name='network_addr' value='$network_addr'></td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell'>".$text['label-mos_score']."</td>";
|
||||
echo " <td class='vtable'>";
|
||||
echo " <select name='mos_comparison' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo " <option value='less'><</option>\n";
|
||||
echo " <option value='greater'>></option>\n";
|
||||
echo " <option value='lessorequal'><=</option>\n";
|
||||
echo " <option value='greaterorequal'>>=</option>\n";
|
||||
echo " <option value='equal'>=</option>\n";
|
||||
echo " <option value='notequal'><></option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='text' class='formfld' name='mos_score' value='$mos_score'>\n";
|
||||
echo " </td>";
|
||||
echo " </tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'><br>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-search']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -35,6 +35,393 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
//default settings
|
||||
$y = 0;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3bcb4912-e34c-45b0-8612-662783ee8d1b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'server';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'temp';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'dir';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = sys_get_temp_dir();
|
||||
$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'] = 'f1a7c2d4-ba3c-49c8-9146-e40eb8873030';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'template';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'name';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'default';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'da9aa071-5dd8-4955-b5a6-d3c60ce7d78a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'menu';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'uuid';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'b4750c3f-2a86-b00d-b7d0-345c14eca286';
|
||||
$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'] = '500f7a88-e288-4a80-9f0a-b696f9f33cd6';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'language';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'code';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'en-us';
|
||||
$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'] = 'c55b28df-0eba-4e8f-a13b-022d5dfd8d22';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'time_zone';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'name';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = 'cb55e6ac-9bb0-4714-b68f-82b39a3b9ec2';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'country';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'code';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'us';
|
||||
$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'] = 'c338e26c-0dd5-4ad5-a055-82e2c5ed3f6f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'bridge';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'outbound';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'outbound,loopback,lcr';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '48874632-421d-4829-a6b7-0695c589d85f';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'domain';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'paging';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '100';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the maximum number of records displayed per page. (Default: 50)';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '57d81b35-bc24-4e92-8436-4335ab5e9d0b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_length';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '10';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the required/default length for user/system generated passwords.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '0fa21a56-7515-4c65-b5f8-270cc24ea375';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_number';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set whether to require at least one number in user passwords.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd5f9acbd-857c-42eb-9e9a-92a850fcb734';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_lowercase';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set whether to require at least one lowecase letter in user passwords.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '256b0d87-a43e-4618-b96b-541e191879c7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_uppercase';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set whether to require at least one uppercase letter in user passwords.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '4209ff1f-6ea8-4b77-81be-bd75e8670785';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_special';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set whether to require at least one special character in user passwords.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '718b1641-fa3c-4861-b1f3-40635c951888';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_strength';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '4';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Set the default strength for system generated passwords. Valid Options: 1 - Numeric Only, 2 - Include Lower Apha, 3 - Include Upper Alpha, 4 - Include Special Characters.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '33914c55-9081-4b95-b62e-f1a500088d78';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'security';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'session_rotate';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Whether to regenerate the session ID.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '97a2410b-cfc8-4194-9172-dd5b0acfa9f3';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_auth';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = '';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '9f4a1209-72ba-435b-90e1-4cba48d74509';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'method';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'smtp';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'smtp|sendmail|mail|qmail';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8efff742-eea4-493d-abeb-064457586e26';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_port';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'numeric';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '0';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'use non-default port if enabled and non-zero';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '16f40b7b-293d-4308-81f4-772e0ea4c536';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_from';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = '2976da3a-d8e5-4e25-9f16-463dfa256f4d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_from_name';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = '0bd788c1-3262-4336-92f4-ef7869062380';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_host';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = '49e778a6-22a7-418f-84b9-bfa27e38f2e5';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_username';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = '8a5ae059-9bf3-4d6d-ae92-b6cb39766d0a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_password';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = '';
|
||||
$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'] = 'fd7441d5-d348-4660-8c0b-6413220c680d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_secure';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'var';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'tls';
|
||||
$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'] = 'e1c17089-1e75-4e46-9e59-4748bb6a6cec';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'email';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'smtp_validate_certificate';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'set to false to ignore SSL certificate warnings e.g. for self-signed certificates';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8a07ab78-f386-482c-85dd-7ce8127597d6';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'login';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'password_reset_key';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'text';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = generate_password('20', '4');
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Display a Reset Password link on the login box (requires smtp_host be defined).';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '962ac32c-74ce-4cce-b1d9-89f4d921493d';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'login';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'domain_name_visible';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'boolean';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Displays a domain input or select box (if domain_name array defined) on the login box.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '796508ee-894d-4566-bb7f-e1269a6e0e26';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'login';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'domain_name';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'pbx1.yourdomain.com';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Domain select option displayed on the login box.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'e20ff5fb-cc63-474b-90f8-f472d2247317';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '39bdd07e-dca5-4aea-949b-72286bd66fe4';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'missed';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '49dbc472-7c68-46b7-84da-986b3e925850';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'recent';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '08095792-7fa7-4d6d-9fc4-d1ba8b4f80b7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'limits';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd8ee1c50-0c3f-41b8-879a-d0b9c58e4479';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'counts';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Domain Counts block for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '5d96872d-7828-489e-b87a-0e7b75cf1a84';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'call_routing';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'f7ca9dc1-b06e-4477-94c6-c660792ebe6c';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'admin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'ring_groups';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the admin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '610cfc85-7a17-4c96-a7c7-a83054710bc1';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'e5064608-707a-456d-8b1d-d658e7f1b8f8';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'missed';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'da9dc1a2-5d10-4fa4-82f9-0baebc1f8222';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'recent';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'b15264cf-9200-458f-a71a-5967ee7118a7';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'limits';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'false';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '3aa6b8d3-bd6d-4f4f-9a62-104f3452f31b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'counts';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard System Counts block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '13387e37-bf0a-43ca-a24f-94339bd61208';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'system';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard System Status block for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8ca6fc59-9243-4a4f-9358-006469cf828a';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'call_routing';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '78bb45d5-8108-4bed-aced-d764575531dc';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'superadmin';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'ring_groups';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the superadmin group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'd2bf2781-18c2-44a4-bdf4-68516e68d69c';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'voicemail';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the users group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '22f90e1b-112c-4842-af77-376226e5aa46';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'missed';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the users group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'f1bf3d93-29ce-4c3e-8e91-e8ec36d1220b';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'recent';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the users group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = '8f74f69b-58f1-4040-9d4e-e949d384a915';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'call_routing';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the users group.';
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = 'f4e9247b-bfd1-40ed-9a1e-920e7d9ed2bb';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = 'dashboard';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = 'user';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = 'array';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = 'ring_groups';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = 'true';
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the users group.';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
@@ -45,6 +432,11 @@
|
||||
$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'] = "app_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)";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "default_setting_category";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
||||
@@ -121,4 +513,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "The calling code.";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -27,432 +27,15 @@
|
||||
//process this only one time
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$array[$x]['default_setting_category'] = 'server';
|
||||
$array[$x]['default_setting_subcategory'] = 'temp';
|
||||
$array[$x]['default_setting_name'] = 'dir';
|
||||
$array[$x]['default_setting_value'] = sys_get_temp_dir();
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'domain';
|
||||
$array[$x]['default_setting_subcategory'] = 'time_zone';
|
||||
$array[$x]['default_setting_name'] = 'name';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'domain';
|
||||
$array[$x]['default_setting_subcategory'] = 'language';
|
||||
$array[$x]['default_setting_name'] = 'code';
|
||||
$array[$x]['default_setting_value'] = 'en-us';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'domain';
|
||||
$array[$x]['default_setting_subcategory'] = 'bridge';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'outbound';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'outbound,loopback,lcr';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'domain';
|
||||
$array[$x]['default_setting_subcategory'] = 'paging';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '100';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the maximum number of records displayed per page. (Default: 50)';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_length';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '10';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the required/default length for user/system generated passwords.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_number';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set whether to require at least one number in user passwords.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_lowercase';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set whether to require at least one lowecase letter in user passwords.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_uppercase';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set whether to require at least one uppercase letter in user passwords.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_special';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set whether to require at least one special character in user passwords.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_strength';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '4';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the default strength for system generated passwords. Valid Options: 1 - Numeric Only, 2 - Include Lower Apha, 3 - Include Upper Alpha, 4 - Include Special Characters.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'session_rotate';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Whether to regenerate the session ID.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_auth';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'method';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'smtp';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'smtp|sendmail|mail|qmail';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_port';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '0';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'use non-default port if enabled and non-zero';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_from';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_from_name';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_host';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_username';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_password';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = '';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_secure';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
$array[$x]['default_setting_value'] = 'tls';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = '';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'email';
|
||||
$array[$x]['default_setting_subcategory'] = 'smtp_validate_certificate';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'set to false to ignore SSL certificate warnings e.g. for self-signed certificates';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'login';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_reset_key';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = generate_password('20', '4');
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Display a Reset Password link on the login box (requires smtp_host be defined).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'login';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_name_visible';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Displays a domain input or select box (if domain_name array defined) on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'login';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_name';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'pbx1.yourdomain.com';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Domain select option displayed on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'voicemail';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'missed';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'recent';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'limits';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'counts';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Counts block for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'call_routing';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'admin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'ring_groups';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the admin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'voicemail';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'missed';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'recent';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'limits';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Domain Limits block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'counts';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard System Counts block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'system';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard System Status block for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'call_routing';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'superadmin';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'ring_groups';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the superadmin group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'user';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'voicemail';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Voicemail block for users in the users group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'user';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'missed';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Missed Calls block for users in the users group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'user';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'recent';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Recent Calls block for users in the users group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'user';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'call_routing';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Call Routing controls for users in the users group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'dashboard';
|
||||
$array[$x]['default_setting_subcategory'] = 'user';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'ring_groups';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Enable Dashboard Ring Group Forwarding controls for users in the users group.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'voicemail_file';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'attach';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Define whether to attach voicemail files to email notifications, or only include a link.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'keep_local';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Define whether to keep voicemail files on the local system after sending attached via email.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'storage_type';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'base64';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Define which storage type (base_64 stores in the database).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'message_max_length';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '300';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Maximum length of a voicemail (in seconds).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_length';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '8';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'The default length of characters in a voicemail password.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'greeting_max_length';
|
||||
$array[$x]['default_setting_name'] = 'numeric';
|
||||
$array[$x]['default_setting_value'] = '90';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Maximum length of a voicemail greeting (in seconds).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'voicemail';
|
||||
$array[$x]['default_setting_subcategory'] = 'display_domain_name';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Enable display of @domain_name after voicemail_id when rendering emails.';
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//find the missing default settings
|
||||
$x = 0;
|
||||
foreach ($array as $setting) {
|
||||
$found = false;
|
||||
$missing[$x] = $setting;
|
||||
foreach ($default_settings as $row) {
|
||||
if (trim($row['default_setting_subcategory']) == trim($setting['default_setting_subcategory']) && trim($row['default_setting_name']) == trim($setting['default_setting_name'])) {
|
||||
$found = true;
|
||||
//remove items from the array that were found
|
||||
unset($missing[$x]);
|
||||
}
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
//get the missing count
|
||||
$i = 0;
|
||||
foreach ($missing as $row) { $i++; }
|
||||
$missing_count = $i;
|
||||
|
||||
//add the missing default settings
|
||||
if (count($missing) > 0) {
|
||||
$sql = "insert into v_default_settings (";
|
||||
$sql .= "default_setting_uuid, ";
|
||||
$sql .= "default_setting_category, ";
|
||||
$sql .= "default_setting_subcategory, ";
|
||||
$sql .= "default_setting_name, ";
|
||||
$sql .= "default_setting_value, ";
|
||||
$sql .= "default_setting_enabled, ";
|
||||
$sql .= "default_setting_description ";
|
||||
$sql .= ") values \n";
|
||||
$i = 1;
|
||||
foreach ($missing as $row) {
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'".check_str($row['default_setting_category'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_subcategory'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_name'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_value'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_enabled'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_description'])."' ";
|
||||
$sql .= ")";
|
||||
if ($missing_count != $i) {
|
||||
$sql .= ",\n";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$db->exec(check_sql($sql));
|
||||
unset($missing);
|
||||
}
|
||||
//set domains with enabled status of empty or null to true
|
||||
$sql = "delete from v_default_settings ";
|
||||
$sql .= "where (default_setting_category is null and default_setting_subcategory is null) ";
|
||||
$sql .= "or (default_setting_category = '' and default_setting_subcategory = '') ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//move the dynamic provision variables that from v_vars table to v_default_settings
|
||||
if (count($_SESSION['provision']) == 0) {
|
||||
/* if (count($_SESSION['provision']) == 0) {
|
||||
$sql = "select * from v_vars ";
|
||||
$sql .= "where var_cat = 'Provision' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -497,6 +80,7 @@ if ($domains_processed == 1) {
|
||||
//$db->exec(check_sql($sql));
|
||||
//echo "$var_name $var_value \n";
|
||||
}
|
||||
*/
|
||||
|
||||
//populate the languages table, if necessary
|
||||
$sql = "select count(*) as num_rows from v_languages";
|
||||
|
||||
@@ -116,6 +116,11 @@
|
||||
$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'] = "app_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)";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_setting_category";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
||||
@@ -144,4 +149,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -121,7 +121,7 @@ class events {
|
||||
/**
|
||||
* check for required headers
|
||||
* @param string $category
|
||||
* @return bolean $value
|
||||
* @return boolean $value
|
||||
*/
|
||||
public function check_required($category) {
|
||||
foreach ($this->required['headers'] as &$header) {
|
||||
@@ -161,4 +161,4 @@ class events {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -24,32 +24,33 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
|
||||
if ($domains_processed == 1) {
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//update the notifications table
|
||||
$sql = "select count(*) as num_rows from v_notifications ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
$sql = "insert into v_notifications ";
|
||||
$sql .= "(";
|
||||
$sql .= "notification_uuid, ";
|
||||
$sql .= "project_notifications ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'false' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
unset($prep_statement, $row);
|
||||
//update the notifications table
|
||||
if (is_array($_SESSION['switch']['scripts'])) {
|
||||
$sql = "select count(*) as num_rows from v_notifications ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
$sql = "insert into v_notifications ";
|
||||
$sql .= "(";
|
||||
$sql .= "notification_uuid, ";
|
||||
$sql .= "project_notifications ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'false' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
unset($prep_statement, $row);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -85,7 +85,7 @@ if ($domains_processed == 1) {
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'e2bff94b-2c68-45ee-9141-d4cdb437c644', ";
|
||||
$sql .= "'login', ";
|
||||
$sql .= "'message', ";
|
||||
$sql .= "'text', ";
|
||||
@@ -133,4 +133,4 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// set included, if not
|
||||
if (!isset($included)) { $included = false; }
|
||||
|
||||
//check the permission
|
||||
if(defined('STDIN')) {
|
||||
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
|
||||
@@ -57,4 +54,4 @@
|
||||
$domain = new domains;
|
||||
$domain->upgrade();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
preg_match("/^(.*)\/core\/.*$/", $document_root, $matches);
|
||||
$document_root = $matches[1];
|
||||
set_include_path($document_root);
|
||||
require_once "resources/require.php";
|
||||
include "root.php";
|
||||
include "resources/functions.php";
|
||||
require_once "resources/classes/text.php";
|
||||
$_SERVER["DOCUMENT_ROOT"] = $document_root;
|
||||
$format = 'text'; //html, text
|
||||
|
||||
@@ -228,6 +228,9 @@ if (!class_exists('domains')) {
|
||||
//get the PROJECT PATH
|
||||
include "root.php";
|
||||
|
||||
//check for default settings
|
||||
$this->settings();
|
||||
|
||||
//get the list of installed apps from the core and app directories (note: GLOB_BRACE doesn't work on some systems)
|
||||
$config_list_1 = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php");
|
||||
$config_list_2 = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_menu.php");
|
||||
@@ -263,6 +266,7 @@ if (!class_exists('domains')) {
|
||||
$database_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset($prep_statement);
|
||||
|
||||
|
||||
//get the domain_uuid
|
||||
foreach($domains as $row) {
|
||||
if (count($domains) == 1) {
|
||||
@@ -363,7 +367,114 @@ if (!class_exists('domains')) {
|
||||
unset($_SESSION['domain']);
|
||||
unset($_SESSION['switch']);
|
||||
|
||||
}
|
||||
} //end upgrade method
|
||||
|
||||
public function settings() {
|
||||
|
||||
//connect to the database if not connected
|
||||
if (!$this->db) {
|
||||
require_once "resources/classes/database.php";
|
||||
$database = new database;
|
||||
$database->connect();
|
||||
$this->db = $database->db;
|
||||
}
|
||||
|
||||
//get the list of installed apps from the core and mod directories
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x=0;
|
||||
foreach ($config_list as $config_path) {
|
||||
include($config_path);
|
||||
$x++;
|
||||
}
|
||||
$x = 0;
|
||||
foreach ($apps as $app) {
|
||||
if (is_array($app['default_settings'])) {
|
||||
foreach ($app['default_settings'] as $setting) {
|
||||
$array[$x] = ($setting);
|
||||
$array[$x]['app_uuid'] = $app['uuid'];
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "order by default_setting_category asc, default_setting_subcategory asc";
|
||||
$prep_statement = $this->db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//named array
|
||||
foreach ($default_settings as $row) {
|
||||
$default_settings[$row['default_setting_category']][$row['default_setting_subcategory']][$row['default_setting_name']]['uuid'] = $row['default_setting_uuid'];
|
||||
$default_settings[$row['default_setting_category']][$row['default_setting_subcategory']][$row['default_setting_name']]['value'] = $row['default_setting_value'];
|
||||
$default_settings[$row['default_setting_category']][$row['default_setting_subcategory']][$row['default_setting_name']]['app_uuid'] = $row['app_uuid'];
|
||||
//echo "[".$row['default_setting_category']."][".$row['default_setting_subcategory']."][".$row['default_setting_name']."] = ".$row['default_setting_value']."\n";
|
||||
}
|
||||
|
||||
//update matching settings with the correct default_setting_uuid and app_uuid and if they exist remove them from the array
|
||||
$x = 0;
|
||||
foreach ($array as $row) {
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
$name = $row['default_setting_name'];
|
||||
|
||||
if (isset($default_settings[$category][$subcategory][$name]['value'])) {
|
||||
//set the variables
|
||||
$default_setting_uuid = $default_settings[$category][$subcategory][$name]['uuid'];
|
||||
$app_uuid = $default_settings[$category][$subcategory][$name]['app_uuid'];
|
||||
//update matching settings
|
||||
if ($app_uuid == null) {
|
||||
$sql = "update v_default_settings set ";
|
||||
if ($default_setting_uuid != $row['default_setting_uuid']) {
|
||||
$sql .= "default_setting_uuid = '".$row['default_setting_uuid']."', ";
|
||||
}
|
||||
$sql .= "app_uuid = '".$row['app_uuid']."' ";
|
||||
$sql .= "where default_setting_uuid = '".$row['default_setting_uuid']."';";
|
||||
//echo $category." ".$subcategory." ".$name." ".$app_uuid."\n";
|
||||
//echo $sql."\n";
|
||||
$this->db->exec(check_sql($sql));
|
||||
//echo "\n";
|
||||
}
|
||||
|
||||
//remove settings from the array that were found
|
||||
unset($array[$x]);
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
unset($default_settings);
|
||||
|
||||
//get the missing count
|
||||
$array_count = count($array);
|
||||
|
||||
//add the missing default settings
|
||||
if (is_array($array) && count($array) > 0) {
|
||||
foreach ($array as $row) {
|
||||
$sql = "insert into v_default_settings (";
|
||||
$sql .= "default_setting_uuid, ";
|
||||
$sql .= "default_setting_category, ";
|
||||
$sql .= "default_setting_subcategory, ";
|
||||
$sql .= "default_setting_name, ";
|
||||
$sql .= "default_setting_value, ";
|
||||
$sql .= "default_setting_enabled, ";
|
||||
$sql .= "default_setting_description ";
|
||||
$sql .= ") values \n";
|
||||
$sql .= "(";
|
||||
$sql .= "'".check_str($row['default_setting_uuid'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_category'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_subcategory'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_name'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_value'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_enabled'])."', ";
|
||||
$sql .= "'".check_str($row['default_setting_description'])."' ";
|
||||
$sql .= ");";
|
||||
//echo $sql."\n";
|
||||
$this->db->exec(check_sql($sql));
|
||||
unset($array);
|
||||
}
|
||||
}
|
||||
} //end settings method
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,11 @@ class event_socket {
|
||||
}
|
||||
|
||||
public function connect($host, $port, $password) {
|
||||
//set defaults
|
||||
if ($host == '') { $host = '127.0.0.1'; }
|
||||
if ($port == '') { $port = '8021'; }
|
||||
if ($password == '') { $password = 'ClueCon'; }
|
||||
|
||||
$fp = fsockopen($host, $port, $errno, $errdesc, 3);
|
||||
|
||||
if (!$fp) {
|
||||
|
||||
@@ -91,27 +91,32 @@ if (!class_exists('groups')) {
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
if (count($result) == 0) {
|
||||
$x = 0;
|
||||
$tmp[$x]['group_name'] = 'superadmin';
|
||||
$tmp[$x]['group_description'] = 'Super Administrator Group';
|
||||
$tmp[$x]['group_protected'] = 'false';
|
||||
//$groups[$x]['group_uuid'] = '';
|
||||
$groups[$x]['group_name'] = 'superadmin';
|
||||
$groups[$x]['group_description'] = 'Super Administrator Group';
|
||||
$groups[$x]['group_protected'] = 'false';
|
||||
$x++;
|
||||
$tmp[$x]['group_name'] = 'admin';
|
||||
$tmp[$x]['group_description'] = 'Administrator Group';
|
||||
$tmp[$x]['group_protected'] = 'false';
|
||||
//$groups[$x]['group_uuid'] = '';
|
||||
$groups[$x]['group_name'] = 'admin';
|
||||
$groups[$x]['group_description'] = 'Administrator Group';
|
||||
$groups[$x]['group_protected'] = 'false';
|
||||
$x++;
|
||||
$tmp[$x]['group_name'] = 'user';
|
||||
$tmp[$x]['group_description'] = 'User Group';
|
||||
$tmp[$x]['group_protected'] = 'false';
|
||||
//$groups[$x]['group_uuid'] = '';
|
||||
$groups[$x]['group_name'] = 'user';
|
||||
$groups[$x]['group_description'] = 'User Group';
|
||||
$groups[$x]['group_protected'] = 'false';
|
||||
$x++;
|
||||
$tmp[$x]['group_name'] = 'public';
|
||||
$tmp[$x]['group_description'] = 'Public Group';
|
||||
$tmp[$x]['group_protected'] = 'false';
|
||||
//$groups[$x]['group_uuid'] = '';
|
||||
$groups[$x]['group_name'] = 'public';
|
||||
$groups[$x]['group_description'] = 'Public Group';
|
||||
$groups[$x]['group_protected'] = 'false';
|
||||
$x++;
|
||||
$tmp[$x]['group_name'] = 'agent';
|
||||
$tmp[$x]['group_description'] = 'Call Center Agent Group';
|
||||
$tmp[$x]['group_protected'] = 'false';
|
||||
//$groups[$x]['group_uuid'] = '';
|
||||
$groups[$x]['group_name'] = 'agent';
|
||||
$groups[$x]['group_description'] = 'Call Center Agent Group';
|
||||
$groups[$x]['group_protected'] = 'false';
|
||||
$this->db->beginTransaction();
|
||||
foreach($tmp as $row) {
|
||||
foreach($groups as $row) {
|
||||
if (strlen($row['group_name']) > 0) {
|
||||
$sql = "insert into v_groups ";
|
||||
$sql .= "(";
|
||||
@@ -156,8 +161,8 @@ if (!class_exists('groups')) {
|
||||
//no permissions found add the defaults
|
||||
$this->db->beginTransaction();
|
||||
foreach($apps as $app) {
|
||||
foreach ($app['permissions'] as $row) {
|
||||
foreach ($row['groups'] as $group) {
|
||||
if (is_array($app['permissions'])) foreach ($app['permissions'] as $row) {
|
||||
if (is_array($row['groups'])) foreach ($row['groups'] as $group) {
|
||||
//add the record
|
||||
$sql = "insert into v_group_permissions ";
|
||||
$sql .= "(";
|
||||
@@ -188,4 +193,4 @@ if (!class_exists('groups')) {
|
||||
$group = new groups;
|
||||
$group->defaults();
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -348,12 +348,12 @@ if (!class_exists('schema')) {
|
||||
|
||||
//database create table
|
||||
public function db_create_table ($apps, $db_type, $table) {
|
||||
foreach ($apps as $x => &$app) {
|
||||
foreach ($app['db'] as $y => $row) {
|
||||
if (is_array($apps)) foreach ($apps as $x => &$app) {
|
||||
if (is_array($app['db'])) foreach ($app['db'] as $y => $row) {
|
||||
if ($row['table'] == $table) {
|
||||
$sql = "CREATE TABLE " . $row['table'] . " (\n";
|
||||
$field_count = 0;
|
||||
foreach ($row['fields'] as $field) {
|
||||
if (is_array($row['fields'])) foreach ($row['fields'] as $field) {
|
||||
if ($field['deprecated'] == "true") {
|
||||
//skip this row
|
||||
}
|
||||
@@ -463,6 +463,7 @@ if (!class_exists('schema')) {
|
||||
if ($format=='') $format = $output_format;
|
||||
|
||||
//get the db variables
|
||||
require_once "resources/classes/config.php";
|
||||
$config = new config;
|
||||
$config_exists = $config->exists();
|
||||
$config_path = $config->find();
|
||||
@@ -886,3 +887,5 @@ if (!class_exists('schema')) {
|
||||
//$obj->schema();
|
||||
//$result_array = $schema->obj['sql'];
|
||||
//print_r($result_array);
|
||||
|
||||
?>
|
||||
|
||||
@@ -74,9 +74,6 @@ if (!class_exists('switch_settings')) {
|
||||
//run the api command
|
||||
$result = $esl->request('api global_getvar');
|
||||
|
||||
//close event socket
|
||||
fclose($fp);
|
||||
|
||||
//set the result as a named array
|
||||
$vars = array();
|
||||
foreach (explode("\n", $result) as $row) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
if (!function_exists('software_version')) {
|
||||
function software_version() {
|
||||
return '4.2.1';
|
||||
return '4.2.2';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,8 +143,7 @@
|
||||
|
||||
if (!function_exists('is_uuid')) {
|
||||
function is_uuid($uuid) {
|
||||
//uuid version 4
|
||||
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';
|
||||
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i';
|
||||
return preg_match($regex, $uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
-- Contributor(s):
|
||||
-- Salvatore Caruso <salvatore.caruso@nems.it>
|
||||
-- Riccardo Granchi <riccardo.granchi@nems.it>
|
||||
-- Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||
|
||||
--debug
|
||||
debug["info"] = false;
|
||||
@@ -114,17 +115,19 @@
|
||||
dialed_user = session:getVariable("dialed_user");
|
||||
missed_call_app = session:getVariable("missed_call_app");
|
||||
missed_call_data = session:getVariable("missed_call_data");
|
||||
sip_code = session:getVariable("last_bridge_proto_specific_hangup_cause");
|
||||
|
||||
if (debug["info"] == true) then
|
||||
freeswitch.consoleLog("INFO", "[failure_handler] originate_causes: " .. tostring(originate_causes) .. "\n");
|
||||
freeswitch.consoleLog("INFO", "[failure_handler] originate_disposition: " .. tostring(originate_disposition) .. "\n");
|
||||
freeswitch.consoleLog("INFO", "[failure_handler] hangup_on_subscriber_absent: " .. tostring(hangup_on_subscriber_absent) .. "\n");
|
||||
freeswitch.consoleLog("INFO", "[failure_handler] hangup_on_call_reject: " .. tostring(hangup_on_call_reject) .. "\n");
|
||||
freeswitch.consoleLog("INFO", "[failure_handler] sip_code: " .. tostring(sip_code) .. "\n");
|
||||
end
|
||||
|
||||
if (originate_causes ~= nil) then
|
||||
array = explode("|",originate_causes);
|
||||
if (string.find(array[1], "USER_BUSY")) then
|
||||
if (string.find(array[1], "USER_BUSY")) or (sip_code == "sip:486") then
|
||||
originate_disposition = "USER_BUSY";
|
||||
session:setVariable("originate_disposition", originate_disposition);
|
||||
end
|
||||
@@ -166,7 +169,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
elseif (originate_disposition == "NO_ANSWER") then
|
||||
elseif (originate_disposition == "NO_ANSWER") or (sip_code == "sip:480") then
|
||||
|
||||
--handle NO_ANSWER
|
||||
forward_no_answer_enabled = session:getVariable("forward_no_answer_enabled");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- Part of FusionPBX
|
||||
-- Copyright (C) 2013-2016 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- Copyright (C) 2013-2017 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- All rights reserved.
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
@@ -12,7 +12,7 @@
|
||||
-- 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,
|
||||
-- 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,
|
||||
@@ -37,8 +37,8 @@
|
||||
direct_dial["max_digits"] = 4;
|
||||
|
||||
--debug
|
||||
debug["info"] = false;
|
||||
debug["sql"] = false;
|
||||
debug["info"] = true;
|
||||
debug["sql"] = true;
|
||||
|
||||
--get the argv values
|
||||
script_name = argv[1];
|
||||
@@ -321,7 +321,7 @@
|
||||
if (voicemail_action == "save") then
|
||||
|
||||
--check the voicemail quota
|
||||
if (vm_disk_quota) then
|
||||
if (voicemail_id ~= nil and vm_disk_quota ~= nil) then
|
||||
--get voicemail message seconds
|
||||
local sql = [[SELECT coalesce(sum(message_length), 0) as message_sum FROM v_voicemail_messages
|
||||
WHERE domain_uuid = :domain_uuid
|
||||
@@ -336,6 +336,8 @@
|
||||
if (tonumber(vm_disk_quota) <= tonumber(message_sum)) then
|
||||
--play message mailbox full
|
||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-mailbox_full.wav")
|
||||
--hangup
|
||||
session:hangup("NORMAL_CLEARING");
|
||||
--set the voicemail_uuid to nil to prevent saving the voicemail
|
||||
voicemail_uuid = nil;
|
||||
end
|
||||
@@ -529,12 +531,15 @@
|
||||
|
||||
else
|
||||
--voicemail not enabled or does not exist
|
||||
referred_by = session:getVariable("sip_h_Referred-By");
|
||||
if (referred_by) then
|
||||
referred_by = referred_by:match('[%d]+');
|
||||
session:transfer(referred_by, "XML", context);
|
||||
else
|
||||
session:hangup("NO_ANSWER");
|
||||
if (session:ready()) then
|
||||
referred_by = session:getVariable("sip_h_Referred-By");
|
||||
if (referred_by) then
|
||||
referred_by = referred_by:match('[%d]+');
|
||||
session:transfer(referred_by, "XML", context);
|
||||
else
|
||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-no_answer_no_vm.wav");
|
||||
session:hangup("NO_ANSWER");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,9 +69,13 @@
|
||||
end
|
||||
|
||||
--please enter your password followed by pound
|
||||
dtmf_digits = '';
|
||||
password = macro(session, "voicemail_password", 20, 5000, '');
|
||||
min_digits = 2;
|
||||
max_digits = 20;
|
||||
digit_timeout = 5000;
|
||||
max_tries = 3;
|
||||
password = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", "phrase:voicemail_enter_pass:#", "", "\\d+");
|
||||
--freeswitch.consoleLog("notice", "[voicemail] password: " .. password .. "\n");
|
||||
|
||||
--compare the password from the database with the password provided by the user
|
||||
if (voicemail_password ~= password) then
|
||||
--incorrect password
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
dtmf_digits = '';
|
||||
if (string.len(greeting_id) > 0) then
|
||||
|
||||
--sleep
|
||||
session:execute("playback","silence_stream://200");
|
||||
|
||||
--get the greeting from the database
|
||||
if (storage_type == "base64") then
|
||||
local dbh = Database.new('system', 'base64/read')
|
||||
@@ -82,23 +85,20 @@
|
||||
|
||||
if saved then
|
||||
--play the greeting
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "", "\\d+", max_timeout);
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "", ".*", max_timeout);
|
||||
--session:execute("playback",voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
||||
|
||||
--delete the greeting (retain local for better responsiveness)
|
||||
--os.remove(voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
||||
end
|
||||
elseif (storage_type == "http_cache") then
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "", "\\d+", max_timeout);
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "", ".*", max_timeout);
|
||||
--session:execute("playback",storage_path.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
||||
else
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "","\\d+", max_timeout);
|
||||
|
||||
dtmf_digits = session:playAndGetDigits(min_digits, max_digits, tries, timeout, "#", voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav", "",".*", max_timeout);
|
||||
--session:execute("playback",voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav");
|
||||
end
|
||||
|
||||
--sleep
|
||||
session:execute("playback","silence_stream://200");
|
||||
else
|
||||
--default greeting
|
||||
session:execute("playback","silence_stream://200");
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@
|
||||
if (ivr_menu_direct_dial == "true") then
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="set ${cond(${user_exists id $1 ]]..domain_name..[[} == true ? user_exists=true : user_exists=false)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="playback ${cond(${user_exists} == true ? ]]..sound_prefix..[[ivr/ivr-call_being_transferred.wav : ]]..sound_prefix..[[ivr/ivr-that_was_an_invalid_entry.wav)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="transfer ${cond(${user_exists} == true ? $1 XML ]]..domain_name..[[ : ]]..ivr_menu_extension..[[ XML ]]..domain_name..[[)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="transfer ${cond(${user_exists} == true ? $1 XML ]]..domain_name..[[)}" description="direct dial"/>\n]]);
|
||||
end
|
||||
|
||||
--close the extension tag if it was left open
|
||||
|
||||
+28
-6
@@ -1,6 +1,6 @@
|
||||
-- xml_handler.lua
|
||||
-- Part of FusionPBX
|
||||
-- Copyright (C) 2013 - 2015 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- Copyright (C) 2013 - 2017 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- All rights reserved.
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
@@ -63,8 +63,8 @@
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||
end
|
||||
dbh:query(sql, params, function(rows)
|
||||
domain_uuid = rows["domain_uuid"];
|
||||
dbh:query(sql, params, function(row)
|
||||
domain_uuid = row.domain_uuid;
|
||||
end);
|
||||
end
|
||||
end
|
||||
@@ -91,7 +91,7 @@
|
||||
profile_tag_status = "closed";
|
||||
|
||||
--run the query
|
||||
sql = "select p.sip_profile_name, p.sip_profile_description, s.sip_profile_setting_name, s.sip_profile_setting_value ";
|
||||
sql = "select p.sip_profile_uuid, p.sip_profile_name, p.sip_profile_description, s.sip_profile_setting_name, s.sip_profile_setting_value ";
|
||||
sql = sql .. "from v_sip_profiles as p, v_sip_profile_settings as s ";
|
||||
sql = sql .. "where s.sip_profile_setting_enabled = 'true' ";
|
||||
sql = sql .. "and p.sip_profile_enabled = 'true' ";
|
||||
@@ -105,6 +105,7 @@
|
||||
x = 0;
|
||||
dbh:query(sql, params, function(row)
|
||||
--set as variables
|
||||
sip_profile_uuid = row.sip_profile_uuid;
|
||||
sip_profile_name = row.sip_profile_name;
|
||||
--sip_profile_description = row.sip_profile_description;
|
||||
sip_profile_setting_name = row.sip_profile_setting_name;
|
||||
@@ -220,7 +221,28 @@
|
||||
|
||||
table.insert(xml, [[ </gateways>]]);
|
||||
table.insert(xml, [[ <domains>]]);
|
||||
table.insert(xml, [[ <domain name="all" alias="false" parse="true"/>]]);
|
||||
|
||||
--add sip profile domain: name, alias, and parse
|
||||
table.insert(xml, [[ <!-- indicator to parse the directory for domains with parse="true" to get gateways-->]]);
|
||||
table.insert(xml, [[ <!--<domain name="$${domain}" parse="true"/>-->]]);
|
||||
table.insert(xml, [[ <!-- indicator to parse the directory for domains with parse="true" to get gateways and alias every domain to this profile -->]]);
|
||||
table.insert(xml, [[ <!--<domain name="all" alias="true" parse="true"/>-->]]);
|
||||
sql = "SELECT sip_profile_domain_name, sip_profile_domain_alias, sip_profile_domain_parse FROM v_sip_profile_domains ";
|
||||
sql = sql .. "WHERE sip_profile_uuid = :sip_profile_uuid";
|
||||
local params = {sip_profile_uuid = sip_profile_uuid};
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; sip_profile_uuid:" .. sip_profile_uuid .. "\n");
|
||||
end
|
||||
dbh:query(sql, params, function(row)
|
||||
name = row.sip_profile_domain_name;
|
||||
alias = row.sip_profile_domain_alias;
|
||||
parse = row.sip_profile_domain_parse;
|
||||
if (name == nil or name == '') then name = 'false'; end
|
||||
if (alias == nil or alias == '') then alias = 'false'; end
|
||||
if (parse == nil or parse == '') then parse = 'false'; end
|
||||
table.insert(xml, [[ <domain name="]] .. name .. [[" alias="]] .. alias .. [[" parse="]] .. parse .. [[""/>]]);
|
||||
end);
|
||||
|
||||
table.insert(xml, [[ </domains>]]);
|
||||
table.insert(xml, [[ <settings>]]);
|
||||
profile_tag_status = "open";
|
||||
@@ -293,4 +315,4 @@
|
||||
if (debug["cache"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] configuration:sofia.conf source: memcache\n");
|
||||
end
|
||||
end --if XML_STRING
|
||||
end --if XML_STRING
|
||||
|
||||
@@ -416,6 +416,11 @@
|
||||
freeswitch.consoleLog("INFO","[FAX] mailfrom_address: ".. from_address .."\n");
|
||||
freeswitch.consoleLog("INFO","[FAX] mailto_address: ".. email_address .."\n");
|
||||
freeswitch.consoleLog("INFO","[FAX] hangup_cause_q850: '" .. hangup_cause_q850 .. "'\n");
|
||||
|
||||
-- build headers
|
||||
email_type = "email2fax";
|
||||
x_headers = 'X-Headers: {"X-FusionPBX-Email-Type":"'..email_type..'",';
|
||||
x_headers = x_headers..'"X-FusionPBX-Domain-UUID":"'..domain_uuid..'"}';
|
||||
|
||||
-- if the fax failed then try again
|
||||
if (fax_success == "0") then
|
||||
@@ -491,7 +496,7 @@
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
freeswitch.email(email_address,
|
||||
email_address,
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was INVALID",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was INVALID\n"..x_headers,
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
@@ -504,7 +509,7 @@
|
||||
email_address = email_address:gsub("\\,", ",");
|
||||
freeswitch.email(email_address,
|
||||
email_address,
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was BUSY",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." was BUSY\n"..x_headers,
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
@@ -519,7 +524,7 @@
|
||||
|
||||
freeswitch.email(email_address,
|
||||
email_address,
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." FAILED",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." FAILED\n"..x_headers,
|
||||
email_message_fail ,
|
||||
fax_file
|
||||
);
|
||||
@@ -555,7 +560,7 @@
|
||||
|
||||
freeswitch.email(email_address,
|
||||
email_address,
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." SENT",
|
||||
"To: "..email_address.."\nFrom: "..from_address.."\nSubject: Fax to: "..number_dialed.." SENT\n"..x_headers,
|
||||
email_message_success ,
|
||||
fax_file
|
||||
);
|
||||
@@ -565,4 +570,4 @@
|
||||
os.remove(fax_file);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+34
-25
@@ -17,15 +17,17 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Raymond Chandler <intralanman@gmail.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/functions.php";
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/functions.php";
|
||||
|
||||
//set defaults
|
||||
if (isset($dbtype)) {
|
||||
@@ -267,31 +269,38 @@ if ($db_type == "pgsql") {
|
||||
unset($prep_statement);
|
||||
|
||||
//put the domains in natural order
|
||||
natsort($domain_names);
|
||||
//build the domains array in the correct order
|
||||
foreach ($domain_names as $dn) {
|
||||
foreach ($result as $row) {
|
||||
if ($row['domain_name'] == $dn) {
|
||||
$domains[] = $row;
|
||||
}
|
||||
}
|
||||
if (is_array($domain_names)) {
|
||||
natsort($domain_names);
|
||||
}
|
||||
unset($result);
|
||||
|
||||
foreach($domains as $row) {
|
||||
if (count($domains) == 1) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row['domain_name'];
|
||||
}
|
||||
else {
|
||||
if ($row['domain_name'] == $domain_array[0] || $row['domain_name'] == 'www.'.$domain_array[0]) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row["domain_name"];
|
||||
//build the domains array in the correct order
|
||||
if (is_array($domain_names)) {
|
||||
foreach ($domain_names as $dn) {
|
||||
foreach ($result as $row) {
|
||||
if ($row['domain_name'] == $dn) {
|
||||
$domains[] = $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
$_SESSION['domains'][$row['domain_uuid']] = $row;
|
||||
unset($result);
|
||||
}
|
||||
|
||||
if (is_array($domains)) {
|
||||
foreach($domains as $row) {
|
||||
if (count($domains) == 1) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row['domain_name'];
|
||||
}
|
||||
else {
|
||||
if ($row['domain_name'] == $domain_array[0] || $row['domain_name'] == 'www.'.$domain_array[0]) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $row["domain_name"];
|
||||
}
|
||||
}
|
||||
$_SESSION['domains'][$row['domain_uuid']] = $row;
|
||||
}
|
||||
unset($domains, $prep_statement);
|
||||
}
|
||||
unset($domains, $prep_statement);
|
||||
}
|
||||
|
||||
//get the software name
|
||||
@@ -323,7 +332,7 @@ if ($db_type == "pgsql") {
|
||||
}
|
||||
|
||||
//check the domain cidr range
|
||||
if (array_key_exists('cidr',$_SESSION['domain']) and is_array($_SESSION['domain']["cidr"])) {
|
||||
if (is_array($_SESSION['domain']["cidr"])) {
|
||||
$found = false;
|
||||
foreach($_SESSION['domain']["cidr"] as $cidr) {
|
||||
if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) {
|
||||
@@ -338,7 +347,7 @@ if ($db_type == "pgsql") {
|
||||
}
|
||||
|
||||
//check the api cidr range
|
||||
if (array_key_exists('api',$_SESSION) and is_array($_SESSION['api']["cidr"])) {
|
||||
if (is_array($_SESSION['api']["cidr"])) {
|
||||
$found = false;
|
||||
foreach($_SESSION['api']["cidr"] as $cidr) {
|
||||
if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) {
|
||||
|
||||
+82
-44
@@ -379,58 +379,60 @@ function save_gateway_xml() {
|
||||
}
|
||||
|
||||
function save_var_xml() {
|
||||
global $config, $domain_uuid;
|
||||
if (is_array($_SESSION['switch']['conf'])) {
|
||||
global $config, $domain_uuid;
|
||||
|
||||
//get the database connection
|
||||
require_once "resources/classes/database.php";
|
||||
$database = new database;
|
||||
$database->connect();
|
||||
$db = $database->db;
|
||||
//get the database connection
|
||||
require_once "resources/classes/database.php";
|
||||
$database = new database;
|
||||
$database->connect();
|
||||
$db = $database->db;
|
||||
|
||||
//open the vars.xml file
|
||||
$fout = fopen($_SESSION['switch']['conf']['dir']."/vars.xml","w");
|
||||
//open the vars.xml file
|
||||
$fout = fopen($_SESSION['switch']['conf']['dir']."/vars.xml","w");
|
||||
|
||||
//get the hostname
|
||||
$hostname = trim(event_socket_request_cmd('api switchname'));
|
||||
//get the hostname
|
||||
$hostname = trim(event_socket_request_cmd('api switchname'));
|
||||
|
||||
//build the xml
|
||||
$sql = "select * from v_vars ";
|
||||
$sql .= "where var_enabled = 'true' ";
|
||||
$sql .= "order by var_cat, var_order asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$prev_var_cat = '';
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
$xml = '';
|
||||
foreach ($result as &$row) {
|
||||
if ($row['var_cat'] != 'Provision') {
|
||||
if ($prev_var_cat != $row['var_cat']) {
|
||||
$xml .= "\n<!-- ".$row['var_cat']." -->\n";
|
||||
if (strlen($row["var_description"]) > 0) {
|
||||
$xml .= "<!-- ".base64_decode($row['var_description'])." -->\n";
|
||||
//build the xml
|
||||
$sql = "select * from v_vars ";
|
||||
$sql .= "where var_enabled = 'true' ";
|
||||
$sql .= "order by var_cat, var_order asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$prev_var_cat = '';
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
$xml = '';
|
||||
foreach ($result as &$row) {
|
||||
if ($row['var_cat'] != 'Provision') {
|
||||
if ($prev_var_cat != $row['var_cat']) {
|
||||
$xml .= "\n<!-- ".$row['var_cat']." -->\n";
|
||||
if (strlen($row["var_description"]) > 0) {
|
||||
$xml .= "<!-- ".base64_decode($row['var_description'])." -->\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['var_cat'] == 'Exec-Set') { $var_cmd = 'exec-set'; } else { $var_cmd = 'set'; }
|
||||
if (strlen($row['var_hostname']) == 0) {
|
||||
$xml .= "<X-PRE-PROCESS cmd=\"".$var_cmd."\" data=\"".$row['var_name']."=".$row['var_value']."\" />\n";
|
||||
} elseif ($row['var_hostname'] == $hostname) {
|
||||
$xml .= "<X-PRE-PROCESS cmd=\"".$var_cmd."\" data=\"".$row['var_name']."=".$row['var_value']."\" />\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($row['var_cat'] == 'Exec-Set') { $var_cmd = 'exec-set'; } else { $var_cmd = 'set'; }
|
||||
if (strlen($row['var_hostname']) == 0) {
|
||||
$xml .= "<X-PRE-PROCESS cmd=\"".$var_cmd."\" data=\"".$row['var_name']."=".$row['var_value']."\" />\n";
|
||||
} elseif ($row['var_hostname'] == $hostname) {
|
||||
$xml .= "<X-PRE-PROCESS cmd=\"".$var_cmd."\" data=\"".$row['var_name']."=".$row['var_value']."\" />\n";
|
||||
}
|
||||
$prev_var_cat = $row['var_cat'];
|
||||
}
|
||||
$prev_var_cat = $row['var_cat'];
|
||||
}
|
||||
$xml .= "\n";
|
||||
fwrite($fout, $xml);
|
||||
unset($xml);
|
||||
fclose($fout);
|
||||
$xml .= "\n";
|
||||
fwrite($fout, $xml);
|
||||
unset($xml);
|
||||
fclose($fout);
|
||||
|
||||
//apply settings
|
||||
//apply settings
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
//$cmd = "api reloadxml";
|
||||
//event_socket_request_cmd($cmd);
|
||||
//unset($cmd);
|
||||
//$cmd = "api reloadxml";
|
||||
//event_socket_request_cmd($cmd);
|
||||
//unset($cmd);
|
||||
}
|
||||
}
|
||||
|
||||
function outbound_route_to_bridge ($domain_uuid, $destination_number) {
|
||||
@@ -531,7 +533,7 @@ function extension_exists($extension) {
|
||||
$database->connect();
|
||||
$db = $database->db;
|
||||
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql = "select 1 from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and (extension = '$extension' ";
|
||||
$sql .= "or number_alias = '$extension') ";
|
||||
@@ -545,6 +547,42 @@ function extension_exists($extension) {
|
||||
}
|
||||
}
|
||||
|
||||
function extension_presence_id($extension, $number_alias = false) {
|
||||
global $domain_uuid;
|
||||
|
||||
//get the database connection
|
||||
require_once "resources/classes/database.php";
|
||||
$database = new database;
|
||||
$database->connect();
|
||||
$db = $database->db;
|
||||
|
||||
if ($number_alias === false) {
|
||||
$sql = "select extension, number_alias from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and (extension = '$extension' ";
|
||||
$sql .= "or number_alias = '$extension') ";
|
||||
$sql .= "and enabled = 'true' ";
|
||||
|
||||
$result = $db->query($sql)->fetchAll(PDO::FETCH_ASSOC);
|
||||
if (count($result) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($result as &$row) {
|
||||
$extension = $row['extension'];
|
||||
$number_alias = $row['number_alias'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(strlen($number_alias) > 0) {
|
||||
if($_SESSION['provision']['number_as_presence_id']['text'] === 'true') {
|
||||
return $number_alias;
|
||||
}
|
||||
}
|
||||
return $extension;
|
||||
}
|
||||
|
||||
function get_recording_filename($id) {
|
||||
global $domain_uuid, $db;
|
||||
$sql = "select * from v_recordings ";
|
||||
@@ -1497,4 +1535,4 @@ if(!function_exists('find_php_by_extension')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<!--
|
||||
This is an example of a sofia profile setup to listen on IPv6.
|
||||
-->
|
||||
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
|
||||
<!--aliases are other names that will work as a valid profile name for this profile-->
|
||||
<domains>
|
||||
<domain name="all" alias="false" parse="true"/>
|
||||
</domains>
|
||||
<settings>
|
||||
<param name="user-agent-string" value="FreeSWITCH" enabled="true"/>
|
||||
<param name="debug" value="0"/>
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
<Auth_ID_2_></Auth_ID_2_>
|
||||
<Dial_Plan_2_>(*xxxxxx|*xxxxx|*xxxx|*xxx|*xx|*x|#x|**xx|**xxx|**xxxx|**xxxxx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)</Dial_Plan_2_>
|
||||
<!--<Dial_Plan_1_>(<:31516>xxxxxxx|<:3>xxxxxxxxxx|<:3>xxxxxxxxxxx|*xxxxx|*xxxx|*xxx|*xx|**xx|**xxx|**xxxx|**xxxxx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)</Dial_Plan_1_>-->
|
||||
<Handle_VIA_rport>{$cisco_handle_via_rport}</Handle_VIA_rport>
|
||||
<Insert_VIA_received>No</Insert_VIA_received>
|
||||
<Insert_VIA_rport>{$cisco_insert_via_rport}</Insert_VIA_rport>
|
||||
<Time_Zone>{$spa_time_zone}</Time_Zone>
|
||||
<!--
|
||||
<Reset_Button_Enable>0</Reset_Button_Enable>
|
||||
|
||||
@@ -126,9 +126,9 @@
|
||||
<G729a_Codec_Name>G729a</G729a_Codec_Name>
|
||||
<EncapRTP_Codec_Name>encaprtp</EncapRTP_Codec_Name>
|
||||
<Handle_VIA_received>No</Handle_VIA_received>
|
||||
<Handle_VIA_rport>No</Handle_VIA_rport>
|
||||
<Handle_VIA_rport>{$cisco_handle_via_rport}</Handle_VIA_rport>
|
||||
<Insert_VIA_received>No</Insert_VIA_received>
|
||||
<Insert_VIA_rport>No</Insert_VIA_rport>
|
||||
<Insert_VIA_rport>{$cisco_insert_via_rport}</Insert_VIA_rport>
|
||||
<Substitute_VIA_Addr>No</Substitute_VIA_Addr>
|
||||
<Send_Resp_To_Src_Port>No</Send_Resp_To_Src_Port>
|
||||
<STUN_Enable>No</STUN_Enable>
|
||||
@@ -748,7 +748,7 @@
|
||||
</Software_DMZ>
|
||||
<Bonjour_Enable>1</Bonjour_Enable>
|
||||
<Reset_Button_Enable>1</Reset_Button_Enable>
|
||||
<Router_Mode>0</Router_Mode>
|
||||
<Router_Mode>{$cisco_router_mode}</Router_Mode>
|
||||
<VPN_Passthrough>
|
||||
<IPSec_Passthrough>1</IPSec_Passthrough>
|
||||
<PPTP_Passthrough>1</PPTP_Passthrough>
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<!-- XML Config File Password. Max Length: 40 characters; between ascii values 33 and 126 -->
|
||||
<P1359></P1359>
|
||||
<!-- HTTP/HTTPS User Name. Max Length: 40 characters; between ascii values 33 and 126 -->
|
||||
<P1360></P1360>
|
||||
<P1360>{$http_auth_username}</P1360>
|
||||
<!-- HTTP/HTTPS Password. Max Length: 40 characters; between ascii values 33 and 126 -->
|
||||
<P1361></P1361>
|
||||
<P1361>{$http_auth_password}</P1361>
|
||||
<!-- Firmware File Prefix. String; between ascii values 33 and 126 -->
|
||||
<P232></P232>
|
||||
<!-- Firmware File Postfix. String; between ascii values 33 and 126 -->
|
||||
@@ -1117,4 +1117,4 @@
|
||||
<P181></P181>
|
||||
|
||||
</config>
|
||||
</gs_provision>
|
||||
</gs_provision>
|
||||
|
||||
@@ -148,11 +148,11 @@
|
||||
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360></P1360>
|
||||
<P1360>{$http_auth_username}</P1360>
|
||||
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361></P1361>
|
||||
<P1361>{$http_auth_password}</P1361>
|
||||
|
||||
<!-- Firmware File Prefix -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
@@ -2091,4 +2091,4 @@
|
||||
<P3307>5060</P3307>
|
||||
|
||||
</config>
|
||||
</gs_provision>
|
||||
</gs_provision>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<gs_provision version="1">
|
||||
<config version="1">
|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
<!-- Mandatory -->
|
||||
<P1359></P1359>
|
||||
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360></P1360>
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360>{$http_auth_username}</P1360>
|
||||
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361></P1361>
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361>{$http_auth_password}</P1361>
|
||||
|
||||
<!-- Firmware File Prefix -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
@@ -1764,4 +1764,4 @@
|
||||
<P342>0</P342>
|
||||
|
||||
</config>
|
||||
</gs_provision>
|
||||
</gs_provision>
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
<!-- Mandatory -->
|
||||
<P1359></P1359>
|
||||
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360></P1360>
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360>{$http_auth_username}</P1360>
|
||||
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361></P1361>
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361>{$http_auth_password}</P1361>
|
||||
|
||||
<!-- Firmware File Prefix -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
@@ -1772,4 +1772,4 @@
|
||||
<P342>0</P342>
|
||||
|
||||
</config>
|
||||
</gs_provision>
|
||||
</gs_provision>
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
<!-- String-->
|
||||
<P1359></P1359>
|
||||
|
||||
<!-- HTTP/HTTPS User Name-->
|
||||
<!-- String-->
|
||||
<P1360></P1360>
|
||||
<!-- HTTP/HTTPS User Name -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1360>{$http_auth_username}</P1360>
|
||||
|
||||
<!-- HTTP/HTTPS Password-->
|
||||
<!-- String-->
|
||||
<P1361></P1361>
|
||||
<!-- HTTP/HTTPS Password -->
|
||||
<!-- String; between ascii values 33 and 126 -->
|
||||
<P1361>{$http_auth_password}</P1361>
|
||||
|
||||
<!-- Firmware File Prefix-->
|
||||
<!-- String-->
|
||||
|
||||
@@ -34,10 +34,14 @@
|
||||
device.set="1"
|
||||
device.sntp.serverName="pool.ntp.org"
|
||||
device.sntp.gmtOffset="{$polycom_gmt_offset}"
|
||||
{if isset($admin_password)}
|
||||
device.auth.localUserPassword.set="1"
|
||||
device.auth.localUserPassword="{$admin_password}"
|
||||
device.auth.localUserPassword="{$admin_password}"
|
||||
{/if}
|
||||
{if isset($admin_password)}
|
||||
device.auth.localAdminPassword.set="1"
|
||||
device.auth.localAdminPassword="{$admin_password}"
|
||||
{/if}
|
||||
{if isset($dns_server_primary)}device.dns.serverAddress="{$dns_server_primary}"{/if}
|
||||
{if isset($dns_server_secondary)}device.dns.altSrvAddress="{$dns_server_secondary}"{/if}
|
||||
/>
|
||||
|
||||
@@ -34,10 +34,14 @@
|
||||
device.set="1"
|
||||
device.sntp.serverName="pool.ntp.org"
|
||||
device.sntp.gmtOffset="{$polycom_gmt_offset}"
|
||||
{if isset($admin_password)}
|
||||
device.auth.localUserPassword.set="1"
|
||||
device.auth.localUserPassword="{$admin_password}"
|
||||
device.auth.localUserPassword="{$admin_password}"
|
||||
{/if}
|
||||
{if isset($admin_password)}
|
||||
device.auth.localAdminPassword.set="1"
|
||||
device.auth.localAdminPassword="{$admin_password}"
|
||||
{/if}
|
||||
{if isset($dns_server_primary)}device.dns.serverAddress="{$dns_server_primary}"{/if}
|
||||
{if isset($dns_server_secondary)}device.dns.altSrvAddress="{$dns_server_secondary}"{/if}
|
||||
/>
|
||||
|
||||
@@ -1988,7 +1988,7 @@ memorykey.{$row.device_key_id}.label = {$row.device_key_label}
|
||||
|
||||
#programablekey.x.label--This parameter is only available to the key 1 to key 4.
|
||||
|
||||
foreach $keys["programmable"] as $row}
|
||||
{foreach $keys["programmable"] as $row}
|
||||
programablekey.{$row.device_key_id}.type = {$row.device_key_type}
|
||||
programablekey.{$row.device_key_id}.line = {$row.device_key_line}
|
||||
programablekey.{$row.device_key_id}.value = {$row.device_key_value}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
include "root.php";
|
||||
include "resources/functions.php";
|
||||
echo uuid();
|
||||
|
||||
?>
|
||||
+29
-27
@@ -40,17 +40,17 @@
|
||||
require_once "resources/require.php";
|
||||
|
||||
//define a function to remove html tags
|
||||
function rip_tags($string) {
|
||||
function remove_tags($string) {
|
||||
// ----- remove HTML TAGs -----
|
||||
$string = preg_replace ('/<[^>]*>/', ' ', $string);
|
||||
|
||||
// ----- remove control characters -----
|
||||
// remove control characters
|
||||
|
||||
$string = str_replace("\r", '', $string); // --- replace with empty space
|
||||
$string = str_replace("\n", ' ', $string); // --- replace with space
|
||||
$string = str_replace("\t", ' ', $string); // --- replace with space
|
||||
|
||||
// ----- remove multiple spaces -----
|
||||
//remove multiple spaces
|
||||
$string = trim(preg_replace('/ {2,}/', ' ', $string));
|
||||
return $string;
|
||||
}
|
||||
@@ -313,7 +313,7 @@
|
||||
}
|
||||
|
||||
//add the body to the email
|
||||
$body_plain = rip_tags($body);
|
||||
$body_plain = remove_tags($body);
|
||||
//echo "body_plain = $body_plain\n";
|
||||
if ((substr($body, 0, 5) == "<html") || (substr($body, 0, 9) == "<!doctype")) {
|
||||
$mail->ContentType = "text/html";
|
||||
@@ -336,30 +336,32 @@
|
||||
echo "Retained in v_emails \n";
|
||||
} else {
|
||||
// log/store message in database for review
|
||||
$email_uuid = uuid();
|
||||
$sql = "insert into v_emails ( ";
|
||||
$sql .= "email_uuid, ";
|
||||
if ($call_uuid) {
|
||||
$sql .= "call_uuid, ";
|
||||
if (!isset($email_uuid)) {
|
||||
$email_uuid = uuid();
|
||||
$sql = "insert into v_emails ( ";
|
||||
$sql .= "email_uuid, ";
|
||||
if ($call_uuid) {
|
||||
$sql .= "call_uuid, ";
|
||||
}
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "sent_date, ";
|
||||
$sql .= "type, ";
|
||||
$sql .= "status, ";
|
||||
$sql .= "email ";
|
||||
$sql .= ") values ( ";
|
||||
$sql .= "'".$email_uuid."', ";
|
||||
if ($call_uuid) {
|
||||
$sql .= "'".$call_uuid."', ";
|
||||
}
|
||||
$sql .= "'".$headers["X-FusionPBX-Domain-UUID"]."', ";
|
||||
$sql .= "now(),";
|
||||
$sql .= "'".$headers["X-FusionPBX-Email-Type"]."', ";
|
||||
$sql .= "'failed', ";
|
||||
$sql .= "'".str_replace("'", "''", $msg)."' ";
|
||||
$sql .= ") ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "sent_date, ";
|
||||
$sql .= "type, ";
|
||||
$sql .= "status, ";
|
||||
$sql .= "email ";
|
||||
$sql .= ") values ( ";
|
||||
$sql .= "'".$email_uuid."', ";
|
||||
if ($call_uuid) {
|
||||
$sql .= "'".$call_uuid."', ";
|
||||
}
|
||||
$sql .= "'".$headers["X-FusionPBX-Domain-UUID"]."', ";
|
||||
$sql .= "now(),";
|
||||
$sql .= "'".$headers["X-FusionPBX-Email-Type"]."', ";
|
||||
$sql .= "'failed', ";
|
||||
$sql .= "'".str_replace("'", "''", $msg)."' ";
|
||||
$sql .= ") ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
echo "Retained in v_emails as email_uuid = ".$email_uuid."\n";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1424
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user