diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php
index d6051689c1..3d48fb6059 100644
--- a/app/destinations/destination_edit.php
+++ b/app/destinations/destination_edit.php
@@ -679,7 +679,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if ($row["dialplan_detail_tag"] != "condition") {
if ($row["dialplan_detail_tag"] == "action" && $row["dialplan_detail_type"] == "set" && strpos($row["dialplan_detail_data"], "accountcode") == 0) { continue; } //exclude set:accountcode actions
echo "
\n";
- echo " | \n";
+ echo " | \n";
if (strlen($row['dialplan_detail_uuid']) > 0) {
echo " \n";
}
diff --git a/app/provision/app_defaults.php b/app/provision/app_defaults.php
index 7e80fd2e59..da82965d6e 100644
--- a/app/provision/app_defaults.php
+++ b/app/provision/app_defaults.php
@@ -179,6 +179,13 @@
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = '';
$x++;
+ $array[$x]['default_setting_category'] = 'provision';
+ $array[$x]['default_setting_subcategory'] = 'directory_extensions';
+ $array[$x]['default_setting_name'] = 'boolean';
+ $array[$x]['default_setting_value'] = 'true';
+ $array[$x]['default_setting_enabled'] = 'false';
+ $array[$x]['default_setting_description'] = 'allow extensions to be provisioned as contacts as $extensions in provision templates';
+ $x++;
$array[$x]['default_setting_category'] = 'ntp_server_primary';
$array[$x]['default_setting_subcategory'] = 'directory';
$array[$x]['default_setting_name'] = 'text';
diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php
index 66fa4645cb..6905a786ed 100644
--- a/app/provision/resources/classes/provision.php
+++ b/app/provision/resources/classes/provision.php
@@ -180,11 +180,17 @@ include "root.php";
if (strlen($device_template) == 0) {
$sql = "SELECT * FROM v_devices ";
$sql .= "WHERE device_mac_address=:mac ";
+ if($provision['http_domain_filter'] == "true") {
+ $sql .= "AND domain_uuid=:domain_uuid ";
+ }
//$sql .= "WHERE device_mac_address= '$mac' ";
$prep_statement_2 = $this->db->prepare(check_sql($sql));
if ($prep_statement_2) {
//use the prepared statement
$prep_statement_2->bindParam(':mac', $mac);
+ if($provision['http_domain_filter'] == "true") {
+ $prep_statement_2->bindParam(':domain_uuid', $domain_uuid);
+ }
$prep_statement_2->execute();
$row = $prep_statement_2->fetch();
//set the variables from values in the database
@@ -300,8 +306,14 @@ include "root.php";
if (strlen($device_uuid) > 0) {
$sql = "SELECT * FROM v_devices ";
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
+ if($provision['http_domain_filter'] == "true") {
+ $sql .= "AND domain_uuid=:domain_uuid ";
+ }
$prep_statement_3 = $this->db->prepare(check_sql($sql));
if ($prep_statement_3) {
+ if($provision['http_domain_filter'] == "true") {
+ $prep_statement_3->bindParam(':domain_uuid', $domain_uuid);
+ }
$prep_statement_3->execute();
$row = $prep_statement_3->fetch();
$device_uuid_alternate = $row["device_uuid_alternate"];
@@ -311,8 +323,14 @@ include "root.php";
//get the new devices information
$sql = "SELECT * FROM v_devices ";
$sql .= "WHERE device_uuid = '".$device_uuid."' ";
+ if($provision['http_domain_filter'] == "true") {
+ $sql .= "AND domain_uuid=:domain_uuid ";
+ }
$prep_statement_4 = $this->db->prepare(check_sql($sql));
if ($prep_statement_4) {
+ if($provision['http_domain_filter'] == "true") {
+ $prep_statement_4->bindParam(':domain_uuid', $domain_uuid);
+ }
$prep_statement_4->execute();
$row = $prep_statement_4->fetch();
$device_label = $row["device_label"];
@@ -455,6 +473,29 @@ include "root.php";
unset ($prep_statement);
}
+ //get the extensions array and add to the template engine
+ if (strlen($device_uuid) > 0 and strlen($domain_uuid) > 0 and $_SESSION['provision']['directory_extensions']['boolean'] == "true") {
+ //get contacts from the database
+ $sql = "select c.contact_organization, c.contact_name_given, c.contact_name_family, e.extension ";
+ $sql .= "from v_contacts as c, v_extension_users as cte, v_extensions as e, v_users as u ";
+ $sql .= "where c.domain_uuid = '".$domain_uuid."' ";
+ $sql .= "and c.contact_uuid = u.contact_uuid ";
+ $sql .= "and u.user_uuid = cte.user_uuid ";
+ $sql .= "and cte.extension_uuid = e.extension_uuid ";
+ $sql .= "and e.directory_visible = 'true' ";
+ foreach ($lines as $line){
+ $sql .= "and e.extension != '" . $line['user_id']. "' ";
+ }
+ $sql .= "order by c.contact_organization desc, c.contact_name_given asc, c.contact_name_family asc ";
+ $prep_statement = $this->db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ unset ($prep_statement, $sql);
+
+ //assign the contacts array
+ $view->assign("extensions", $extensions);
+ }
+
//get the provisioning information from device keys
if (strlen($device_uuid) > 0) {
//get the device keys array
diff --git a/app/sip_profiles/app_defaults.php b/app/sip_profiles/app_defaults.php
index 24d9cf2d80..3de33883bb 100644
--- a/app/sip_profiles/app_defaults.php
+++ b/app/sip_profiles/app_defaults.php
@@ -92,15 +92,18 @@
$sip_profile_description = "The Internal IPV6 profile binds to the IP version 6 address and is similar to the Internal profile.\n";
break;
case "external":
- $sip_profile_description .= "The External profile external provides anonymous calling in the public context. ";
+ $sip_profile_description = "The External profile external provides anonymous calling in the public context. ";
$sip_profile_description .= "By default the External profile binds to port 5080. ";
$sip_profile_description .= "Calls can be sent using a SIP URL \"voip.domain.com:5080\" ";
break;
+ case "external-ipv6":
+ $sip_profile_description = "The External IPV6 profile binds to the IP version 6 address and is similar to the External profile.\n";
+ break;
case "lan":
$sip_profile_description = "The LAN profile is the same as the Internal profile except that it is bound to the LAN IP.\n";
break;
default:
- $sip_profile_description .= '';
+ $sip_profile_description = '';
}
//add the sip profile if it is not false
diff --git a/app/sip_profiles/resources/xml/sip_profiles/external-ipv6.xml b/app/sip_profiles/resources/xml/sip_profiles/external-ipv6.xml
new file mode 100644
index 0000000000..f48bc7ed0e
--- /dev/null
+++ b/app/sip_profiles/resources/xml/sip_profiles/external-ipv6.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{v_sip_profile_settings}
+
+
diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php
index f3e70b9f77..1a3178ddcb 100644
--- a/app/time_conditions/time_condition_edit.php
+++ b/app/time_conditions/time_condition_edit.php
@@ -860,7 +860,7 @@ function add_custom_condition($destination, $group_id, $dialplan_action = '') {
echo " | ".$text['label-group']." | \n";
echo "
";
echo "