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 " "; - echo " "; + echo " "; //$destination = new destinations; echo $destination->select('dialplan', 'dialplan_action['.$group_id.']', $dialplan_action); echo " "; diff --git a/app/vars/app_defaults.php b/app/vars/app_defaults.php index 96309fd365..1a0c840845 100644 --- a/app/vars/app_defaults.php +++ b/app/vars/app_defaults.php @@ -43,12 +43,34 @@ $vars = <<=2;+=.1;%(1400,0,350,440)","var_cat":"Defaults","var_enabled":"true","var_description":""}, {"var_name":"sit","var_value":"%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)","var_cat":"Defaults","var_enabled":"true","var_description":""}, {"var_name":"sip_tls_version","var_value":"tlsv1","var_cat":"SIP","var_enabled":"true","var_description":"U0lQIGFuZCBUTFMgc2V0dGluZ3Mu"}, @@ -56,12 +78,12 @@ $vars = <<prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + + if ($row['num_rows'] == 0) { + $sql = "insert into v_vars "; + $sql .= "("; + $sql .= "var_uuid, "; + $sql .= "var_name, "; + $sql .= "var_value, "; + $sql .= "var_cat, "; + $sql .= "var_enabled, "; + $sql .= "var_order, "; + $sql .= "var_description "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'".uuid()."', "; + $sql .= "'default_country', "; + $sql .= "'".$country["isocode"]."', "; + $sql .= "'Defaults', "; + $sql .= "'true', "; + $sql .= "'".$x."', "; + $sql .= "'' "; + $sql .= ");"; + $db->exec(check_sql($sql)); + unset($sql, $row); + $x++; + } } - } - - if ( !$found ) { - return; - } - - // Set default Country ISO code - $sql = "select count(*) as num_rows from v_vars "; - $sql .= "where var_name = 'default_country' "; - $sql .= "and var_cat = 'Defaults' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - - if ($row['num_rows'] == 0) { - $sql = "insert into v_vars "; - $sql .= "("; - $sql .= "var_uuid, "; - $sql .= "var_name, "; - $sql .= "var_value, "; - $sql .= "var_cat, "; - $sql .= "var_enabled, "; - $sql .= "var_order, "; - $sql .= "var_description "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'default_country', "; - $sql .= "'".$country["isocode"]."', "; - $sql .= "'Defaults', "; - $sql .= "'true', "; - $sql .= "'".$x."', "; - $sql .= "'' "; - $sql .= ");"; - $db->exec(check_sql($sql)); - unset($sql, $row); - $x++; + unset($prep_statement, $sql); + + // Set default Country code + $sql = "select count(*) as num_rows from v_vars "; + $sql .= "where var_name = 'default_countrycode' "; + $sql .= "and var_cat = 'Defaults' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] == 0) { + $sql = "insert into v_vars "; + $sql .= "("; + $sql .= "var_uuid, "; + $sql .= "var_name, "; + $sql .= "var_value, "; + $sql .= "var_cat, "; + $sql .= "var_enabled, "; + $sql .= "var_order, "; + $sql .= "var_description "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'".uuid()."', "; + $sql .= "'default_countrycode', "; + $sql .= "'".$country["countrycode"]."', "; + $sql .= "'Defaults', "; + $sql .= "'true', "; + $sql .= "'".$x."', "; + $sql .= "'' "; + $sql .= ");"; + $db->exec(check_sql($sql)); + unset($sql, $row); + $x++; + } } - } - unset($prep_statement, $sql); - - // Set default Country code - $sql = "select count(*) as num_rows from v_vars "; - $sql .= "where var_name = 'default_countrycode' "; - $sql .= "and var_cat = 'Defaults' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['num_rows'] == 0) { - $sql = "insert into v_vars "; - $sql .= "("; - $sql .= "var_uuid, "; - $sql .= "var_name, "; - $sql .= "var_value, "; - $sql .= "var_cat, "; - $sql .= "var_enabled, "; - $sql .= "var_order, "; - $sql .= "var_description "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'default_countrycode', "; - $sql .= "'".$country["countrycode"]."', "; - $sql .= "'Defaults', "; - $sql .= "'true', "; - $sql .= "'".$x."', "; - $sql .= "'' "; - $sql .= ");"; - $db->exec(check_sql($sql)); - unset($sql, $row); - $x++; + unset($prep_statement, $sql); + + // Set default International Direct Dialing code + $sql = "select count(*) as num_rows from v_vars "; + $sql .= "where var_name = 'default_exitcode' "; + $sql .= "and var_cat = 'Defaults' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] == 0) { + $sql = "insert into v_vars "; + $sql .= "("; + $sql .= "var_uuid, "; + $sql .= "var_name, "; + $sql .= "var_value, "; + $sql .= "var_cat, "; + $sql .= "var_enabled, "; + $sql .= "var_order, "; + $sql .= "var_description "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'".uuid()."', "; + $sql .= "'default_exitcode', "; + $sql .= "'".$country["exitcode"]."', "; + $sql .= "'Defaults', "; + $sql .= "'true', "; + $sql .= "'".$x."', "; + $sql .= "'' "; + $sql .= ");"; + $db->exec(check_sql($sql)); + unset($sql, $row); + $x++; + } } + unset($prep_statement, $sql); + + unset($countries); } - unset($prep_statement, $sql); - - // Set default International Direct Dialing code - $sql = "select count(*) as num_rows from v_vars "; - $sql .= "where var_name = 'default_exitcode' "; - $sql .= "and var_cat = 'Defaults' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['num_rows'] == 0) { - $sql = "insert into v_vars "; - $sql .= "("; - $sql .= "var_uuid, "; - $sql .= "var_name, "; - $sql .= "var_value, "; - $sql .= "var_cat, "; - $sql .= "var_enabled, "; - $sql .= "var_order, "; - $sql .= "var_description "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'default_exitcode', "; - $sql .= "'".$country["exitcode"]."', "; - $sql .= "'Defaults', "; - $sql .= "'true', "; - $sql .= "'".$x."', "; - $sql .= "'' "; - $sql .= ");"; - $db->exec(check_sql($sql)); - unset($sql, $row); - $x++; - } - } - unset($prep_statement, $sql); - - unset($countries); } } diff --git a/resources/countries.php b/resources/countries.php new file mode 100644 index 0000000000..88f144c60a --- /dev/null +++ b/resources/countries.php @@ -0,0 +1,916 @@ + \ No newline at end of file diff --git a/resources/templates/conf/sip_profiles/external-ipv6.xml.noload b/resources/templates/conf/sip_profiles/external-ipv6.xml.noload new file mode 100644 index 0000000000..4a4b4028ee --- /dev/null +++ b/resources/templates/conf/sip_profiles/external-ipv6.xml.noload @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/provision/yealink/cp860/y000000000037.cfg b/resources/templates/provision/yealink/cp860/y000000000037.cfg index af57fae6f5..3b633a861a 100644 --- a/resources/templates/provision/yealink/cp860/y000000000037.cfg +++ b/resources/templates/provision/yealink/cp860/y000000000037.cfg @@ -26,8 +26,45 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 network.static_dns_enable = 1 +{if isset($vlan_port_id) } ####################################################################################### -## VLAN ## +## VLAN ENABLED ## +####################################################################################### +network.vlan.internet_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.internet_port_vid = {$vlan_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.internet_port_priority = + +#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; +#Require reboot; +network.vlan.pc_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.pc_port_vid = {$vlan_pc_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.pc_port_priority = + +#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default); +#Require reboot; +network.vlan.dhcp_enable = + +#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255. +#Multiple options separated by a comma. It supports up to 5 options in all. +#Require reboot; +network.vlan.dhcp_option = + +{else} + +####################################################################################### +## VLAN DISABLED ## ####################################################################################### network.vlan.internet_port_enable = 0 @@ -60,6 +97,9 @@ network.vlan.dhcp_enable = #Require reboot; network.vlan.dhcp_option = +{/if} + + ####################################################################################### ## WEB Port ## ####################################################################################### diff --git a/resources/templates/provision/yealink/t41p/y000000000036.cfg b/resources/templates/provision/yealink/t41p/y000000000036.cfg index 7e540ed1fe..474d2af541 100644 --- a/resources/templates/provision/yealink/t41p/y000000000036.cfg +++ b/resources/templates/provision/yealink/t41p/y000000000036.cfg @@ -26,8 +26,45 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 network.static_dns_enable = 0 +{if isset($vlan_port_id) } ####################################################################################### -## VLAN ## +## VLAN ENABLED ## +####################################################################################### +network.vlan.internet_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.internet_port_vid = {$vlan_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.internet_port_priority = + +#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; +#Require reboot; +network.vlan.pc_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.pc_port_vid = {$vlan_pc_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.pc_port_priority = + +#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default); +#Require reboot; +network.vlan.dhcp_enable = + +#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255. +#Multiple options separated by a comma. It supports up to 5 options in all. +#Require reboot; +network.vlan.dhcp_option = + +{else} + +####################################################################################### +## VLAN DISABLED ## ####################################################################################### network.vlan.internet_port_enable = 0 @@ -60,6 +97,9 @@ network.vlan.dhcp_enable = #Require reboot; network.vlan.dhcp_option = +{/if} + + ####################################################################################### ## WEB Port ## ####################################################################################### diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg index 8eb5fb45bf..f255bf51cd 100644 --- a/resources/templates/provision/yealink/t42g/y000000000029.cfg +++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg @@ -26,8 +26,45 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 network.static_dns_enable = 1 +{if isset($vlan_port_id) } ####################################################################################### -## VLAN ## +## VLAN ENABLED ## +####################################################################################### +network.vlan.internet_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.internet_port_vid = {$vlan_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.internet_port_priority = + +#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; +#Require reboot; +network.vlan.pc_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.pc_port_vid = {$vlan_pc_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.pc_port_priority = + +#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default); +#Require reboot; +network.vlan.dhcp_enable = + +#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255. +#Multiple options separated by a comma. It supports up to 5 options in all. +#Require reboot; +network.vlan.dhcp_option = + +{else} + +####################################################################################### +## VLAN DISABLED ## ####################################################################################### network.vlan.internet_port_enable = 0 @@ -60,6 +97,9 @@ network.vlan.dhcp_enable = #Require reboot; network.vlan.dhcp_option = +{/if} + + ####################################################################################### ## WEB Port ## ####################################################################################### diff --git a/resources/templates/provision/yealink/t46g/y000000000028.cfg b/resources/templates/provision/yealink/t46g/y000000000028.cfg index 7e540ed1fe..4fdd27011c 100644 --- a/resources/templates/provision/yealink/t46g/y000000000028.cfg +++ b/resources/templates/provision/yealink/t46g/y000000000028.cfg @@ -26,8 +26,45 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 network.static_dns_enable = 0 +{if isset($vlan_port_id) } ####################################################################################### -## VLAN ## +## VLAN ENABLED ## +####################################################################################### +network.vlan.internet_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.internet_port_vid = {$vlan_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.internet_port_priority = + +#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; +#Require reboot; +network.vlan.pc_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.pc_port_vid = {$vlan_pc_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.pc_port_priority = + +#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default); +#Require reboot; +network.vlan.dhcp_enable = + +#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255. +#Multiple options separated by a comma. It supports up to 5 options in all. +#Require reboot; +network.vlan.dhcp_option = + +{else} + +####################################################################################### +## VLAN ENABLED ## ####################################################################################### network.vlan.internet_port_enable = 0 @@ -60,6 +97,8 @@ network.vlan.dhcp_enable = #Require reboot; network.vlan.dhcp_option = +{/if} + ####################################################################################### ## WEB Port ## ####################################################################################### @@ -521,30 +560,25 @@ bw.directory_enable = 0 ####################################################################################### ## LDAP ## ####################################################################################### -#Configure the search criteria for name and number lookups. -ldap.enable = -ldap.name_filter = -ldap.number_filter = -ldap.host = 0.0.0.0 -ldap.port = 389 -ldap.base = -ldap.user = -ldap.password = - -#Specify the maximum of the displayed search results. It ranges from 1 to 32000, the default value is 50. -ldap.max_hits = -ldap.name_attr = -ldap.numb_attr = -ldap.display_name = - -#Configure the LDAP version. The valid value is 2 or 3 (default). -ldap.version = - -#Enable or disable the phone to query the contact name from the LDAP server when receiving an incoming call; 0-Disabled (default), 1-Enabled; -ldap.call_in_lookup = - -#Enable or disable the phone to sort the search results in alphabetical order; 0-Disabled (default), 1-Enabled; -ldap.ldap_sort = +#Configure the backlight time (in seconds). The valid values are: 1-Always on, 60 (default), 120, 300, 600, 1800. +security.trust_certificates = 0 +phone_setting.backlight_time = 0 +ldap.name_filter = {$ldap_name_filter} +ldap.number_filter = {$ldap_number_filter} +ldap.host = {$ldap_host} +ldap.base = {$ldap_base} +ldap.user = {$ldap_user} +ldap.password = {$ldap_password} +ldap.display_name = {$ldap_display_name} +ldap.version = {$ldap_version} +ldap.call_in_lookup = {$ldap_call_in_lookup} +ldap.dial_lookup = {$ldap_dial_lookup} +ldap.enable = {$ldap_enable} +ldap.ldap_sort = {$ldap_sort} +ldap.port = {$ldap_port} +ldap.max_hits = {$ldap_max_hits} +ldap.name_attr = {$ldap_name_attr} +ldap.numb_attr = {$ldap_numb_attr} ####################################################################################### ## Features ## @@ -1525,7 +1559,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url ={$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ## diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 5854bfce1d..268aacde40 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -26,8 +26,45 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 network.static_dns_enable = 1 +{if isset($vlan_port_id) } ####################################################################################### -## VLAN ## +## VLAN ENABLED ## +####################################################################################### +network.vlan.internet_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.internet_port_vid = {$vlan_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.internet_port_priority = + +#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled; +#Require reboot; +network.vlan.pc_port_enable = 1 + +#Configure the VLAN ID, it ranges from 1 to 4094, the default value is 1. +#Require reboot; +network.vlan.pc_port_vid = {$vlan_pc_port_id} + +#Configure the VLAN priority, it ranges from 0 (default) to 7. +#Require reboot; +network.vlan.pc_port_priority = + +#Enable or disable the DHCP to obtain the information of the VLAN; 0-Disabled; 1-Enabled (default); +#Require reboot; +network.vlan.dhcp_enable = + +#Configure the DHCP option to obtain the information of the VLAN. It ranges from 0 to 255. +#Multiple options separated by a comma. It supports up to 5 options in all. +#Require reboot; +network.vlan.dhcp_option = + +{else} + +####################################################################################### +## VLAN DISABLED ## ####################################################################################### network.vlan.internet_port_enable = 0 @@ -60,6 +97,9 @@ network.vlan.dhcp_enable = #Require reboot; network.vlan.dhcp_option = +{/if} + + ####################################################################################### ## WEB Port ## ####################################################################################### @@ -715,11 +755,11 @@ features.remote_phonebook.flash_time = ####################################################################################### ## Features Action ## ####################################################################################### -#Specifie the address(es) or enters ¡°any¡± from which Action URI will be accepted. +#Specifie the address(es) or enters ¡°any¡± from which Action URI will be accepted. #For discontinuous IP addresses, each IP address is separated by comma, for example: 192.168.1.20,10.2.1.30 -#For continuous IP addresses, the format likes *.*.*.* and the ¡°*¡± stands for the values 0~255. For example: 10.10.*.* stands for the IP addresses that range from 10.10.0.0~10.10.255.255. +#For continuous IP addresses, the format likes *.*.*.* and the ¡°*¡± stands for the values 0~255. For example: 10.10.*.* stands for the IP addresses that range from 10.10.0.0~10.10.255.255. #If left blank, the IP phone cannot receive or handle any HTTP GET request. -#If set to ¡°any¡±, the IP phone accepts and handles HTTP GET requests from any IP address. +#If set to ¡°any¡±, the IP phone accepts and handles HTTP GET requests from any IP address. features.action_uri_limit_ip = features.action_uri_reboot_now = 0 @@ -815,7 +855,7 @@ phone_setting.inactive_backlight_level = 1 phone_setting.blf_list_enable = 1 phone_setting.auto_blf_list_enable = 1 -#Specify the prior of the line keys and EXP keys when automatically configure the blf list£»0-Configure the line keys first, 1-Configure the EXP keys first; +#Specify the prior of the line keys and EXP keys when automatically configure the blf list£»0-Configure the line keys first, 1-Configure the EXP keys first; phone_setting.blf_list_sequence_type = ####################################################################################### diff --git a/themes/enhanced/app_defaults.php b/themes/enhanced/app_defaults.php index ed8a9dad06..333fb6efca 100644 --- a/themes/enhanced/app_defaults.php +++ b/themes/enhanced/app_defaults.php @@ -26,7 +26,64 @@ if ($domains_processed == 1) { + //get the background images + $relative_path = PROJECT_PATH.'/themes/enhanced/images/backgrounds'; + $backgrounds = opendir($_SERVER["DOCUMENT_ROOT"].'/'.$relative_path); + unset($array); + $x = 0; + while (false !== ($file = readdir($backgrounds))) { + if ($file != "." AND $file != ".."){ + $new_path = $dir.'/'.$file; + $level = explode('/',$new_path); + $ext = pathinfo($file, PATHINFO_EXTENSION); + if ($ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "gif") { + $x++; + $array[$x]['default_setting_category'] = 'theme'; + $array[$x]['default_setting_subcategory'] = 'background_image'; + $array[$x]['default_setting_name'] = 'array'; + $array[$x]['default_setting_value'] = $relative_path.'/'.$file; + $array[$x]['default_setting_enabled'] = 'false'; + $array[$x]['default_setting_description'] = 'Set a relative path or URL within a selected compatible template.'; + } + if ($x > 300) { break; }; + } + } + + if(!$set_session_theme){ + //get default settings + $sql = "select * from v_default_settings "; + $sql .= "where default_setting_category = 'theme' "; + $sql .= "and default_setting_subcategory = 'background_image' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset($prep_statement); + + $background_image_enabled = false; + //add theme default settings + foreach ($array as $row) { + $found = false; + foreach ($default_settings as $field) { + if ($field["default_setting_value"] == $row["default_setting_value"]) { + $found = true; + } + //enable_background_image is a new setting, if a user has any background images enabled we should turn it on + if ($field["default_setting_enabled"] == 'enabled') { + $background_image_enabled = true; + } + } + if (!$found) { + $orm = new orm; + $orm->name('default_settings'); + $orm->save($row); + $message = $orm->message; + //print_r($message); + } + } + } + //define array of settings + unset($array); $x = 0; $array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_subcategory'] = 'login_opacity'; @@ -181,6 +238,14 @@ if ($domains_processed == 1) { $array[$x]['default_setting_value'] = '0.96'; $array[$x]['default_setting_enabled'] = 'false'; $array[$x]['default_setting_description'] = 'Set the opacity of the main menu (decimal, Minimized theme only).'; + $x++; + $array[$x]['default_setting_category'] = 'theme'; + $array[$x]['default_setting_subcategory'] = 'background_image_enabled'; + $array[$x]['default_setting_name'] = 'boolean'; + $array[$x]['default_setting_value'] = 'true'; + $array[$x]['default_setting_enabled'] = 'false'; + if($background_image_enabled) { $array[$x]['default_setting_enabled'] = 'true'; } + $array[$x]['default_setting_description'] = 'Enable use of background images.'; if($set_session_theme){ foreach ($array as $index => $default_settings) { @@ -268,55 +333,6 @@ if ($domains_processed == 1) { } } - //get the background images - $relative_path = PROJECT_PATH.'/themes/enhanced/images/backgrounds'; - $backgrounds = opendir($_SERVER["DOCUMENT_ROOT"].'/'.$relative_path); - unset($array); - $x = 0; - while (false !== ($file = readdir($backgrounds))) { - if ($file != "." AND $file != ".."){ - $new_path = $dir.'/'.$file; - $level = explode('/',$new_path); - $ext = pathinfo($file, PATHINFO_EXTENSION); - if ($ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "gif") { - $x++; - $array[$x]['default_setting_category'] = 'theme'; - $array[$x]['default_setting_subcategory'] = 'background_image'; - $array[$x]['default_setting_name'] = 'array'; - $array[$x]['default_setting_value'] = $relative_path.'/'.$file; - $array[$x]['default_setting_enabled'] = 'false'; - $array[$x]['default_setting_description'] = 'Set a relative path or URL within a selected compatible template.'; - } - if ($x > 300) { break; }; - } - } - - //get default settings - $sql = "select * from v_default_settings "; - $sql .= "where default_setting_category = 'theme' "; - $sql .= "and default_setting_subcategory = 'background_image' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset($prep_statement); - - //add theme default settings - foreach ($array as $row) { - $found = false; - foreach ($default_settings as $field) { - if ($field["default_setting_value"] == $row["default_setting_value"]) { - $found = true; - } - } - if (!$found) { - $orm = new orm; - $orm->name('default_settings'); - $orm->save($row); - $message = $orm->message; - //print_r($message); - } - } - //unset the array variable unset($array); } diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index e5cf267146..beefeb7c01 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -1424,7 +1424,7 @@ if (strlen($_SESSION['message']) > 0) {