mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-07 04:03:49 +00:00
Merge branch 'master' into intercept_load_balance
# Conflicts: # resources/install/scripts/resources/functions/database.lua
This commit is contained in:
@@ -350,6 +350,31 @@ $text['label-busy']['de-at'] = "Besetzt";
|
||||
$text['label-busy']['ar-eg'] = "مشغول";
|
||||
$text['label-busy']['he'] = "תפוס";
|
||||
|
||||
$text['label-hold']['en-us'] = "Hold";
|
||||
$text['label-hold']['es-cl'] = "";
|
||||
$text['label-hold']['pt-pt'] = "";
|
||||
$text['label-hold']['fr-fr'] = "";
|
||||
$text['label-hold']['nl-nl'] = "";
|
||||
$text['label-hold']['pt-br'] = "";
|
||||
$text['label-hold']['pl'] = "";
|
||||
$text['label-hold']['sv-se'] = "";
|
||||
$text['label-hold']['uk'] = "";
|
||||
$text['label-hold']['ro'] = "";
|
||||
$text['label-hold']['de-at'] = "";
|
||||
$text['label-hold']['ar-eg'] = "";
|
||||
$text['label-hold']['he'] = "";
|
||||
|
||||
$text['label-voicemail']['en-us'] = "Voicemail";
|
||||
$text['label-voicemail']['es-cl'] = "Correo de Voz";
|
||||
$text['label-voicemail']['pt-pt'] = "Correio de Voz";
|
||||
$text['label-voicemail']['fr-fr'] = "Messagerie Vocale";
|
||||
$text['label-voicemail']['pt-br'] = "Correio de voz";
|
||||
$text['label-voicemail']['pl'] = "Poczta głosowa";
|
||||
$text['label-voicemail']['sv-se'] = "Röstbrevlåda";
|
||||
$text['label-voicemail']['uk'] = "Голосова пошта";
|
||||
$text['label-voicemail']['de-at'] = "Mailbox";
|
||||
$text['label-voicemail']['he'] = "תא קולי";
|
||||
|
||||
$text['label-add-note']['en-us'] = "Block calls from a number. Either select a number from the list above or enter the number, name and enable below.";
|
||||
$text['label-add-note']['es-cl'] = "Bloquea llamadas desde un número. Puede elegir un número de la lista de arriba o ingresar el nú, nombre y activarlo abajo.";
|
||||
$text['label-add-note']['pt-pt'] = "Bloquear chamadas a partir de um número. Seleccione um número a partir da lista indicada ou introduza um número, nome e active.";
|
||||
|
||||
@@ -44,7 +44,7 @@ else {
|
||||
|
||||
//define the call_block_get_extensions function
|
||||
function call_block_get_extensions($select_extension) {
|
||||
global $db;
|
||||
global $db, $text;
|
||||
|
||||
//list voicemail
|
||||
$sql = "select extension, user_context, description from v_extensions ";
|
||||
@@ -55,12 +55,12 @@ else {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo "<optgroup label='Voicemail'>\n";
|
||||
echo "<optgroup label='".$text['label-voicemail']."'>\n";
|
||||
foreach ($result as &$row) {
|
||||
$extension = $row["extension"];
|
||||
$context = $row["user_context"];
|
||||
$description = $row["description"];
|
||||
if ($extension == $select_extension) $selected = "SELECTED";
|
||||
if ($extension == $select_extension) $selected = "selected='selected'";
|
||||
echo " <option value='Voicemail $context $extension' $selected>".$extension." ".$description."</option>\n";
|
||||
$selected = "";
|
||||
}
|
||||
@@ -77,7 +77,7 @@ else {
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
if (count($_POST) > 0) {
|
||||
$call_block_name = check_str($_POST["call_block_name"]);
|
||||
$call_block_number = check_str($_POST["call_block_number"]);
|
||||
$call_block_action = check_str($_POST["call_block_action"]);
|
||||
@@ -167,7 +167,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
if ($result_count > 0) {
|
||||
$call_block_number = $result[0]["call_block_number"];
|
||||
//set the domain_name
|
||||
$domain_name = $result[0]["domain_name"];
|
||||
|
||||
//clear the cache
|
||||
@@ -298,6 +298,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
else {
|
||||
echo " <option value='Busy'>".$text['label-busy']."</option>\n";
|
||||
}
|
||||
if ($action == "Hold") {
|
||||
echo " <option value='Hold' selected='selected'>".$text['label-hold']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='Hold'>".$text['label-hold']."</option>\n";
|
||||
}
|
||||
call_block_get_extensions($extension);
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
@@ -48,9 +48,10 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
//get the contact uuid
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
@@ -73,114 +74,125 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$address_label = ($address_label_custom != '') ? $address_label_custom : $address_label;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_address_uuid = check_str($_POST["contact_address_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_address_uuid = check_str($_POST["contact_address_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//if primary, unmark other primary numbers
|
||||
if ($address_primary) {
|
||||
$sql = "update v_contact_addresses set address_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_address_uuid = uuid();
|
||||
$sql = "insert into v_contact_addresses ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_address_uuid, ";
|
||||
$sql .= "address_type, ";
|
||||
$sql .= "address_label, ";
|
||||
$sql .= "address_street, ";
|
||||
$sql .= "address_extended, ";
|
||||
$sql .= "address_community, ";
|
||||
$sql .= "address_locality, ";
|
||||
$sql .= "address_region, ";
|
||||
$sql .= "address_postal_code, ";
|
||||
$sql .= "address_country, ";
|
||||
$sql .= "address_latitude, ";
|
||||
$sql .= "address_longitude, ";
|
||||
$sql .= "address_primary, ";
|
||||
$sql .= "address_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_address_uuid."', ";
|
||||
$sql .= "'".$address_type."', ";
|
||||
$sql .= "'".$address_label."', ";
|
||||
$sql .= "'".$address_street."', ";
|
||||
$sql .= "'".$address_extended."', ";
|
||||
$sql .= "'".$address_community."', ";
|
||||
$sql .= "'".$address_locality."', ";
|
||||
$sql .= "'".$address_region."', ";
|
||||
$sql .= "'".$address_postal_code."', ";
|
||||
$sql .= "'".$address_country."', ";
|
||||
$sql .= "'".$address_latitude."', ";
|
||||
$sql .= "'".$address_longitude."', ";
|
||||
$sql .= (($address_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$address_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//if primary, unmark other primary numbers
|
||||
if ($address_primary) {
|
||||
$sql = "update v_contact_addresses set address_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
if ($action == "add") {
|
||||
$contact_address_uuid = uuid();
|
||||
$sql = "insert into v_contact_addresses ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_address_uuid, ";
|
||||
$sql .= "address_type, ";
|
||||
$sql .= "address_label, ";
|
||||
$sql .= "address_street, ";
|
||||
$sql .= "address_extended, ";
|
||||
$sql .= "address_community, ";
|
||||
$sql .= "address_locality, ";
|
||||
$sql .= "address_region, ";
|
||||
$sql .= "address_postal_code, ";
|
||||
$sql .= "address_country, ";
|
||||
$sql .= "address_latitude, ";
|
||||
$sql .= "address_longitude, ";
|
||||
$sql .= "address_primary, ";
|
||||
$sql .= "address_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_address_uuid."', ";
|
||||
$sql .= "'".$address_type."', ";
|
||||
$sql .= "'".$address_label."', ";
|
||||
$sql .= "'".$address_street."', ";
|
||||
$sql .= "'".$address_extended."', ";
|
||||
$sql .= "'".$address_community."', ";
|
||||
$sql .= "'".$address_locality."', ";
|
||||
$sql .= "'".$address_region."', ";
|
||||
$sql .= "'".$address_postal_code."', ";
|
||||
$sql .= "'".$address_country."', ";
|
||||
$sql .= "'".$address_latitude."', ";
|
||||
$sql .= "'".$address_longitude."', ";
|
||||
$sql .= (($address_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$address_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_addresses set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "address_type = '".$address_type."', ";
|
||||
$sql .= "address_label = '".$address_label."', ";
|
||||
$sql .= "address_street = '".$address_street."', ";
|
||||
$sql .= "address_extended = '".$address_extended."', ";
|
||||
$sql .= "address_community = '".$address_community."', ";
|
||||
$sql .= "address_locality = '".$address_locality."', ";
|
||||
$sql .= "address_region = '".$address_region."', ";
|
||||
$sql .= "address_postal_code = '".$address_postal_code."', ";
|
||||
$sql .= "address_country = '".$address_country."', ";
|
||||
$sql .= "address_latitude = '".$address_latitude."', ";
|
||||
$sql .= "address_longitude = '".$address_longitude."', ";
|
||||
$sql .= "address_primary = ".(($address_primary) ? 1 : 0).", ";
|
||||
$sql .= "address_description = '".$address_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_address_uuid = '".$contact_address_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_addresses set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "address_type = '".$address_type."', ";
|
||||
$sql .= "address_label = '".$address_label."', ";
|
||||
$sql .= "address_street = '".$address_street."', ";
|
||||
$sql .= "address_extended = '".$address_extended."', ";
|
||||
$sql .= "address_community = '".$address_community."', ";
|
||||
$sql .= "address_locality = '".$address_locality."', ";
|
||||
$sql .= "address_region = '".$address_region."', ";
|
||||
$sql .= "address_postal_code = '".$address_postal_code."', ";
|
||||
$sql .= "address_country = '".$address_country."', ";
|
||||
$sql .= "address_latitude = '".$address_latitude."', ";
|
||||
$sql .= "address_longitude = '".$address_longitude."', ";
|
||||
$sql .= "address_primary = ".(($address_primary) ? 1 : 0).", ";
|
||||
$sql .= "address_description = '".$address_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_address_uuid = '".$contact_address_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -79,171 +79,182 @@ else {
|
||||
$contact_note = check_str($_POST["contact_note"]);
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_uuid = check_str($_POST["contact_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_uuid = check_str($_POST["contact_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($contact_type) == 0) { $msg .= $text['message-required'].$text['label-contact_type']."<br>\n"; }
|
||||
//if (strlen($contact_organization) == 0) { $msg .= $text['message-required'].$text['label-contact_organization']."<br>\n"; }
|
||||
//if (strlen($contact_name_prefix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_prefix']."<br>\n"; }
|
||||
//if (strlen($contact_name_given) == 0) { $msg .= $text['message-required'].$text['label-contact_name_given']."<br>\n"; }
|
||||
//if (strlen($contact_name_middle) == 0) { $msg .= $text['message-required'].$text['label-contact_name_middle']."<br>\n"; }
|
||||
//if (strlen($contact_name_family) == 0) { $msg .= $text['message-required'].$text['label-contact_name_family']."<br>\n"; }
|
||||
//if (strlen($contact_name_suffix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_suffix']."<br>\n"; }
|
||||
//if (strlen($contact_nickname) == 0) { $msg .= $text['message-required'].$text['label-contact_nickname']."<br>\n"; }
|
||||
//if (strlen($contact_title) == 0) { $msg .= $text['message-required'].$text['label-contact_title']."<br>\n"; }
|
||||
//if (strlen($contact_role) == 0) { $msg .= $text['message-required'].$text['label-contact_role']."<br>\n"; }
|
||||
//if (strlen($contact_time_zone) == 0) { $msg .= $text['message-required'].$text['label-contact_time_zone']."<br>\n"; }
|
||||
//if (strlen($contact_note) == 0) { $msg .= $text['message-required'].$text['label-contact_note']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (strlen($contact_type) == 0) { $msg .= $text['message-required'].$text['label-contact_type']."<br>\n"; }
|
||||
//if (strlen($contact_organization) == 0) { $msg .= $text['message-required'].$text['label-contact_organization']."<br>\n"; }
|
||||
//if (strlen($contact_name_prefix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_prefix']."<br>\n"; }
|
||||
//if (strlen($contact_name_given) == 0) { $msg .= $text['message-required'].$text['label-contact_name_given']."<br>\n"; }
|
||||
//if (strlen($contact_name_middle) == 0) { $msg .= $text['message-required'].$text['label-contact_name_middle']."<br>\n"; }
|
||||
//if (strlen($contact_name_family) == 0) { $msg .= $text['message-required'].$text['label-contact_name_family']."<br>\n"; }
|
||||
//if (strlen($contact_name_suffix) == 0) { $msg .= $text['message-required'].$text['label-contact_name_suffix']."<br>\n"; }
|
||||
//if (strlen($contact_nickname) == 0) { $msg .= $text['message-required'].$text['label-contact_nickname']."<br>\n"; }
|
||||
//if (strlen($contact_title) == 0) { $msg .= $text['message-required'].$text['label-contact_title']."<br>\n"; }
|
||||
//if (strlen($contact_role) == 0) { $msg .= $text['message-required'].$text['label-contact_role']."<br>\n"; }
|
||||
//if (strlen($contact_time_zone) == 0) { $msg .= $text['message-required'].$text['label-contact_time_zone']."<br>\n"; }
|
||||
//if (strlen($contact_note) == 0) { $msg .= $text['message-required'].$text['label-contact_note']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_uuid = uuid();
|
||||
$sql = "insert into v_contacts ";
|
||||
$sql .= "( ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_type, ";
|
||||
$sql .= "contact_organization, ";
|
||||
$sql .= "contact_name_prefix, ";
|
||||
$sql .= "contact_name_given, ";
|
||||
$sql .= "contact_name_middle, ";
|
||||
$sql .= "contact_name_family, ";
|
||||
$sql .= "contact_name_suffix, ";
|
||||
$sql .= "contact_nickname, ";
|
||||
$sql .= "contact_title, ";
|
||||
$sql .= "contact_category, ";
|
||||
$sql .= "contact_role, ";
|
||||
$sql .= "contact_time_zone, ";
|
||||
$sql .= "contact_note, ";
|
||||
$sql .= "last_mod_date, ";
|
||||
$sql .= "last_mod_user ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_type."', ";
|
||||
$sql .= "'".$contact_organization."', ";
|
||||
$sql .= "'".$contact_name_prefix."', ";
|
||||
$sql .= "'".$contact_name_given."', ";
|
||||
$sql .= "'".$contact_name_middle."', ";
|
||||
$sql .= "'".$contact_name_family."', ";
|
||||
$sql .= "'".$contact_name_suffix."', ";
|
||||
$sql .= "'".$contact_nickname."', ";
|
||||
$sql .= "'".$contact_title."', ";
|
||||
$sql .= "'".$contact_category."', ";
|
||||
$sql .= "'".$contact_role."', ";
|
||||
$sql .= "'".$contact_time_zone."', ";
|
||||
$sql .= "'".$contact_note."', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION['username']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
} //if ($action == "add")
|
||||
if ($action == "add") {
|
||||
$contact_uuid = uuid();
|
||||
$sql = "insert into v_contacts ";
|
||||
$sql .= "( ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_type, ";
|
||||
$sql .= "contact_organization, ";
|
||||
$sql .= "contact_name_prefix, ";
|
||||
$sql .= "contact_name_given, ";
|
||||
$sql .= "contact_name_middle, ";
|
||||
$sql .= "contact_name_family, ";
|
||||
$sql .= "contact_name_suffix, ";
|
||||
$sql .= "contact_nickname, ";
|
||||
$sql .= "contact_title, ";
|
||||
$sql .= "contact_category, ";
|
||||
$sql .= "contact_role, ";
|
||||
$sql .= "contact_time_zone, ";
|
||||
$sql .= "contact_note, ";
|
||||
$sql .= "last_mod_date, ";
|
||||
$sql .= "last_mod_user ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_type."', ";
|
||||
$sql .= "'".$contact_organization."', ";
|
||||
$sql .= "'".$contact_name_prefix."', ";
|
||||
$sql .= "'".$contact_name_given."', ";
|
||||
$sql .= "'".$contact_name_middle."', ";
|
||||
$sql .= "'".$contact_name_family."', ";
|
||||
$sql .= "'".$contact_name_suffix."', ";
|
||||
$sql .= "'".$contact_nickname."', ";
|
||||
$sql .= "'".$contact_title."', ";
|
||||
$sql .= "'".$contact_category."', ";
|
||||
$sql .= "'".$contact_role."', ";
|
||||
$sql .= "'".$contact_time_zone."', ";
|
||||
$sql .= "'".$contact_note."', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION['username']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//if contact is shared, remove contact group record containing user's uuid
|
||||
if ($_POST['contact_shared'] == 'true') {
|
||||
$sql = "delete from v_contact_groups ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$sql .= "and group_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
$group_uuid = $_POST['group_uuid'];
|
||||
}
|
||||
//if private contact, delete any groups currently assigned, set group uuid to user's uuid
|
||||
else {
|
||||
$sql = "delete from v_contact_groups ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
$group_uuid = $_SESSION["user_uuid"];
|
||||
}
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
} //if ($action == "add")
|
||||
|
||||
//handle insertion of contact group (or private contact, if not shared)
|
||||
if ($group_uuid != '') {
|
||||
$sql = "insert into v_contact_groups ";
|
||||
$sql .= "( ";
|
||||
$sql .= "contact_group_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "group_uuid ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$group_uuid."' ";
|
||||
$sql .= ") ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//if contact is shared, remove contact group record containing user's uuid
|
||||
if ($_POST['contact_shared'] == 'true') {
|
||||
$sql = "delete from v_contact_groups ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$sql .= "and group_uuid = '".$_SESSION["user_uuid"]."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
$group_uuid = $_POST['group_uuid'];
|
||||
}
|
||||
//if private contact, delete any groups currently assigned, set group uuid to user's uuid
|
||||
else {
|
||||
$sql = "delete from v_contact_groups ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
$group_uuid = $_SESSION["user_uuid"];
|
||||
}
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "contact_type = '".$contact_type."', ";
|
||||
$sql .= "contact_organization = '".$contact_organization."', ";
|
||||
$sql .= "contact_name_prefix = '".$contact_name_prefix."', ";
|
||||
$sql .= "contact_name_given = '".$contact_name_given."', ";
|
||||
$sql .= "contact_name_middle = '".$contact_name_middle."', ";
|
||||
$sql .= "contact_name_family = '".$contact_name_family."', ";
|
||||
$sql .= "contact_name_suffix = '".$contact_name_suffix."', ";
|
||||
$sql .= "contact_nickname = '".$contact_nickname."', ";
|
||||
$sql .= "contact_title = '".$contact_title."', ";
|
||||
$sql .= "contact_category = '".$contact_category."', ";
|
||||
$sql .= "contact_role = '".$contact_role."', ";
|
||||
$sql .= "contact_time_zone = '".$contact_time_zone."', ";
|
||||
$sql .= "contact_note = '".$contact_note."', ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//handle insertion of contact group (or private contact, if not shared)
|
||||
if ($group_uuid != '') {
|
||||
$sql = "insert into v_contact_groups ";
|
||||
$sql .= "( ";
|
||||
$sql .= "contact_group_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "group_uuid ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$group_uuid."' ";
|
||||
$sql .= ") ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
} //if ($action == "update")
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "contact_type = '".$contact_type."', ";
|
||||
$sql .= "contact_organization = '".$contact_organization."', ";
|
||||
$sql .= "contact_name_prefix = '".$contact_name_prefix."', ";
|
||||
$sql .= "contact_name_given = '".$contact_name_given."', ";
|
||||
$sql .= "contact_name_middle = '".$contact_name_middle."', ";
|
||||
$sql .= "contact_name_family = '".$contact_name_family."', ";
|
||||
$sql .= "contact_name_suffix = '".$contact_name_suffix."', ";
|
||||
$sql .= "contact_nickname = '".$contact_nickname."', ";
|
||||
$sql .= "contact_title = '".$contact_title."', ";
|
||||
$sql .= "contact_category = '".$contact_category."', ";
|
||||
$sql .= "contact_role = '".$contact_role."', ";
|
||||
$sql .= "contact_time_zone = '".$contact_time_zone."', ";
|
||||
$sql .= "contact_note = '".$contact_note."', ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//handle redirect
|
||||
if ($_POST['submit'] == $text['button-add']) {
|
||||
$group_uuid = $_POST['group_uuid'];
|
||||
//insert
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
}
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
} //if ($action == "update")
|
||||
|
||||
header("Location: ".$location);
|
||||
return;
|
||||
//handle redirect
|
||||
if ($_POST['submit'] == $text['button-add']) {
|
||||
$group_uuid = $_POST['group_uuid'];
|
||||
//insert
|
||||
$location = "contact_edit.php?id=".$contact_uuid;
|
||||
}
|
||||
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
header("Location: ".$location);
|
||||
return;
|
||||
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -64,87 +64,98 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$email_label = ($email_label_custom != '') ? $email_label_custom : $email_label;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_email_uuid = check_str($_POST["contact_email_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_email_uuid = check_str($_POST["contact_email_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//if primary, unmark other primary numbers
|
||||
if ($email_primary) {
|
||||
$sql = "update v_contact_emails set email_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_email_uuid = uuid();
|
||||
$sql = "insert into v_contact_emails ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_email_uuid, ";
|
||||
$sql .= "email_label, ";
|
||||
$sql .= "email_address, ";
|
||||
$sql .= "email_primary, ";
|
||||
$sql .= "email_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_email_uuid."', ";
|
||||
$sql .= "'".$email_label."', ";
|
||||
$sql .= "'".$email_address."', ";
|
||||
$sql .= (($email_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$email_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//if primary, unmark other primary numbers
|
||||
if ($email_primary) {
|
||||
$sql = "update v_contact_emails set email_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
if ($action == "add") {
|
||||
$contact_email_uuid = uuid();
|
||||
$sql = "insert into v_contact_emails ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_email_uuid, ";
|
||||
$sql .= "email_label, ";
|
||||
$sql .= "email_address, ";
|
||||
$sql .= "email_primary, ";
|
||||
$sql .= "email_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_email_uuid."', ";
|
||||
$sql .= "'".$email_label."', ";
|
||||
$sql .= "'".$email_address."', ";
|
||||
$sql .= (($email_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$email_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_emails set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "email_label = '".$email_label."', ";
|
||||
$sql .= "email_address = '".$email_address."', ";
|
||||
$sql .= "email_primary = ".(($email_primary) ? 1 : 0).", ";
|
||||
$sql .= "email_description = '".$email_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_email_uuid = '".$contact_email_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_emails set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "email_label = '".$email_label."', ";
|
||||
$sql .= "email_address = '".$email_address."', ";
|
||||
$sql .= "email_primary = ".(($email_primary) ? 1 : 0).", ";
|
||||
$sql .= "email_description = '".$email_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_email_uuid = '".$contact_email_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -82,7 +82,7 @@ else {
|
||||
echo "<th>".$text['label-description']."</th>\n";
|
||||
echo "<td class='list_control_icons'>";
|
||||
if (permission_exists('extension_add')) {
|
||||
echo "<a href='/app/extensions/extension_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "<a href='".PROJECT_PATH."/app/extensions/extension_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -92,7 +92,7 @@ else {
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo "<a href='/app/extensions/extension_edit.php?id=".$row['extension_uuid']."'>".$row['extension']."</a>";
|
||||
echo "<a href='".PROJECT_PATH."/app/extensions/extension_edit.php?id=".$row['extension_uuid']."'>".$row['extension']."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row['extension'];
|
||||
@@ -102,10 +102,10 @@ else {
|
||||
echo " <td valign='top' class='row_stylebg'>".$row['description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo "<a href='/app/extensions/extension_edit.php?id=".$row['extension_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
echo "<a href='".PROJECT_PATH."/app/extensions/extension_edit.php?id=".$row['extension_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
}
|
||||
if (permission_exists('extension_delete')) {
|
||||
echo "<a href='/app/extensions/extension_delete.php?id=".$row['extension_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
echo "<a href='".PROJECT_PATH."/app/extensions/extension_delete.php?id=".$row['extension_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -116,4 +116,4 @@ else {
|
||||
|
||||
echo "</table>";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -299,7 +299,7 @@ else {
|
||||
$sql .= (($row['phone_type_text']) ? 1 : 0).", ";
|
||||
$sql .= "'".$row['phone_label']."', ";
|
||||
$sql .= "'".$row['phone_number']."', ";
|
||||
$sql .= "'".$row['phone_description']."', ";
|
||||
$sql .= "'".$row['phone_description']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
@@ -59,75 +59,87 @@ else {
|
||||
$last_mod_user = check_str($_POST["last_mod_user"]);
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//get the primary id for the contact note
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_note_uuid = check_str($_POST["contact_note_uuid"]);
|
||||
}
|
||||
//get the primary id for the contact note
|
||||
if ($action == "update") {
|
||||
$contact_note_uuid = check_str($_POST["contact_note_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
if ($action == "add") {
|
||||
$contact_note_uuid = uuid();
|
||||
$sql = "insert into v_contact_notes ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_note_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_note, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "last_mod_date, ";
|
||||
$sql .= "last_mod_user ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$contact_note_uuid', ";
|
||||
$sql .= "'$contact_uuid', ";
|
||||
$sql .= "'$contact_note', ";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION['username']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
//add the note
|
||||
if ($action == "add") {
|
||||
$contact_note_uuid = uuid();
|
||||
$sql = "insert into v_contact_notes ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_note_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_note, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "last_mod_date, ";
|
||||
$sql .= "last_mod_user ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$contact_note_uuid', ";
|
||||
$sql .= "'$contact_uuid', ";
|
||||
$sql .= "'$contact_note', ";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "now(), ";
|
||||
$sql .= "'".$_SESSION['username']."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_notes set ";
|
||||
$sql .= "contact_uuid = '$contact_uuid', ";
|
||||
$sql .= "contact_note = '$contact_note', ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and contact_note_uuid = '$contact_note_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
//update the note
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_notes set ";
|
||||
$sql .= "contact_uuid = '$contact_uuid', ";
|
||||
$sql .= "contact_note = '$contact_note', ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and contact_note_uuid = '$contact_note_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -72,102 +72,113 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$phone_label = ($phone_label_custom != '') ? $phone_label_custom : $phone_label;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_phone_uuid = check_str($_POST["contact_phone_uuid"]);
|
||||
}
|
||||
//set thge uuid
|
||||
if ($action == "update") {
|
||||
$contact_phone_uuid = check_str($_POST["contact_phone_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//if primary, unmark other primary numbers
|
||||
if ($phone_primary) {
|
||||
$sql = "update v_contact_phones set phone_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_phone_uuid = uuid();
|
||||
$sql = "insert into v_contact_phones ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_phone_uuid, ";
|
||||
$sql .= "phone_type_voice, ";
|
||||
$sql .= "phone_type_fax, ";
|
||||
$sql .= "phone_type_video, ";
|
||||
$sql .= "phone_type_text, ";
|
||||
$sql .= "phone_label, ";
|
||||
$sql .= "phone_number, ";
|
||||
$sql .= "phone_extension, ";
|
||||
$sql .= "phone_primary, ";
|
||||
$sql .= "phone_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_phone_uuid."', ";
|
||||
$sql .= (($phone_type_voice) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_fax) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_video) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_text) ? 1 : 'null').", ";
|
||||
$sql .= "'".$phone_label."', ";
|
||||
$sql .= "'".$phone_number."', ";
|
||||
$sql .= "'".$phone_extension."', ";
|
||||
$sql .= (($phone_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$phone_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//if primary, unmark other primary numbers
|
||||
if ($phone_primary) {
|
||||
$sql = "update v_contact_phones set phone_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
if ($action == "add") {
|
||||
$contact_phone_uuid = uuid();
|
||||
$sql = "insert into v_contact_phones ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_phone_uuid, ";
|
||||
$sql .= "phone_type_voice, ";
|
||||
$sql .= "phone_type_fax, ";
|
||||
$sql .= "phone_type_video, ";
|
||||
$sql .= "phone_type_text, ";
|
||||
$sql .= "phone_label, ";
|
||||
$sql .= "phone_number, ";
|
||||
$sql .= "phone_extension, ";
|
||||
$sql .= "phone_primary, ";
|
||||
$sql .= "phone_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_phone_uuid."', ";
|
||||
$sql .= (($phone_type_voice) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_fax) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_video) ? 1 : 'null').", ";
|
||||
$sql .= (($phone_type_text) ? 1 : 'null').", ";
|
||||
$sql .= "'".$phone_label."', ";
|
||||
$sql .= "'".$phone_number."', ";
|
||||
$sql .= "'".$phone_extension."', ";
|
||||
$sql .= (($phone_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$phone_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_phones set ";
|
||||
$sql .= "contact_uuid = '$contact_uuid', ";
|
||||
$sql .= "phone_type_voice = ".(($phone_type_voice) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_fax = ".(($phone_type_fax) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_video = ".(($phone_type_video) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_text = ".(($phone_type_text) ? 1 : 'null').", ";
|
||||
$sql .= "phone_label = '".$phone_label."', ";
|
||||
$sql .= "phone_number = '".$phone_number."', ";
|
||||
$sql .= "phone_extension = '".$phone_extension."', ";
|
||||
$sql .= "phone_primary = ".(($phone_primary) ? 1 : 0).", ";
|
||||
$sql .= "phone_description = '".$phone_description."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_phone_uuid = '".$contact_phone_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_phones set ";
|
||||
$sql .= "contact_uuid = '$contact_uuid', ";
|
||||
$sql .= "phone_type_voice = ".(($phone_type_voice) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_fax = ".(($phone_type_fax) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_video = ".(($phone_type_video) ? 1 : 'null').", ";
|
||||
$sql .= "phone_type_text = ".(($phone_type_text) ? 1 : 'null').", ";
|
||||
$sql .= "phone_label = '".$phone_label."', ";
|
||||
$sql .= "phone_number = '".$phone_number."', ";
|
||||
$sql .= "phone_extension = '".$phone_extension."', ";
|
||||
$sql .= "phone_primary = ".(($phone_primary) ? 1 : 0).", ";
|
||||
$sql .= "phone_description = '".$phone_description."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_phone_uuid = '".$contact_phone_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -48,9 +48,10 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
//get the contact uuid
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
@@ -66,93 +67,104 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$relation_reciprocal_label = ($relation_reciprocal_label_custom != '') ? $relation_reciprocal_label_custom : $relation_reciprocal_label;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_relation_uuid = check_str($_POST["contact_relation_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_relation_uuid = uuid();
|
||||
$sql = "insert into v_contact_relations ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_relation_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "relation_label, ";
|
||||
$sql .= "relation_contact_uuid ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$contact_relation_uuid."', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$relation_label."', ";
|
||||
$sql .= "'".$relation_contact_uuid."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($relation_reciprocal) {
|
||||
$contact_relation_uuid = uuid();
|
||||
$sql = "insert into v_contact_relations ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_relation_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "relation_label, ";
|
||||
$sql .= "relation_contact_uuid ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$contact_relation_uuid."', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$relation_contact_uuid."', ";
|
||||
$sql .= "'".$relation_reciprocal_label."', ";
|
||||
$sql .= "'".$contact_uuid."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_relation_uuid = check_str($_POST["contact_relation_uuid"]);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_relations set ";
|
||||
$sql .= "relation_label = '".$relation_label."', ";
|
||||
$sql .= "relation_contact_uuid = '".$relation_contact_uuid."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_relation_uuid = uuid();
|
||||
$sql = "insert into v_contact_relations ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_relation_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "relation_label, ";
|
||||
$sql .= "relation_contact_uuid ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$contact_relation_uuid."', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$relation_label."', ";
|
||||
$sql .= "'".$relation_contact_uuid."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($relation_reciprocal) {
|
||||
$contact_relation_uuid = uuid();
|
||||
$sql = "insert into v_contact_relations ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_relation_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "relation_label, ";
|
||||
$sql .= "relation_contact_uuid ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$contact_relation_uuid."', ";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$relation_contact_uuid."', ";
|
||||
$sql .= "'".$relation_reciprocal_label."', ";
|
||||
$sql .= "'".$contact_uuid."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_relations set ";
|
||||
$sql .= "relation_label = '".$relation_label."', ";
|
||||
$sql .= "relation_contact_uuid = '".$relation_contact_uuid."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_relation_uuid = '".$contact_relation_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -48,10 +48,13 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
//get the contact uuid
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
|
||||
//set the session domain uuid as a variable
|
||||
$domain_uuid = $_SESSION['domain_uuid'];
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
@@ -64,97 +67,110 @@ $domain_uuid = $_SESSION['domain_uuid'];
|
||||
$contact_setting_description = check_str($_POST["contact_setting_description"]);
|
||||
}
|
||||
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_setting_uuid = check_str($_POST["contact_setting_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_setting_uuid = check_str($_POST["contact_setting_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
//if (strlen($domain_setting_category) == 0) { $msg .= $text['message-required'].$text['label-category']."<br>\n"; }
|
||||
//if (strlen($domain_setting_subcategory) == 0) { $msg .= $text['message-required'].$text['label-subcategory']."<br>\n"; }
|
||||
//if (strlen($domain_setting_name) == 0) { $msg .= $text['message-required'].$text['label-type']."<br>\n"; }
|
||||
//if (strlen($domain_setting_value) == 0) { $msg .= $text['message-required'].$text['label-value']."<br>\n"; }
|
||||
//if (strlen($domain_setting_order) == 0) { $msg .= $text['message-required'].$text['label-order']."<br>\n"; }
|
||||
//if (strlen($domain_setting_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."<br>\n"; }
|
||||
//if (strlen($domain_setting_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
$contact_setting_order = ($contact_setting_order != '') ? $contact_setting_order : 'null';
|
||||
|
||||
//add the domain
|
||||
if ($action == "add" && permission_exists('domain_setting_add')) {
|
||||
$sql = "insert into v_contact_settings ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_setting_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_setting_category, ";
|
||||
$sql .= "contact_setting_subcategory, ";
|
||||
$sql .= "contact_setting_name, ";
|
||||
$sql .= "contact_setting_value, ";
|
||||
$sql .= "contact_setting_order, ";
|
||||
$sql .= "contact_setting_enabled, ";
|
||||
$sql .= "contact_setting_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'$contact_uuid', ";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$contact_setting_category', ";
|
||||
$sql .= "'$contact_setting_subcategory', ";
|
||||
$sql .= "'$contact_setting_name', ";
|
||||
$sql .= "'$contact_setting_value', ";
|
||||
$sql .= "$contact_setting_order, ";
|
||||
$sql .= "'$contact_setting_enabled', ";
|
||||
$sql .= "'$contact_setting_description' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
} //if ($action == "add")
|
||||
|
||||
//update the domain
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_settings set ";
|
||||
$sql .= "contact_setting_category = '$contact_setting_category', ";
|
||||
$sql .= "contact_setting_subcategory = '$contact_setting_subcategory', ";
|
||||
$sql .= "contact_setting_name = '$contact_setting_name', ";
|
||||
$sql .= "contact_setting_value = '$contact_setting_value', ";
|
||||
$sql .= "contact_setting_order = $contact_setting_order, ";
|
||||
$sql .= "contact_setting_enabled = '$contact_setting_enabled', ";
|
||||
$sql .= "contact_setting_description = '$contact_setting_description' ";
|
||||
$sql .= "where contact_uuid = '$contact_uuid' ";
|
||||
$sql .= "and contact_setting_uuid = '$contact_setting_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
} //if ($action == "update")
|
||||
|
||||
//redirect the browser
|
||||
if ($action == "update") {
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
}
|
||||
if ($action == "add") {
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
}
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (strlen($domain_setting_category) == 0) { $msg .= $text['message-required'].$text['label-category']."<br>\n"; }
|
||||
//if (strlen($domain_setting_subcategory) == 0) { $msg .= $text['message-required'].$text['label-subcategory']."<br>\n"; }
|
||||
//if (strlen($domain_setting_name) == 0) { $msg .= $text['message-required'].$text['label-type']."<br>\n"; }
|
||||
//if (strlen($domain_setting_value) == 0) { $msg .= $text['message-required'].$text['label-value']."<br>\n"; }
|
||||
//if (strlen($domain_setting_order) == 0) { $msg .= $text['message-required'].$text['label-order']."<br>\n"; }
|
||||
//if (strlen($domain_setting_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."<br>\n"; }
|
||||
//if (strlen($domain_setting_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//set the order
|
||||
$contact_setting_order = ($contact_setting_order != '') ? $contact_setting_order : 'null';
|
||||
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//add the domain
|
||||
if ($action == "add" && permission_exists('domain_setting_add')) {
|
||||
$sql = "insert into v_contact_settings ";
|
||||
$sql .= "(";
|
||||
$sql .= "contact_setting_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_setting_category, ";
|
||||
$sql .= "contact_setting_subcategory, ";
|
||||
$sql .= "contact_setting_name, ";
|
||||
$sql .= "contact_setting_value, ";
|
||||
$sql .= "contact_setting_order, ";
|
||||
$sql .= "contact_setting_enabled, ";
|
||||
$sql .= "contact_setting_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'$contact_uuid', ";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$contact_setting_category', ";
|
||||
$sql .= "'$contact_setting_subcategory', ";
|
||||
$sql .= "'$contact_setting_name', ";
|
||||
$sql .= "'$contact_setting_value', ";
|
||||
$sql .= "$contact_setting_order, ";
|
||||
$sql .= "'$contact_setting_enabled', ";
|
||||
$sql .= "'$contact_setting_description' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
} //if ($action == "add")
|
||||
|
||||
//update the domain
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_settings set ";
|
||||
$sql .= "contact_setting_category = '$contact_setting_category', ";
|
||||
$sql .= "contact_setting_subcategory = '$contact_setting_subcategory', ";
|
||||
$sql .= "contact_setting_name = '$contact_setting_name', ";
|
||||
$sql .= "contact_setting_value = '$contact_setting_value', ";
|
||||
$sql .= "contact_setting_order = $contact_setting_order, ";
|
||||
$sql .= "contact_setting_enabled = '$contact_setting_enabled', ";
|
||||
$sql .= "contact_setting_description = '$contact_setting_description' ";
|
||||
$sql .= "where contact_uuid = '$contact_uuid' ";
|
||||
$sql .= "and contact_setting_uuid = '$contact_setting_uuid'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
} //if ($action == "update")
|
||||
|
||||
//redirect the browser
|
||||
if ($action == "update") {
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
}
|
||||
if ($action == "add") {
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
}
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -47,9 +47,10 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
//get the contact uuid
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
@@ -58,81 +59,91 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$time_description = check_str($_POST["time_description"]);
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_time_uuid = check_str($_POST["contact_time_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_time_uuid = check_str($_POST["contact_time_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_time_uuid = uuid();
|
||||
$sql = "insert into v_contact_times ";
|
||||
$sql .= "( ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_time_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "user_uuid, ";
|
||||
$sql .= "time_start, ";
|
||||
$sql .= "time_stop, ";
|
||||
$sql .= "time_description ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_time_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$_SESSION["user"]["user_uuid"]."', ";
|
||||
$sql .= "'".$time_start."', ";
|
||||
$sql .= "'".$time_stop."', ";
|
||||
$sql .= "'".$time_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
if ($action == "add") {
|
||||
$contact_time_uuid = uuid();
|
||||
$sql = "insert into v_contact_times ";
|
||||
$sql .= "( ";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_time_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "user_uuid, ";
|
||||
$sql .= "time_start, ";
|
||||
$sql .= "time_stop, ";
|
||||
$sql .= "time_description ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "( ";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$contact_time_uuid."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$_SESSION["user"]["user_uuid"]."', ";
|
||||
$sql .= "'".$time_start."', ";
|
||||
$sql .= "'".$time_stop."', ";
|
||||
$sql .= "'".$time_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_times ";
|
||||
$sql .= "set ";
|
||||
$sql .= "time_start = '".$time_start."', ";
|
||||
$sql .= "time_stop = '".$time_stop."', ";
|
||||
$sql .= "time_description = '".$time_description."' ";
|
||||
$sql .= "where ";
|
||||
$sql .= "contact_time_uuid = '".$contact_time_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$sql .= "and user_uuid = '".$_SESSION["user"]["user_uuid"]."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_times ";
|
||||
$sql .= "set ";
|
||||
$sql .= "time_start = '".$time_start."', ";
|
||||
$sql .= "time_stop = '".$time_stop."', ";
|
||||
$sql .= "time_description = '".$time_description."' ";
|
||||
$sql .= "where ";
|
||||
$sql .= "contact_time_uuid = '".$contact_time_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$sql .= "and user_uuid = '".$_SESSION["user"]["user_uuid"]."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -48,12 +48,13 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
//get the contact uuid
|
||||
if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$contact_uuid = check_str($_GET["contact_uuid"]);
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
if (count($_POST) > 0) {
|
||||
$url_label = check_str($_POST["url_label"]);
|
||||
$url_label_custom = check_str($_POST["url_label_custom"]);
|
||||
$url_address = check_str($_POST["url_address"]);
|
||||
@@ -64,87 +65,98 @@ if (strlen($_GET["contact_uuid"]) > 0) {
|
||||
$url_label = ($url_label_custom != '') ? $url_label_custom : $url_label;
|
||||
}
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//process the form data
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
$contact_url_uuid = check_str($_POST["contact_url_uuid"]);
|
||||
}
|
||||
//set the uuid
|
||||
if ($action == "update") {
|
||||
$contact_url_uuid = check_str($_POST["contact_url_uuid"]);
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table><tr><td>\n";
|
||||
echo $msg."<br />";
|
||||
echo "</td></tr></table>\n";
|
||||
persistformvar($_POST);
|
||||
echo "</div>\n";
|
||||
require_once "resources/footer.php";
|
||||
return;
|
||||
}
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//if primary, unmark other primary numbers
|
||||
if ($url_primary) {
|
||||
$sql = "update v_contact_urls set url_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
//update last modified
|
||||
$sql = "update v_contacts set ";
|
||||
$sql .= "last_mod_date = now(), ";
|
||||
$sql .= "last_mod_user = '".$_SESSION['username']."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "add") {
|
||||
$contact_url_uuid = uuid();
|
||||
$sql = "insert into v_contact_urls ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_url_uuid, ";
|
||||
$sql .= "url_label, ";
|
||||
$sql .= "url_address, ";
|
||||
$sql .= "url_primary, ";
|
||||
$sql .= "url_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_url_uuid."', ";
|
||||
$sql .= "'".$url_label."', ";
|
||||
$sql .= "'".$url_address."', ";
|
||||
$sql .= (($url_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$url_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
//if primary, unmark other primary numbers
|
||||
if ($url_primary) {
|
||||
$sql = "update v_contact_urls set url_primary = 0 ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and contact_uuid = '".$contact_uuid."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
if ($action == "add") {
|
||||
$contact_url_uuid = uuid();
|
||||
$sql = "insert into v_contact_urls ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "contact_uuid, ";
|
||||
$sql .= "contact_url_uuid, ";
|
||||
$sql .= "url_label, ";
|
||||
$sql .= "url_address, ";
|
||||
$sql .= "url_primary, ";
|
||||
$sql .= "url_description ";
|
||||
$sql .= ")";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$_SESSION['domain_uuid']."', ";
|
||||
$sql .= "'".$contact_uuid."', ";
|
||||
$sql .= "'".$contact_url_uuid."', ";
|
||||
$sql .= "'".$url_label."', ";
|
||||
$sql .= "'".$url_address."', ";
|
||||
$sql .= (($url_primary) ? 1 : 0).", ";
|
||||
$sql .= "'".$url_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_urls set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "url_label = '".$url_label."', ";
|
||||
$sql .= "url_address = '".$url_address."', ";
|
||||
$sql .= "url_primary = ".(($url_primary) ? 1 : 0).", ";
|
||||
$sql .= "url_description = '".$url_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_url_uuid = '".$contact_url_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
if ($action == "update") {
|
||||
$sql = "update v_contact_urls set ";
|
||||
$sql .= "contact_uuid = '".$contact_uuid."', ";
|
||||
$sql .= "url_label = '".$url_label."', ";
|
||||
$sql .= "url_address = '".$url_address."', ";
|
||||
$sql .= "url_primary = ".(($url_primary) ? 1 : 0).", ";
|
||||
$sql .= "url_description = '".$url_description."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and contact_url_uuid = '".$contact_url_uuid."'";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: contact_edit.php?id=".$contact_uuid);
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
|
||||
@@ -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-2013
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -55,7 +55,8 @@ else {
|
||||
foreach ($_SESSION['groups'] as $group_data) {
|
||||
$user_group_uuids[] = $group_data['group_uuid'];
|
||||
}
|
||||
//add user's uuid to group uuid list to include private (non-shared) contacts
|
||||
|
||||
//add user's uuid to group uuid list to include private (non-shared) contacts
|
||||
$user_group_uuids[] = $_SESSION["user_uuid"];
|
||||
|
||||
//get contact sync sources
|
||||
@@ -177,7 +178,10 @@ else {
|
||||
$sql .= "order by ".$order_by." ".$order." ";
|
||||
}
|
||||
else {
|
||||
$sql .= "order by contact_organization desc, contact_name_given asc, contact_name_family asc ";
|
||||
$sql .= "order by last_mod_date desc ";
|
||||
if ($db_type == "pgsql") {
|
||||
$sql .= "nulls last ";
|
||||
}
|
||||
}
|
||||
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
|
||||
@@ -214,15 +214,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$dialplan["dialplan_description"] = ($dialplan_description != '') ? $dialplan_description : $destination_description;
|
||||
$dialplan_detail_order = 10;
|
||||
|
||||
//add the public condition
|
||||
$y = 0;
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "condition";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "context";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "public";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
|
||||
//increment the dialplan detail order
|
||||
$dialplan_detail_order = $dialplan_detail_order + 10;
|
||||
|
||||
@@ -369,7 +360,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (!permission_exists('destination_domain')) {
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
}
|
||||
echo $sql."<br><br>";
|
||||
//echo $sql."<br><br>";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
@@ -555,32 +555,35 @@ require_once "resources/require.php";
|
||||
echo "<select id='device_template' name='device_template' class='formfld'>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
|
||||
if ($dh = opendir($template_dir)) {
|
||||
while($dir = readdir($dh)) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
if($dh_sub = opendir($template_dir.'/'.$dir)) {
|
||||
while($dir_sub = readdir($dh_sub)) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
echo "<option value='".$dir."/".$dir_sub."' selected='selected'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$dir."/".$dir_sub."'>".$dir."/".$dir_sub."</option>\n";
|
||||
if (is_dir($template_dir)) {
|
||||
$templates = scandir($template_dir);
|
||||
foreach($templates as $dir) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
$dh_sub=$template_dir . "/" . $dir;
|
||||
if(is_dir($dh_sub)) {
|
||||
$templates_sub = scandir($dh_sub);
|
||||
foreach($templates_sub as $dir_sub) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
echo "<option value='".$dir."/".$dir_sub."' selected='selected'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='".$dir."/".$dir_sub."'>".$dir."/".$dir_sub."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh_sub);
|
||||
}
|
||||
closedir($dh_sub);
|
||||
echo "</optgroup>";
|
||||
}
|
||||
echo "</optgroup>";
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-device_template']."\n";
|
||||
|
||||
@@ -58,9 +58,7 @@ else {
|
||||
else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
//get the app uuid
|
||||
if (is_uuid($_REQUEST["app_uuid"])) {
|
||||
if (strlen($_REQUEST["app_uuid"]) > 0) {
|
||||
$app_uuid = $_REQUEST["app_uuid"];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<context name="{v_context}">
|
||||
<extension name="call_block" number="" continue="true" app_uuid="b1b31930-d0ee-4395-a891-04df94599f1f" enabled="false">
|
||||
<condition>
|
||||
<action application="lua" data="app.lua call_block"/>
|
||||
<condition field="${call_blocked}" expression="^true$" >
|
||||
<anti-action application="lua" data="app.lua call_block"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
@@ -4,8 +4,9 @@
|
||||
<action application="set" data="caller_id_name=Page" />
|
||||
<action application="set" data="caller_id_number=" />
|
||||
<action application="set" data="pin_number={v_pin_number}" />
|
||||
<action application="set" data="extension_list=101-103,105" />
|
||||
<action application="set" data="destinations=101-103,105" />
|
||||
<action application="set" data="moderator=false" />
|
||||
<action application="set" data="mute=true" />
|
||||
<action application="set" data="set api_hangup_hook=conference page-${destination_number} kick all" />
|
||||
<action application="lua" data="page.lua" />
|
||||
</condition>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<context name="{v_context}">
|
||||
<extension name="page-extension" number="*8[ext]" continue="false" app_uuid="1b224444-de8b-448d-b2d1-19feaac3effa">
|
||||
<condition field="destination_number" expression="^\*8(\d{2,7})$">
|
||||
<action application="set" data="extension_list=$1"/>
|
||||
<action application="set" data="destinations=$1"/>
|
||||
<action application="set" data="pin_number={v_pin_number}"/>
|
||||
<action application="set" data="mute=true"/>
|
||||
<action application="set" data="moderator=false" />
|
||||
|
||||
@@ -184,33 +184,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//add condition public context
|
||||
$dialplan_detail_uuid = uuid();
|
||||
$sql = "insert into v_dialplan_details ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "dialplan_uuid, ";
|
||||
$sql .= "dialplan_detail_uuid, ";
|
||||
$sql .= "dialplan_detail_tag, ";
|
||||
$sql .= "dialplan_detail_type, ";
|
||||
$sql .= "dialplan_detail_data, ";
|
||||
$sql .= "dialplan_detail_group, ";
|
||||
$sql .= "dialplan_detail_order ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'$domain_uuid', ";
|
||||
$sql .= "'$dialplan_uuid', ";
|
||||
$sql .= "'$dialplan_detail_uuid', ";
|
||||
$sql .= "'condition', ";
|
||||
$sql .= "'context', ";
|
||||
$sql .= "'public', ";
|
||||
$sql .= "'0', ";
|
||||
$sql .= "'10' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//add condition 1
|
||||
$dialplan_detail_uuid = uuid();
|
||||
$sql = "insert into v_dialplan_details ";
|
||||
|
||||
@@ -1258,13 +1258,16 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$template_dir = $device->get_template_dir();
|
||||
echo "<select id='device_template' name='device_template' class='formfld'>\n";
|
||||
echo "<option value=''></option>\n";
|
||||
if($dh = opendir($template_dir)) {
|
||||
while($dir = readdir($dh)) {
|
||||
if (is_dir($template_dir)) {
|
||||
$templates = scandir($template_dir);
|
||||
foreach($templates as $dir) {
|
||||
if($file != "." && $dir != ".." && $dir[0] != '.') {
|
||||
if(is_dir($template_dir . "/" . $dir)) {
|
||||
echo "<optgroup label='$dir'>";
|
||||
if($dh_sub = opendir($template_dir.'/'.$dir)) {
|
||||
while($dir_sub = readdir($dh_sub)) {
|
||||
$dh_sub=$template_dir . "/" . $dir;
|
||||
if(is_dir($dh_sub)) {
|
||||
$templates_sub = scandir($dh_sub);
|
||||
foreach($templates_sub as $dir_sub) {
|
||||
if($file_sub != '.' && $dir_sub != '..' && $dir_sub[0] != '.') {
|
||||
if(is_dir($template_dir . '/' . $dir .'/'. $dir_sub)) {
|
||||
if ($device_template == $dir."/".$dir_sub) {
|
||||
|
||||
@@ -608,7 +608,7 @@ function gs_cmd($args) {
|
||||
$fax_uri = $route_array[0];
|
||||
$t38 = "fax_enable_t38=true,fax_enable_t38_request=true,";
|
||||
}
|
||||
$cmd = "api originate {for_fax=1,absolute_codec_string='PCMU,PCMA',accountcode='".$fax_accountcode."',sip_h_X-accountcode='".$fax_accountcode."',domain_uuid=".$_SESSION["domain_uuid"].",domain_name=".$_SESSION["domain_name"].",mailto_address='".$mailto_address."',mailfrom_address='".$mailfrom_address."',origination_caller_id_name='".$fax_caller_id_name."',origination_caller_id_number='".$fax_caller_id_number."',fax_ident='".$fax_caller_id_number."',fax_header='".$fax_caller_id_name."',fax_uri=".$fax_uri.",fax_file='".$fax_file."',fax_retry_attempts=1,fax_retry_limit=20,fax_retry_sleep=180,fax_verbose=true,fax_use_ecm=off,".$t38."api_hangup_hook='lua fax_retry.lua'}".$fax_uri." &txfax('".$fax_file."')";
|
||||
$cmd = "api originate {for_fax=1,accountcode='".$fax_accountcode."',sip_h_X-accountcode='".$fax_accountcode."',domain_uuid=".$_SESSION["domain_uuid"].",domain_name=".$_SESSION["domain_name"].",mailto_address='".$mailto_address."',mailfrom_address='".$mailfrom_address."',origination_caller_id_name='".$fax_caller_id_name."',origination_caller_id_number='".$fax_caller_id_number."',fax_ident='".$fax_caller_id_number."',fax_header='".$fax_caller_id_name."',fax_uri=".$fax_uri.",fax_file='".$fax_file."',fax_retry_attempts=1,fax_retry_limit=20,fax_retry_sleep=180,fax_verbose=true,fax_use_ecm=off,".$t38."api_hangup_hook='lua fax_retry.lua'}".$fax_uri." &txfax('".$fax_file."')";
|
||||
//send the command to event socket
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
$response = str_replace("\n", "", $response);
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
$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_follow_me";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "follow_me_uuid";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "follow_me_destination_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
@@ -172,4 +174,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = "";
|
||||
$z++;
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -189,6 +189,11 @@
|
||||
$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'] = "hostname";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(255)";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
@@ -442,6 +442,15 @@ $text['label-expire_seconds']['de-at'] = "Expire Seconds";
|
||||
$text['label-expire_seconds']['ar-eg'] = "";
|
||||
$text['label-expire_seconds']['he'] = "";
|
||||
|
||||
$text['label-hostname']['en-us'] = "Hostname";
|
||||
$text['label-hostname']['pt-pt'] = "Hostname";
|
||||
$text['label-hostname']['fr-fr'] = "Nom d'hôte";
|
||||
$text['label-hostname']['pt-br'] = "Hostname";
|
||||
$text['label-hostname']['pl'] = "Nazwa hosta";
|
||||
$text['label-hostname']['sv-se'] = "Hostname";
|
||||
$text['label-hostname']['uk'] = "Назва хоста";
|
||||
$text['label-hostname']['de-at'] = "Hostname";
|
||||
|
||||
$text['label-enabled']['en-us'] = "Enabled";
|
||||
$text['label-enabled']['es-cl'] = "Activado";
|
||||
$text['label-enabled']['pt-pt'] = "Habilitado";
|
||||
@@ -870,6 +879,15 @@ $text['description-expire_seconds']['de-at'] = "Geben Sie an, nach wie vielen Se
|
||||
$text['description-expire_seconds']['ar-eg'] = "";
|
||||
$text['description-expire_seconds']['he'] = "";
|
||||
|
||||
$text['description-hostname']['en-us'] = "Enter the hostname / switchname.";
|
||||
$text['description-hostname']['pt-pt'] = "Introduza o hostname";
|
||||
$text['description-hostname']['fr-fr'] = "Entrer le nom de l'hôte / du switch.";
|
||||
$text['description-hostname']['pt-br'] = "Insira o hostname";
|
||||
$text['description-hostname']['pl'] = "Wprowadź nazwę hosta / PBXu.";
|
||||
$text['description-hostname']['sv-se'] = "Fyll i hostname / switchname.";
|
||||
$text['description-hostname']['uk'] = "Введіть назву хоста / switchname.";
|
||||
$text['description-hostname']['de-at'] = "Geben Sie den Hostnamen / Switchnamen an.";
|
||||
|
||||
$text['description-enabled']['en-us'] = "Enable or Disable the Gateway";
|
||||
$text['description-enabled']['es-cl'] = "Activar o Desactivar la Pasarela";
|
||||
$text['description-enabled']['pt-pt'] = "Habilitar ou Desabilitar o Gateway";
|
||||
|
||||
@@ -95,6 +95,7 @@ else {
|
||||
$extension_in_contact = check_str($_POST["extension_in_contact"]);
|
||||
$context = check_str($_POST["context"]);
|
||||
$profile = check_str($_POST["profile"]);
|
||||
$hostname = check_str($_POST["hostname"]);
|
||||
$enabled = check_str($_POST["enabled"]);
|
||||
$description = check_str($_POST["description"]);
|
||||
}
|
||||
@@ -198,6 +199,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "extension_in_contact, ";
|
||||
$sql .= "context, ";
|
||||
$sql .= "profile, ";
|
||||
$sql .= "hostname, ";
|
||||
$sql .= "enabled, ";
|
||||
$sql .= "description ";
|
||||
$sql .= ")";
|
||||
@@ -232,6 +234,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "'$extension_in_contact', ";
|
||||
$sql .= "'$context', ";
|
||||
$sql .= "'$profile', ";
|
||||
if (strlen($hostname) == 0) {
|
||||
$sql .= "null, ";
|
||||
}
|
||||
else {
|
||||
$sql .= "'$hostname', ";
|
||||
}
|
||||
$sql .= "'$enabled', ";
|
||||
$sql .= "'$description' ";
|
||||
$sql .= ")";
|
||||
@@ -278,6 +286,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
else {
|
||||
$sql .= "domain_uuid = '$domain_uuid', ";
|
||||
}
|
||||
if (strlen($hostname) == 0) {
|
||||
$sql .= "hostname = null, ";
|
||||
}
|
||||
else {
|
||||
$sql .= "hostname = '$hostname', ";
|
||||
}
|
||||
$sql .= "enabled = '$enabled', ";
|
||||
$sql .= "description = '$description' ";
|
||||
$sql .= "where gateway_uuid = '$gateway_uuid'";
|
||||
@@ -374,6 +388,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$extension_in_contact = $row["extension_in_contact"];
|
||||
$context = $row["context"];
|
||||
$profile = $row["profile"];
|
||||
$hostname = $row["hostname"];
|
||||
$enabled = $row["enabled"];
|
||||
$description = $row["description"];
|
||||
}
|
||||
@@ -871,6 +886,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-hostname']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='hostname' maxlength='255' value=\"$hostname\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-hostname']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-enabled']."\n";
|
||||
|
||||
@@ -136,7 +136,7 @@ else {
|
||||
}
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$gateways = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
$rows_per_page = 150;
|
||||
@@ -159,6 +159,7 @@ else {
|
||||
echo "<th>".$text['label-action']."</th>\n";
|
||||
echo "<th>".$text['label-state']."</th>\n";
|
||||
}
|
||||
echo th_order_by('hostname', $text['label-hostname'], $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||
echo "<td class='list_control_icons'>";
|
||||
@@ -171,7 +172,7 @@ else {
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($num_rows > 0) {
|
||||
foreach($result as $row) {
|
||||
foreach($gateways as $row) {
|
||||
$tr_link = (permission_exists('gateway_edit')) ? "href='gateway_edit.php?id=".$row['gateway_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
@@ -211,6 +212,7 @@ else {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> </td>\n";
|
||||
}
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row["hostname"]."</td>\n";
|
||||
if ($row["enabled"] == "true") {
|
||||
echo " <td valign='top' class='".$row_style[$c]."' style='align: center;'>".$text['label-true']."</td>\n";
|
||||
}
|
||||
@@ -230,11 +232,11 @@ else {
|
||||
}
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
unset($sql, $gateways, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='8' align='left'>\n";
|
||||
echo "<td colspan='9' align='left'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
|
||||
@@ -241,7 +241,7 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
header('WWW-Authenticate: Basic realm="'.$_SESSION['domain_name']." ".date('r').'"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
header("Content-Type: text/plain");
|
||||
echo 'Authorization Required';
|
||||
header("Content-Length: 0");
|
||||
exit;
|
||||
} else {
|
||||
if ($_SERVER['PHP_AUTH_USER'] == $provision["http_auth_username"] && $_SERVER['PHP_AUTH_PW'] == $provision["http_auth_password"]) {
|
||||
@@ -252,7 +252,9 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
header('WWW-Authenticate: Basic realm="'.$_SESSION['domain_name']." ".date('r').'"');
|
||||
unset($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']);
|
||||
usleep(rand(1000000,3000000));//1-3 seconds.
|
||||
echo 'Authorization Required';
|
||||
$content = 'Authorization Required';
|
||||
header("Content-Length: ".strval(strlen($content)));
|
||||
echo $content;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ include "root.php";
|
||||
$sql .= "or device_profile_uuid = '".$device_profile_uuid."' ";
|
||||
}
|
||||
$sql .= ") ";
|
||||
$sql .= "AND (device_key_vendor = '".$device_vendor."' or device_key_vendor is null) ";
|
||||
$sql .= "AND (lower(device_key_vendor) = '".$device_vendor."' or device_key_vendor is null) ";
|
||||
$sql .= "ORDER BY device_key_category asc, device_key_id asc, device_uuid desc";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
@@ -583,6 +583,28 @@ $text['label-alternate-destination']['uk'] = "";
|
||||
$text['label-alternate-destination']['de-at'] = "Alternatives Ziel";
|
||||
$text['label-alternate-destination']['he'] = "";
|
||||
|
||||
$text['label-group']['en-us'] = "Group";
|
||||
$text['label-group']['es-cl'] = "Grupo";
|
||||
$text['label-group']['pt-pt'] = "";
|
||||
$text['label-group']['fr-fr'] = "";
|
||||
$text['label-group']['pt-br'] = "";
|
||||
$text['label-group']['pl'] = "";
|
||||
$text['label-group']['sv-se'] = "";
|
||||
$text['label-group']['uk'] = "";
|
||||
$text['label-group']['de-at'] = "";
|
||||
$text['label-group']['he'] = "";
|
||||
|
||||
$text['label-destination']['en-us'] = "Destination";
|
||||
$text['label-destination']['es-cl'] = "Destino";
|
||||
$text['label-destination']['pt-pt'] = "Destino";
|
||||
$text['label-destination']['fr-fr'] = "Destination";
|
||||
$text['label-destination']['pt-br'] = "";
|
||||
$text['label-destination']['pl'] = "Destynacja";
|
||||
$text['label-destination']['sv-se'] = "Destination";
|
||||
$text['label-destination']['uk'] = "";
|
||||
$text['label-destination']['de-at'] = "Ziel";
|
||||
$text['label-destination']['he'] = "";
|
||||
|
||||
$text['header-time_conditions']['en-us'] = "Time Conditions";
|
||||
$text['header-time_conditions']['es-cl'] = "Condiciones de Tiempo";
|
||||
$text['header-time_conditions']['pt-pt'] = "Condições Temporais";
|
||||
|
||||
@@ -248,7 +248,14 @@ require_once "resources/header.php";
|
||||
$is_preset = (in_array($group_id, $_REQUEST['preset'])) ? true : false;
|
||||
|
||||
//set group and order number
|
||||
$dialplan_detail_group = $group_id;
|
||||
|
||||
$dialplan_detail_group_user = check_str($_POST["group_$group_id"]);
|
||||
if($dialplan_detail_group_user!='') {
|
||||
$dialplan_detail_group = $dialplan_detail_group_user;
|
||||
} else {
|
||||
$dialplan_detail_group = $group_id;
|
||||
}
|
||||
|
||||
$dialplan_detail_order = 0;
|
||||
|
||||
foreach ($conditions as $cond_num => $cond_var) {
|
||||
@@ -836,7 +843,7 @@ function add_custom_condition($destination, $group_id, $dialplan_action = '') {
|
||||
echo " ".$text['label-settings'];
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <table border='0' cellpadding='2' cellspacing='0' style='margin: -2px;'>\n";
|
||||
echo " <table border='0' cellpadding='0' cellspacing='0' style='margin: -2px;'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vtable' style='width: 108px;'>".$text['label-condition']."</td>\n";
|
||||
echo " <td class='vtable' style='width: 125px;'>".$text['label-condition_value']."</td>\n";
|
||||
@@ -846,11 +853,16 @@ function add_custom_condition($destination, $group_id, $dialplan_action = '') {
|
||||
echo " <tr>";
|
||||
echo " <td colspan='4' style='white-space: nowrap;' id='group_".$group_id."'></td>";
|
||||
echo " </tr>";
|
||||
echo " </tr>";
|
||||
echo " <td colspan='2' class='vtable' style='width: 108px;'>".$text['label-destination']."</td>\n";
|
||||
echo " <td colspan='2' class='vtable'>".$text['label-group']."</td>\n";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='4' style='padding-top: 10px;'>";
|
||||
echo " <td colspan='2' style='padding-top: 3px;'>";
|
||||
//$destination = new destinations;
|
||||
echo $destination->select('dialplan', 'dialplan_action['.$group_id.']', $dialplan_action);
|
||||
echo " </td>";
|
||||
echo " <td colspan='2' style='padding-top: 3px;'><input class='formfld' type='text' name='group_".$group_id."' id='group_".$group_id."' maxlength='255' value=\"".$group_id."\"></td>\n";
|
||||
echo " </tr>";
|
||||
echo " </table>";
|
||||
echo " <br />";
|
||||
@@ -1092,4 +1104,4 @@ echo "<br />";
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -182,7 +182,25 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
$tmp .= "\n";
|
||||
}
|
||||
|
||||
$tmp .= "--set defaults\n";
|
||||
$tmp .= " expire = {}\n";
|
||||
$tmp .= " expire[\"directory\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"dialplan\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"languages\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"sofia.conf\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"acl.conf\"] = \"3600\";\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set xml_handler\n";
|
||||
$tmp .= " xml_handler = {}\n";
|
||||
$tmp .= " xml_handler[\"fs_path\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set the debug options\n";
|
||||
$tmp .= " debug[\"params\"] = false;\n";
|
||||
$tmp .= " debug[\"sql\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_request\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_string\"] = false;\n";
|
||||
$tmp .= " debug[\"cache\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--additional info\n";
|
||||
$tmp .= " domain_count = ".count($_SESSION["domains"]).";\n";
|
||||
$tmp .= correct_path(" temp_dir = [[".$_SESSION['server']['temp']['dir']."]];\n");
|
||||
|
||||
@@ -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):
|
||||
@@ -30,12 +30,26 @@ if ($domains_processed == 1) {
|
||||
//define array of settings
|
||||
$x = 0;
|
||||
$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'] = 'security';
|
||||
$array[$x]['default_setting_subcategory'] = 'password_length';
|
||||
$array[$x]['default_setting_name'] = 'var';
|
||||
|
||||
@@ -92,6 +92,38 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
// fix null
|
||||
$default_setting_order = ($default_setting_order != '') ? $default_setting_order : 'null';
|
||||
|
||||
//update switch timezone variables
|
||||
if ($default_setting_category == "domain" && $default_setting_subcategory == "time_zone" && $default_setting_name == "name" ) {
|
||||
//get the action
|
||||
$sql = "select * from v_vars ";
|
||||
$sql .= "where var_name = 'timezone' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$var_action = "add";
|
||||
foreach ($result as $row) {
|
||||
$var_action = "update";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//update the timezone
|
||||
if ($var_action == "update") {
|
||||
$sql = "update v_vars ";
|
||||
$sql .= "set var_value = '".$default_setting_value."' ";
|
||||
$sql .= "where var_name = 'timezone' ";
|
||||
}
|
||||
else {
|
||||
$sql = "insert into v_vars ";
|
||||
$sql .= "(var_uuid, var_name, var_value, var_cat, var_enabled) ";
|
||||
$sql .= "values ('".uuid()."', 'timezone', '$default_setting_value', 'Defaults', 'true'); ";
|
||||
}
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//synchronize the configuration
|
||||
save_var_xml();
|
||||
}
|
||||
|
||||
if ($action == "add" && permission_exists('default_setting_add')) {
|
||||
$sql = "insert into v_default_settings ";
|
||||
$sql .= "(";
|
||||
@@ -566,4 +598,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
?>
|
||||
@@ -47,9 +47,10 @@ else {
|
||||
$action = "add";
|
||||
}
|
||||
|
||||
if (strlen($_GET["domain_uuid"]) > 0) {
|
||||
$domain_uuid = check_str($_GET["domain_uuid"]);
|
||||
}
|
||||
//set the domain_uuid
|
||||
if (strlen($_GET["domain_uuid"]) > 0) {
|
||||
$domain_uuid = check_str($_GET["domain_uuid"]);
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST) > 0) {
|
||||
@@ -92,7 +93,75 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
$domain_setting_order = ($domain_setting_order != '') ? $domain_setting_order : 'null';
|
||||
// fix null
|
||||
$domain_setting_order = ($domain_setting_order != '') ? $domain_setting_order : 'null';
|
||||
|
||||
//update switch timezone variables
|
||||
if ($domain_setting_category == "domain" && $domain_setting_subcategory == "time_zone" && $domain_setting_name == "name" ) {
|
||||
//get the dialplan_uuid
|
||||
$sql = "select * from v_dialplans ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and app_uuid = '9f356fe7-8cf8-4c14-8fe2-6daf89304458' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as $row) {
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//get the action
|
||||
$sql = "select * from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' ";
|
||||
$sql .= "and dialplan_detail_tag = 'action' ";
|
||||
$sql .= "and dialplan_detail_type = 'set' ";
|
||||
$sql .= "and dialplan_detail_data like 'timezone=%' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$detail_action = "add";
|
||||
foreach ($result as $row) {
|
||||
$dialplan_detail_uuid = $row["dialplan_detail_uuid"];
|
||||
$detail_action = "update";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//update the timezone
|
||||
if ($detail_action == "update") {
|
||||
$sql = "update v_dialplan_details ";
|
||||
$sql .= "set dialplan_detail_data = 'timezone=".$domain_setting_value."' ";
|
||||
$sql .= "where dialplan_detail_uuid = '".$dialplan_detail_uuid."' ";
|
||||
}
|
||||
else {
|
||||
$dialplan_detail_uuid = uuid();
|
||||
$dialplan_detail_group = 0;
|
||||
$sql = "insert into v_dialplan_details ";
|
||||
$sql .= "(";
|
||||
$sql .= "domain_uuid, ";
|
||||
$sql .= "dialplan_detail_uuid, ";
|
||||
$sql .= "dialplan_uuid, ";
|
||||
$sql .= "dialplan_detail_tag, ";
|
||||
$sql .= "dialplan_detail_type, ";
|
||||
$sql .= "dialplan_detail_data, ";
|
||||
$sql .= "dialplan_detail_inline, ";
|
||||
$sql .= "dialplan_detail_group ";
|
||||
$sql .= ") ";
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$domain_uuid."', ";
|
||||
$sql .= "'".$dialplan_detail_uuid."', ";
|
||||
$sql .= "'".$dialplan_uuid."', ";
|
||||
$sql .= "'action', ";
|
||||
$sql .= "'set', ";
|
||||
$sql .= "'timezone=".$domain_setting_value."', ";
|
||||
$sql .= "'true', ";
|
||||
$sql .= "'".$dialplan_detail_group."' ";
|
||||
$sql .= "); ";
|
||||
}
|
||||
$db->query($sql);
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
//add the domain
|
||||
if ($action == "add" && permission_exists('domain_setting_add')) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
if (!function_exists('software_version')) {
|
||||
function software_version() {
|
||||
return '4.0.0';
|
||||
return '4.0.1';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1326,4 +1326,4 @@ function number_pad($number,$n) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -112,6 +112,7 @@ This method causes the script to get its manadatory arguments directly from the
|
||||
--set the cache
|
||||
if (found_cid_num) then -- caller id exists
|
||||
if (found_enabled == "true") then
|
||||
--set the cache
|
||||
cache = "found_cid_num=" .. found_cid_num .. "&found_uuid=" .. found_uuid .. "&found_enabled=" .. found_enabled .. "&found_action=" .. found_action .. "&found_count=" .. found_count;
|
||||
result = trim(api:execute("memcache", "set app:call_block:" .. params["domain_name"] .. ":" .. params["cid_num"] .. " '"..cache.."' "..expire["call_block"]));
|
||||
|
||||
@@ -172,15 +173,16 @@ This method causes the script to get its manadatory arguments directly from the
|
||||
if (source == "database") then
|
||||
dbh:query("UPDATE v_call_block SET call_block_count = " .. found_count + 1 .. " WHERE call_block_uuid = '" .. found_uuid .. "'")
|
||||
end
|
||||
session:setVariable("call_block", "block")
|
||||
session:execute("set", "call_blocked=true");
|
||||
logger("W", "NOTICE", "number " .. params["cid_num"] .. " blocked with " .. found_count .. " previous hits, domain_name: " .. params["domain_name"])
|
||||
if (found_action == "Reject") then
|
||||
session:hangup("CALL_REJECTED")
|
||||
end
|
||||
if (found_action == "Busy") then
|
||||
elseif (found_action == "Busy") then
|
||||
session:hangup("USER_BUSY")
|
||||
end
|
||||
if (details[0] =="Voicemail") then
|
||||
elseif (found_action =="Hold") then
|
||||
session:setAutoHangup(false)
|
||||
session:execute("transfer", "*9664")
|
||||
elseif (details[0] =="Voicemail") then
|
||||
session:setAutoHangup(false)
|
||||
session:execute("transfer", "*99" .. details[2] .. " XML " .. details[1])
|
||||
end
|
||||
|
||||
@@ -13,7 +13,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,
|
||||
@@ -385,7 +385,7 @@
|
||||
end
|
||||
|
||||
--check if someone has already joined the conference
|
||||
local_hostname = trim(api:execute("hostname", ""));
|
||||
local_hostname = trim(api:execute("switchname", ""));
|
||||
freeswitch.consoleLog("notice", "[conference center] local_hostname is " .. local_hostname .. "\n");
|
||||
sql = "SELECT hostname FROM channels WHERE application = 'conference' AND dest = '" .. destination_number .. "' AND cid_num <> '".. caller_id_number .."' LIMIT 1";
|
||||
if (debug["sql"]) then
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
-- Contributor(s):
|
||||
-- Mark J. Crane
|
||||
|
||||
--set the debug options
|
||||
debug["sql"] = false;
|
||||
|
||||
--create the api object
|
||||
api = freeswitch.API();
|
||||
|
||||
|
||||
@@ -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,
|
||||
@@ -38,6 +38,7 @@ local log = require "resources.functions.log".ring_group
|
||||
require "resources.functions.explode";
|
||||
require "resources.functions.base64";
|
||||
require "resources.functions.file_exists";
|
||||
require "resources.functions.explode";
|
||||
|
||||
--get the variables
|
||||
domain_name = session:getVariable("domain_name");
|
||||
@@ -101,6 +102,7 @@ local log = require "resources.functions.log".ring_group
|
||||
status = dbh:query(sql, function(row)
|
||||
domain_uuid = row["domain_uuid"];
|
||||
ring_group_name = row["ring_group_name"];
|
||||
ring_group_extension = row["ring_group_extension"];
|
||||
ring_group_forward_enabled = row["ring_group_forward_enabled"];
|
||||
ring_group_forward_destination = row["ring_group_forward_destination"];
|
||||
ring_group_cid_name_prefix = row["ring_group_cid_name_prefix"];
|
||||
@@ -152,6 +154,9 @@ local log = require "resources.functions.log".ring_group
|
||||
subject = subject:gsub("${caller_id_name}", caller_id_name);
|
||||
subject = subject:gsub("${caller_id_number}", caller_id_number);
|
||||
subject = subject:gsub("${ring_group_name}", ring_group_name);
|
||||
subject = subject:gsub("${ring_group_extension}", ring_group_extension);
|
||||
subject = subject:gsub("${sip_to_user}", ring_group_name);
|
||||
subject = subject:gsub("${dialed_user}", ring_group_extension);
|
||||
subject = trim(subject);
|
||||
subject = '=?utf-8?B?'..base64.encode(subject)..'?=';
|
||||
|
||||
@@ -162,6 +167,9 @@ local log = require "resources.functions.log".ring_group
|
||||
body = body:gsub("${caller_id_name}", caller_id_name);
|
||||
body = body:gsub("${caller_id_number}", caller_id_number);
|
||||
body = body:gsub("${ring_group_name}", ring_group_name);
|
||||
body = body:gsub("${ring_group_extension}", ring_group_extension);
|
||||
body = body:gsub("${sip_to_user}", ring_group_name);
|
||||
body = body:gsub("${dialed_user}", ring_group_extension);
|
||||
body = body:gsub(" ", " ");
|
||||
body = body:gsub("%s+", "");
|
||||
body = body:gsub(" ", " ");
|
||||
@@ -436,12 +444,23 @@ local log = require "resources.functions.log".ring_group
|
||||
cmd = "show channels like "..destination_number;
|
||||
reply = trim(api:executeString(cmd));
|
||||
--freeswitch.consoleLog("notice", "[ring group] reply "..cmd.." " .. reply .. "\n");
|
||||
exploded_reply = {};
|
||||
exploded_reply = explode(",",reply);
|
||||
|
||||
if (reply == "0 total.") then
|
||||
dial_string = dial_string_to_user
|
||||
else
|
||||
if (string.find(reply, domain_name)) then
|
||||
--active call
|
||||
else
|
||||
idle_extension=true;
|
||||
|
||||
if (exploded_reply ~= nil) then
|
||||
for i,v in ipairs(exploded_reply) do
|
||||
if(v==destination_number.."@"..domain_name) then
|
||||
idle_extension=false;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if(idle_extension) then
|
||||
dial_string = dial_string_to_user;
|
||||
end
|
||||
end
|
||||
@@ -619,36 +638,27 @@ local log = require "resources.functions.log".ring_group
|
||||
app_data = app_data:gsub("%]", "}");
|
||||
end
|
||||
freeswitch.consoleLog("NOTICE", "[ring group] app_data: "..app_data.."\n");
|
||||
-- log.noticef("bridge begin: originate_disposition:%s answered:%s ready:%s bridged:%s", session:getVariable("originate_disposition"), session:answered() and "true" or "false", session:ready() and "true" or "false", session:bridged() and "true" or "false")
|
||||
session:execute("bridge", app_data);
|
||||
-- log.noticef("bridge done: originate_disposition:%s answered:%s ready:%s bridged:%s", session:getVariable("originate_disposition"), session:answered() and "true" or "false", session:ready() and "true" or "false", session:bridged() and "true" or "false")
|
||||
end
|
||||
|
||||
--timeout destination
|
||||
if (app_data ~= nil) then
|
||||
if ring_group_strategy == "enterprise"
|
||||
and ( true
|
||||
--- I see 2 errors here `failure` and `PICKED_OFF`
|
||||
--- but they be more. I think check `answered` is enough.
|
||||
-- or session:getVariable("originate_disposition") == "failure"
|
||||
-- or session:getVariable("originate_disposition") == "PICKED_OFF"
|
||||
)
|
||||
and session:answered() then
|
||||
-- for enterprise calls when intercept we get "failure" but session answered
|
||||
return
|
||||
end
|
||||
|
||||
if (session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
|
||||
if session:ready() and (
|
||||
session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
|
||||
or session:getVariable("originate_disposition") == "NO_ANSWER"
|
||||
or session:getVariable("originate_disposition") == "NO_USER_RESPONSE"
|
||||
or session:getVariable("originate_disposition") == "USER_NOT_REGISTERED"
|
||||
or session:getVariable("originate_disposition") == "NORMAL_TEMPORARY_FAILURE"
|
||||
or session:getVariable("originate_disposition") == "NO_ROUTE_DESTINATION"
|
||||
or session:getVariable("originate_disposition") == "USER_BUSY"
|
||||
or session:getVariable("originate_disposition") == "failure") then
|
||||
--send missed call notification
|
||||
missed();
|
||||
--execute the time out action
|
||||
session:execute(ring_group_timeout_app, ring_group_timeout_data);
|
||||
or session:getVariable("originate_disposition") == "failure"
|
||||
) then
|
||||
--send missed call notification
|
||||
missed();
|
||||
--execute the time out action
|
||||
session:execute(ring_group_timeout_app, ring_group_timeout_data);
|
||||
end
|
||||
else
|
||||
if (ring_group_timeout_app ~= nil) then
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
skip_instructions = session:getVariable("skip_instructions");
|
||||
skip_greeting = session:getVariable("skip_greeting");
|
||||
vm_message_ext = session:getVariable("vm_message_ext");
|
||||
vm_say_caller_id_number = session:getVariable("vm_say_caller_id_number");
|
||||
vm_disk_quota = session:getVariable("vm-disk-quota");
|
||||
if (not vm_disk_quota) then
|
||||
vm_disk_quota = session:getVariable("vm_disk_quota");
|
||||
|
||||
@@ -31,20 +31,34 @@
|
||||
max_digits = 1;
|
||||
--flush dtmf digits from the input buffer
|
||||
session:flushDigits();
|
||||
--set the callback function
|
||||
if (session:ready()) then
|
||||
session:setVariable("playback_terminators", "#");
|
||||
session:setInputCallback("on_dtmf", "");
|
||||
end
|
||||
--set the display
|
||||
if (session:ready()) then
|
||||
reply = api:executeString("uuid_display "..session:get_uuid().." "..caller_id_number);
|
||||
end
|
||||
--say the message number
|
||||
if (session:ready()) then
|
||||
if (string.len(dtmf_digits) == 0) then
|
||||
if (string.len(dtmf_digits) == 0) then
|
||||
dtmf_digits = macro(session, "message_number", 1, 100, '');
|
||||
end
|
||||
end
|
||||
--say the number
|
||||
if (session:ready()) then
|
||||
if (string.len(dtmf_digits) == 0) then
|
||||
session:say(message_number, default_language, "NUMBER", "pronounced");
|
||||
session:say(message_number, default_language, "number", "pronounced");
|
||||
end
|
||||
end
|
||||
--say the caller id number
|
||||
if (session:ready() and caller_id_number ~= nil) then
|
||||
if (vm_say_caller_id_number ~= nil) then
|
||||
if (vm_say_caller_id_number == "true") then
|
||||
session:streamFile(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-message_from.wav");
|
||||
session:say(caller_id_number, default_language, "name_spelled", "iterated");
|
||||
end
|
||||
end
|
||||
end
|
||||
--say the message date
|
||||
@@ -53,10 +67,9 @@
|
||||
if (current_time_zone ~= nil) then
|
||||
session:execute("set", "timezone="..current_time_zone.."");
|
||||
end
|
||||
session:say(created_epoch, default_language, "CURRENT_DATE_TIME", "pronounced");
|
||||
session:say(created_epoch, default_language, "current_date_time", "pronounced");
|
||||
end
|
||||
end
|
||||
|
||||
--get the recordings from the database
|
||||
if (storage_type == "base64") then
|
||||
sql = [[SELECT * FROM v_voicemail_messages
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
body = body:gsub("${message_duration}", message_length_formatted);
|
||||
body = body:gsub("${account}", id);
|
||||
body = body:gsub("${domain_name}", domain_name);
|
||||
body = body:gsub("${sip_to_user}", id);
|
||||
body = body:gsub("${dialed_user}", id);
|
||||
if (voicemail_file == "attach") then
|
||||
body = body:gsub("${message}", text['label-attached'][default_language.."-"..default_dialect]);
|
||||
elseif (voicemail_file == "link") then
|
||||
|
||||
@@ -23,22 +23,6 @@
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--set defaults
|
||||
expire = {}
|
||||
expire["directory"] = "3600";
|
||||
expire["dialplan"] = "3600";
|
||||
expire["languages"] = "3600";
|
||||
expire["sofia.conf"] = "3600";
|
||||
expire["acl.conf"] = "3600";
|
||||
load_balancing = false;
|
||||
|
||||
--set the debug options
|
||||
debug["params"] = false;
|
||||
debug["sql"] = false;
|
||||
debug["xml_request"] = false;
|
||||
debug["xml_string"] = false;
|
||||
debug["cache"] = false;
|
||||
|
||||
--general functions
|
||||
require "resources.functions.trim";
|
||||
require "resources.functions.file_exists";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- xml_handler.lua
|
||||
-- Part of FusionPBX
|
||||
-- Copyright (C) 2013 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- Copyright (C) 2013 - 2015 Mark J Crane <markjcrane@fusionpbx.com>
|
||||
-- All rights reserved.
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
@@ -116,9 +116,10 @@
|
||||
sql = sql .. "and g.enabled = 'true' ";
|
||||
sql = sql .. "and (g.domain_uuid = d.domain_uuid or g.domain_uuid is null) ";
|
||||
else
|
||||
sql = "select * from v_gateways ";
|
||||
sql = sql .. "where enabled = 'true' and profile = '"..sip_profile_name.."' ";
|
||||
sql = "select * from v_gateways as g ";
|
||||
sql = sql .. "where g.enabled = 'true' and g.profile = '"..sip_profile_name.."' ";
|
||||
end
|
||||
sql = sql .. "and (g.hostname = '" .. hostname.. "' or g.hostname is null or g.hostname = '') ";
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");
|
||||
end
|
||||
|
||||
@@ -99,13 +99,13 @@
|
||||
dialed_extension = params:getHeader("dialed_extension");
|
||||
if (dialed_extension == nil) then
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is null\n");
|
||||
load_balancing = false;
|
||||
xml_handler["fs_path"] = false;
|
||||
else
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is " .. dialed_extension .. "\n");
|
||||
end
|
||||
|
||||
--build the XML string from the database
|
||||
if (source == "database") or (load_balancing) then
|
||||
if (source == "database") or (xml_handler["fs_path"]) then
|
||||
--database connection
|
||||
if (continue) then
|
||||
--connect to the database
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
--if load balancing is set to true then get the hostname
|
||||
if (continue) then
|
||||
if (load_balancing) then
|
||||
if (xml_handler["fs_path"]) then
|
||||
|
||||
--get the domain_name from domains
|
||||
if (domain_name == nil) then
|
||||
@@ -181,9 +181,9 @@
|
||||
--freeswitch.consoleLog("notice", "[xml_handler] sql: " .. sql .. "\n");
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] database_hostname is " .. database_hostname .. "\n");
|
||||
|
||||
--hostname was not found set load_balancing to false to prevent a database_hostname concatenation error
|
||||
--hostname was not found set xml_handler["fs_path"] to false to prevent a database_hostname concatenation error
|
||||
if (database_hostname == nil) then
|
||||
load_balancing = false;
|
||||
xml_handler["fs_path"] = false;
|
||||
end
|
||||
|
||||
--close the database connection
|
||||
@@ -261,7 +261,7 @@
|
||||
dial_string = "{sip_invite_domain=" .. domain_name .. ",presence_id=" .. user .. "@" .. domain_name .. "}${sofia_contact(" .. extension .. "@" .. domain_name .. ")}";
|
||||
end
|
||||
--set the an alternative dial string if the hostnames don't match
|
||||
if (load_balancing) then
|
||||
if (xml_handler["fs_path"]) then
|
||||
if (local_hostname == database_hostname) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler-directory.lua] local_host and database_host are the same\n");
|
||||
else
|
||||
@@ -271,13 +271,13 @@
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dial_string " .. dial_string .. "\n");
|
||||
end
|
||||
else
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] seems balancing is false??" .. tostring(load_balancing) .. "\n");
|
||||
--freeswitch.consoleLog("notice", "[xml_handler-directory.lua] seems balancing is false??" .. tostring(xml_handler["fs_path"]) .. "\n");
|
||||
end
|
||||
|
||||
--show debug informationa
|
||||
--if (load_balancing) then
|
||||
-- freeswitch.consoleLog("notice", "[xml_handler] local_hostname: " .. local_hostname.. " database_hostname: " .. database_hostname .. " dial_string: " .. dial_string .. "\n");
|
||||
--end
|
||||
if (xml_handler["fs_path"]) then
|
||||
freeswitch.consoleLog("notice", "[xml_handler] local_hostname: " .. local_hostname.. " database_hostname: " .. database_hostname .. " dial_string: " .. dial_string .. "\n");
|
||||
end
|
||||
end
|
||||
end);
|
||||
end
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--set the time between loops in seconds
|
||||
sleep = 300;
|
||||
sleep = 60;
|
||||
|
||||
--set the debug level
|
||||
debug["log"] = false;
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
--email_cmd = "/bin/echo '"..email_message_fail.."' | /usr/bin/mail -s 'Fax to: "..number_dialed.." FAILED' -r "..from_address.." -a '"..fax_file.."' "..email_address;
|
||||
|
||||
--to keep the originate command shorter these are things we always send. One place to adjust for all.
|
||||
originate_same = "for_fax=1,absolute_codec_string='PCMU,PCMA',accountcode='"..accountcode.."',domain_uuid="..domain_uuid..",domain_name="..domain_name..",mailto_address='"..email_address.."',mailfrom_address='"..from_address.."',origination_caller_id_name='"..origination_caller_id_name.. "',origination_caller_id_number="..origination_caller_id_number..",fax_uri="..fax_uri..",fax_retry_limit="..fax_retry_limit..",fax_retry_sleep="..fax_retry_sleep..",fax_verbose=true,fax_file='"..fax_file.."'";
|
||||
originate_same = "for_fax=1,accountcode='"..accountcode.."',domain_uuid="..domain_uuid..",domain_name="..domain_name..",mailto_address='"..email_address.."',mailfrom_address='"..from_address.."',origination_caller_id_name='"..origination_caller_id_name.. "',origination_caller_id_number="..origination_caller_id_number..",fax_uri="..fax_uri..",fax_retry_limit="..fax_retry_limit..",fax_retry_sleep="..fax_retry_sleep..",fax_verbose=true,fax_file='"..fax_file.."'";
|
||||
|
||||
if (fax_retry_attempts < fax_retry_limit) then
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<!-- extended info parsing -->
|
||||
<param name="extended-info-parsing" value="true" enabled="false"/>
|
||||
|
||||
<param name="aggressive-nat-detection" value="true" enabled="false"/>
|
||||
<param name="aggressive-nat-detection" value="true" enabled="true"/>
|
||||
<!--
|
||||
There are known issues (asserts and segfaults) when 100rel is enabled.
|
||||
It is not recommended to enable 100rel at this time.
|
||||
@@ -150,7 +150,7 @@
|
||||
<!-- used to share presence info across sofia profiles -->
|
||||
<!-- Name of the db to use for this profile -->
|
||||
<param name="dbname" value="share_presence" enabled="false"/>
|
||||
<param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
|
||||
<param name="presence-hosts" value="$${domain},$${local_ip_v4}" enabled="false"/>
|
||||
<param name="presence-privacy" value="$${presence_privacy}"/>
|
||||
<!-- ************************************************* -->
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<param name="enable-3pcc" value="true" enabled="false"/>
|
||||
|
||||
<!-- use at your own risk or if you know what this does.-->
|
||||
<param name="NDLB-force-rport" value="true" enabled="false"/>
|
||||
<param name="NDLB-force-rport" value="safe" enabled="true"/>
|
||||
<!--
|
||||
Choose the realm challenge key. Default is auto_to if not set.
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<tones>
|
||||
<tone c1="31164" i1="-1772" c2="30743" i2="-1985" c3="31164" i3="-1772" c4="30743" i4="-1985" d="34" t="ringing">
|
||||
<part m="on" t="400"/>
|
||||
<part m="off" t="200"/>
|
||||
<part m="on" t="400"/>
|
||||
<part m="off" t="2000"/>
|
||||
<repeat c="65535"/>
|
||||
</tone>
|
||||
<tone c1="31164" i1="-1772" c2="31164" i2="-1772" d="17" t="reorder">
|
||||
<part m="on" t="400"/>
|
||||
<part m="off" t="350"/>
|
||||
<part m="on" t="225"/>
|
||||
<part m="off" t="525"/>
|
||||
<repeat c="65535"/>
|
||||
</tone>
|
||||
<tone c1="31164" i1="-1772" d="1" t="busy">
|
||||
<part m="on" t="375"/>
|
||||
<part m="off" t="375"/>
|
||||
<repeat c="65535"/>
|
||||
</tone>
|
||||
<tone c1="31538" i1="-1556" c2="30831" i2="-1942" d="2" t="odial">
|
||||
<part m="on" t="65535"/>
|
||||
<repeat c="65535"/>
|
||||
</tone>
|
||||
<tone c1="31538" i1="-1556" c2="30831" i2="-1942" d="2" t="idial">
|
||||
<part m="on" t="65535"/>
|
||||
<repeat c="65535"/>
|
||||
</tone>
|
||||
</tones>
|
||||
|
||||
30
resources/templates/provision/cisco/7940/RINGLIST.XML
Normal file
30
resources/templates/provision/cisco/7940/RINGLIST.XML
Normal file
@@ -0,0 +1,30 @@
|
||||
<CiscoIPPhoneRingList>
|
||||
<Ring>
|
||||
<DisplayName>Chirp 3</DisplayName>
|
||||
<FileName>ringer3.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Old Style</DisplayName>
|
||||
<FileName>ringer1.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Door Chime</DisplayName>
|
||||
<FileName>doorchime.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Red Alert</DisplayName>
|
||||
<FileName>redalert.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Terri</DisplayName>
|
||||
<FileName>terri.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Door Chime 2</DisplayName>
|
||||
<FileName>chime2.pcm</FileName>
|
||||
</Ring>
|
||||
<Ring>
|
||||
<DisplayName>Silence</DisplayName>
|
||||
<FileName>silence.pcm</FileName>
|
||||
</Ring>
|
||||
</CiscoIPPhoneRingList>
|
||||
@@ -31,7 +31,7 @@ nat_received_processing: "0"
|
||||
proxy_register: "1"
|
||||
|
||||
# Phone Registration Expiration [1-3932100 sec] (Default - 3600)
|
||||
timer_register_expires: "3600"
|
||||
timer_register_expires: "80"
|
||||
|
||||
# Codec for media stream (g711ulaw (default), g711alaw, g729)
|
||||
preferred_codec: "none"
|
||||
@@ -68,7 +68,7 @@ sip_invite_retx: "6" ; Default 7
|
||||
timer_invite_expires: "180" ; Default 180 sec
|
||||
|
||||
# Setting for Message speeddial to UOne box
|
||||
messages_uri: "*98"
|
||||
messages_uri: "*97"
|
||||
|
||||
# TFTP Phone Specific Configuration File Directory
|
||||
tftp_cfg_dir: ""
|
||||
@@ -91,7 +91,7 @@ dst_stop_time: "2"
|
||||
dst_auto_adjust: "1"
|
||||
|
||||
# Do Not Disturb Control (0-off, 1-on, 2-off with no user control, 3-on with no user control)
|
||||
dnd_control: "0" ; Default 0 (Do Not Disturb feature is off)
|
||||
dnd_control: "2" ; Default 0 (Do Not Disturb feature is off)
|
||||
|
||||
# Caller ID Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
|
||||
callerid_blocking: "0" ; Default 0 (Disable sending all calls as anonymous)
|
||||
@@ -118,13 +118,13 @@ autocomplete: "1"
|
||||
time_format_24hr: "0"
|
||||
|
||||
# URL for external Phone Services
|
||||
#services_url: "http://192.168.1.1/xmlservices/index.php"
|
||||
#services_url: "http://{$domain_name}/app/provision/?file=services.php"
|
||||
|
||||
# URL for external Directory location
|
||||
#directory_url: "http://192.168.1.1/xmlservices/PhoneDirectory.php"
|
||||
#directory_url: "http://{$domain_name}/app/provision/?file=directory.php"
|
||||
|
||||
# URL for branding logo
|
||||
#logo_url: "http://192.168.1.1/cisco/bmp/trixbox.bmp"
|
||||
#logo_url: "http://{$domain_name}/app/provision/logo.bmp"
|
||||
|
||||
# Remote Party ID
|
||||
remote_party_id: 1 ; 0-Disabled (default), 1-Enabled
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<CiscoIPPhoneMenu>
|
||||
<Title>Speed Dials</Title>
|
||||
<Prompt>Please choose...</Prompt>
|
||||
<SoftKeyItem>
|
||||
<Name>Dial</Name>
|
||||
<URL>SoftKey:Select</URL>
|
||||
<Position>1</Position>
|
||||
</SoftKeyItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<SoftKeyItem>
|
||||
<Name>Exit</Name>
|
||||
<URL>SoftKey:Exit</URL>
|
||||
<Position>4</Position>
|
||||
</SoftKeyItem>
|
||||
</CiscoIPPhoneMenu>
|
||||
@@ -0,0 +1,22 @@
|
||||
<CiscoIPPhoneMenu>
|
||||
<Title>Speed Dials</Title>
|
||||
<Prompt>Please choose...</Prompt>
|
||||
<SoftKeyItem>
|
||||
<Name>Dial</Name>
|
||||
<URL>SoftKey:Select</URL>
|
||||
<Position>1</Position>
|
||||
</SoftKeyItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<SoftKeyItem>
|
||||
<Name>Exit</Name>
|
||||
<URL>SoftKey:Exit</URL>
|
||||
<Position>4</Position>
|
||||
</SoftKeyItem>
|
||||
</CiscoIPPhoneMenu>
|
||||
@@ -0,0 +1,22 @@
|
||||
<CiscoIPPhoneMenu>
|
||||
<Title>Speed Dials</Title>
|
||||
<Prompt>Please choose...</Prompt>
|
||||
<SoftKeyItem>
|
||||
<Name>Dial</Name>
|
||||
<URL>SoftKey:Select</URL>
|
||||
<Position>1</Position>
|
||||
</SoftKeyItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<Name>First Last Name (Ext) Type</Name>
|
||||
<URL>Dial:5551231234#</URL>
|
||||
</MenuItem>
|
||||
<SoftKeyItem>
|
||||
<Name>Exit</Name>
|
||||
<URL>SoftKey:Exit</URL>
|
||||
<Position>4</Position>
|
||||
</SoftKeyItem>
|
||||
</CiscoIPPhoneMenu>
|
||||
26
resources/templates/provision/cisco/7940/directory.xml
Normal file
26
resources/templates/provision/cisco/7940/directory.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<CiscoIPPhoneMenu>
|
||||
<Title>Contacts</Title>
|
||||
<Prompt>Please choose...</Prompt>
|
||||
<MenuItem>
|
||||
<Name>Personal</Name>
|
||||
<URL>http://{$domain_name}/app/provision?file=directory-personal.xml&mac={$mac}</URL>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<Name>Enterprise</Name>
|
||||
<URL>http://{$domain_name}/app/provision?file=directory-enterprise&mac={$mac}</URL>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<Name>Speed Dials</Name>
|
||||
<URL>http://{$domain_name}/app/provision/?file=directory-speed_dial&mac={$mac}</URL>
|
||||
</MenuItem>
|
||||
<SoftKeyItem>
|
||||
<Name>Select</Name>
|
||||
<URL>SoftKey:Select</URL>
|
||||
<Position>1</Position>
|
||||
</SoftKeyItem>
|
||||
<SoftKeyItem>
|
||||
<Name>Exit</Name>
|
||||
<URL>SoftKey:Exit</URL>
|
||||
<Position>4</Position>
|
||||
</SoftKeyItem>
|
||||
</CiscoIPPhoneMenu>
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -122,7 +126,7 @@ account.1.nat.stun_server =
|
||||
account.1.nat.stun_port = 3478
|
||||
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default), 2-Option, 3-Notify;
|
||||
account.1.nat.udp_update_enable = 1
|
||||
account.1.nat.udp_update_enable = 3
|
||||
|
||||
#Specify the keep-alive interval (in seconds), the default value is 30.
|
||||
account.1.nat.udp_update_time = 30
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -223,8 +223,8 @@ account.1.nat.stun_server =
|
||||
#Configure the STUN server port, the default value is 3478.
|
||||
account.1.nat.stun_port =
|
||||
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Enabled (default);
|
||||
account.1.nat.udp_update_enable =
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default), 2-Option, 3-Notify;
|
||||
account.1.nat.udp_update_enable = 3
|
||||
|
||||
#Specify the keep-alive interval (in seconds), the default value is 30.
|
||||
account.1.nat.udp_update_time =
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -122,7 +126,7 @@ account.1.nat.stun_server =
|
||||
account.1.nat.stun_port = 3478
|
||||
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default), 2-Option, 3-Notify;
|
||||
account.1.nat.udp_update_enable = 1
|
||||
account.1.nat.udp_update_enable = 3
|
||||
|
||||
#Specify the keep-alive interval (in seconds), the default value is 30.
|
||||
account.1.nat.udp_update_time = 30
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -1033,7 +1033,7 @@ features.relog_offtime =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset =
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -122,7 +126,7 @@ account.1.nat.stun_server =
|
||||
account.1.nat.stun_port = 3478
|
||||
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default), 2-Option, 3-Notify;
|
||||
account.1.nat.udp_update_enable = 1
|
||||
account.1.nat.udp_update_enable = 3
|
||||
|
||||
#Specify the keep-alive interval (in seconds), the default value is 30.
|
||||
account.1.nat.udp_update_time = 30
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
@@ -2395,8 +2399,8 @@ account.5.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
@@ -3013,16 +3017,26 @@ programablekey.1.label =
|
||||
#expansion_module.x.key.y.label =
|
||||
#expansion_module.X.key.Y.xml_phonebook =
|
||||
|
||||
{$rownum = 1}
|
||||
|
||||
{foreach $keys as $row}
|
||||
{if $row.device_key_category == "expansion"}
|
||||
#Expansion module 1 key {$row.device_key_id}
|
||||
{if $rownum <= 40}
|
||||
expansion_module.1.key.{$row.device_key_id}.type = {$row.device_key_type}
|
||||
expansion_module.1.key.{$row.device_key_id}.line = {$row.device_key_line}
|
||||
expansion_module.1.key.{$row.device_key_id}.value = {$row.device_key_value}
|
||||
expansion_module.1.key.{$row.device_key_id}.extension = {$row.device_key_extension}
|
||||
expansion_module.1.key.{$row.device_key_id}.label = {$row.device_key_label}
|
||||
expansion_module.1.key.{$row.device_key_id}.xml_phonebook =
|
||||
|
||||
expansion_module.1.key.{$row.device_key_id}.xml_phonebook =
|
||||
{else}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.type = {$row.device_key_type}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.line = {$row.device_key_line}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.value = {$row.device_key_value}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.extension = {$row.device_key_extension}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.label = {$row.device_key_label}
|
||||
expansion_module.2.key.{$row.device_key_id - 40}.xml_phonebook =
|
||||
{/if}
|
||||
{$rownum = $rownum + 1}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -3038,4 +3052,4 @@ expansion_module.1.key.{$row.device_key_id}.xml_phonebook =
|
||||
#expansion_module.2.key.1.label =
|
||||
#expansion_module.2.key.1.xml_phonebook =
|
||||
#expansion_module.2.key.1.type =
|
||||
#expansion_module.2.key.1.label =
|
||||
#expansion_module.2.key.1.label =
|
||||
|
||||
@@ -571,7 +571,7 @@ features.group_listen_in_talking_enable =
|
||||
features.call_completion_enable =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable =
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Configure the power Indicator LED to turn on or turn off; 0-On (default), 1-Off;
|
||||
features.power_led_on = 1
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#######################################################################################
|
||||
## Account 1 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_1) }
|
||||
account.1.enable = 1
|
||||
@@ -33,7 +33,7 @@ account.1.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.1.reregister_enable = 0
|
||||
@@ -44,7 +44,11 @@ account.1.naptr_build = 0
|
||||
account.1.fallback.redundancy_type = 0
|
||||
account.1.fallback.timeout = 120
|
||||
account.1.sip_server.1.address =
|
||||
account.1.sip_server.1.port = 5060
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server.1.port = 0
|
||||
{else}
|
||||
account.1.sip_server.1.port = {$sip_port_1}
|
||||
{/if}
|
||||
#Configure the register expiry time (in seconds), the default value is 3600.
|
||||
account.1.sip_server.1.expires = {$register_expires_1}
|
||||
account.1.sip_server.1.retry_counts = 3
|
||||
@@ -83,7 +87,7 @@ account.1.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -112,7 +116,7 @@ account.1.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -121,8 +125,8 @@ account.1.nat.nat_traversal = 0
|
||||
account.1.nat.stun_server =
|
||||
account.1.nat.stun_port = 3478
|
||||
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default),2-Option,3-Notify;
|
||||
account.1.nat.udp_update_enable = 1
|
||||
#Enable or disable the NAT keep-alive; 0-Disabled, 1-Default (default), 2-Option, 3-Notify;
|
||||
account.1.nat.udp_update_enable = 3
|
||||
|
||||
#Specify the keep-alive interval (in seconds), the default value is 30.
|
||||
account.1.nat.udp_update_time = 30
|
||||
@@ -134,7 +138,7 @@ account.1.nat.rport = {$yealink_rport_1}
|
||||
#######################################################################################
|
||||
## AccountX Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -149,7 +153,7 @@ voice_mail.number.1 = {$voicemail_number}
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.1.subscribe_mwi = 1
|
||||
@@ -164,7 +168,7 @@ account.1.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -181,7 +185,7 @@ account.1.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
@@ -461,7 +465,7 @@ account.1.xsi.port =
|
||||
#######################################################################################
|
||||
## Account 2 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_2) }
|
||||
account.2.enable = 1
|
||||
@@ -489,7 +493,7 @@ account.2.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.2.reregister_enable = 0
|
||||
@@ -539,7 +543,7 @@ account.2.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -568,7 +572,7 @@ account.2.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -590,7 +594,7 @@ account.2.nat.rport = {$yealink_rport_2}
|
||||
#######################################################################################
|
||||
## Account2 Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -605,7 +609,7 @@ voice_mail.number.2 = *97
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.2.subscribe_mwi = 1
|
||||
@@ -620,7 +624,7 @@ account.2.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -637,7 +641,7 @@ account.2.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
@@ -920,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone =
|
||||
local_time.time_zone_name =
|
||||
local_time.time_zone = ${time_zone}
|
||||
local_time.time_zone_name = ${time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
@@ -954,7 +958,7 @@ network.static_dns_enable = 0
|
||||
#######################################################################################
|
||||
## Account 3 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_3) }
|
||||
account.3.enable = 1
|
||||
@@ -981,7 +985,7 @@ account.3.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.3.reregister_enable = 0
|
||||
@@ -1031,7 +1035,7 @@ account.3.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -1060,7 +1064,7 @@ account.3.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -1082,7 +1086,7 @@ account.3.nat.rport = {$yealink_rport_3}
|
||||
#######################################################################################
|
||||
## Account3 Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -1097,7 +1101,7 @@ voice_mail.number.3 = *97
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.3.subscribe_mwi = 1
|
||||
@@ -1112,7 +1116,7 @@ account.3.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -1129,7 +1133,7 @@ account.3.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
@@ -1446,7 +1450,7 @@ network.secondary_dns =
|
||||
#######################################################################################
|
||||
## Account 4 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_4) }
|
||||
account.4.enable = 1
|
||||
@@ -1473,7 +1477,7 @@ account.4.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.4.reregister_enable = 0
|
||||
@@ -1523,7 +1527,7 @@ account.4.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -1552,7 +1556,7 @@ account.4.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -1574,7 +1578,7 @@ account.4.nat.rport = {$yealink_rport_4}
|
||||
#######################################################################################
|
||||
## Account4 Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -1589,7 +1593,7 @@ voice_mail.number.4 = *97
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.4.subscribe_mwi = 1
|
||||
@@ -1604,7 +1608,7 @@ account.4.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -1621,7 +1625,7 @@ account.4.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
@@ -1937,7 +1941,7 @@ network.secondary_dns =
|
||||
#######################################################################################
|
||||
## Account 5 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_5) }
|
||||
account.5.enable = 1
|
||||
@@ -1964,7 +1968,7 @@ account.5.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.5.reregister_enable = 0
|
||||
@@ -2014,7 +2018,7 @@ account.5.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -2043,7 +2047,7 @@ account.5.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -2065,7 +2069,7 @@ account.5.nat.rport = {$yealink_rport_5}
|
||||
#######################################################################################
|
||||
## Account5 Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -2080,7 +2084,7 @@ voice_mail.number.5 = *97
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.5.subscribe_mwi = 1
|
||||
@@ -2095,7 +2099,7 @@ account.5.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -2112,7 +2116,7 @@ account.5.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
@@ -2428,7 +2432,7 @@ network.secondary_dns =
|
||||
#######################################################################################
|
||||
## Account 6 Basic Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.enable =
|
||||
{if isset($user_password_6) }
|
||||
account.6.enable = 1
|
||||
@@ -2455,7 +2459,7 @@ account.6.sip_listen_port = 5060
|
||||
#######################################################################################
|
||||
## Failback ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.reregister_enable = 0
|
||||
|
||||
account.6.reregister_enable = 0
|
||||
@@ -2505,7 +2509,7 @@ account.6.static_cache_pri = 0
|
||||
#######################################################################################
|
||||
## Register Advanced ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.sip_server_type =
|
||||
|
||||
#Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom;
|
||||
@@ -2534,7 +2538,7 @@ account.6.reg_fail_retry_interval =
|
||||
#########################################################################
|
||||
## NAT Settings ##
|
||||
#########################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.nat.nat_traversal = 0
|
||||
|
||||
#Enable or disable the NAT traversal; 0-Disabled (default), 1-STUN;
|
||||
@@ -2556,7 +2560,7 @@ account.6.nat.rport = {$yealink_rport_6}
|
||||
#######################################################################################
|
||||
## Account6 Advance Settings ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.advanced.timer_t1 = 0.5
|
||||
##voice_mail.number.X =
|
||||
|
||||
@@ -2571,7 +2575,7 @@ voice_mail.number.6 = *97
|
||||
#######################################################################################
|
||||
## Subscribe ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.subscribe_mwi =
|
||||
|
||||
account.6.subscribe_mwi = 0
|
||||
@@ -2586,7 +2590,7 @@ account.6.subscribe_acd_expires= 3600
|
||||
#######################################################################################
|
||||
## BLF List ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.blf.blf_list_uri =
|
||||
|
||||
#Configure the BLF list URI (a SIP URI, or use part of the SIP URI). For example, "2300_blflist@domain.com" or "2300_blflist".
|
||||
@@ -2603,7 +2607,7 @@ account.6.out_dialog_blf_enable = 0
|
||||
#######################################################################################
|
||||
## BLA/SCA ##
|
||||
#######################################################################################
|
||||
## “X” ranges from 1 to 6;
|
||||
## ranges from 1 to 6;
|
||||
##account.X.shared_line =
|
||||
|
||||
#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA;
|
||||
|
||||
@@ -911,7 +911,7 @@ features.relog_offtime = 5
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
#Require reboot;
|
||||
features.direct_ip_call_enable = 1
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Specify the ring device when the phone is in the Headset mode; 0-use Speaker (default), 1-use Headset;
|
||||
features.ringer_device.is_use_headset = 0
|
||||
|
||||
@@ -29,7 +29,11 @@ account.1.sip_trust_ctrl = 1
|
||||
account.1.sip_server_host = {$server_address_1}
|
||||
|
||||
#Specify the port for the SIP server. The default value is 5060.
|
||||
{if $sip_transport_1 == 'dns srv'}
|
||||
account.1.sip_server_port = 0
|
||||
{else}
|
||||
account.1.sip_server_port = {$sip_port_1}
|
||||
{/if}
|
||||
|
||||
#Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled;
|
||||
account.1.outbound_proxy_enable =
|
||||
|
||||
@@ -299,6 +299,9 @@ call_waiting.enable = 1
|
||||
#Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default);
|
||||
call_waiting.tone =
|
||||
|
||||
#Enable or disable the phone to dial the IP address directly; 0-Disabled, 1-Enabled (default);
|
||||
features.direct_ip_call_enable = 0
|
||||
|
||||
#Enable or disable the phone to save the call history; 0-Disabled, 1-Enabled (default);
|
||||
features.save_call_history =
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ if (defined('STDIN')) {
|
||||
//includes
|
||||
if (!defined('STDIN')) { include "root.php"; }
|
||||
require_once "resources/require.php";
|
||||
include "resources/classes/EventSocket.php";
|
||||
include "resources/phpmailer/class.phpmailer.php";
|
||||
include "resources/phpmailer/class.smtp.php"; // optional, gets called from within class.phpmailer.php if not already loaded
|
||||
|
||||
@@ -131,7 +132,14 @@ if (defined('STDIN')) {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
foreach ($result as &$row) {
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
//set the domain variables
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$_SESSION["domain_uuid"] = $row["domain_uuid"];
|
||||
$_SESSION["domain_name"] = $domain_name;
|
||||
//set the setting arrays
|
||||
$domain = new domains();
|
||||
$domain->db = $db;
|
||||
$domain->set();
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user