diff --git a/.htaccess b/.htaccess index 366818be89..36dddc6303 100644 --- a/.htaccess +++ b/.htaccess @@ -1,5 +1,8 @@ RewriteEngine On +#REST api +RewriteRule ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 [QSA] + # $mac or $mac.cfg/xml RewriteRule ^.*([A-Fa-f0-9]{12})(?:\.xml|\.cfg)?$ app/provision/index.php?mac=$1 [QSA] diff --git a/README.md b/README.md index bca287883d..0274a06b50 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -What is [FusionPBX](http://fusionpbx.com/)? +What is [FusionPBX](https://www.fusionpbx.com/)? -------------------------------------- -[FusionPBX](http://fusionpbx.com/) can be used as a single or domain based multi-tenant PBX, carrier grade switch, call center server, fax server, VoIP server, voicemail server, conference server, voice application server, multi-tenant appliance framework and more. [FreeSWITCH™](http://freeswitch.org) is a highly scalable, multi-threaded, multi-platform communication platform. +[FusionPBX](http://fusionpbx.com/) can be used as a single or domain based multi-tenant PBX, carrier grade switch, call center server, fax server, VoIP server, voicemail server, conference server, voice application server, multi-tenant appliance framework and more. [FreeSWITCH™](https://freeswitch.com) is a highly scalable, multi-threaded, multi-platform communication platform. -It provides the functionality your business needs and brings carrier grade switching, and corporate-level phone system features to small, medium, and large businesses. Read more at [FusionPBX](http://fusionpbx.com/). [Please visit our youtube channel](https://www.youtube.com/FusionPBX) +It provides the functionality your business needs and brings carrier grade switching, and corporate-level phone system features to small, medium, and large businesses. Read more at [FusionPBX](https://www.fusionpbx.com/). [Please visit our youtube channel](https://www.youtube.com/FusionPBX) In addition to providing all of the usual PBX functionality, FusionPBX allows you to configure: @@ -20,38 +20,38 @@ In addition to providing all of the usual PBX functionality, FusionPBX allows yo - Hot desking - High Availability and Redundancy - Dialplan Programming that allow nearly endless possibilities -- [Many other Features](http://docs.fusionpbx.com/en/latest/features/features.html) +- [Many other Features](https://docs.fusionpbx.com/en/latest/features/features.html) Free Support -------------------------------------- We provide several avenues for you to get your system up and running on your own and learn the basics of the system. 1. [Youtube Channel](https://www.youtube.com/channel/UCN5j2ITmjua1MfjGR8jX9TA) -2. [Documentation](http://docs.fusionpbx.com) +2. [Documentation](https://docs.fusionpbx.com) 3. [How to Contribute](https://github.com/Fusionpbx/opensource) Commercial Support -------------------------------------- These options support the project and cover any kind of help you might need from architecture, installation, best practices, troubleshooting, custom feature programming, and training. -1. [Commercial Paid Support](http://fusionpbx.com/support.php) -2. [Custom Feature Development](http://fusionpbx.com/support.php) -3. [Admin Training](http://fusionpbx.com) -4. [Advanced Training](http://fusionpbx.com) -5. [Developer Training](http://fusionpbx.com) +1. [Commercial Paid Support](https://www.fusionpbx.com/support) +2. [Custom Feature Development](https://www.fusionpbx.com/support) +3. [Admin Training](https://www.fusionpbx.com) +4. [Advanced Training](https://www.fusionpbx.com) +5. [Developer Training](https://www.fusionpbx.com) Software Requirements -------------------------------------- -- FusionPBX will run on Debian 8, FreeBSD 10 & 11, CentOS, and more. -- [FusionPBX Installer](http://fusionpbx.com/download.php) +- FusionPBX will run on Debian 8 & 9, FreeBSD 10 & 11, CentOS, and more. +- [FusionPBX Installer](https://fusionpbx.com/download.php) Community -------------------------------------- We have a pretty thriving community. You can find us here: -- [Twitter](http://twitter.com/fusionpbx) -- [Website](http://fusionpbx.com) +- [Twitter](https://twitter.com/fusionpbx) +- [Website](https://fusionpbx.com) Contributing --------------------------------------- @@ -93,3 +93,6 @@ cd /usr/src/fusionpbx-install.sh/debian This install script is designed to be an fast, simple, and in a modular way to install FusionPBX. Start with a minimal install of Debian 8 with SSH enabled. Run the following commands under root. The script installs FusionPBX, FreeSWITCH release package and its dependencies, IPTables, Fail2ban, NGINX, PHP FPM and PostgreSQL. Some installations require special considerations. Visit https://github.com/fusionpbx/fusionpbx-install.sh readme section for more details. + +### ISSUES +If you find a bug sign up for an account on [www.fusionpbx.com](https://www.fusionpbx.com) to report the issue. diff --git a/app/access_controls/access_control_delete.php b/app/access_controls/access_control_delete.php index 315fac5112..44cb5bcb4f 100644 --- a/app/access_controls/access_control_delete.php +++ b/app/access_controls/access_control_delete.php @@ -73,7 +73,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: access_controls.php'); diff --git a/app/access_controls/access_control_edit.php b/app/access_controls/access_control_edit.php index d5ba56931f..38b6c7d014 100644 --- a/app/access_controls/access_control_edit.php +++ b/app/access_controls/access_control_edit.php @@ -108,7 +108,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($fp) { event_socket_request($fp, "api reloadacl"); } //add the message - messages::add($text['message-add']); + message::add($text['message-add']); //redirect the user header("Location: access_controls.php"); @@ -135,7 +135,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($fp) { event_socket_request($fp, "api reloadacl"); } //add the message - messages::add($text['message-update']); + message::add($text['message-update']); //redirect the user header("Location: access_controls.php"); diff --git a/app/access_controls/access_control_node_delete.php b/app/access_controls/access_control_node_delete.php index b6ce1e4a8d..816c2ea2d1 100644 --- a/app/access_controls/access_control_node_delete.php +++ b/app/access_controls/access_control_node_delete.php @@ -62,7 +62,7 @@ } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: access_control_edit.php?id='.$access_control_uuid); ?> diff --git a/app/access_controls/access_control_node_edit.php b/app/access_controls/access_control_node_edit.php index 40b667213a..b1875c7b7a 100644 --- a/app/access_controls/access_control_node_edit.php +++ b/app/access_controls/access_control_node_edit.php @@ -128,7 +128,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if ($fp) { event_socket_request($fp, "api reloadacl"); } //add the message - messages::add($text['message-add']); + message::add($text['message-add']); //redirect the browser header('Location: access_control_edit.php?id='.escape($access_control_uuid)); @@ -158,7 +158,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if ($fp) { event_socket_request($fp, "api reloadacl"); } //add the message - messages::add($text['message-update']); + message::add($text['message-update']); //redirect the browser header('Location: access_control_edit.php?id='.escape($access_control_uuid)); diff --git a/app/access_controls/app_config.php b/app/access_controls/app_config.php index 84d3e7a160..a77436675e 100644 --- a/app/access_controls/app_config.php +++ b/app/access_controls/app_config.php @@ -93,7 +93,7 @@ $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_access_control"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_access_controls"; $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "access_control_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "node_type"; @@ -112,4 +112,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description."; -?> \ No newline at end of file +?> diff --git a/app/adminer/index.php b/app/adminer/index.php index c48a14d5ae..51b871c3ba 100644 --- a/app/adminer/index.php +++ b/app/adminer/index.php @@ -33,7 +33,7 @@ return 'Adminer'; } - function permanentLogin() { + function permanentLogin($j = false) { // key used for permanent login if ($_SESSION['adminer']['auto_login']['boolean'] == 'true') { return "7bebc76d8680196752c6b961ef13c360"; @@ -43,7 +43,7 @@ function credentials() { // server, username and password for connecting to database if ($_SESSION['adminer']['auto_login']['boolean'] == 'true') { - global $db_host, $db_username, $db_password; + global $db_host, $db_port, $db_username, $db_password; return array($db_host.':'.$db_port, $db_username, $db_password); } } diff --git a/app/backup/index.php b/app/backup/index.php index 4cca7015e4..ec1a9ff757 100644 --- a/app/backup/index.php +++ b/app/backup/index.php @@ -17,22 +17,25 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists("backup_download")) { - //access granted -} -else { - echo "access denied"; - exit; -} +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists("backup_download")) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -40,8 +43,9 @@ else { //download the backup if ($_GET['a'] == "download" && permission_exists('backup_download')) { - $file_format = $_GET['file_format']; - $file_format = ($file_format != '') ? $file_format : 'tgz'; + //get the file format + $file_format = $_GET['file_format']; + $file_format = ($file_format != '') ? $file_format : 'tgz'; //build the backup file $backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp'; @@ -55,8 +59,12 @@ else { default : $cmd = 'tar -zvcf '; } $cmd .= $backup_path.'/'.$backup_file.' '; - if (isset($_SESSION['backup']['path'])) foreach ($_SESSION['backup']['path'] as $value) { - $cmd .= $value.' '; + if (isset($_SESSION['backup']['path'])) { + foreach ($_SESSION['backup']['path'] as $value) { + if (file_exists($value)) { + $cmd .= $value.' '; + } + } } $cmd .= " 2>&1"; exec($cmd, $response, $restore_errlevel); @@ -81,14 +89,14 @@ else { } else { //set response message - messages::add($text['message-backup_failed_format'] . $response_txt, 'negative'); + message::add($text['message-backup_failed_format'] . $response_txt, 'negative'); header("Location: ".$_SERVER['PHP_SELF']); exit; } } else { //set response message - messages::add($text['message-backup_failed_paths'], 'negative'); + message::add($text['message-backup_failed_paths'], 'negative'); header("Location: ".$_SERVER['PHP_SELF']); exit; } @@ -109,7 +117,7 @@ else { $backup_path = ($_SESSION['server']['backup']['path'] != '') ? $_SESSION['server']['backup']['path'] : '/tmp'; $backup_file = $_FILES['backup_file']['name']; - if (is_uploaded_file($_FILES['backup_file']['tmp_name'])) { + if (is_uploaded_file($_FILES['backup_file']['tmp_name']) && file_exists($backup_path.'/'.$backup_file)) { //move temp file to backup path move_uploaded_file($_FILES['backup_file']['tmp_name'], $backup_path.'/'.$backup_file); //determine file format and restore backup @@ -124,7 +132,7 @@ else { } if (!$valid_format) { @unlink($backup_path.'/'.$backup_file); - messages::add($text['message-restore_failed_format'], 'negative'); + message::add($text['message-restore_failed_format'], 'negative'); header("Location: ".$_SERVER['PHP_SELF']); exit; } @@ -134,11 +142,11 @@ else { $response_txt = "
" . implode("
", $response); if ($restore_errlevel == 0) { //set response message - messages::add($text['message-restore_completed']); + message::add($text['message-restore_completed']); header("Location: ".$_SERVER['PHP_SELF']); exit; } else { - messages::add($text['message-restore_failed_extract'] . $response_txt, 'negative'); + message::add($text['message-restore_failed_extract'] . $response_txt, 'negative'); header("Location: ".$_SERVER['PHP_SELF']); exit; } @@ -146,7 +154,7 @@ else { } else { //set response message - messages::add($text['message-restore_failed_upload'], 'negative'); + message::add($text['message-restore_failed_upload'], 'negative'); header("Location: ".$_SERVER['PHP_SELF']); exit; } @@ -265,4 +273,4 @@ else { //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/bridges/bridge_delete.php b/app/bridges/bridge_delete.php index 159c177c2f..0a8a7a260a 100644 --- a/app/bridges/bridge_delete.php +++ b/app/bridges/bridge_delete.php @@ -33,7 +33,7 @@ $text = $language->get(); //delete the message - messages::add($text['message-delete']); + message::add($text['message-delete']); //delete the data if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('bridge_delete')) { diff --git a/app/bridges/bridge_edit.php b/app/bridges/bridge_edit.php index fa5313e5bb..85dc9b76c2 100644 --- a/app/bridges/bridge_edit.php +++ b/app/bridges/bridge_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 + Portions created by the Initial Developer are Copyright (C) 2018 - 2019 the Initial Developer. All Rights Reserved. */ @@ -127,13 +127,15 @@ //pre-populate the form if (is_array($_GET) && $_POST["persistformvar"] != "true") { $bridge_uuid = check_str($_GET["id"]); + $parameters['bridge_uuid'] = $bridge_uuid; $sql = "select * from v_bridges "; - $sql .= "where bridge_uuid = '$bridge_uuid' "; - //$sql .= "and domain_uuid = '$domain_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { + $sql .= "where bridge_uuid = :bridge_uuid "; + //$sql .= "and domain_uuid = :domain_uuid "; + $database = new database; + //$database = $database->app_name = 'bridges'; + $result = $database->execute($sql, $parameters); + //$message = $database->message; + foreach ($result as $row) { $bridge_name = $row["bridge_name"]; $bridge_destination = $row["bridge_destination"]; $bridge_enabled = $row["bridge_enabled"]; @@ -161,7 +163,7 @@ echo " ".$text['label-bridge_name']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-bridge_name']."\n"; echo "\n"; @@ -172,7 +174,7 @@ echo " ".$text['label-bridge_destination']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-bridge_destination']."\n"; echo "\n"; @@ -205,7 +207,7 @@ echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " "; diff --git a/app/bridges/bridges.php b/app/bridges/bridges.php index 7d3bef717c..b988487ad5 100644 --- a/app/bridges/bridges.php +++ b/app/bridges/bridges.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2018 + Portions created by the Initial Developer are Copyright (C) 2018 - 2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -28,6 +28,7 @@ require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; + require_once "resources/paging.php"; //check permissions if (permission_exists('bridge_view')) { @@ -60,27 +61,39 @@ $obj = new bridges; $obj->delete($bridges); //delete message - messages::add($text['message-delete']); + message::add($text['message-delete']); } } -//get variables used to control the order - $order_by = check_str($_GET["order_by"]); - $order = check_str($_GET["order"]); +//get order and order by and sanatize the values + $order_by = $_GET["order_by"]; + $order = $_GET["order"]; + if (strlen($order_by) > 0) { + $order_by = preg_replace('#[^a-zA-Z0-9_\-]#', '', $order_by); + } + if (strlen($order) > 0) { + if ($order == 'asc' || $order == 'desc') { + //expected value + } + else { + $order = ''; + } + } + +//add the parameters + $parameters['domain_uuid'] = $domain_uuid; //add the search term $search = strtolower(check_str($_GET["search"])); if (strlen($search) > 0) { $sql_search = " ("; - $sql_search .= "lower(bridge_name) like '%".$search."%' "; - $sql_search .= "or lower(bridge_destination) like '%".$search."%' "; - $sql_search .= "or lower(bridge_enabled) like '%".$search."%' "; + $sql_search .= " lower(bridge_name) like :search "; + $sql_search .= " or lower(bridge_destination) like :search "; + $sql_search .= " or lower(bridge_enabled) like :search "; $sql_search .= ") "; - } -//additional includes - require_once "resources/header.php"; - require_once "resources/paging.php"; + $parameters['search'] = '%'.$search.'%'; + } //prepare to page the results $sql = "select count(bridge_uuid) as num_rows from v_bridges "; @@ -88,23 +101,23 @@ if (isset($sql_search)) { $sql .= "where ".$sql_search; } - } else { - $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + } + else { + $sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) "; if (isset($sql_search)) { $sql .= "and ".$sql_search; } } - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare($sql); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['num_rows'] > 0) { - $num_rows = $row['num_rows']; - } - else { - $num_rows = '0'; - } + if (strlen($order_by) > 0) { + $sql .= "order by $order_by $order "; + } + $database = new database; + $row = $database->execute($sql, $parameters); + if ($row[0]['num_rows'] > 0) { + $num_rows = $row[0]['num_rows']; + } + else { + $num_rows = '0'; } //prepare to page the results @@ -124,24 +137,32 @@ if (isset($sql_search)) { $sql .= "where ".$sql_search; } - } else { - $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + } + else { + $sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) "; if (isset($sql_search)) { $sql .= "and ".$sql_search; } } - if (strlen($order_by) > 0) { $sql .= "order by $order_by $order "; } - $sql .= "limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset ($prep_statement, $sql); + if (strlen($order_by) > 0) { + $sql .= "order by $order_by $order "; + } + if (is_numeric($rows_per_page) && is_numeric($offset)) { + $sql .= "limit $rows_per_page offset $offset "; + } + $database = new database; + $bridges = $database->execute($sql, $parameters); + //$message = $database->message; + //print_r($message); //alternate the row style $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; +//include the header + require_once "resources/header.php"; + //define the checkbox_toggle function echo "\n"; + +?> diff --git a/app/contacts/contact_auth.php b/app/contacts/contact_auth.php index 43e1fe2520..629c32500e 100644 --- a/app/contacts/contact_auth.php +++ b/app/contacts/contact_auth.php @@ -52,7 +52,7 @@ $_SESSION['contact_auth']['target'] = ($_SESSION['contact_auth']['target'] == '' if ($_SESSION['contact_auth']['source'] == 'google') { if ($_REQUEST['error']) { - messages::add(($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error'], 'negative'); + message::add(($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error'], 'negative'); header("Location: ".$_SESSION['contact_auth']['referer']); unset($_SESSION['contact_auth']); exit; @@ -60,7 +60,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { if (isset($_REQUEST['signout'])) { unset($_SESSION['contact_auth']['token']); - messages::add($text['message-google_signed_out']); + message::add($text['message-google_signed_out']); header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']); exit; } @@ -110,7 +110,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { } else { - messages::add($text['message-access_denied'], 'negative'); + message::add($text['message-access_denied'], 'negative'); header("Location: ".$_SESSION['contact_auth']['referer']); unset($_SESSION['contact_auth']); exit; diff --git a/app/contacts/contact_delete.php b/app/contacts/contact_delete.php index e1038a8229..c58a78052d 100644 --- a/app/contacts/contact_delete.php +++ b/app/contacts/contact_delete.php @@ -45,11 +45,11 @@ if (!$included) { } } -if (strlen($contact_uuid) > 0) { +if (is_uuid($contact_uuid)) { //delete addresses $sql = "delete from v_contact_addresses "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and contact_uuid = '".$contact_uuid."' "; + $sql .= "and contact_uuid = :contact_uuid "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); unset($prep_statement, $sql); @@ -106,6 +106,14 @@ if (strlen($contact_uuid) > 0) { $prep_statement->execute(); unset($prep_statement, $sql); + //delete attachments + $sql = "delete from v_contact_attachments "; + $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); + //delete contact users $sql = "delete from v_contact_users "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; @@ -132,7 +140,7 @@ if (strlen($contact_uuid) > 0) { } if (!$included) { - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contacts.php"); return; } diff --git a/app/contacts/contact_edit.php b/app/contacts/contact_edit.php index 79f76c4221..2526c79b0c 100644 --- a/app/contacts/contact_edit.php +++ b/app/contacts/contact_edit.php @@ -17,22 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('contact_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('contact_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -150,7 +154,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); $location = "contact_edit.php?id=".$contact_uuid; } //if ($action == "add") @@ -177,7 +181,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); $location = "contact_edit.php?id=".escape($contact_uuid); } //if ($action == "update") @@ -281,6 +285,16 @@ else { $users = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset($prep_statement, $sql); +//determine if contact assigned to a user + if (is_array($users) && sizeof($users) != 0) { + foreach($users as $user) { + if ($user['contact_uuid'] == $contact_uuid) { + $contact_user_uuid = $user['user_uuid']; + break; + } + } + } + //get the users assigned to this contact $sql = "SELECT u.username, u.user_uuid, a.contact_user_uuid FROM v_contacts as c, v_users as u, v_contact_users as a "; $sql .= "where c.contact_uuid = '".$contact_uuid."' "; @@ -303,8 +317,8 @@ else { } //set the mode - if (isset($_SESSION['theme']['qr_image'])) { - if (strlen($_SESSION['theme']['qr_image']) > 0) { + if (isset($_SESSION['theme']['qr_image']['text'])) { + if (strlen($_SESSION['theme']['qr_image']['text']) == 0) { $mode = '4'; } else { @@ -407,11 +421,14 @@ else { echo " \n"; } if ($action == "update" && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/invoices')) { - echo " \n"; + echo " \n"; } if ($action == "update" && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/certificates')) { echo " \n"; } + if ($action == "update" && permission_exists('user_edit') && is_uuid($contact_user_uuid)) { + echo " \n"; + } echo " \n"; echo "\n"; echo "\n"; @@ -656,12 +673,8 @@ else { echo " "; echo " "; } - echo ""; if (permission_exists('contact_group_view')) { - $contact_shared = 'true'; - echo "
\n"; - echo "\n"; echo ""; echo " "; echo " "; echo ""; - echo "
".$text['label-groups'].""; @@ -735,11 +748,8 @@ else { echo "
\n"; - echo "
"; } - echo "\n"; echo "\n"; echo "\n"; echo " "; + echo "
\n"; echo " ".$text['label-contact_note']."\n"; @@ -759,13 +769,14 @@ else { echo " \n"; echo "
"; echo "\n"; if ($action == "update") { echo "       "; - echo "\n"; + echo "\n"; //echo "

\n"; if (permission_exists('contact_phone_view')) { require "contact_phones.php"; } if (permission_exists('contact_address_view')) { require "contact_addresses.php"; } @@ -776,6 +787,7 @@ else { if (permission_exists('contact_note_view')) { require "contact_notes.php"; } if (permission_exists('contact_time_view')) { require "contact_times.php"; } if (permission_exists('contact_setting_view')) { require "contact_settings.php"; } + if (permission_exists('contact_attachment_view')) { require "contact_attachments.php"; } echo "\n"; } diff --git a/app/contacts/contact_email_delete.php b/app/contacts/contact_email_delete.php index 346b1ab563..d690699d96 100644 --- a/app/contacts/contact_email_delete.php +++ b/app/contacts/contact_email_delete.php @@ -52,7 +52,7 @@ if (strlen($id)>0) { unset($sql); } -messages::add($text['message-delete']); +message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_email_edit.php b/app/contacts/contact_email_edit.php index 4e1d149adf..604e70c968 100644 --- a/app/contacts/contact_email_edit.php +++ b/app/contacts/contact_email_edit.php @@ -133,7 +133,7 @@ if (strlen($_GET["contact_uuid"]) > 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -150,7 +150,7 @@ if (strlen($_GET["contact_uuid"]) > 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_group_delete.php b/app/contacts/contact_group_delete.php index dc9c0e6435..d722e8a8fe 100644 --- a/app/contacts/contact_group_delete.php +++ b/app/contacts/contact_group_delete.php @@ -57,7 +57,7 @@ else { //redirect the browser if (!$included) { - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; } diff --git a/app/contacts/contact_import.php b/app/contacts/contact_import.php index b0de34b49a..507a8d1339 100644 --- a/app/contacts/contact_import.php +++ b/app/contacts/contact_import.php @@ -61,6 +61,7 @@ $action = check_str($_POST["action"]); $order_by = check_str($_POST["order_by"]); $order = check_str($_POST["order"]); + $from_row = check_str($_POST["from_row"]); $delimiter = check_str($_POST["data_delimiter"]); $enclosure = check_str($_POST["data_enclosure"]); @@ -128,6 +129,13 @@ $i++; } } + $schema[$i]['table'] = 'contact_groups'; + $schema[$i]['parent'] = 'contacts'; + $schema[$i]['fields'][] = 'group_name'; + $i++; + $schema[$i]['table'] = 'contact_users'; + $schema[$i]['parent'] = 'contacts'; + $schema[$i]['fields'][] = 'username'; } //match the column names to the field names @@ -176,8 +184,12 @@ foreach($schema as $row) { echo " \n"; foreach($row['fields'] as $field) { + $selected = ''; + if ($field == $line_field) { + $selected = "selected='selected'"; + } if (substr($field, -5) != '_uuid') { - echo " \n"; + echo " \n"; } } echo " \n"; @@ -193,6 +205,7 @@ echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -237,72 +250,112 @@ //set the domain_uuid $domain_uuid = $_SESSION['domain_uuid']; + //get the groups + $sql = "select * from v_groups where domain_uuid is null "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + $groups = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + + //get the users + $sql = "select * from v_users where domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + $users = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + + //get the contents of the csv file and convert them into an array $handle = @fopen($_SESSION['file'], "r"); if ($handle) { - //set the row id + //pre-set the numbers + $row_number = 1; $row_id = 0; - + //loop through the array while (($line = fgets($handle, 4096)) !== false) { - - //format the data - $y = 0; - foreach ($fields as $key => $value) { - //get the line - $result = str_getcsv($line, $delimiter, $enclosure); - - //get the table and field name - $field_array = explode(".",$value); - $table_name = $field_array[0]; - $field_name = $field_array[1]; - //echo "value: $value
\n"; - //echo "table_name: $table_name
\n"; - //echo "field_name: $field_name
\n"; - - //get the parent table name - $parent = get_parent($schema, $table_name); - - //remove formatting from the phone number - if ($field_name == "phone_number") { - $result[$key] = preg_replace('{\D}', '', $result[$key]); - } - - //build the data array - if (strlen($table_name) > 0) { - if (strlen($parent) == 0) { - $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; - $array[$table_name][$row_id][$field_name] = $result[$key]; - } - else { - $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; - $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; - } - } - } - - //process a chunk of the array - if ($row_id === 1000) { - - //save to the data - $database = new database; - $database->app_name = 'contacts'; - $database->app_uuid = '04481e0e-a478-c559-adad-52bd4174574c'; - $database->save($array); - //$message = $database->message; - - //clear the array - unset($array); + if ($from_row <= $row_number) { + //format the data + $y = 0; + foreach ($fields as $key => $value) { + //get the line + $result = str_getcsv($line, $delimiter, $enclosure); - //set the row id back to 0 - $row_id = 0; - } - - //increment row id - $row_id++; + //get the table and field name + $field_array = explode(".",$value); + $table_name = $field_array[0]; + $field_name = $field_array[1]; + //echo "value: $value
\n"; + //echo "table_name: $table_name
\n"; + //echo "field_name: $field_name
\n"; + + //get the parent table name + $parent = get_parent($schema, $table_name); + + //remove formatting from the phone number + // if ($field_name == "phone_number") { + // $result[$key] = preg_replace('{\D}', '', $result[$key]); + // } + + //build the data array + if (strlen($table_name) > 0) { + if (strlen($parent) == 0) { + $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; + $array[$table_name][$row_id][$field_name] = $result[$key]; + } + else { + if ($field_name != "username" && $field_name != "group_name") { + $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; + $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; + } + } + + if ($field_name == "group_name") { + foreach ($groups as $field) { + if ($field['group_name'] == $result[$key]) { + //$array[$parent][$row_id]['contact_group_uuid'] = uuid(); + $array[$parent][$row_id]['contact_groups'][$y]['domain_uuid'] = $domain_uuid; + //$array['contact_groups'][$x]['contact_uuid'] = $row['contact_uuid']; + $array[$parent][$row_id]['contact_groups'][$y]['group_uuid'] = $field['group_uuid']; + } + } + } + + if ($field_name == "username") { + foreach ($users as $field) { + if ($field['username'] == $result[$key]) { + //$array[$parent][$row_id]['contact_users'][$y]['contact_group_uuid'] = uuid(); + $array[$parent][$row_id]['contact_users'][$y]['domain_uuid'] = $domain_uuid; + //$array['contact_groups'][$x]['contact_uuid'] = $row['contact_uuid']; + $array[$parent][$row_id]['contact_users'][$y]['user_uuid'] = $field['user_uuid']; + } + } + } + } //if (strlen($table_name) > 0) + } //end foreach + + //process a chunk of the array + if ($row_id === 1000) { + + //save to the data + $database = new database; + $database->app_name = 'contacts'; + $database->app_uuid = '04481e0e-a478-c559-adad-52bd4174574c'; + $database->save($array); + //$message = $database->message; + + //clear the array + unset($array); + + //set the row id back to 0 + $row_id = 0; + } + + //increment row id + $row_id++; + } //if ($from_row <= $row_number) + $row_number++; } fclose($handle); - + //debug info //echo "
\n";
 					//print_r($array);
@@ -351,16 +404,16 @@
 				foreach($results as $row) {
 					echo "\n";
 					echo "	\n";
-					echo 		$row['FirstName'] ." ".$row['LastName'];
+					echo 		escape($row['FirstName'])." ".escape($row['LastName']);
 					echo "	\n";
 					echo "	\n";
-					echo 	$row['Company']." \n";
+					echo 	escape($row['Company'])." \n";
 					echo "	\n";
 					echo "	\n";
-					echo 		$row['EmailAddress']." \n";
+					echo 		escape($row['EmailAddress'])." \n";
 					echo "	\n";
 					echo "	\n";
-					echo 		$row['Web Page']." \n";
+					echo 		escape($row['Web Page'])." \n";
 					echo "	\n";
 					echo "\n";
 				}
@@ -407,6 +460,24 @@
 	echo "\n";
 	echo "\n";
 
+	echo "\n";
+	echo "\n";
+	echo "    ".$text['label-from_row']."\n";
+	echo "\n";
+	echo "\n";
+	echo "		\n";
+	echo "
\n"; + echo $text['description-from_row']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-import_delimiter']."\n"; diff --git a/app/contacts/contact_import_google.php b/app/contacts/contact_import_google.php index 4e63df8532..c874019ce1 100644 --- a/app/contacts/contact_import_google.php +++ b/app/contacts/contact_import_google.php @@ -333,7 +333,7 @@ if ($_POST['a'] == 'import') { else { // no contacts imported - messages::add($text['message-contacts_imported']." ".$contacts_imported, 'negative'); + message::add($text['message-contacts_imported']." ".$contacts_imported, 'negative'); } } diff --git a/app/contacts/contact_note_delete.php b/app/contacts/contact_note_delete.php index d52000746c..4c2f72f538 100644 --- a/app/contacts/contact_note_delete.php +++ b/app/contacts/contact_note_delete.php @@ -52,7 +52,7 @@ if (strlen($id)>0) { unset($sql); } -messages::add($text['message-delete']); +message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_note_edit.php b/app/contacts/contact_note_edit.php index f6e505e074..51a855b68c 100644 --- a/app/contacts/contact_note_edit.php +++ b/app/contacts/contact_note_edit.php @@ -117,7 +117,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -134,7 +134,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_notes.php b/app/contacts/contact_notes.php index 6bd8985756..98476ad73a 100644 --- a/app/contacts/contact_notes.php +++ b/app/contacts/contact_notes.php @@ -46,23 +46,24 @@ echo "\n"; echo "\n"; - //get the contact list - $sql = "select * from v_contact_notes "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and contact_uuid = '$contact_uuid' "; - $sql .= "order by last_mod_date desc "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - } +//get the contact list + $sql = "select * from v_contact_notes "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and contact_uuid = '$contact_uuid' "; + $sql .= "order by last_mod_date desc "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $contact_notes = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + } +//set the row style array $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; +//show the content echo "\n"; echo "\n"; @@ -78,30 +79,31 @@ echo "
"; echo "
\n"; - if ($result_count != 0) { - foreach($result as $row) { - $contact_note = escape($row['contact_note']); + if (is_array($contact_notes)) { + foreach($contact_notes as $row) { + $contact_note = $row['contact_note']; + $contact_note = escape($contact_note); $contact_note = str_replace("\n","
",$contact_note); if (permission_exists('contact_note_add')) { - $tr_link = "href='contact_note_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_note_uuid']."'"; + $tr_link = "href='contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid'])."'"; } echo "\n"; echo " \n"; echo " \n"; echo "\n"; $c = ($c) ? 0 : 1; } //end foreach - unset($sql, $result, $row_count); + unset($sql, $contact_notes); } //end if results echo "
"; - echo "
".$row['last_mod_user'].": ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."
"; - echo $contact_note." "; + echo "
".escape($row['last_mod_user']).": ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."
"; + echo $contact_note." "; echo "
"; if (permission_exists('contact_note_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('contact_note_delete')) { - echo "$v_link_label_delete"; + echo "$v_link_label_delete"; } echo "
"; echo "\n"; diff --git a/app/contacts/contact_phone_delete.php b/app/contacts/contact_phone_delete.php index 40c5296698..5f54438eca 100644 --- a/app/contacts/contact_phone_delete.php +++ b/app/contacts/contact_phone_delete.php @@ -55,7 +55,7 @@ else { } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_phone_edit.php b/app/contacts/contact_phone_edit.php index 0f13b32aae..89d4434088 100644 --- a/app/contacts/contact_phone_edit.php +++ b/app/contacts/contact_phone_edit.php @@ -159,7 +159,7 @@ $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -182,7 +182,7 @@ $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_relation_delete.php b/app/contacts/contact_relation_delete.php index d9f31f314e..81886ad2af 100644 --- a/app/contacts/contact_relation_delete.php +++ b/app/contacts/contact_relation_delete.php @@ -53,7 +53,7 @@ if (strlen($id)>0) { unset($sql); } -messages::add($text['message-delete']); +message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_relation_edit.php b/app/contacts/contact_relation_edit.php index 80869d5350..74c2b19819 100644 --- a/app/contacts/contact_relation_edit.php +++ b/app/contacts/contact_relation_edit.php @@ -145,7 +145,7 @@ else { unset($sql); } - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -159,7 +159,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_setting_delete.php b/app/contacts/contact_setting_delete.php index 48bf4e0998..0e7fbf1e0e 100644 --- a/app/contacts/contact_setting_delete.php +++ b/app/contacts/contact_setting_delete.php @@ -56,7 +56,7 @@ else { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_setting_edit.php b/app/contacts/contact_setting_edit.php index a2bb0a1e28..86f1bc1ebb 100644 --- a/app/contacts/contact_setting_edit.php +++ b/app/contacts/contact_setting_edit.php @@ -24,16 +24,20 @@ Mark J Crane Luis Daniel Lucio Quiroz */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('contact_setting_edit') || permission_exists('contact_setting_add')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('contact_setting_edit') || permission_exists('contact_setting_add')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -162,12 +166,12 @@ else { //redirect the browser if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } - header("Location: contact_edit.php?id=".$contact_uuid); + header("Location: contact_edit.php?id=".escape($contact_uuid)); return; } //if ($_POST["persistformvar"] != "true") } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) @@ -182,14 +186,13 @@ else { $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { - $contact_setting_category = $row["contact_setting_category"]; - $contact_setting_subcategory = $row["contact_setting_subcategory"]; - $contact_setting_name = $row["contact_setting_name"]; - $contact_setting_value = $row["contact_setting_value"]; - $contact_setting_order = $row["contact_setting_order"]; - $contact_setting_enabled = $row["contact_setting_enabled"]; - $contact_setting_description = $row["contact_setting_description"]; - break; //limit to 1 row + $contact_setting_category = escape($row["contact_setting_category"]); + $contact_setting_subcategory = escape($row["contact_setting_subcategory"]); + $contact_setting_name = escape($row["contact_setting_name"]); + $contact_setting_value = escape($row["contact_setting_value"]); + $contact_setting_order = escape($row["contact_setting_order"]); + $contact_setting_enabled = escape($row["contact_setting_enabled"]); + $contact_setting_description = escape($row["contact_setting_description"]); } unset ($prep_statement); } @@ -290,13 +293,13 @@ else { while($i<=999) { $selected = ($i == $contact_setting_order) ? "selected" : null; if (strlen($i) == 1) { - echo " \n"; + echo " \n"; } if (strlen($i) == 2) { - echo " \n"; + echo " \n"; } if (strlen($i) == 3) { - echo " \n"; + echo " \n"; } $i++; } @@ -345,9 +348,9 @@ else { echo " \n"; echo " \n"; echo "
"; - echo " \n"; + echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; @@ -358,4 +361,5 @@ else { //include the footer require_once "resources/footer.php"; + ?> diff --git a/app/contacts/contact_time_delete.php b/app/contacts/contact_time_delete.php index 15004c5e76..3a688c4d74 100644 --- a/app/contacts/contact_time_delete.php +++ b/app/contacts/contact_time_delete.php @@ -56,7 +56,7 @@ else { } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_time_edit.php b/app/contacts/contact_time_edit.php index 5dfc5947ab..5c24ad4125 100644 --- a/app/contacts/contact_time_edit.php +++ b/app/contacts/contact_time_edit.php @@ -119,7 +119,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -138,7 +138,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_timer.php b/app/contacts/contact_timer.php index ed10f58821..9b93f6a224 100644 --- a/app/contacts/contact_timer.php +++ b/app/contacts/contact_timer.php @@ -302,7 +302,7 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; } $(document).ready(function(){ //ajax for refresh var refresh = 1500; - var source_url = 'contact_timer_inc.php?domain_uuid=&contact_uuid=&contact_time_uuid='; + var source_url = 'contact_timer_inc.php?domain_uuid=&contact_uuid=&contact_time_uuid='; var ajax_get = function () { $.ajax({ @@ -330,20 +330,20 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }



- +

-
00:00:00
+
00:00:00

- - - - + + + + @@ -358,4 +358,4 @@ if (!permission_exists('contact_time_add')) { echo "access denied"; exit; } - \ No newline at end of file + diff --git a/app/contacts/contact_times.php b/app/contacts/contact_times.php index fba1b474d8..04bee75e67 100644 --- a/app/contacts/contact_times.php +++ b/app/contacts/contact_times.php @@ -38,6 +38,24 @@ exit; } +//get the contact list + $sql = "select ct.*, u.username, u.domain_uuid as user_domain_uuid "; + $sql .= "from v_contact_times as ct, v_users as u "; + $sql .= "where ct.user_uuid = u.user_uuid "; + $sql .= "and ct.domain_uuid = '".$domain_uuid."' "; + $sql .= "and ct.contact_uuid = '".$contact_uuid."' "; + $sql .= "order by ct.time_start desc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $result_count = count($result); + unset ($prep_statement, $sql); + +//set the row style + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; + //show the content echo "
- +
\n"; echo "\n"; @@ -46,23 +64,6 @@ echo "\n"; echo "
\n"; - //get the contact list - $sql = "select ct.*, u.username, u.domain_uuid as user_domain_uuid "; - $sql .= "from v_contact_times as ct, v_users as u "; - $sql .= "where ct.user_uuid = u.user_uuid "; - $sql .= "and ct.domain_uuid = '".$domain_uuid."' "; - $sql .= "and ct.contact_uuid = '".$contact_uuid."' "; - $sql .= "order by ct.time_start desc "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - echo "\n"; echo "\n"; echo "\n"; @@ -103,7 +104,7 @@ echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -145,7 +145,7 @@ echo " ".$text['label-transaction_address']."\n"; echo " \n"; echo " \n"; echo " \n"; echo "
"; if (permission_exists('contact_time_edit')) { if ($row['user_uuid'] == $_SESSION["user"]["user_uuid"]) { - echo "".$v_link_label_edit.""; + echo "".$v_link_label_edit.""; } else { echo "".str_replace("list_control_icon", "list_control_icon_disabled", $v_link_label_edit).""; diff --git a/app/contacts/contact_url_delete.php b/app/contacts/contact_url_delete.php index cfd07061bf..de5a64a928 100644 --- a/app/contacts/contact_url_delete.php +++ b/app/contacts/contact_url_delete.php @@ -54,7 +54,7 @@ if (strlen($id)>0) { unset($sql); } -messages::add($text['message-delete']); +message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; diff --git a/app/contacts/contact_url_edit.php b/app/contacts/contact_url_edit.php index 176dd9c92e..479a497475 100644 --- a/app/contacts/contact_url_edit.php +++ b/app/contacts/contact_url_edit.php @@ -134,7 +134,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "add") @@ -151,7 +151,7 @@ else { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: contact_edit.php?id=".$contact_uuid); return; } //if ($action == "update") diff --git a/app/contacts/contact_urls.php b/app/contacts/contact_urls.php index 01ead503d1..8bfb24d957 100644 --- a/app/contacts/contact_urls.php +++ b/app/contacts/contact_urls.php @@ -85,7 +85,7 @@ echo " ".escape($row['url_description'])." "; if (permission_exists('contact_url_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('contact_url_delete')) { echo "$v_link_label_delete"; diff --git a/app/contacts/contact_user_delete.php b/app/contacts/contact_user_delete.php index 892364f2ac..01f7142598 100644 --- a/app/contacts/contact_user_delete.php +++ b/app/contacts/contact_user_delete.php @@ -57,7 +57,7 @@ else { //redirect the browser if (!$included) { - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: contact_edit.php?id=".$contact_uuid); return; } diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php index 6be9b884af..a4ad2c5ef0 100644 --- a/app/contacts/contacts.php +++ b/app/contacts/contacts.php @@ -178,7 +178,7 @@ $offset = $rows_per_page * $page; //get the list - $sql = str_replace('count(*) as num_rows', '*', $sql); + $sql = str_replace('count(*) as num_rows', '*, (select a.contact_attachment_uuid from v_contact_attachments as a where a.contact_uuid = c.contact_uuid and a.attachment_primary = 1) as contact_attachment_uuid', $sql); if (strlen($order_by) > 0) { $sql .= "order by ".$order_by." ".$order." "; } @@ -194,11 +194,30 @@ $contacts = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); +//styles + echo "\n"; + +//ticket attachment layer + echo "\n"; + //show the content echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo th_order_by('contact_type', $text['label-contact_type'], $order_by, $order); echo th_order_by('contact_organization', $text['label-contact_organization'], $order_by, $order); + echo "\n"; echo th_order_by('contact_name_given', $text['label-contact_name_given'], $order_by, $order); echo th_order_by('contact_name_family', $text['label-contact_name_family'], $order_by, $order); echo th_order_by('contact_nickname', $text['label-contact_nickname'], $order_by, $order); @@ -247,6 +267,11 @@ echo "\n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -285,6 +310,17 @@ echo ""; +//javascript + echo "\n"; + //include the footer require_once "resources/footer.php"; diff --git a/app/database_transactions/database_transaction_delete.php b/app/database_transactions/database_transaction_delete.php index 0677c0a531..e2701e243c 100644 --- a/app/database_transactions/database_transaction_delete.php +++ b/app/database_transactions/database_transaction_delete.php @@ -58,7 +58,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: database_transactions.php'); ?> \ No newline at end of file diff --git a/app/database_transactions/database_transaction_edit.php b/app/database_transactions/database_transaction_edit.php index d31a7cbf9d..d82c514fb3 100644 --- a/app/database_transactions/database_transaction_edit.php +++ b/app/database_transactions/database_transaction_edit.php @@ -124,7 +124,7 @@ echo " ".$text['label-user_uuid']."\n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; - echo " ".$text['header-contacts']."\n"; + echo " ".$text['header-contacts']." (".$num_rows.")\n"; echo "

"; echo "
\n"; @@ -230,6 +249,7 @@ echo "
 
".ucwords(escape($row['contact_type']))." ".escape($row['contact_organization'])." ".escape($row['contact_name_given'])." ".escape($row['contact_name_family'])." ".escape($row['contact_nickname'])." \n"; - echo " ".$username."\n"; + echo " ".escape($username)."\n"; echo "
\n"; @@ -137,7 +137,7 @@ echo " ".$text['label-transaction_code']."\n"; echo " \n"; echo "
\n"; - echo " $transaction_code\n"; + echo " ".escape($transaction_code)."\n"; echo "
\n"; - echo " $transaction_address\n"; + echo " ".escape($transaction_address)."\n"; echo "
\n"; @@ -158,7 +158,7 @@ echo " ".$text['label-transaction_type']."\n"; echo " \n"; echo " \n"; - echo " $transaction_type\n"; + echo " ".escape($transaction_type)."\n"; echo " \n"; echo " \n"; echo " \n"; @@ -166,7 +166,7 @@ echo " ".$text['label-domain']."\n"; echo " \n"; echo " \n"; - echo " ".$domain_name; + echo " ".escape($domain_name); echo " \n"; echo " \n"; echo " \n"; @@ -182,7 +182,7 @@ echo " ".$text['label-transaction_old']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo "\n"; @@ -191,7 +191,7 @@ echo " ".$text['label-transaction_new']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo "\n"; @@ -200,7 +200,7 @@ echo " ".$text['label-transaction_result']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo "\n"; echo ""; diff --git a/app/database_transactions/database_transactions.php b/app/database_transactions/database_transactions.php index 2bcf42e4e2..51592c0487 100644 --- a/app/database_transactions/database_transactions.php +++ b/app/database_transactions/database_transactions.php @@ -118,7 +118,7 @@ echo " ".$text['title-database_transactions']."\n"; echo "
\n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "
\n"; @@ -145,25 +145,25 @@ if (is_array($result)) { foreach($result as $row) { if (permission_exists('database_transaction_edit')) { - $tr_link = "href='database_transaction_edit.php?id=".$row['database_transaction_uuid']."'"; + $tr_link = "href='database_transaction_edit.php?id=".escape($row['database_transaction_uuid'])."'"; } echo "\n"; - echo " ".$row['domain_name']." \n"; - echo " ".$row['username']." \n"; - echo " ".$row['app_name']." \n"; - echo " ".$row['transaction_code']." \n"; - echo " ".$row['transaction_address']." \n"; - echo " ".$row['transaction_type']." \n"; - echo " ".$row['transaction_date']." \n"; - //echo " ".$row['transaction_old']." \n"; - //echo " ".$row['transaction_new']." \n"; - //echo " ".$row['transaction_result']." \n"; + echo " ".escape($row['domain_name'])." \n"; + echo " ".escape($row['username'])." \n"; + echo " ".escape($row['app_name'])." \n"; + echo " ".escape($row['transaction_code'])." \n"; + echo " ".escape($row['transaction_address'])." \n"; + echo " ".escape($row['transaction_type'])." \n"; + echo " ".escape($row['transaction_date'])." \n"; + //echo " ".escape($row['transaction_old']." \n"; + //echo " ".escape($row['transaction_new']." \n"; + //echo " ".escape($row['transaction_result']." \n"; echo " "; if (permission_exists('database_transaction_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } //if (permission_exists('database_transaction_delete')) { - // echo "$v_link_label_delete"; + // echo "$v_link_label_delete"; //} echo " \n"; echo "\n"; diff --git a/app/destinations/app_config.php b/app/destinations/app_config.php index f4c72f180e..e2f5a8ae17 100644 --- a/app/destinations/app_config.php +++ b/app/destinations/app_config.php @@ -67,6 +67,9 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "destination_import"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "destination_domain"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; @@ -81,6 +84,12 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "destination_fax"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "destination_caller_id_name"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "destination_caller_id_number"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //default settings $y = 0; @@ -147,6 +156,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the number."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_prefix"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the prefix."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_number_regex"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Regular Expression version of destination number"; @@ -175,6 +188,18 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the accountcode."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_voice"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for voice calls."; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_fax"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for fax calls."; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_type_text"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for text messages."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "destination_app"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the application."; diff --git a/app/destinations/app_languages.php b/app/destinations/app_languages.php index ddd96df772..7b53f4d886 100644 --- a/app/destinations/app_languages.php +++ b/app/destinations/app_languages.php @@ -381,26 +381,6 @@ $text['label-domain']['ru-ru'] = "Домен"; $text['label-domain']['sv-se'] = "Domän"; $text['label-domain']['uk-ua'] = "Домен"; -$text['label-detail_action']['en-us'] = "Actions"; -$text['label-detail_action']['ar-eg'] = "الأفعال"; -$text['label-detail_action']['de-at'] = "Aktionen"; //copied from de-de -$text['label-detail_action']['de-ch'] = "Aktionen"; //copied from de-de -$text['label-detail_action']['de-de'] = "Aktionen"; -$text['label-detail_action']['es-cl'] = "Accións"; -$text['label-detail_action']['es-mx'] = "Accións"; //copied from es-cl -$text['label-detail_action']['fr-ca'] = "Actions"; //copied from fr-fr -$text['label-detail_action']['fr-fr'] = "Actions"; -$text['label-detail_action']['he-il'] = "פעולות"; -$text['label-detail_action']['it-it'] = "Azioni"; -$text['label-detail_action']['nl-nl'] = ""; -$text['label-detail_action']['pl-pl'] = "Operacje (gdzie przesłać rozmowę)."; -$text['label-detail_action']['pt-br'] = "Ações"; //copied from pt-pt -$text['label-detail_action']['pt-pt'] = "Ações"; -$text['label-detail_action']['ro-ro'] = ""; -$text['label-detail_action']['ru-ru'] = "Действия"; -$text['label-detail_action']['sv-se'] = "Åtgärder"; -$text['label-detail_action']['uk-ua'] = "Дії"; - $text['label-destination_type']['en-us'] = "Type"; $text['label-destination_type']['ar-eg'] = "النوع"; $text['label-destination_type']['de-at'] = "Art"; //copied from de-de @@ -441,6 +421,26 @@ $text['label-destination_number']['ru-ru'] = "Направление"; $text['label-destination_number']['sv-se'] = "Destination"; $text['label-destination_number']['uk-ua'] = "Номер"; +$text['label-destination_prefix']['en-us'] = "Prefix"; +$text['label-destination_prefix']['ar-eg'] = ""; +$text['label-destination_prefix']['de-at'] = ""; //copied from de-de +$text['label-destination_prefix']['de-ch'] = ""; //copied from de-de +$text['label-destination_prefix']['de-de'] = ""; +$text['label-destination_prefix']['es-cl'] = ""; +$text['label-destination_prefix']['es-mx'] = ""; //copied from es-cl +$text['label-destination_prefix']['fr-ca'] = ""; //copied from fr-fr +$text['label-destination_prefix']['fr-fr'] = ""; +$text['label-destination_prefix']['he-il'] = ""; +$text['label-destination_prefix']['it-it'] = ""; +$text['label-destination_prefix']['nl-nl'] = ""; +$text['label-destination_prefix']['pl-pl'] = ""; +$text['label-destination_prefix']['pt-br'] = ""; //copied from pt-pt +$text['label-destination_prefix']['pt-pt'] = ""; +$text['label-destination_prefix']['ro-ro'] = ""; +$text['label-destination_prefix']['ru-ru'] = ""; +$text['label-destination_prefix']['sv-se'] = ""; +$text['label-destination_prefix']['uk-ua'] = ""; + $text['label-destination_enabled']['en-us'] = "Enabled"; $text['label-destination_enabled']['ar-eg'] = "مفعل"; $text['label-destination_enabled']['de-at'] = "Aktiviert"; //copied from de-de @@ -621,6 +621,106 @@ $text['label-account_code']['ru-ru'] = "Код Учетной Записи"; $text['label-account_code']['sv-se'] = "Account Code"; $text['label-account_code']['uk-ua'] = "Код облікового запису"; +$text['label-detail_action']['en-us'] = "Actions"; +$text['label-detail_action']['ar-eg'] = "الأفعال"; +$text['label-detail_action']['de-at'] = "Aktionen"; //copied from de-de +$text['label-detail_action']['de-ch'] = "Aktionen"; //copied from de-de +$text['label-detail_action']['de-de'] = "Aktionen"; +$text['label-detail_action']['es-cl'] = "Accións"; +$text['label-detail_action']['es-mx'] = "Accións"; //copied from es-cl +$text['label-detail_action']['fr-ca'] = "Actions"; //copied from fr-fr +$text['label-detail_action']['fr-fr'] = "Actions"; +$text['label-detail_action']['he-il'] = "פעולות"; +$text['label-detail_action']['it-it'] = "Azioni"; +$text['label-detail_action']['nl-nl'] = ""; +$text['label-detail_action']['pl-pl'] = "Operacje (gdzie przesłać rozmowę)."; +$text['label-detail_action']['pt-br'] = "Ações"; //copied from pt-pt +$text['label-detail_action']['pt-pt'] = "Ações"; +$text['label-detail_action']['ro-ro'] = ""; +$text['label-detail_action']['ru-ru'] = "Действия"; +$text['label-detail_action']['sv-se'] = "Åtgärder"; +$text['label-detail_action']['uk-ua'] = "Дії"; + +$text['label-usage']['en-us'] = "Usage"; +$text['label-usage']['ar-eg'] = ""; +$text['label-usage']['de-at'] = ""; +$text['label-usage']['de-ch'] = ""; +$text['label-usage']['de-de'] = ""; +$text['label-usage']['es-cl'] = ""; +$text['label-usage']['es-mx'] = ""; +$text['label-usage']['fr-ca'] = ""; +$text['label-usage']['fr-fr'] = ""; +$text['label-usage']['he-il'] = ""; +$text['label-usage']['it-it'] = ""; +$text['label-usage']['nl-nl'] = ""; +$text['label-usage']['pl-pl'] = ""; +$text['label-usage']['pt-br'] = ""; +$text['label-usage']['pt-pt'] = ""; +$text['label-usage']['ro-ro'] = ""; +$text['label-usage']['ru-ru'] = ""; +$text['label-usage']['sv-se'] = ""; +$text['label-usage']['uk-ua'] = ""; + +$text['label-voice']['en-us'] = "Voice"; +$text['label-voice']['ar-eg'] = ""; +$text['label-voice']['de-at'] = "Sprache"; //copied from de-de +$text['label-voice']['de-ch'] = "Sprache"; //copied from de-de +$text['label-voice']['de-de'] = "Sprache"; +$text['label-voice']['es-cl'] = "Voz"; +$text['label-voice']['es-mx'] = "Voz"; //copied from es-cl +$text['label-voice']['fr-ca'] = "Voix"; //copied from fr-fr +$text['label-voice']['fr-fr'] = "Voix"; +$text['label-voice']['he-il'] = "שיחה"; +$text['label-voice']['it-it'] = "Voce"; +$text['label-voice']['nl-nl'] = ""; +$text['label-voice']['pl-pl'] = "Głos"; +$text['label-voice']['pt-br'] = "Voz"; //copied from pt-pt +$text['label-voice']['pt-pt'] = "Voz"; +$text['label-voice']['ro-ro'] = ""; +$text['label-voice']['ru-ru'] = "Голос"; +$text['label-voice']['sv-se'] = "Röst"; +$text['label-voice']['uk-ua'] = "Голос"; + +$text['label-fax']['en-us'] = "Fax"; +$text['label-fax']['ar-eg'] = ""; +$text['label-fax']['de-at'] = "Fax"; //copied from de-de +$text['label-fax']['de-ch'] = "Fax"; //copied from de-de +$text['label-fax']['de-de'] = "Fax"; +$text['label-fax']['es-cl'] = "Facsímil"; +$text['label-fax']['es-mx'] = "Facsímil"; //copied from es-cl +$text['label-fax']['fr-ca'] = "Télécopie"; //copied from fr-fr +$text['label-fax']['fr-fr'] = "Télécopie"; +$text['label-fax']['he-il'] = "פקס"; +$text['label-fax']['it-it'] = "Fax"; +$text['label-fax']['nl-nl'] = ""; +$text['label-fax']['pl-pl'] = "Faks"; +$text['label-fax']['pt-br'] = "FAX"; +$text['label-fax']['pt-pt'] = "Fax"; +$text['label-fax']['ro-ro'] = ""; +$text['label-fax']['ru-ru'] = "Факс"; +$text['label-fax']['sv-se'] = "Fax"; +$text['label-fax']['uk-ua'] = "Факс"; + +$text['label-text']['en-us'] = "Text"; +$text['label-text']['ar-eg'] = ""; +$text['label-text']['de-at'] = "Text"; //copied from de-de +$text['label-text']['de-ch'] = "Text"; //copied from de-de +$text['label-text']['de-de'] = "Text"; +$text['label-text']['es-cl'] = "Texto"; +$text['label-text']['es-mx'] = "Texto"; //copied from es-cl +$text['label-text']['fr-ca'] = "Texte"; //copied from fr-fr +$text['label-text']['fr-fr'] = "Texte"; +$text['label-text']['he-il'] = "טקסט"; +$text['label-text']['it-it'] = "Testo"; +$text['label-text']['nl-nl'] = ""; +$text['label-text']['pl-pl'] = "Tekst"; +$text['label-text']['pt-br'] = "Texto"; //copied from pt-pt +$text['label-text']['pt-pt'] = "Texto"; +$text['label-text']['ro-ro'] = ""; +$text['label-text']['ru-ru'] = "Текст"; +$text['label-text']['sv-se'] = "Text"; +$text['label-text']['uk-ua'] = "Текст"; + $text['header-destinations']['en-us'] = "Destinations"; $text['header-destinations']['ar-eg'] = "جهات الأتصال"; $text['header-destinations']['de-at'] = "Ziele"; //copied from de-de @@ -841,6 +941,26 @@ $text['description-destination_number']['ru-ru'] = "Введите номер н $text['description-destination_number']['sv-se'] = "Ange destinationen."; $text['description-destination_number']['uk-ua'] = "Введіть номер"; +$text['description-destination_prefix']['en-us'] = "Enter the destination prefix."; +$text['description-destination_prefix']['ar-eg'] = ""; +$text['description-destination_prefix']['de-at'] = ""; //copied from de-de +$text['description-destination_prefix']['de-ch'] = ""; //copied from de-de +$text['description-destination_prefix']['de-de'] = ""; +$text['description-destination_prefix']['es-cl'] = ""; +$text['description-destination_prefix']['es-mx'] = ""; //copied from es-cl +$text['description-destination_prefix']['fr-ca'] = ""; //copied from fr-fr +$text['description-destination_prefix']['fr-fr'] = ""; +$text['description-destination_prefix']['he-il'] = ""; +$text['description-destination_prefix']['it-it'] = ""; +$text['description-destination_prefix']['nl-nl'] = ""; +$text['description-destination_prefix']['pl-pl'] = ""; +$text['description-destination_prefix']['pt-br'] = ""; +$text['description-destination_prefix']['pt-pt'] = ""; +$text['description-destination_prefix']['ro-ro'] = ""; +$text['description-destination_prefix']['ru-ru'] = ""; +$text['description-destination_prefix']['sv-se'] = ""; +$text['description-destination_prefix']['uk-ua'] = ""; + $text['description-destination_enabled']['en-us'] = "Set the current status of this destination."; $text['description-destination_enabled']['ar-eg'] = ""; $text['description-destination_enabled']['de-at'] = "Setzen Sie den derzeitigen Status des Ziels."; //copied from de-de @@ -981,6 +1101,26 @@ $text['description-carrier']['ru-ru'] = "Введите имя оператор $text['description-carrier']['sv-se'] = "Ange operatörens namn. Detta används för att hålla reda på debitering."; $text['description-carrier']['uk-ua'] = "Введіть назву оператора. Використовується для тарифікації"; +$text['description-destination_record']['en-us'] = "Save the recording."; +$text['description-destination_record']['ar-eg'] = ""; +$text['description-destination_record']['de-at'] = "Aufnahme speichern."; +$text['description-destination_record']['de-ch'] = "Aufnahme speichern."; //copied from de-de +$text['description-destination_record']['de-de'] = "Aufnahme speichern."; +$text['description-destination_record']['es-cl'] = "Guardar la grabación."; +$text['description-destination_record']['es-mx'] = "Guardar la grabación."; //copied from es-cl +$text['description-destination_record']['fr-ca'] = "Sauvegarder l'enregistrement."; //copied from fr-fr +$text['description-destination_record']['fr-fr'] = "Sauvegarder l'enregistrement."; +$text['description-destination_record']['he-il'] = ""; +$text['description-destination_record']['it-it'] = ""; +$text['description-destination_record']['nl-nl'] = ""; +$text['description-destination_record']['pl-pl'] = "Zachowaj nagranie"; +$text['description-destination_record']['pt-br'] = "Salva a gravação."; +$text['description-destination_record']['pt-pt'] = "Salve a gravação."; +$text['description-destination_record']['ro-ro'] = ""; +$text['description-destination_record']['ru-ru'] = "Сохранить запись."; +$text['description-destination_record']['sv-se'] = "Spara inspelningen."; +$text['description-destination_record']['uk-ua'] = ""; + $text['description-account_code']['en-us'] = "Enter account code."; $text['description-account_code']['ar-eg'] = ""; $text['description-account_code']['de-at'] = "Geben Sie einen Kontoschlüssel an."; //copied from de-de @@ -1001,6 +1141,26 @@ $text['description-account_code']['ru-ru'] = "Введите код учетно $text['description-account_code']['sv-se'] = "Ange 'account code'."; $text['description-account_code']['uk-ua'] = "Введіть код облікового запису"; +$text['description-usage']['en-us'] = "Set how the Destination will be used."; +$text['description-usage']['ar-eg'] = ""; +$text['description-usage']['de-at'] = ""; +$text['description-usage']['de-ch'] = ""; +$text['description-usage']['de-de'] = ""; +$text['description-usage']['es-cl'] = ""; +$text['description-usage']['es-mx'] = ""; +$text['description-usage']['fr-ca'] = ""; +$text['description-usage']['fr-fr'] = ""; +$text['description-usage']['he-il'] = ""; +$text['description-usage']['it-it'] = ""; +$text['description-usage']['nl-nl'] = ""; +$text['description-usage']['pl-pl'] = ""; +$text['description-usage']['pt-br'] = ""; +$text['description-usage']['pt-pt'] = ""; +$text['description-usage']['ro-ro'] = ""; +$text['description-usage']['ru-ru'] = ""; +$text['description-usage']['sv-se'] = ""; +$text['description-usage']['uk-ua'] = ""; + $text['billing-warning']['en-us'] = "If you are using fusionpbx billing application, make sure to add accountcode and carrier variables."; $text['billing-warning']['ar-eg'] = ""; $text['billing-warning']['de-at'] = "Wenn Sie die Fusionpbx Abrechnung verwenden, stellen Sie sicher, dass Account-Code und Betreiber-Variablen gesetzt sind."; //copied from de-de diff --git a/app/destinations/destination_delete.php b/app/destinations/destination_delete.php index 43324fec5c..56d43e4546 100644 --- a/app/destinations/destination_delete.php +++ b/app/destinations/destination_delete.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2017 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -53,11 +53,6 @@ exit; } -//add the dialplan permission - $permission = "dialplan_delete"; - $p = new permissions; - $p->add($permission, 'temp'); - //get the dialplan uuid and context $sql = "select * from v_destinations "; $sql .= "where destination_uuid = '$id' "; @@ -73,36 +68,26 @@ } unset ($prep_statement); +//add the dialplan permission + $p = new permissions; + $p->add('dialplan_delete', 'temp'); + $p->add('dialplan_detail_delete', 'temp'); + +//delete the destination and related dialplan + if (isset($dialplan_uuid) && is_uuid($dialplan_uuid)) { + $array['dialplans'][]['dialplan_uuid'] = $dialplan_uuid; + $array['dialplan_details'][]['dialplan_uuid'] = $dialplan_uuid; + } + $array['destinations'][]['destination_uuid'] = $id; + $database = new database; + $database->app_name = 'destinations'; + $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + $database->delete($array); + $message = $database->message; + //remove the temporary permission - $p->delete($permission, 'temp'); - -//start the atomic transaction - $db->beginTransaction(); - -//delete the dialplan - if (isset($dialplan_uuid)) { - $sql = "delete from v_dialplan_details "; - $sql .= "where dialplan_uuid = '".$dialplan_uuid."' "; - //echo $sql."
\n"; - $db->exec(check_sql($sql)); - unset($sql); - - $sql = "delete from v_dialplans "; - $sql .= "where dialplan_uuid = '".$dialplan_uuid."' "; - //echo $sql."
\n"; - $db->exec(check_sql($sql)); - unset($sql); - } - -//delete the destination - $sql = "delete from v_destinations "; - $sql .= "where destination_uuid = '".$id."' "; - //echo $sql."
\n"; - $db->exec(check_sql($sql)); - unset($sql); - -//commit the atomic transaction - $db->commit(); + $p->delete('dialplan_delete', 'temp'); + $p->delete('dialplan_detail_delete', 'temp'); //synchronize the xml config save_dialplan_xml(); @@ -112,7 +97,7 @@ $cache->delete("dialplan:".$destination_context); //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: destinations.php"); return; diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index c21f403e71..1476a29629 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -45,7 +45,7 @@ //action add or update if (isset($_REQUEST["id"])) { $action = "update"; - $destination_uuid = check_str($_REQUEST["id"]); + $destination_uuid = trim($_REQUEST["id"]); } else { $action = "add"; @@ -78,7 +78,7 @@ } unset($prep_statement, $row); if ($total_destinations >= $_SESSION['limit']['destinations']['numeric']) { - messages::add($text['message-maximum_destinations'].' '.$_SESSION['limit']['destinations']['numeric'], 'negative'); + message::add($text['message-maximum_destinations'].' '.$_SESSION['limit']['destinations']['numeric'], 'negative'); header('Location: destinations.php'); return; } @@ -88,29 +88,32 @@ //get http post variables and set them to php variables if (count($_POST) > 0) { - //set the variables - $dialplan_uuid = check_str($_POST["dialplan_uuid"]); - $domain_uuid = check_str($_POST["domain_uuid"]); - $destination_type = check_str($_POST["destination_type"]); - $destination_number = check_str($_POST["destination_number"]); - $db_destination_number = check_str($_POST["db_destination_number"]); - $destination_caller_id_name = check_str($_POST["destination_caller_id_name"]); - $destination_caller_id_number = check_str($_POST["destination_caller_id_number"]); - $destination_cid_name_prefix = check_str($_POST["destination_cid_name_prefix"]); - $destination_context = check_str($_POST["destination_context"]); - $fax_uuid = check_str($_POST["fax_uuid"]); - $destination_enabled = check_str($_POST["destination_enabled"]); - $destination_description = check_str($_POST["destination_description"]); + $dialplan_uuid = trim($_POST["dialplan_uuid"]); + $domain_uuid = trim($_POST["domain_uuid"]); + $destination_type = trim($_POST["destination_type"]); + $destination_number = trim($_POST["destination_number"]); + $destination_prefix = trim($_POST["destination_prefix"]); + $db_destination_number = trim($_POST["db_destination_number"]); + $destination_caller_id_name = trim($_POST["destination_caller_id_name"]); + $destination_caller_id_number = trim($_POST["destination_caller_id_number"]); + $destination_cid_name_prefix = trim($_POST["destination_cid_name_prefix"]); + $destination_context = trim($_POST["destination_context"]); + $fax_uuid = trim($_POST["fax_uuid"]); + $destination_enabled = trim($_POST["destination_enabled"]); + $destination_description = trim($_POST["destination_description"]); $destination_sell = check_float($_POST["destination_sell"]); - $currency = check_str($_POST["currency"]); + $currency = trim($_POST["currency"]); $destination_buy = check_float($_POST["destination_buy"]); - $currency_buy = check_str($_POST["currency_buy"]); - $destination_record = check_str($_POST["destination_record"]); - $destination_accountcode = check_str($_POST["destination_accountcode"]); - $destination_carrier = check_str($_POST["destination_carrier"]); + $currency_buy = trim($_POST["currency_buy"]); + $destination_record = trim($_POST["destination_record"]); + $destination_accountcode = trim($_POST["destination_accountcode"]); + $destination_type_voice = check_str($_POST["destination_type_voice"]); + $destination_type_fax = check_str($_POST["destination_type_fax"]); + $destination_type_text = check_str($_POST["destination_type_text"]); + $destination_carrier = trim($_POST["destination_carrier"]); //convert the number to a regular expression - $destination_number_regex = string_to_regex($destination_number); + $destination_number_regex = string_to_regex($destination_number, $destination_prefix); $_POST["destination_number_regex"] = $destination_number_regex; //get the destination app and data $destination_array = explode(":", $_POST["destination_action"], 2); @@ -131,12 +134,12 @@ unset($_POST["db_destination_number"]); } -//process the http post +//process the http post if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //get the uuid if ($action == "update" && isset($_POST["destination_uuid"])) { - $destination_uuid = check_str($_POST["destination_uuid"]); + $destination_uuid = trim($_POST["destination_uuid"]); } else { $destination_uuid = uuid(); @@ -191,9 +194,6 @@ //get the array $dialplan_details = $_POST["dialplan_details"]; - //remove the array from the HTTP POST - unset($_POST["dialplan_details"]); - //array cleanup foreach ($dialplan_details as $index => $row) { //unset the empty row @@ -290,6 +290,7 @@ $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; + $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; } $dialplan["dialplan_xml"] .= " \n"; @@ -432,6 +433,17 @@ //increment the dialplan detail order $dialplan_detail_order = $dialplan_detail_order + 10; + // answer + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "answer"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = ""; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + // execute on tone detect $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; @@ -542,8 +554,8 @@ $dialplan_detail_order = $dialplan_detail_order + 10; //set the destination app and data - $_POST["destination_app"] = $dialplan_detail_type; - $_POST["destination_data"] = $dialplan_detail_data; + $destination_app = $dialplan_detail_type; + $destination_data = $dialplan_detail_data; //increment the array id $y++; @@ -564,19 +576,32 @@ //remove empty dialplan details from the POST array unset($_POST["dialplan_details"]); - - //make sure the dialplan_uuid is set - if(strlen($_POST["dialplan_uuid"]) == 0) { - $_POST["dialplan_uuid"] = $dialplan_uuid; - } } //build the destination array - $destination = $_POST; + $destination["domain_uuid"] = $domain_uuid; $destination["destination_uuid"] = $destination_uuid; - if ($destination_type == 'inbound' || $destination_type == 'local') { - $destination["dialplan_uuid"] = $dialplan_uuid; - } + $destination["dialplan_uuid"] = $dialplan_uuid; + $destination["fax_uuid"] = $fax_uuid; + $destination["destination_type"] = $destination_type; + $destination["destination_number"] = $destination_number; + $destination["destination_number_regex"] = $destination_number_regex; + $destination["destination_prefix"] = $destination_prefix; + $destination["destination_caller_id_name"] = $destination_caller_id_name; + $destination["destination_caller_id_number"] = $destination_caller_id_number; + $destination["destination_cid_name_prefix"] = $destination_cid_name_prefix; + $destination["destination_context"] = $destination_context; + $destination["destination_record"] = $destination_record; + $destination["destination_accountcode"] = $destination_accountcode; + $destination["destination_type_voice"] = $destination_type_voice ? 1 : null; + $destination["destination_type_fax"] = $destination_type_fax ? 1 : null; + $destination["destination_type_text"] = $destination_type_text ? 1 : null; + $destination["destination_app"] = $destination_app; + $destination["destination_data"] = $destination_data; + $destination["destination_alternate_app"] = $destination_alternate_app; + $destination["destination_alternate_data"] = $destination_alternate_data; + $destination["destination_enabled"] = $destination_enabled; + $destination["destination_description"] = $destination_description; //prepare the array $array['destinations'][] = $destination; @@ -627,12 +652,13 @@ //prepare the array $array['destinations'][0]["destination_uuid"] = $destination_uuid; - $array['destinations'][0]["domain_uuid"] = $_POST["domain_uuid"]; - $array['destinations'][0]["destination_type"] = $_POST["destination_type"]; - $array['destinations'][0]["destination_number"] = $_POST["destination_number"]; - $array['destinations'][0]["destination_context"] = $_POST["destination_context"]; - $array['destinations'][0]["destination_enabled"] = $_POST["destination_enabled"]; - $array['destinations'][0]["destination_description"] = $_POST["destination_description"]; + $array['destinations'][0]["domain_uuid"] = $domain_uuid; + $array['destinations'][0]["destination_type"] = $destination_type; + $array['destinations'][0]["destination_number"] = $destination_number; + $array['destinations'][0]["destination_prefix"] = $destination_prefix; + $array['destinations'][0]["destination_context"] = $destination_context; + $array['destinations'][0]["destination_enabled"] = $destination_enabled; + $array['destinations'][0]["destination_description"] = $destination_description; //save the destination $database = new database; @@ -644,10 +670,10 @@ //redirect the user if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } header("Location: destination_edit.php?id=".escape($destination_uuid)."&type=".$destination_type); return; @@ -674,11 +700,15 @@ $dialplan_uuid = $row["dialplan_uuid"]; $destination_type = $row["destination_type"]; $destination_number = $row["destination_number"]; + $destination_prefix = $row["destination_prefix"]; $destination_caller_id_name = $row["destination_caller_id_name"]; $destination_caller_id_number = $row["destination_caller_id_number"]; $destination_cid_name_prefix = $row["destination_cid_name_prefix"]; $destination_record = $row["destination_record"]; $destination_accountcode = $row["destination_accountcode"]; + $destination_type_voice = $row["destination_type_voice"]; + $destination_type_fax = $row["destination_type_fax"]; + $destination_type_text = $row["destination_type_text"]; $destination_context = $row["destination_context"]; $destination_app = $row["destination_app"]; $destination_data = $row["destination_data"]; @@ -728,6 +758,9 @@ if ($row['dialplan_detail_type'] == "tone_detect") { unset($dialplan_details[$x]); } + if ($row['dialplan_detail_type'] == "answer") { + unset($dialplan_details[$x]); + } if ($row['dialplan_detail_type'] == "sleep") { unset($dialplan_details[$x]); } @@ -854,6 +887,17 @@ echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-destination_prefix']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_prefix']."\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo " ".$text['label-destination_number']."\n"; @@ -865,7 +909,7 @@ echo "\n"; echo "\n"; - if (permission_exists('outbound_caller_id_select')) { + if (permission_exists('destination_caller_id_name')) { echo "\n"; echo "\n"; echo " ".$text['label-destination_caller_id_name']."\n"; @@ -876,7 +920,9 @@ echo $text['description-destination_caller_id_name']."\n"; echo "\n"; echo "\n"; + } + if (permission_exists('destination_caller_id_number')) { echo "\n"; echo "\n"; echo " ".$text['label-destination_caller_id_number']."\n"; @@ -1034,6 +1080,19 @@ echo $text['description-account_code']."\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-usage']."\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "  \n"; + echo " \n"; + echo "
\n"; + echo $text['description-usage']."\n"; + echo "\n"; + echo "\n"; + if (permission_exists('destination_domain')) { echo "\n"; echo "\n"; diff --git a/app/destinations/destination_imports.php b/app/destinations/destination_imports.php new file mode 100644 index 0000000000..cc773e3077 --- /dev/null +++ b/app/destinations/destination_imports.php @@ -0,0 +1,1030 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 - 2019 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('destination_import')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher + if(!function_exists('str_getcsv')) { + function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") { + $fp = fopen("php://memory", 'r+'); + fputs($fp, $input); + rewind($fp); + $data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0 + fclose($fp); + return $data; + } + } + +//set the max php execution time + ini_set(max_execution_time,7200); + +//get the http get values and set them as php variables + $action = check_str($_POST["action"]); + $order_by = check_str($_POST["order_by"]); + $order = check_str($_POST["order"]); + $from_row = check_str($_POST["from_row"]); + $delimiter = check_str($_POST["data_delimiter"]); + $enclosure = check_str($_POST["data_enclosure"]); + $destination_type = check_str($_POST["destination_type"]); + $destination_action = check_str($_POST["destination_action"]); + $destination_context = check_str($_POST["destination_context"]); + $destination_record = check_str($_POST["destination_record"]); + +//set the defaults + if (strlen($destination_type) == 0) { $destination_type = 'inbound'; } + if (strlen($destination_context) == 0) { $destination_context = 'public'; } + if ($destination_type =="outbound" && $destination_context == "public") { $destination_context = $_SESSION['domain_name']; } + if ($destination_type =="outbound" && strlen($destination_context) == 0) { $destination_context = $_SESSION['domain_name']; } + +//save the data to the csv file + if (isset($_POST['data'])) { + $file = $_SESSION['server']['temp']['dir']."/destinations-".$_SESSION['domain_name'].".csv"; + file_put_contents($file, $_POST['data']); + $_SESSION['file'] = $file; + } + +//copy the csv file + //$_POST['submit'] == "Upload" && + if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('destination_upload')) { + if (check_str($_POST['type']) == 'csv') { + move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']); + $save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']); + //system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*'); + unset($_POST['txtCommand']); + $file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']; + $_SESSION['file'] = $file; + } + } + +//get the schema + if (strlen($delimiter) > 0) { + //get the first line + $line = fgets(fopen($_SESSION['file'], 'r')); + $line_fields = explode($delimiter, $line); + + //get the schema + $x = 0; + include ("app/destinations/app_config.php"); + $i = 0; + foreach($apps[0]['db'] as $table) { + //get the table name and parent name + $table_name = $table["table"]['name']; + $parent_name = $table["table"]['parent']; + + //remove the v_ table prefix + if (substr($table_name, 0, 2) == 'v_') { + $table_name = substr($table_name, 2); + } + if (substr($parent_name, 0, 2) == 'v_') { + $parent_name = substr($parent_name, 2); + } + + //filter for specific tables and build the schema array + if ($table_name == "destinations") { + $schema[$i]['table'] = $table_name; + $schema[$i]['parent'] = $parent_name; + foreach($table['fields'] as $row) { + if ($row['deprecated'] !== 'true') { + if (is_array($row['name'])) { + $field_name = $row['name']['text']; + } + else { + $field_name = $row['name']; + } + $schema[$i]['fields'][] = $field_name; + } + } + $i++; + } + } + } + +//get the parent table + function get_parent($schema,$table_name) { + foreach ($schema as $row) { + if ($row['table'] == $table_name) { + return $row['parent']; + } + } + } + +//upload the destination csv + if (file_exists($_SESSION['file']) && $action == 'add') { + + //form to match the fields to the column names + //require_once "resources/header.php"; + + //user selected fields + $fields = $_POST['fields']; + $domain_uuid = $_POST['domain_uuid']; + $destination_record = $_POST['destination_record']; + $destination_type = $_POST['destination_type']; + $destination_context = $_POST['destination_context']; + $destination_enabled = $_POST['destination_enabled']; + + //set the domain_uuid + $domain_uuid = $_SESSION['domain_uuid']; + + //get the contents of the csv file and convert them into an array + $handle = @fopen($_SESSION['file'], "r"); + if ($handle) { + //pre-set the numbers + $row_id = 0; + $row_number = 1; + + //loop through the array + while (($line = fgets($handle, 4096)) !== false) { + if ($from_row <= $row_number) { + //format the data + $y = 0; + foreach ($fields as $key => $value) { + //get the line + $result = str_getcsv($line, $delimiter, $enclosure); + + //get the table and field name + $field_array = explode(".",$value); + $table_name = $field_array[0]; + $field_name = $field_array[1]; + //echo "value: $value
\n"; + //echo "table_name: $table_name
\n"; + //echo "field_name: $field_name
\n"; + + //get the parent table name + $parent = get_parent($schema, $table_name); + + //remove formatting from the phone number + if ($field_name == "phone_number") { + $result[$key] = preg_replace('{\D}', '', $result[$key]); + } + + //build the data array + if (strlen($table_name) > 0) { + if (strlen($parent) == 0) { + $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; + $array[$table_name][$row_id][$field_name] = $result[$key]; + } + else { + $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; + $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; + } + } + + //get the destination_number + if ($key === 'destination_number') { $destination_number = $result[$key]; } + if ($key === 'destination_description') { $destination_description = $result[$key]; } + if ($key === 'destination_app') { $destination_app = $result[$key]; echo "destination_app $destination_app\n"; } + if ($key === 'destination_data') { $destination_data = $result[$key]; echo "destination_data $destination_data\n"; } + } + + //add the actions + foreach ($array['destinations'] as $row) { + + //get the values + $destination_number = $row['destination_number']; + $destination_app = $row['destination_app']; + $destination_data = $row['destination_data']; + $destination_accountcode = $row['destination_accountcode']; + $destination_cid_name_prefix = $row['destination_cid_name_prefix']; + $destination_description = $row['destination_description']; + + //convert the number to a regular expression + $destination_number_regex = string_to_regex($destination_number); + + //add the additional fields + $dialplan_uuid = uuid(); + $array["destinations"][$row_id]['destination_type'] = $destination_type; + $array["destinations"][$row_id]['destination_record'] = $destination_record; + $array["destinations"][$row_id]['destination_context'] = $destination_context; + $array["destinations"][$row_id]['destination_enabled'] = $destination_enabled; + $array["destinations"][$row_id]['dialplan_uuid'] = $dialplan_uuid; + + //build the dialplan array + $array["dialplans"][$row_id]["app_uuid"] = "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4"; + $array["dialplans"][$row_id]["dialplan_uuid"] = $dialplan_uuid; + $array["dialplans"][$row_id]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_name"] = ($dialplan_name != '') ? $dialplan_name : format_phone($destination_number); + $array["dialplans"][$row_id]["dialplan_number"] = $destination_number; + $array["dialplans"][$row_id]["dialplan_context"] = $destination_context; + $array["dialplans"][$row_id]["dialplan_continue"] = "false"; + $array["dialplans"][$row_id]["dialplan_order"] = "100"; + $array["dialplans"][$row_id]["dialplan_enabled"] = $destination_enabled; + $array["dialplans"][$row_id]["dialplan_description"] = $destination_description; + $dialplan_detail_order = 10; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + //set the dialplan detail type + if (strlen($_SESSION['dialplan']['destination']['text']) > 0) { + $dialplan_detail_type = $_SESSION['dialplan']['destination']['text']; + } + else { + $dialplan_detail_type = "destination_number"; + } + + //build the xml dialplan + $array["dialplans"][$row_id]["dialplan_xml"] = "\n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + if (strlen($destination_cid_name_prefix) > 0) { + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + } + if (strlen($destination_record) > 0) { + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + } + if (strlen($destination_accountcode) > 0) { + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + } + if (strlen($destination_carrier) > 0) { + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + } + if (strlen($fax_uuid) > 0) { + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + } + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= " \n"; + $array["dialplans"][$row_id]["dialplan_xml"] .= "\n"; + + //dialplan details + if ($_SESSION['destinations']['dialplan_details']['boolean'] == "true") { + + //check the destination number + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "condition"; + if (strlen($_SESSION['dialplan']['destination']['text']) > 0) { + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text']; + } + else { + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number"; + } + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = $destination_number_regex; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + //set the caller id name prefix + if (strlen($destination_cid_name_prefix) > 0) { + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = "effective_caller_id_name=".$destination_cid_name_prefix."#\${caller_id_name}"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + } + + //enable call recordings + if ($destination_record == "true") { + + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "answer"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = ""; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = "record_path=\${recordings_dir}/\${domain_name}/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = "record_name=\${uuid}.\${record_ext}"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + //add a variable + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "recording_follow_transfer=true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "record_session"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = "\${record_path}/\${record_name}"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_inline"] = "false"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + } + + //set the call accountcode + if (strlen($destination_accountcode) > 0) { + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = "accountcode=".$destination_accountcode; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + } + + //set the call accountcode + if (strlen($destination_app) > 0 && strlen($destination_data) > 0) { + $array["dialplans"][$row_id]["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_type"] = $destination_app; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_data"] = $destination_data; + $array["dialplans"][$row_id]["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + + //increment the dialplan detail order + $dialplan_detail_order = $dialplan_detail_order + 10; + } + + //set the detail id back to 0 + $y = 0; + + } //end if + } //foreach + + //process a chunk of the array + if ($row_id === 1000) { + + //save to the data + $database = new database; + $database->app_name = 'destinations'; + $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + $database->save($array); + //$message = $database->message; + + //clear the array + unset($array); + + //set the row id back to 0 + $row_id = 0; + } + + } + $row_number++; + $row_id++; + } + fclose($handle); + + //debug info + //echo "
\n";
+					//print_r($array);
+					//echo "
\n"; + //exit; + + //save to the data + if (is_array($array)) { + $database = new database; + $database->app_name = 'destinations'; + $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + $database->save($array); + $message = $database->message; + } + + //send the redirect header + header("Location: destinations.php"); + return; + } + + //show the header + require_once "resources/header.php"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
".$text['header-destinations_import']."\n"; + echo " \n"; + echo "
\n"; + echo " ".$text['message-results']."

\n"; + echo "
\n"; + + //show the results + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + //echo " \n"; + echo " \n"; + echo "\n"; + if ($results) { + foreach($results as $row) { + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + } + } + echo "
".$text['label-destination_name']."".$text['label-destination_organization']."".$text['label-destination_email']."".$text['label-destination_url']."
\n"; + echo $row['FirstName'] ." ".$row['LastName']; + echo " \n"; + echo $row['Company']." \n"; + echo " \n"; + echo $row['EmailAddress']." \n"; + echo " \n"; + echo $row['Web Page']." \n"; + echo "
\n"; + + //include the footer + require_once "resources/footer.php"; + + //end the script + exit; + } + + +//upload the destination csv + if (file_exists($_SESSION['file']) && $action == 'delete') { + + //form to match the fields to the column names + //require_once "resources/header.php"; + + //user selected fields + $fields = $_POST['fields']; + $domain_uuid = $_POST['domain_uuid']; + $destination_type = $_POST['destination_type']; + $destination_context = $_POST['destination_context']; + $destination_enabled = $_POST['destination_enabled']; + + //set the domain_uuid + $domain_uuid = $_SESSION['domain_uuid']; + + //get the contents of the csv file and convert them into an array + $handle = @fopen($_SESSION['file'], "r"); + if ($handle) { + //set the starting identifiers + $row_id = 0; + $dialplan_id = 0; + $row_number = 1; + + //loop through the array + while (($line = fgets($handle, 4096)) !== false) { + if ($from_row <= $row_number) { + + //format the data + $y = 0; + foreach ($fields as $key => $value) { + //get the line + $result = str_getcsv($line, $delimiter, $enclosure); + + //get the table and field name + $field_array = explode(".",$value); + $table_name = $field_array[0]; + $field_name = $field_array[1]; + //echo "value: $value
\n"; + //echo "table_name: $table_name
\n"; + //echo "field_name: $field_name
\n"; + + //get the parent table name + $parent = get_parent($schema, $table_name); + + //remove formatting from the phone number + if ($field_name == "phone_number") { + $result[$key] = preg_replace('{\D}', '', $result[$key]); + } + + //build the data array + if (strlen($table_name) > 0) { + if (strlen($parent) == 0) { + $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; + $array[$table_name][$row_id][$field_name] = $result[$key]; + } + else { + $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; + $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; + } + } + + //get the destination_number + if ($key === 'destination_number') { $destination_number = $result[$key]; } + if ($key === 'destination_uuid') { $destination_uuid = $result[$key]; } + if ($key === 'dialplan_uuid') { $destination_uuid = $result[$key]; } + } + + //delete the destinations + $row_number = 0; + foreach ($array['destinations'] as $row) { + //get the values + $domain_uuid = $row['domain_uuid']; + $destination_number = $row['destination_number']; + + //get the dialplan uuid + if (strlen($row['destination_number']) == 0 || strlen($row['dialplan_uuid']) == 0 ) { + $sql = "select * from v_destinations "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and destination_number = '$destination_number'; "; + //echo $sql."
\n"; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $destinations = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $row = $destinations[0]; + + //add to the array + //$array['destinations'][$row_id] = $destinations[0]; + $array['destinations'][$row_id]['destination_uuid'] = $destinations[0]['destination_uuid']; + if (strlen($row['dialplan_uuid']) > 0) { + $array['destinations'][$row_id]['dialplan_uuid'] = $destinations[0]['dialplan_uuid']; + //$array['dialplans'][$row_id]['dialplan_uuid'] = $destinations[0]['dialplan_uuid']; + } + } + } //foreach + + } //if ($from_row <= $row_number) + $row_number++; + + //process a chunk of the array + if ($row_id === 1000) { + //delete the destinations + $row_number = 0; + foreach ($array['destinations'] as $row) { + //delete the dialplan + if (strlen($row['dialplan_uuid']) > 0) { + $sql = "delete from v_dialplan_details "; + $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + + $sql = "delete from v_dialplans "; + $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + } + + //delete the destinations + if (strlen($row['destination_uuid']) > 0) { + $sql = "delete from v_destinations "; + $sql .= "where destination_uuid = '".$row['destination_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + } + } //foreach + + //delete to the data + //$database = new database; + //$database->app_name = 'destinations'; + //$database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + //$database->delete($array); + //$message = $database->message; + + //clear the array + unset($array); + + //set the row id back to 0 + $row_id = 0; + } + + //increment row id + $row_id++; + } + fclose($handle); + + //delete the remaining destinations + if ($row_id < 1000) { + foreach ($array['destinations'] as $row) { + //delete the dialplan + if (strlen($row['dialplan_uuid']) > 0) { + $sql = "delete from v_dialplan_details "; + $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + + $sql = "delete from v_dialplans "; + $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + } + + //delete the destinations + if (strlen($row['destination_uuid']) > 0) { + $sql = "delete from v_destinations "; + $sql .= "where destination_uuid = '".$row['destination_uuid']."';"; + //echo "$sql
\n"; + $db->query($sql); + unset($sql); + } + } //foreach + } + + //debug info + //echo "
\n";
+					//print_r($array);
+					//echo "
\n"; + //exit; + + //save to the data + //if (is_array($array)) { + // $database = new database; + // $database->app_name = 'destinations'; + // $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + // $database->delete($array); + // //$message = $database->message; + //} + + //send the redirect header + header("Location: /app/destinations/destinations.php"); + return; + } + } + +//match the column names to the field names + if (strlen($delimiter) > 0 && file_exists($_SESSION['file']) && ($action !== 'add' or $action !== 'delete')) { + + //form to match the fields to the column names + require_once "resources/header.php"; + + echo "
\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + + //loop through user columns + $x = 0; + foreach ($line_fields as $line_field) { + $line_field = trim(trim($line_field), $enclosure); + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + $x++; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + //if (permission_exists('destination_context')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + //} + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if (permission_exists('destination_domain')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + else { + echo "\n"; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + + echo "
\n"; + echo " ".$text['header-destination_import']."
\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-destination_import']."\n"; + echo "
".$text['header-destinations_import']."\n"; + //echo " \n"; + //echo "
\n"; + //echo " ".$text['label-zzz']."\n"; + echo $line_field; + echo "\n"; + echo " \n"; + //echo "
\n"; + //echo $text['description-zzz']."\n"; + echo "
\n"; + echo " ".$text['label-destination_type']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_type']."\n"; + echo "
\n"; + echo " ".$text['label-destination_record']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_record']."\n"; + echo "
\n"; + echo " ".$text['label-destination_context']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_context']."\n"; + echo "
\n"; + echo " ".$text['label-actions']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-actions']."\n"; + echo "
\n"; + echo " ".$text['label-domain']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-domain_name']."\n"; + echo "
\n"; + echo " ".$text['label-destination_enabled']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-destination_enabled']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + require_once "resources/footer.php"; + + //normalize the column names + //$line = strtolower($line); + //$line = str_replace("-", "_", $line); + //$line = str_replace($delimiter."title".$delimiter, $delimiter."destination_title".$delimiter, $line); + //$line = str_replace("firstname", "name_given", $line); + //$line = str_replace("lastname", "name_family", $line); + //$line = str_replace("company", "organization", $line); + //$line = str_replace("company", "destination_email", $line); + + //end the script + exit; + } + +//include the header + require_once "resources/header.php"; + +//begin the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['header-destination_import']."
\n"; + echo " ".$text['description-destination_import']."\n"; + echo "
\n"; + echo " \n"; + //echo " \n"; + echo "
"; + + echo "
\n"; + + echo "
\n"; + echo " \n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if (permission_exists('destination_upload')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-import_data']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_data']."\n"; + echo "
\n"; + echo " ".$text['label-from_row']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-from_row']."\n"; + echo "
\n"; + echo " ".$text['label-import_delimiter']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_delimiter']."\n"; + echo "
\n"; + echo " ".$text['label-import_enclosure']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_enclosure']."\n"; + echo "
\n"; + echo " ".$text['label-import_file_upload']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_file_upload']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo "

"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index b08b6b5db9..e5966ad870 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -60,7 +60,7 @@ $obj = new destinations; $obj->delete($destinations); //delete message - messages::add($text['message-delete']); + message::add($text['message-delete']); } } @@ -157,6 +157,31 @@ $destinations = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); +//get the destination select list + $destination = new destinations; + $destination_array = $destination->all('dialplan'); + +//add a function to return the action_name + function action_name($destination_array, $detail_action) { + if (is_array($destination_array)) { + foreach($destination_array as $group => $row) { + if (is_array($row)) { + foreach ($row as $key => $value) { + if ($value == $detail_action) { + //add multi-lingual support + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$group."/app_languages.php")) { + $language2 = new text; + $text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$group); + } + //return the group and destination name + return trim($text2['title-'.$group].' '.$key); + } + } + } + } + } + } + //alternate the row style $c = 0; $row_style["0"] = "row_style0"; @@ -191,7 +216,7 @@ echo " \n"; echo "  \n"; if (permission_exists('destination_import')) { - echo " \n"; + echo " \n"; } if (permission_exists('destination_all')) { @@ -224,15 +249,16 @@ if ($_GET['show'] == "all" && permission_exists('destination_all')) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param); } - echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order); - echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order); - echo th_order_by('destination_context', $text['label-destination_context'], $order_by, $order); + echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order, $param); + echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, $param); + echo "". $text['label-detail_action'].""; + echo th_order_by('destination_context', $text['label-destination_context'], $order_by, $order, $param); if (permission_exists('outbound_caller_id_select')) { - echo th_order_by('destination_caller_id_name', $text['label-destination_caller_id_name'], $order_by, $order); - echo th_order_by('destination_caller_id_number', $text['label-destination_caller_id_number'], $order_by, $order); + echo th_order_by('destination_caller_id_name', $text['label-destination_caller_id_name'], $order_by, $order, $param); + echo th_order_by('destination_caller_id_number', $text['label-destination_caller_id_number'], $order_by, $order, $param); } - echo th_order_by('destination_enabled', $text['label-destination_enabled'], $order_by, $order); - echo th_order_by('destination_description', $text['label-destination_description'], $order_by, $order); + echo th_order_by('destination_enabled', $text['label-destination_enabled'], $order_by, $order, $param); + echo th_order_by('destination_description', $text['label-destination_description'], $order_by, $order, $param); echo " "; if (permission_exists('destination_add')) { echo " $v_link_label_add"; @@ -242,10 +268,10 @@ } echo " \n"; echo "\n"; - if (is_array($destinations)) { $x = 0; foreach($destinations as $row) { + $action_name = action_name($destination_array, $row['destination_app'].':'.$row['destination_data']); if (permission_exists('destination_edit')) { $tr_link = "href='destination_edit.php?id=".$row['destination_uuid']."'"; } @@ -267,6 +293,7 @@ } echo " ".escape($row['destination_type'])." \n"; echo " ".escape(format_phone($row['destination_number']))." \n"; + echo " ".escape($action_name)." \n"; //echo " ".$row['destination_number_regex']." \n"; echo " ".escape($row['destination_context'])." \n"; //echo " ".escape($row['fax_uuid'])." \n"; @@ -304,7 +331,7 @@ echo " $paging_controls\n"; echo " "; if (permission_exists('destination_add')) { - echo "$v_link_label_add"; + echo "$v_link_label_add"; } else { echo " "; diff --git a/app/devices/app_config.php b/app/devices/app_config.php index 97c1aa32c3..445240eaef 100644 --- a/app/devices/app_config.php +++ b/app/devices/app_config.php @@ -63,6 +63,9 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //$apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "device_import"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "device_extension_view"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; @@ -99,6 +102,12 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "device_line_server_address_primary"; + //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "device_line_server_address_secondary"; + //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "device_line_password"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; @@ -124,11 +133,11 @@ $apps[$x]['permissions'][$y]['name'] = "device_key_extension"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; - $apps[$x]['permissions'][$y]['name'] = "device_outbound_proxy_primary"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['name'] = "device_line_outbound_proxy_primary"; + //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + //$apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; - $apps[$x]['permissions'][$y]['name'] = "device_outbound_proxy_secondary"; + $apps[$x]['permissions'][$y]['name'] = "device_line_outbound_proxy_secondary"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; $apps[$x]['permissions'][$y]['name'] = "device_setting_view"; @@ -443,6 +452,14 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the sip server address."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "server_address_primary"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the sip server primary address."; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "server_address_secondary"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the sip server secondary address."; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "outbound_proxy_primary"; $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "outbound_proxy"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; @@ -620,7 +637,11 @@ $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_key_label"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the label."; - + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "device_key_icon"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "ICON Name."; + $y++; $apps[$x]['db'][$y]['table']['name'] = "v_device_profiles"; $apps[$x]['db'][$y]['table']['parent'] = ""; @@ -688,7 +709,7 @@ $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_device_vendor"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_device_vendors"; $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "device_vendor_uuid"; $z++; //$apps[$x]['db'][$y]['fields'][$z]['name'] = "label"; @@ -2818,6 +2839,7 @@ $vendors[$y]['functions'][$z]['label'] = "label-voicemail"; $vendors[$y]['functions'][$z]['name'] = "voicemail"; $vendors[$y]['functions'][$z]['value'] = "2"; + $vendors[$y]['functions'][$z]['description'] = "You can press the key to listen to voice messages and configure the line. The LED is on if a new voice message is received."; $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; $vendors[$y]['functions'][$z]['groups'][] = "admin"; $z++; @@ -2828,54 +2850,70 @@ $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; $vendors[$y]['functions'][$z]['groups'][] = "admin"; $z++; - $vendors[$y]['functions'][$z]['uuid'] = "dcb10855-c3cf-4dd6-8ef6-8acc5f22df60"; - $vendors[$y]['functions'][$z]['label'] = "label-dtmf"; - $vendors[$y]['functions'][$z]['name'] = "dtmf"; - $vendors[$y]['functions'][$z]['value'] = "4"; - $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; - $vendors[$y]['functions'][$z]['groups'][] = "admin"; - $z++; - $vendors[$y]['functions'][$z]['uuid'] = "000882b9-3c02-4e63-b235-13e0745bd230"; - $vendors[$y]['functions'][$z]['label'] = "label-blf_list"; - $vendors[$y]['functions'][$z]['name'] = "blf_list"; - $vendors[$y]['functions'][$z]['value'] = "5"; - $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; - $vendors[$y]['functions'][$z]['groups'][] = "admin"; - $z++; - $vendors[$y]['functions'][$z]['uuid'] = "8b42f992-33b8-4320-9b0f-9d904acfa088"; - $vendors[$y]['functions'][$z]['label'] = "label-url"; - $vendors[$y]['functions'][$z]['name'] = "url"; - $vendors[$y]['functions'][$z]['value'] = "6"; - $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; - $vendors[$y]['functions'][$z]['groups'][] = "admin"; - $z++; - $vendors[$y]['functions'][$z]['uuid'] = "335176a5-f06e-4ccf-827e-1f65e839b6f3"; - $vendors[$y]['functions'][$z]['label'] = "label-multicast"; - $vendors[$y]['functions'][$z]['name'] = "multicast"; - $vendors[$y]['functions'][$z]['value'] = "7"; - $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; - $vendors[$y]['functions'][$z]['groups'][] = "admin"; - $z++; $vendors[$y]['functions'][$z]['uuid'] = "5fc20c48-e619-4671-86d1-3fa88a83d88c"; $vendors[$y]['functions'][$z]['label'] = "label-intercom"; $vendors[$y]['functions'][$z]['name'] = "intercom"; - $vendors[$y]['functions'][$z]['value'] = "8"; + $vendors[$y]['functions'][$z]['value'] = "i"; + $vendors[$y]['functions'][$z]['description'] = "Directly speak without answering the call."; $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; $vendors[$y]['functions'][$z]['groups'][] = "admin"; $z++; $vendors[$y]['functions'][$z]['uuid'] = "1cc1b4ff-52cd-4ea7-ab15-5930fc530fec"; $vendors[$y]['functions'][$z]['label'] = "label-call_park"; $vendors[$y]['functions'][$z]['name'] = "call_park"; - $vendors[$y]['functions'][$z]['value'] = "9"; + $vendors[$y]['functions'][$z]['value'] = "c"; + $vendors[$y]['functions'][$z]['description'] = "If you need to move to another place during a call, use this function."; $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; $vendors[$y]['functions'][$z]['groups'][] = "admin"; $z++; $vendors[$y]['functions'][$z]['uuid'] = "330ac56c-c87e-4a65-a0bd-5f8332faeeab"; $vendors[$y]['functions'][$z]['label'] = "label-call_forward"; $vendors[$y]['functions'][$z]['name'] = "call_forward"; - $vendors[$y]['functions'][$z]['value'] = "10"; + $vendors[$y]['functions'][$z]['value'] = "a"; + $vendors[$y]['functions'][$z]['description'] = "When receiving a call, you can press the key to transfer the call to the specified number."; $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; + $vendors[$y]['functions'][$z]['uuid'] = "6f5d1a1d-19f8-48bb-b4e1-f934b710988f"; + $vendors[$y]['functions'][$z]['label'] = "label-speed_dial"; + $vendors[$y]['functions'][$z]['name'] = "speed_dial"; + $vendors[$y]['functions'][$z]['value'] = "f"; + $vendors[$y]['functions'][$z]['description'] = "Automatically call the specified number when key is pressed. (No BFL)"; + $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; + $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; + $vendors[$y]['functions'][$z]['uuid'] = "b047d0d7-27a8-4a82-ba7f-44efb5bf1734"; + $vendors[$y]['functions'][$z]['label'] = "label-blf_new"; + $vendors[$y]['functions'][$z]['name'] = "blf_new"; + $vendors[$y]['functions'][$z]['value'] = "11"; + $vendors[$y]['functions'][$z]['description'] = "BLF - New Call"; + $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; + $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; + $vendors[$y]['functions'][$z]['uuid'] = "89664b9e-9366-4c7f-9a92-3ecfdfa7e91b"; + $vendors[$y]['functions'][$z]['label'] = "label-blf_new_video"; + $vendors[$y]['functions'][$z]['name'] = "blf_new_video"; + $vendors[$y]['functions'][$z]['value'] = "bcV"; + $vendors[$y]['functions'][$z]['description'] = "BLF - New Video Call"; + $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; + $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; + $vendors[$y]['functions'][$z]['uuid'] = "e80b6d6d-dedc-456d-9118-8d8f010a0697"; + $vendors[$y]['functions'][$z]['label'] = "label-blf_bxfer"; + $vendors[$y]['functions'][$z]['name'] = "blf_bxfer"; + $vendors[$y]['functions'][$z]['value'] = "bb"; + $vendors[$y]['functions'][$z]['description'] = "BLF - Blind Transfer"; + $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; + $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; + $vendors[$y]['functions'][$z]['uuid'] = "55b0a1df-a9a1-48c7-9665-e84925631a6d"; + $vendors[$y]['functions'][$z]['label'] = "label-blf_axfer"; + $vendors[$y]['functions'][$z]['name'] = "blf_axfer"; + $vendors[$y]['functions'][$z]['value'] = "ba"; + $vendors[$y]['functions'][$z]['description'] = "BLF - Attended Transfer"; + $vendors[$y]['functions'][$z]['groups'][] = "superadmin"; + $vendors[$y]['functions'][$z]['groups'][] = "admin"; + $z++; //algo $y++; $vendors[$y]['uuid'] = "dc5ffcb9-5195-4fb8-8b23-f4216ed7f0f6"; diff --git a/app/devices/app_languages.php b/app/devices/app_languages.php index e5d323ee86..f1b16072c6 100644 --- a/app/devices/app_languages.php +++ b/app/devices/app_languages.php @@ -701,6 +701,46 @@ $text['label-server_address']['ru-ru'] = "Адрес сервера"; $text['label-server_address']['sv-se'] = "Serveradress"; $text['label-server_address']['uk-ua'] = ""; +$text['label-server_address_primary']['en-us'] = "Primary Address"; +$text['label-server_address_primary']['ar-eg'] = ""; +$text['label-server_address_primary']['de-at'] = "Server Adresse"; //copied from de-de +$text['label-server_address_primary']['de-ch'] = "Server Adresse"; //copied from de-de +$text['label-server_address_primary']['de-de'] = "Server Adresse"; +$text['label-server_address_primary']['es-cl'] = "Dirección de servidor"; +$text['label-server_address_primary']['es-mx'] = "Dirección de servidor"; //copied from es-cl +$text['label-server_address_primary']['fr-ca'] = "Adresse du Serveur"; //copied from fr-fr +$text['label-server_address_primary']['fr-fr'] = "Adresse du Serveur"; +$text['label-server_address_primary']['he-il'] = "כתובת שרת"; +$text['label-server_address_primary']['it-it'] = "Indirizzo Server"; +$text['label-server_address_primary']['nl-nl'] = ""; +$text['label-server_address_primary']['pl-pl'] = "Adres serwera (registrar)"; +$text['label-server_address_primary']['pt-br'] = "Endereço do servidor"; +$text['label-server_address_primary']['pt-pt'] = "Endereço do Servidor"; +$text['label-server_address_primary']['ro-ro'] = ""; +$text['label-server_address_primary']['ru-ru'] = "Адрес сервера"; +$text['label-server_address_primary']['sv-se'] = "Serveradress"; +$text['label-server_address_primary']['uk-ua'] = ""; + +$text['label-server_address_secondary']['en-us'] = "Secondary Address"; +$text['label-server_address_secondary']['ar-eg'] = ""; +$text['label-server_address_secondary']['de-at'] = "Server Adresse"; //copied from de-de +$text['label-server_address_secondary']['de-ch'] = "Server Adresse"; //copied from de-de +$text['label-server_address_secondary']['de-de'] = "Server Adresse"; +$text['label-server_address_secondary']['es-cl'] = "Dirección de servidor"; +$text['label-server_address_secondary']['es-mx'] = "Dirección de servidor"; //copied from es-cl +$text['label-server_address_secondary']['fr-ca'] = "Adresse du Serveur"; //copied from fr-fr +$text['label-server_address_secondary']['fr-fr'] = "Adresse du Serveur"; +$text['label-server_address_secondary']['he-il'] = "כתובת שרת"; +$text['label-server_address_secondary']['it-it'] = "Indirizzo Server"; +$text['label-server_address_secondary']['nl-nl'] = ""; +$text['label-server_address_secondary']['pl-pl'] = "Adres serwera (registrar)"; +$text['label-server_address_secondary']['pt-br'] = "Endereço do servidor"; +$text['label-server_address_secondary']['pt-pt'] = "Endereço do Servidor"; +$text['label-server_address_secondary']['ro-ro'] = ""; +$text['label-server_address_secondary']['ru-ru'] = "Адрес сервера"; +$text['label-server_address_secondary']['sv-se'] = "Serveradress"; +$text['label-server_address_secondary']['uk-ua'] = ""; + $text['label-register_expires']['en-us'] = "Register Expires"; $text['label-register_expires']['ar-eg'] = ""; $text['label-register_expires']['de-at'] = "Ablauf der Registrierung"; //copied from de-de @@ -2641,6 +2681,26 @@ $text['label-device_key_label']['ru-ru'] = "Метка"; $text['label-device_key_label']['sv-se'] = "Etikett"; $text['label-device_key_label']['uk-ua'] = ""; +$text['label-device_key_icon']['en-us'] = "ICON"; +$text['label-device_key_icon']['ar-eg'] = ""; +$text['label-device_key_icon']['de-at'] = ""; +$text['label-device_key_icon']['de-ch'] = ""; +$text['label-device_key_icon']['de-de'] = ""; +$text['label-device_key_icon']['es-cl'] = ""; +$text['label-device_key_icon']['es-mx'] = ""; +$text['label-device_key_icon']['fr-ca'] = ""; +$text['label-device_key_icon']['fr-fr'] = ""; +$text['label-device_key_icon']['he-il'] = ""; +$text['label-device_key_icon']['it-it'] = ""; +$text['label-device_key_icon']['nl-nl'] = ""; +$text['label-device_key_icon']['pl-pl'] = ""; +$text['label-device_key_icon']['pt-br'] = ""; +$text['label-device_key_icon']['pt-pt'] = ""; +$text['label-device_key_icon']['ro-ro'] = ""; +$text['label-device_key_icon']['ru-ru'] = ""; +$text['label-device_key_icon']['sv-se'] = ""; +$text['label-device_key_icon']['uk-ua'] = ""; + $text['label-device_key_id']['en-us'] = "Key"; $text['label-device_key_id']['ar-eg'] = ""; $text['label-device_key_id']['de-at'] = "Taste"; //copied from de-de @@ -2941,6 +3001,47 @@ $text['label-broadsoft_group']['ru-ru'] = "Группа Broadsoft"; $text['label-broadsoft_group']['sv-se'] = "Broadsoft Group"; $text['label-broadsoft_group']['uk-ua'] = ""; +$text['label-blf_bxfer']['en-us'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['ar-eg'] = ""; +$text['label-blf_bxfer']['de-at'] = "BLF Blind Transfer"; //copied from de-de +$text['label-blf_bxfer']['de-ch'] = "BLF Blind Transfer"; //copied from de-de +$text['label-blf_bxfer']['de-de'] = "BLF Blind Transfer"; +$text['label-blf_bxfer']['es-cl'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['es-mx'] = "BLF Blind Xfer"; //copied from es-cl +$text['label-blf_bxfer']['fr-ca'] = "BLF Blind Xfer"; //copied from fr-fr +$text['label-blf_bxfer']['fr-fr'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['he-il'] = ""; +$text['label-blf_bxfer']['it-it'] = "Blind Xfer BLF"; +$text['label-blf_bxfer']['nl-nl'] = ""; +$text['label-blf_bxfer']['pl-pl'] = "BLF Blind Xfer "; +$text['label-blf_bxfer']['pt-br'] = "BLF Blind Xfer"; //copied from pt-pt +$text['label-blf_bxfer']['pt-pt'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['ro-ro'] = ""; +$text['label-blf_bxfer']['ru-ru'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['sv-se'] = "BLF Blind Xfer"; +$text['label-blf_bxfer']['uk-ua'] = ""; + +$text['label-blf_axfer']['en-us'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['ar-eg'] = ""; +$text['label-blf_axfer']['de-at'] = "BLF Attended Transfer"; //copied from de-de +$text['label-blf_axfer']['de-ch'] = "BLF Attended Transfer"; //copied from de-de +$text['label-blf_axfer']['de-de'] = "BLF Attended Transfer"; +$text['label-blf_axfer']['es-cl'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['es-mx'] = "BLF Attended Xfer"; //copied from es-cl +$text['label-blf_axfer']['fr-ca'] = "BLF Attended Xfer"; //copied from fr-fr +$text['label-blf_axfer']['fr-fr'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['he-il'] = ""; +$text['label-blf_axfer']['it-it'] = "Attended Xfer BLF"; +$text['label-blf_axfer']['nl-nl'] = ""; +$text['label-blf_axfer']['pl-pl'] = "BLF Attended Xfer "; +$text['label-blf_axfer']['pt-br'] = "BLF Attended Xfer"; //copied from pt-pt +$text['label-blf_axfer']['pt-pt'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['ro-ro'] = ""; +$text['label-blf_axfer']['ru-ru'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['sv-se'] = "BLF Attended Xfer"; +$text['label-blf_axfer']['uk-ua'] = ""; + + $text['label-blf_xfer']['en-us'] = "BLF Xfer"; $text['label-blf_xfer']['ar-eg'] = ""; $text['label-blf_xfer']['de-at'] = "BLF Transfer"; //copied from de-de @@ -3001,6 +3102,46 @@ $text['label-blf']['ru-ru'] = "BLF"; $text['label-blf']['sv-se'] = "BLF"; $text['label-blf']['uk-ua'] = ""; +$text['label-blf_new']['en-us'] = "BLF/New Call"; +$text['label-blf_new']['ar-eg'] = ""; +$text['label-blf_new']['de-at'] = "BLF/New Call"; //copied from de-de +$text['label-blf_new']['de-ch'] = "BLF/New Call"; //copied from de-de +$text['label-blf_new']['de-de'] = "BLF/New Call"; +$text['label-blf_new']['es-cl'] = "BLF/New Call"; +$text['label-blf_new']['es-mx'] = "BLF/New Call"; //copied from es-cl +$text['label-blf_new']['fr-ca'] = "BLF/New Call"; //copied from fr-fr +$text['label-blf_new']['fr-fr'] = "BLF/New Call"; +$text['label-blf_new']['he-il'] = ""; +$text['label-blf_new']['it-it'] = "BLF/New Call"; +$text['label-blf_new']['nl-nl'] = ""; +$text['label-blf_new']['pl-pl'] = "Dostępności kontaktu (BLF)"; +$text['label-blf_new']['pt-br'] = "BLF/New Call"; //copied from pt-pt +$text['label-blf_new']['pt-pt'] = "BLF/New Call"; +$text['label-blf_new']['ro-ro'] = ""; +$text['label-blf_new']['ru-ru'] = "BLF/New Call"; +$text['label-blf_new']['sv-se'] = "BLF/New Call"; +$text['label-blf_new']['uk-ua'] = ""; + +$text['label-blf_new_video']['en-us'] = "BLF New Video Call"; +$text['label-blf_new_video']['ar-eg'] = ""; +$text['label-blf_new_video']['de-at'] = "BLF New Video Call"; //copied from de-de +$text['label-blf_new_video']['de-ch'] = "BLF New Video Call"; //copied from de-de +$text['label-blf_new_video']['de-de'] = "BLF New Video Call"; +$text['label-blf_new_video']['es-cl'] = "BLF New Video Call"; +$text['label-blf_new_video']['es-mx'] = "BLF New Video Call"; //copied from es-cl +$text['label-blf_new_video']['fr-ca'] = "BLF New Video Call"; //copied from fr-fr +$text['label-blf_new_video']['fr-fr'] = "BLF New Video Call"; +$text['label-blf_new_video']['he-il'] = ""; +$text['label-blf_new_video']['it-it'] = "Call Video New BLF"; +$text['label-blf_new_video']['nl-nl'] = ""; +$text['label-blf_new_video']['pl-pl'] = "BLF New Video Call "; +$text['label-blf_new_video']['pt-br'] = "BLF New Video Call"; //copied from pt-pt +$text['label-blf_new_video']['pt-pt'] = "BLF New Video Call"; +$text['label-blf_new_video']['ro-ro'] = ""; +$text['label-blf_new_video']['ru-ru'] = "BLF New Video Call"; +$text['label-blf_new_video']['sv-se'] = "BLF New Video Call"; +$text['label-blf_new_video']['uk-ua'] = ""; + $text['label-callers']['en-us'] = "Callers"; $text['label-callers']['ar-eg'] = ""; $text['label-callers']['de-at'] = "Anrufer"; //copied from de-de diff --git a/app/devices/cmd.php b/app/devices/cmd.php index 4708cb15d2..132001f441 100644 --- a/app/devices/cmd.php +++ b/app/devices/cmd.php @@ -67,7 +67,7 @@ else { $response = event_socket_request($fp, "api log notice ".$command); //show the response - messages::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); + message::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); //close the connection fclose($fp); @@ -80,7 +80,7 @@ else { } else { //send the message - messages::add($text['button-applied'], 'positive', 3500); + message::add($text['button-applied'], 'positive', 3500); //send the redirect if (isset($_SERVER['HTTP_REFERER'])) { diff --git a/app/devices/device_copy.php b/app/devices/device_copy.php index 80d49ed73a..70d3f3a0be 100644 --- a/app/devices/device_copy.php +++ b/app/devices/device_copy.php @@ -68,7 +68,7 @@ } else { $save = false; - messages::add($text['message-duplicate']); + message::add($text['message-duplicate']); } } unset($prep_statement); @@ -159,7 +159,7 @@ $database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e'; $database->save($array); $response = $database->message; - messages::add($text['message-copy']); + message::add($text['message-copy']); } //redirect diff --git a/app/devices/device_dashboard.php b/app/devices/device_dashboard.php index 12d9b148c9..369ace80a6 100644 --- a/app/devices/device_dashboard.php +++ b/app/devices/device_dashboard.php @@ -173,6 +173,7 @@ if (strlen($row["device_key_type"]) > 25) { $save = false; echo "type "; } if (strlen($row["device_key_value"]) > 25) { $save = false; echo "value "; } if (strlen($row["device_key_label"]) > 25) { $save = false; echo "label "; } + if (strlen($row["device_key_icon"]) > 25) { $save = false; echo "icon "; } //escape characters in the string $device_uuid = check_str($row["device_uuid"]); @@ -182,6 +183,7 @@ $device_key_line = check_str($row["device_key_line"]); $device_key_value = check_str($row["device_key_value"]); $device_key_label = check_str($row["device_key_label"]); + $device_key_icon = check_str($row["device_key_icon"]); $device_key_category = check_str($row["device_key_category"]); $device_key_vendor = check_str($row["device_key_vendor"]); @@ -197,7 +199,8 @@ //determine what to do with the profile key if ($device_key_id == $database["device_key_id"] && $device_key_value == $database["device_key_value"] - && $device_key_label == $database["device_key_label"]) { + && $device_key_label == $database["device_key_label"] + && $device_key_icon == $database["device_key_icon"]) { //profile key unchanged don't save $save = false; } @@ -236,6 +239,7 @@ $sql .= "device_key_line, "; $sql .= "device_key_value, "; $sql .= "device_key_label, "; + $sql .= "device_key_icon, "; $sql .= "device_key_category, "; $sql .= "device_key_vendor "; $sql .= ") "; @@ -248,6 +252,7 @@ $sql .= "'".$device_key_line."', "; $sql .= "'".$device_key_value."', "; $sql .= "'".$device_key_label."', "; + $sql .= "'".$device_key_icon."', "; $sql .= "'".$device_key_category."', "; $sql .= "'".$device_key_vendor."' "; $sql .= ");"; @@ -267,7 +272,8 @@ } $sql .= "device_key_type = '".$device_key_type."', "; $sql .= "device_key_value = '".$device_key_value."', "; - $sql .= "device_key_label = '".$device_key_label."' "; + $sql .= "device_key_label = '".$device_key_label."', "; + $sql .= "device_key_icon = '".$device_key_icon."' "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "and device_key_uuid = '".$device_key_uuid."'; "; } @@ -289,7 +295,7 @@ } //set the message - messages::add($text["message-$action"]); + message::add($text["message-$action"]); //redirect the browser header("Location: /core/user_settings/user_dashboard.php"); @@ -406,6 +412,7 @@ $device_keys[$x]['device_key_value'] = ''; $device_keys[$x]['device_key_extension'] = ''; $device_keys[$x]['device_key_label'] = ''; + $device_keys[$x]['device_key_icon'] = ''; } //remove the keys the user is not allowed to edit based on the authorized vendor keys @@ -481,6 +488,7 @@ echo " ".$text['label-device_key_value']."\n"; //echo " ".$text['label-device_key_extension']."\n"; echo " ".$text['label-device_key_label']."\n"; + echo " ".$text['label-device_key_icon']."\n"; echo " \n"; } //determine whether to hide the element @@ -633,6 +641,7 @@ echo "\n"; echo " \n"; + echo " \n"; echo " \n"; echo "\n"; diff --git a/app/devices/device_delete.php b/app/devices/device_delete.php index f6be1b816d..6d29cd7be7 100644 --- a/app/devices/device_delete.php +++ b/app/devices/device_delete.php @@ -82,7 +82,7 @@ } //set the message and redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: devices.php"); return; diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index d166083966..c8f24fc9a4 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -120,7 +120,7 @@ } unset($prep_statement, $row); if ($total_devices >= $_SESSION['limit']['devices']['numeric']) { - messages::add($text['message-maximum_devices'].' '.$_SESSION['limit']['devices']['numeric'], 'negative'); + message::add($text['message-maximum_devices'].' '.$_SESSION['limit']['devices']['numeric'], 'negative'); header('Location: devices.php'); return; } @@ -177,6 +177,7 @@ $device_key_value = check_str($_POST["device_key_value"]); $device_key_extension = check_str($_POST["device_key_extension"]); $device_key_label = check_str($_POST["device_key_label"]); + $device_key_icon = check_str($_POST["device_key_icon"]); //settings //$device_setting_category = check_str($_POST["device_setting_category"]); $device_setting_subcategory = check_str($_POST["device_setting_subcategory"]); @@ -236,7 +237,6 @@ //array cleanup $x = 0; - //unset($_POST["autocomplete"]); unset($_POST["target_file"]); unset($_POST["file_action"]); @@ -295,6 +295,11 @@ $save = true; } + //set the device_enabled_date + if ($_POST["device_enabled"] == "true") { + $_POST["device_enabled_date"] = 'now()'; + } + //prepare the array $array['devices'][] = $_POST; @@ -325,11 +330,11 @@ if ($save) { if ($action == "add") { //save the message to a session variable - messages::add($text['message-add']); + message::add($text['message-add']); } if ($action == "update") { //save the message to a session variable - messages::add($text['message-update']); + message::add($text['message-update']); } //redirect the browser header("Location: device_edit.php?id=$device_uuid"); @@ -392,7 +397,7 @@ //get device lines $sql = "SELECT * FROM v_device_lines "; $sql .= "where device_uuid = '".$device_uuid."' "; - $sql .= "order by line_number asc "; + $sql .= "order by cast(line_number as int) asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -400,6 +405,8 @@ $device_lines[$x]['server_address'] = ''; $device_lines[$x]['outbound_proxy_primary'] = $_SESSION['provision']['outbound_proxy_primary']['text']; $device_lines[$x]['outbound_proxy_secondary'] = $_SESSION['provision']['outbound_proxy_secondary']['text']; + $device_lines[$x]['server_address_primary'] = $_SESSION['provision']['server_address_primary']['text']; + $device_lines[$x]['server_address_secondary'] = $_SESSION['provision']['server_address_secondary']['text']; $device_lines[$x]['display_name'] = ''; $device_lines[$x]['user_id'] = ''; $device_lines[$x]['auth_id'] = ''; @@ -439,6 +446,7 @@ $device_keys[$x]['device_key_value'] = ''; $device_keys[$x]['device_key_extension'] = ''; $device_keys[$x]['device_key_label'] = ''; + $device_keys[$x]['device_key_icon'] = ''; //get the device vendors $sql = "SELECT name "; @@ -626,14 +634,25 @@ $mode = '4'; } - //build the xml + //get the device line settings $row = $device_lines[0]; + + //set the outbound proxy settings + if (strlen($row['outbound_proxy_primary']) == 0) { + $outbound_proxy_primary = $row['server_address']; + } + else { + $outbound_proxy_primary = $row['outbound_proxy_primary']; + } + $outbound_proxy_secondary = $row['outbound_proxy_secondary']; + + //build the xml $xml = ""; $xml .= ""; $xml .= ""; $xml .= "".$row['server_address'].""; - $xml .= "".$row['outbound_proxy_primary'].""; - $xml .= "".$row['outbound_proxy_secondary'].""; + $xml .= "".$outbound_proxy_primary.":".$row['sip_port'].""; + $xml .= "".$outbound_proxy_secondary.":".$row['sip_port'].""; $xml .= "".$row['user_id'].""; $xml .= "".$row['auth_id'].""; $xml .= "".$row['password'].""; @@ -647,9 +666,7 @@ //qr code generation $_GET['type'] = "text"; - $qr_vcard = true; - include "contacts_vcard.php"; - echo ""; + echo ""; echo "\n"; + +//test result layer + echo "\n"; + +//show the content + echo "
\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
"; + echo " ".$text['header-emails'].""; + echo "

"; + echo " ".$text['description-emails']; + echo "
\n"; + echo " \n"; + echo " \n"; + if (permission_exists('email_log_all')) { + if ($_REQUEST['showall'] != 'true') { + echo " \n"; + } + } + echo " \n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo "\n"; + + echo "\n"; + if ($_REQUEST['showall'] == true && permission_exists('email_log_all')) { + echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param); + } + echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param); + echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param); + echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if (is_array($result)) { + foreach($result as $row) { + + //get call details + $sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and uuid = '".$row['call_uuid']."' "; + //echo ""; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach($result2 as $row2) { + $caller_id_name = ($row2['caller_id_name'] != '') ? $row2['caller_id_name'] : null; + $caller_id_number = ($row2['caller_id_number'] != '') ? $row2['caller_id_number'] : null; + $destination_number = ($row2['destination_number'] != '') ? $row2['destination_number'] : null; + } + unset($prep_statement, $sql); + + $tr_link = "href='email_log_view.php?id=".$row['email_log_uuid']."'"; + echo "\n"; + if ($_REQUEST['showall'] == true && permission_exists('email_log_all')) { + echo " \n"; + } + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + if ($c==0) { $c=1; } else { $c=0; } + } //end foreach + unset($sql, $result, $row_count); + } //end if results + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
".$text['label-message']."".$text['label-reference']." 
".$sql."
".escape($row['domain_name']).""; + $sent_date = explode('.', $row['sent_date']); + echo $sent_date[0]; + echo " ".$text['label-type_'.escape($row['type'])]."".$text['label-status_'.escape($row['status'])].""; + echo "$v_link_label_view"; + if (permission_exists('email_log_delete')) { + echo "$v_link_label_delete"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls 
\n"; + echo "
"; + echo "

"; + +//test script + echo "\n"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/email_logs/email_test.php b/app/email_logs/email_test.php new file mode 100644 index 0000000000..3dcf600633 --- /dev/null +++ b/app/email_logs/email_test.php @@ -0,0 +1,88 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2019 + the Initial Developer. All Rights Reserved. + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (!permission_exists('email_log_view')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//send email + if (valid_email($_POST['to'])) { + + $recipient = check_str($_POST['to']); + + echo "".$text['header-settings']."\n"; + echo "

\n"; + ksort($_SESSION['email']); + foreach ($_SESSION['email'] as $name => $setting) { + foreach ($setting as $type => $value) { + if ($type == 'uuid') { $uuid = $value; continue; } + if ($name == 'smtp_password') { $value = '[REDACTED]'; } + if (permission_exists('default_setting_edit')) { + echo "".$name.': '.$value."
\n"; + } + else { + echo $name.': '.$value."
\n"; + } + } + } + echo "

\n"; + + echo "".$text['header-connection']."\n"; + echo "

\n"; + + $eml_body = "Test Message

\n"; + $eml_body .= "This message is a test of the SMTP settings configured within your PBX.
\n"; + $eml_body .= "If you received this message, your current SMTP settings are valid.

\n"; + + ob_start(); + $sent = !send_email($recipient, 'Test Message', $eml_body, $eml_error, null, null, 3, 3) ? false : true; + $response = ob_get_clean(); + + echo $response; + + echo "

\n"; + + echo "".$text['header-result']."\n"; + echo "

\n"; + echo $sent ? "Message Sent Successfully
Receipient: ".$recipient."" : "Message Failed...
".$eml_error; + + } + else { + echo "Error: Invalid Recipient Address"; + } + + echo "
\n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + +?> diff --git a/app/emails/root.php b/app/email_logs/root.php similarity index 100% rename from app/emails/root.php rename to app/email_logs/root.php diff --git a/app/email_templates/app_defaults.php b/app/email_templates/app_defaults.php index e80c462985..6f991847e0 100644 --- a/app/email_templates/app_defaults.php +++ b/app/email_templates/app_defaults.php @@ -27,9 +27,8 @@ //if the number of rows is 0 then read the sip profile xml into the database if ($domains_processed == 1) { - //add the sip profiles to the database + //add the email templates to the database $sql = "select count(*) as num_rows from v_email_templates "; - $sql .= "where template_category = 'email' "; $prep_statement = $db->prepare(check_sql($sql)); if ($prep_statement) { $prep_statement->execute(); @@ -269,7 +268,7 @@ $array['email_templates'][$x]['template_body'] .= "\n"; $array['email_templates'][$x]['template_body'] = "Missed Call from \${caller_id_name} <\${caller_id_number}> to \${sip_to_user} ext \${dialed_user}\n"; $array['email_templates'][$x]['template_body'] .= "\n"; - $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_body'] .= "\n"; $array['email_templates'][$x]['template_type'] = 'html'; $array['email_templates'][$x]['template_enabled'] = 'true'; $array['email_templates'][$x]['template_description'] = ''; @@ -322,7 +321,7 @@ $database->save($array); //$message = $database->message; unset($array); - + //remove the temporary permission $p->delete("email_template_add", 'temp'); $p->delete("email_template_edit", 'temp'); diff --git a/app/email_templates/email_template_delete.php b/app/email_templates/email_template_delete.php index 8f749bcd55..99ed88eb7c 100644 --- a/app/email_templates/email_template_delete.php +++ b/app/email_templates/email_template_delete.php @@ -56,7 +56,7 @@ } //delete the message - messages::add($text['message-delete']); + message::add($text['message-delete']); //redirect the user header('Location: email_templates.php'); diff --git a/app/email_templates/email_template_edit.php b/app/email_templates/email_template_edit.php index 14944ba2a9..9c7edca777 100644 --- a/app/email_templates/email_template_edit.php +++ b/app/email_templates/email_template_edit.php @@ -218,7 +218,7 @@ echo " ".$text['label-template_body']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-template_body']."\n"; echo "\n"; diff --git a/app/email_templates/email_templates.php b/app/email_templates/email_templates.php index ea7f299e59..0e755fde44 100644 --- a/app/email_templates/email_templates.php +++ b/app/email_templates/email_templates.php @@ -57,7 +57,7 @@ $obj = new email_templates; $obj->delete($email_templates); //delete message - messages::add($text['message-delete']); + message::add($text['message-delete']); } } diff --git a/app/emails/emails.php b/app/emails/emails.php deleted file mode 100644 index c7e9e06d28..0000000000 --- a/app/emails/emails.php +++ /dev/null @@ -1,269 +0,0 @@ -get(); - -//get variables used to control the order - $order_by = ($_GET["order_by"] != '') ? $_GET["order_by"] : 'sent_date'; - $order = ($_GET["order"] != '') ? $_GET["order"] : 'desc'; - -//download email - if ($_REQUEST['a'] == 'download' && permission_exists('email_download')) { - $email_uuid = check_str($_REQUEST["id"]); - - $msg_found = false; - - if ($email_uuid != '') { - $sql = "select call_uuid, email from v_emails "; - $sql .= "where email_uuid = '".$email_uuid."' "; - $sql .= "and domain_uuid = '".$domain_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - if ($result_count > 0) { - foreach($result as $row) { - $call_uuid = $row['call_uuid']; - $email = $row['email']; - $msg_found = true; - break; - } - } - unset ($prep_statement, $sql, $result, $result_count); - } - - if ($msg_found) { - header("Content-Type: message/rfc822"); - header('Content-Disposition: attachment; filename="'.$call_uuid.'.eml"'); - header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 - header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past - header("Content-Length: ".strlen($email)); - echo $email; - exit; - } - } - -//resend email - if ($_REQUEST['a'] == 'resend' && permission_exists('email_resend')) { - $email_uuid = check_str($_REQUEST["id"]); - $resend = true; - - $msg_found = false; - - if ($email_uuid != '') { - $sql = "select email from v_emails "; - $sql .= "where email_uuid = '".$email_uuid."' "; - if (!permission_exists('emails_all') || $_REQUEST['showall'] != 'true') { - $sql .= "and domain_uuid = '".$domain_uuid."' "; - } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - if ($result_count > 0) { - foreach($result as $row) { - $email = $row['email']; - $msg_found = true; - break; - } - } - unset ($prep_statement, $sql, $result, $result_count); - } - - if ($msg_found) { - $msg = $email; - require_once "secure/v_mailto.php"; - if ($mailer_error == '') { - messages::add($text['message-message_resent']); - if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { - header("Location: email_delete.php?id=".$email_uuid."&showall=true"); - } else { - header("Location: email_delete.php?id=".$email_uuid); - } - } - else { - messages::add($text['message-resend_failed'].": ".$mailer_error, 'negative', 4000); - if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { - header("Location: emails.php?showall=true"); - } else { - header("Location: emails.php"); - } - } - } - - exit; - } - -//additional includes - $document['title'] = $text['title-emails']; - require_once "resources/header.php"; - require_once "resources/paging.php"; - -//show the content - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
"; - echo " ".$text['header-emails'].""; - echo "

"; - echo " ".$text['description-emails']; - echo "
\n"; - if (permission_exists('emails_all')) { - if ($_REQUEST['showall'] != 'true') { - echo " \n"; - } - } - echo " \n"; - echo "
\n"; - echo "
\n"; - - //prepare to page the results - $sql = "select count(*) as num_rows from v_emails "; - if (permission_exists('emails_all')) { - if ($_REQUEST['showall'] != 'true') { - $sql .= "where domain_uuid = '".$domain_uuid."' "; - } - } - $prep_statement = $db->prepare($sql); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - $num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0; - } - - //prepare to page the results - $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { - $param .= "&showall=true"; - } else { - $param = ""; - } - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - //get the list - $sql = "select * from v_emails "; - if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { - $sql .= " join v_domains on v_emails.domain_uuid = v_domains.domain_uuid "; - } else { - $sql .= "where domain_uuid = '".$domain_uuid."' "; - } - if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; } - $sql .= "limit ".$rows_per_page." offset ".$offset." "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "\n"; - - echo "\n"; - if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { - echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param); - } - echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param); - echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param); - echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param); - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - if ($result_count > 0) { - foreach($result as $row) { - - //get call details - $sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; - $sql .= "and uuid = '".$row['call_uuid']."' "; - //echo ""; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach($result2 as $row2) { - $caller_id_name = ($row2['caller_id_name'] != '') ? $row2['caller_id_name'] : null; - $caller_id_number = ($row2['caller_id_number'] != '') ? $row2['caller_id_number'] : null; - $destination_number = ($row2['destination_number'] != '') ? $row2['destination_number'] : null; - } - unset($prep_statement, $sql); - - $tr_link = "href='email_view.php?id=".$row['email_uuid']."'"; - echo "\n"; - if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { - echo " \n"; - } - - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
".$text['label-message']."".$text['label-reference']." 
".$sql."
".escape($row['domain_name']).""; - $sent_date = explode('.', $row['sent_date']); - echo $sent_date[0]; - echo " ".$text['label-type_'.escape($row['type'])]."".$text['label-status_'.escape($row['status'])].""; - echo "$v_link_label_view"; - if (permission_exists('email_delete')) { - echo "$v_link_label_delete"; - } - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls 
\n"; - echo "
"; - echo "

"; - -//include the footer - require_once "resources/footer.php"; -?> diff --git a/app/errors/app_config.php b/app/errors/app_config.php new file mode 100644 index 0000000000..f4b972f573 --- /dev/null +++ b/app/errors/app_config.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/app/errors/app_languages.php b/app/errors/app_languages.php new file mode 100644 index 0000000000..3711a5e347 --- /dev/null +++ b/app/errors/app_languages.php @@ -0,0 +1,284 @@ + \ No newline at end of file diff --git a/app/errors/app_menu.php b/app/errors/app_menu.php new file mode 100644 index 0000000000..e87cfda758 --- /dev/null +++ b/app/errors/app_menu.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/app/errors/errors.php b/app/errors/errors.php new file mode 100644 index 0000000000..2310ba5a34 --- /dev/null +++ b/app/errors/errors.php @@ -0,0 +1,152 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (!permission_exists('errors_view')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//set defaults + if (!is_numeric($_POST['line_number'])) { $_POST['line_number'] = 0; } + if ($_POST['sort'] != 'asc' && $_POST['sort'] != 'desc') { $_POST['sort'] = 'asc'; } + if (!is_numeric($_POST['lines'])) { $_POST['lines'] = '10'; } + +//include the header + $document['title'] = $text['title-server_errors']; + require_once "resources/header.php"; + +//show the content + $error_file = $_SESSION['server']['error']['text'].($_POST['log'] == 'previous' ? '.1' : null); + if (file_exists($error_file)) { + + //colored lines + $x = 0; + $filters[$x]['pattern'] = '[error]'; + $filters[$x]['color'] = '#cc0000'; + $x++; + $filters[$x]['pattern'] = '[crit]'; + $filters[$x]['color'] = 'gold'; + + $file_lines = file($error_file, FILE_SKIP_EMPTY_LINES); + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['header-server_errors']."
\n"; + echo "
\n"; + echo "
\n"; + echo " ".$text['label-log']; + echo " \n"; + echo " ".$text['label-filter']." "; + echo " "; + echo " "; + echo " ".$text['label-display']." of ".count($file_lines)." ".$text['label-lines']; + echo " "; + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo "
\n"; + + if (is_array($file_lines) && sizeof($file_lines) > 0) { + echo "\n"; + if ($_POST['filter'] != '') { + foreach ($file_lines as $index => $line) { + if (strpos($line, $_POST['filter']) == false) { + unset($file_lines[$index]); + } + } + } + if (is_numeric($_POST['lines']) && $_POST['lines'] > 0) { + $file_lines = array_slice($file_lines, -$_POST['lines'], $_POST['lines'], true); + } + if ($_POST['sort'] == 'desc') { + $file_lines = array_reverse($file_lines, true); + } + foreach ($file_lines as $index => $line) { + foreach ($filters as $filter) { + $pos = strpos($line, $filter['pattern']); + if ($pos !== false){ + $filter_beg = ""; + $line = str_replace($_POST['filter'],"".$_POST['filter']."", $line); + $filter_end = ""; + } + } + if ($_POST['line_number']) { + $line_num = "".($index + 1)."   "; + } + echo $line_num." ".$filter_beg.$line.$filter_end."

"; + } + echo "
\n"; + } + else { + echo "

[ EMPTY FILE ]

"; + } + + echo " \n"; + echo "
\n"; + + } + else { + if ($_SESSION['server']['error']['text'] != '') { + echo "Server error log file not found at: ".$_SESSION['server']['error']['text']; + } + else { + echo "Server error log file path not defined in Settings."; + } + } + +// scroll to bottom of displayed lines, when appropriate + if ($_POST['sort'] != 'desc') { + echo "\n"; + } + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/errors/root.php b/app/errors/root.php new file mode 100644 index 0000000000..6fdf32f37b --- /dev/null +++ b/app/errors/root.php @@ -0,0 +1,90 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +// make sure the PATH_SEPARATOR is defined + umask(2); + if (!defined("PATH_SEPARATOR")) { + if (strpos($_ENV["OS"], "Win") !== false) { + define("PATH_SEPARATOR", ";"); + } else { + define("PATH_SEPARATOR", ":"); + } + } + + if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; + + // make sure the document_root is set + $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); + if(PHP_SAPI == 'cli'){ + chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME)); + $script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]); + $dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME)); + if (file_exists('/project_root.php')) { + $path = '/'; + } else { + $i = 1; + $path = ''; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + } + $_SERVER["DOCUMENT_ROOT"] = $path; + }else{ + $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); + } + $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); +// try to detect if a project path is being used + if (!defined('PROJECT_PATH')) { + if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) { + define('PROJECT_PATH', '/fusionpbx'); + } elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) { + define('PROJECT_PATH', ''); + } else { + $dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME))); + $i = 1; + $path = $_SERVER["DOCUMENT_ROOT"]; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + if(!file_exists($path. '/project_root.php')){ + die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); + } + $project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path); + define('PROJECT_PATH', $project_path); + } + $_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH); + set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]); + } + +?> \ No newline at end of file diff --git a/app/exec/app_config.php b/app/exec/app_config.php index 8aaef19565..f5ce6854b9 100644 --- a/app/exec/app_config.php +++ b/app/exec/app_config.php @@ -49,4 +49,4 @@ $apps[$x]['permissions'][$y]['name'] = "exec_sql_backup"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; -?> \ No newline at end of file +?> diff --git a/app/exec/app_menu.php b/app/exec/app_menu.php index e49d59f6b4..83fe7e9842 100644 --- a/app/exec/app_menu.php +++ b/app/exec/app_menu.php @@ -26,4 +26,4 @@ $apps[$x]['menu'][$y]['path'] = "/app/exec/exec.php"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; -?> \ No newline at end of file +?> diff --git a/app/exec/exec.php b/app/exec/exec.php index 101330587d..ac5a09b5cf 100644 --- a/app/exec/exec.php +++ b/app/exec/exec.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -53,7 +53,16 @@ //get the html values and set them as variables $handler = ($_REQUEST["handler"] != '') ? trim($_REQUEST["handler"]) : ((permission_exists('exec_switch')) ? 'switch' : null); - $cmd = trim($_POST["cmd"]); + $code = trim($_POST["code"]); + $command = trim($_POST["command"]); + +//check the captcha + $command_authorized = false; + if (strlen($code) > 0) { + if (strtolower($_SESSION['captcha']) == strtolower($code)) { + $command_authorized = true; + } + } //set editor moder switch ($handler) { @@ -66,7 +75,7 @@ require_once "resources/header.php"; $document['title'] = $text['title-command']; -//pdo voicemail database connection +//pdo database connection if (permission_exists('exec_sql')) { require_once "sql_query_pdo.php"; } @@ -75,13 +84,13 @@ ?> \n"; - echo "\n"; - } - echo " \n"; + echo " \n"; + //recordings + if($dh = opendir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/")) { + $tmp_selected = false; + $files = Array(); + echo "\n"; + while ($file = readdir($dh)) { + if ($file != "." && $file != ".." && $file[0] != '.') { + if (!is_dir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)) { + $selected = ($fax_send_greeting == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file && strlen($fax_send_greeting) > 0) ? true : false; + echo " \n"; + if ($selected) { $tmp_selected = true; } + } + } + } + closedir($dh); + echo "\n"; + } + //phrases + $sql = "select * from v_phrases where domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (count($result) > 0) { + echo "\n"; + foreach ($result as &$row) { + $selected = ($fax_send_greeting == "phrase:".$row["phrase_uuid"]) ? true : false; + echo " \n"; + if ($selected) { $tmp_selected = true; } + } + unset ($prep_statement); + echo "\n"; + } + //sounds + $file = new file; + $sound_files = $file->sounds(); + if (is_array($sound_files)) { + echo "\n"; + foreach ($sound_files as $value) { + if (strlen($value) > 0) { + if (substr($fax_send_greeting, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") { + $fax_send_greeting = substr($fax_send_greeting, 71); + } + $selected = ($fax_send_greeting == $value) ? true : false; + echo " \n"; if ($selected) { $tmp_selected = true; } } } + echo "\n"; } - closedir($dh); - echo "\n"; - } - //phrases - $sql = "select * from v_phrases where domain_uuid = '".$domain_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - if (count($result) > 0) { - echo "\n"; - foreach ($result as &$row) { - $selected = ($fax_send_greeting == "phrase:".$row["phrase_uuid"]) ? true : false; - echo " \n"; - if ($selected) { $tmp_selected = true; } - } - unset ($prep_statement); - echo "\n"; - } - //sounds - $file = new file; - $sound_files = $file->sounds(); - if (is_array($sound_files)) { - echo "\n"; - foreach ($sound_files as $value) { - if (strlen($value) > 0) { - if (substr($fax_send_greeting, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") { - $fax_send_greeting = substr($fax_send_greeting, 71); + //select + if (strlen($fax_send_greeting) > 0) { + if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) { + if (!$tmp_selected) { + echo "\n"; + if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$fax_send_greeting)) { + echo " \n"; + } + else if (substr($fax_send_greeting, -3) == "wav" || substr($fax_send_greeting, -3) == "mp3") { + echo " \n"; + } + else { + echo " \n"; + } + echo "\n"; } - $selected = ($fax_send_greeting == $value) ? true : false; - echo " \n"; - if ($selected) { $tmp_selected = true; } + unset($tmp_selected); } } - echo "\n"; - } - //select - if (strlen($fax_send_greeting) > 0) { - if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) { - if (!$tmp_selected) { - echo "\n"; - if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$fax_send_greeting)) { - echo " \n"; - } - else if (substr($fax_send_greeting, -3) == "wav" || substr($fax_send_greeting, -3) == "mp3") { - echo " \n"; - } - else { - echo " \n"; - } - echo "\n"; - } - unset($tmp_selected); - } - } - echo " \n"; - echo "
\n"; - echo " ".$text['description-fax_send_greeting']."\n"; - echo "\n"; - echo "\n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-fax_send_greeting']."\n"; + echo "\n"; + echo "\n"; + } echo "\n"; echo "\n"; @@ -902,6 +920,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; echo " \n"; + echo " \n"; //help defeat browser auto-fill echo "
\n"; echo " ".$text['description-email_connection_username']."\n"; echo "\n"; @@ -912,6 +931,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-email_connection_password']."\n"; echo "\n"; echo "\n"; + echo " \n"; //help defeat browser auto-fill echo " \n"; echo "
\n"; echo " ".$text['description-email_connection_password']."\n"; diff --git a/app/fax/fax_emails.php b/app/fax/fax_emails.php index c49b30270b..0a1967cf60 100644 --- a/app/fax/fax_emails.php +++ b/app/fax/fax_emails.php @@ -225,7 +225,7 @@ if (sizeof($result) != 0) { if ($fax_message != '') { $fax_message = strip_tags($fax_message); - $fax_message = str_replace(" ", "\r\n", $fax_message); + $fax_message = html_entity_decode($fax_message); $fax_message = str_replace("\r\n\r\n", "\r\n", $fax_message); } diff --git a/app/fax/fax_file_delete.php b/app/fax/fax_file_delete.php index e2781260cb..5c9b948a3b 100644 --- a/app/fax/fax_file_delete.php +++ b/app/fax/fax_file_delete.php @@ -17,22 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2015 + Portions created by the Initial Developer are Copyright (C) 2015 - 2018 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('fax_file_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('fax_file_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support require_once "app_languages.php"; @@ -46,7 +50,7 @@ else { } //validate the id - if (strlen($fax_file_uuid) > 0) { + if (is_uuid($fax_file_uuid)) { //get the fax file data $sql = "select * from v_fax_files "; $sql .= "where fax_file_uuid = '".$fax_file_uuid."' "; @@ -94,10 +98,10 @@ else { $prep_statement->execute(); unset($prep_statement); - messages::add($text['message-delete']); + message::add($text['message-delete']); } //redirect the user header('Location: fax_files.php?id='.$fax_uuid.'&box='.$type); -?> \ No newline at end of file +?> diff --git a/app/fax/fax_files.php b/app/fax/fax_files.php index 348fc4050f..7b5f984abf 100644 --- a/app/fax/fax_files.php +++ b/app/fax/fax_files.php @@ -47,10 +47,8 @@ $order = check_str($_GET["order"]); //get fax extension - if (strlen($_GET['id']) > 0) { - if (is_uuid($_GET["id"])) { - $fax_uuid = $_GET["id"]; - } + if (isset($_GET['id']) && is_uuid($_GET["id"])) { + $fax_uuid = $_GET["id"]; if (if_group("superadmin") || if_group("admin")) { //show all fax extensions $sql = "select fax_name, fax_extension from v_fax "; @@ -221,10 +219,10 @@ echo " \n"; echo " \n"; if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) { - echo " ".$text['header-inbox'].": ".$fax_name." (".$fax_extension.")\n"; + echo " ".$text['header-inbox'].": ".escape($fax_name)." (".escape($fax_extension).")\n"; } if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) { - echo " ".$text['header-sent'].": ".$fax_name." (".$fax_extension.")\n"; + echo " ".$text['header-sent'].": ".escape($fax_name)." (".escape($fax_extension).")\n"; } echo " \n"; echo " \n"; @@ -239,6 +237,7 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; +//show the fax files echo "\n"; echo "\n"; echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']); @@ -251,7 +250,7 @@ echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order, "&id=".$_GET['id']."&box=".$_GET['box']."&page=".$_GET['page']); echo "\n"; echo "\n"; - if ($num_rows > 0) { + if (is_array($fax_files)) { foreach($fax_files as $row) { $file = basename($row['fax_file_path']); if (strtolower(substr($file, -3)) == "tif" || strtolower(substr($file, -3)) == "pdf") { @@ -342,10 +341,10 @@ } echo " \n"; - echo " \n"; + echo " \n"; echo " "; if ($emails) { - rsort($emails); // most recent on top - foreach ($emails as $email_id) { $metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID)); $message = parse_message($connection, $email_id, FT_UID); @@ -240,10 +243,10 @@ else { echo "
 
\n"; if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) { - echo " \n"; + echo " \n"; } if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) { - echo " \n"; + echo " \n"; } echo " $file_name"; echo " "; @@ -359,17 +358,19 @@ } if (file_exists($dir_fax.'/'.$file_name.".pdf")) { if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) { - echo " PDF\n"; + echo " PDF\n"; } if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) { - echo " PDF\n"; + echo " PDF\n"; } } else { echo " \n"; } + $fax_date = ($_SESSION['domain']['time_format']['text'] == '12h') ? date("F d Y H:i", $row['fax_epoch']) : date("F d Y H:i", $row['fax_epoch']); + echo " ".date("F d Y H:i:s", strtotime(escape($row['fax_date'])))." ".$fax_date." "; if (permission_exists('fax_file_delete')) { echo "$v_link_label_delete"; diff --git a/app/fax/fax_files_remote.php b/app/fax/fax_files_remote.php index aa7bbc3f88..780e86e81b 100644 --- a/app/fax/fax_files_remote.php +++ b/app/fax/fax_files_remote.php @@ -24,18 +24,22 @@ Mark J Crane James Rose */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -require_once "resources/functions/object_to_array.php"; -require_once "resources/functions/parse_message.php"; -if (permission_exists('fax_inbox_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + require_once "resources/functions/object_to_array.php"; + require_once "resources/functions/parse_message.php"; + +//check permissions + if (permission_exists('fax_inbox_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -90,7 +94,7 @@ else { $fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert"; $fax_email_connection .= "}".$fax_email_connection_mailbox; if (!$connection = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) { - messages::add($text['message-cannot_connect']."(".imap_last_error().")", 'neative'); + message::add($text['message-cannot_connect']."(".imap_last_error().")", 'neative'); header("Location: fax.php"); exit; } @@ -131,7 +135,7 @@ else { } else{ //redirect user - messages::add($text['message-download_failed'], 'negative'); + message::add($text['message-download_failed'], 'negative'); header("Location: ?id=".$fax_uuid); exit; } @@ -148,21 +152,21 @@ else { $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name']; @unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment['name']); //redirect user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: ?id=".$fax_uuid); exit; } } else { //redirect user - messages::add($text['message-delete_failed'], 'negative'); + message::add($text['message-delete_failed'], 'negative'); header("Location: ?id=".$fax_uuid); exit; } } else { //redirect user - messages::add($text['message-delete_failed'], 'negative'); + message::add($text['message-delete_failed'], 'negative'); header("Location: ?id=".$fax_uuid); exit; } @@ -175,6 +179,7 @@ else { //show the header require_once "resources/header.php"; +//set the row styles $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; @@ -206,9 +211,7 @@ else { echo "
"; echo "

"; -/* close the connection */ -imap_close($connection); - +//close the connection + imap_close($connection); //show the footer require_once "resources/footer.php"; + ?> diff --git a/app/fax/fax_log_delete.php b/app/fax/fax_log_delete.php index bf815ceb3e..72b224f0bb 100755 --- a/app/fax/fax_log_delete.php +++ b/app/fax/fax_log_delete.php @@ -1,14 +1,42 @@ + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('fax_log_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -20,18 +48,19 @@ else { $fax_uuid = check_str($_GET["fax_uuid"]); } -if (strlen($id)>0) { - //delete fax_log - $sql = "delete from v_fax_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fax_log_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} +//delete the fax log + if (strlen($id)>0) { + //delete fax_log + $sql = "delete from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_log_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); + } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: fax_logs.php?id='.$fax_uuid); -?> \ No newline at end of file +?> diff --git a/app/fax/fax_log_view.php b/app/fax/fax_log_view.php index edf0e96065..0a56fbef8d 100644 --- a/app/fax/fax_log_view.php +++ b/app/fax/fax_log_view.php @@ -1,14 +1,42 @@ + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('fax_log_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -157,4 +185,5 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file + +?> diff --git a/app/fax/fax_logs.php b/app/fax/fax_logs.php index 989a44d614..59aae70d5f 100755 --- a/app/fax/fax_logs.php +++ b/app/fax/fax_logs.php @@ -1,14 +1,42 @@ + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('fax_log_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -44,46 +72,48 @@ else { echo " \n"; echo "\n"; - //prepare to page the results - $sql = "select count(*) as num_rows from v_fax_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fax_uuid = '$fax_uuid' "; - $prep_statement = $db->prepare($sql); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['num_rows'] > 0) { - $num_rows = $row['num_rows']; - } - else { - $num_rows = '0'; - } +//prepare to page the results + $sql = "select count(*) as num_rows from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_uuid = '$fax_uuid' "; + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] > 0) { + $num_rows = $row['num_rows']; } + else { + $num_rows = '0'; + } + } - //prepare to page the results - $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - $param = "&id=".$fax_uuid."&order_by=".$order_by."&order=".$order; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; +//prepare to page the results + $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; + $param = "&id=".$fax_uuid."&order_by=".$order_by."&order=".$order; + $page = $_GET['page']; + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); + $offset = $rows_per_page * $page; - //get the list - $sql = "select * from v_fax_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fax_uuid = '$fax_uuid' "; - $sql .= (strlen($order_by) > 0) ? "order by ".$order_by." ".$order." " : "order by fax_epoch desc "; - $sql .= "limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); +//get the list + $sql = "select * from v_fax_logs "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and fax_uuid = '$fax_uuid' "; + $sql .= (strlen($order_by) > 0) ? "order by ".$order_by." ".$order." " : "order by fax_epoch desc "; + $sql .= "limit $rows_per_page offset $offset "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $fax_logs = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $result_count = count($result); + unset ($prep_statement, $sql); +//set the row style $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; +//show the fax logs echo "\n"; echo "\n"; echo th_order_by('fax_success', $text['label-fax_success'], $order_by, $order, null, null, "&id=".$fax_uuid); @@ -109,8 +139,11 @@ else { echo "\n"; echo "\n"; - if ($result_count > 0) { - foreach($result as $row) { + if (is_array($fax_logs)) { + foreach($fax_logs as $row) { + //$fax_date = date("j M Y", $row['fax_date'].' 00:00:00'); + $fax_date = ($_SESSION['domain']['time_format']['text'] == '12h') ? date("j M Y g:i:sa", $row['fax_epoch']) : date("j M Y H:i:s", $row['fax_epoch']); + $tr_link = "href='fax_log_view.php?id=".$row['fax_log_uuid']."&fax_uuid=".$fax_uuid."'"; echo "\n"; echo " \n"; @@ -129,7 +162,7 @@ else { //echo " \n"; //echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; //echo " \n"; echo " \n"; if ($c==0) { $c=1; } else { $c=0; } } //end foreach - unset($sql, $result, $row_count); + unset($sql, $fax_logs); } //end if results echo "
".$row['fax_success']." ".$row['fax_retry_limit']." ".$row['fax_retry_sleep']." ".basename($row['fax_uri'])." ".$row['fax_date']." ".$fax_date." ".$row['fax_epoch']." "; echo "".$v_link_label_view.""; @@ -140,7 +173,7 @@ else { echo "
"; @@ -150,4 +183,5 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file + +?> diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php index a5807782d9..9a8d453b3a 100644 --- a/app/fax/fax_send.php +++ b/app/fax/fax_send.php @@ -33,16 +33,19 @@ if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; if (!$included) { - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - if (permission_exists('fax_send')) { - //access granted - } - else { - echo "access denied"; - exit; - } + //includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + + //check permissions + if (permission_exists('fax_send')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -110,11 +113,11 @@ if (!$included) { // set fax cover font to generate pdf $fax_cover_font = $_SESSION['fax']['cover_font']['text']; } -else{ +else { require_once "resources/classes/event_socket.php"; } -if(!function_exists('correct_path')) { +if (!function_exists('correct_path')) { function correct_path($p) { global $IS_WINDOWS; if ($IS_WINDOWS) { @@ -124,7 +127,7 @@ if(!function_exists('correct_path')) { } } -if(!function_exists('gs_cmd')) { +if (!function_exists('gs_cmd')) { function gs_cmd($args) { global $IS_WINDOWS; if ($IS_WINDOWS) { @@ -134,7 +137,7 @@ if(!function_exists('gs_cmd')) { } } -if(!function_exists('fax_enqueue')) { +if (!function_exists('fax_enqueue')) { function fax_enqueue($fax_uuid, $fax_file, $wav_file, $reply_address, $fax_uri, $fax_dtmf, $dial_string){ global $db, $db_type; @@ -186,16 +189,16 @@ HERE; } } -if(!function_exists('fax_split_dtmf')) { -function fax_split_dtmf(&$fax_number, &$fax_dtmf){ - $tmp = array(); - $fax_dtmf = ''; - if(preg_match('/^\s*(.*?)\s*\((.*)\)\s*$/', $fax_number, $tmp)){ - $fax_number = $tmp[1]; - $fax_dtmf = $tmp[2]; +if (!function_exists('fax_split_dtmf')) { + function fax_split_dtmf(&$fax_number, &$fax_dtmf){ + $tmp = array(); + $fax_dtmf = ''; + if(preg_match('/^\s*(.*?)\s*\((.*)\)\s*$/', $fax_number, $tmp)){ + $fax_number = $tmp[1]; + $fax_dtmf = $tmp[2]; + } } } -} //get the fax extension if (strlen($fax_extension) > 0) { @@ -300,8 +303,8 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ $gs_g = ((int) ($page_width * 204)).'x'.((int) ($page_height * 196)); break; case 'superfine': - $gs_r = '408x391'; - $gs_g = ((int) ($page_width * 408)).'x'.((int) ($page_height * 391)); + $gs_r = '204x392'; + $gs_g = ((int) ($page_width * 204)).'x'.((int) ($page_height * 392)); break; case 'normal': default: @@ -347,7 +350,6 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ $fax_name = str_replace("+", "_", $fax_name); $fax_name = str_replace("=", "_", $fax_name); - $attachment_file_name = $_files['name'][$index]; rename($dir_fax_temp.'/'.$attachment_file_name, $dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension); unset($attachment_file_name); @@ -374,8 +376,12 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ if (file_exists($dir_fax_temp.'/'.$fax_name.'.pdf')) { chdir($dir_fax_temp); + //$cmd = gs_cmd("-q -sDEVICE=psmono -r".$gs_r." -g".$gs_g." -dNOPAUSE -dBATCH -dSAFER -sOutputFile=".correct_path($fax_name).".pdf -- ".correct_path($fax_name).".pdf -c quit"); + // echo($cmd . "
\n"); + //exec($cmd); + //convert pdf to tif - $cmd = gs_cmd("-q -sDEVICE=tiffg3 -r".$gs_r." -g".$gs_g." -dNOPAUSE -sOutputFile=".correct_path($fax_name).".tif -- ".correct_path($fax_name).".pdf -c quit"); + $cmd = gs_cmd("-q -sDEVICE=tiffg32d -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile=".correct_path($fax_name).".tif -- ".correct_path($fax_name).".pdf -c quit"); // echo($cmd . "
\n"); exec($cmd); @unlink($dir_fax_temp.'/'.$fax_name.'.pdf'); @@ -594,7 +600,8 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ //convert pdf to tif, add to array of pages, delete pdf if (file_exists($dir_fax_temp.'/'.$fax_instance_uuid.'_cover.pdf')) { chdir($dir_fax_temp); - $cmd = gs_cmd("-q -sDEVICE=tiffg3 -r".$gs_r." -g".$gs_g." -dNOPAUSE -sOutputFile=".correct_path($fax_instance_uuid)."_cover.tif -- ".correct_path($fax_instance_uuid)."_cover.pdf -c quit"); + + $cmd = gs_cmd("-q -sDEVICE=tiffg32d -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile=".correct_path($fax_instance_uuid)."_cover.tif -- ".correct_path($fax_instance_uuid)."_cover.pdf -c quit"); // echo($cmd . "
\n"); exec($cmd); if (is_array($tif_files) && sizeof($tif_files) > 0) { @@ -633,8 +640,12 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ chdir($dir_fax_temp); + //$cmd = gs_cmd("-q -sDEVICE=psmono -r".$gs_r." -g".$gs_g." -dNOPAUSE -dBATCH -dSAFER -sOutputFile=".correct_path($fax_instance_uuid).".pdf -- ".correct_path($fax_instance_uuid).".pdf -c quit"); + // echo($cmd . "
\n"); + //exec($cmd); + //convert pdf to tif - $cmd = gs_cmd('-q -sDEVICE=tiffg3 -r'.$gs_r.' -g'.$gs_g.' -dNOPAUSE -sOutputFile='. + $cmd = gs_cmd('-q -sDEVICE=tiffg32d -r'.$gs_r.' -g'.$gs_g.' -dBATCH -dPDFFitPage -dNOPAUSE -sOutputFile='. correct_path($fax_instance_uuid.'_temp.tif'). ' -- '.$fax_instance_uuid.'.pdf -c quit'); // echo($cmd . "
\n"); @@ -656,7 +667,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ else { if (!$included) { //nothing to send, redirect the browser - messages::add($text['message-invalid-fax'], 'negative'); + message::add($text['message-invalid-fax'], 'negative'); header("Location: fax_send.php?id=".$fax_uuid); exit; } @@ -786,7 +797,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ } fclose($fp); } - else{ // enqueue + else { // enqueue $wav_file = ''; //! @todo add custom message $response = fax_enqueue($fax_uuid, $fax_file, $wav_file, $mailto_address, $fax_uri, $fax_dtmf, $dial_string); } @@ -806,8 +817,8 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){ if (!$included) { //redirect the browser - messages::add($response, 'default'); - if (permission_exists('fax_active_view')) { + message::add($response, 'default'); + if (isset($_SESSION['fax']['send_mode']['text']) && $_SESSION['fax']['send_mode']['text'] == 'queue') { header("Location: fax_active.php?id=".$fax_uuid); } else { @@ -911,7 +922,7 @@ if (!$included) { echo " ".$text['label-fax-sender']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo " ".$text['description-fax-sender']."\n"; echo "\n"; @@ -960,11 +971,10 @@ if (!$included) { $sql .= ") \n"; } $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement -> execute(); - $result = $prep_statement -> fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - if ($result_count > 0) { - foreach ($result as &$row) { + $prep_statement->execute(); + $contacts = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($contacts)) { + foreach ($contacts as &$row) { if ($row['contact_organization'] != '') { $contact_option_label = $row['contact_organization']; } @@ -976,7 +986,7 @@ if (!$included) { } $contact_option_value_recipient = $contact_option_label; $contact_option_value_faxnumber = $row['phone_number']; - $contact_option_label .= ":  ".format_phone($row['phone_number']); + $contact_option_label .= ":  ".escape(format_phone($row['phone_number'])); $contact_labels[] = $contact_option_label; $contact_values[] = $contact_option_value_faxnumber."|".$contact_option_value_recipient; unset($contact_option_label); @@ -985,13 +995,13 @@ if (!$included) { echo " \n"; } - unset ($prep_statement); + unset($prep_statement); echo " \n"; - if ($result_count > 0) { + if (is_array($contacts)) { echo " \n"; } echo "
\n"; @@ -1099,10 +1109,10 @@ if (!$included) { echo " \n"; echo " \n"; echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; diff --git a/app/fifo/fifo_add.php b/app/fifo/fifo_add.php index 97dac59887..77ec59ce28 100644 --- a/app/fifo/fifo_add.php +++ b/app/fifo/fifo_add.php @@ -276,7 +276,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $cache->delete("dialplan:".$_SESSION["context"]); //redirect the user - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: ".PROJECT_PATH."/app/dialplans/dialplans.php?app_uuid=16589224-c876-aeb3-f59f-523a1c0801f7"); return; diff --git a/app/follow_me/app_config.php b/app/follow_me/app_config.php index 17b130162a..f01b395aac 100644 --- a/app/follow_me/app_config.php +++ b/app/follow_me/app_config.php @@ -35,46 +35,55 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_add"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_destination_view"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_destination_add"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_destination_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_destination_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_ignore_busy"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_cid_name_prefix"; //$apps[$x]['permissions'][$y]['groups'][] = "superadmin"; @@ -88,6 +97,7 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "follow_me_caller_id"; diff --git a/app/follow_me/app_menu.php b/app/follow_me/app_menu.php index 62127cfbcd..932d1e07c0 100644 --- a/app/follow_me/app_menu.php +++ b/app/follow_me/app_menu.php @@ -24,8 +24,9 @@ $apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5"; $apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['path'] = "/app/calls/calls.php"; - $apps[$x]['menu'][$y]['groups'][] = "user"; - $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; + $apps[$x]['menu'][$y]['groups'][] = "admin"; + $apps[$x]['menu'][$y]['groups'][] = "user"; + $apps[$x]['menu'][$y]['groups'][] = "agent"; ?> diff --git a/app/gateways/gateway_copy.php b/app/gateways/gateway_copy.php index 8edcd47755..493108d6e7 100644 --- a/app/gateways/gateway_copy.php +++ b/app/gateways/gateway_copy.php @@ -55,6 +55,7 @@ $prep_statement->execute(); $gateways = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($gateways as &$row) { + $domain_uuid = $row["domain_uuid"]; $gateway = $row["gateway"]; $username = $row["username"]; $password = $row["password"]; @@ -127,7 +128,7 @@ $sql .= ")"; $sql .= "values "; $sql .= "("; - if (strlen($domain_uuid) == 0) { + if (strlen($domain_uuid) > 0) { $sql .= "'$domain_uuid', "; } else { @@ -170,8 +171,14 @@ //synchronize the xml config save_gateway_xml(); +//clear the cache + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + $hostname = trim(event_socket_request($fp, 'api switchname')); + $cache = new cache; + $cache->delete("configuration:sofia.conf:".$hostname); + //redirect the user - messages::add($text['message-copy']); + message::add($text['message-copy']); header("Location: gateways.php"); return; diff --git a/app/gateways/gateway_delete.php b/app/gateways/gateway_delete.php index 23a1a6d867..6d99c9da77 100644 --- a/app/gateways/gateway_delete.php +++ b/app/gateways/gateway_delete.php @@ -23,81 +23,85 @@ Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('gateway_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('gateway_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; $text = $language->get(); -if (strlen($_GET["id"])>0) { - //set the variable - $id = check_str($_GET["id"]); +//delete the gateway + if (is_uuid($_GET["id"])) { + //set the variable + $id = check_str($_GET["id"]); - //get the gateway name - $sql = "select * from v_gateways "; - $sql .= "where gateway_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $gateway_uuid = $row["gateway_uuid"]; - $gateway = $row["gateway"]; - $profile = $row["profile"]; - } - unset ($prep_statement); - - //remove gateway from session variable - unset($_SESSION['gateways'][$gateway_uuid]); - - //delete the xml file - if ($_SESSION['switch']['sip_profiles']['dir'] != '') { - $gateway_xml_file = $_SESSION['switch']['sip_profiles']['dir']."/".$profile."/v_".$gateway_uuid.".xml"; - if (file_exists($gateway_xml_file)) { - unlink($gateway_xml_file); + //get the gateway name + $sql = "select * from v_gateways "; + $sql .= "where gateway_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $gateway_uuid = $row["gateway_uuid"]; + $gateway = $row["gateway"]; + $profile = $row["profile"]; } - } + unset ($prep_statement); - //create the event socket connection and stop the gateway - if (!$fp) { + //remove gateway from session variable + unset($_SESSION['gateways'][$gateway_uuid]); + + //delete the xml file + if ($_SESSION['switch']['sip_profiles']['dir'] != '') { + $gateway_xml_file = $_SESSION['switch']['sip_profiles']['dir']."/".$profile."/v_".$gateway_uuid.".xml"; + if (file_exists($gateway_xml_file)) { + unlink($gateway_xml_file); + } + } + + //create the event socket connection and stop the gateway + if (!$fp) { + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + } + + //send the api gateway stop command over event socket + $cmd = 'api sofia profile '.$profile.' killgw '.$gateway_uuid; + $response = event_socket_request($fp, $cmd); + unset($cmd); + + //delete the gateway + $sql = "delete from v_gateways "; + $sql .= "where gateway_uuid = '$id' "; + $db->query($sql); + unset($sql); + + //syncrhonize configuration + save_gateway_xml(); + + //clear the cache $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - } - - //send the api gateway stop command over event socket - $cmd = 'api sofia profile '.$profile.' killgw '.$gateway_uuid; - $response = event_socket_request($fp, $cmd); - unset($cmd); - - //delete the gateway - $sql = "delete from v_gateways "; - $sql .= "where gateway_uuid = '$id' "; - $db->query($sql); - unset($sql); - - //syncrhonize configuration - save_gateway_xml(); - - //delete the gateways from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { $hostname = trim(event_socket_request($fp, 'api switchname')); - $switch_cmd = "memcache delete configuration:sofia.conf:".$hostname; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } + $cache = new cache; + $cache->delete("configuration:sofia.conf:".$hostname); + - //rescan the sip profile to look for new or stopped gateways //create the event socket connection and send a command if (!$fp) { $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); } + + //rescan the sip profile to look for new or stopped gateways if ($fp) { //send the api commandover event socket $cmd = 'api sofia profile '.$profile.' rescan'; @@ -110,11 +114,11 @@ if (strlen($_GET["id"])>0) { //clear the apply settings reminder $_SESSION["reload_xml"] = false; -} + } //redirect the users - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: gateways.php"); return; -?> \ No newline at end of file +?> diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index d10f6c593e..d1e37b58b8 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -74,7 +74,7 @@ } unset($prep_statement, $row); if ($total_gateways >= $_SESSION['limit']['gateways']['numeric']) { - messages::add($text['message-maximum_gateways'].' '.$_SESSION['limit']['gateways']['numeric'], 'negative'); + message::add($text['message-maximum_gateways'].' '.$_SESSION['limit']['gateways']['numeric'], 'negative'); header('Location: gateways.php'); return; } @@ -124,39 +124,22 @@ //check for all required data $msg = ''; - //if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."
\n"; } if (strlen($gateway) == 0) { $msg .= $text['message-required']." ".$text['label-gateway']."
\n"; } if ($register == "true") { if (strlen($username) == 0) { $msg .= $text['message-required']." ".$text['label-username']."
\n"; } if (strlen($password) == 0) { $msg .= $text['message-required']." ".$text['label-password']."
\n"; } } - //if (strlen($distinct_to) == 0) { $msg .= $text['message-required']." ".$text['label-distinct_to']."
\n"; } - //if (strlen($auth_username) == 0) { $msg .= $text['message-required']." ".$text['label-auth_username']."
\n"; } - //if (strlen($realm) == 0) { $msg .= $text['message-required']." ".$text['label-realm']."
\n"; } - //if (strlen($from_user) == 0) { $msg .= $text['message-required']." ".$text['label-from_user']."
\n"; } - //if (strlen($from_domain) == 0) { $msg .= $text['message-required']." ".$text['label-from_domain']."
\n"; } - //if (strlen($proxy) == 0) { $msg .= $text['message-required']." ".$text['label-proxy']."
\n"; } - //if (strlen($register_proxy) == 0) { $msg .= $text['message-required']." ".$text['label-register_proxy']."
\n"; } - //if (strlen($outbound_proxy) == 0) { $msg .= $text['message-required']." ".$text['label-outbound_proxy']."
\n"; } + if (strlen($proxy) == 0) { $msg .= $text['message-required']." ".$text['label-proxy']."
\n"; } if (strlen($expire_seconds) == 0) { $msg .= $text['message-required']." ".$text['label-expire_seconds']."
\n"; } if (strlen($register) == 0) { $msg .= $text['message-required']." ".$text['label-register']."
\n"; } - //if (strlen($register_transport) == 0) { $msg .= $text['message-required']." ".$text['label-register_transport']."
\n"; } if (strlen($retry_seconds) == 0) { $msg .= $text['message-required']." ".$text['label-retry_seconds']."
\n"; } - //if (strlen($extension) == 0) { $msg .= $text['message-required']." ".$text['label-extension']."
\n"; } - //if (strlen($ping) == 0) { $msg .= $text['message-required']." ".$text['label-ping']."
\n"; } if (strlen($channels) == 0) { //$msg .= $text['message-required']." ".$text['label-channels']."
\n"; $channels = 0; } - //if (strlen($caller_id_in_from) == 0) { $msg .= $text['message-required']." ".$text['label-caller_id_in_from']."
\n"; } - //if (strlen($supress_cng) == 0) { $msg .= $text['message-required']." ".$text['label-supress_cng']."
\n"; } - //if (strlen($sip_cid_type) == 0) { $msg .= $text['message-required']." ".$text['label-sip_cid_type']."
\n"; } - //if (strlen($codec_prefs) == 0) { $msg .= $text['message-required']." ".$text['label-codec_prefs']."
\n"; } - //if (strlen($extension_in_contact) == 0) { $msg .= $text['message-required']." ".$text['label-extension_in_contact']."
\n"; } if (strlen($context) == 0) { $msg .= $text['message-required']." ".$text['label-context']."
\n"; } if (strlen($profile) == 0) { $msg .= $text['message-required']." ".$text['label-profile']."
\n"; } if (strlen($enabled) == 0) { $msg .= $text['message-required']." ".$text['label-enabled']."
\n"; } - //if (strlen($description) == 0) { $msg .= $text['message-required']." ".$text['label-description']."
\n"; } if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { require_once "resources/header.php"; require_once "resources/persist_form_var.php"; @@ -241,18 +224,16 @@ unlink($gateway_xml_file); } } - + //syncrhonize configuration save_gateway_xml(); - - //delete the sip profiles from memcache + + //clear the cache $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $hostname = trim(event_socket_request($fp, 'api switchname')); - $switch_cmd = "memcache delete configuration:sofia.conf:".$hostname; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } - + $hostname = trim(event_socket_request($fp, 'api switchname')); + $cache = new cache; + $cache->delete("configuration:sofia.conf:".$hostname); + //rescan the external profile to look for new or stopped gateways //create the event socket connection $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); @@ -266,14 +247,14 @@ $_SESSION["reload_xml"] = false; } //if ($_POST["persistformvar"] != "true") - + //redirect the user if (isset($action)) { if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } header("Location: gateways.php"); return; @@ -401,6 +382,7 @@ echo "\n"; echo "\n"; echo " \n"; + echo " \n"; //help defeat browser auto-fill echo "
\n"; echo $text['description-username']."\n"; echo "\n"; @@ -411,7 +393,8 @@ echo " ".$text['label-password']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; //help defeat browser auto-fill + echo " \n"; echo "
\n"; echo " ".$text['description-password']."\n"; echo "\n"; diff --git a/app/grandstream/app_config.php b/app/grandstream/app_config.php index decd654f75..815f03e00a 100644 --- a/app/grandstream/app_config.php +++ b/app/grandstream/app_config.php @@ -26,6 +26,7 @@ $apps[$x]['description']['ru-ru'] = ""; $apps[$x]['description']['sv-se'] = ""; $apps[$x]['description']['uk-ua'] = ""; + //default settings $y=0; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bf083e2c-ad73-48ba-a981-9e1c92b2554e"; @@ -97,15 +98,15 @@ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_lan_port_vlan"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone LAN port."; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone LAN port. Default 0 is disabled."; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5200174e-b644-438f-a2f8-b721ee052cea"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_pc_port_vlan"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Default VLAN for phone PC port."; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3adbb11-4e9f-4a56-86f8-0fefa5fb8c1d"; @@ -276,14 +277,6 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper Image JPEG 480x272 16-bit depth dithered"; $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f7f352d2-a3f0-4ea3-b013-8856404b66a4"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_dial_plan"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "{x+|*x+|*++|\p\a\r\k\+*x+|\f\l\o\w\+*x+}"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Define the digits that are allowed to be called."; - $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a004dee4-4621-4c6d-8c20-7f315f812d85"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_bluetooth_power"; @@ -388,4 +381,13 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "SRTP Mode. 0 - Disabled, 1 - Enabled but not forced, 2 - Enabled and forced, 3 - Optional. Default is 0"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "37bb9332-5261-4826-b675-0fd4b836bb98"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_account_ring_tone_1"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Account Ring Tone. 0 - system ring tone, 1 - custom ring tone 1, 2 - custom ring tone 2, 3 - custom ring tone, 4 - silent. Default is 0"; + $y++; + ?> diff --git a/app/gswave/app_config.php b/app/gswave/app_config.php new file mode 100644 index 0000000000..078856850f --- /dev/null +++ b/app/gswave/app_config.php @@ -0,0 +1,31 @@ + diff --git a/app/gswave/app_languages.php b/app/gswave/app_languages.php new file mode 100644 index 0000000000..a1654d9041 --- /dev/null +++ b/app/gswave/app_languages.php @@ -0,0 +1,63 @@ + \ No newline at end of file diff --git a/app/gswave/app_menu.php b/app/gswave/app_menu.php new file mode 100644 index 0000000000..a4d5490d3d --- /dev/null +++ b/app/gswave/app_menu.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/app/gswave/index.php b/app/gswave/index.php new file mode 100644 index 0000000000..cf37e2b04d --- /dev/null +++ b/app/gswave/index.php @@ -0,0 +1,201 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('extension_edit')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//verify the id is as uuid then set as a variable + if (is_uuid($_GET['id'])) { + $extension_uuid = $_GET['id']; + } + +//get the extensions + $sql = "select * from v_extensions "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and enabled = 'true' "; + $sql .= "order by extension asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + +//get the extension + if (is_uuid($_GET['id'])) { + $sql = "select * from v_extensions "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and extension_uuid = '".$extension_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $extension = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $field = $extension[0]; + unset ($prep_statement, $sql); + } + +//get the username + $username = $field['extension']; + if (isset($row['number_alias']) && strlen($row['number_alias']) > 0) { + $username = $field['number_alias']; + } + +//build the xml + if (is_uuid($_GET['id'])) { + $xml = ""; + $xml .= ""; + $xml .= ""; + $xml .= "".$_SESSION['domain_name'].""; + //$xml .= "".$_SESSION['domain_name'].""; + //$xml .= "".$_SESSION['domain_name'].""; + $xml .= "".$_SESSION['domain_name'].":".$_SESSION['provision']['line_sip_port']['numeric'].""; + $xml .= "".$_SESSION['domain_name'].":".$_SESSION['provision']['line_sip_port']['numeric'].""; + $xml .= "".$username.""; + $xml .= "".$username.""; + $xml .= "".$field['password'].""; + $xml .= "".$username.""; + $xml .= "".$username.""; + $xml .= "{x+|*x+|*++}"; + $xml .= "0"; + $xml .= "*97"; + $xml .= ""; + $xml .= ""; + } + +//debian + //apt install qrencode + +//additional includes + require_once "resources/header.php"; + +//show the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-gswave']."\n"; + //echo " "; + echo "
\n"; + echo "
".$text['title_description-gswave']."

\n"; + echo "
\n"; + +//show the content + echo "
\n"; + echo "\n"; + + //echo "\n"; + //echo "\n"; + //echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + //echo "\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + //echo "
\n"; + //echo "
\n"; + echo " ".$text['label-extension']."\n"; + echo "\n"; + echo " \n"; + //echo "
\n"; + //echo $text['description-extension']."\n"; + echo "
".$text['title-message']."

\n"; + echo "
\n"; + echo " "; + echo " "; + echo "
"; + echo "
"; + //echo "
"; + +//stream the file + if (is_uuid($_GET['id'])) { + $include_path = get_include_path(); + $xml = html_entity_decode( $xml, ENT_QUOTES, 'UTF-8' ); + set_include_path ($_SERVER["PROJECT_ROOT"].'/resources/qr_code'); + + require_once 'QRErrorCorrectLevel.php'; + require_once 'QRCode.php'; + require_once 'QRCodeImage.php'; + + try { + $code = new QRCode (- 1, QRErrorCorrectLevel::H); + $code->addData($xml); + $code->make(); + + $img = new QRCodeImage ($code, $width=420, $height=420, $quality=50); + $img->draw(); + $image = $img->getImage(); + $img->finish(); + + //if ($image) { + // header ( 'Content-Type: image/jpeg' ); + // header ( 'Content-Length: ' . strlen ( $imgdata ) ); + // echo $image; + //} + } + catch (Exception $error) { + echo $error; + } + } + +//html image + if (is_uuid($_GET['id'])) { + echo "\n"; + } + +//add the footer + set_include_path ($include_path); + require_once "resources/footer.php"; + +?> diff --git a/app/gswave/resources/images/apple_app_store.png b/app/gswave/resources/images/apple_app_store.png new file mode 100644 index 0000000000..42d1697dce Binary files /dev/null and b/app/gswave/resources/images/apple_app_store.png differ diff --git a/app/gswave/resources/images/google_play.png b/app/gswave/resources/images/google_play.png new file mode 100644 index 0000000000..e0cbf9c36a Binary files /dev/null and b/app/gswave/resources/images/google_play.png differ diff --git a/app/gswave/root.php b/app/gswave/root.php new file mode 100644 index 0000000000..6fdf32f37b --- /dev/null +++ b/app/gswave/root.php @@ -0,0 +1,90 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +// make sure the PATH_SEPARATOR is defined + umask(2); + if (!defined("PATH_SEPARATOR")) { + if (strpos($_ENV["OS"], "Win") !== false) { + define("PATH_SEPARATOR", ";"); + } else { + define("PATH_SEPARATOR", ":"); + } + } + + if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; + + // make sure the document_root is set + $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); + if(PHP_SAPI == 'cli'){ + chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME)); + $script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]); + $dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME)); + if (file_exists('/project_root.php')) { + $path = '/'; + } else { + $i = 1; + $path = ''; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + } + $_SERVER["DOCUMENT_ROOT"] = $path; + }else{ + $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); + } + $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); +// try to detect if a project path is being used + if (!defined('PROJECT_PATH')) { + if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) { + define('PROJECT_PATH', '/fusionpbx'); + } elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) { + define('PROJECT_PATH', ''); + } else { + $dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME))); + $i = 1; + $path = $_SERVER["DOCUMENT_ROOT"]; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + if(!file_exists($path. '/project_root.php')){ + die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); + } + $project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path); + define('PROJECT_PATH', $project_path); + } + $_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH); + set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]); + } + +?> \ No newline at end of file diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index abe87fce45..1ef4d2861c 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -92,6 +92,12 @@ $apps[$x]['permissions'][$y]['name'] = "ivr_menu_option_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "ivr_menu_context"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "ivr_menu_domain"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //default settings $y=0; @@ -250,6 +256,10 @@ $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'] = "ivr_menu_context"; + $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'] = "ivr_menu_enabled"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; diff --git a/app/ivr_menus/ivr_menu_copy.php b/app/ivr_menus/ivr_menu_copy.php index 25430fff4c..4a333cce9a 100644 --- a/app/ivr_menus/ivr_menu_copy.php +++ b/app/ivr_menus/ivr_menu_copy.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -161,15 +161,12 @@ //synchronize the xml config save_dialplan_xml(); -//delete the dialplan context from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd = "memcache delete dialplan:".$_SESSION["context"]; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } +//clear the cache + $cache = new cache; + $cache->delete("dialplan:".$_SESSION["context"]); //redirect the user - messages::add($text['message-copy']); + message::add($text['message-copy']); header("Location: ivr_menus.php"); return; diff --git a/app/ivr_menus/ivr_menu_delete.php b/app/ivr_menus/ivr_menu_delete.php index 6e8a83bdbf..dd453c7726 100644 --- a/app/ivr_menus/ivr_menu_delete.php +++ b/app/ivr_menus/ivr_menu_delete.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -43,7 +43,7 @@ //get the id if (is_array($_GET)) { - $id = check_str($_GET["id"]); + $id = $_GET["id"]; } //delete the ivr menu @@ -51,52 +51,47 @@ //get the dialplan_uuid $sql = "select * from v_ivr_menus "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and ivr_menu_uuid = '".$id."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(); + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "and ivr_menu_uuid = :ivr_menu_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $parameters['ivr_menu_uuid'] = $id; + $database = new database; + $result = $database->select($sql, $parameters); if (is_array($result)) { foreach ($result as &$row) { $dialplan_uuid = $row["dialplan_uuid"]; + $ivr_menu_context = $row["ivr_menu_context"]; } - unset ($sql,$result,$prep_statement); } + unset($sql, $parameters); - //delete the dialplan - $sql = "delete from v_dialplans "; - $sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' "; - $sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset ($sql,$prep_statement); + //add the dialplan permission + $p = new permissions; + $p->add('dialplan_delete', 'temp'); - //delete the ivr menu options - $sql = "delete from v_ivr_menu_options "; - $sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' "; - $sql .= "and ivr_menu_uuid = '".$id."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset ($sql,$prep_statement); + //delete the data + $array['dialplans'][]['dialplan_uuid'] = $dialplan_uuid; + $array['ivr_menu_options'][]['ivr_menu_uuid'] = $id; + $array['ivr_menus'][]['ivr_menu_uuid'] = $id; + $database = new database; + $database->app_name = 'ivr_menus'; + $database->app_uuid = 'a5788e9b-58bc-bd1b-df59-fff5d51253ab'; + $database->delete($array); + //$message = $database->message; - //delete the ivr menu - $sql = "delete from v_ivr_menus "; - $sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' "; - $sql .= "and ivr_menu_uuid = '".$id."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset ($sql,$prep_statement); + //remove the temporary permission + $p->delete('dialplan_delete', 'temp'); //synchronize the xml config save_dialplan_xml(); //clear the cache $cache = new cache; - $cache->delete("dialplan:".$_SESSION["context"]); + $cache->delete("dialplan:".$ivr_menu_context); } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: ivr_menus.php"); ?> diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 0888ce3373..437b64a03a 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -49,10 +49,10 @@ // moved to functions.php //action add or update - if (strlen($_REQUEST["id"]) > 0) { + if (isset($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) { $action = "update"; $ivr_menu_uuid = check_str($_REQUEST["id"]); - if (strlen($_REQUEST["ivr_menu_uuid"]) > 0) { + if (isset($_REQUEST["ivr_menu_uuid"]) > 0) { $ivr_menu_uuid = $_REQUEST["ivr_menu_uuid"]; } } @@ -72,7 +72,7 @@ } unset($prep_statement, $row); if ($total_ivr_menus >= $_SESSION['limit']['ivr_menus']['numeric']) { - messages::add($text['message-maximum_ivr_menus'].' '.$_SESSION['limit']['ivr_menus']['numeric'], 'negative'); + message::add($text['message-maximum_ivr_menus'].' '.$_SESSION['limit']['ivr_menus']['numeric'], 'negative'); header('Location: ivr_menus.php'); return; } @@ -107,6 +107,16 @@ $ivr_menu_description = check_str($_POST["ivr_menu_description"]); $dialplan_uuid = check_str($_POST["dialplan_uuid"]); + //set the context for users that do not have the permission + if (permission_exists('ivr_menu_context')) { + $ivr_menu_context = check_str($_POST["ivr_menu_context"]); + } + else { + if ($action == 'add') { + $ivr_menu_context = $_SESSION['domain_name']; + } + } + //process the values $ivr_menu_exit_action = check_str($_POST["ivr_menu_exit_action"]); //$ivr_menu_exit_action = "transfer:1001 XML default"; @@ -118,12 +128,20 @@ if (strlen($ivr_menu_option_action) == 0) { $ivr_menu_option_action = "menu-exec-app"; } - } //process the http data if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { + //set the domain_uuid + if (permission_exists('ivr_menu_domain')) { + $domain_uuid = $_POST["domain_uuid"]; + } + else { + $_POST["domain_uuid"] = $_SESSION['domain_uuid']; + $domain_uuid = $_SESSION['domain_uuid']; + } + //check for all required data $msg = ''; if (strlen($ivr_menu_name) == 0) { $msg .= $text['message-required'].$text['label-name']."
\n"; } @@ -145,7 +163,7 @@ if (strlen($ivr_menu_digit_len) == 0) { $msg .= $text['message-required'].$text['label-digit_length']."
\n"; } if (strlen($ivr_menu_direct_dial) == 0) { $msg .= $text['message-required'].$text['label-direct_dial']."
\n"; } //if (strlen($ivr_menu_ringback) == 0) { $msg .= $text['message-required'].$text['label-ring_back']."
\n"; } - if (strlen($ivr_menu_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."
\n"; } + //if (strlen($ivr_menu_description) == 0) { $msg .= $text['message-required'].$text['label-description']."
\n"; } if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { require_once "resources/header.php"; @@ -233,15 +251,16 @@ $dialplan_xml = "\n"; $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; - if (strlen($_POST["ivr_menu_language"]) > 0){ - $dialplan_xml .= " \n"; - $dialplan_xml .= " \n"; - $dialplan_xml .= " \n"; + if (isset($_POST["ivr_menu_language"])) { + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; } $dialplan_xml .= " \n"; $dialplan_xml .= " \n"; @@ -262,7 +281,9 @@ $dialplan["dialplan_uuid"] = $dialplan_uuid; $dialplan["dialplan_name"] = $ivr_menu_name; $dialplan["dialplan_number"] = $ivr_menu_extension; - $dialplan["dialplan_context"] = $_SESSION["context"]; + if (isset($ivr_menu_context)) { + $dialplan["dialplan_context"] = $ivr_menu_context; + } $dialplan["dialplan_continue"] = "false"; $dialplan["dialplan_xml"] = $dialplan_xml; $dialplan["dialplan_order"] = "101"; @@ -311,12 +332,12 @@ //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { - messages::add($text['message-add']); + message::add($text['message-add']); } //set the update message if ($action == "update" && permission_exists('ivr_menu_edit')) { - messages::add($text['message-update']); + message::add($text['message-update']); } //redirect the user @@ -336,43 +357,46 @@ $ivr->domain_uuid = $_SESSION["domain_uuid"]; $ivr->ivr_menu_uuid = $ivr_menu_uuid; $ivr_menus = $ivr->find(); - if (is_array($ivr_menus)) foreach ($ivr_menus as &$row) { - $dialplan_uuid = $row["dialplan_uuid"]; - $ivr_menu_name = $row["ivr_menu_name"]; - $ivr_menu_extension = $row["ivr_menu_extension"]; - $ivr_menu_language = $row["ivr_menu_language"]; - $ivr_menu_dialect = $row["ivr_menu_dialect"]; - $ivr_menu_voice = $row["ivr_menu_voice"]; - $ivr_menu_greet_long = $row["ivr_menu_greet_long"]; - $ivr_menu_greet_short = $row["ivr_menu_greet_short"]; - $ivr_menu_invalid_sound = $row["ivr_menu_invalid_sound"]; - $ivr_menu_exit_sound = $row["ivr_menu_exit_sound"]; - $ivr_menu_confirm_macro = $row["ivr_menu_confirm_macro"]; - $ivr_menu_confirm_key = $row["ivr_menu_confirm_key"]; - $ivr_menu_tts_engine = $row["ivr_menu_tts_engine"]; - $ivr_menu_tts_voice = $row["ivr_menu_tts_voice"]; - $ivr_menu_confirm_attempts = $row["ivr_menu_confirm_attempts"]; - $ivr_menu_timeout = $row["ivr_menu_timeout"]; - $ivr_menu_exit_app = $row["ivr_menu_exit_app"]; - $ivr_menu_exit_data = $row["ivr_menu_exit_data"]; - $ivr_menu_inter_digit_timeout = $row["ivr_menu_inter_digit_timeout"]; - $ivr_menu_max_failures = $row["ivr_menu_max_failures"]; - $ivr_menu_max_timeouts = $row["ivr_menu_max_timeouts"]; - $ivr_menu_digit_len = $row["ivr_menu_digit_len"]; - $ivr_menu_direct_dial = $row["ivr_menu_direct_dial"]; - $ivr_menu_ringback = $row["ivr_menu_ringback"]; - $ivr_menu_cid_prefix = $row["ivr_menu_cid_prefix"]; - $ivr_menu_enabled = $row["ivr_menu_enabled"]; - $ivr_menu_description = $row["ivr_menu_description"]; - - //replace the dash with a space - $ivr_menu_name = str_replace("-", " ", $ivr_menu_name); - - if (strlen($ivr_menu_exit_app) > 0) { - $ivr_menu_exit_action = $ivr_menu_exit_app.":".$ivr_menu_exit_data; + if (is_array($ivr_menus)) { + foreach ($ivr_menus as &$row) { + $dialplan_uuid = $row["dialplan_uuid"]; + $ivr_menu_name = $row["ivr_menu_name"]; + $ivr_menu_extension = $row["ivr_menu_extension"]; + $ivr_menu_language = $row["ivr_menu_language"]; + $ivr_menu_dialect = $row["ivr_menu_dialect"]; + $ivr_menu_voice = $row["ivr_menu_voice"]; + $ivr_menu_greet_long = $row["ivr_menu_greet_long"]; + $ivr_menu_greet_short = $row["ivr_menu_greet_short"]; + $ivr_menu_invalid_sound = $row["ivr_menu_invalid_sound"]; + $ivr_menu_exit_sound = $row["ivr_menu_exit_sound"]; + $ivr_menu_confirm_macro = $row["ivr_menu_confirm_macro"]; + $ivr_menu_confirm_key = $row["ivr_menu_confirm_key"]; + $ivr_menu_tts_engine = $row["ivr_menu_tts_engine"]; + $ivr_menu_tts_voice = $row["ivr_menu_tts_voice"]; + $ivr_menu_confirm_attempts = $row["ivr_menu_confirm_attempts"]; + $ivr_menu_timeout = $row["ivr_menu_timeout"]; + $ivr_menu_exit_app = $row["ivr_menu_exit_app"]; + $ivr_menu_exit_data = $row["ivr_menu_exit_data"]; + $ivr_menu_inter_digit_timeout = $row["ivr_menu_inter_digit_timeout"]; + $ivr_menu_max_failures = $row["ivr_menu_max_failures"]; + $ivr_menu_max_timeouts = $row["ivr_menu_max_timeouts"]; + $ivr_menu_digit_len = $row["ivr_menu_digit_len"]; + $ivr_menu_direct_dial = $row["ivr_menu_direct_dial"]; + $ivr_menu_ringback = $row["ivr_menu_ringback"]; + $ivr_menu_cid_prefix = $row["ivr_menu_cid_prefix"]; + $ivr_menu_context = $row["ivr_menu_context"]; + $ivr_menu_enabled = $row["ivr_menu_enabled"]; + $ivr_menu_description = $row["ivr_menu_description"]; + + //replace the dash with a space + $ivr_menu_name = str_replace("-", " ", $ivr_menu_name); + + if (strlen($ivr_menu_exit_app) > 0) { + $ivr_menu_exit_action = $ivr_menu_exit_app.":".$ivr_menu_exit_data; + } } + unset ($prep_statement); } - unset ($prep_statement); } //get the ivr menu options @@ -418,6 +442,7 @@ if (strlen($ivr_menu_max_timeouts) == 0) { $ivr_menu_max_timeouts = '1'; } if (strlen($ivr_menu_digit_len) == 0) { $ivr_menu_digit_len = '5'; } if (strlen($ivr_menu_direct_dial) == 0) { $ivr_menu_direct_dial = 'false'; } + if (!isset($ivr_menu_context)) { $ivr_menu_context = $_SESSION['domain_name']; } if (strlen($ivr_menu_enabled) == 0) { $ivr_menu_enabled = 'true'; } if (!isset($ivr_menu_exit_action)) { $ivr_menu_exit_action = ''; } @@ -685,7 +710,7 @@ } echo " \n"; if (if_group("superadmin")) { - echo ""; + echo ""; unset($destination_id); } echo "
\n"; @@ -827,7 +852,7 @@ } echo " \n"; if (if_group("superadmin")) { - echo ""; + echo ""; unset($destination_id); } echo "
\n"; @@ -856,7 +881,7 @@ } echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo "\n"; @@ -1318,12 +1343,47 @@ echo "\n"; echo "\n"; + if (permission_exists('ivr_menu_domain')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-domain']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-domain_name']."\n"; + echo "\n"; + echo "\n"; + } + echo " \n"; echo " "; //--- end: show_advanced ----------------------- echo "\n"; + if (permission_exists('ivr_menu_context')) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; echo "
\n"; + echo " ".$text['label-context']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-enter-context']."\n"; + echo "
\n"; echo " ".$text['label-enabled']."\n"; diff --git a/app/ivr_menus/ivr_menu_option_delete.php b/app/ivr_menus/ivr_menu_option_delete.php index f170f8e25f..78166b195c 100644 --- a/app/ivr_menus/ivr_menu_option_delete.php +++ b/app/ivr_menus/ivr_menu_option_delete.php @@ -49,21 +49,40 @@ } //delete the ivr menu option - if (strlen($id) > 0) { - $sql = "delete from v_ivr_menu_options "; - $sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' "; - $sql .= "and ivr_menu_option_uuid = '".$id."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); + if (is_uuid($id)) { + //get the dialplan_uuid + $sql = "select * from v_ivr_menus "; + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "and ivr_menu_uuid = :ivr_menu_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $parameters['ivr_menu_uuid'] = $ivr_menu_uuid; + $database = new database; + $result = $database->select($sql, $parameters); + if (is_array($result)) { + foreach ($result as &$row) { + $dialplan_uuid = $row["dialplan_uuid"]; + $ivr_menu_context = $row["ivr_menu_context"]; + } + } + unset($sql, $parameters); + + //delete the data + $array['ivr_menu_options'][]['ivr_menu_option_uuid'] = $id; + $database = new database; + $database->app_name = 'ivr_menus'; + $database->app_uuid = 'a5788e9b-58bc-bd1b-df59-fff5d51253ab'; + $database->delete($array); + //$message = $database->message; } //clear the cache $cache = new cache; - $cache->delete("dialplan:".$_SESSION["context"]); + $cache->delete("dialplan:".$ivr_menu_context); //redirect the user - messages::add($text['message-delete']); - header('Location: ivr_menu_edit.php?id='.$ivr_menu_uuid); + message::add($text['message-delete']); + if (is_uuid($ivr_menu_uuid)) { + header('Location: ivr_menu_edit.php?id='.$ivr_menu_uuid); + } ?> diff --git a/app/ivr_menus/resources/classes/ivr_menu.php b/app/ivr_menus/resources/classes/ivr_menu.php index 55bf60f4d9..937ff1e673 100644 --- a/app/ivr_menus/resources/classes/ivr_menu.php +++ b/app/ivr_menus/resources/classes/ivr_menu.php @@ -190,12 +190,12 @@ include "root.php"; //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { - messages::add($text['message-add']); + message::add($text['message-add']); } //set the update message if ($action == "update" && permission_exists('ivr_menu_edit')) { - messages::add($text['message-update']); + message::add($text['message-update']); } //return the result @@ -204,92 +204,6 @@ include "root.php"; function delete() { - //create the database object - $database = new database; - if ($this->db) { - $database->db = $this->db; - } - - //start the transaction - //$count = $database->db->exec("BEGIN;"); - - //delete the ivr menu option - if (strlen($this->ivr_menu_option_uuid) > 0) { - $database->table = "v_ivr_menu_options"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'ivr_menu_option_uuid'; - $database->where[1]['value'] = $this->ivr_menu_option_uuid; - $database->where[1]['operator'] = '='; - $database->delete(); - unset($this->ivr_menu_option_uuid); - } - - //delete the ivr menu - if (strlen($this->ivr_menu_option_uuid) == 0) { - //select the dialplan entries - $database->table = "v_ivr_menus"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'ivr_menu_uuid'; - $database->where[1]['value'] = $this->ivr_menu_uuid; - $database->where[1]['operator'] = '='; - $result = $database->find(); - foreach($result as $row) { - //set the uuid - $this->dialplan_uuid = $row['dialplan_uuid']; - //delete the child dialplan information - $database->table = "v_dialplan_details"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'dialplan_uuid'; - $database->where[1]['value'] = $this->dialplan_uuid; - $database->where[1]['operator'] = '='; - $database->delete(); - //delete the dialplan information - $database->table = "v_dialplans"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'dialplan_uuid'; - $database->where[1]['value'] = $this->dialplan_uuid; - $database->where[1]['operator'] = '='; - $database->delete(); - } - - //delete child data - $database->table = "v_ivr_menu_options"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'ivr_menu_uuid'; - $database->where[1]['value'] = $this->ivr_menu_uuid; - $database->where[1]['operator'] = '='; - $database->delete(); - - //delete parent data - $database->table = "v_ivr_menus"; - $database->where[0]['name'] = 'domain_uuid'; - $database->where[0]['value'] = $this->domain_uuid; - $database->where[0]['operator'] = '='; - $database->where[1]['name'] = 'ivr_menu_uuid'; - $database->where[1]['value'] = $this->ivr_menu_uuid; - $database->where[1]['operator'] = '='; - $database->delete(); - - //delete the dialplan context from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd = "memcache delete dialplan:".$_SESSION["context"]; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } - - //commit the transaction - //$count = $database->db->exec("COMMIT;"); - } } public function dialplan($field) { diff --git a/app/meetings/app_config.php b/app/meetings/app_config.php index 34e10b9bdf..868c924ed3 100644 --- a/app/meetings/app_config.php +++ b/app/meetings/app_config.php @@ -106,6 +106,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_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "meeting_user_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; @@ -118,11 +120,16 @@ $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_meetings"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "meeting_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "user_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_users"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "user_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/app/messages/app_config.php b/app/messages/app_config.php new file mode 100644 index 0000000000..c047988d51 --- /dev/null +++ b/app/messages/app_config.php @@ -0,0 +1,265 @@ + \ No newline at end of file diff --git a/app/messages/app_defaults.php b/app/messages/app_defaults.php new file mode 100644 index 0000000000..8031dafca1 --- /dev/null +++ b/app/messages/app_defaults.php @@ -0,0 +1,50 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//process this code online once +if ($domains_processed == 1) { + + //update default settings + $sql = "update v_default_settings set "; + $sql .= "default_setting_name = 'text' "; + $sql .= "where default_setting_category = 'message' "; + $sql .= "and default_setting_subcategory = 'http_auth_password' "; + $sql .= "and default_setting_name = 'array' "; + $db->exec($sql); + unset($sql); + + //update domain settings + $sql = "update v_domain_settings set "; + $sql .= "domain_setting_name = 'text' "; + $sql .= "where domain_setting_category = 'message' "; + $sql .= "and domain_setting_subcategory = 'http_auth_password' "; + $sql .= "and domain_setting_name = 'array' "; + $db->exec($sql); + unset($sql); + +} + +?> diff --git a/app/messages/app_languages.php b/app/messages/app_languages.php new file mode 100644 index 0000000000..ebee1c547a --- /dev/null +++ b/app/messages/app_languages.php @@ -0,0 +1,912 @@ + diff --git a/app/messages/app_menu.php b/app/messages/app_menu.php new file mode 100644 index 0000000000..85146d116a --- /dev/null +++ b/app/messages/app_menu.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/app/messages/index.php b/app/messages/index.php new file mode 100644 index 0000000000..abf8768396 --- /dev/null +++ b/app/messages/index.php @@ -0,0 +1,190 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//default authorized to false + $authorized = 'false'; + +//get the user settings + $sql = "select user_uuid, domain_uuid from v_user_settings "; + $sql .= "where user_setting_category = 'message' "; + $sql .= "and user_setting_subcategory = 'key' "; + $sql .= "and user_setting_value = :key "; + $sql .= "and user_setting_enabled = 'true' "; + $prep_statement = $db->prepare($sql); + $prep_statement->bindParam(':key', $_GET['key']); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + if (is_uuid($row['user_uuid'])) { + $domain_uuid = $row['domain_uuid']; + $user_uuid = $row['user_uuid']; + $authorized = 'true'; + } + } + +//authorization failed + if ($authorized == 'false') { + //log the failed auth attempt to the system, to be available for fail2ban. + openlog('FusionPBX', LOG_NDELAY, LOG_AUTH); + syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] authentication failed for ".$_GET['key']); + closelog(); + + //send http 404 + header("HTTP/1.0 404 Not Found"); + echo "\n"; + echo "404 Not Found\n"; + echo "\n"; + echo "

404 Not Found

\n"; + echo "
nginx/1.12.1
\n"; + echo "\n"; + echo "\n"; + exit(); + } + +//get the raw input data + $json = file_get_contents('php://input'); + +//decode the json into array + $message = json_decode($json, true); + +//get the source phone number + $phone_number = preg_replace('{[\D]}', '', $message['from']); + +//get the contact uuid + $sql = "select c.contact_uuid "; + $sql .= "from v_contacts as c, v_contact_phones as p "; + $sql .= "where p.contact_uuid = c.contact_uuid "; + //$sql .= "and p.phone_number = :phone_number "; + $sql .= "and p.phone_number = '".$phone_number."' "; + $sql .= "and c.domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare($sql); + //$prep_statement->bindParam(':phone_number', $phone_number); + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + $contact_uuid = $row['contact_uuid']; + //$contact_name_given = $row['contact_name_given']; + //$contact_name_family = $row['contact_name_family']; + //$contact_organization = $row['contact_organization']; + + +//build message array + $message_uuid = uuid(); + $array['messages'][0]['message_uuid'] = $message_uuid; + $array['messages'][0]['domain_uuid'] = $domain_uuid; + $array['messages'][0]['user_uuid'] = $user_uuid; + $array['messages'][0]['contact_uuid'] = $contact_uuid; + $array['messages'][0]['message_uuid'] = $message_uuid; + $array['messages'][0]['message_type'] = is_array($message['media']) ? 'mms' : 'sms'; + $array['messages'][0]['message_direction'] = 'inbound'; + $array['messages'][0]['message_date'] = 'now()'; + $array['messages'][0]['message_from'] = $message['from']; + $array['messages'][0]['message_to'] = $message['to']; + $array['messages'][0]['message_text'] = $message['text']; + $array['messages'][0]['message_json'] = $json; + +//build message media array (if necessary) + if (is_array($message['media'])) { + foreach($message['media'] as $index => $media_url) { + $media_type = pathinfo($media_url, PATHINFO_EXTENSION); + if ($media_type !== 'xml') { + $array['message_media'][$index]['message_media_uuid'] = uuid(); + $array['message_media'][$index]['message_uuid'] = $message_uuid; + $array['message_media'][$index]['domain_uuid'] = $domain_uuid; + $array['message_media'][$index]['user_uuid'] = $user_uuid; + $array['message_media'][$index]['message_media_type'] = $media_type; + $array['message_media'][$index]['message_media_url'] = $media_url; + $array['message_media'][$index]['message_media_content'] = base64_encode(file_get_contents($media_url)); + } + } + } + +//add the required permission + $p = new permissions; + $p->add("message_add", "temp"); + $p->add("message_media_add", "temp"); + +//save message to the database + $database = new database; + $database->app_name = 'messages'; + $database->app_uuid = '4a20815d-042c-47c8-85df-085333e79b87'; + $database->uuid($message_uuid); + $database->save($array); + $result = $database->message; + +//remove the temporary permission + $p->delete("message_add", "temp"); + $p->delete("message_media_add", "temp"); + +//convert the array to json + $array_json = json_encode($array); + +//get the list of extensions using the user_uuid + $sql = "select * from v_domains as d, v_extensions as e "; + $sql .= "where extension_uuid in (select extension_uuid from v_extension_users where user_uuid = '".$user_uuid."') "; + $sql .= "and e.domain_uuid = d.domain_uuid "; + $sql .= "and e.enabled = 'true' "; + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $extensions = $prep_statement->fetchall(PDO::FETCH_NAMED); + } + +//create the event socket connection + if (is_array($extensions)) { + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + } + +//send the sip message + if (is_array($extensions)) { + foreach ($extensions as $row) { + $domain_name = $row['domain_name']; + $extension = $row['extension']; + $number_alias = $row['number_alias']; + + //send the sip messages + $command = "luarun app/messages/resources/send.lua ".$message["from"]."@".$domain_name." ".$extension."@".$domain_name." '".$message["text"]."'"; + + //send the command + $response = event_socket_request($fp, "api ".$command); + $response = event_socket_request($fp, "api log notice ".$command); + } + } + +//set the file + //$file = '/tmp/sms.txt'; + +//save the file + //file_put_contents($file, $json); + +//save the data to the file system + //file_put_contents($file, $json."\n"); + //file_put_contents($file, $array_json."\nfrom: ".$message["from"]." to: ".$message["to"]." text: ".$message["text"]."\n$sql_test\njson: ".$json."\n".$saved_result."\n"); + +?> diff --git a/app/messages/message_delete.php b/app/messages/message_delete.php new file mode 100644 index 0000000000..c92efc11bd --- /dev/null +++ b/app/messages/message_delete.php @@ -0,0 +1,57 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//delete the message + message::add($text['message-delete']); + +//delete the data + if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('message_delete')) { + + //get the id + $id = check_str($_GET["id"]); + + //delete message + $sql = "delete from v_messages "; + $sql .= "where message_uuid = '$id' "; + $sql .= "and domain_uuid = '$domain_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); + + //redirect the user + header('Location: messages_log.php'); + } + + +?> \ No newline at end of file diff --git a/app/messages/message_edit.php b/app/messages/message_edit.php new file mode 100644 index 0000000000..20ff959360 --- /dev/null +++ b/app/messages/message_edit.php @@ -0,0 +1,363 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//check permissions + require_once "resources/check_auth.php"; + if (permission_exists('message_add') || permission_exists('message_edit')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $message_uuid = check_str($_REQUEST["id"]); + $id = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (is_array($_POST)) { + $message_uuid = check_str($_POST["message_uuid"]); + //$user_uuid = check_str($_POST["user_uuid"]); + $message_type = check_str($_POST["message_type"]); + $message_direction = check_str($_POST["message_direction"]); + $message_date = check_str($_POST["message_date"]); + $message_from = check_str($_POST["message_from"]); + $message_to = check_str($_POST["message_to"]); + $message_text = check_str($_POST["message_text"]); + $message_media_type = check_str($_POST["message_media_type"]); + $message_media_url = check_str($_POST["message_media_url"]); + $message_media_content = check_str($_POST["message_media_content"]); + $message_json = check_str($_POST["message_json"]); + } + +//process the user data and save it to the database + if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { + + //get the uuid from the POST + if ($action == "update") { + $message_uuid = check_str($_POST["message_uuid"]); + } + + //check for all required data + $msg = ''; + //if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."
\n"; } + if (strlen($message_type) == 0) { $msg .= $text['message-required']." ".$text['label-message_type']."
\n"; } + if (strlen($message_direction) == 0) { $msg .= $text['message-required']." ".$text['label-message_direction']."
\n"; } + if (strlen($message_date) == 0) { $msg .= $text['message-required']." ".$text['label-message_date']."
\n"; } + if (strlen($message_from) == 0) { $msg .= $text['message-required']." ".$text['label-message_from']."
\n"; } + if (strlen($message_to) == 0) { $msg .= $text['message-required']." ".$text['label-message_to']."
\n"; } + //if (strlen($message_text) == 0) { $msg .= $text['message-required']." ".$text['label-message_text']."
\n"; } + //if (strlen($message_media_type) == 0) { $msg .= $text['message-required']." ".$text['label-message_media_type']."
\n"; } + //if (strlen($message_media_url) == 0) { $msg .= $text['message-required']." ".$text['label-message_media_url']."
\n"; } + //if (strlen($message_media_content) == 0) { $msg .= $text['message-required']." ".$text['label-message_media_content']."
\n"; } + //if (strlen($message_json) == 0) { $msg .= $text['message-required']." ".$text['label-message_json']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //set the domain_uuid + $_POST["domain_uuid"] = $_SESSION["domain_uuid"]; + + //add the message_uuid + if (strlen($_POST["message_uuid"]) == 0) { + $message_uuid = uuid(); + $_POST["message_uuid"] = $message_uuid; + } + + //prepare the array + $array['messages'][0] = $_POST; + + //save to the data + $database = new database; + $database->app_name = 'messages'; + $database->app_uuid = null; + if (strlen($message_uuid) > 0) { + $database->uuid($message_uuid); + } + $database->save($array); + $message = $database->message; + + //debug info + //echo "
";
+			//print_r($message);
+			//echo "
"; + //exit; + + //redirect the user + if (isset($action)) { + if ($action == "add") { + message::add($text['message-add']); + } + if ($action == "update") { + message::add($text['message-update']); + } + header('Location: message_edit.php?id='.$message_uuid); + return; + } + } //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (is_array($_GET) && $_POST["persistformvar"] != "true") { + $message_uuid = check_str($_GET["id"]); + $sql = "select * from v_messages "; + $sql .= "where message_uuid = '$message_uuid' "; + //$sql .= "and domain_uuid = '$domain_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $user_uuid = $row["user_uuid"]; + $message_type = $row["message_type"]; + $message_direction = $row["message_direction"]; + $message_date = $row["message_date"]; + $message_from = $row["message_from"]; + $message_to = $row["message_to"]; + $message_text = $row["message_text"]; + $message_media_type = $row["message_media_type"]; + $message_media_url = $row["message_media_url"]; + $message_media_content = $row["message_media_content"]; + $message_json = $row["message_json"]; + } + unset ($prep_statement); + } + +//show the header + require_once "resources/header.php"; + +//get the extensions + $sql = "select * from v_users "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and user_enabled = 'true' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $users = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + +//get the users + $sql = "SELECT user_uuid, username FROM v_users "; + $sql .= "WHERE domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "ORDER by username asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $users = $prep_statement->fetchAll(PDO::FETCH_NAMED); + +//show the content + echo "
\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if (strlen($message_media_type) > 0) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + if ($_GET['debug'] == 'true') { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo " \n"; + echo " \n"; + echo " "; + echo "
".$text['title-message']."

\n"; + echo " "; + echo " "; + echo "
\n"; + echo " ".$text['label-username']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-username']."\n"; + echo "
\n"; + echo " ".$text['label-message_type']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_type']."\n"; + echo "
\n"; + echo " ".$text['label-message_direction']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_direction']."\n"; + echo "
\n"; + echo " ".$text['label-message_date']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_date']."\n"; + echo "
\n"; + echo " ".$text['label-message_from']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_from']."\n"; + echo "
\n"; + echo " ".$text['label-message_to']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_to']."\n"; + echo "
\n"; + echo " ".$text['label-message_text']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_text']."\n"; + echo "
\n"; + echo "  \n"; + echo "\n"; + $image_source = 'data: '.mime_content_type($message_media_type).';base64,'.$message_media_content; + echo ""; + echo "
\n"; + echo "
\n"; + echo " ".$text['label-message_media_type']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_media_type']."\n"; + echo "
\n"; + echo " ".$text['label-message_media_url']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_media_url']."\n"; + echo "
\n"; + echo " ".$text['label-message_media_content']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_media_content']."\n"; + echo "
\n"; + echo " ".$text['label-message_json']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-message_json']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
"; + echo "
"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/messages/message_media.php b/app/messages/message_media.php new file mode 100644 index 0000000000..c41b4076e0 --- /dev/null +++ b/app/messages/message_media.php @@ -0,0 +1,96 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get media uuid + $message_media_uuid = $_GET['id']; + $message_media_source = $_GET['src']; + $action = $_GET['action']; + +//get media + if (is_uuid($message_media_uuid)) { + + $sql = "select message_media_type, message_media_url, message_media_content from v_message_media "; + $sql .= "where message_media_uuid = '".$message_media_uuid."' "; + if (is_uuid($_SESSION['user_uuid'])) { + $sql .= "and user_uuid = '".$_SESSION['user_uuid']."' "; + } + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $media = $prep_statement->fetch(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + + switch (strtolower($media['message_media_type'])) { + case 'jpg': + case 'jpeg': $content_type = 'image/jpg'; break; + case 'png': $content_type = 'image/png'; break; + case 'gif': $content_type = 'image/gif'; break; + case 'aac': $content_type = 'audio/aac'; break; + case 'wav': $content_type = 'audio/wav'; break; + case 'mp3': $content_type = 'audio/mpeg'; break; + case 'mp2': $content_type = 'video/mpeg'; break; + case 'm4v': $content_type = 'video/mp4'; break; + case 'pdf': $content_type = 'application/pdf'; break; + case 'doc': $content_type = 'application/vnd.ms-word'; break; + case 'docx': $content_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; break; + case 'xls': $content_type = 'application/vnd.ms-excel'; break; + case 'xlsx': $content_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; break; + case 'ppt': $content_type = 'application/vnd.ms-powerpoint'; break; + case 'pptx': $content_type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; break; + case 'zip': $content_tyep = 'application/zip'; break; + default: $content_type = 'application/octet-stream'; break; + } + + switch ($action) { + case 'download': + header("Content-type: ".$content_type."; charset=utf-8"); + $filename = $message_media_source != '' ? $message_media_source."_".$message_media_uuid.".".strtolower($media['message_media_type']) : $media['message_media_url']; + header("Content-Disposition: attachment; filename=\"".$filename."\""); + header("Content-Length: ".strlen(base64_decode($media['message_media_content']))); + echo base64_decode($media['message_media_content']); + break; + case 'display': + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + break; + } + + } + +?> \ No newline at end of file diff --git a/app/messages/message_send.php b/app/messages/message_send.php new file mode 100644 index 0000000000..02a7476b17 --- /dev/null +++ b/app/messages/message_send.php @@ -0,0 +1,195 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//check permissions + require_once "resources/check_auth.php"; + if (!permission_exists('message_add') && !permission_exists('message_edit')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//define the http request + function http_request($url, $method, $headers = null, $content) { + $options = array( + 'http'=>array( + 'method'=>$method, + 'header'=>$headers, + 'content'=>$content + )); + $context = stream_context_create($options); + $response = file_get_contents($url, false, $context); + if ($response === false) { + throw new Exception("Problem reading data from $url, $php_errormsg"); + } + return $response; + } + +//get http post variables and set them to php variables + if (is_array($_POST)) { + $message_from = check_str($_POST["message_from"]); + $message_to = check_str($_POST["message_to"]); + $message_text = check_str($_POST["message_text"]); + $message_media = $_FILES["message_media"]; + } + +//process the user data and save it to the database + if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { + + //get the source phone number + $phone_number = preg_replace('{[\D]}', '', $message_to); + + //error check + if ( + !is_numeric($message_from) || + !is_numeric($message_to) || + $message_text == '') { + exit; + } + + + + // handle media (if any) + if (is_array($message_media) && sizeof($message_media) != 0) { + // reorganize media array, ignore errored files + $f = 0; + foreach ($message_media['error'] as $index => $error) { + if ($error == 0) { + $tmp_media[$f]['uuid'] = uuid(); + $tmp_media[$f]['name'] = $message_media['name'][$index]; + $tmp_media[$f]['type'] = $message_media['type'][$index]; + $tmp_media[$f]['tmp_name'] = $message_media['tmp_name'][$index]; + $tmp_media[$f]['size'] = $message_media['size'][$index]; + $f++; + } + } + $message_media = $tmp_media; + unset($tmp_media, $f); + } + $message_type = is_array($message_media) && sizeof($message_media) != 0 ? 'mms' : 'sms'; + + + //get the contact uuid + //$sql = "SELECT trim(c.contact_name_given || ' ' || c.contact_name_family || ' (' || c.contact_organization || ')') AS name, p.phone_number AS number "; + $sql = "SELECT c.contact_uuid "; + $sql .= "FROM v_contacts as c, v_contact_phones as p "; + $sql .= "WHERE p.contact_uuid = c.contact_uuid "; + //$sql .= "and p.phone_number = :phone_number "; + $sql .= "and p.phone_number like '%".$phone_number."%' "; + $sql .= "and c.domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare($sql); + //$prep_statement->bindParam(':phone_number', $phone_number); + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + $contact_uuid = $row['contact_uuid']; + + //build the message array + $message_uuid = uuid(); + $array['messages'][0]['domain_uuid'] = $_SESSION["domain_uuid"]; + $array['messages'][0]['message_uuid'] = $message_uuid; + $array['messages'][0]['user_uuid'] = $_SESSION["user_uuid"]; + $array['messages'][0]['contact_uuid'] = $contact_uuid; + $array['messages'][0]['message_type'] = $message_type; + $array['messages'][0]['message_direction'] = 'outbound'; + $array['messages'][0]['message_date'] = 'now()'; + $array['messages'][0]['message_from'] = $message_from; + $array['messages'][0]['message_to'] = $message_to; + $array['messages'][0]['message_text'] = $message_text; + + //build message media array (if necessary) + if (is_array($message_media)) { + foreach($message_media as $index => $media) { + $array['message_media'][$index]['message_media_uuid'] = $media['uuid']; + $array['message_media'][$index]['message_uuid'] = $message_uuid; + $array['message_media'][$index]['domain_uuid'] = $_SESSION["domain_uuid"]; + $array['message_media'][$index]['user_uuid'] = $_SESSION["user_uuid"]; + $array['message_media'][$index]['message_media_type'] = strtolower(pathinfo($media['name'], PATHINFO_EXTENSION)); + $array['message_media'][$index]['message_media_url'] = $media['name']; + $array['message_media'][$index]['message_media_content'] = base64_encode(file_get_contents($media['tmp_name'])); + } + } + + //save to the data + $database = new database; + $database->app_name = 'messages'; + $database->app_uuid = null; + $database->uuid($message_uuid); + $database->save($array); + $message = $database->message; + unset($array, $message); + + //debug info + //echo "
".print_r($message, true)."
"; exit; + + //santize the from + $message_from = preg_replace('{[\D]}', '', $message_from); + + //prepare message to send + $message['to'] = $message_to; + $message['text'] = $message_text; + if (is_array($message_media) && sizeof($message_media) != 0) { + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://'; + foreach ($message_media as $index => $media) { + $path = $protocol.$_SERVER['HTTP_HOST'].'/app/messages/message_media.php?id='.$media['uuid'].'&action=download&.'.strtolower(pathinfo($media['name'], PATHINFO_EXTENSION)); + $message['media'][] = $path; + //echo $path."

"; + } + } + $http_content = json_encode($message); + + //settings needed for REST API + $http_method = $_SESSION['message']['http_method']['text']; + $http_content_type = $_SESSION['message']['http_content_type']['text']; + $http_destination = $_SESSION['message']['http_destination']['text']; + $http_auth_enabled = $_SESSION['message']['http_auth_enabled']['boolean']; + $http_auth_type = $_SESSION['message']['http_auth_type']['text']; + $http_auth_user = $_SESSION['message']['http_auth_user']['text']; + $http_auth_password = $_SESSION['message']['http_auth_password']['text']; + + //exchange variable name with their values + $http_destination = str_replace("\${from}", $message_from, $http_destination); + + //send the message to the provider + $headers[] = "Content-type: ".trim($http_content_type); + if ($http_auth_type == 'basic') { + $headers[] = "Authorization: Basic ".base64_encode($http_auth_user.':'.$http_auth_password); + } + $response = http_request($http_destination, $http_method, $headers, $http_content); + //echo $http_content."

".$response; + + //redirect the user + //$_SESSION["message"] = $text['message-sent']; + return true; + } //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0) + +?> \ No newline at end of file diff --git a/app/messages/messages.php b/app/messages/messages.php new file mode 100644 index 0000000000..c90e5e9f84 --- /dev/null +++ b/app/messages/messages.php @@ -0,0 +1,362 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (!permission_exists('message_view')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get (from) destinations + $sql = "select destination_number from v_destinations "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and destination_type_text = 1 "; + $sql .= "and destination_enabled = 'true' "; + $sql .= "order by destination_number asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $rows = $prep_statement->fetchAll(PDO::FETCH_NAMED); + //view_array($rows); + if (is_array($rows) && sizeof($rows)) { + foreach ($rows as $row) { + $destinations[] = $row['destination_number']; + } + } + unset ($prep_statement, $sql, $row, $record); + +//get self (primary contact attachment) image + if (!is_array($_SESSION['tmp']['messages']['contact_me'])) { + $sql = "select attachment_filename as filename, attachment_content as image from v_contact_attachments "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and contact_uuid = '".$_SESSION['user']['contact_uuid']."' "; + $sql .= "and attachment_primary = 1 "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $_SESSION['tmp']['messages']['contact_me'] = $prep_statement->fetch(PDO::FETCH_NAMED); + unset ($sql, $bind, $prep_statement); + } + +//additional includes + require_once "resources/header.php"; + +//resize thread window on window resize + echo "\n"; + +//styles + echo "\n"; + +//cache self (primary contact attachment) image + if (is_array($_SESSION['tmp']['messages']['contact_me']) && sizeof($_SESSION['tmp']['messages']['contact_me']) != 0) { + $attachment_type = strtolower(pathinfo($_SESSION['tmp']['messages']['contact_me']['filename'], PATHINFO_EXTENSION)); + echo "\n"; + } + +//new message layer + if (permission_exists('message_add')) { + echo "\n"; + } + +//message media layer + echo "\n"; + +//show the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-messages']."

\n"; + if (permission_exists('message_add')) { + echo " \n"; + } + echo " \n"; + echo "
\n"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['label-contacts']."".$text['label-messages']."
···
···
\n"; + echo "\n"; + +//js to load messages for clicked number + echo "\n"; + + unset($messages, $message, $numbers, $number); + +//include the footer + require_once "resources/footer.php"; + +?> \ No newline at end of file diff --git a/app/messages/messages_contacts.php b/app/messages/messages_contacts.php new file mode 100644 index 0000000000..0327aef302 --- /dev/null +++ b/app/messages/messages_contacts.php @@ -0,0 +1,216 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (!permission_exists('message_view')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get selected number/contact + $current_contact = $_GET['sel']; + +//get the list + if (isset($_SESSION['message']['display_last']['text']) && $_SESSION['message']['display_last']['text'] != '') { + $array = explode(' ',$_SESSION['message']['display_last']['text']); + if (is_array($array) && is_numeric($array[0]) && $array[0] > 0) { + if ($array[1] == 'messages') { + $limit = "limit ".$array[0]." offset 0 "; + } + else { + $since = "and message_date >= '".date("Y-m-d H:i:s", strtotime('-'.$_SESSION['message']['display_last']['text']))."' "; + } + } + } + if ($limit == '' && $since == '') { $limit = "limit 25 offset 0"; } //default (message count) + $sql = "select message_direction, message_from, message_to, contact_uuid from v_messages "; + $sql .= "where user_uuid = '".$_SESSION['user_uuid']."' "; + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + $sql .= $since; + $sql .= "order by message_date desc "; + $sql .= $limit; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $messages = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + +//parse out numbers + if (is_array($messages) && sizeof($messages) != 0) { + $numbers = []; + foreach($messages as $message) { + $number_from = preg_replace('{[\D]}', '', $message['message_from']); + $number_to = preg_replace('{[\D]}', '', $message['message_to']); + if (!in_array($number_from, $numbers)) { + $numbers[] = $number_from; + } + if (!in_array($number_to, $numbers)) { + $numbers[] = $number_to; + } + switch ($message['message_direction']) { + case 'inbound': $contact[$number_from]['contact_uuid'] = $message['contact_uuid']; break; + case 'outbound': $contact[$number_to]['contact_uuid'] = $message['contact_uuid']; break; + } + unset($number_from, $number_to); + } + } + +//get contact details, if uuid available + if (is_array($contact) && sizeof($contact) != 0) { + foreach ($contact as $number => $field) { + if (is_uuid($field['contact_uuid'])) { + $sql = "select c.contact_name_given, c.contact_name_family, "; + $sql .= "(select ce.email_address from v_contact_emails as ce where ce.contact_uuid = c.contact_uuid and ce.email_primary = 1) as contact_email "; + $sql .= "from v_contacts as c "; + $sql .= "where c.contact_uuid = '".$field['contact_uuid']."' "; + $sql .= "and (c.domain_uuid = '".$domain_uuid."' or c.domain_uuid is null) "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + if (is_array($row) && sizeof($row) != 0) { + $contact[$number]['contact_uuid'] = $field['contact_uuid']; + $contact[$number]['contact_name_given'] = $row['contact_name_given']; + $contact[$number]['contact_name_family'] = $row['contact_name_family']; + $contact[$number]['contact_email'] = $row['contact_email']; + } + unset($prep_statement, $sql); + } + else { + unset($contact[$number]); + } + } + } + +//get destinations and remove from numbers array + $sql = "select destination_number from v_destinations "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and destination_enabled = 'true' "; + $sql .= "order by destination_number asc "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $rows = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($rows) && sizeof($rows)) { + foreach ($rows as $row) { + $destinations[] = $row['destination_number']; + } + } + unset ($prep_statement, $sql, $row, $record); + $numbers = array_diff($numbers, $destinations); + +//get contact (primary attachment) images and cache them + if (is_array($numbers) && sizeof($numbers) != 0) { + foreach ($numbers as $number) { + $contact_uuids[] = $contact[$number]['contact_uuid']; + } + if (is_array($contact_uuids) && sizeof($contact_uuids) != 0) { + $sql = "select contact_uuid as uuid, attachment_filename as filename, attachment_content as image from v_contact_attachments "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and ( 0 = 1 "; + foreach ($contact_uuids as $contact_uuid) { + $sql .= "or contact_uuid = '".$contact_uuid."' "; + } + $sql .= ") "; + $sql .= "and attachment_primary = 1 "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $contact_ems = $prep_statement->fetchAll(PDO::FETCH_NAMED); + + if (is_array($contact_ems) && sizeof($contact_ems) != 0) { + foreach ($contact_ems as $contact_em) { + $_SESSION['tmp']['messages']['contact_em'][$contact_em['uuid']]['filename'] = $contact_em['filename']; + $_SESSION['tmp']['messages']['contact_em'][$contact_em['uuid']]['image'] = $contact_em['image']; + } + } + + } + unset($sql, $prep_statement, $contact_uuids, $contact_ems, $contact_em); + } + +//contacts list + if (is_array($numbers) && sizeof($numbers) != 0) { + echo "\n"; + foreach($numbers as $number) { + if ($current_contact != '' && $number == $current_contact) { + echo "\n"; + } + echo "
\n"; + $selected = true; + } + else { + echo "
\n"; + $selected = false; + } + //contact image + if (is_array($_SESSION['tmp']['messages']['contact_em'][$contact[$number]['contact_uuid']]) && sizeof($_SESSION['tmp']['messages']['contact_em'][$contact[$number]['contact_uuid']]) != 0) { + $attachment_type = strtolower(pathinfo($_SESSION['tmp']['messages']['contact_em'][$contact[$number]['contact_uuid']]['filename'], PATHINFO_EXTENSION)); + echo "\n"; + echo "\n"; + } + //contact name/number + if ($contact[$number]['contact_name_given'] != '' || $contact[$number]['contact_name_family'] != '') { + echo "
\n"; + echo "
\n"; + echo " ".escape($contact[$number]['contact_name_given'].' '.$contact[$number]['contact_name_family']).'
'; + echo " ".escape(format_phone($number)).'
'; + if (valid_email($contact[$number]['contact_email'])) { + echo "".$text['label-send_email']."
"; + } + if ($selected) { + $contact_name = escape($contact[$number]['contact_name_given'].' '.$contact[$number]['contact_name_family']); + $contact_html = (permission_exists('contact_view') ? "".$contact_name."" : $contact_name)." : ".escape(format_phone($number)).""; + echo "\n"; + } + echo "
\n"; + } + else { + echo escape(format_phone($number)); + if ($selected) { + echo "\n"; + } + } + echo "
\n"; + echo "
\n"; + echo " \"".$text['label-refresh_pause']."\" "; + echo "
\n"; + + echo "\n"; + } + +?> \ No newline at end of file diff --git a/app/messages/messages_log.php b/app/messages/messages_log.php new file mode 100644 index 0000000000..8c6335675c --- /dev/null +++ b/app/messages/messages_log.php @@ -0,0 +1,274 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('message_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get the action + if (is_array($_POST["messages"])) { + $messages = $_POST["messages"]; + foreach($messages as $row) { + if ($row['action'] == 'delete') { + $action = 'delete'; + break; + } + } + } + +//delete the messages + if (permission_exists('message_delete')) { + if ($action == "delete") { + //download + $obj = new messages; + $obj->delete($messages); + //delete message + message::add($text['message-delete']); + } + } + +//get variables used to control the order + $order_by = check_str($_GET["order_by"]); + $order = check_str($_GET["order"]); + +//add the search term + $search = strtolower(check_str($_GET["search"])); + if (strlen($search) > 0) { + $sql_search = " ("; + $sql_search .= "lower(message_type) like '%".$search."%' "; + $sql_search .= "or lower(message_direction) like '%".$search."%' "; + $sql_search .= "or lower(message_date) like '%".$search."%' "; + $sql_search .= "or lower(message_from) like '%".$search."%' "; + $sql_search .= "or lower(message_to) like '%".$search."%' "; + $sql_search .= "or lower(message_text) like '%".$search."%' "; + $sql_search .= "or lower(message_media_type) like '%".$search."%' "; + $sql_search .= ") "; + } + +//additional includes + require_once "resources/header.php"; + require_once "resources/paging.php"; + +//prepare to page the results + $sql = "select count(message_uuid) as num_rows from v_messages "; + if ($_GET['show'] == "all" && permission_exists('message_all')) { + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } + } else { + $sql .= "where user_uuid = '".$_SESSION['user_uuid']."' "; + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + if (isset($sql_search)) { + $sql .= "and ".$sql_search; + } + } + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] > 0) { + $num_rows = $row['num_rows']; + } + else { + $num_rows = '0'; + } + } + +//prepare to page the results + $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; + $param = "&search=".$search; + if ($_GET['show'] == "all" && permission_exists('message_all')) { + $param .= "&show=all"; + } + $page = $_GET['page']; + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); + $offset = $rows_per_page * $page; + +//get the list + $sql = "select * from v_messages "; + if ($_GET['show'] == "all" && permission_exists('message_all')) { + if (isset($sql_search)) { + $sql .= "where ".$sql_search; + } + } else { + $sql .= "where user_uuid = '".$_SESSION['user_uuid']."' "; + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + if (isset($sql_search)) { + $sql .= "and ".$sql_search; + } + } + $sql .= "order by message_date desc "; + $sql .= "limit $rows_per_page offset $offset "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $messages = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + +//alternate the row style + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; + +//define the checkbox_toggle function + echo "\n"; + +//show the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-message_log']."

\n"; + echo " \n"; + + if (permission_exists('message_all')) { + if ($_GET['show'] == 'all') { + echo " "; + } + else { + echo " \n"; + } + } + + echo " \n"; + echo " \n"; + echo "
\n"; + + echo "
\n"; + echo "\n"; + if (is_array($messages)) { + $x = 0; + foreach($messages as $row) { + + if ($x == 0) { + echo " \n"; + echo th_order_by('message_type', $text['label-message_type'], $order_by, $order); + echo th_order_by('message_direction', $text['label-message_direction'], $order_by, $order); + echo th_order_by('message_date', $text['label-message_date'], $order_by, $order); + echo th_order_by('message_from', $text['label-message_from'], $order_by, $order); + echo th_order_by('message_to', $text['label-message_to'], $order_by, $order); + echo th_order_by('message_text', $text['label-message_text'], $order_by, $order); + echo " \n"; + echo "\n"; + + } + if (permission_exists('message_edit')) { + $tr_link = "href='message_edit.php?id=".escape($row['message_uuid'])."'"; + } + echo "\n"; + //echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + $x++; + if ($c==0) { $c=1; } else { $c=0; } + } //end foreach + unset($sql, $messages); + } //end if results + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo " \n"; + echo " "; + echo "  \n"; + echo "
".escape($row['user_uuid'])." "; + switch ($row['message_type']) { + case 'sms': echo $text['label-sms']; break; + case 'mms': echo $text['label-mms']; break; + case 'chat': echo $text['label-chat']; break; + } + echo " "; + switch ($row['message_direction']) { + case "inbound": echo $text['label-inbound']; break; + case "outbound": echo $text['label-outbound']; break; + } + echo " ".escape($row['message_date'])." ".escape(format_phone($row['message_from']))." ".escape(format_phone($row['message_to']))." ".escape($row['message_text'])." "; + if (permission_exists('message_edit')) { + echo "$v_link_label_edit"; + } + if (permission_exists('message_delete')) { + echo "$v_link_label_delete"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls"; + echo "  "; + echo "
\n"; + echo "
"; + echo "
\n"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/messages/messages_thread.php b/app/messages/messages_thread.php new file mode 100644 index 0000000000..085842901b --- /dev/null +++ b/app/messages/messages_thread.php @@ -0,0 +1,329 @@ + + Portions created by the Initial Developer are Copyright (C) 2016-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (!permission_exists('message_view')) { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//get number of messages to load + $number = preg_replace('{[\D]}', '', $_GET['number']); + $contact_uuid = $_GET['contact_uuid']; + +//set refresh flag + $refresh = $_GET['refresh'] == 'true' ? true : false; + +//get messages + if (isset($_SESSION['message']['display_last']['text']) && $_SESSION['message']['display_last']['text'] != '') { + $array = explode(' ',$_SESSION['message']['display_last']['text']); + if (is_array($array) && is_numeric($array[0]) && $array[0] > 0) { + if ($array[1] == 'messages') { + $limit = "limit ".$array[0]." offset 0 "; + } + else { + $since = "and message_date >= '".date("Y-m-d H:i:s", strtotime('-'.$_SESSION['message']['display_last']['text']))."' "; + } + } + } + if ($limit == '' && $since == '') { $limit = "limit 25 offset 0"; } //default (message count) + $sql = "select "; + $sql .= "message_uuid, "; + $sql .= "domain_uuid, "; + $sql .= "user_uuid, "; + $sql .= "contact_uuid, "; + $sql .= "message_type, "; + $sql .= "message_direction, "; + $sql .= "message_date at time zone '".$_SESSION['domain']['time_zone']['name']."' as message_date, "; + $sql .= "message_from, "; + $sql .= "message_to, "; + $sql .= "message_text "; + $sql .= "from v_messages "; + $sql .= "where user_uuid = '".$_SESSION['user_uuid']."' "; + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + $sql .= $since; + $sql .= "and (message_from like '%".$number."' or message_to like '%".$number."') "; + $sql .= "order by message_date desc "; + $sql .= $limit; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $messages = $prep_statement->fetchAll(PDO::FETCH_NAMED); + $messages = array_reverse($messages); + unset ($prep_statement, $sql); + +//get media (if any) + $sql = "select message_uuid, message_media_uuid, message_media_type, length(decode(message_media_content,'base64')) as message_media_size from v_message_media "; + $sql .= "where user_uuid = '".$_SESSION['user_uuid']."' "; + $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; + $sql .= "and message_uuid in ( "; + foreach ($messages as $message) { + $message_uuids[] = "'".$message['message_uuid']."'"; + } + $sql .= implode(',', $message_uuids); + $sql .= ") "; + $sql .= "and message_media_type <> 'txt' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $rows = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement, $sql); + +//prep media array + if (is_array($rows) && sizeof($rows) != 0) { + $x = 0; + foreach ($rows as $row) { + $message_media[$row['message_uuid']][$x]['uuid'] = $row['message_media_uuid']; + $message_media[$row['message_uuid']][$x]['type'] = $row['message_media_type']; + $message_media[$row['message_uuid']][$x]['size'] = $row['message_media_size']; + $x++; + } + } + +//css styles + echo "\n"; + + if (!$refresh) { + echo "
\n"; + } + + //output messages + if (is_array($messages) && sizeof($messages) != 0) { + foreach ($messages as $message) { + //parse from message + if ($message['message_direction'] == 'inbound') { + $message_from = $message['message_to']; + $media_source = format_phone($message['message_from']); + } + if ($message['message_direction'] == 'outbound') { + $media_source = format_phone($message['message_to']); + } + + //message bubble + echo ""; + //contact image em + if ( + $message['message_direction'] == 'inbound' && + is_array($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) && + sizeof($_SESSION['tmp']['messages']['contact_em'][$contact_uuid]) != 0 + ) { + echo "
\n"; + echo "
\n"; + echo "
\n"; + } + //contact image me + else if ( + is_array($_SESSION['tmp']['messages']['contact_me']) && + sizeof($_SESSION['tmp']['messages']['contact_me']) != 0 + ) { + echo "
\n"; + echo "
\n"; + echo "
\n"; + } + echo "
\n"; + //message + if ($message['message_text'] != '') { + echo "
".str_replace("\n",'
',escape($message['message_text']))."
\n"; + } + //attachments + if (is_array($message_media[$message['message_uuid']]) && sizeof($message_media[$message['message_uuid']]) != 0) { + + foreach ($message_media[$message['message_uuid']] as $media) { + if ($media['type'] != 'txt') { + if ($media['type'] == 'jpg' || $media['type'] == 'jpeg' || $media['type'] == 'gif' || $media['type'] == 'png') { + echo ""; + } + else { + echo ""; + } + echo ""; + echo "".strtoupper($media['type']).' · '.strtoupper(byte_convert($media['size'])).""; + echo "\n"; + } + } + echo "
\n"; + } + //message when + echo "".(date('m-d-Y') != format_when_local($message['message_date'],'d') ? format_when_local($message['message_date']) : format_when_local($message['message_date'],'t'))."\n"; + echo "
\n"; + echo "
\n"; + } + echo "\n"; + } + + echo "\n"; + + if (!$refresh) { + echo "
\n"; + + if (permission_exists('message_add')) { + //output input form + echo "
\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\"".$text['label-refresh_pause']."\"
\n"; + echo "
\n"; + + //js to load messages for clicked number + echo "\n"; + } + } + +?> \ No newline at end of file diff --git a/app/messages/resources/classes/messages.php b/app/messages/resources/classes/messages.php new file mode 100644 index 0000000000..2d580f9f92 --- /dev/null +++ b/app/messages/resources/classes/messages.php @@ -0,0 +1,82 @@ +db) { + require_once "resources/classes/database.php"; + $database = new database; + $database->connect(); + $this->db = $database->db; + } + } + + /** + * Called when there are no references to a particular object + * unset the variables used in the class + */ + public function __destruct() { + foreach ($this as $key => $value) { + unset($this->$key); + } + } + + /** + * delete messages + */ + public function delete($messages) { + if (permission_exists('message_delete')) { + + //delete multiple messages + if (is_array($messages)) { + //get the action + foreach($messages as $row) { + if ($row['action'] == 'delete') { + $action = 'delete'; + break; + } + } + //delete the checked rows + if ($action == 'delete') { + foreach($messages as $row) { + if ($row['action'] == 'delete' or $row['checked'] == 'true') { + $sql = "delete from v_messages "; + $sql .= "where message_uuid = '".$row['message_uuid']."'; "; + $this->db->query($sql); + unset($sql); + } + } + unset($messages); + } + } + } + } //end the delete function + + + /** + * add messages + */ + public function add() { + + } //end the add function + } //end the class +} + +/* +$obj = new messages; +$obj->delete(); +*/ + +?> diff --git a/app/messages/resources/images/attachment.png b/app/messages/resources/images/attachment.png new file mode 100644 index 0000000000..de7692bf24 Binary files /dev/null and b/app/messages/resources/images/attachment.png differ diff --git a/app/messages/resources/images/refresh_active.gif b/app/messages/resources/images/refresh_active.gif new file mode 100644 index 0000000000..305457831c Binary files /dev/null and b/app/messages/resources/images/refresh_active.gif differ diff --git a/app/messages/resources/images/refresh_paused.png b/app/messages/resources/images/refresh_paused.png new file mode 100644 index 0000000000..38937ec1f2 Binary files /dev/null and b/app/messages/resources/images/refresh_paused.png differ diff --git a/app/messages/root.php b/app/messages/root.php new file mode 100644 index 0000000000..6fdf32f37b --- /dev/null +++ b/app/messages/root.php @@ -0,0 +1,90 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +// make sure the PATH_SEPARATOR is defined + umask(2); + if (!defined("PATH_SEPARATOR")) { + if (strpos($_ENV["OS"], "Win") !== false) { + define("PATH_SEPARATOR", ";"); + } else { + define("PATH_SEPARATOR", ":"); + } + } + + if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; + + // make sure the document_root is set + $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); + if(PHP_SAPI == 'cli'){ + chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME)); + $script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]); + $dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME)); + if (file_exists('/project_root.php')) { + $path = '/'; + } else { + $i = 1; + $path = ''; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + } + $_SERVER["DOCUMENT_ROOT"] = $path; + }else{ + $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); + } + $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); +// try to detect if a project path is being used + if (!defined('PROJECT_PATH')) { + if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) { + define('PROJECT_PATH', '/fusionpbx'); + } elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) { + define('PROJECT_PATH', ''); + } else { + $dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME))); + $i = 1; + $path = $_SERVER["DOCUMENT_ROOT"]; + while ($i < count($dirs)) { + $path .= '/' . $dirs[$i]; + if (file_exists($path. '/project_root.php')) { + break; + } + $i++; + } + if(!file_exists($path. '/project_root.php')){ + die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); + } + $project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path); + define('PROJECT_PATH', $project_path); + } + $_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH); + set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]); + } + +?> \ No newline at end of file diff --git a/app/modules/module_delete.php b/app/modules/module_delete.php index ee63388c9b..678412a36f 100644 --- a/app/modules/module_delete.php +++ b/app/modules/module_delete.php @@ -51,7 +51,7 @@ if (strlen($id)>0) { unset($sql); } -messages::add($text['message-delete']); +message::add($text['message-delete']); header("Location: modules.php"); return; diff --git a/app/modules/module_edit.php b/app/modules/module_edit.php index 0d9ec87946..004648f102 100644 --- a/app/modules/module_edit.php +++ b/app/modules/module_edit.php @@ -123,7 +123,7 @@ $module = new modules;; $module->xml(); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: modules.php"); return; } //if ($action == "add") @@ -144,7 +144,7 @@ $module = new modules;; $module->xml(); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: modules.php"); return; } //if ($action == "update") diff --git a/app/music_on_hold/app_config.php b/app/music_on_hold/app_config.php index cad13cfeae..aa8effbd53 100644 --- a/app/music_on_hold/app_config.php +++ b/app/music_on_hold/app_config.php @@ -33,19 +33,15 @@ $apps[$x]['permissions'][$y]['name'] = "music_on_hold_view"; $apps[$x]['permissions'][$y]['menu']['uuid'] = "1cd1d6cb-912d-db32-56c3-e0d5699feb9d"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; $apps[$x]['permissions'][$y]['name'] = "music_on_hold_add"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; $apps[$x]['permissions'][$y]['name'] = "music_on_hold_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; $apps[$x]['permissions'][$y]['name'] = "music_on_hold_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; $apps[$x]['permissions'][$y]['name'] = "music_on_hold_name"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; @@ -117,4 +113,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/app/music_on_hold/app_menu.php b/app/music_on_hold/app_menu.php index 6b96ded42d..a48e2f3e4a 100644 --- a/app/music_on_hold/app_menu.php +++ b/app/music_on_hold/app_menu.php @@ -24,6 +24,5 @@ $apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['path'] = "/app/music_on_hold/music_on_hold.php"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; - $apps[$x]['menu'][$y]['groups'][] = "admin"; -?> \ No newline at end of file +?> diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index 8e9b29e055..e9db596db7 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -54,7 +54,7 @@ $sql .= "or domain_uuid is null "; } $sql .= ") "; - $sql .= "order by domain_uuid desc, music_on_hold_rate asc, music_on_hold_name asc"; + $sql .= "order by domain_uuid desc, music_on_hold_name asc, music_on_hold_rate asc"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $streams = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -158,7 +158,7 @@ //process, if possible if (!$valid_file_type) { - messages::add($text['message-unsupported_file_type']); + message::add($text['message-unsupported_file_type']); } else { @@ -257,7 +257,7 @@ } //set message - messages::add($text['message-upload_completed']); + message::add($text['message-upload_completed']); } //require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; @@ -302,7 +302,7 @@ array_map('unlink', glob(path_join($stream_path, '*.ogg'))); } //set message - messages::add($text['message-delete']); + message::add($text['message-delete']); } //require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; diff --git a/app/music_on_hold/music_on_hold_delete.php b/app/music_on_hold/music_on_hold_delete.php index 280fc39a1f..a7c1dc26ca 100644 --- a/app/music_on_hold/music_on_hold_delete.php +++ b/app/music_on_hold/music_on_hold_delete.php @@ -65,7 +65,7 @@ $music->reload(); //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: music_on_hold.php'); ?> diff --git a/app/music_on_hold/music_on_hold_edit.php b/app/music_on_hold/music_on_hold_edit.php index 9b0e6d1c6b..d839f34983 100644 --- a/app/music_on_hold/music_on_hold_edit.php +++ b/app/music_on_hold/music_on_hold_edit.php @@ -157,7 +157,7 @@ $music->reload(); //set the message and redirect the user - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: music_on_hold.php"); return; } //if ($action == "add") @@ -199,7 +199,7 @@ $music->reload(); //set the message and redirect the user - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: music_on_hold.php"); return; } //if ($action == "update") diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index 3d7091f939..2a0101f842 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -129,7 +129,7 @@ include "root.php"; $sql .= "from v_music_on_hold as m "; $sql .= "left join v_domains as d ON d.domain_uuid = m.domain_uuid "; $sql .= "where (m.domain_uuid = '".$this->domain_uuid."' or m.domain_uuid is null) "; - $sql .= "order by m.domain_uuid desc, music_on_hold_rate asc, music_on_hold_name asc"; + $sql .= "order by m.domain_uuid desc, music_on_hold_name asc, music_on_hold_rate asc "; $prep_statement = $this->db->prepare(check_sql($sql)); $prep_statement->execute(); return $prep_statement->fetchAll(PDO::FETCH_NAMED); diff --git a/app/number_translations/cmd.php b/app/number_translations/cmd.php index e959a71a3e..2e4c81a231 100644 --- a/app/number_translations/cmd.php +++ b/app/number_translations/cmd.php @@ -47,13 +47,13 @@ if ($fp) { //reloadxml if ($cmd == "api reloadxml") { - messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } //reload mod_translate if ($cmd == "api reload mod_translate") { - messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } diff --git a/app/number_translations/number_translation_delete.php b/app/number_translations/number_translation_delete.php index c243d25672..579f1b159e 100644 --- a/app/number_translations/number_translation_delete.php +++ b/app/number_translations/number_translation_delete.php @@ -31,7 +31,7 @@ $text = $language->get(); //delete the message - messages::add($text['message-delete']); + message::add($text['message-delete']); //delete the data if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('number_translation_delete')) { diff --git a/app/number_translations/number_translations.php b/app/number_translations/number_translations.php index 0047eb788d..2b36eaf30b 100644 --- a/app/number_translations/number_translations.php +++ b/app/number_translations/number_translations.php @@ -53,7 +53,7 @@ $obj = new number_translations; $obj->delete($number_translations); //delete message - messages::add($text['message-delete']); + message::add($text['message-delete']); } } diff --git a/app/operator_panel/exec.php b/app/operator_panel/exec.php index 6c5933922e..259e52d893 100644 --- a/app/operator_panel/exec.php +++ b/app/operator_panel/exec.php @@ -81,104 +81,123 @@ if (count($_GET)>0) { //setup the event socket connection $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if (stristr($action, 'user_status') == true) { - $user_status = $data; - switch ($user_status) { - case "Available": - $user_status = "Available"; - //update the user state - $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; - $response = event_socket_request($fp, $cmd); - break; - case "Available_On_Demand": - $user_status = "Available (On Demand)"; - //update the user state - $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; - $response = event_socket_request($fp, $cmd); - break; - case "Logged_Out": - $user_status = "Logged Out"; - //update the user state - $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; - $response = event_socket_request($fp, $cmd); - break; - case "On_Break": - $user_status = "On Break"; - //update the user state - $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; - $response = event_socket_request($fp, $cmd); - break; - case "Do_Not_Disturb": - $user_status = "Do Not Disturb"; - //update the user state - $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; - $response = event_socket_request($fp, $cmd); - break; - default: - $user_status = ""; + //get the status + if (stristr($action, 'user_status') == true) { + $user_status = $data; + switch ($user_status) { + case "Available": + $user_status = "Available"; + //update the user state + $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; + $response = event_socket_request($fp, $cmd); + break; + case "Available_On_Demand": + $user_status = "Available (On Demand)"; + //update the user state + $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; + $response = event_socket_request($fp, $cmd); + break; + case "Logged_Out": + $user_status = "Logged Out"; + //update the user state + $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; + $response = event_socket_request($fp, $cmd); + break; + case "On_Break": + $user_status = "On Break"; + //update the user state + $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; + $response = event_socket_request($fp, $cmd); + break; + case "Do_Not_Disturb": + $user_status = "Do Not Disturb"; + //update the user state + $cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domain_name']." Waiting"; + $response = event_socket_request($fp, $cmd); + break; + default: + $user_status = ""; + } } - } - //fs cmd - if (strlen($switch_cmd) > 0) { + //allow specific commands + if (strlen($switch_cmd) > 0) { + if (stristr($switch_cmd, 'originate') == true) {} + elseif (stristr($switch_cmd, 'uuid_record') == true) {} + elseif (stristr($switch_cmd, 'uuid_transfer') == true) {} + elseif (stristr($switch_cmd, 'eavesdrop') == true) {} + elseif (stristr($switch_cmd, 'uuid_kill') == true) {} + else { + $switch_cmd = ''; + } + if (stristr($switch_cmd, 'system') == true) { + $switch_cmd = ''; + } + } - //set the status so they are compatible with mod_callcenter + //switch cmd + if (strlen($switch_cmd) > 0) { + + //set the status so they are compatible with mod_callcenter $switch_cmd = str_replace("Available_On_Demand", "'Available (On Demand)'", $switch_cmd); $switch_cmd = str_replace("Logged_Out", "'Logged Out'", $switch_cmd); $switch_cmd = str_replace("On_Break", "'On Break'", $switch_cmd); $switch_cmd = str_replace("Do_Not_Disturb", "'Logged Out'", $switch_cmd); - /* - //if ($action == "energy") { - //conference 3001-example.org energy 103 - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - $result_array = explode("=",$switch_result); - $tmp_value = $result_array[1]; - //if ($direction == "up") { $tmp_value = $tmp_value + 100; } - //if ($direction == "down") { $tmp_value = $tmp_value - 100; } - //echo "energy $tmp_value
\n"; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); - //} - if ($action == "volume_in") { - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - $result_array = explode("=",$switch_result); - $tmp_value = $result_array[1]; - if ($direction == "up") { $tmp_value = $tmp_value + 1; } - if ($direction == "down") { $tmp_value = $tmp_value - 1; } - //echo "volume $tmp_value
\n"; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); - } - if ($action == "volume_out") { - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - $result_array = explode("=",$switch_result); - $tmp_value = $result_array[1]; - if ($direction == "up") { $tmp_value = $tmp_value + 1; } - if ($direction == "down") { $tmp_value = $tmp_value - 1; } - //echo "volume $tmp_value
\n"; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); - } - */ + /* + //if ($action == "energy") { + //conference 3001-example.org energy 103 + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + $result_array = explode("=",$switch_result); + $tmp_value = $result_array[1]; + //if ($direction == "up") { $tmp_value = $tmp_value + 100; } + //if ($direction == "down") { $tmp_value = $tmp_value - 100; } + //echo "energy $tmp_value
\n"; + $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); + //} + if ($action == "volume_in") { + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + $result_array = explode("=",$switch_result); + $tmp_value = $result_array[1]; + if ($direction == "up") { $tmp_value = $tmp_value + 1; } + if ($direction == "down") { $tmp_value = $tmp_value - 1; } + //echo "volume $tmp_value
\n"; + $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); + } + if ($action == "volume_out") { + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + $result_array = explode("=",$switch_result); + $tmp_value = $result_array[1]; + if ($direction == "up") { $tmp_value = $tmp_value + 1; } + if ($direction == "down") { $tmp_value = $tmp_value - 1; } + //echo "volume $tmp_value
\n"; + $switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value); + } + */ - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - if ($action == "record") { - if (trim($_GET["action2"]) == "stop") { - $x=0; - while (true) { - if ($x > 0) { - $dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"]."_".$x.".wav"; + //run the command + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + + //record stop + if ($action == "record") { + if (trim($_GET["action2"]) == "stop") { + $x=0; + while (true) { + if ($x > 0) { + $dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"]."_".$x.".wav"; + } + else { + $dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav"; + } + if (!file_exists($dest_file)) { + rename($_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav", $dest_file); + break; + } + $x++; } - else { - $dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav"; - } - if (!file_exists($dest_file)) { - rename($_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav", $dest_file); - break; - } - $x++; } } } - } } -?> \ No newline at end of file +?> diff --git a/app/operator_panel/index_inc.php b/app/operator_panel/index_inc.php index 5fdf6c1815..95f6b11475 100644 --- a/app/operator_panel/index_inc.php +++ b/app/operator_panel/index_inc.php @@ -367,7 +367,7 @@ if (is_array($activity)) foreach ($activity as $extension => $ext) { } $block .= "
"; if (permission_exists('operator_panel_call_details')) { - $block .= " ".$call_name."
".$call_number."
"; + $block .= " ".escape($call_name)."
".escape($call_number)."
"; } $block .= " "; //transfer @@ -449,6 +449,7 @@ else { } echo "

"; +/* if (if_group("superadmin") && isset($_GET['debug'])) { echo '$activity
'; echo ""; } +*/ ?> diff --git a/app/operator_panel/resources/functions/get_call_activity.php b/app/operator_panel/resources/functions/get_call_activity.php index 6ae05e9a4a..f1ae151fcb 100644 --- a/app/operator_panel/resources/functions/get_call_activity.php +++ b/app/operator_panel/resources/functions/get_call_activity.php @@ -18,6 +18,7 @@ function get_call_activity() { $sql .= "left outer join v_extension_users as eu on ( eu.extension_uuid = e.extension_uuid and eu.domain_uuid = '".$_SESSION['domain_uuid']."' ) "; $sql .= "left outer join v_users as u on ( u.user_uuid = eu.user_uuid and u.domain_uuid = '".$_SESSION['domain_uuid']."' ) "; $sql .= "where "; + $sql .= "e.enabled = 'true' and "; $sql .= "e.domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "order by "; $sql .= "e.extension asc "; diff --git a/app/phrases/app_defaults.php b/app/phrases/app_defaults.php index 2a7fb248eb..ef8ef6292e 100644 --- a/app/phrases/app_defaults.php +++ b/app/phrases/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2015 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -134,9 +134,10 @@ if ($domains_processed == 1) { $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); //delete memcache var - foreach ($result as $row) { - $switch_cmd .= "memcache delete languages:".$row['phrase_language']; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + foreach ($result as $row) { + //clear the cache + $cache = new cache; + $cache->delete("languages:".$row['phrase_language']); } unset($sql, $prep_statement, $result, $row); } diff --git a/app/phrases/phrase_delete.php b/app/phrases/phrase_delete.php index a2300a74e0..1686afaac2 100644 --- a/app/phrases/phrase_delete.php +++ b/app/phrases/phrase_delete.php @@ -17,24 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -require_once "resources/functions/save_phrases_xml.php"; +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + require_once "resources/functions/save_phrases_xml.php"; -if (permission_exists('phrase_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} +//check permissions + if (permission_exists('phrase_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -43,29 +45,35 @@ else { //get values $phrase_uuid = $_GET["id"]; -if ($phrase_uuid != '') { - //delete phrase details - $sql = "delete from v_phrase_details "; - $sql .= "where phrase_uuid = '".$phrase_uuid."' "; - $sql .= "and domain_uuid = '".$domain_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); +//delete the data + if (is_uuid($phrase_uuid)) { + //delete phrase details + $sql = "delete from v_phrase_details "; + $sql .= "where phrase_uuid = '".$phrase_uuid."' "; + $sql .= "and domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); - //delete phrase - $sql = "delete from v_phrases "; - $sql .= "where phrase_uuid = '".$phrase_uuid."' "; - $sql .= "and domain_uuid = '".$domain_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset ($prep_statement); -} + //delete phrase + $sql = "delete from v_phrases "; + $sql .= "where phrase_uuid = '".$phrase_uuid."' "; + $sql .= "and domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + unset ($prep_statement); + } -save_phrases_xml(); +//save the xml + save_phrases_xml(); + +//clear the cache + $cache = new cache; + $cache->delete("languages:".$phrase_language); //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: phrases.php"); - return; -?> \ No newline at end of file + +?> diff --git a/app/phrases/phrase_detail_delete.php b/app/phrases/phrase_detail_delete.php index b5945ab8e5..0c6039cf90 100644 --- a/app/phrases/phrase_detail_delete.php +++ b/app/phrases/phrase_detail_delete.php @@ -17,24 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -require_once "resources/functions/save_phrases_xml.php"; +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + require_once "resources/functions/save_phrases_xml.php"; -if (permission_exists('phrase_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} +//check permissions + if (permission_exists('phrase_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -58,15 +60,12 @@ else { //save the xml to the file system if the phrase directory is set save_phrases_xml(); -//delete the phrase from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd .= "memcache delete languages:".$phrase_language; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } +//clear the cache + $cache = new cache; + $cache->delete("languages:".$phrase_language); //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: phrase_edit.php?id='.$phrase_uuid); -?> \ No newline at end of file +?> diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php index 628d21449d..064024d67e 100644 --- a/app/phrases/phrase_edit.php +++ b/app/phrases/phrase_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -162,15 +162,12 @@ //save the xml to the file system if the phrase directory is set //save_phrases_xml(); - //delete the phrase from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd .= "memcache delete languages:".$phrase_language; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } + //clear the cache + $cache = new cache; + $cache->delete("languages:".$phrase_language); //send a redirect - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: phrase_edit.php?id=".$phrase_uuid); return; } //if ($action == "add") @@ -231,15 +228,12 @@ //save the xml to the file system if the phrase directory is set save_phrases_xml(); - //delete the phrase from memcache - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - if ($fp) { - $switch_cmd .= "memcache delete languages:".$phrase_language; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); - } + //clear the cache + $cache = new cache; + $cache->delete("languages:".$phrase_language); //send a redirect - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: phrase_edit.php?id=".$phrase_uuid); return; diff --git a/app/pin_numbers/pin_number_delete.php b/app/pin_numbers/pin_number_delete.php index 42007fee04..4f4bed16b2 100644 --- a/app/pin_numbers/pin_number_delete.php +++ b/app/pin_numbers/pin_number_delete.php @@ -59,7 +59,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: pin_numbers.php'); ?> \ No newline at end of file diff --git a/app/pin_numbers/pin_number_edit.php b/app/pin_numbers/pin_number_edit.php index d29cbe8fe7..2ee4c15afc 100644 --- a/app/pin_numbers/pin_number_edit.php +++ b/app/pin_numbers/pin_number_edit.php @@ -108,7 +108,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: pin_numbers.php"); return; @@ -125,7 +125,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: pin_numbers.php"); return; @@ -170,7 +170,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-pin_number']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-pin_number']."\n"; echo "\n"; @@ -181,7 +181,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-accountcode']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-accountcode']."\n"; echo "\n"; @@ -217,7 +217,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; @@ -225,7 +225,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; @@ -237,4 +237,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/pin_numbers/pin_numbers.php b/app/pin_numbers/pin_numbers.php index 3b232bcf44..74a68c184f 100644 --- a/app/pin_numbers/pin_numbers.php +++ b/app/pin_numbers/pin_numbers.php @@ -140,7 +140,7 @@ if (is_array($result)) { foreach($result as $row) { if (permission_exists('pin_number_edit')) { - $tr_link = "href='pin_number_edit.php?id=".$row['pin_number_uuid']."'"; + $tr_link = "href='pin_number_edit.php?id=".escape($row['pin_number_uuid'])."'"; } echo "\n"; echo " ".$row['pin_number']." \n"; @@ -149,10 +149,10 @@ echo " ".$row['description']." \n"; echo " "; if (permission_exists('pin_number_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('pin_number_delete')) { - echo "$v_link_label_delete"; + echo "$v_link_label_delete"; } echo " \n"; echo "\n"; diff --git a/app/polycom/app_config.php b/app/polycom/app_config.php index 642c5b5f68..398ce0f19a 100644 --- a/app/polycom/app_config.php +++ b/app/polycom/app_config.php @@ -55,6 +55,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Call Waiting 1=enabled 0=disable"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ef6b4223-0361-4c69-ae02-98c1b6fb3ad6"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_calls_per_line_key"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Limit number of calls per line key."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6f3d254d-8dde-438d-b2a5-eac75d1a7db5"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_feature_key_sync"; @@ -63,5 +71,45 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Feature Key Sync 1=enabled 0=disable"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "51697088-2ecf-4c9c-95d5-429c972606c2"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_nat_ip"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = " "; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c927e677-61c8-45c6-b827-8d3811584090"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_bluetooth_radio_on"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Bluetooth Radio 1=enabled 0=disable"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "deca02ea-2a9a-4741-90bd-ad4c1aa1bcbe"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_default_transfer_method"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Consultative"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = " Transfer method: Blind, Consultative"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b327130c-3e82-465a-9db2-f8f5cf801861"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_provision_url"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Provision URL"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3b52eaf2-4cf3-4c17-8802-34ef8e412e25"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "polycom_server_type"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "3"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0=FTP, 1=TFTP, 2=HTTP,3=HTTPS, 4=FTPS, 5=Invalid"; + $y++; ?> diff --git a/app/polycom/resources/firmware/readme b/app/polycom/resources/firmware/readme new file mode 100644 index 0000000000..8350c12e71 --- /dev/null +++ b/app/polycom/resources/firmware/readme @@ -0,0 +1 @@ +Folder used for Polycom Firmware diff --git a/app/provision/app_config.php b/app/provision/app_config.php index 3a18a833b4..40b552ae02 100644 --- a/app/provision/app_config.php +++ b/app/provision/app_config.php @@ -72,10 +72,10 @@ $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c998c762-6a43-4911-a465-a9653eeb793d"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "http_auth_disable"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "http_auth_enabled"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d376fe0f-fb89-4418-8fb4-590e4cac483f"; @@ -134,6 +134,22 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "58527906-a809-4699-a65c-fa8cc6771e35"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "server_address_primary"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "94b98bb3-bb63-4059-9a3a-6855ee4b0441"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "server_address_secondary"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a9dc7f4a-0a19-40cb-829a-093bf81d00db"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "line_sip_port"; @@ -178,7 +194,7 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "daylight_savings_start_day"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "11"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "10"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; @@ -210,7 +226,7 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "daylight_savings_stop_day"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "3"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; diff --git a/app/provision/app_defaults.php b/app/provision/app_defaults.php index 57c8a03a36..3a9566c774 100644 --- a/app/provision/app_defaults.php +++ b/app/provision/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -52,12 +52,43 @@ if ($domains_processed == 1) { unset($prep_statement, $result); } + //update http_auth_enabled set to true + $sql = "select * from v_default_settings "; + $sql .= "where default_setting_subcategory = 'http_auth_disable' "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($result)) { + foreach($result as $row) { + if ($row["default_setting_value"] == 'false' && $row["default_setting_enabled"] == 'true') { + $sql = "update v_default_settings "; + $sql .= "set default_setting_subcategory = 'http_auth_enabled', "; + $sql .= "default_setting_value = 'false', "; + $sql .= "default_setting_enabled = 'true' "; + $sql .= "where default_setting_uuid = 'c998c762-6a43-4911-a465-a9653eeb793d'; "; + $db->exec(check_sql($sql)); + unset($sql); + } + else { + $sql = "update v_default_settings "; + $sql .= "set default_setting_subcategory = 'http_auth_enabled', "; + $sql .= "default_setting_value = 'true', "; + $sql .= "default_setting_enabled = 'true' "; + $sql .= "where default_setting_uuid = 'c998c762-6a43-4911-a465-a9653eeb793d'; "; + $db->exec(check_sql($sql)); + unset($sql); + } + } + unset($prep_statement, $result); + } + //update default settings $sql = "update v_default_settings set "; $sql .= "default_setting_value = 'true', "; $sql .= "default_setting_name = 'boolean', "; $sql .= "default_setting_enabled = 'true' "; - $sql .= "where default_setting_subcategory = 'http_domain_filter' "; + $sql .= "where default_setting_category = 'provision' "; + $sql .= "and default_setting_subcategory = 'http_domain_filter' "; $sql .= "and default_setting_name = 'text' "; $sql .= "and default_setting_value = 'false' "; $sql .= "and default_setting_enabled = 'false' "; @@ -67,7 +98,8 @@ if ($domains_processed == 1) { //update default settings $sql = "update v_default_settings set "; $sql .= "default_setting_name = 'array' "; - $sql .= "where default_setting_subcategory = 'http_auth_password' "; + $sql .= "where default_setting_category = 'provision' "; + $sql .= "and default_setting_subcategory = 'http_auth_password' "; $sql .= "and default_setting_name = 'text' "; $db->exec($sql); unset($sql); @@ -75,7 +107,8 @@ if ($domains_processed == 1) { //update domain settings $sql = "update v_domain_settings set "; $sql .= "domain_setting_name = 'array' "; - $sql .= "where domain_setting_subcategory = 'http_auth_password' "; + $sql .= "where domain_setting_category = 'provision' "; + $sql .= "and domain_setting_subcategory = 'http_auth_password' "; $sql .= "and domain_setting_name = 'text' "; $db->exec($sql); unset($sql); diff --git a/app/provision/index.php b/app/provision/index.php index f775cbf849..5a42577f12 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2008-2018 All Rights Reserved. + Copyright (C) 2008-2019 All Rights Reserved. Contributor(s): Mark J Crane @@ -140,8 +140,10 @@ if ((!isset($_SESSION['provision']['http_domain_filter'])) or $_SESSION['provision']['http_domain_filter']['text'] == "false") { //get the domain_uuid $sql = "SELECT domain_uuid FROM v_devices "; - $sql .= "WHERE device_mac_address = '".$mac."' "; + $sql .= "WHERE device_mac_address = :mac "; + //$sql .= "WHERE device_mac_address = '".$mac."' "; $prep_statement = $db->prepare($sql); + $prep_statement->bindParam(':mac', $mac); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach($result as $row) { @@ -196,7 +198,7 @@ } //get the domains settings - if (strlen($_SESSION["domain_uuid"]) > 0) { + if (strlen($domain_uuid) > 0 && is_uuid($domain_uuid)) { $sql = "select * from v_domain_settings "; $sql .= "where domain_uuid = '" . $domain_uuid . "' "; $sql .= "and domain_setting_enabled = 'true' "; @@ -250,8 +252,10 @@ //get the domain_uuid $sql = "SELECT * FROM v_domains "; - $sql .= "WHERE domain_name = '".$domain_name."' "; + $sql .= "WHERE domain_name = :domain_name "; + //$sql .= "WHERE domain_name = '".$domain_name."' "; $prep_statement = $db->prepare($sql); + $prep_statement->bindParam(':domain_name', $domain_name); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach($result as $row) { @@ -310,7 +314,7 @@ //http authentication - digest if (strlen($provision["http_auth_username"]) > 0 && strlen($provision["http_auth_type"]) == 0) { $provision["http_auth_type"] = "digest"; } - if (strlen($provision["http_auth_username"]) > 0 && $provision["http_auth_type"] === "digest" && $provision["http_auth_disable"] !== "true") { + if (strlen($provision["http_auth_username"]) > 0 && $provision["http_auth_type"] === "digest" && $provision["http_auth_enabled"] === "true") { //function to parse the http auth header function http_digest_parse($txt) { //protect against missing data @@ -381,7 +385,7 @@ } //http authentication - basic - if (strlen($provision["http_auth_username"]) > 0 && $provision["http_auth_type"] === "basic" && $provision["http_auth_disable"] !== "true") { + if (strlen($provision["http_auth_username"]) > 0 && $provision["http_auth_type"] === "basic" && $provision["http_auth_enabled"] === "true") { if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="'.$_SESSION['domain_name'].'"'); header('HTTP/1.0 401 Authorization Required'); diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index 68a4c10c0a..13ea2ba651 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -128,12 +128,7 @@ include "root.php"; return true; } else { - //log the invalid mac address attempt to the syslog server - openlog("FusionPBX", LOG_PID | LOG_PERROR, LOG_LOCAL0); - syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] invalid mac address ".$mac); - closelog(); - //invalid mac address return false - return false; + return false; } } @@ -216,7 +211,7 @@ include "root.php"; $sql .= "and c.contact_uuid in ( "; $sql .= " select contact_uuid from v_contact_groups "; $sql .= " where group_uuid in ( "; - $sql .= " select group_uuid from v_group_users "; + $sql .= " select group_uuid from v_user_groups "; $sql .= " where user_uuid = '$device_user_uuid' "; $sql .= " and domain_uuid = '$domain_uuid' "; $sql .= " )) "; @@ -285,10 +280,10 @@ include "root.php"; // Easier than assigning these common groups to every user. // Check provision global_contact_groups and sanitize for sql. $global_contact_groups['enabled']=false; - if ( preg_match('/[a-zA-Z0-9-_, ]/',$_SESSION['provision']['gs_global_contact_groups']['text'])){ + if ( preg_match('/[a-zA-Z0-9-_, ]/',$_SESSION['provision']['grandstream_global_contact_groups']['text'])){ $global_contact_groups['enabled']=true; $gp=array(); - $groups=explode(',',$_SESSION['provision']['gs_global_contact_groups']['text']); + $groups=explode(',',$_SESSION['provision']['grandstream_global_contact_groups']['text']); foreach ($groups as $group){ $gp[] = trim($group); } @@ -297,11 +292,11 @@ include "root.php"; // Get a list of groups the user has access to see. $sql = "SELECT DISTINCT g.group_uuid, g.group_name, g.group_description "; $sql .= "FROM v_groups g "; - $sql .= " INNER JOIN v_group_users gu "; - $sql .= " ON gu.group_uuid=g.group_uuid "; + $sql .= " INNER JOIN v_user_groups ug "; + $sql .= " ON ug.group_uuid = g.group_uuid "; $sql .= " INNER JOIN v_contact_groups cg "; - $sql .= " ON cg.group_uuid=g.group_uuid "; - $sql .= "WHERE gu.user_uuid = '$device_user_uuid' "; + $sql .= " ON cg.group_uuid = g.group_uuid "; + $sql .= "WHERE ug.user_uuid = '$device_user_uuid' "; if ( $global_contact_groups['enabled'] ){ $sql .= "UNION "; $sql .= "SELECT g.group_uuid, g.group_name, g.group_description "; @@ -328,10 +323,10 @@ include "root.php"; $sql .= " SELECT cg.contact_uuid"; $sql .= " FROM v_contact_groups cg "; $sql .= " WHERE cg.group_uuid IN ("; - $sql .= " SELECT gu.group_uuid "; - $sql .= " FROM v_group_users gu "; - $sql .= " WHERE gu.user_uuid = '$device_user_uuid' "; - $sql .= " AND gu.domain_uuid = '$domain_uuid' "; + $sql .= " SELECT ug.group_uuid "; + $sql .= " FROM v_user_groups ug "; + $sql .= " WHERE ug.user_uuid = '$device_user_uuid' "; + $sql .= " AND ug.domain_uuid = '$domain_uuid' "; if ( $global_contact_groups['enabled'] ){ $sql .= " UNION "; $sql .= " SELECT g.group_uuid "; @@ -617,6 +612,9 @@ include "root.php"; $templates['snom370-SIP'] = 'snom/370'; $templates['snom820-SIP'] = 'snom/820'; $templates['snom-m3-SIP'] = 'snom/m3'; + + $templates['Fanvil X6'] = 'fanvil/x6'; + $templates['Fanvil i30'] = 'fanvil/i30'; $templates['yealink SIP-CP860'] = 'yealink/cp860'; # $templates['yealink SIP-CP860'] = 'yealink/cp920'; @@ -706,31 +704,38 @@ include "root.php"; //mac address does not exist in the table so add it if ($_SESSION['provision']['auto_insert_enabled']['boolean'] == "true" and strlen($domain_uuid) > 0) { + + //get a new primary key $device_uuid = uuid(); - $sql = "INSERT INTO v_devices "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "device_uuid, "; - $sql .= "device_mac_address, "; - $sql .= "device_vendor, "; - $sql .= "device_model, "; - $sql .= "device_enabled, "; - $sql .= "device_template, "; - $sql .= "device_description "; - $sql .= ") "; - $sql .= "VALUES "; - $sql .= "("; - $sql .= "'".$domain_uuid."', "; - $sql .= "'$device_uuid', "; - $sql .= "'$mac', "; - $sql .= "'$device_vendor', "; - $sql .= "'', "; - $sql .= "'true', "; - $sql .= "'$device_template', "; - $sql .= "'auto {$_SERVER['HTTP_USER_AGENT']}' "; - $sql .= ")"; - $this->db->exec(check_sql($sql)); - unset($sql); + + //prepare the array + $x = 0; + $array['devices'][$x]['domain_uuid'] = $domain_uuid; + $array['devices'][$x]['device_uuid'] = $device_uuid; + $array['devices'][$x]['device_mac_address'] = $mac; + $array['devices'][$x]['device_vendor'] = $device_vendor; + $array['devices'][$x]['device_enabled'] = 'true'; + $array['devices'][$x]['device_template'] = $device_template; + $array['devices'][$x]['device_description'] = $_SERVER['HTTP_USER_AGENT']; + + //add the dialplan permission + $p = new permissions; + $p->add("device_add", "temp"); + $p->add("device_edit", "temp"); + + //save to the data + $database = new database; + $database->app_name = 'devices'; + $database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e'; + if (strlen($device_uuid) > 0) { + $database->uuid($device_uuid); + } + $database->save($array); + $message = $database->message; + + //remove the temporary permission + $p->delete("device_add", "temp"); + $p->delete("device_edit", "temp"); } } } @@ -856,8 +861,7 @@ include "root.php"; $prep_statement = $this->db->prepare(check_sql($sql)); $prep_statement->execute(); $device_lines = $prep_statement->fetchAll(PDO::FETCH_NAMED); - //assign the keys array - $view->assign("lines", $device_lines); + //set the variables if (is_array($device_lines)) { foreach($device_lines as $row) { @@ -880,17 +884,21 @@ include "root.php"; } //set a lines array index is the line number + $lines[$line_number] = $row; $lines[$line_number]['register_expires'] = $register_expires; $lines[$line_number]['sip_transport'] = strtolower($sip_transport); $lines[$line_number]['sip_port'] = $sip_port; $lines[$line_number]['server_address'] = $row["server_address"]; $lines[$line_number]['outbound_proxy'] = $row["outbound_proxy_primary"]; + $lines[$line_number]['server'][1]['address'] = $row["server_address_primary"]; + $lines[$line_number]['server'][2]['address'] = $row["server_address_secondary"]; $lines[$line_number]['outbound_proxy_primary'] = $row["outbound_proxy_primary"]; $lines[$line_number]['outbound_proxy_secondary'] = $row["outbound_proxy_secondary"]; $lines[$line_number]['display_name'] = $row["display_name"]; $lines[$line_number]['auth_id'] = $row["auth_id"]; $lines[$line_number]['user_id'] = $row["user_id"]; $lines[$line_number]['password'] = $row["password"]; + $lines[$line_number]['user_password'] = $row["password"]; $lines[$line_number]['shared_line'] = $row["shared_line"]; //assign the variables for line one - short name @@ -927,6 +935,11 @@ include "root.php"; unset ($prep_statement); } + //assign the arrays + $view->assign("lines", $lines); + $view->assign("account", $lines); + $view->assign("user", $lines); + //get the list of contact directly assigned to the user if (strlen($device_user_uuid) > 0 and strlen($domain_uuid) > 0) { //get the contacts assigned to the groups and add to the contacts array @@ -939,7 +952,7 @@ include "root.php"; $this->contact_append($contacts, $line, $domain_uuid, $device_user_uuid, false); } // Grandstream get the contacts assigned to the user and groups and add to the contacts array - if ($_SESSION['provision']['contact_grandstream']['text'] == "true") { + if ($_SESSION['provision']['contact_grandstream']['boolean'] == "true") { $this->contact_grandstream($contacts, $line, $domain_uuid, $device_user_uuid); } } @@ -1097,6 +1110,7 @@ include "root.php"; $device_keys[$k]['device_key_value'] = str_replace("\${".$name."}", $value, $field['device_key_value']); $device_keys[$k]['device_key_extension'] = str_replace("\${".$name."}", $value, $field['device_key_extension']); $device_keys[$k]['device_key_label'] = str_replace("\${".$name."}", $value, $field['device_key_label']); + $device_keys[$k]['device_key_icon'] = str_replace("\${".$name."}", $value, $field['device_key_icon']); } else { if (is_array($field)) { @@ -1104,6 +1118,7 @@ include "root.php"; $device_keys[$k][$key]['device_key_value'] = str_replace("\${".$name."}", $value, $row['device_key_value']); $device_keys[$k][$key]['device_key_extension'] = str_replace("\${".$name."}", $value, $row['device_key_extension']); $device_keys[$k][$key]['device_key_label'] = str_replace("\${".$name."}", $value, $row['device_key_label']); + $device_keys[$k][$key]['device_key_icon'] = str_replace("\${".$name."}", $value, $row['device_key_icon']); } } } @@ -1127,11 +1142,13 @@ include "root.php"; $device_key_value = $row['device_key_value']; //1 $device_key_extension = $row['device_key_extension']; $device_key_label = $row['device_key_label']; //label + $device_key_icon = $row['device_key_icon']; //icon //add general variables $device_key_value = str_replace("\${domain_name}", $domain_name, $device_key_value); $device_key_extension = str_replace("\${domain_name}", $domain_name, $device_key_extension); $device_key_label = str_replace("\${domain_name}", $domain_name, $device_key_label); + $device_key_icon = str_replace("\${domain_name}", $domain_name, $device_key_icon); //grandstream modes are different based on the category if ($device_vendor == "grandstream") { @@ -1149,6 +1166,7 @@ include "root.php"; case "call return": $device_key_type = "17"; break; case "transfer": $device_key_type = "18"; break; case "call park": $device_key_type = "19"; break; + case "monitored call park": $device_key_type = "26"; break; case "intercom": $device_key_type = "20"; break; case "ldap search": $device_key_type = "21"; break; } @@ -1165,6 +1183,7 @@ include "root.php"; case "call return": $device_key_type = "7"; break; case "transfer": $device_key_type = "8"; break; case "call park": $device_key_type = "9"; break; + case "monitored call park": $device_key_type = "16"; break; case "intercom": $device_key_type = "10"; break; case "ldap search": $device_key_type = "11"; break; } @@ -1179,6 +1198,7 @@ include "root.php"; $view->assign("key_value_".$device_key_id, $device_key_value); $view->assign("key_extension_".$device_key_id, $device_key_extension); $view->assign("key_label_".$device_key_id, $device_key_label); + $view->assign("key_icon_".$device_key_id, $device_key_icon); } else { $view->assign($device_key_category."_key_id_".$device_key_id, $device_key_id); @@ -1187,6 +1207,7 @@ include "root.php"; $view->assign($device_key_category."_key_value_".$device_key_id, $device_key_value); $view->assign($device_key_category."_key_extension_".$device_key_id, $device_key_extension); $view->assign($device_key_category."_key_label_".$device_key_id, $device_key_label); + $view->assign($device_key_category."_key_icon_".$device_key_id, $device_key_icon); } } } @@ -1411,7 +1432,9 @@ include "root.php"; $file_contents = $this->render(); //write the file - mkdir($directory,0777,true); + if(!is_dir($directory)) { + mkdir($directory,0777,true); + } $fh = fopen($dest_path,"w") or die("Unable to write to $directory for provisioning. Make sure the path exists and permissons are set correctly."); fwrite($fh, $file_contents); fclose($fh); diff --git a/app/recordings/recording_delete.php b/app/recordings/recording_delete.php index 5b055164f6..a4c91e28fc 100644 --- a/app/recordings/recording_delete.php +++ b/app/recordings/recording_delete.php @@ -72,7 +72,7 @@ if (strlen($id)>0) { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: recordings.php"); return; ?> \ No newline at end of file diff --git a/app/recordings/recording_edit.php b/app/recordings/recording_edit.php index 2ac9158228..c639ade871 100644 --- a/app/recordings/recording_edit.php +++ b/app/recordings/recording_edit.php @@ -97,7 +97,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: recordings.php"); return; } //if (permission_exists('recording_edit')) { diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 1592fcfa8a..8ad0da2fc7 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -139,7 +139,7 @@ move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename); //set the message - messages::add($text['message-uploaded'].": ".htmlentities($recording_filename)); + message::add($text['message-uploaded'].": ".htmlentities($recording_filename)); //set the file name to be inserted as the recording description $recording_description = base64_encode($_FILES['ulfile']['name']); @@ -312,11 +312,9 @@ echo "".$text['label-tools']."\n"; if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { echo "".$text['label-file-size']."\n"; - echo "".$text['label-uploaded']."\n"; - } - else { - echo th_order_by('recording_description', $text['label-description'], $order_by, $order); + echo "".$text['label-uploaded']."\n"; } + echo th_order_by('recording_description', $text['label-description'], $order_by, $order); echo " \n"; echo "\n"; @@ -369,11 +367,9 @@ } echo " ".$file_size."\n"; - echo " ".$file_date."\n"; - } - else { - echo " ".escape($row['recording_description'])." \n"; + echo " ".$file_date."\n"; } + echo " ".escape($row['recording_description'])." \n"; echo " "; if (permission_exists('recording_edit')) { echo "$v_link_label_edit"; diff --git a/app/registrations/cmd.php b/app/registrations/cmd.php index 5db8ecc9af..3c34c248cf 100644 --- a/app/registrations/cmd.php +++ b/app/registrations/cmd.php @@ -47,6 +47,7 @@ $rdr = check_str($_GET['rdr']); $profile = check_str($_GET['profile']); $domain = check_str($_GET['domain']); + $host = check_str($_GET['host']); $show = check_str($_GET['show']); $user = check_str($_GET['user']); $agent = check_str($_GET['agent']); @@ -70,7 +71,7 @@ $response = event_socket_request($fp, "api ".$command); $response = event_socket_request($fp, "api log notice ".$command); //show the response - messages::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); + message::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); //close the connection fclose($fp); } diff --git a/app/registrations/registrations.php b/app/registrations/registrations.php index 6332ec915e..05c7c9de24 100644 --- a/app/registrations/registrations.php +++ b/app/registrations/registrations.php @@ -123,10 +123,10 @@ $command = "sofia profile ".$row['profile']." flush_inbound_reg ".$row['user']." reboot"; } if ($action == "provision") { - $command = "lua app.lua event_notify ".$row['profile']." check_sync ".$row['user']." ".$vendor; + $command = "lua app.lua event_notify ".$row['profile']." check_sync ".$row['user']." ".$vendor." ".$row['host']; } if ($action == "reboot") { - $command = "lua app.lua event_notify ".$row['profile']." reboot ".$row['user']." ".$vendor; + $command = "lua app.lua event_notify ".$row['profile']." reboot ".$row['user']." ".$vendor." ".$row['host']; } //send the command $response = event_socket_request($fp, "api ".$command); @@ -138,7 +138,7 @@ //show the response if (isset($response)) { - messages::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); + message::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); } //define variables @@ -274,6 +274,7 @@ echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " ".escape($row['user'])." \n"; diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index 4f5e241eb3..7a123530ef 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -90,17 +90,17 @@ if (!class_exists('registrations')) { //build the registrations array //$registrations[0] = $row; $user_array = explode('@', $row['user']); - $registrations[$id]['user'] = $row['user'] ?: " "; - $registrations[$id]['call-id'] = $row['call-id'] ?: " "; - $registrations[$id]['contact'] = $row['contact'] ?: " "; - $registrations[$id]['sip-auth-user'] = $row['sip-auth-user'] ?: " "; - $registrations[$id]['agent'] = $row['agent'] ?: " "; - $registrations[$id]['host'] = $row['host'] ?: " "; - $registrations[$id]['network-port'] = $row['network-port'] ?: " "; - $registrations[$id]['sip-auth-realm'] = $row['sip-auth-realm'] ?: " "; - $registrations[$id]['mwi-account'] = $row['mwi-account'] ?: " "; - $registrations[$id]['status'] = $row['status'] ?: " "; - $registrations[$id]['ping-time'] = $row['ping-time'] ?: " "; + $registrations[$id]['user'] = $row['user'] ?: ''; + $registrations[$id]['call-id'] = $row['call-id'] ?: ''; + $registrations[$id]['contact'] = $row['contact'] ?: ''; + $registrations[$id]['sip-auth-user'] = $row['sip-auth-user'] ?: ''; + $registrations[$id]['agent'] = $row['agent'] ?: ''; + $registrations[$id]['host'] = $row['host'] ?: ''; + $registrations[$id]['network-port'] = $row['network-port'] ?: ''; + $registrations[$id]['sip-auth-realm'] = $row['sip-auth-realm'] ?: ''; + $registrations[$id]['mwi-account'] = $row['mwi-account'] ?: ''; + $registrations[$id]['status'] = $row['status'] ?: ''; + $registrations[$id]['ping-time'] = $row['ping-time'] ?: ''; $registrations[$id]['sip_profile_name'] = $field['sip_profile_name']; //get network-ip to url or blank diff --git a/app/ring_groups/app_config.php b/app/ring_groups/app_config.php index cb3cfae91b..294883b54e 100644 --- a/app/ring_groups/app_config.php +++ b/app/ring_groups/app_config.php @@ -118,6 +118,9 @@ $apps[$x]['permissions'][$y]['name'] = "ring_group_cid_name_prefix"; $y++; $apps[$x]['permissions'][$y]['name'] = "ring_group_cid_number_prefix"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "ring_group_context"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //default settings $y=0; @@ -251,6 +254,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_dialplans"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "dialplan_uuid"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "ring_group_forward_toll_allow"; diff --git a/app/ring_groups/ring_group_delete.php b/app/ring_groups/ring_group_delete.php index 003ab7eef5..e8fa9e764e 100644 --- a/app/ring_groups/ring_group_delete.php +++ b/app/ring_groups/ring_group_delete.php @@ -17,82 +17,73 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2015 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane James Rose */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('ring_group_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('ring_group_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; $text = $language->get(); //get the http value and set it as a php variable - if (count($_GET)>0) { - $id = check_str($_GET["id"]); + if (is_array($_GET)) { + $id = $_GET["id"]; } //delete the user data - if (strlen($id)>0) { - //get the dialplan - $sql = "select dialplan_uuid from v_ring_groups "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and ring_group_uuid = '".$id."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(); - foreach ($result as &$row) { - $dialplan_uuid = $row["dialplan_uuid"]; - $ring_group_context = $row["ring_group_context"]; + if (is_uuid($id)) { + + //get the dialplan_uuid + $sql = "select * from v_ring_groups "; + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "and ring_group_uuid = :ring_group_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $parameters['ring_group_uuid'] = $id; + $database = new database; + $result = $database->select($sql, $parameters); + if (is_array($result)) { + foreach ($result as &$row) { + $dialplan_uuid = $row["dialplan_uuid"]; + $ring_group_context = $row["ring_group_context"]; + } } - unset ($prep_statement); + unset($database, $sql, $parameters); - //delete the ring group - $sql = "delete from v_ring_groups "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and ring_group_uuid = '".$id."' "; - $db->exec(check_sql($sql)); - unset($sql); + //add the dialplan permission + $p = new permissions; + $p->add('dialplan_delete', 'temp'); - //delete the ring group destinations - $sql = "delete from v_ring_group_destinations "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and ring_group_uuid = '".$id."' "; - $db->exec(check_sql($sql)); - unset($sql); + //delete the data + $array['dialplan_details'][]['dialplan_uuid'] = $dialplan_uuid; + $array['dialplans'][]['dialplan_uuid'] = $dialplan_uuid; + $array['ring_group_destinations'][]['ring_group_uuid'] = $id; + $array['ring_group_users'][]['ring_group_uuid'] = $id; + $array['ring_groups'][]['ring_group_uuid'] = $id; + $database = new database; + $database->app_name = 'ring_groups'; + $database->app_uuid = '1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2'; + $database->delete($array); + //$message = $database->message; - //delete the ring group users - $sql = "delete from v_ring_group_users "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and ring_group_uuid = '".$id."' "; - $db->exec(check_sql($sql)); - unset($sql); - - //delete the dialplan details - $sql = "delete from v_dialplan_details "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; - $db->exec(check_sql($sql)); - unset($sql); - - //delete the dialplan - $sql = "delete from v_dialplans "; - $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; - $sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; - $db->exec(check_sql($sql)); - unset($sql); + //remove the temporary permission + $p->delete('dialplan_delete', 'temp'); //save the xml save_dialplan_xml(); @@ -106,7 +97,7 @@ else { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: ring_groups.php"); return; diff --git a/app/ring_groups/ring_group_destination_delete.php b/app/ring_groups/ring_group_destination_delete.php index 688bec3b9d..a646a7b93e 100644 --- a/app/ring_groups/ring_group_destination_delete.php +++ b/app/ring_groups/ring_group_destination_delete.php @@ -17,48 +17,53 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2013 + Portions created by the Initial Developer are Copyright (C) 2013 - 2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('ring_group_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('ring_group_delete')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; $text = $language->get(); //get the id - if (count($_GET)>0) { - $id = check_str($_GET["id"]); - $ring_group_uuid = check_str($_GET["ring_group_uuid"]); + if (is_array($_GET)) { + $id = $_GET["id"]; + $ring_group_uuid = $_GET["ring_group_uuid"]; } //delete ring_group_destination - if (strlen($id)>0) { - $sql = "delete from v_ring_group_destinations "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and ring_group_destination_uuid = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); + if (is_uuid($id)) { + $array['ring_group_destinations'][]['ring_group_destination_uuid'] = $id; + $database = new database; + $database->app_name = 'ring_groups'; + $database->app_uuid = '1d61fb65-1eec-bc73-a6ee-a6203b4fe6f2'; + $database->delete($array); + //$message = $database->message; } //save the message to a session variable - messages::add($text['message-delete']); + message::add($text['message-delete']); //redirect the browser - header("Location: ring_group_edit.php?id=$ring_group_uuid"); - exit; + if (is_uuid($ring_group_uuid)) { + header("Location: ring_group_edit.php?id=".$ring_group_uuid); + } -?> \ No newline at end of file +?> diff --git a/app/ring_groups/ring_group_destination_edit.php b/app/ring_groups/ring_group_destination_edit.php index 814d0411ec..69aa4ec24c 100644 --- a/app/ring_groups/ring_group_destination_edit.php +++ b/app/ring_groups/ring_group_destination_edit.php @@ -132,7 +132,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: ring_group_edit.php?id=".$ring_group_uuid); return; } //if ($action == "add") @@ -153,7 +153,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: ring_group_edit.php?id=".$ring_group_uuid); return; } //if ($action == "update") @@ -188,7 +188,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "".$text['title-ring_group_destination']."\n"; echo ""; - echo " "; + echo " "; echo " \n"; echo "\n"; echo "\n"; @@ -198,7 +198,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-destination_number']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-destination_number']."\n"; echo "\n"; @@ -210,7 +210,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; destination_select('destination_delay', $destination_delay, '0'); - //echo " \n"; + //echo " \n"; echo "
\n"; echo $text['description-destination_delay']."\n"; echo "\n"; @@ -222,7 +222,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; destination_select('destination_timeout', $destination_timeout, '30'); - //echo " \n"; + //echo " \n"; echo "
\n"; echo $text['description-destination_timeout']."\n"; echo "\n"; @@ -256,9 +256,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { } echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; @@ -270,4 +270,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 757beeac5b..e9c2e60086 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -57,7 +57,7 @@ $sql .= "and user_uuid = '".$user_uuid."' "; $db->exec(check_sql($sql)); //save the message to a session variable - messages::add($text['message-delete']); + message::add($text['message-delete']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; @@ -84,7 +84,7 @@ } unset($prep_statement, $row); if ($total_ring_groups >= $_SESSION['limit']['ring_groups']['numeric']) { - messages::add($text['message-maximum_ring_groups'].' '.$_SESSION['limit']['ring_groups']['numeric'], 'negative'); + message::add($text['message-maximum_ring_groups'].' '.$_SESSION['limit']['ring_groups']['numeric'], 'negative'); header('Location: ring_groups.php'); return; } @@ -97,7 +97,7 @@ $ring_group_name = check_str($_POST["ring_group_name"]); $ring_group_extension = check_str($_POST["ring_group_extension"]); $ring_group_greeting = check_str($_POST["ring_group_greeting"]); - $ring_group_context = check_str($_POST["ring_group_context"]); + $ring_group_strategy = check_str($_POST["ring_group_strategy"]); $ring_group_timeout_action = check_str($_POST["ring_group_timeout_action"]); $ring_group_call_timeout = check_str($_POST["ring_group_call_timeout"]); @@ -112,6 +112,7 @@ $ring_group_forward_enabled = check_str($_POST["ring_group_forward_enabled"]); $ring_group_forward_destination = check_str($_POST["ring_group_forward_destination"]); $ring_group_forward_toll_allow = check_str($_POST["ring_group_forward_toll_allow"]); + $ring_group_context = check_str($_POST["ring_group_context"]); $ring_group_enabled = check_str($_POST["ring_group_enabled"]); $ring_group_description = check_str($_POST["ring_group_description"]); $dialplan_uuid = check_str($_POST["dialplan_uuid"]); @@ -125,7 +126,7 @@ $destination_prompt = check_str($_POST["destination_prompt"]); //set the context for users that are not in the superadmin group - if (!if_group("superadmin")) { + if (!permission_exists("ring_group_context")) { $ring_group_context = $_SESSION['domain_name']; } } @@ -152,7 +153,7 @@ $sql_insert .= ")"; $db->exec($sql_insert); //save the message to a session variable - messages::add($text['message-add']); + message::add($text['message-add']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; @@ -284,10 +285,11 @@ //build the xml dialplan $dialplan_xml = "\n"; - $dialplan_xml .= "\n"; - $dialplan_xml .= "\n"; - $dialplan_xml .= "\n"; - $dialplan_xml .= "\n"; + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; + $dialplan_xml .= " \n"; $dialplan_xml .= "\n"; //build the dialplan array @@ -341,14 +343,14 @@ //set the message if ($action == "add") { //save the message to a session variable - messages::add($text['message-add']); + message::add($text['message-add']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; } if ($action == "update") { //save the message to a session variable - messages::add($text['message-update']); + message::add($text['message-update']); } } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) @@ -455,7 +457,7 @@ //set defaults if (strlen($ring_group_enabled) == 0) { $ring_group_enabled = 'true'; } -//set the context for users that are not in the superadmin group +//set the default ring group context if (strlen($ring_group_context) == 0) { $ring_group_context = $_SESSION['domain_name']; } @@ -787,7 +789,7 @@ echo " "; echo " \n"; @@ -846,7 +848,7 @@ echo "\n"; } - if (if_group("superadmin")) { + if (permission_exists("ring_group_context")) { echo "\n"; echo "\n"; echo " ".$text['label-context']."\n"; diff --git a/app/ring_groups/ring_group_forward.php b/app/ring_groups/ring_group_forward.php index e3be2abdcc..8ef51e31c2 100644 --- a/app/ring_groups/ring_group_forward.php +++ b/app/ring_groups/ring_group_forward.php @@ -69,7 +69,7 @@ unset($sql); } //redirect the user - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: ".$_REQUEST['return_url']); exit; } diff --git a/app/services/service_delete.php b/app/services/service_delete.php index 18061136ba..792bd89517 100644 --- a/app/services/service_delete.php +++ b/app/services/service_delete.php @@ -53,7 +53,7 @@ else { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: services.php"); return; diff --git a/app/services/service_edit.php b/app/services/service_edit.php index 1dd17d4f6d..674a4aa45d 100644 --- a/app/services/service_edit.php +++ b/app/services/service_edit.php @@ -115,7 +115,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: services.php"); return; } //if ($action == "add") @@ -133,7 +133,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: services.php"); return; } //if ($action == "update") diff --git a/app/settings/app_config.php b/app/settings/app_config.php index 48278d7bb7..67e80ca14d 100644 --- a/app/settings/app_config.php +++ b/app/settings/app_config.php @@ -83,6 +83,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "event_socket_acl"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "xml_rpc_http_port"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; @@ -111,4 +115,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/app/settings/app_languages.php b/app/settings/app_languages.php index 6458af351c..dc07638d90 100644 --- a/app/settings/app_languages.php +++ b/app/settings/app_languages.php @@ -1,404 +1,424 @@ diff --git a/app/settings/setting_edit.php b/app/settings/setting_edit.php index e76381589d..538e5d848c 100644 --- a/app/settings/setting_edit.php +++ b/app/settings/setting_edit.php @@ -17,23 +17,27 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2018 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane James Rose */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('setting_view') || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('setting_view') || if_group("superadmin")) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -71,6 +75,7 @@ else { if (strlen($event_socket_ip_address) == 0) { $event_socket_ip_address = '127.0.0.1'; } $event_socket_port = check_str($_POST["event_socket_port"]); $event_socket_password = check_str($_POST["event_socket_password"]); + $event_socket_acl = check_str($_POST["event_socket_acl"]); $xml_rpc_http_port = check_str($_POST["xml_rpc_http_port"]); $xml_rpc_auth_realm = check_str($_POST["xml_rpc_auth_realm"]); $xml_rpc_auth_user = check_str($_POST["xml_rpc_auth_user"]); @@ -88,6 +93,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //if (strlen($default_gateway) == 0) { $msg .= "Please provide: Default Gateway
\n"; } if (strlen($event_socket_port) == 0) { $msg .= "Please provide: Event Socket Port
\n"; } if (strlen($event_socket_password) == 0) { $msg .= "Please provide: Event Socket Password
\n"; } + //if (strlen($event_socket_acl) == 0) { $msg .= "Please provide: Event Socket ACL
\n"; } //if (strlen($xml_rpc_http_port) == 0) { $msg .= "Please provide: XML RPC HTTP Port
\n"; } //if (strlen($xml_rpc_auth_realm) == 0) { $msg .= "Please provide: XML RPC Auth Realm
\n"; } //if (strlen($xml_rpc_auth_user) == 0) { $msg .= "Please provide: XML RPC Auth User
\n"; } @@ -116,6 +122,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "event_socket_ip_address, "; $sql .= "event_socket_port, "; $sql .= "event_socket_password, "; + $sql .= "event_socket_acl, "; $sql .= "xml_rpc_http_port, "; $sql .= "xml_rpc_auth_realm, "; $sql .= "xml_rpc_auth_user, "; @@ -128,6 +135,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "'$event_socket_ip_address', "; $sql .= "'$event_socket_port', "; $sql .= "'$event_socket_password', "; + $sql .= "'$event_socket_acl', "; $sql .= "'$xml_rpc_http_port', "; $sql .= "'$xml_rpc_auth_realm', "; $sql .= "'$xml_rpc_auth_user', "; @@ -141,7 +149,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //synchronize settings save_setting_xml(); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: setting_edit.php"); return; } //if ($action == "add") @@ -151,6 +159,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "event_socket_ip_address = '$event_socket_ip_address', "; $sql .= "event_socket_port = '$event_socket_port', "; $sql .= "event_socket_password = '$event_socket_password', "; + $sql .= "event_socket_acl = '$event_socket_acl', "; $sql .= "xml_rpc_http_port = '$xml_rpc_http_port', "; $sql .= "xml_rpc_auth_realm = '$xml_rpc_auth_realm', "; $sql .= "xml_rpc_auth_user = '$xml_rpc_auth_user', "; @@ -163,7 +172,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //synchronize settings save_setting_xml(); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: setting_edit.php"); return; } //if ($action == "update") @@ -182,6 +191,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $event_socket_ip_address = $row["event_socket_ip_address"]; $event_socket_port = $row["event_socket_port"]; $event_socket_password = $row["event_socket_password"]; + $event_socket_acl = $row["event_socket_acl"]; $xml_rpc_http_port = $row["xml_rpc_http_port"]; $xml_rpc_auth_realm = $row["xml_rpc_auth_realm"]; $xml_rpc_auth_user = $row["xml_rpc_auth_user"]; @@ -203,10 +213,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; if ($action == "add") { - echo "".$text['title-settings-add']."

\n"; + echo "".$text['title-settings_add']."

\n"; } if ($action == "update") { - echo "".$text['title-settings-update']."

\n"; + echo "".$text['title-settings_update']."

\n"; } echo ""; if (permission_exists('setting_edit')) { @@ -217,84 +227,95 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo " ".$text['label-event-socket-ip']."\n"; + echo " ".$text['label-event_socket_ip']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-event-socket-ip']."\n"; + echo $text['description-event_socket_ip']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-event-socket-port']."\n"; + echo " ".$text['label-event_socket_port']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-event-socket-port']."\n"; + echo $text['description-event_socket_port']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-event-socket-pw']."\n"; + echo " ".$text['label-event_socket_password']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-event-socket-pw']."\n"; + echo $text['description-event_socket_password']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-xml-rpc-port']."\n"; + echo " ".$text['label-event_socket_acl']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-xml-rpc-port']."\n"; + echo $text['description-event_socket_acl']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-xml-rpc-realm']."\n"; + echo " ".$text['label-xml_rpc_http_port']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-xml-rpc-realm']."\n"; + echo $text['description-xml_rpc_http_port']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-xml-rpc-user']."\n"; + echo " ".$text['label-xml_rpc_auth_realm']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-xml-rpc-user']."\n"; + echo $text['description-xml_rpc_auth_realm']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-xml-rpc-pw']."\n"; + echo " ".$text['label-xml_rpc_auth_user']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-xml-rpc-pw']."\n"; + echo $text['description-xml_rpc_auth_user']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-shout-decoder']."\n"; + echo " ".$text['label-xml_rpc_auth_pass']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-xml_rpc_auth_pass']."\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo " ".$text['label-mod_shout_decoder']."\n"; echo "\n"; echo "\n"; echo " \n"; echo "
\n"; - echo $text['description-shout-decoder']."\n"; + echo $text['description-mod_shout_decoder']."\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - echo " ".$text['label-shout-volume']."\n"; + echo " ".$text['label-mod_shout_volume']."\n"; echo "\n"; echo "\n"; echo " \n"; echo "
\n"; - echo $text['description-shout-volume']."\n"; + echo $text['description-mod_shout_volume']."\n"; echo "\n"; echo "\n"; if (permission_exists('setting_edit')) { @@ -359,4 +380,5 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file + +?> diff --git a/app/sip_profiles/app_config.php b/app/sip_profiles/app_config.php index 58741ce0b6..4509d7696a 100644 --- a/app/sip_profiles/app_config.php +++ b/app/sip_profiles/app_config.php @@ -122,7 +122,7 @@ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_sip_profile"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_sip_profiles"; $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "sip_profile_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_profile_domain_name"; @@ -152,6 +152,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_sip_profiles"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "sip_profile_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_profile_setting_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; @@ -169,4 +171,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description."; -?> \ No newline at end of file +?> diff --git a/app/sip_profiles/sip_profile_copy.php b/app/sip_profiles/sip_profile_copy.php index a88a992fd8..7307a058ca 100644 --- a/app/sip_profiles/sip_profile_copy.php +++ b/app/sip_profiles/sip_profile_copy.php @@ -161,7 +161,7 @@ $_SESSION["reload_xml"] = true; //redirect the user - messages::add($text['message-copy']); + message::add($text['message-copy']); header("Location: ".PROJECT_PATH."/app/sip_profiles/sip_profiles.php"); return; diff --git a/app/sip_profiles/sip_profile_delete.php b/app/sip_profiles/sip_profile_delete.php index 34ca185228..a9b9602b75 100644 --- a/app/sip_profiles/sip_profile_delete.php +++ b/app/sip_profiles/sip_profile_delete.php @@ -109,7 +109,7 @@ } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: sip_profiles.php"); return; diff --git a/app/sip_profiles/sip_profile_domain_delete.php b/app/sip_profiles/sip_profile_domain_delete.php index 13a7c2b5c4..2f8255df29 100644 --- a/app/sip_profiles/sip_profile_domain_delete.php +++ b/app/sip_profiles/sip_profile_domain_delete.php @@ -70,7 +70,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: sip_profile_edit.php?id='.$sip_profile_uuid); ?> diff --git a/app/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php index 499ca4f949..42b96e02ec 100644 --- a/app/sip_profiles/sip_profile_edit.php +++ b/app/sip_profiles/sip_profile_edit.php @@ -167,10 +167,10 @@ //redirect the user if (isset($action)) { if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } header('Location: sip_profile_edit.php?id='.escape($sip_profile_uuid)); return; @@ -290,11 +290,11 @@ echo " \n"; echo " \n"; echo " \n"; - echo "   \n"; - echo " \n"; + echo "   \n"; + echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; if ($row["sip_profile_domain_parse"] == "true") { @@ -332,7 +332,7 @@ echo " \n"; echo " \n"; if (strlen($row["sip_profile_domain_name"]) > 0) { - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; @@ -357,11 +357,11 @@ $x = 0; foreach($sip_profile_settings as $row) { echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; - echo "   \n"; + echo "   \n"; echo " \n"; echo " \n"; echo " \n"; @@ -369,7 +369,7 @@ echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " \n"; if (strlen($row["sip_profile_setting_name"]) > 0) { - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; @@ -407,7 +407,7 @@ echo " ".$text['label-sip_profile_hostname']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-sip_profile_hostname']."\n"; echo "\n"; @@ -443,7 +443,7 @@ echo " ".$text['label-sip_profile_description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-sip_profile_description']."\n"; echo "\n"; @@ -452,7 +452,7 @@ echo " \n"; echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; diff --git a/app/sip_profiles/sip_profile_setting_delete.php b/app/sip_profiles/sip_profile_setting_delete.php index a753b1c7fc..3803b1610f 100644 --- a/app/sip_profiles/sip_profile_setting_delete.php +++ b/app/sip_profiles/sip_profile_setting_delete.php @@ -59,7 +59,7 @@ if (strlen($id)>0) { } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: sip_profile_edit.php?id=".$sip_profile_uuid); return; diff --git a/app/sip_status/cmd.php b/app/sip_status/cmd.php index fa4d67e650..552a00febd 100644 --- a/app/sip_status/cmd.php +++ b/app/sip_status/cmd.php @@ -49,7 +49,7 @@ if ($cmd == "api reloadxml") { //reloadxml if ($cmd == "api reloadxml") { - messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } @@ -58,7 +58,7 @@ //rescan the external profile to look for new or stopped gateways $tmp_cmd = 'api sofia profile external rescan'; - messages::add(rtrim(event_socket_request($fp, $tmp_cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $tmp_cmd)), 'alert'); unset($tmp_cmd); } @@ -70,13 +70,13 @@ //reloadacl if ($cmd == "api reloadacl") { - messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); unset($cmd); } //sofia profile if (substr($cmd, 0, 17) == "api sofia profile") { - messages::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); + message::add(rtrim(event_socket_request($fp, $cmd)), 'alert'); } //close the connection diff --git a/app/sip_status/sip_status.php b/app/sip_status/sip_status.php index b7b6a048ba..ed683d4087 100644 --- a/app/sip_status/sip_status.php +++ b/app/sip_status/sip_status.php @@ -78,7 +78,12 @@ if ($_GET['a'] == "download") { $document['title'] = $text['title-sip-status']; $msg = $_GET["savemsg"]; - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + if ($_SESSION['event_socket_ip_address'] == "0.0.0.0") { + $socket_ip = '127.0.0.1'; + $fp = event_socket_create($socket_ip, $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + } else { + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + } if (!$fp) { $msg = "
".$text['error-event-socket']."
"; } diff --git a/app/streams/stream_delete.php b/app/streams/stream_delete.php index 42d519d439..8ea0791519 100644 --- a/app/streams/stream_delete.php +++ b/app/streams/stream_delete.php @@ -30,7 +30,7 @@ $text = $language->get(); //delete the message - messages::add($text['message-delete']); + message::add($text['message-delete']); //delete the data if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('stream_delete')) { diff --git a/app/streams/streams.php b/app/streams/streams.php index a146ea7a5f..55a3ea6cb6 100644 --- a/app/streams/streams.php +++ b/app/streams/streams.php @@ -57,7 +57,7 @@ $obj = new streams; $obj->delete($streams); //delete message - messages::add($text['message-delete']); + message::add($text['message-delete']); } } diff --git a/app/time_conditions/app_config.php b/app/time_conditions/app_config.php index 7ddbeb96d0..0f4f539d55 100644 --- a/app/time_conditions/app_config.php +++ b/app/time_conditions/app_config.php @@ -22,7 +22,7 @@ $apps[$x]['description']['nl-nl'] = ""; $apps[$x]['description']['pl-pl'] = ""; $apps[$x]['description']['pt-br'] = ""; - $apps[$x]['description']['pt-pt'] = "Chamada directa com base na hora do dia."; + $apps[$x]['description']['pt-pt'] = "Chamada directa com base na hora do dia."; $apps[$x]['description']['ro-ro'] = ""; $apps[$x]['description']['ru-ru'] = "Прямые вызовы на основании времени суток."; $apps[$x]['description']['sv-se'] = ""; @@ -65,6 +65,9 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "time_condition_domain"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "time_condition_context"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; //default settings $y=0; diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php index 2c5746674c..dc06cb7cdc 100644 --- a/app/time_conditions/time_condition_edit.php +++ b/app/time_conditions/time_condition_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2017 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -74,7 +74,9 @@ $dialplan_anti_action_array = explode(":", $dialplan_anti_action); $dialplan_anti_action_app = array_shift($dialplan_anti_action_array); $dialplan_anti_action_data = join(':', $dialplan_anti_action_array); - + if (permission_exists('time_condition_context')) { + $dialplan_context = check_str($_POST["dialplan_context"]); + } $dialplan_enabled = check_str($_POST["dialplan_enabled"]); $dialplan_description = check_str($_POST["dialplan_description"]); @@ -106,6 +108,16 @@ $dialplan_name = str_replace(' ', '_', $dialplan_name); $dialplan_name = str_replace('/', '', $dialplan_name); + //set the context for users that do not have the permission + if (permission_exists('time_condition_context')) { + $dialplan_context = check_str($_POST["dialplan_context"]); + } + else { + if ($action == 'add') { + $dialplan_context = $_SESSION['domain_name']; + } + } + //start the atomic transaction $count = $db->exec("BEGIN;"); //returns affected rows @@ -141,12 +153,7 @@ $sql .= "'".$dialplan_number."', "; $sql .= "'".$dialplan_order."', "; $sql .= "'false', "; - if (strlen($domain_uuid) == 0) { - $sql .= "'\${domain_name}', "; - } - else { - $sql .= "'".$_SESSION['context']."', "; - } + $sql .= "'".$dialplan_context."', "; $sql .= "'".$dialplan_enabled."', "; $sql .= "'".$dialplan_description."' "; $sql .= ")"; @@ -168,11 +175,8 @@ $sql .= "dialplan_number = '".$dialplan_number."', "; $sql .= "dialplan_order = '".$dialplan_order."', "; $sql .= "dialplan_continue = 'true', "; - if (strlen($domain_uuid) == 0) { - $sql .= "dialplan_context = '\${domain_name}', "; - } - else { - $sql .= "dialplan_context = '".$_SESSION['context']."', "; + if (strlen($dialplan_context) > 0) { + $sql .= "dialplan_context = '".$dialplan_context."', "; } $sql .= "dialplan_enabled = '".$dialplan_enabled."', "; $sql .= "dialplan_description = '".$dialplan_description."' "; @@ -527,10 +531,10 @@ //set the message if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } else if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } header("Location: time_condition_edit.php?id=".$dialplan_uuid.(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)); return; @@ -552,9 +556,9 @@ $sql .= "where dialplan_uuid = '".$dialplan_uuid."' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - if (is_array($result)) { - foreach ($result as &$row) { + $dialplans = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($dialplans)) { + foreach ($dialplans as &$row) { $domain_uuid = $row["domain_uuid"]; //$app_uuid = $row["app_uuid"]; $dialplan_name = $row["dialplan_name"]; @@ -591,14 +595,13 @@ $sql .= "order by dialplan_detail_group asc, dialplan_detail_order asc"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); + $dialplan_details = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); //load current conditions into array (combined by group), and retrieve action and anti-action $c = 0; - if (is_array($result)) { - foreach ($result as $row) { + if (is_array($dialplan_details)) { + foreach ($dialplan_details as $row) { if ($row['dialplan_detail_tag'] == 'action') { if ($row['dialplan_detail_group'] == '999') { $dialplan_anti_action = $row['dialplan_detail_type'].(($row['dialplan_detail_data'] != '') ? ':'.$row['dialplan_detail_data'] : null); @@ -920,7 +923,7 @@ echo "\n"; echo " ".$text['label-name']."\n"; echo "\n"; echo "\n"; -echo " \n"; +echo " \n"; echo "
\n"; echo " ".$text['description-name']."\n"; echo "
\n"; @@ -933,7 +936,7 @@ echo "\n"; echo " ".$text['label-extension']."\n"; echo "\n"; echo "\n"; -echo " \n"; +echo " \n"; echo "
\n"; echo " ".$text['description-extension']."
\n"; echo "\n"; @@ -1162,7 +1165,7 @@ if ($action == 'update') { echo " ".$text['label-alternate-destination']."\n"; echo "\n"; echo "\n"; - echo $destination->select('dialplan', 'dialplan_anti_action', $dialplan_anti_action); + echo " ".$destination->select('dialplan', 'dialplan_anti_action', $dialplan_anti_action); echo "\n"; echo "\n"; @@ -1197,10 +1200,10 @@ if ($action == 'update') { } foreach ($_SESSION['domains'] as $row) { if ($row['domain_uuid'] == $domain_uuid) { - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } echo " \n"; @@ -1210,6 +1213,19 @@ if ($action == 'update') { echo "\n"; } + if (permission_exists('time_condition_context')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-context']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-enter-context']."\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; echo "\n"; echo " ".$text['label-enabled']."\n"; @@ -1228,7 +1244,7 @@ if ($action == 'update') { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "\n"; @@ -1238,7 +1254,7 @@ if ($action == 'update') { echo "
\n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo " \n"; echo "
"; diff --git a/app/time_conditions/time_conditions.php b/app/time_conditions/time_conditions.php index dddaf31c8e..bb1f27d309 100644 --- a/app/time_conditions/time_conditions.php +++ b/app/time_conditions/time_conditions.php @@ -52,7 +52,7 @@ $sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1' "; $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); } //set the http values as php variables @@ -131,8 +131,7 @@ $sql .= " limit $rows_per_page offset $offset "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); + $dialplans = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); //show the content @@ -146,13 +145,13 @@ echo " \n"; echo " \n"; echo "
\n"; - echo " "; + echo " "; if (strlen($app_uuid) > 0) { - echo " "; + echo " "; } if (strlen($order_by) > 0) { - echo " "; - echo " "; + echo " "; + echo " "; } echo " "; echo "
\n"; @@ -170,15 +169,17 @@ //show the content echo "
\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - if (permission_exists('dialplan_delete') && $result_count > 0) { + if (permission_exists('time_condition_delete') && is_array($dialplans)) { echo ""; } echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); - echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); + if (permission_exists('time_condition_context')) { + echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); + } echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid, "style='text-align: center;'", (($search != '') ? "search=".$search : null)); echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid, null, (($search != '') ? "search=".$search : null)); @@ -192,8 +193,8 @@ echo "\n"; echo "\n"; - if ($result_count > 0) { - foreach($result as $row) { + if (is_array($dialplans)) { + foreach($dialplans as $row) { $app_uuid = $row['app_uuid']; $tr_link = "href='".PROJECT_PATH."/app/time_conditions/time_condition_edit.php?id=".escape($row['dialplan_uuid']).(($app_uuid != '') ? "&app_uuid=".escape($app_uuid) : null)."'"; @@ -212,7 +213,9 @@ } echo " \n"; echo " \n"; - echo " \n"; + if (permission_exists('time_condition_context')) { + echo " \n"; + } echo " \n"; echo " \n"; echo "\n"; @@ -255,7 +255,7 @@ echo " ".$text['label-value']."\n"; echo "\n"; echo "\n"; @@ -290,7 +290,7 @@ echo " ".$text['label-hostname']."\n"; echo "\n"; echo "\n"; @@ -351,7 +351,7 @@ echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; @@ -359,7 +359,7 @@ echo " \n"; echo " \n"; echo " \n"; echo "\n"; diff --git a/app/voicemail_greetings/voicemail_greeting_delete.php b/app/voicemail_greetings/voicemail_greeting_delete.php index e70a886503..ea78e2f2da 100644 --- a/app/voicemail_greetings/voicemail_greeting_delete.php +++ b/app/voicemail_greetings/voicemail_greeting_delete.php @@ -77,7 +77,7 @@ if (strlen($voicemail_greeting_uuid) > 0) { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: voicemail_greetings.php?id=".$voicemail_id); return; ?> \ No newline at end of file diff --git a/app/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php index 770f7351d7..ec193677d4 100644 --- a/app/voicemail_greetings/voicemail_greeting_edit.php +++ b/app/voicemail_greetings/voicemail_greeting_edit.php @@ -90,7 +90,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //redirect the user - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: voicemail_greetings.php?id=".$voicemail_id); return; } //if (permission_exists('voicemail_greeting_edit')) { @@ -139,7 +139,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-name']."\n"; echo "\n"; echo "\n"; @@ -150,7 +150,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; diff --git a/app/voicemail_greetings/voicemail_greetings.php b/app/voicemail_greetings/voicemail_greetings.php index dff184efbe..b4cb20c213 100644 --- a/app/voicemail_greetings/voicemail_greetings.php +++ b/app/voicemail_greetings/voicemail_greetings.php @@ -186,7 +186,7 @@ $prep_statement->execute(); unset($prep_statement); - messages::add($text['message-uploaded'].": ".$_FILES['file']['name']); + message::add($text['message-uploaded'].": ".$_FILES['file']['name']); break; } else { @@ -226,7 +226,7 @@ $prep_statement->execute(); unset($prep_statement); - messages::add($text['message-greeting_selected']); + message::add($text['message-greeting_selected']); header("Location: voicemail_greetings.php?id=".$voicemail_id."&order_by=".$order_by."&order=".$order); exit; } diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index f4484a1c60..d2ab920958 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -56,21 +56,27 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "voicemail_import"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_message_view"; $apps[$x]['permissions'][$y]['menu']['uuid'] = "0347f82a-62a0-49d0-bacd-511d080c46d5"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_message_add"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_message_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; @@ -80,6 +86,7 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_sms_edit"; $y++; @@ -95,21 +102,25 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_option_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_option_view"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; $y++; $apps[$x]['permissions'][$y]['name'] = "voicemail_option_delete"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "user"; + $apps[$x]['permissions'][$y]['groups'][] = "agent"; //default settings $y=0; @@ -323,6 +334,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_voicemails"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "voicemail_uuid"; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "created_epoch"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; diff --git a/app/voicemails/voicemail_delete.php b/app/voicemails/voicemail_delete.php index 4d9233bd26..1ed1c745c3 100644 --- a/app/voicemails/voicemail_delete.php +++ b/app/voicemails/voicemail_delete.php @@ -62,7 +62,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: voicemails.php"); return; diff --git a/app/voicemails/voicemail_edit.php b/app/voicemails/voicemail_edit.php index 64bca590ad..e2298d905a 100644 --- a/app/voicemails/voicemail_edit.php +++ b/app/voicemails/voicemail_edit.php @@ -88,7 +88,7 @@ voicemail_uuid = '".$voicemail_uuid."'"; $db->exec(check_sql($sqld)); //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: voicemail_edit.php?id=".$voicemail_uuid); return; } @@ -116,7 +116,7 @@ )"; $db->exec(check_sql($sqli)); //redirect the browser - messages::add($text['message-add']); + message::add($text['message-add']); } if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { @@ -184,7 +184,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); } //if ($action == "add") if ($action == "update" && permission_exists('voicemail_edit')) { @@ -208,7 +208,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); } //if ($action == "update") @@ -392,6 +392,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; @@ -402,7 +403,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-voicemail_password']."\n"; echo "\n"; echo "\n"; diff --git a/app/voicemails/voicemail_imports.php b/app/voicemails/voicemail_imports.php new file mode 100644 index 0000000000..f1d4a7d3e9 --- /dev/null +++ b/app/voicemails/voicemail_imports.php @@ -0,0 +1,442 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('voicemail_import')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher + if(!function_exists('str_getcsv')) { + function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") { + $fp = fopen("php://memory", 'r+'); + fputs($fp, $input); + rewind($fp); + $data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0 + fclose($fp); + return $data; + } + } + +//set the max php execution time + ini_set(max_execution_time,7200); + +//get the http get values and set them as php variables + $action = check_str($_POST["action"]); + $from_row = check_str($_POST["from_row"]); + $order_by = check_str($_POST["order_by"]); + $order = check_str($_POST["order"]); + $delimiter = check_str($_POST["data_delimiter"]); + $enclosure = check_str($_POST["data_enclosure"]); + +//save the data to the csv file + if (isset($_POST['data'])) { + $file = $_SESSION['server']['temp']['dir']."/voicemails-".$_SESSION['domain_name'].".csv"; + file_put_contents($file, $_POST['data']); + $_SESSION['file'] = $file; + } + +//copy the csv file + //$_POST['submit'] == "Upload" && + if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('voicemail_import')) { + if (check_str($_POST['type']) == 'csv') { + move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']); + $save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']); + //system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*'); + unset($_POST['txtCommand']); + $file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']; + $_SESSION['file'] = $file; + } + } + +//get the schema + if (strlen($delimiter) > 0) { + //get the first line + $line = fgets(fopen($_SESSION['file'], 'r')); + $line_fields = explode($delimiter, $line); + + //get the schema + $x = 0; + include ("app/voicemails/app_config.php"); + $i = 0; + foreach($apps[0]['db'] as $table) { + //get the table name and parent name + $table_name = $table["table"]['name']; + $parent_name = $table["table"]['parent']; + + //remove the v_ table prefix + if (substr($table_name, 0, 2) == 'v_') { + $table_name = substr($table_name, 2); + } + if (substr($parent_name, 0, 2) == 'v_') { + $parent_name = substr($parent_name, 2); + } + + //filter for specific tables and build the schema array + if ($table_name == "voicemails") { + $schema[$i]['table'] = $table_name; + $schema[$i]['parent'] = $parent_name; + foreach($table['fields'] as $row) { + if ($row['deprecated'] !== 'true') { + if (is_array($row['name'])) { + $field_name = $row['name']['text']; + } + else { + $field_name = $row['name']; + } + $schema[$i]['fields'][] = $field_name; + } + } + $i++; + } + } + //echo "
\n";
+			//print_r($schema);
+			//echo "
\n"; + //exit; + } + +//match the column names to the field names + if (strlen($delimiter) > 0 && file_exists($_SESSION['file']) && $action != 'import') { + + //form to match the fields to the column names + require_once "resources/header.php"; + + echo "\n"; + echo "
".((strlen($row['dialplan_number']) > 0) ? $row['dialplan_number'] : " ")."".escape($row['dialplan_context'])."".escape($row['dialplan_context'])."".escape($row['dialplan_order'])."\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-name']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-value']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-hostname']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "
\n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; diff --git a/app/vars/vars.php b/app/vars/vars.php index 8e5e29f312..332470bc78 100644 --- a/app/vars/vars.php +++ b/app/vars/vars.php @@ -55,7 +55,7 @@ //synchronize the configuration save_var_xml(); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: vars.php?id=".$_REQUEST['id']); exit; } @@ -161,10 +161,10 @@ echo "
".$var_description." "; if (permission_exists('var_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('var_delete')) { - echo "$v_link_label_delete"; + echo "$v_link_label_delete"; } echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-name']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "".$text['description-info']."\n"; echo "
\n"; echo " \n"; + echo " \n"; //help defeat browser auto-fill echo "
\n"; echo $text['description-voicemail_id']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; //help defeat browser auto-fill + echo " \n"; echo "
\n"; echo $text['description-voicemail_password']."\n"; echo "
\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + + //loop through user columns + $x = 0; + foreach ($line_fields as $line_field) { + $line_field = trim(trim($line_field), $enclosure); + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + $x++; + } + + echo " \n"; + echo " \n"; + echo " \n"; + + echo "
\n"; + echo " ".$text['header-import']."
\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-import']."\n"; + echo "
".$text['header-import']."\n"; + //echo " \n"; + //echo "
\n"; + //echo " ".$text['label-zzz']."\n"; + echo $line_field; + echo "\n"; + echo " \n"; + //echo "
\n"; + //echo $text['description-zzz']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + require_once "resources/footer.php"; + + //normalize the column names + //$line = strtolower($line); + //$line = str_replace("-", "_", $line); + //$line = str_replace($delimiter."title".$delimiter, $delimiter."contact_title".$delimiter, $line); + //$line = str_replace("firstname", "name_given", $line); + //$line = str_replace("lastname", "name_family", $line); + //$line = str_replace("company", "organization", $line); + //$line = str_replace("company", "contact_email", $line); + + //end the script + exit; + } + +//get the parent table + function get_parent($schema,$table_name) { + foreach ($schema as $row) { + if ($row['table'] == $table_name) { + return $row['parent']; + } + } + } + +//upload the csv + if (file_exists($_SESSION['file']) && $action == 'import') { + + //form to match the fields to the column names + //require_once "resources/header.php"; + + //user selected fields + $fields = $_POST['fields']; + + //set the domain_uuid + $domain_uuid = $_SESSION['domain_uuid']; + + //get the contents of the csv file and convert them into an array + $handle = @fopen($_SESSION['file'], "r"); + if ($handle) { + //set the starting identifiers + $row_id = 0; + $row_number = 1; + + //loop through the array + while (($line = fgets($handle, 4096)) !== false) { + if ($from_row <= $row_number) { + //format the data + $y = 0; + foreach ($fields as $key => $value) { + //get the line + $result = str_getcsv($line, $delimiter, $enclosure); + + //get the table and field name + $field_array = explode(".",$value); + $table_name = $field_array[0]; + $field_name = $field_array[1]; + //echo "value: $value
\n"; + //echo "table_name: $table_name
\n"; + //echo "field_name: $field_name
\n"; + + //get the parent table name + $parent = get_parent($schema, $table_name); + + //remove formatting from the phone number + if ($field_name == "phone_number") { + $result[$key] = preg_replace('{\D}', '', $result[$key]); + } + + //build the data array + if (strlen($table_name) > 0) { + if (strlen($parent) == 0) { + $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; + $array[$table_name][$row_id][$field_name] = $result[$key]; + } + else { + $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; + $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; + } + } + } + + //process a chunk of the array + if ($row_id === 1000) { + + //save to the data + $database = new database; + $database->app_name = 'voicemails'; + $database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044'; + $database->save($array); + //$message = $database->message; + + //clear the array + unset($array); + + //set the row id back to 0 + $row_id = 0; + } + + } //if ($from_row <= $row_id) + $row_number++; + $row_id++; + } //end while + fclose($handle); + + //debug info + //echo "
\n";
+					//print_r($array);
+					//echo "
\n"; + //exit; + + //save to the data + if (is_array($array)) { + $database = new database; + $database->app_name = 'voicemails'; + $database->app_uuid = 'b523c2d2-64cd-46f1-9520-ca4b4098e044'; + $database->save($array); + //$message = $database->message; + } + + //send the redirect header + header("Location: voicemails.php"); + return; + } + } + +//include the header + require_once "resources/header.php"; + +//begin the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['header-import']."
\n"; + echo " ".$text['description-import']."\n"; + echo "
\n"; + echo " \n"; + //echo " \n"; + echo "
"; + + echo "
\n"; + + echo "
\n"; + echo " \n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-import_data']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_data']."\n"; + echo "
\n"; + echo " ".$text['label-from_row']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-from_row']."\n"; + echo "
\n"; + echo " ".$text['label-import_delimiter']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_delimiter']."\n"; + echo "
\n"; + echo " ".$text['label-import_enclosure']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_enclosure']."\n"; + echo "
\n"; + echo " ".$text['label-import_file_upload']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo "  \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo "

"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/app/voicemails/voicemail_message_edit.php b/app/voicemails/voicemail_message_edit.php index 9d8704cb57..d51e4b98eb 100644 --- a/app/voicemails/voicemail_message_edit.php +++ b/app/voicemails/voicemail_message_edit.php @@ -125,7 +125,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: voicemail_edit.php?id=".$voicemail_uuid); return; } //if ($action == "add") @@ -146,7 +146,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: voicemail_edit.php?id=".$voicemail_uuid); return; } //if ($action == "update") @@ -184,7 +184,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -192,7 +192,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Created Epoch\n"; echo "\n"; echo "\n"; @@ -203,7 +203,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Read Epoch\n"; echo "\n"; echo "\n"; @@ -214,7 +214,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Caller ID Name\n"; echo "\n"; echo "\n"; @@ -225,7 +225,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Caller ID Number\n"; echo "\n"; echo "\n"; @@ -236,7 +236,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Length\n"; echo "\n"; echo "\n"; @@ -247,7 +247,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Status\n"; echo "\n"; echo "\n"; @@ -258,16 +258,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " Priority\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; @@ -171,7 +171,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-option']."\n"; echo "\n"; echo "\n"; @@ -226,15 +226,15 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index 82b07ab3cc..f03ed0b18e 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -148,7 +148,11 @@ echo " \n"; echo " \n"; diff --git a/app/xml_cdr/app_config.php b/app/xml_cdr/app_config.php index d9d6a623ac..f7ec7f8fde 100644 --- a/app/xml_cdr/app_config.php +++ b/app/xml_cdr/app_config.php @@ -45,6 +45,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "xml_cdr_extension"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_domain"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; @@ -74,7 +78,6 @@ $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_b_leg"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; $apps[$x]['permissions'][$y]['name'] = "hangup_cause"; @@ -87,7 +90,8 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "xml_cdr_archive"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; //default settings $y=0; @@ -210,7 +214,7 @@ $apps[$x]['default_settings'][$y]['default_setting_value'] = "fusionpbx"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Archive Database Name"; - + //schema details $y=0; $apps[$x]['db'][$y]['table']['name'] = "v_xml_cdr"; @@ -224,7 +228,8 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "xml_cdr_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; @@ -274,17 +279,6 @@ $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']['text'] = "xml"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "xml_cdr"; - $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'] = "json"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "jsonb"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "caller_id_name"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; @@ -336,7 +330,9 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "end_stamp"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "timestamp"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "date"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "timestamp"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "duration"; @@ -425,6 +421,12 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Save the last application data."; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "missed_call"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "boolean"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "cc_side"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Queue side is either member or agent"; @@ -532,5 +534,16 @@ $apps[$x]['db'][$y]['fields'][$z]['name'] = "sip_hangup_disposition"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Save who hung up or cancelled the leg."; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "xml"; + $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "xml_cdr"; + $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'] = "json"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "jsonb"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; ?> diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 13b3df6f96..9891d715e7 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -92,7 +92,7 @@ if (!class_exists('xml_cdr')) { */ public function fields() { - $this->fields[] = "uuid"; + $this->fields[] = "xml_cdr_uuid"; $this->fields[] = "domain_uuid"; $this->fields[] = "extension_uuid"; $this->fields[] = "domain_name"; @@ -102,6 +102,7 @@ if (!class_exists('xml_cdr')) { $this->fields[] = "context"; $this->fields[] = "xml"; $this->fields[] = "json"; + $this->fields[] = "missed_call"; $this->fields[] = "caller_id_name"; $this->fields[] = "caller_id_number"; $this->fields[] = "caller_destination"; @@ -248,9 +249,9 @@ if (!class_exists('xml_cdr')) { //Check in the database $database = new database; $database->table = "v_xml_cdr"; - $where[1]["name"] = "uuid"; + $where[1]["name"] = "xml_cdr_uuid"; $where[1]["operator"] = "="; - $where[1]["value"] = "$uuid"; + $where[1]["value"] = $uuid; $database->where = $where; $result = $database->count(); if ($result > 0) { @@ -285,6 +286,17 @@ if (!class_exists('xml_cdr')) { $destination_number = urldecode($xml->variables->last_sent_callee_id_number); } + //set missed calls + $missed_call = 'false'; + if ($xml->variables->call_direction == 'local' || $xml->variables->call_direction == 'inbound') { + if ($xml->variables->billsec == 0) { + $missed_call = 'true'; + } + } + if ($xml->variables->missed_call == 'true') { + $missed_call = 'true'; + } + //get the caller details $caller_id_name = urldecode($xml->variables->effective_caller_id_name); $caller_id_number = urldecode($xml->variables->effective_caller_id_number); @@ -292,17 +304,20 @@ if (!class_exists('xml_cdr')) { foreach ($xml->callflow as $row) { $caller_id_number = urldecode($row->caller_profile->caller_id_number); } - if (strlen($caller_id_name) == 0) foreach ($xml->callflow as $row) { - $caller_id_name = urldecode($row->caller_profile->caller_id_name); + if (strlen($caller_id_name) == 0) { + foreach ($xml->callflow as $row) { + $caller_id_name = urldecode($row->caller_profile->caller_id_name); + } } //misc $uuid = check_str(urldecode($xml->variables->uuid)); - $this->array[$key]['uuid'] = $uuid; + $this->array[$key]['xml_cdr_uuid'] = $uuid; $this->array[$key]['destination_number'] = check_str($destination_number); $this->array[$key]['source_number'] = check_str(urldecode($xml->variables->effective_caller_id_number)); $this->array[$key]['user_context'] = check_str(urldecode($xml->variables->user_context)); $this->array[$key]['network_addr'] = check_str(urldecode($xml->variables->sip_network_ip)); + $this->array[$key]['missed_call'] = check_str($missed_call); $this->array[$key]['caller_id_name'] = check_str($caller_id_name); $this->array[$key]['caller_id_number'] = check_str($caller_id_number); $this->array[$key]['caller_destination'] = check_str(urldecode($xml->variables->caller_destination)); @@ -428,21 +443,21 @@ if (!class_exists('xml_cdr')) { } //get the recording details - if (strlen($xml->variables->record_name) > 0) { + if (strlen($xml->variables->record_session) > 0) { $record_path = urldecode($xml->variables->record_path); $record_name = urldecode($xml->variables->record_name); - $record_length = urldecode($xml->variables->billsec); - } - elseif (urldecode($xml->variables->current_application) == 'record_session') { - $record_path = dirname(urldecode($xml->variables->current_application_data)); - $record_name = basename(urldecode($xml->variables->current_application_data)); $record_length = urldecode($xml->variables->record_seconds); } - elseif (strlen($xml->variables->record_session) > 0) { - $record_path = dirname(urldecode($xml->variables->record_session)); - $record_name = basename(urldecode($xml->variables->record_session)); + elseif (!isset($record_path) && urldecode($xml->variables->last_app) == "record_session") { + $record_path = dirname(urldecode($xml->variables->last_arg)); + $record_name = basename(urldecode($xml->variables->last_arg)); $record_length = urldecode($xml->variables->record_seconds); } + elseif (strlen($xml->variables->record_name) > 0) { + $record_path = urldecode($xml->variables->record_path); + $record_name = urldecode($xml->variables->record_name); + $record_length = urldecode($xml->variables->duration); + } elseif (strlen($xml->variables->sofia_record_file) > 0) { $record_path = dirname(urldecode($xml->variables->sofia_record_file)); $record_name = basename(urldecode($xml->variables->sofia_record_file)); @@ -463,16 +478,6 @@ if (!class_exists('xml_cdr')) { $record_length = urldecode($xml->variables->duration); } } - elseif (strlen($xml->variables->{'nolocal:api_on_answer'}) > 0) { - $command = str_replace("\n", " ", urldecode($xml->variables->{'nolocal:api_on_answer'})); - $parts = explode(" ", $command); - if ($parts[0] == "uuid_record") { - $recording = $parts[3]; - $record_path = dirname($recording); - $record_name = basename($recording); - $record_length = urldecode($xml->variables->duration); - } - } elseif (strlen($xml->variables->current_application_data) > 0) { $commands = explode(",", urldecode($xml->variables->current_application_data)); foreach ($commands as $command) { @@ -490,7 +495,55 @@ if (!class_exists('xml_cdr')) { } } } - + if (!isset($record_name)) { + $bridge_uuid = urldecode($xml->variables->bridge_uuid); + $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; + if (file_exists($path.'/'.$bridge_uuid.'.wav')) { + $record_path = $path; + $record_name = $bridge_uuid.'.wav'; + $record_length = urldecode($xml->variables->duration); + } elseif (file_exists($path.'/'.$bridge_uuid.'.mp3')) { + $record_path = $path; + $record_name = $bridge_uuid.'.mp3'; + $record_length = urldecode($xml->variables->duration); + } + } + if (!isset($record_name)) { + $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; + if (file_exists($path.'/'.$uuid.'.wav')) { + $record_path = $path; + $record_name = $uuid.'.wav'; + $record_length = urldecode($xml->variables->duration); + } elseif (file_exists($path.'/'.$uuid.'.mp3')) { + $record_path = $path; + $record_name = $uuid.'.mp3'; + $record_length = urldecode($xml->variables->duration); + } + } + + // Last check + if (!isset($record_name) || is_null ($record_name) || (strlen($record_name) == 0)) { + $bridge_uuid = check_str(urldecode($xml->variables->bridge_uuid)); + $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; + if (file_exists($path.'/'.$bridge_uuid.'.wav')) { + $record_path = $path; + $record_name = $bridge_uuid.'.wav'; + $record_length = urldecode($xml->variables->duration); + } elseif (file_exists($path.'/'.$bridge_uuid.'.mp3')) { + $record_path = $path; + $record_name = $bridge_uuid.'.mp3'; + $record_length = urldecode($xml->variables->duration); + } elseif (file_exists($path.'/'.$bridge_uuid.'.wav')) { + $record_path = $path; + $record_name = $bridge_uuid.'.wav'; + $record_length = urldecode($xml->variables->duration); + } elseif (file_exists($path.'/'.$bridge_uuid.'.mp3')) { + $record_path = $path; + $record_name = $bridge_uuid.'.mp3'; + $record_length = urldecode($xml->variables->duration); + } + } + //add the call recording if (isset($record_path) && isset($record_name) && file_exists($record_path.'/'.$record_name) && $record_length > 0) { //add to the xml cdr table @@ -505,7 +558,7 @@ if (!class_exists('xml_cdr')) { $array['call_recordings'][$x]['call_recording_name'] = $record_name; $array['call_recordings'][$x]['call_recording_path'] = $record_path; $array['call_recordings'][$x]['call_recording_length'] = $record_length; - $array['call_recordings'][$x]['call_recording_date'] = urldecode($xml->variables->answer_stamp); + $array['call_recordings'][$x]['call_recording_date'] = urldecode($xml->variables->start_stamp); $array['call_recordings'][$x]['call_direction'] = urldecode($xml->variables->call_direction); //$array['call_recordings'][$x]['call_recording_description']= $row['zzz']; //$array['call_recordings'][$x]['call_recording_base64']= $row['zzz']; @@ -968,34 +1021,16 @@ if (!class_exists('xml_cdr')) { $sql .= "COUNT(*) \n"; $sql .= "FILTER ( \n"; - $sql .= " WHERE (( \n"; - $sql .= " c.caller_id_number = e.extension \n"; - $sql .= " OR \n"; - $sql .= " c.destination_number = e.extension) \n"; - $sql .= " OR ( \n"; - $sql .= " e.number_alias IS NOT NULL \n"; - $sql .= " AND ( \n"; - $sql .= " c.caller_id_number = e.number_alias \n"; - $sql .= " OR \n"; - $sql .= " c.destination_number = e.number_alias))) \n"; - $sql .= " AND \n"; - $sql .= " c.direction = 'outbound') \n"; + $sql .= " WHERE c.extension_uuid = e.extension_uuid \n"; + $sql .= " AND c.direction = 'outbound' \n"; + $sql .= ") \n"; $sql .= "AS outbound_calls, \n"; $sql .= "SUM(c.billsec) \n"; $sql .= "FILTER ( \n"; - $sql .= " WHERE (( \n"; - $sql .= " c.caller_id_number = e.extension \n"; - $sql .= " OR \n"; - $sql .= " c.destination_number = e.extension) \n"; - $sql .= " OR ( \n"; - $sql .= " e.number_alias IS NOT NULL \n"; - $sql .= " AND ( \n"; - $sql .= " c.caller_id_number = e.number_alias \n"; - $sql .= " OR \n"; - $sql .= " c.destination_number = e.number_alias))) \n"; - $sql .= " AND ( \n"; - $sql .= " c.direction = 'outbound')) \n"; + $sql .= " WHERE c.extension_uuid = e.extension_uuid \n"; + $sql .= " AND c.direction = 'outbound' \n"; + $sql .= ") \n"; $sql .= "AS outbound_duration, \n"; $sql .= "e.description \n"; @@ -1003,6 +1038,7 @@ if (!class_exists('xml_cdr')) { $sql .= "FROM v_extensions AS e, v_domains AS d, \n"; $sql .= "( SELECT \n"; $sql .= " domain_uuid, \n"; + $sql .= " extension_uuid, \n"; $sql .= " caller_id_number, \n"; $sql .= " destination_number, \n"; $sql .= " answer_stamp, \n"; @@ -1023,7 +1059,6 @@ if (!class_exists('xml_cdr')) { } $sql .= "GROUP BY e.extension, e.domain_uuid, d.domain_uuid, e.number_alias, e.description \n"; $sql .= "ORDER BY extension ASC \n"; - $prep_statement = $this->db->prepare(check_sql($sql)); $prep_statement->execute(); $summary = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -1045,7 +1080,7 @@ if (!class_exists('xml_cdr')) { $uuid = check_str($_GET['id']); if ($uuid != '') { $sql = "select record_name, record_path from v_xml_cdr "; - $sql .= "where uuid = '".$uuid."' "; + $sql .= "where xml_cdr_uuid = '".$uuid."' "; //$sql .= "and domain_uuid = '".$domain_uuid."' \n"; $prep_statement = $this->db->prepare($sql); $prep_statement->execute(); diff --git a/app/xml_cdr/v_xml_cdr_import.php b/app/xml_cdr/v_xml_cdr_import.php index 08dd25f8cd..fafa431c66 100644 --- a/app/xml_cdr/v_xml_cdr_import.php +++ b/app/xml_cdr/v_xml_cdr_import.php @@ -26,7 +26,7 @@ */ //check the permission - if(defined('STDIN')) { + if (defined('STDIN')) { $document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]); preg_match("/^(.*)\/app\/.*$/", $document_root, $matches); $document_root = $matches[1]; @@ -42,7 +42,7 @@ //set debug $debug = false; //true //false - if($debug){ + if ($debug){ $time5 = microtime(true); $insert_time=$insert_count=0; } @@ -135,7 +135,7 @@ $database->fields['caller_destination'] = check_str(urldecode($xml->variables->caller_destination)); //misc $uuid = check_str(urldecode($xml->variables->uuid)); - $database->fields['uuid'] = $uuid; + $database->fields['xml_cdr_uuid'] = $uuid; $database->fields['accountcode'] = check_str(urldecode($xml->variables->accountcode)); $database->fields['default_language'] = check_str(urldecode($xml->variables->default_language)); $database->fields['bridge_uuid'] = check_str(urldecode($xml->variables->bridge_uuid)); @@ -191,6 +191,21 @@ $database->fields['rtp_audio_in_mos'] = $rtp_audio_in_mos; } + //set missed calls + $database->fields['missed_call'] = 'false'; + if ($xml->variables->call_direction == 'local' || $xml->variables->call_direction == 'inbound') { + if ($xml->variables->billsec == 0) { + $database->fields['missed_call'] = 'true'; + } + } + if ($xml->variables->missed_call == 'true') { + $database->fields['missed_call'] = 'true'; + } + + //get the caller details + $database->fields['caller_id_name'] = urldecode($xml->variables->effective_caller_id_name); + $database->fields['caller_id_number'] = urldecode($xml->variables->effective_caller_id_number); + //get the values from the callflow. $x = 0; foreach ($xml->callflow as $row) { @@ -200,8 +215,12 @@ $database->fields['context'] = $context; $database->fields['network_addr'] = check_str(urldecode($row->caller_profile->network_addr)); } - $database->fields['caller_id_name'] = check_str(urldecode($row->caller_profile->caller_id_name)); - $database->fields['caller_id_number'] = check_str(urldecode($row->caller_profile->caller_id_number)); + if (strlen($database->fields['caller_id_name']) == 0) { + $database->fields['caller_id_name'] = check_str(urldecode($row->caller_profile->caller_id_name)); + } + if (strlen($database->fields['caller_id_number']) == 0) { + $database->fields['caller_id_number'] = check_str(urldecode($row->caller_profile->caller_id_number)); + } $x++; } unset($x); @@ -304,7 +323,7 @@ $record_name = urldecode($xml->variables->record_name); $record_length = urldecode($xml->variables->record_seconds); } - elseif (strlen($record_path) == 0 and urldecode($xml->variables->last_app) == "record_session") { + elseif (!isset($record_path) && urldecode($xml->variables->last_app) == "record_session") { $record_path = dirname(urldecode($xml->variables->last_arg)); $record_name = basename(urldecode($xml->variables->last_arg)); $record_length = urldecode($xml->variables->record_seconds); @@ -351,7 +370,7 @@ } } } - if (!isset($record_name)) { + if (!isset($record_name) || is_null ($record_name) || (strlen($record_name) == 0)) { $bridge_uuid = urldecode($xml->variables->bridge_uuid); $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; if (file_exists($path.'/'.$bridge_uuid.'.wav')) { @@ -364,7 +383,7 @@ $record_length = urldecode($xml->variables->duration); } } - if (!isset($record_name)) { + if (!isset($record_name) || is_null ($record_name) || (strlen($record_name) == 0)) { $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; if (file_exists($path.'/'.$uuid.'.wav')) { $record_path = $path; @@ -382,6 +401,10 @@ //add to the xml cdr table $database->fields['record_path'] = $record_path; $database->fields['record_name'] = $record_name; + if (isset($xml->variables->record_description)) { + $record_description = urldecode($xml->variables->record_description); + } + //add to the call recordings table if (file_exists($_SERVER["PROJECT_ROOT"]."/app/call_recordings/app_config.php")) { //build the array @@ -391,7 +414,8 @@ $recordings['call_recordings'][$x]['call_recording_name'] = $record_name; $recordings['call_recordings'][$x]['call_recording_path'] = $record_path; $recordings['call_recordings'][$x]['call_recording_length'] = $record_length; - $recordings['call_recordings'][$x]['call_recording_date'] = urldecode($xml->variables->answer_stamp); + $recordings['call_recordings'][$x]['call_recording_description'] = $record_description; + $recordings['call_recordings'][$x]['call_recording_date'] = urldecode($xml->variables->start_stamp); $recordings['call_recordings'][$x]['call_direction'] = urldecode($xml->variables->call_direction); //$recordings['call_recordings'][$x]['call_recording_description']= $row['zzz']; //$recordings['call_recordings'][$x]['call_recording_base64']= $row['zzz']; diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index 58cb87b23f..c318bd68a8 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -102,7 +102,7 @@ echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -376,6 +376,9 @@ } //column headings echo "\n"; + if (permission_exists('xml_cdr_extension')) { + echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, null, $param); + } if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param); $col_count++; @@ -484,27 +487,31 @@ } } + //set an empty content variable + $content = ''; + //recording playback if (permission_exists('recording_play') && $record_path != '') { - echo "\n"; + $content .= "\n"; } if ($row['raw_data_exists'] && permission_exists('xml_cdr_details')) { - $tr_link = "href='xml_cdr_details.php?uuid=".escape($row['uuid']).(($_REQUEST['show']) ? "&show=all" : null)."'"; + $tr_link = "href='xml_cdr_details.php?id=".escape($row['xml_cdr_uuid']).(($_REQUEST['show']) ? "&show=all" : null)."'"; } else { $tr_link = null; } - echo "\n"; + $content .= "\n"; if (permission_exists('xml_cdr_delete')) { - echo " "; - $xml_ids[] = 'checkbox_'.$row['uuid']; + $content .= " "; + $xml_ids[] = 'checkbox_'.$row['xml_cdr_uuid']; } + //determine call result and appropriate icon - echo "\n"; + else { $content .= " "; } + $content .= "\n"; + //extension + if (permission_exists('xml_cdr_extension')) { + $content .= " \n"; + } //domain name if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) { - echo " \n"; + $content .= " \n"; } //caller id name - echo " \n"; + $content .= " \n"; //source - echo " \n"; + $content .= " "; + $content .= " \n"; //caller destination if (permission_exists('caller_destination')) { - echo " \n"; + $content .= " "; + $content .= " \n"; } //destination - echo " \n"; + $content .= " \n"; + $content .= " \n"; //recording if (permission_exists('recording_play') || permission_exists('recording_download')) { if ($record_path != '' && file_exists($record_path.'/'.$record_name)) { - echo " \n"; + $content .= " \n"; } else { - echo " \n"; + $content .= " \n"; } } //dynamic cdr fields @@ -597,16 +610,16 @@ $array = explode(",", $field); $field_name = $array[count($array) - 1]; if ($field_name != "destination_number") { - echo " \n"; + $content .= " \n"; } } } //start - echo " \n"; + $content .= " \n"; //tta (time to answer) - echo " \n"; + $content .= " \n"; //duration - echo " \n"; + $content .= " \n"; //billing if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){ @@ -641,7 +654,7 @@ } } catch(Exception $e) { - echo $e->getMessage(); + $content .= $e->getMessage(); } $n = (($lcr_direction == "inbound")? @@ -665,12 +678,12 @@ else { $price = 0; } - echo " \n"; + $content .= " \n"; unset ($sell_price, $price); } //pdd (post dial delay) if (permission_exists("xml_cdr_pdd")) { - echo " \n"; + $content .= " \n"; } //mos (mean opinion score) if (permission_exists("xml_cdr_mos")) { @@ -678,28 +691,39 @@ $title = " title='".$text['label-mos_score-'.round($row['rtp_audio_in_mos'])]."'"; $value = $row['rtp_audio_in_mos']; } - echo " \n"; + $content .= " \n"; } //hangup cause/call result if (permission_exists('hangup_cause')) { - echo " \n"; + $content .= " \n"; } else { - echo " \n"; + $content .= " \n"; } //control icons if (permission_exists('xml_cdr_details')) { - echo " \n"; + $content .= " \n"; } - echo "\n"; - $c = ($c) ? 0 : 1; + $content .= "\n"; + + //show the leg b only to those with the permission + if ($row['leg'] == 'a') { + echo $content; + } + elseif ($row['leg'] == 'b' && permission_exists('xml_cdr_b_leg')) { + echo $content; + } + unset($content); + + //toggle the color + $c = ($c) ? 0 : 1; } //end foreach unset($sql, $result, $row_count); } //end if results diff --git a/app/xml_cdr/xml_cdr_archive.php b/app/xml_cdr/xml_cdr_archive.php index a6cb737fe1..1d6f708dfc 100644 --- a/app/xml_cdr/xml_cdr_archive.php +++ b/app/xml_cdr/xml_cdr_archive.php @@ -103,7 +103,7 @@ echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -157,9 +157,7 @@ echo " \n"; echo " \n"; echo " \n"; - if ($result_count == $rows_per_page && $paging_controls_mini != '') { - echo " \n"; - } + echo " \n"; echo " \n"; echo "
Voicemail Messages
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo "
\n"; - echo " \n"; + echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; @@ -279,4 +279,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/voicemails/voicemail_option_delete.php b/app/voicemails/voicemail_option_delete.php index 892fc2269a..bf9a9e0876 100644 --- a/app/voicemails/voicemail_option_delete.php +++ b/app/voicemails/voicemail_option_delete.php @@ -58,7 +58,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header('Location: voicemail_edit.php?id='.$voicemail_uuid); ?> diff --git a/app/voicemails/voicemail_option_edit.php b/app/voicemails/voicemail_option_edit.php index 769a87533a..7bea44e1c5 100644 --- a/app/voicemails/voicemail_option_edit.php +++ b/app/voicemails/voicemail_option_edit.php @@ -105,7 +105,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //redirect the user - messages::add($text['message-update']); + message::add($text['message-update']); header('Location: voicemail_edit.php?id='.$voicemail_uuid); return; } @@ -161,7 +161,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "

"; echo "
"; - echo " "; + echo " "; echo " \n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-option']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "
\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo "
"; echo " \n"; echo "
\n"; echo "
\n"; - echo " "; + if (permission_exists('voicemail_import')) { + echo " \n"; + } + + echo " "; echo " "; echo "
\n"; echo "
 
\n"; + $content .= "\n"; if ($theme_cdr_images_exist) { if ($row['direction'] == 'inbound' || $row['direction'] == 'local') { if ($row['answer_stamp'] != '' && $row['bridge_uuid'] != '') { $call_result = 'answered'; } @@ -523,72 +530,78 @@ $image_name .= '_b'; } $image_name .= ".png"; - echo "\n"; + $content .= "\n"; } } - else { echo " "; } - echo ""; + $content .= $row['extension'].' '; + $content .= " "; - echo $row['domain_name'].' '; - echo " "; + $content .= $row['domain_name'].' '; + $content .= " ".escape($row['caller_id_name'])." ".escape(substr($row['caller_id_name'], 0, 20))."   ".escape($row[$field_name])."".escape($row[$field_name])."".escape($tmp_start_epoch)."".escape($tmp_start_epoch)."".(($row['tta'] > 0) ? $row['tta']."s" : " ")."".(($row['tta'] > 0) ? $row['tta']."s" : " ")."".gmdate("G:i:s", $seconds)."".gmdate("G:i:s", $seconds)."".number_format($price,6)." $billing_currency".number_format($price,6)." $billing_currency".number_format(escape($row['pdd_ms'])/1000,2)."s".number_format(escape($row['pdd_ms'])/1000,2)."s$value$value".escape($hangup_cause)."".escape($hangup_cause)."".ucwords(escape($call_result))."".ucwords(escape($call_result))."
".$paging_controls_mini."".$paging_controls_mini."
\n"; echo " \n"; @@ -227,7 +225,7 @@ echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; + echo "\n"; } // if ($row['raw_data_exists'] && permission_exists('xml_cdr_details')) { @@ -574,14 +572,14 @@ if ($record_path != '' && file_exists($record_path.'/'.$record_name)) { echo " \n"; } @@ -706,9 +704,7 @@ echo "
\n"; - echo " ".$text['label-source']."\n"; + echo " ".$text['label-caller_id_number']."\n"; echo " \n"; echo " \n"; @@ -258,7 +256,7 @@ echo "
\n"; - echo " ".$text['label-cid-name']."\n"; + echo " ".$text['label-caller_id_name']."\n"; echo " \n"; echo " \n"; @@ -378,8 +376,8 @@ echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param); $col_count++; } - echo th_order_by('caller_id_name', $text['label-cid-name'], $order_by, $order, null, null, $param); - echo th_order_by('caller_id_number', $text['label-source'], $order_by, $order, null, null, $param); + echo th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order, null, null, $param); + echo th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order, null, null, $param); if (permission_exists('caller_destination')) { echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, null, $param); } @@ -484,7 +482,7 @@ //recording playback if (permission_exists('recording_play') && $record_path != '') { - echo "
"; echo ""; echo "

"; - if ($result_count == $rows_per_page) { - echo $paging_controls; - } + echo $paging_controls; echo "

"; // check or uncheck all checkboxes diff --git a/app/xml_cdr/xml_cdr_delete.php b/app/xml_cdr/xml_cdr_delete.php index 45d7f09a90..7e36fec8de 100644 --- a/app/xml_cdr/xml_cdr_delete.php +++ b/app/xml_cdr/xml_cdr_delete.php @@ -49,15 +49,22 @@ if (sizeof($xml_cdr_uuids) > 0) { foreach ($xml_cdr_uuids as $index => $xml_cdr_uuid) { - // delete record + // delete record from v_xml_cdr $sql = "delete from v_xml_cdr "; - $sql .= "where uuid = '".$xml_cdr_uuid."' "; + $sql .= "where xml_cdr_uuid = '".$xml_cdr_uuid."' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); unset($sql, $prep_statement); - //delete recording, if any - if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]))) { - @unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index])); + //delete recording from fs and v_call_recordings respectively, if any + if ($recording_file_path[$index] != '' ) { + $sql = "delete from v_call_recordings "; + $sql .= "where call_recording_uuid = '".$xml_cdr_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql, $prep_statement); + if (file_exists(base64_decode($recording_file_path[$index]))) { + @unlink(base64_decode($recording_file_path[$index])); + } } } } diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 38378c49ee..3cf10ca9c8 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2018 the Initial Developer. All Rights Reserved. Contributor(s): @@ -29,7 +29,7 @@ require_once "resources/require.php"; require_once "resources/check_auth.php"; -//ehceck permissions +//check permissions if (permission_exists('xml_cdr_view')) { //access granted } @@ -43,16 +43,16 @@ $text = $language->get(); //get the http values and set them to a variable - if (strlen($_REQUEST["uuid"]) > 0) { - $uuid = trim($_REQUEST["uuid"]); + if (strlen($_REQUEST["id"]) > 0) { + $uuid = trim($_REQUEST["id"]); } //get the cdr string from the database $sql = "select * from v_xml_cdr "; if (permission_exists('xml_cdr_all')) { - $sql .= "where uuid = '$uuid' "; + $sql .= "where xml_cdr_uuid = '$uuid' "; } else { - $sql .= "where uuid = '$uuid' and domain_uuid = '$domain_uuid' "; + $sql .= "where xml_cdr_uuid = '$uuid' and domain_uuid = '$domain_uuid' "; } $row = $db->query($sql)->fetch(); $start_stamp = trim($row["start_stamp"]); @@ -69,7 +69,7 @@ } //get cdr from the file system - if ($format != "xml" || $format != "json") { + if ($format != "xml" && $format != "json") { $tmp_time = strtotime($start_stamp); $tmp_year = date("Y", $tmp_time); $tmp_month = date("M", $tmp_time); @@ -89,6 +89,10 @@ try { if ($format == 'json') { $array = json_decode($json_string,true); + if (is_null($array)){ + $j = stripslashes($json_string); + $array = json_decode($j,true); + } } if ($format == 'xml') { $array = json_decode(json_encode((array)simplexml_load_string($xml_string)),true); @@ -122,7 +126,7 @@ //detail summary //get the variables - $uuid = check_str(urldecode($array["variables"]["uuid"])); + $xml_cdr_uuid = check_str(urldecode($array["variables"]["uuid"])); $direction = check_str(urldecode($array["channel_data"]["direction"])); $language = check_str(urldecode($array["variables"]["language"])); $start_epoch = check_str(urldecode($array["variables"]["start_epoch"])); @@ -192,7 +196,7 @@ echo "\n"; echo "\n"; - echo " ".$direction."\n"; + echo " ".$direction."\n"; //echo " ".$language."\n"; //echo " ".$context."\n"; echo " "; @@ -278,7 +282,7 @@ echo " ".$key."\n"; if ($key == "bridge_uuid" || $key == "signal_bond") { echo " \n"; - echo " ".$value." \n"; + echo " ".$value." \n"; $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; $tmp_name = ''; if (file_exists($tmp_dir.'/'.$value.'.wav')) { @@ -469,7 +473,7 @@ echo " ".wordwrap($value,75,"
\n", TRUE)." \n"; } else { - echo " ".$value." \n"; + echo " ".$value." \n"; } echo " \n"; } diff --git a/app/xml_cdr/xml_cdr_extension_summary.php b/app/xml_cdr/xml_cdr_extension_summary.php index 2eb5b755a4..9654af4e3d 100644 --- a/app/xml_cdr/xml_cdr_extension_summary.php +++ b/app/xml_cdr/xml_cdr_extension_summary.php @@ -241,11 +241,11 @@ echo " ".escape($row['missed'])." \n"; echo " ".escape($row['no_answer'])." \n"; echo " ".escape($row['busy'])." \n"; - echo " ".gmdate("H:i:s",$row['aloc'])." \n"; + echo " ".format_hours($row['aloc'])." \n"; echo "  ". escape($row['inbound_calls']) ."\n"; - echo " ".(($row['inbound_duration'] != '0') ? gmdate("G:i:s", $row['inbound_duration']) : '0:00:00')."\n"; + echo " ".(($row['inbound_duration'] != '0') ? format_hours($row['inbound_duration']) : '0:00:00')."\n"; echo "  ".(($row['outbound_calls'] != '') ? escape($row['outbound_calls']) : "0")."\n"; - echo " ".(($row['outbound_duration'] != '') ? gmdate("G:i:s", $row['outbound_duration']) : '0:00:00')."\n"; + echo " ".(($row['outbound_duration'] != '') ? format_hours($row['outbound_duration']) : '0:00:00')."\n"; echo " ".escape($row['description'])." \n"; echo "\n"; $c = ($c==0) ? 1 : 0; diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index a1ed096505..98e47b0fbe 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2018 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -67,7 +67,7 @@ $billsec = check_str($_REQUEST["billsec"]); $hangup_cause = check_str($_REQUEST["hangup_cause"]); $call_result = check_str($_REQUEST["call_result"]); - $uuid = check_str($_REQUEST["uuid"]); + $xml_cdr_uuid = check_str($_REQUEST["xml_cdr_uuid"]); $bleg_uuid = check_str($_REQUEST["bleg_uuid"]); $accountcode = check_str($_REQUEST["accountcode"]); $read_codec = check_str($_REQUEST["read_codec"]); @@ -121,11 +121,7 @@ $sql_where_ands[] = "caller_id_name like '".$mod_caller_id_name."'"; } if (strlen($caller_extension_uuid) > 0 && is_uuid($caller_extension_uuid)) { - $sql_where_ands[] = "extension_uuid = '".$caller_extension_uuid."'"; - } - if (strlen($caller_id_number) > 0) { - $mod_caller_id_number = str_replace("*", "%", $caller_id_number); - $sql_where_ands[] = "caller_id_number like '".$mod_caller_id_number."'"; + $sql_where_ands[] = "e.extension_uuid = '".$caller_extension_uuid."'"; } if (strlen($caller_destination) > 0) { $mod_caller_destination = str_replace("*", "%", $caller_destination); @@ -206,7 +202,7 @@ $sql_where_ands[] = "(answer_stamp is null and bridge_uuid is null and billsec = 0 and sip_hangup_disposition = 'send_refuse')"; } } - if (strlen($uuid) > 0) { $sql_where_ands[] = "uuid = '".$uuid."'"; } + if (strlen($xml_cdr_uuid) > 0) { $sql_where_ands[] = "xml_cdr_uuid = '".$xml_cdr_uuid."'"; } if (strlen($bleg_uuid) > 0) { $sql_where_ands[] = "bleg_uuid = '".$bleg_uuid."'"; } if (strlen($accountcode) > 0) { $sql_where_ands[] = "accountcode = '".$accountcode."'"; } if (strlen($read_codec) > 0) { $sql_where_ands[] = "read_codec like '%".$read_codec."%'"; } @@ -219,8 +215,15 @@ //if not admin or superadmin, only show own calls if (!permission_exists('xml_cdr_domain')) { if (count($_SESSION['user']['extension']) > 0) { // extensions are assigned to this user + foreach ($_SESSION['user']['extension'] as $row) { + $sql_where_ors[] = "c.extension_uuid = '".$row['extension_uuid']."'"; + } + // create simple user extension array - foreach ($_SESSION['user']['extension'] as $row) { $user_extensions[] = $row['user']; } + foreach ($_SESSION['user']['extension'] as $row) { + $user_extensions[] = $row['user']; + } + // if both a source and destination are submitted, but neither are an assigned extension, restrict results if ( $caller_id_number != '' && @@ -228,25 +231,27 @@ array_search($caller_id_number, $user_extensions) === false && array_search($destination_number, $user_extensions) === false ) { - $sql_where_ors[] = "caller_id_number like '".$user_extension."'"; - $sql_where_ors[] = "destination_number like '".$user_extension."'"; - $sql_where_ors[] = "destination_number like '*99".$user_extension."'"; + $sql_where_ors[] = "caller_id_number = '".$user_extension."'"; + $sql_where_ors[] = "destination_number = '".$user_extension."'"; + $sql_where_ors[] = "destination_number = '*99".$user_extension."'"; } // if source submitted is blank, implement restriction for assigned extension(s) if ($caller_id_number == '') { // if source criteria is blank, then restrict to assigned ext foreach ($user_extensions as $user_extension) { - if (strlen($user_extension) > 0) { $sql_where_ors[] = "caller_id_number like '".$user_extension."'"; } + if (strlen($user_extension) > 0) { $sql_where_ors[] = "caller_id_number = '".$user_extension."'"; } } } + // if destination submitted is blank, implement restriction for assigned extension(s) if ($destination_number == '') { foreach ($user_extensions as $user_extension) { if (strlen($user_extension) > 0) { - $sql_where_ors[] = "destination_number like '".$user_extension."'"; - $sql_where_ors[] = "destination_number like '*99".$user_extension."'"; + $sql_where_ors[] = "destination_number = '".$user_extension."'"; + $sql_where_ors[] = "destination_number = '*99".$user_extension."'"; } } } + // concatenate the 'or's array, then add to the 'and's array if (sizeof($sql_where_ors) > 0) { $sql_where_ands[] = "( ".implode(" or ", $sql_where_ors)." )"; @@ -284,7 +289,7 @@ $param .= "&billsec=".escape($billsec); $param .= "&hangup_cause=".escape($hangup_cause); $param .= "&call_result=".escape($call_result); - $param .= "&uuid=".escape($uuid); + $param .= "&xml_cdr_uuid=".escape($xml_cdr_uuid); $param .= "&bleg_uuid=".escape($bleg_uuid); $param .= "&accountcode=".escape($accountcode); $param .= "&read_codec=".escape($read_codec); @@ -324,7 +329,7 @@ //count the records in the database /* if ($_SESSION['cdr']['limit']['numeric'] == 0) { - $sql = "select count(uuid) as num_rows from v_xml_cdr "; + $sql = "select count(xml_cdr_uuid) as num_rows from v_xml_cdr "; $sql .= "where domain_uuid = '".$domain_uuid."' ".$sql_where; $prep_statement = $db->prepare(check_sql($sql)); if ($prep_statement) { @@ -356,66 +361,69 @@ $offset = $rows_per_page * $page; //get the results from the db - $sql = "select "; - $sql .= "domain_uuid, "; - $sql .= "start_stamp, "; - $sql .= "start_epoch, "; - $sql .= "hangup_cause, "; - $sql .= "duration, "; - $sql .= "billmsec, "; - $sql .= "record_path, "; - $sql .= "record_name, "; - $sql .= "uuid, "; - $sql .= "bridge_uuid, "; - $sql .= "direction, "; - $sql .= "billsec, "; - $sql .= "caller_id_name, "; - $sql .= "caller_id_number, "; - $sql .= "caller_destination, "; - $sql .= "source_number, "; - $sql .= "destination_number, "; - $sql .= "leg, "; - $sql .= "(xml IS NOT NULL OR json IS NOT NULL) AS raw_data_exists, "; + $sql = "select \n"; + $sql .= "c.domain_uuid, \n"; + $sql .= "e.extension, \n"; + $sql .= "c.start_stamp, \n"; + $sql .= "c.end_stamp, \n"; + $sql .= "c.start_epoch, \n"; + $sql .= "c.hangup_cause, \n"; + $sql .= "c.duration, \n"; + $sql .= "c.billmsec, \n"; + $sql .= "c.record_path, \n"; + $sql .= "c.record_name, \n"; + $sql .= "c.xml_cdr_uuid, \n"; + $sql .= "c.bridge_uuid, \n"; + $sql .= "c.direction, \n"; + $sql .= "c.billsec, \n"; + $sql .= "c.caller_id_name, \n"; + $sql .= "c.caller_id_number, \n"; + $sql .= "c.caller_destination, \n"; + $sql .= "c.source_number, \n"; + $sql .= "c.destination_number, \n"; + $sql .= "c.leg, \n"; + $sql .= "(c.xml IS NOT NULL OR c.json IS NOT NULL) AS raw_data_exists, \n"; if (is_array($_SESSION['cdr']['field'])) { foreach ($_SESSION['cdr']['field'] as $field) { $array = explode(",", $field); $field_name = end($array); - $sql .= $field_name.", "; + $sql .= $field_name.", \n"; } } if (is_array($_SESSION['cdr']['export'])) { foreach ($_SESSION['cdr']['export'] as $field) { - $sql .= $field.", "; + $sql .= $field.", \n"; } } - $sql .= "accountcode, "; - $sql .= "answer_stamp, "; - $sql .= "sip_hangup_disposition, "; + $sql .= "c.accountcode, \n"; + $sql .= "c.answer_stamp, \n"; + $sql .= "c.sip_hangup_disposition, \n"; if (permission_exists("xml_cdr_pdd")) { - $sql .= "pdd_ms, "; + $sql .= "c.pdd_ms, \n"; } if (permission_exists("xml_cdr_mos")) { - $sql .= "rtp_audio_in_mos, "; + $sql .= "c.rtp_audio_in_mos, \n"; } - $sql .= "(answer_epoch - start_epoch) as tta "; + $sql .= "(c.answer_epoch - c.start_epoch) as tta "; if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) { - $sql .= ", domain_name "; + $sql .= ", c.domain_name \n"; } - $sql .= "from v_xml_cdr "; + $sql .= "from v_xml_cdr as c \n"; + $sql .= "left join v_extensions as e on e.extension_uuid = c.extension_uuid "; + $sql .= "inner join v_domains as d on d.domain_uuid = c.domain_uuid "; if ($_REQUEST['show'] == "all" && permission_exists('xml_cdr_all')) { if ($sql_where) { $sql .= "where "; } } else { - $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "where c.domain_uuid = '".$domain_uuid."' \n"; } - $sql .= $sql_where; if (strlen($order_by)> 0) { $sql .= " order by ".$order_by." ".$order." "; } if ($_REQUEST['export_format'] != "csv" && $_REQUEST['export_format'] != "pdf") { if ($rows_per_page == 0) { - $sql .= " limit ".$_SESSION['cdr']['limit']['numeric']." offset 0 "; + $sql .= " limit ".$_SESSION['cdr']['limit']['numeric']." offset 0 \n"; } else { - $sql .= " limit ".$rows_per_page." offset ".$offset." "; + $sql .= " limit ".$rows_per_page." offset ".$offset." \n"; } } $sql= str_replace(" ", " ", $sql); @@ -432,8 +440,7 @@ $database->password = $_SESSION['cdr']['archive_database_password']['text']; } } - $database->select($sql); - $result = $database->result; + $result = $database->select($sql); $result_count = count($result); unset($database); diff --git a/app/xml_cdr/xml_cdr_search.php b/app/xml_cdr/xml_cdr_search.php index eab7cb42e2..3e106ccc30 100644 --- a/app/xml_cdr/xml_cdr_search.php +++ b/app/xml_cdr/xml_cdr_search.php @@ -108,7 +108,7 @@ } echo " \n"; - if(permission_exists('xml_cdr_b_leg')){ + if (permission_exists('xml_cdr_b_leg')){ echo " "; + echo " "; echo " "; echo " "; echo " ".$text['label-bridge_uuid'].""; diff --git a/app/xml_cdr/xml_cdr_statistics_inc.php b/app/xml_cdr/xml_cdr_statistics_inc.php index 7b79cda488..fc3446ae3b 100644 --- a/app/xml_cdr/xml_cdr_statistics_inc.php +++ b/app/xml_cdr/xml_cdr_statistics_inc.php @@ -23,16 +23,20 @@ Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('xml_cdr_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('xml_cdr_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } /*//show all call detail records to admin and superadmin. for everyone else show only the call details for extensions assigned to them if (!if_group("admin") && !if_group("superadmin")) { @@ -395,4 +399,4 @@ else { if ($x == $hours) { break; } $x++; } -?> \ No newline at end of file +?> diff --git a/app/yealink/app_config.php b/app/yealink/app_config.php index ed85305352..aaf5a7fd1f 100755 --- a/app/yealink/app_config.php +++ b/app/yealink/app_config.php @@ -30,6 +30,14 @@ //default settings $y=0; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a9f1e1a3-8165-45ed-b598-a09ea8965966"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_provision_url"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Provisioning URL for Yealink"; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fc2fa8cd-b14e-48e3-99bd-7c01c9d6208d"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_time_zone"; @@ -68,7 +76,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Send the response back to the source it came from."; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable or disable the NAT Rport. 0-Disabled (default), 1-Enabled."; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "70894b7b-2edd-41ad8526060589df4e11"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -92,7 +100,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "subscribe to the voicemail MWI 0-Disabled (default), 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Subscribe to the voicemail MWI 0-Disabled (default), 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1374da96-dc40-4f12-8269-0b94278b7c55"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -100,7 +108,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled (default), 1-Forced, 2-Negotiate"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f0704072-c3d9-48df-b89b-2aea6035b3c4"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -110,6 +118,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Call Waiting 1=enabled 0=disable"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3401d056-56b1-4038-a03b-4be041b80b0e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_call_waiting_tone"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Call Waiting Tone 0-Disabled, 1-Enabled (default)"; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2c3445ff-0339-43d4-8762-3c87ec37be57"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_outbound_proxy_fallback_interval"; @@ -132,7 +148,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "The value is 0(default) or 1."; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The value is 0 (default) or 1."; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2f5e8429-6890-4da7-84ae-65c9c29b5091"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -147,8 +163,8 @@ $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_direct_ip_call_enable"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "(0-Disabled;1-Enabled) "; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c45264b7-6e85-42e4-b245-f22caff091d4"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -156,7 +172,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "(0-Disabled;1-Enabled)"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ada36bd5-51ab-4bf8-a2ad-bc39671b2a3a"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -164,7 +180,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "(0-Disabled:power indicator LED is off;1-Enabled:power indicator LED is solid red)"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled:power indicator LED is off, 1-Enabled:power indicator LED is solid red"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fb13e647-ca3f-4da6-901c-584b8cde4055"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -186,9 +202,17 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_cid_source"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "The type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The type of SIP header(s) to carry the caller ID; 0-FROM, 1-PAI 2-PAI-FROM (default), 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ba0ebf59-6364-47b2-9a98-73430669a4c4"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dtmf_type"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-INBAND, 1-RFC 2833 (default), 2-SIP INFO, 3-RFC2833 + SIP INFO"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6fd955ef-2f65-41f0-84cf-5b3ad917cc20"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -196,7 +220,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " 0-Disabled 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "968c9f53-305c-4fbd-a7dd-4dd6099e829e"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -204,7 +228,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "5060"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " 5060 default"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "5060 default"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f903069-c0fc-4bf1-9c33-907bf238475e"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -212,7 +236,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "https://server.yourdomain.com/app/yealink/resources/firmware"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Base URL for Yealink Firmware. Download from http://support.yealink.com"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Base URL for Yealink Firmware. Download from http://support.yealink.com"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e8f3e617-a6b3-4859-af59-04e2349f3d49"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -220,7 +244,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "cp860-37.81.0.10.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the CP860 firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the CP860 firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7a769f2f-2833-4b90-9789-ff96a4723773"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -228,7 +252,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "cp960-73.80.0.25.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the CP960 firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the CP960 firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "311d2739-a340-42f5-8e3e-6e6ecce1faa2"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -236,7 +260,15 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t29g-46.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T29G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T29G firmware ROM"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2f27755a-5082-469d-8ea6-52e350cb9988"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_firmware_t27g"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "t27g-69.84.0.15.rom"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T27G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "758509689226450f-a3e1-414ec1d610ee"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -244,7 +276,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t38g-38.70.0.185.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T38G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T38G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7223c3a7-5ef9-46a8-84be-39338a6788a6"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -252,7 +284,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t40g-76.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T40G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T40G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c5d9b7ea-8e3b44289845438be7be0baa"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -260,7 +292,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t40p-54.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T40P firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T40P firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f714e8a0-9753-48e0-9674-0f4efc7e4ff1"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -268,7 +300,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t41p-36.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T41P firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T41P firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9480f346-c038-462b-b440329383290b84"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -276,7 +308,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t41s-66.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T41S firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T41S firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "84eb10e2-bd9f-4bd0-8073-ac8cf002e7f0"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -284,7 +316,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t42g-29.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T42G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T42G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "768f216e-fc19-4c97-b843-03d48ce70c4e"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -292,7 +324,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t42s-66.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T42S firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T42S firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5fb6ef46-0a7f-4bb6-b415-49b437454321"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -300,7 +332,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t46g-28.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T46G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T46G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4e2b8fcb-7d06-4553-becf-9904e1331c4c"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -308,7 +340,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t46s-66.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T46S firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T46S firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0276b965-0ef6-493a-bdd0-b9786bf8aad7"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -316,7 +348,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t48g-35.81.0.110.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T48G firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T48G firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "77314a84-6304-47d8-a6b4-fb6d12b8804f"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -332,7 +364,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t49g-51.80.0.100.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T49Gfirmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T49Gfirmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "804003fc-f0e9-4b3b-a35b-6c2742f965eb"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -340,7 +372,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t52s-70.81.0.10.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T52Sfirmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T52Sfirmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7378c0b632424989-8af6-903dfb437285"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -348,7 +380,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "T54S(T52S)-70.82.0.20.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Firmware tested 2017-11-26"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Firmware tested 2017-11-26"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4ffd1ad7-1b00-41f7-8e9319412127245a"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -356,7 +388,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t56a-58.80.0.25.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T56A firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T56A firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "616d6358-d07e-4e42-8560-7de0f42cd5b1"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -364,7 +396,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t58a-58.80.0.25.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T58A firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T58A firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2cdd8b87-db72-4ad1-b18b-745fc1f7e906"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -372,7 +404,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "t58v-58.80.0.25.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the T58V firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T58V firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a39fc1af-9c30-46c7-a564-212e4af0331f"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -380,7 +412,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "vp530-23.70.0.40.rom"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Filename of the VP530 firmware ROM"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the VP530 firmware ROM"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "68eba481-aeb1-4c7e-a4e4-630946abc0e7"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -388,7 +420,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " (0-Disabled;1-Enabled)"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "(0-Disabled;1-Enabled)"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "85675560-82cf-48a5-8056-227c01a44f37"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -396,8 +428,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "hxxps://replace-this.url/openvpn.tar"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " (URL within 511 characters)"; - + $apps[$x]['default_settings'][$y]['default_setting_description'] = "(URL within 511 characters)"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b75ef82b-a225-43a5-a208-78d545cca8aa"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -413,7 +444,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " LLDP 0-Disabled, 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "LLDP 0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2d380c07-aba5-46a9-8ef5-7e6b713868fd"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -421,7 +452,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " CDP 0-Disabled, 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "CDP 0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f54bd090-723c-47c8-a9cd-c1e875134501"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -429,7 +460,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Overwrite Mode 0-Disabled, 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Overwrite Mode 0-Disabled, 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "709945c3-7fc4-4903-b6b2-7c0d695fea43"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -437,7 +468,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " DSS Key Label Length Default-0 Extended-1 Mid Range-2"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "DSS Key Label Length 0-Default, 1-Extended, 2-Mid Range"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3dee932a-6987-4693-b289-825d192e8f85"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -445,7 +476,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = " Enable or disable the feature key synchronization; 0-Disabled (default) 1-Enabled"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c7227e2b-870f-4c11-aab8-dfff8d626ded"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -453,7 +484,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "0"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto dial after digit timeout 0-Disabled (default), 1-Enabled;"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto dial after digit timeout 0-Disabled (default), 1-Enabled"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "627ef79d-1a49-4bae-b215-56182e308351"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -461,7 +492,7 @@ $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; $apps[$x]['default_settings'][$y]['default_setting_value'] = "custom.wav"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "custom ring tone (Busy.wav);"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Custom ring tone (Busy.wav);"; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7af991ec-ddb9-4942-a05d-d1acc529fef5"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; @@ -478,5 +509,318 @@ $apps[$x]['default_settings'][$y]['default_setting_value'] = "http://localhost/all,delete"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "http://localhost/all,delete all the customized ring tones"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7af991ec-ddb9-4942-a05d-d1acc529fef5"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ringtone_url"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "custom.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Before using this parameter, you should store the desired ring tone (custom.wav) to the provisioning server"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "95862d61-18ac-41b5-ac69-467e0ef3afd7"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_remote_phonebook_1_name"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Personal"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Remote Phonebook Users on Yealink"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32cdd450-2ba4-43d7-95d8-dcd825084455"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_remote_phonebook_2_name"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Global"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Remote Phonebook Groups on Yealink"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0abb1daf-e88f-4151-9bbb-fed244b9d3e4"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_remote_phonebook_3_name"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Local"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Remote Phonebook Extensions on Yealink"; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "765e18d9-9440-42be-a858-2c0ef90ee50f"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_1"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "78dee88b-6b6e-42e2-98ad-99ab9c521bd5"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_2"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "16150946-b283-4227-90ce-865ad2c3bb1d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_3"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "3"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "af56de21-f82e-496b-aa2f-c36c89aad136"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_4"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f2985575-04ed-47d0-b301-059caff3bba1"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_5"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "5"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0b02df63-256c-46ed-a6e4-8099addf2af0"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_6"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "6"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "32c7a515-afdf-4198-b185-83176c4a6e65"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_7"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "7"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a6a3b3f6-486e-4e69-a864-42964db271b7"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_8"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "8"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0c4aec7f-0f39-4984-be6a-0401a8d5e02b"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_9"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "9"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "eff410eb-1256-4ea7-9a60-ff9fe380ff08"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_text_10"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "10"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Text to map the keywords contained in the Alert-info header."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ddc70c4e-69be-43e7-8ad0-1e934ac47d0e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_1"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring1.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The default value 1 stands for Ring1.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5958dab7-d8de-49f5-a412-49567701a4b0"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_2"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring2.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 2 stands for Ring2.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "392b549d-35ec-48cd-943d-fe3799bfa508"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_3"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring3.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 3 stands for Ring3.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "24e46bf0-edfd-4d82-a617-c1aa3656b046"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_4"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring4.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 4 stands for Ring4.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4d38a1ff-b391-48b4-8552-a200f299d838"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_5"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring5.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 5 stands for Ring5.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b46a4a0e-6e58-484d-a1a6-20af1c97295d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_6"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring6.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 6 stands for Ring6.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "205fe7ac-a259-4902-ac41-75479b03614e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_7"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring7.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 7 stands for Ring7.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7db19fce-f2f7-4be1-bab4-7678fd90e2a2"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_8"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring8.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 8 stands for Ring8.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3a9c4b27-8fac-4a64-acae-ff8e5b94f70e"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_9"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring8.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 8 stands for Ring8.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a55346e4-0562-4455-b003-1950e33151d7"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_file_10"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "Ring8.wav"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Ring tone for each text ranges from 1 to 8. The value 8 stands for Ring8.wav."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "35f217f6-8551-4cdd-80f9-9c98ae702e30"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dsskey_transfer_mode"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "DSS key transfer mode: 0-Display Number, 1 Attended Transfer, 2 Blind Transfer (default)."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "df933bbc-9d69-405f-80b1-99871c4d39e4"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_language_gui"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The language used in phone interface."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b2d1e9c4-7097-4fc8-bb14-5aba6df4ef32"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dialplan_dialnow_rule_1"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "[2-9]xx[2-9]xxxxxx"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial Now - Automatically dial out the entered numbers."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5ea731fc-51d6-4b0a-9c2f-0dcc6560becd"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dialplan_dialnow_rule_2"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "911"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial Now - Automatically dial out the entered numbers."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "91a03c96-1597-41dd-9605-0ca1df7e010c"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dialplan_dialnow_rule_3"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "411"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial Now - Automatically dial out the entered numbers."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ed6080df-0d8b-40e6-887d-ace104855114"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dialplan_dialnow_rule_4"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial Now - Automatically dial out the entered numbers."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "81035ca7-cbc6-4b26-90ef-89997e43a5fb"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_dialplan_dialnow_rule_5"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Dial Now - Automatically dial out the entered numbers."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0ad4500c-cfdf-46cf-952f-711b41252327"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_1_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6b520b18-050c-49f6-b29c-71cd299c294d"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_2_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "2"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "92b48426-6658-40a4-a3b6-14d73560bcfa"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_3_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "3"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2bbfd8da-0cc1-4d20-8186-a37b13f96435"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_4_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a26ce50f-d877-45fc-8112-3fc3888a07e4"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_5_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "5"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3c235e65-9b25-4ecc-a29d-ce5ffa19170b"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_6_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "6"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d8569da8-01d7-4615-8484-0c1a5b0fe53a"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_codec_7_priority"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "7"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "The priority of the specified codec."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f20eea5d-402c-4d40-bfee-a5b8abe7217a"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_transfer_semi_attended"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "1"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "0-Disabled, 1-Enabled (default). Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call."; + $y++; ?> diff --git a/core/apps/app_menu.php b/core/apps/app_menu.php index 787d06f525..20ceada6cf 100644 --- a/core/apps/app_menu.php +++ b/core/apps/app_menu.php @@ -1,7 +1,7 @@ \ No newline at end of file +?> diff --git a/core/apps/apps.php b/core/apps/apps.php index 5eeeefa429..8deb5170cc 100644 --- a/core/apps/apps.php +++ b/core/apps/apps.php @@ -97,13 +97,13 @@ $row['$description'] = $description; /* - $tr_link = (permission_exists('app_edit')) ? "href='apps_edit.php?id=".$row['uuid']."'" : null; + $tr_link = (permission_exists('app_edit')) ? "href='apps_edit.php?id=".escape($row['uuid'])."'" : null; */ echo "\n"; echo " "; /* if (permission_exists('app_edit')) { - echo " ".$row['name'].""; + echo " ".escape($row['name']).""; } else { */ @@ -112,17 +112,17 @@ } */ echo " \n"; - echo " ".$row['category']." \n"; - echo " ".$row['subcategory']." \n"; - echo " ".$row['version']." \n"; - echo " ".$row['$description']."\n"; + echo " ".escape($row['category'])." \n"; + echo " ".escape($row['subcategory'])." \n"; + echo " ".escape($row['version'])." \n"; + echo " ".escape($row['$description'])."\n"; /* // temporarily disabled echo " "; if (permission_exists('app_edit')) { - echo " $v_link_label_edit\n"; + echo " $v_link_label_edit\n"; } if (permission_exists('app_delete')) { - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo " \n"; */ diff --git a/core/apps/apps_delete.php b/core/apps/apps_delete.php index 138c7e2da7..9f9b2d1fd6 100644 --- a/core/apps/apps_delete.php +++ b/core/apps/apps_delete.php @@ -89,7 +89,7 @@ if (strlen($id) > 0) { } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: apps.php"); return; diff --git a/core/apps/apps_edit.php b/core/apps/apps_edit.php index 101d44be40..f705417f10 100644 --- a/core/apps/apps_edit.php +++ b/core/apps/apps_edit.php @@ -88,7 +88,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //$db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: apps.php"); return; } //if ($action == "add") @@ -100,7 +100,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //$db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: apps.php"); return; } //if ($action == "update") diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index fe3297d88f..cac91ff325 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -36,20 +36,20 @@ class plugin_database { //check the username and password if they don't match then redirect to the login $sql = "select * from v_users "; if (strlen($this->key) > 30) { - $sql .= "where api_key=:key "; - //$sql .= "where api_key='".$this->key."' "; + $sql .= "where api_key = :key "; + //$sql .= "where api_key = '".$this->key."' "; } else { - $sql .= "where username=:username "; - //$sql .= "where username='".$this->username."' "; + $sql .= "where lower(username) = lower(:username) "; + //$sql .= "where username = '".$this->username."' "; } if ($_SESSION["user"]["unique"]["text"] == "global") { //unique username - global (example: email address) } else { //unique username - per domain - $sql .= "and domain_uuid=:domain_uuid "; - //$sql .= "and domain_uuid='".$this->domain_uuid."' "; + $sql .= "and domain_uuid = :domain_uuid "; + //$sql .= "and domain_uuid = '".$this->domain_uuid."' "; } $sql .= "and (user_enabled = 'true' or user_enabled is null) "; //echo $sql."
\n"; @@ -119,6 +119,7 @@ class plugin_database { } $result["user_uuid"] = $this->user_uuid; $result["domain_uuid"] = $this->domain_uuid; + $result["contact_uuid"] = $this->contact_uuid; $result["sql"] = $sql; if ($user_authorized) { $result["authorized"] = "true"; diff --git a/core/authentication/resources/classes/plugins/ldap.php b/core/authentication/resources/classes/plugins/ldap.php index bcedd23153..c459c9ab04 100644 --- a/core/authentication/resources/classes/plugins/ldap.php +++ b/core/authentication/resources/classes/plugins/ldap.php @@ -157,9 +157,9 @@ class plugin_ldap { //add the user to group user $group_name = 'user'; - $sql = "insert into v_group_users "; + $sql = "insert into v_user_groups "; $sql .= "("; - $sql .= "group_user_uuid, "; + $sql .= "user_group_uuid, "; $sql .= "domain_uuid, "; $sql .= "group_name, "; $sql .= "user_uuid "; diff --git a/core/databases/database_delete.php b/core/databases/database_delete.php index a6fed78ec5..d5411a8cf2 100644 --- a/core/databases/database_delete.php +++ b/core/databases/database_delete.php @@ -54,7 +54,7 @@ else { } //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: databases.php"); return; diff --git a/core/databases/database_edit.php b/core/databases/database_edit.php index 652865dbd1..26a096fd10 100644 --- a/core/databases/database_edit.php +++ b/core/databases/database_edit.php @@ -141,7 +141,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "app_defaults.php"; //redirect the browser - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: databases.php"); return; } //if ($action == "add") @@ -167,7 +167,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "app_defaults.php"; //redirect the browser - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: databases.php"); return; } //if ($action == "update") @@ -312,7 +312,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-host']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-host']."\n"; echo "\n"; @@ -323,7 +323,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-port']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-port']."\n"; echo "\n"; @@ -334,7 +334,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-name']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-name']."\n"; echo "\n"; @@ -345,7 +345,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-username']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-username']."\n"; echo "\n"; @@ -356,7 +356,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-password']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-password']."\n"; echo "\n"; @@ -367,7 +367,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-path']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-path']."\n"; echo "\n"; @@ -378,7 +378,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; @@ -386,7 +386,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; @@ -398,4 +398,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/databases/databases.php b/core/databases/databases.php index 71ee35c79f..699d9e31c3 100644 --- a/core/databases/databases.php +++ b/core/databases/databases.php @@ -117,17 +117,17 @@ else { foreach($result as $row) { $tr_link = "href='database_edit.php?id=".$row['database_uuid']."'"; echo "\n"; - echo " ".$row['database_driver']." \n"; - echo " ".$row['database_type']." \n"; - echo " ".$row['database_host']." \n"; - //echo " ".$row['database_port']." \n"; - echo " ".$row['database_name']." \n"; - //echo " ".$row['database_username']." \n"; - //echo " ".$row['database_path']." \n"; - echo " ".$row['database_description']." \n"; + echo " ".escape($row['database_driver'])." \n"; + echo " ".escape($row['database_type'])." \n"; + echo " ".escape($row['database_host'])." \n"; + //echo " ".escape($row['database_port'])." \n"; + echo " ".escape($row['database_name'])." \n"; + //echo " ".escape($row['database_username'])." \n"; + //echo " ".escape($row['database_path'])." \n"; + echo " ".escape($row['database_description'])." \n"; echo " "; - echo "$v_link_label_edit"; - echo "$v_link_label_delete"; + echo "$v_link_label_edit"; + echo "$v_link_label_delete"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } @@ -154,4 +154,4 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/default_settings/app_config.php b/core/default_settings/app_config.php index 4593353330..66d9587354 100644 --- a/core/default_settings/app_config.php +++ b/core/default_settings/app_config.php @@ -105,7 +105,7 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "domain"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "bridge"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "outbound"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "loopback"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "outbound,loopback,lcr"; $y++; @@ -117,62 +117,6 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the maximum number of records displayed per page. (Default: 50)"; $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "57d81b35-bc24-4e92-8436-4335ab5e9d0b"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_length"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "10"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the required length for the generated passwords."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0fa21a56-7515-4c65-b5f8-270cc24ea375"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_number"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether to require at least one number in passwords."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d5f9acbd-857c-42eb-9e9a-92a850fcb734"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_lowercase"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether to require at least one lowecase letter in passwords."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "256b0d87-a43e-4618-b96b-541e191879c7"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_uppercase"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether to require at least one uppercase letter in passwords."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4209ff1f-6ea8-4b77-81be-bd75e8670785"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_special"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set whether to require at least one special character in passwords."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "718b1641-fa3c-4861-b1f3-40635c951888"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_strength"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "4"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default strength for generated passwords. Valid Options: 1 - Numeric Only, 2 - Include Lower Apha, 3 - Include Upper Alpha, 4 - Include Special Characters."; - $y++; - $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "33914c55-9081-4b95-b62e-f1a500088d78"; - $apps[$x]['default_settings'][$y]['default_setting_category'] = "security"; - $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "session_rotate"; - $apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Whether to regenerate the session ID."; - $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "97a2410b-cfc8-4194-9172-dd5b0acfa9f3"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "email"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "smtp_auth"; @@ -213,6 +157,14 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = ""; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "82bfc038-5e8d-427e-9773-0eb31bc3a6c3"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "email"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "smtp_hostname"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Define the local hostname to be used when sending mail."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0bd788c1-3262-4336-92f4-ef7869062380"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "email"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "smtp_host"; @@ -257,7 +209,7 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "login"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "password_reset_key"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = generate_password('20', '4'); + $apps[$x]['default_settings'][$y]['default_setting_value'] = base64_encode(openssl_random_pseudo_bytes(32)); $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Display a Reset Password link on the login box (requires smtp_host be defined)."; $y++; @@ -473,15 +425,15 @@ $apps[$x]['default_settings'][$y]['default_setting_category'] = "cache"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "method"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "memcache"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "file"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; - $apps[$x]['default_settings'][$y]['default_setting_description'] = "Cache methods file and memcache."; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Cache methods file or memcache."; $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7b644bfb-124f-4212-9541-1ca564be9d79"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "cache"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "location"; $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; - $apps[$x]['default_settings'][$y]['default_setting_value'] = "/tmp"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "/var/cache/fusionpbx"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Location for the file cache."; diff --git a/core/default_settings/app_languages.php b/core/default_settings/app_languages.php index 99f51afc72..1835c988cd 100644 --- a/core/default_settings/app_languages.php +++ b/core/default_settings/app_languages.php @@ -481,6 +481,26 @@ $text['label-fixed']['ru-ru'] = "Фиксированный"; $text['label-fixed']['sv-se'] = "Fast"; $text['label-fixed']['uk-ua'] = "фіксований"; +$text['label-side']['en-us'] = "Side"; +$text['label-side']['ar-eg'] = ""; +$text['label-side']['de-at'] = ""; +$text['label-side']['de-ch'] = ""; +$text['label-side']['de-de'] = ""; +$text['label-side']['es-cl'] = ""; +$text['label-side']['es-mx'] = ""; +$text['label-side']['fr-ca'] = ""; +$text['label-side']['fr-fr'] = ""; +$text['label-side']['he-il'] = ""; +$text['label-side']['it-it'] = ""; +$text['label-side']['nl-nl'] = ""; +$text['label-side']['pl-pl'] = ""; +$text['label-side']['pt-br'] = ""; +$text['label-side']['pt-pt'] = ""; +$text['label-side']['ro-ro'] = ""; +$text['label-side']['ru-ru'] = ""; +$text['label-side']['sv-se'] = ""; +$text['label-side']['uk-ua'] = ""; + $text['label-fine']['en-us'] = "Fine"; $text['label-fine']['ar-eg'] = ""; $text['label-fine']['de-at'] = "Fein"; //copied from de-de @@ -581,6 +601,86 @@ $text['label-12-hour']['ru-ru'] = "12-часовой"; $text['label-12-hour']['sv-se'] = "12-timmars"; $text['label-12-hour']['uk-ua'] = "12-годинний"; +$text['label-hours']['en-us'] = "Hour(s)"; +$text['label-hours']['ar-eg'] = ""; +$text['label-hours']['de-at'] = ""; +$text['label-hours']['de-ch'] = ""; +$text['label-hours']['de-de'] = ""; +$text['label-hours']['es-cl'] = ""; +$text['label-hours']['es-mx'] = ""; +$text['label-hours']['fr-ca'] = ""; +$text['label-hours']['fr-fr'] = ""; +$text['label-hours']['he-il'] = ""; +$text['label-hours']['it-it'] = ""; +$text['label-hours']['nl-nl'] = ""; +$text['label-hours']['pl-pl'] = ""; +$text['label-hours']['pt-br'] = ""; +$text['label-hours']['pt-pt'] = ""; +$text['label-hours']['ro-ro'] = ""; +$text['label-hours']['ru-ru'] = ""; +$text['label-hours']['sv-se'] = ""; +$text['label-hours']['uk-ua'] = ""; + +$text['label-days']['en-us'] = "Day(s)"; +$text['label-days']['ar-eg'] = ""; +$text['label-days']['de-at'] = ""; +$text['label-days']['de-ch'] = ""; +$text['label-days']['de-de'] = ""; +$text['label-days']['es-cl'] = ""; +$text['label-days']['es-mx'] = ""; +$text['label-days']['fr-ca'] = ""; +$text['label-days']['fr-fr'] = ""; +$text['label-days']['he-il'] = ""; +$text['label-days']['it-it'] = ""; +$text['label-days']['nl-nl'] = ""; +$text['label-days']['pl-pl'] = ""; +$text['label-days']['pt-br'] = ""; +$text['label-days']['pt-pt'] = ""; +$text['label-days']['ro-ro'] = ""; +$text['label-days']['ru-ru'] = ""; +$text['label-days']['sv-se'] = ""; +$text['label-days']['uk-ua'] = ""; + +$text['label-messages']['en-us'] = "Message(s)"; +$text['label-messages']['ar-eg'] = ""; +$text['label-messages']['de-at'] = ""; +$text['label-messages']['de-ch'] = ""; +$text['label-messages']['de-de'] = ""; +$text['label-messages']['es-cl'] = ""; +$text['label-messages']['es-mx'] = ""; +$text['label-messages']['fr-ca'] = ""; +$text['label-messages']['fr-fr'] = ""; +$text['label-messages']['he-il'] = ""; +$text['label-messages']['it-it'] = ""; +$text['label-messages']['nl-nl'] = ""; +$text['label-messages']['pl-pl'] = ""; +$text['label-messages']['pt-br'] = ""; +$text['label-messages']['pt-pt'] = ""; +$text['label-messages']['ro-ro'] = ""; +$text['label-messages']['ru-ru'] = ""; +$text['label-messages']['sv-se'] = ""; +$text['label-messages']['uk-ua'] = ""; + +$text['label-image_text']['en-us'] = "Image & Text"; +$text['label-image_text']['ar-eg'] = ""; +$text['label-image_text']['de-at'] = ""; +$text['label-image_text']['de-ch'] = ""; +$text['label-image_text']['de-de'] = ""; +$text['label-image_text']['es-cl'] = ""; +$text['label-image_text']['es-mx'] = ""; +$text['label-image_text']['fr-ca'] = ""; +$text['label-image_text']['fr-fr'] = ""; +$text['label-image_text']['he-il'] = ""; +$text['label-image_text']['it-it'] = ""; +$text['label-image_text']['nl-nl'] = ""; +$text['label-image_text']['pl-pl'] = ""; +$text['label-image_text']['pt-br'] = ""; +$text['label-image_text']['pt-pt'] = ""; +$text['label-image_text']['ro-ro'] = ""; +$text['label-image_text']['ru-ru'] = ""; +$text['label-image_text']['sv-se'] = ""; +$text['label-image_text']['uk-ua'] = ""; + $text['header-default_settings']['en-us'] = "Default Settings"; $text['header-default_settings']['ar-eg'] = ""; $text['header-default_settings']['de-at'] = "Standard Einstellungen"; //copied from de-de diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index 7b2f362b29..40883faf40 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -153,12 +153,12 @@ //set the message and redirect the user if ($action == "add" && permission_exists('default_setting_add')) { - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: default_settings.php".(($search != '') ? "?search=".$search : null)."#anchor_".$default_setting_category); return; } if ($action == "update" && permission_exists('default_setting_edit')) { - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: default_settings.php".(($search != '') ? "?search=".$search : null)."#anchor_".$default_setting_category); return; } @@ -497,6 +497,18 @@ echo " \n"; echo " \n"; } + elseif ($category == "message" && $subcategory == "display_last" && $name == "text") { + $array = explode(' ',$default_setting_value); + if (!is_numeric($array[0])) { $array[1] = $array[0]; $array[0] = ''; } + echo " \n"; + echo " \n"; + echo " \n"; + unset($array); + } elseif ($category == "theme" && $subcategory == "domain_visible" && $name == "text" ) { echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo " \n"; } @@ -530,6 +543,7 @@ echo " \n"; echo " \n"; echo " \n"; + echo " \n"; echo " \n"; } elseif ($category == "theme" && $subcategory == "menu_position" && $name == "text" ) { @@ -545,6 +559,9 @@ echo " \n"; echo " \n"; } + elseif ($category == "theme" && $subcategory == "custom_css_code" && $name == "text" ) { + echo " \n"; + } elseif ($category == "voicemail" && $subcategory == "voicemail_file" && $name == "text" ) { echo " \n"; } elseif (is_json($default_setting_value)) { - echo " \n"; + echo " \n"; } else { echo " \n"; @@ -657,9 +674,11 @@ echo ""; + } + //show the content echo "
\n"; echo "\n"; @@ -658,6 +699,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { if (permission_exists('domain_add')) { //only for superadmin, not admin editing their own domain echo " \n"; } + //if (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) { + // echo " "; + // echo " "; + // echo " \n"; + // echo " "; + //} if (permission_exists('domain_export')) { echo " \n"; } diff --git a/core/domain_settings/domain_setting_delete.php b/core/domain_settings/domain_setting_delete.php index dcd3e2ec18..09b16f2b2e 100644 --- a/core/domain_settings/domain_setting_delete.php +++ b/core/domain_settings/domain_setting_delete.php @@ -56,7 +56,7 @@ else { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: domain_edit.php?id=".$domain_uuid); return; diff --git a/core/domain_settings/domain_setting_edit.php b/core/domain_settings/domain_setting_edit.php index 0db576ea32..d43ecec3dd 100644 --- a/core/domain_settings/domain_setting_edit.php +++ b/core/domain_settings/domain_setting_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2015 + Portions created by the Initial Developer are Copyright (C) 2008-2018 the Initial Developer. All Rights Reserved. Contributor(s): @@ -184,6 +184,26 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } $db->query($sql); unset($sql); + + //get the dialplan_uuid + $sql = "select * from v_domains "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + $domain_name = $row["domain_name"]; + unset ($prep_statement); + + //update the dialplan xml + $dialplans = new dialplan; + $dialplans->source = "details"; + $dialplans->destination = "database"; + $dialplans->uuid = $dialplan_uuid; + $dialplans->xml(); + + //clear the cache + $cache = new cache; + $cache->delete("dialplan:".$domain_name); } //add the domain @@ -317,10 +337,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //redirect the browser if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } header("Location: domain_edit.php?id=".$domain_uuid); return; diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index ec09f5c5d5..32126832c4 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -55,11 +55,110 @@ $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: domain_edit.php?id=".$domain_uuid); exit; } + //copy domain settings + if ($action == 'copy' && permission_exists('domain_setting_add')) { + $target_domain_uuid = check_str($_POST["target_domain_uuid"]); + + if ($target_domain_uuid != '' && sizeof($domain_setting_uuids) > 0) { + $settings_copied = 0; + foreach ($domain_setting_uuids as $domain_setting_uuid) { + + // get default setting from db + $sql = "select * from v_domain_settings "; + $sql .= "where domain_setting_uuid = '".$domain_setting_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $domain_setting_uuid = $row["default_setting_uuid"]; + $domain_setting_category = $row["default_setting_category"]; + $domain_setting_subcategory = $row["default_setting_subcategory"]; + $domain_setting_name = $row["default_setting_name"]; + $domain_setting_value = $row["default_setting_value"]; + $domain_setting_order = $row["default_setting_order"]; + $domain_setting_enabled = $row["default_setting_enabled"]; + $domain_setting_description = $row["default_setting_description"]; + } + unset ($prep_statement); + + //set a random password for http_auth_password + if ($domain_setting_subcategory == "http_auth_password") { + $domain_setting_value = generate_password(); + } + + // check if exists + $sql = "select domain_setting_uuid from v_domain_settings "; + $sql .= "where domain_uuid = '".$target_domain_uuid."' "; + $sql .= "and domain_setting_category = '".$domain_setting_category."' "; + $sql .= "and domain_setting_subcategory = '".$domain_setting_subcategory."' "; + $sql .= "and domain_setting_name = '".$domain_setting_name."' "; + $sql .= "and domain_setting_name <> 'array' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (sizeof($result) > 0) { + foreach ($result as &$row) { + $target_domain_setting_uuid = $row["domain_setting_uuid"]; + break; + } + $action = "update"; + } + else { + $action = "add"; + $target_domain_setting_uuid = uuid(); + } + unset ($prep_statement); + + // fix null + $domain_setting_order = ($domain_setting_order != '') ? $domain_setting_order : 'null'; + + //prepare the array + $array['domain_settings'][$x]['domain_uuid'] = $target_domain_uuid; + $array['domain_settings'][$x]['domain_setting_uuid'] = $target_domain_setting_uuid; + $array['domain_settings'][$x]['default_setting_category'] = $default_setting_category; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_subcategory; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_name; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_value; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_order; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_enabled; + $array['domain_settings'][$x]['domain_setting_uuid'] = $default_setting_description; + $x++; + + } // foreach + + //save to the data + $database = new database; + $database->app_name = 'domain_settings'; + $database->app_uuid = 'b31e723a-bf70-670c-a49b-470d2a232f71'; + //if (strlen($stream_uuid) > 0) { + // $database->uuid($stream_uuid); + //} + $database->save($array); + $message = $database->message; + + //debug info + //echo "
";
+					//print_r($message);
+					//echo "
"; + //exit; + + // set message + $_SESSION["message"] = $text['message-copy'].": ".escape($settings_copied); + } + else { + // set message + message::add($text['message-copy_failed']); + } + + header("Location: default_settings.php".(($search != '') ? "?search=".escape($search) : null)); + exit; + } + //delete domain settings if ($action == 'delete' && permission_exists('domain_setting_delete')) { //add multi-lingual support @@ -79,7 +178,7 @@ } else { // set message - messages::add($text['message-delete_failed'], 'negative'); + message::add($text['message-delete_failed'], 'negative'); } header("Location: domain_edit.php?id=".escape($_REQUEST["domain_uuid"])); diff --git a/core/domain_settings/domains.php b/core/domain_settings/domains.php index 996d3e2abf..4a6881a7a7 100644 --- a/core/domain_settings/domains.php +++ b/core/domain_settings/domains.php @@ -143,9 +143,10 @@ //get the domains $sql = "select * from v_domains "; if (strlen($search) > 0) { + $search = strtolower($search); $sql .= "where ("; - $sql .= " domain_name like '%".$search."%' "; - $sql .= " or domain_description like '%".$search."%' "; + $sql .= " lower(domain_name) like '%".$search."%' "; + $sql .= " or lower(domain_description) like '%".$search."%' "; $sql .= ") "; } if (strlen($order_by) == 0) { diff --git a/core/events/resources/classes/events.php b/core/events/resources/classes/events.php index 96db8dc42d..5036626ce8 100644 --- a/core/events/resources/classes/events.php +++ b/core/events/resources/classes/events.php @@ -9,7 +9,7 @@ class events { /** - * @var obj $db Database connnection object + * @var obj $db Database connnection object * @var array $plugins Store available plugin classes * @var array $methods store methods found on each plugin * @var array $headers headers provide information about the events diff --git a/core/groups/app_config.php b/core/groups/app_config.php index 6235224471..20525b1f99 100644 --- a/core/groups/app_config.php +++ b/core/groups/app_config.php @@ -66,23 +66,6 @@ $apps[$x]['permissions'][$y]['name'] = "group_permissions"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; - $apps[$x]['permissions'][$y]['name'] = "group_user_view"; - $apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; - $y++; - $apps[$x]['permissions'][$y]['name'] = "group_user_add"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; - $y++; - $apps[$x]['permissions'][$y]['name'] = "group_user_edit"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; - $y++; - $apps[$x]['permissions'][$y]['name'] = "group_user_delete"; - $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; - $apps[$x]['permissions'][$y]['groups'][] = "admin"; - $y++; $apps[$x]['permissions'][$y]['name'] = "group_permission_view"; $apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; @@ -143,64 +126,6 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $y++; - $apps[$x]['db'][$y]['table']['name'] = "v_group_users"; - $apps[$x]['db'][$y]['table']['parent'] = "v_groups"; - $z=0; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "id"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "group_user_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid"; - $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'] = "group_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_groups"; - $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "username"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; - $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; - $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $y++; $apps[$x]['db'][$y]['table']['name'] = "v_group_permissions"; $apps[$x]['db'][$y]['table']['parent'] = "v_groups"; @@ -248,6 +173,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_groups"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/core/groups/app_defaults.php b/core/groups/app_defaults.php index 5a613a80a5..76fcb1fdeb 100644 --- a/core/groups/app_defaults.php +++ b/core/groups/app_defaults.php @@ -31,7 +31,7 @@ if ($domains_processed == 1) { $group->defaults(); //find rows that have a null group_uuid and set the correct group_uuid - $sql = "select * from v_group_users "; + $sql = "select * from v_user_groups "; $sql .= "where group_uuid is null; "; $prep_statement = $db->prepare(check_sql($sql)); if ($prep_statement) { @@ -49,9 +49,9 @@ if ($domains_processed == 1) { unset ($prep_statement_sub); $group_uuid = $sub_result['group_uuid']; //set the group_uuid - $sql = "update v_group_users set "; + $sql = "update v_user_groups set "; $sql .= "group_uuid = '".$group_uuid."' "; - $sql .= "where group_user_uuid = '".$row['group_user_uuid']."'; "; + $sql .= "where user_group_uuid = '".$row['user_group_uuid']."'; "; $db->exec($sql); unset($sql); } @@ -62,4 +62,4 @@ if ($domains_processed == 1) { } -?> \ No newline at end of file +?> diff --git a/core/groups/group_permissions.php b/core/groups/group_permissions.php index 077b09a611..250f55177c 100644 --- a/core/groups/group_permissions.php +++ b/core/groups/group_permissions.php @@ -314,7 +314,7 @@ } } - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: groups.php"); return; } @@ -328,7 +328,7 @@ echo " if (new_group_name != null) {\n"; echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n"; echo " if (new_group_desc != null) {\n"; - echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n"; + echo " window.location = 'permissions_copy.php?group_name=".escape($group_name)."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n"; echo " }\n"; echo " }\n"; echo " }\n"; @@ -352,11 +352,11 @@ //show the content echo "\n"; - echo "\n"; + echo "\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo "\n"; $c = ($c == 0) ? 1 : 0; @@ -487,4 +487,4 @@ //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/groups/groupadd.php b/core/groups/groupadd.php index 71b65b2a42..904a05aa4f 100644 --- a/core/groups/groupadd.php +++ b/core/groups/groupadd.php @@ -95,11 +95,11 @@ // $info[2] is the driver specific error string } - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: groups.php"); } else { - messages::add($text['message-group_exists'], 'negative'); + message::add($text['message-group_exists'], 'negative'); header("Location: groupadd.php"); } diff --git a/core/groups/groupdelete.php b/core/groups/groupdelete.php index d20cd9d6a7..6181481fa7 100644 --- a/core/groups/groupdelete.php +++ b/core/groups/groupdelete.php @@ -62,8 +62,8 @@ } unset ($prep_statement); - //delete the group users - $sql = "delete from v_group_users "; + //delete the user groups + $sql = "delete from v_user_groups "; $sql .= "where group_uuid = '".$group_uuid."' "; if (!$db->exec($sql)) { $error = $db->errorInfo(); @@ -92,7 +92,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: groups.php"); -?> \ No newline at end of file +?> diff --git a/core/groups/groupedit.php b/core/groups/groupedit.php index 1ef25ba4e8..985e6c482c 100644 --- a/core/groups/groupedit.php +++ b/core/groups/groupedit.php @@ -85,7 +85,7 @@ //group changed from global to domain-specific if ($domain_uuid_previous == '' && $domain_uuid != '') { //remove any users assigned to the group from the old domain - $sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' "; + $sql = "delete from v_user_groups where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -99,7 +99,7 @@ //change group name if ($group_name != $group_name_previous && $group_name != '') { //change group name in group users - $sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; + $sql = "update v_user_groups set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -116,7 +116,7 @@ //group changed from one domain to another else if ($domain_uuid_previous != '' && $domain_uuid != '' && $domain_uuid_previous != $domain_uuid) { //remove any users assigned to the group from the old domain - $sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' "; + $sql = "delete from v_user_groups where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -130,7 +130,7 @@ //change group name if ($group_name != $group_name_previous && $group_name != '') { //change group name in group users - $sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; + $sql = "update v_user_groups set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -149,7 +149,7 @@ //change group name if ($group_name != $group_name_previous && $group_name != '') { //change group name in group users - $sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; + $sql = "update v_user_groups set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -174,7 +174,7 @@ //change group name if ($group_name != $group_name_previous && $group_name != '') { //change group name in group users - $sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; + $sql = "update v_user_groups set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' "; if (!$db->exec(check_sql($sql))) { $error = $db->errorInfo(); //echo "
".print_r($error, true)."
"; exit; @@ -188,11 +188,11 @@ } } - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: groups.php"); } else { - messages::add($text['message-group_exists'], 'negative'); + message::add($text['message-group_exists'], 'negative'); header("Location: groupedit.php?id=".$group_uuid); } @@ -228,7 +228,7 @@ echo " if (new_group_name != null) {\n"; echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n"; echo " if (new_group_desc != null) {\n"; - echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n"; + echo " window.location = 'permissions_copy.php?group_name=".escape($group_name)."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n"; echo " }\n"; echo " }\n"; echo " }\n"; @@ -236,7 +236,7 @@ //show the content echo "\n"; - echo "\n"; + echo "\n"; echo "
"; - echo " ".$text['header-group_permissions'].$group_name.""; + echo " ".$text['header-group_permissions'].escape($group_name).""; echo "

"; echo "
\n"; @@ -404,9 +404,9 @@ foreach ($app['permissions'] as $permission_index => $row) { $checked = ($permissions_db_checklist[$row['name']] == "true") ? "checked='checked'" : null; echo "
".$row['name']."".$row['description']." ".escape($row['name'])."".escape($row['description'])." 
\n"; echo " \n"; @@ -260,8 +260,8 @@ echo $text['label-group_name']."\n"; echo "\n"; echo "\n"; echo "\n"; @@ -271,11 +271,11 @@ echo " ".$text['label-domain']."\n"; echo "\n"; echo "\n"; } else { - echo ""; + echo ""; } echo "\n"; @@ -292,7 +292,7 @@ echo $text['label-group_description']."\n"; echo "\n"; echo "\n"; echo "\n"; @@ -310,4 +310,4 @@ //include the footer include "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/groups/groupmemberadd.php b/core/groups/groupmemberadd.php index 1187cc24aa..6e980f6337 100644 --- a/core/groups/groupmemberadd.php +++ b/core/groups/groupmemberadd.php @@ -52,9 +52,9 @@ //add the user to the group if (is_uuid($user_uuid) && is_uuid($group_uuid) && strlen($group_name) > 0) { - $sql = "insert into v_group_users "; + $sql = "insert into v_user_groups "; $sql .= "("; - $sql .= "group_user_uuid, "; + $sql .= "user_group_uuid, "; $sql .= "domain_uuid, "; $sql .= "group_uuid, "; $sql .= "group_name, "; @@ -81,7 +81,7 @@ } //redirect the user - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: groupmembers.php?group_uuid=".$group_uuid."&group_name=".$group_name); -?> \ No newline at end of file +?> diff --git a/core/groups/groupmemberdelete.php b/core/groups/groupmemberdelete.php index 8cfe4d5bae..1569829262 100644 --- a/core/groups/groupmemberdelete.php +++ b/core/groups/groupmemberdelete.php @@ -50,7 +50,7 @@ $group_uuid = check_str($_GET["group_uuid"]); //delete the group membership - $sql_delete = "delete from v_group_users "; + $sql_delete = "delete from v_user_groups "; $sql_delete .= "where user_uuid = '".$user_uuid."' "; $sql_delete .= "and group_uuid = '".$group_uuid."' "; if (!$db->exec($sql_delete)) { @@ -64,7 +64,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: groupmembers.php?group_uuid=".$group_uuid."&group_name=".$group_name); -?> \ No newline at end of file +?> diff --git a/core/groups/groupmembers.php b/core/groups/groupmembers.php index 5b80264b9d..ece52b7215 100644 --- a/core/groups/groupmembers.php +++ b/core/groups/groupmembers.php @@ -65,7 +65,7 @@ //define the if group members function function is_group_member($group_uuid, $user_uuid) { global $db, $domain_uuid; - $sql = "select * from v_group_users "; + $sql = "select * from v_user_groups "; $sql .= "where user_uuid = '".$user_uuid."' "; $sql .= "and group_uuid = '".$group_uuid."' "; $sql .= "and domain_uuid = '".(($domain_uuid != '') ? $domain_uuid : $_SESSION['domain_uuid'])."' "; @@ -92,17 +92,17 @@ } //get the groups users - $sql = "select u.user_uuid, u.username, gu.group_user_uuid, gu.domain_uuid, gu.group_uuid "; - $sql .= "from v_group_users as gu, v_users as u, v_domains as d "; - $sql .= "where gu.user_uuid = u.user_uuid "; - $sql .= "and gu.domain_uuid = d.domain_uuid "; + $sql = "select u.user_uuid, u.username, ug.user_group_uuid, ug.domain_uuid, ug.group_uuid "; + $sql .= "from v_user_groups as ug, v_users as u, v_domains as d "; + $sql .= "where ug.user_uuid = u.user_uuid "; + $sql .= "and ug.domain_uuid = d.domain_uuid "; if ($domain_uuid != '') { - $sql .= "and gu.domain_uuid = '".$domain_uuid."' "; + $sql .= "and ug.domain_uuid = '".$domain_uuid."' "; } if (!permission_exists('user_all')) { $sql .= "and u.domain_uuid = '".$_SESSION['domain_uuid']."' "; } - $sql .= "and gu.group_uuid = '".$group_uuid."' "; + $sql .= "and ug.group_uuid = '".$group_uuid."' "; $sql .= "order by d.domain_name asc, u.username asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); @@ -159,16 +159,15 @@ $count = 0; foreach ($result as &$row) { - $group_user_uuid = $row["group_user_uuid"]; $username = $row["username"]; $user_uuid = $row["user_uuid"]; $domain_uuid = $row["domain_uuid"]; $group_uuid = $row["group_uuid"]; $echo .= ""; if (permission_exists('user_all')) { - $echo .= "\n"; + $echo .= "\n"; } - $echo .= "\n"; + $echo .= "\n"; $echo .= "\n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } @@ -143,4 +143,4 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/menu/menu_delete.php b/core/menu/menu_delete.php index dad1e3dd6b..2de7b3f883 100644 --- a/core/menu/menu_delete.php +++ b/core/menu/menu_delete.php @@ -85,7 +85,7 @@ else { } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: menu.php"); return; diff --git a/core/menu/menu_edit.php b/core/menu/menu_edit.php index 8fcc59a53c..d44a8f88d4 100644 --- a/core/menu/menu_edit.php +++ b/core/menu/menu_edit.php @@ -112,7 +112,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $menu->restore(); //redirect the user back to the main menu - messages::add($text['message-add']); + message::add($text['message-add']); header("Location: menu.php"); return; } //if ($action == "add") @@ -128,7 +128,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //redirect the user back to the main menu - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: menu.php"); return; } //if ($action == "update") @@ -197,7 +197,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-name']."\n"; echo "\n"; echo "\n"; @@ -208,7 +208,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-language']."\n"; echo "\n"; echo "\n"; @@ -219,7 +219,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; @@ -227,7 +227,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; echo "\n"; @@ -402,12 +402,12 @@ else { echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; @@ -442,7 +442,7 @@ else { echo " \n"; foreach ($glyphicons as $glyphicon_class => $glyphicon_name) { $selected = ($menu_item_icon == $glyphicon_class) ? "selected" : null; - echo " \n"; + echo " \n"; } echo " \n"; echo " \n"; @@ -453,13 +453,13 @@ else { echo "
\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo "
\n"; - echo " \n"; + echo " \n"; echo " \n"; echo "
\n"; @@ -284,7 +284,7 @@ echo "
\n"; - echo " \n"; + echo " \n"; echo "
".$_SESSION['domains'][$domain_uuid]['domain_name']."".$_SESSION['domains'][$domain_uuid]['domain_name']."".$username."".$username.""; if (permission_exists('group_member_delete')) { $echo .= "".$v_link_label_delete.""; @@ -178,7 +177,7 @@ $c = ($c) ? 0 : 1; - $group_users[] = $row["user_uuid"]; + $user_groups[] = $row["user_uuid"]; $count++; } @@ -188,4 +187,5 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file + +?> diff --git a/core/groups/groups.php b/core/groups/groups.php index b432e0d6b7..973e70e9eb 100644 --- a/core/groups/groups.php +++ b/core/groups/groups.php @@ -62,7 +62,7 @@ $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); } //get the groups @@ -81,7 +81,7 @@ //get group counts - $sql = "select group_uuid, count(user_uuid) as group_count from v_group_users "; + $sql = "select group_uuid, count(user_uuid) as group_count from v_user_groups "; if (!permission_exists('user_all')) { $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; } diff --git a/core/groups/permissions_copy.php b/core/groups/permissions_copy.php index 5781cde481..57ff586637 100644 --- a/core/groups/permissions_copy.php +++ b/core/groups/permissions_copy.php @@ -115,7 +115,7 @@ unset ($prep_statement); //redirect the user - messages::add($text['message-copy']); + message::add($text['message-copy']); } //redirect diff --git a/core/groups/permissions_default.php b/core/groups/permissions_default.php index f6b9f421c6..1928ed95aa 100644 --- a/core/groups/permissions_default.php +++ b/core/groups/permissions_default.php @@ -51,7 +51,7 @@ //redirect the users if (!$included) { //show a message to the user - messages::add($text['message-restore']); + message::add($text['message-restore']); header("Location: groups.php"); return; } diff --git a/core/install/install.php b/core/install/install.php index e68cc6ed6c..86a596d1ef 100644 --- a/core/install/install.php +++ b/core/install/install.php @@ -28,7 +28,7 @@ require_once "root.php"; require_once "resources/functions.php"; require_once "resources/classes/text.php"; - require_once "resources/classes/messages.php"; + require_once "resources/classes/message.php"; //start a php session if (!isset($_SESSION)) { session_start(); } diff --git a/core/install/resources/classes/install_fusionpbx.php b/core/install/resources/classes/install_fusionpbx.php index b20f6c85ce..f271cac4e1 100644 --- a/core/install/resources/classes/install_fusionpbx.php +++ b/core/install/resources/classes/install_fusionpbx.php @@ -724,7 +724,7 @@ include "root.php"; unset($sql); } $this->write_progress("\tChecking if superuser is in the correct group"); - $sql = "select count(*) as count from v_group_users "; + $sql = "select count(*) as count from v_user_groups "; $sql .= "where domain_uuid = '".$this->global_settings->domain_uuid()."' "; $sql .= "and user_uuid = '".$this->admin_uuid."' "; $sql .= "and group_name = 'superadmin' "; @@ -735,9 +735,9 @@ include "root.php"; $row = $prep_statement->fetch(PDO::FETCH_ASSOC); if ($row['count'] == 0) { //add the user to the superadmin group - $sql = "insert into v_group_users "; + $sql = "insert into v_user_groups "; $sql .= "("; - $sql .= "group_user_uuid, "; + $sql .= "user_group_uuid, "; $sql .= "domain_uuid, "; $sql .= "user_uuid, "; $sql .= "group_name "; @@ -770,7 +770,7 @@ include "root.php"; $_SESSION['event_socket_password'] = $this->global_settings->switch_event_password(); //get the groups assigned to the user and then set the groups in $_SESSION["groups"] - $sql = "SELECT * FROM v_group_users "; + $sql = "SELECT * FROM v_user_groups "; $sql .= "where domain_uuid=:domain_uuid "; $sql .= "and user_uuid=:user_uuid "; $prep_statement = $this->dbh->prepare(check_sql($sql)); diff --git a/core/menu/app_menu.php b/core/menu/app_menu.php index 882c213143..2d826bc611 100644 --- a/core/menu/app_menu.php +++ b/core/menu/app_menu.php @@ -48,9 +48,10 @@ $apps[$x]['menu'][$y]['icon'] = "glyphicon-home"; $apps[$x]['menu'][$y]['path'] = ""; $apps[$x]['menu'][$y]['order'] = "5"; - $apps[$x]['menu'][$y]['groups'][] = "user"; - $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; + $apps[$x]['menu'][$y]['groups'][] = "admin"; + $apps[$x]['menu'][$y]['groups'][] = "user"; + $apps[$x]['menu'][$y]['groups'][] = "agent"; $y++; $apps[$x]['menu'][$y]['title']['en-us'] = "Accounts"; $apps[$x]['menu'][$y]['title']['ar-eg'] = ""; @@ -182,8 +183,9 @@ $apps[$x]['menu'][$y]['category'] = 'internal'; $apps[$x]['menu'][$y]['icon'] = "glyphicon-log-out"; $apps[$x]['menu'][$y]['path'] = '/logout.php'; - $apps[$x]['menu'][$y]['groups'][] = 'user'; - $apps[$x]['menu'][$y]['groups'][] = 'admin'; $apps[$x]['menu'][$y]['groups'][] = 'superadmin'; + $apps[$x]['menu'][$y]['groups'][] = 'admin'; + $apps[$x]['menu'][$y]['groups'][] = 'user'; + $apps[$x]['menu'][$y]['groups'][] = "agent"; ?> diff --git a/core/menu/menu.php b/core/menu/menu.php index 9d647732b8..4f576ddede 100644 --- a/core/menu/menu.php +++ b/core/menu/menu.php @@ -110,12 +110,12 @@ else { foreach($result as $row) { $tr_link = "href='menu_edit.php?id=".$row['menu_uuid']."'"; echo "
".$row['menu_name']."".$row['menu_language']."".$row['menu_description']." ".escape($row['menu_name'])."".escape($row['menu_language'])."".escape($row['menu_description'])." "; - echo "$v_link_label_edit"; - echo "$v_link_label_delete"; + echo "$v_link_label_edit"; + echo "$v_link_label_delete"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo "\n"; echo $text['description-name']."
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-language']."\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "
\n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; diff --git a/core/menu/menu_item_delete.php b/core/menu/menu_item_delete.php index d2f2b85aaf..86c330c14d 100644 --- a/core/menu/menu_item_delete.php +++ b/core/menu/menu_item_delete.php @@ -68,7 +68,7 @@ if (count($_GET)>0) { unset($sql); //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: menu_edit.php?id=".$menu_uuid); return; } diff --git a/core/menu/menu_item_edit.php b/core/menu/menu_item_edit.php index 71da7e1b09..e512b70011 100644 --- a/core/menu/menu_item_edit.php +++ b/core/menu/menu_item_edit.php @@ -51,7 +51,7 @@ else { $sql .= "where menu_item_group_uuid = '".$menu_item_group_uuid."' "; $db->exec(check_sql($sql)); //redirect the browser - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$menu_item_uuid."&menu_uuid=".$menu_uuid); return; } @@ -280,10 +280,10 @@ else { //set response message if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } //redirect the user @@ -394,7 +394,7 @@ else { echo " \n"; echo "
"; - echo " "; + echo " "; echo " \n"; echo "

"; echo "
".$text['label-title']."
".$text['label-link']."
\n"; echo ""; } } else { - echo " "; + echo " "; } echo " "; echo " "; @@ -471,10 +471,10 @@ else { echo "\n"; foreach($menu_items as $field) { if ($menu_item_parent_uuid == $field['menu_item_uuid']) { - echo "\n"; + echo "\n"; } else { - echo "\n"; + echo "\n"; } } echo ""; @@ -495,7 +495,7 @@ else { echo " \n"; if (permission_exists('group_member_delete') || if_group("superadmin")) { echo " "; - echo "".$v_link_label_delete.""; + echo "".$v_link_label_delete.""; echo " "; } echo "\n"; @@ -548,14 +548,14 @@ else { if ($menu_item_parent_uuid == "") { echo " "; echo " ".$text['label-menu_order'].""; - echo " "; + echo " "; echo " "; } } echo " "; echo " ".$text['label-description'].""; - echo " "; + echo " "; echo " "; if (permission_exists('menu_add') || permission_exists('menu_edit')) { @@ -567,10 +567,10 @@ else { echo " \n"; echo " "; if ($action == "update") { - echo " "; + echo " "; } - echo " "; - echo " "; + echo " "; + echo " "; echo "
"; echo " \n"; echo " "; diff --git a/core/menu/menu_item_move_down.php b/core/menu/menu_item_move_down.php index 7728001a95..099aca1e78 100644 --- a/core/menu/menu_item_move_down.php +++ b/core/menu/menu_item_move_down.php @@ -80,7 +80,7 @@ if (count($_GET)>0) { } //redirect the user - messages::add($text['message-moved_down']); + message::add($text['message-moved_down']); header("Location: menu_list.php?menu_item_id=".$menu_item_id); return; } diff --git a/core/menu/menu_item_move_up.php b/core/menu/menu_item_move_up.php index 9529c3cdc5..05a51579e1 100644 --- a/core/menu/menu_item_move_up.php +++ b/core/menu/menu_item_move_up.php @@ -67,7 +67,7 @@ if (count($_GET)>0) { } //redirect the user - messages::add($text['message-moved_up']); + message::add($text['message-moved_up']); header("Location: menu_list.php?menu_item_id=".$menu_item_id); return; } diff --git a/core/menu/menu_restore_default.php b/core/menu/menu_restore_default.php index 367e3c8161..f75d5db840 100644 --- a/core/menu/menu_restore_default.php +++ b/core/menu/menu_restore_default.php @@ -66,7 +66,7 @@ //redirect if (!$included) { //show a message to the user - messages::add($text['message-restore']); + message::add($text['message-restore']); header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".$menu_uuid); return; } diff --git a/core/notifications/notification_edit.php b/core/notifications/notification_edit.php index b9407192cd..a3688a604b 100644 --- a/core/notifications/notification_edit.php +++ b/core/notifications/notification_edit.php @@ -138,7 +138,7 @@ else { if ($response['result'] == 'submitted') { // set message - messages::add($text['message-demographics_submitted']); + message::add($text['message-demographics_submitted']); } header("Location: notification_edit.php"); @@ -196,7 +196,7 @@ else { } } // redirect - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: notification_edit.php"); exit; } @@ -208,7 +208,7 @@ else { ($project_notification_method == 'email' && $project_notification_recipient == '') ) { $_SESSION["postback"] = $_POST; - messages::add($text['message-invalid_recipient'], 'negative'); + message::add($text['message-invalid_recipient'], 'negative'); header("Location: notification_edit.php"); exit; } @@ -259,10 +259,10 @@ else { $project_events == 'false' && $project_news == 'false' ) { - messages::add($text['message-update']." - ".$text['message-no_channels'], 'alert'); + message::add($text['message-update']." - ".$text['message-no_channels'], 'alert'); } else { - messages::add($text['message-update']); + message::add($text['message-update']); } // redirect header("Location: notification_edit.php"); diff --git a/core/upgrade/index.php b/core/upgrade/index.php index f94671e0ea..f5480e2f9c 100644 --- a/core/upgrade/index.php +++ b/core/upgrade/index.php @@ -77,10 +77,10 @@ } chdir($cwd); if ($update_failed) { - messages::add($text['message-upgrade_source_failed'], 'negative', $message_timeout); + message::add($text['message-upgrade_source_failed'], 'negative', $message_timeout); } else { - messages::add($text['message-upgrade_source'], null, $message_timeout); + message::add($text['message-upgrade_source'], null, $message_timeout); } } @@ -90,7 +90,7 @@ require_once "resources/classes/schema.php"; $obj = new schema(); $_SESSION["response"]["schema"] = $obj->schema("html"); - messages::add($text['message-upgrade_schema'], null, $message_timeout); + message::add($text['message-upgrade_schema'], null, $message_timeout); } // process the apps defaults @@ -98,7 +98,7 @@ require_once "resources/classes/domains.php"; $domain = new domains; $domain->upgrade(); - messages::add($text['message-upgrade_apps'], null, $message_timeout); + message::add($text['message-upgrade_apps'], null, $message_timeout); } // restore defaults of the selected menu @@ -109,14 +109,14 @@ $included = true; require_once("core/menu/menu_restore_default.php"); unset($sel_menu); - messages::add($text['message-upgrade_menu'], null, $message_timeout); + message::add($text['message-upgrade_menu'], null, $message_timeout); } // restore default permissions if ($do["permissions"] && permission_exists("group_edit")) { $included = true; require_once("core/groups/permissions_default.php"); - messages::add($text['message-upgrade_permissions'], null, $message_timeout); + message::add($text['message-upgrade_permissions'], null, $message_timeout); } header("Location: ".PROJECT_PATH."/core/upgrade/index.php"); diff --git a/core/user_settings/app_languages.php b/core/user_settings/app_languages.php index f10dc221bf..ee9d528c01 100644 --- a/core/user_settings/app_languages.php +++ b/core/user_settings/app_languages.php @@ -761,26 +761,6 @@ $text['label-reset_password']['ru-ru'] = "Сброс пароля"; $text['label-reset_password']['sv-se'] = "Återställ Lösenord"; $text['label-reset_password']['uk-ua'] = "Скинути пароль"; -$text['label-reset_link']['en-us'] = "Password Reset Link"; -$text['label-reset_link']['ar-eg'] = " رابط اعادة تعيين كلمة السر"; -$text['label-reset_link']['de-at'] = "Link zum Zurücksetzen des Passworts"; //copied from de-de -$text['label-reset_link']['de-ch'] = "Link zum Zurücksetzen des Passworts"; //copied from de-de -$text['label-reset_link']['de-de'] = "Link zum Zurücksetzen des Passworts"; -$text['label-reset_link']['es-cl'] = "Password Reset Enlace"; -$text['label-reset_link']['es-mx'] = "Password Reset Enlace"; //copied from es-cl -$text['label-reset_link']['fr-ca'] = "Lien de réinitialisation du mot de passe"; //copied from fr-fr -$text['label-reset_link']['fr-fr'] = "Lien de réinitialisation du mot de passe"; -$text['label-reset_link']['he-il'] = "קישור לאיפוס סיסמה"; -$text['label-reset_link']['it-it'] = "Link per il Reset della Password"; -$text['label-reset_link']['nl-nl'] = ""; -$text['label-reset_link']['pl-pl'] = "Link do resetowania hasla"; -$text['label-reset_link']['pt-br'] = "Link para redefinir senha"; -$text['label-reset_link']['pt-pt'] = "Password Reset Link"; -$text['label-reset_link']['ro-ro'] = "Link resetare parolă"; -$text['label-reset_link']['ru-ru'] = "Ссылка для сброса пароля"; -$text['label-reset_link']['sv-se'] = "Länk för Återställning av Lösenord"; -$text['label-reset_link']['uk-ua'] = "Посилання на скидання пароля"; - $text['label-repeat_password']['en-us'] = "Repeat Password"; $text['label-repeat_password']['ar-eg'] = "تاكيد كلمة السر"; $text['label-repeat_password']['de-at'] = "Passwort wiederholen"; //copied from de-de diff --git a/core/user_settings/app_menu.php b/core/user_settings/app_menu.php index 301da4c71f..798f7f29f7 100644 --- a/core/user_settings/app_menu.php +++ b/core/user_settings/app_menu.php @@ -23,8 +23,9 @@ $apps[$x]['menu'][$y]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788"; $apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['path'] = "/core/user_settings/user_dashboard.php"; - $apps[$x]['menu'][$y]['groups'][] = "user"; - $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; + $apps[$x]['menu'][$y]['groups'][] = "admin"; + $apps[$x]['menu'][$y]['groups'][] = "user"; + $apps[$x]['menu'][$y]['groups'][] = "agent"; -?> \ No newline at end of file +?> diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 206132e61a..b2321574ff 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -72,7 +72,9 @@ echo " ".$text['header-user_dashboard']."
"; echo " \n"; echo " \n"; - echo " ".$text['label-welcome']." ".$_SESSION["username"].""; + if ($_SESSION['theme']['menu_style']['text'] != 'side') { + echo " ".$text['label-welcome']." ".$_SESSION["username"].""; + } echo " \n"; echo " \n"; echo " \n"; @@ -428,7 +430,7 @@ direction = 'inbound' or direction = 'local' ) - and bridge_uuid is null + and (missed_call = true or bridge_uuid is null) and destination_number in ('".implode("','",$assigned_extensions)."') and ("; $x = 0; diff --git a/core/users/app_config.php b/core/users/app_config.php index 1600d2781f..b84baca1c1 100644 --- a/core/users/app_config.php +++ b/core/users/app_config.php @@ -47,12 +47,36 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "user_groups"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "user_domain"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; $apps[$x]['permissions'][$y]['name'] = "user_all"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "user_import"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "user_group_view"; + $apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "user_group_add"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "user_group_edit"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "user_group_delete"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; + $y++; $apps[$x]['permissions'][$y]['name'] = "user_setting_view"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $apps[$x]['permissions'][$y]['groups'][] = "admin"; @@ -71,6 +95,10 @@ $y++; $apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + $apps[$x]['permissions'][$y]['name'] = "api_key"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $apps[$x]['permissions'][$y]['groups'][] = "admin"; //default settings $y=0; @@ -219,9 +247,71 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $y++; + $apps[$x]['db'][$y]['table']['name']['text'] = "v_user_groups"; + $apps[$x]['db'][$y]['table']['name']['deprecated'] = "v_group_users"; + $apps[$x]['db'][$y]['table']['parent'] = "v_users"; + $z=0; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "id"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_group_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "group_user_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name"; + $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid"; + $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'] = "group_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_groups"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "username"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true"; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_users"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "user_uuid"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $y++; $apps[$x]['db'][$y]['table']['name'] = "v_user_settings"; - $apps[$x]['db'][$y]['table']['parent'] = ""; + $apps[$x]['db'][$y]['table']['parent'] = "v_users"; $z=0; $apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_uuid"; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid"; @@ -234,6 +324,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_users"; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "user_uuid"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid"; diff --git a/core/users/app_defaults.php b/core/users/app_defaults.php index 5a613a80a5..16cac7aa37 100644 --- a/core/users/app_defaults.php +++ b/core/users/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -30,8 +30,32 @@ if ($domains_processed == 1) { $group = new groups; $group->defaults(); + //create the user view combines username, organization, contact first and last name + $db->exec("DROP VIEW view_users;"); + $sql = "CREATE VIEW view_users AS (\n"; + $sql .= " select u.domain_uuid, u.user_uuid, d.domain_name, u.username, u.user_enabled, u.add_date, \n"; + $sql .= " c.contact_uuid, c.contact_organization, c.contact_name_given, c.contact_name_family,\n"; + $sql .= " (\n"; + $sql .= " select\n"; + $sql .= " string_agg(g.group_name, ', ')\n"; + $sql .= " from\n"; + $sql .= " v_user_groups as ug,\n"; + $sql .= " v_groups as g\n"; + $sql .= " where\n"; + $sql .= " ug.group_uuid = g.group_uuid\n"; + $sql .= " and u.user_uuid = ug.user_uuid\n"; + $sql .= " ) AS groups\n"; + $sql .= " from v_contacts as c\n"; + $sql .= " right join v_users u on u.contact_uuid = c.contact_uuid\n"; + $sql .= " inner join v_domains as d on d.domain_uuid = u.domain_uuid\n"; + $sql .= " where 1 = 1\n"; + $sql .= " order by u.username asc\n"; + $sql .= ");\n"; + $db->exec($sql); + unset($sql); + //find rows that have a null group_uuid and set the correct group_uuid - $sql = "select * from v_group_users "; + $sql = "select * from v_user_groups "; $sql .= "where group_uuid is null; "; $prep_statement = $db->prepare(check_sql($sql)); if ($prep_statement) { @@ -48,10 +72,10 @@ if ($domains_processed == 1) { $sub_result = $prep_statement_sub->fetch(PDO::FETCH_ASSOC); unset ($prep_statement_sub); $group_uuid = $sub_result['group_uuid']; - //set the group_uuid - $sql = "update v_group_users set "; + //set the user_group_uuid + $sql = "update v_user_groups set "; $sql .= "group_uuid = '".$group_uuid."' "; - $sql .= "where group_user_uuid = '".$row['group_user_uuid']."'; "; + $sql .= "where user_group_uuid = '".$row['user_group_uuid']."'; "; $db->exec($sql); unset($sql); } @@ -60,6 +84,52 @@ if ($domains_processed == 1) { unset ($prep_statement); } + //insert default password reset email template + if (file_exists($_SERVER['DOCUMENT_ROOT'].'/app/email_templates')) { + //build the array + $x = 0; + $array['email_templates'][$x]['email_template_uuid'] = '05b529c4-fba7-4071-bab3-143b076392e7'; + $array['email_templates'][$x]['template_language'] = 'en-us'; + $array['email_templates'][$x]['template_category'] = 'password_reset'; + $array['email_templates'][$x]['template_subcategory'] = 'default'; + $array['email_templates'][$x]['template_subject'] = 'Password Reset'; + $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_body'] .= "

\n"; + $array['email_templates'][$x]['template_body'] .= "A password reset was just requested for the FusionPBX user account associated with this email address.

\n"; + $array['email_templates'][$x]['template_body'] .= "If you submitted this request, click the button below to begin the password reset process for your user account.

"; + $array['email_templates'][$x]['template_body'] .= "\${reset_button}

\n"; + $array['email_templates'][$x]['template_body'] .= "If you did not initiate this action, however, please ignore this message and your password will remain unchanged.\n"; + $array['email_templates'][$x]['template_body'] .= "If you have questions or concerns regarding this email, please contact your system administrator."; + $array['email_templates'][$x]['template_body'] .= "


\n"; + $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_body'] .= "FusionPBX
\n"; + $array['email_templates'][$x]['template_body'] .= "\${domain}\n"; + $array['email_templates'][$x]['template_body'] .= "


\n"; + $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_body'] .= "\n"; + $array['email_templates'][$x]['template_type'] = 'html'; + $array['email_templates'][$x]['template_enabled'] = 'true'; + $array['email_templates'][$x]['template_description'] = 'Default password reset email template.'; + $x++; + + //add the temporary permission + $p = new permissions; + $p->add("email_template_add", 'temp'); + $p->add("email_template_edit", 'temp'); + + //save to the data + $database = new database; + $database->app_name = 'email_templates'; + $database->app_uuid = '8173e738-2523-46d5-8943-13883befd2fd'; + $database->save($array); + unset($array); + + //remove the temporary permission + $p->delete("email_template_add", 'temp'); + $p->delete("email_template_edit", 'temp'); + } + } -?> \ No newline at end of file +?> diff --git a/core/users/app_languages.php b/core/users/app_languages.php index e854da1e0a..92afc7396a 100644 --- a/core/users/app_languages.php +++ b/core/users/app_languages.php @@ -271,7 +271,7 @@ $text['message-username_exists']['es-mx'] = "Ya existe Nombre de usuario"; //cop $text['message-username_exists']['fr-ca'] = "Le nom d'utilisateur existe déjà"; //copied from fr-fr $text['message-username_exists']['fr-fr'] = "Le nom d'utilisateur existe déjà"; $text['message-username_exists']['he-il'] = "שם משתמש כבר קיים"; -$text['message-username_exists']['it-it'] = "Lo username esiste già"; +$text['message-username_exists']['it-it'] = "Lo username Ãesiste giÃ"; $text['message-username_exists']['nl-nl'] = ""; $text['message-username_exists']['pl-pl'] = "Nazwa użytkownika już istnieje"; $text['message-username_exists']['pt-br'] = "Nome de usuário já existe"; //copied from pt-pt @@ -401,6 +401,66 @@ $text['message-cannot_delete_own_account']['ru-ru'] = "Вы не можете у $text['message-cannot_delete_own_account']['sv-se'] = "Du kan inte ta bort ditt egna användarkonto. Logga in som en annan användare och försök igen."; $text['message-cannot_delete_own_account']['uk-ua'] = "Ви не можете видалити власний обліковий запис. Будь ласка, увійдіть під іншим користувачем, потім повторіть спробу."; +$text['message-invalid_user']['en-us'] = "Invalid User"; +$text['message-invalid_user']['ar-eg'] = "Invalid User"; +$text['message-invalid_user']['de-at'] = "Invalid User"; +$text['message-invalid_user']['de-ch'] = "Invalid User"; +$text['message-invalid_user']['de-de'] = "Invalid User"; +$text['message-invalid_user']['es-cl'] = "Invalid User"; +$text['message-invalid_user']['es-mx'] = "Invalid User"; +$text['message-invalid_user']['fr-ca'] = "Invalid User"; +$text['message-invalid_user']['fr-fr'] = "Invalid User"; +$text['message-invalid_user']['he-il'] = "Invalid User"; +$text['message-invalid_user']['it-it'] = "Invalid User"; +$text['message-invalid_user']['nl-nl'] = "Invalid User"; +$text['message-invalid_user']['pl-pl'] = "Invalid User"; +$text['message-invalid_user']['pt-br'] = "Invalid User"; +$text['message-invalid_user']['pt-pt'] = "Invalid User"; +$text['message-invalid_user']['ro-ro'] = "Invalid User"; +$text['message-invalid_user']['ru-ru'] = "Invalid User"; +$text['message-invalid_user']['sv-se'] = "Invalid User"; +$text['message-invalid_user']['uk-ua'] = "Invalid User"; + +$text['message-unsaved_changes']['en-us'] = "Unsaved Changes"; +$text['message-unsaved_changes']['ar-eg'] = "Unsaved Changes"; +$text['message-unsaved_changes']['de-at'] = "Unsaved Changes"; +$text['message-unsaved_changes']['de-ch'] = "Unsaved Changes"; +$text['message-unsaved_changes']['de-de'] = "Unsaved Changes"; +$text['message-unsaved_changes']['es-cl'] = "Unsaved Changes"; +$text['message-unsaved_changes']['es-mx'] = "Unsaved Changes"; +$text['message-unsaved_changes']['fr-ca'] = "Unsaved Changes"; +$text['message-unsaved_changes']['fr-fr'] = "Unsaved Changes"; +$text['message-unsaved_changes']['he-il'] = "Unsaved Changes"; +$text['message-unsaved_changes']['it-it'] = "Unsaved Changes"; +$text['message-unsaved_changes']['nl-nl'] = "Unsaved Changes"; +$text['message-unsaved_changes']['pl-pl'] = "Unsaved Changes"; +$text['message-unsaved_changes']['pt-br'] = "Unsaved Changes"; +$text['message-unsaved_changes']['pt-pt'] = "Unsaved Changes"; +$text['message-unsaved_changes']['ro-ro'] = "Unsaved Changes"; +$text['message-unsaved_changes']['ru-ru'] = "Unsaved Changes"; +$text['message-unsaved_changes']['sv-se'] = "Unsaved Changes"; +$text['message-unsaved_changes']['uk-ua'] = "Unsaved Changes"; + +$text['message-green_border_passwords_match']['en-us'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['ar-eg'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['de-at'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['de-ch'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['de-de'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['es-cl'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['es-mx'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['fr-ca'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['fr-fr'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['he-il'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['it-it'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['nl-nl'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['pl-pl'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['pt-br'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['pt-pt'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['ro-ro'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['ru-ru'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['sv-se'] = "Green field borders indicate typed passwords match."; +$text['message-green_border_passwords_match']['uk-ua'] = "Green field borders indicate typed passwords match."; + $text['label-web_fonts']['en-us'] = "Web Fonts"; $text['label-web_fonts']['ar-eg'] = "الخطوط على شبكة الإنترنت"; $text['label-web_fonts']['de-at'] = "Web Fonts"; //copied from de-de @@ -921,6 +981,26 @@ $text['label-group']['ru-ru'] = "Группа"; $text['label-group']['sv-se'] = "Grupp"; $text['label-group']['uk-ua'] = "Група"; +$text['label-organization']['en-us'] = "Organization"; +$text['label-organization']['ar-eg'] = ""; +$text['label-organization']['de-at'] = "Organisation"; //copied from de-de +$text['label-organization']['de-ch'] = "Organisation"; //copied from de-de +$text['label-organization']['de-de'] = "Organisation"; +$text['label-organization']['es-cl'] = "Organización"; +$text['label-organization']['es-mx'] = "Organización"; //copied from es-cl +$text['label-organization']['fr-ca'] = "Organisation"; //copied from fr-fr +$text['label-organization']['fr-fr'] = "Organisation"; +$text['label-organization']['he-il'] = ""; +$text['label-organization']['it-it'] = "Organizzazione"; +$text['label-organization']['nl-nl'] = ""; +$text['label-organization']['pl-pl'] = ""; +$text['label-organization']['pt-br'] = "Organização"; //copied from pt-pt +$text['label-organization']['pt-pt'] = "Organização"; +$text['label-organization']['ro-ro'] = ""; +$text['label-organization']['ru-ru'] = "Организация"; +$text['label-organization']['sv-se'] = "Organisation"; +$text['label-organization']['uk-ua'] = ""; + $text['label-global']['en-us'] = "Global"; $text['label-global']['ar-eg'] = ""; $text['label-global']['de-at'] = "Global"; //copied from de-de @@ -1101,6 +1181,106 @@ $text['label-characters']['ru-ru'] = "символов"; $text['label-characters']['sv-se'] = "Tecken"; $text['label-characters']['uk-ua'] = "персонажі"; +$text['label-required']['en-us'] = "Required"; +$text['label-required']['ar-eg'] = "Required"; +$text['label-required']['de-at'] = "Required"; +$text['label-required']['de-ch'] = "Required"; +$text['label-required']['de-de'] = "Required"; +$text['label-required']['es-cl'] = "Required"; +$text['label-required']['es-mx'] = "Required"; +$text['label-required']['fr-ca'] = "Required"; +$text['label-required']['fr-fr'] = "Required"; +$text['label-required']['he-il'] = "Required"; +$text['label-required']['it-it'] = "Required"; +$text['label-required']['nl-nl'] = "Required"; +$text['label-required']['pl-pl'] = "Required"; +$text['label-required']['pt-br'] = "Required"; +$text['label-required']['pt-pt'] = "Required"; +$text['label-required']['ro-ro'] = "Required"; +$text['label-required']['ru-ru'] = "Required"; +$text['label-required']['sv-se'] = "Required"; +$text['label-required']['uk-ua'] = "Required"; + +$text['label-number']['en-us'] = "Number"; +$text['label-number']['ar-eg'] = "Number"; +$text['label-number']['de-at'] = "Number"; +$text['label-number']['de-ch'] = "Number"; +$text['label-number']['de-de'] = "Number"; +$text['label-number']['es-cl'] = "Number"; +$text['label-number']['es-mx'] = "Number"; +$text['label-number']['fr-ca'] = "Number"; +$text['label-number']['fr-fr'] = "Number"; +$text['label-number']['he-il'] = "Number"; +$text['label-number']['it-it'] = "Number"; +$text['label-number']['nl-nl'] = "Number"; +$text['label-number']['pl-pl'] = "Number"; +$text['label-number']['pt-br'] = "Number"; +$text['label-number']['pt-pt'] = "Number"; +$text['label-number']['ro-ro'] = "Number"; +$text['label-number']['ru-ru'] = "Number"; +$text['label-number']['sv-se'] = "Number"; +$text['label-number']['uk-ua'] = "Number"; + +$text['label-lowercase']['en-us'] = "Lowercase"; +$text['label-lowercase']['ar-eg'] = "Lowercase"; +$text['label-lowercase']['de-at'] = "Lowercase"; +$text['label-lowercase']['de-ch'] = "Lowercase"; +$text['label-lowercase']['de-de'] = "Lowercase"; +$text['label-lowercase']['es-cl'] = "Lowercase"; +$text['label-lowercase']['es-mx'] = "Lowercase"; +$text['label-lowercase']['fr-ca'] = "Lowercase"; +$text['label-lowercase']['fr-fr'] = "Lowercase"; +$text['label-lowercase']['he-il'] = "Lowercase"; +$text['label-lowercase']['it-it'] = "Lowercase"; +$text['label-lowercase']['nl-nl'] = "Lowercase"; +$text['label-lowercase']['pl-pl'] = "Lowercase"; +$text['label-lowercase']['pt-br'] = "Lowercase"; +$text['label-lowercase']['pt-pt'] = "Lowercase"; +$text['label-lowercase']['ro-ro'] = "Lowercase"; +$text['label-lowercase']['ru-ru'] = "Lowercase"; +$text['label-lowercase']['sv-se'] = "Lowercase"; +$text['label-lowercase']['uk-ua'] = "Lowercase"; + +$text['label-uppercase']['en-us'] = "Uppercase"; +$text['label-uppercase']['ar-eg'] = "Uppercase"; +$text['label-uppercase']['de-at'] = "Uppercase"; +$text['label-uppercase']['de-ch'] = "Uppercase"; +$text['label-uppercase']['de-de'] = "Uppercase"; +$text['label-uppercase']['es-cl'] = "Uppercase"; +$text['label-uppercase']['es-mx'] = "Uppercase"; +$text['label-uppercase']['fr-ca'] = "Uppercase"; +$text['label-uppercase']['fr-fr'] = "Uppercase"; +$text['label-uppercase']['he-il'] = "Uppercase"; +$text['label-uppercase']['it-it'] = "Uppercase"; +$text['label-uppercase']['nl-nl'] = "Uppercase"; +$text['label-uppercase']['pl-pl'] = "Uppercase"; +$text['label-uppercase']['pt-br'] = "Uppercase"; +$text['label-uppercase']['pt-pt'] = "Uppercase"; +$text['label-uppercase']['ro-ro'] = "Uppercase"; +$text['label-uppercase']['ru-ru'] = "Uppercase"; +$text['label-uppercase']['sv-se'] = "Uppercase"; +$text['label-uppercase']['uk-ua'] = "Uppercase"; + +$text['label-special']['en-us'] = "Special"; +$text['label-special']['ar-eg'] = "Special"; +$text['label-special']['de-at'] = "Special"; +$text['label-special']['de-ch'] = "Special"; +$text['label-special']['de-de'] = "Special"; +$text['label-special']['es-cl'] = "Special"; +$text['label-special']['es-mx'] = "Special"; +$text['label-special']['fr-ca'] = "Special"; +$text['label-special']['fr-fr'] = "Special"; +$text['label-special']['he-il'] = "Special"; +$text['label-special']['it-it'] = "Special"; +$text['label-special']['nl-nl'] = "Special"; +$text['label-special']['pl-pl'] = "Special"; +$text['label-special']['pt-br'] = "Special"; +$text['label-special']['pt-pt'] = "Special"; +$text['label-special']['ro-ro'] = "Special"; +$text['label-special']['ru-ru'] = "Special"; +$text['label-special']['sv-se'] = "Special"; +$text['label-special']['uk-ua'] = "Special"; + $text['label-center']['en-us'] = "Center"; $text['label-center']['ar-eg'] = "مركز"; $text['label-center']['de-at'] = "Mitte"; //copied from de-de @@ -1161,6 +1341,26 @@ $text['label-api_key']['ru-ru'] = "Ключ API"; $text['label-api_key']['sv-se'] = "API Nyckel"; $text['label-api_key']['uk-ua'] = "Ключ API"; +$text['label-message_key']['en-us'] = "Message Key"; +$text['label-message_key']['ar-eg'] = ""; +$text['label-message_key']['de-at'] = "Message Schlüssel"; //copied from de-de +$text['label-message_key']['de-ch'] = "Message Schlüssel"; //copied from de-de +$text['label-message_key']['de-de'] = "Message Schlüssel"; +$text['label-message_key']['es-cl'] = "Message Key"; +$text['label-message_key']['es-mx'] = "Message Key"; //copied from es-cl +$text['label-message_key']['fr-ca'] = "Clé d'Message"; //copied from fr-fr +$text['label-message_key']['fr-fr'] = "Clé d'Message"; +$text['label-message_key']['he-il'] = ""; +$text['label-message_key']['it-it'] = "Message Key"; +$text['label-message_key']['nl-nl'] = ""; +$text['label-message_key']['pl-pl'] = "Klucz Message"; +$text['label-message_key']['pt-br'] = "Message Key"; //copied from pt-pt +$text['label-message_key']['pt-pt'] = "Message Key"; +$text['label-message_key']['ro-ro'] = ""; +$text['label-message_key']['ru-ru'] = "Ключ Message"; +$text['label-message_key']['sv-se'] = "Message Nyckel"; +$text['label-message_key']['uk-ua'] = "Ключ Message"; + $text['label-additional_info']['en-us'] = "Additional Info"; $text['label-additional_info']['ar-eg'] = ""; $text['label-additional_info']['de-at'] = "Zusätzliche Information"; //copied from de-de @@ -1541,7 +1741,7 @@ $text['description-contact']['ru-ru'] = "Назначить контакт дл $text['description-contact']['sv-se'] = "Tilldela en kontakt till detta konto."; $text['description-contact']['uk-ua'] = "Призначити контакт в цей обліковий запис користувача."; -$text['description-api_key']['en-us'] = "Enter the API key is often a UUID. The API key should be 128 bit or greater."; +$text['description-api_key']['en-us'] = "Use the generate button to create a 128 bit key."; $text['description-api_key']['ar-eg'] = ""; $text['description-api_key']['de-at'] = "Geben Sie den API Schlüssel an. Der API Schlüssel sollte mindestens 128 bit oder länger sein."; //copied from de-de $text['description-api_key']['de-ch'] = "Geben Sie den API Schlüssel an. Der API Schlüssel sollte mindestens 128 bit oder länger sein."; //copied from de-de @@ -1561,6 +1761,26 @@ $text['description-api_key']['ru-ru'] = "Введите ключ API (обычн $text['description-api_key']['sv-se'] = "Ange API nyckel (ofta UUID). API nyckeln borde vara 128 bit eller mer."; $text['description-api_key']['uk-ua'] = "Введіть ключ API, зазвичай UUID. Ключ API повинен бути 128 біт або більше."; +$text['description-message_key']['en-us'] = "Use the generate button to create a 128 bit key."; +$text['description-message_key']['ar-eg'] = ""; +$text['description-message_key']['de-at'] = "Geben Sie den API Schlüssel an. Der API Schlüssel sollte mindestens 128 bit oder länger sein."; //copied from de-de +$text['description-message_key']['de-ch'] = "Geben Sie den API Schlüssel an. Der API Schlüssel sollte mindestens 128 bit oder länger sein."; //copied from de-de +$text['description-message_key']['de-de'] = "Geben Sie den API Schlüssel an. Der API Schlüssel sollte mindestens 128 bit oder länger sein."; +$text['description-message_key']['es-cl'] = "Indique la API key."; +$text['description-message_key']['es-mx'] = "Indique la API key."; //copied from es-cl +$text['description-message_key']['fr-ca'] = "Entrez la clé d'API. Il s'agit souvent d'un identifiant universel unique (UUID). La clé devrait faire 128 bits ou plus de longueur."; //copied from fr-fr +$text['description-message_key']['fr-fr'] = "Entrez la clé d'API. Il s'agit souvent d'un identifiant universel unique (UUID). La clé devrait faire 128 bits ou plus de longueur."; +$text['description-message_key']['he-il'] = ""; +$text['description-message_key']['it-it'] = "Inserisci la API key, spesso è un UUID. L'API key dovrebbe essere 128 bit o più."; +$text['description-message_key']['nl-nl'] = ""; +$text['description-message_key']['pl-pl'] = "Wprowadź klucz API, który jest często UUID. Klucz API powinien być 128 bitowy lub lepszy."; +$text['description-message_key']['pt-br'] = ""; +$text['description-message_key']['pt-pt'] = ""; +$text['description-message_key']['ro-ro'] = ""; +$text['description-message_key']['ru-ru'] = "Введите ключ API (обычно UUID). Ключ API должен быть 128 бит или больше."; +$text['description-message_key']['sv-se'] = "Ange API nyckel (ofta UUID). API nyckeln borde vara 128 bit eller mer."; +$text['description-message_key']['uk-ua'] = "Введіть ключ API, зазвичай UUID. Ключ API повинен бути 128 біт або більше."; + $text['confirm-delete']['en-us'] = "Do you really want to delete this?"; $text['confirm-delete']['ar-eg'] = ""; $text['confirm-delete']['de-at'] = "Wollen Sie das wirklich löschen?"; //copied from de-de diff --git a/core/users/app_menu.php b/core/users/app_menu.php index 7857795a35..b36ef14178 100644 --- a/core/users/app_menu.php +++ b/core/users/app_menu.php @@ -48,8 +48,9 @@ $apps[$x]['menu'][$y]['parent_uuid'] = "02194288-6d56-6d3e-0b1a-d53a2bc10788"; $apps[$x]['menu'][$y]['category'] = "internal"; $apps[$x]['menu'][$y]['path'] = "/core/users/user_edit.php?id=user"; - $apps[$x]['menu'][$y]['groups'][] = "user"; - $apps[$x]['menu'][$y]['groups'][] = "admin"; $apps[$x]['menu'][$y]['groups'][] = "superadmin"; + $apps[$x]['menu'][$y]['groups'][] = "admin"; + $apps[$x]['menu'][$y]['groups'][] = "user"; + $apps[$x]['menu'][$y]['groups'][] = "agent"; ?> diff --git a/core/users/user_delete.php b/core/users/user_delete.php index 110f313cfc..d4a5ac4e80 100644 --- a/core/users/user_delete.php +++ b/core/users/user_delete.php @@ -83,7 +83,7 @@ } //delete the groups the user is assigned to - $sql = "delete from v_group_users "; + $sql = "delete from v_user_groups "; $sql .= "where user_uuid = '".$user_uuid."' "; $sql .= "and domain_uuid = '".$domain_uuid."' "; if (!$db->exec($sql)) { @@ -102,7 +102,7 @@ } //redirect the user - messages::add($text['message-delete']); + message::add($text['message-delete']); header("Location: users.php"); -?> \ No newline at end of file +?> diff --git a/core/users/user_edit.php b/core/users/user_edit.php index c28cf4bd84..31e1a32401 100644 --- a/core/users/user_edit.php +++ b/core/users/user_edit.php @@ -35,21 +35,19 @@ $text = $language->get(); //get user uuid - if ( - (is_uuid($_REQUEST["id"]) && permission_exists('user_edit')) || - (is_uuid($_REQUEST["id"]) && $_REQUEST["id"] == $_SESSION['user_uuid']) - ) { + if ((is_uuid($_REQUEST["id"]) && permission_exists('user_edit')) || + (is_uuid($_REQUEST["id"]) && $_REQUEST["id"] == $_SESSION['user_uuid'])) { $user_uuid = check_str($_REQUEST["id"]); $action = 'edit'; } - else if (permission_exists('user_add') && $_REQUEST["id"] == '') { + elseif (permission_exists('user_add') && !isset($_REQUEST["id"])) { $user_uuid = uuid(); $action = 'add'; } else { // load users own account - header("Location: user_edit.php?id=".$_SESSION['user_uuid']); - exit; + header("Location: user_edit.php?id=".$_SESSION['user_uuid']); + exit; } //get total user count from the database, check limit, if defined @@ -63,7 +61,7 @@ } unset($prep_statement, $row); if ($total_users >= $_SESSION['limit']['users']['numeric']) { - messages::add($text['message-maximum_users'].' '.$_SESSION['limit']['users']['numeric'], 'negative'); + message::add($text['message-maximum_users'].' '.$_SESSION['limit']['users']['numeric'], 'negative'); header('Location: users.php'); exit; } @@ -83,128 +81,146 @@ //delete the group from the user if ($_GET["a"] == "delete" && permission_exists("user_delete")) { //set the variables - $group_uuid = check_str($_GET["group_uuid"]); + $group_uuid = $_GET["group_uuid"]; //delete the group from the users - $sql = "delete from v_group_users "; - $sql .= "where group_uuid = '".$group_uuid."' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $db->exec(check_sql($sql)); + if (is_uuid($group_uuid) && is_uuid($user_uuid)) { + $sql = "delete from v_user_groups "; + $sql .= "where group_uuid = '".$group_uuid."' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $db->exec(check_sql($sql)); + } //redirect the user - messages::add($text['message-update']); - header("Location: user_edit.php?id=".$user_uuid); + message::add($text['message-update']); + if (is_uuid($user_uuid)) { + header("Location: user_edit.php?id=".$user_uuid); + } return; } -if (count($_POST) > 0 && $_POST["persistform"] != "1") { +//retrieve password requirements + $required['length'] = $_SESSION['user']['password_length']['numeric']; + $required['number'] = ($_SESSION['user']['password_number']['boolean'] == 'true') ? true : false; + $required['lowercase'] = ($_SESSION['user']['password_lowercase']['boolean'] == 'true') ? true : false; + $required['uppercase'] = ($_SESSION['user']['password_uppercase']['boolean'] == 'true') ? true : false; + $required['special'] = ($_SESSION['user']['password_special']['boolean'] == 'true') ? true : false; - //get the HTTP values and set as variables - if (permission_exists('user_edit') && $action == 'edit') { - $user_uuid = $_REQUEST["id"]; - $username_old = check_str($_POST["username_old"]); - } - $domain_uuid = check_str($_POST["domain_uuid"]); - $username = check_str($_POST["username"]); - $password = check_str($_POST["password"]); - $password_confirm = check_str($_POST["password_confirm"]); - $user_status = check_str($_POST["user_status"]); - $user_language = check_str($_POST["user_language"]); - $user_time_zone = check_str($_POST["user_time_zone"]); - if (permission_exists('user_edit') && $action == 'edit') { - $contact_uuid = check_str($_POST["contact_uuid"]); - } - else if (permission_exists('user_add') && $action == 'add') { - $user_email = check_str($_POST["user_email"]); - $contact_organization = check_str($_POST["contact_organization"]); - $contact_name_given = check_str($_POST["contact_name_given"]); - $contact_name_family = check_str($_POST["contact_name_family"]); - } - $group_uuid_name = check_str($_POST["group_uuid_name"]); - $user_enabled = check_str($_POST["user_enabled"]); - $api_key = check_str($_POST["api_key"]); +//prepare the data + if (count($_POST) > 0) { - //check required values - if ($username == '') { $msg_error = $text['message-required'].$text['label-username']; } - if (permission_exists('user_edit') && $action == 'edit') { - if ($username != $username_old && $username != '') { - $sql = "select count(*) as num_rows from v_users where username = '".$username."'"; - if ($_SESSION["user"]["unique"]["text"] != "global"){ - $sql .= " and domain_uuid = '".$domain_uuid."'"; - } - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if (0 < $row['num_rows']) { - $msg_error = $text['message-username_exists']; + //get the HTTP values and set as variables + if (permission_exists('user_edit') && $action == 'edit') { + $user_uuid = $_REQUEST["id"]; + $username_old = check_str($_POST["username_old"]); + } + $domain_uuid = check_str($_POST["domain_uuid"]); + $username = check_str($_POST["username"]); + $password = check_str($_POST["password"]); + $password_confirm = check_str($_POST["password_confirm"]); + $user_status = check_str($_POST["user_status"]); + $user_language = check_str($_POST["user_language"]); + $user_time_zone = check_str($_POST["user_time_zone"]); + if (permission_exists('user_edit') && $action == 'edit') { + $contact_uuid = check_str($_POST["contact_uuid"]); + } + else if (permission_exists('user_add') && $action == 'add') { + $user_email = check_str($_POST["user_email"]); + $contact_organization = check_str($_POST["contact_organization"]); + $contact_name_given = check_str($_POST["contact_name_given"]); + $contact_name_family = check_str($_POST["contact_name_family"]); + } + $group_uuid_name = check_str($_POST["group_uuid_name"]); + $user_enabled = check_str($_POST["user_enabled"]); + $api_key = check_str($_POST["api_key"]); + if (permission_exists('message_view')) { + $message_key = check_str($_POST["message_key"]); + } + + //check required values + if ($username == '') { + message::add($text['message-required'].$text['label-username'], 'negative', 7500); + } + if (permission_exists('user_edit') && $action == 'edit') { + if ($username != $username_old && $username != '') { + $sql = "select count(*) as num_rows from v_users where username = '".$username."'"; + if ($_SESSION["user"]["unique"]["text"] != "global"){ + $sql .= " and domain_uuid = '".$domain_uuid."'"; + } + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if (0 < $row['num_rows']) { + message::add($text['message-username_exists'], 'negative', 7500); + } } - } - unset($sql); - } - } - if ($password != '' && $password != $password_confirm) { $msg_error = $text['message-password_mismatch']; } - if (permission_exists('user_add') && $action == 'add') { - if ($password == '') { $msg_error = $text['message-password_blank']; } - if ($user_email == '') { $msg_error = $text['message-required'].$text['label-email']; } - if ($group_uuid_name == '') { $msg_error = $text['message-required'].$text['label-group']; } - } - - if ($msg_error != '') { - messages::add($msg_error, 'negative'); - if ($action == 'edit') { - header("Location: user_edit.php?id=".$user_uuid); - } - else { - header("Location: user_edit.php"); - } - exit; - } - - if (!check_password_strength($password, $text, 'user')) { - if ($action == 'edit') { - header("Location: user_edit.php?id=".$user_uuid); - } - else { - header("Location: user_edit.php"); - } - exit; - } - - //set initial array indexes - $i = $n = $x = $c = 0; - - //check to see if user language is set - $sql = "select user_setting_uuid, user_setting_value from v_user_settings "; - $sql .= "where user_setting_category = 'domain' "; - $sql .= "and user_setting_subcategory = 'language' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['user_setting_uuid'] == '' && $user_language != '') { - //add user setting to array for insert - $array['user_settings'][$i]['user_setting_uuid'] = uuid(); - $array['user_settings'][$i]['user_uuid'] = $user_uuid; - $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; - $array['user_settings'][$i]['user_setting_category'] = 'domain'; - $array['user_settings'][$i]['user_setting_subcategory'] = 'language'; - $array['user_settings'][$i]['user_setting_name'] = 'code'; - $array['user_settings'][$i]['user_setting_value'] = $user_language; - $array['user_settings'][$i]['user_setting_enabled'] = 'true'; - $i++; - } - else { - if ($row['user_setting_value'] == '' || $user_language == '') { - $sql = "delete from v_user_settings "; - $sql .= "where user_setting_category = 'domain' "; - $sql .= "and user_setting_subcategory = 'language' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $db->exec(check_sql($sql)); unset($sql); } - else { - //add user setting to array for update - $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + } + if ($password != '' && $password != $password_confirm) { + message::add($text['message-password_mismatch'], 'negative', 7500); + } + if (permission_exists('user_add') && $action == 'add') { + if ($password == '') { + message::add($text['message-password_blank'], 'negative', 7500); + } + if ($user_email == '') { + message::add($text['message-required'].$text['label-email'], 'negative', 7500); + } + if ($group_uuid_name == '') { + message::add($text['message-required'].$text['label-group'], 'negative', 7500); + } + } + + if (strlen($password) > 0) { + if (is_numeric($required['length']) && $required['length'] != 0) { + if (strlen($password) < $required['length']) { + message::add($text['message-required'].$text['label-characters'], 'negative', 7500); + } + } + if ($required['number']) { + if (!preg_match('/(?=.*[\d])/', $password)) { + message::add($text['message-required'].$text['label-numbers'], 'negative', 7500); + } + } + if ($required['lowercase']) { + if (!preg_match('/(?=.*[a-z])/', $password)) { + message::add($text['message-required'].$text['label-lowercase_letters'], 'negative', 7500); + } + } + if ($required['uppercase']) { + if (!preg_match('/(?=.*[A-Z])/', $password)) { + message::add($text['message-required'].$text['label-uppercase_letters'], 'negative', 7500); + } + } + if ($required['special']) { + if (!preg_match('/(?=.*[\W])/', $password)) { + message::add($text['message-required'].$text['label-special_characters'], 'negative', 7500); + } + } + } + + //return if error + if (message::count() != 0) { + $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user'] = $_POST; + header("Location: user_edit.php".(permission_exists('user_edit') && $action != 'add' ? "?id=".$user_uuid : null)); + exit; + } + + //save the data + $i = $n = $x = $c = 0; //set initial array indexes + + //check to see if user language is set + $sql = "select user_setting_uuid, user_setting_value from v_user_settings "; + $sql .= "where user_setting_category = 'domain' "; + $sql .= "and user_setting_subcategory = 'language' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['user_setting_uuid'] == '' && $user_language != '') { + //add user setting to array for insert + $array['user_settings'][$i]['user_setting_uuid'] = uuid(); $array['user_settings'][$i]['user_uuid'] = $user_uuid; $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; $array['user_settings'][$i]['user_setting_category'] = 'domain'; @@ -214,43 +230,43 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { $array['user_settings'][$i]['user_setting_enabled'] = 'true'; $i++; } - } - } - unset($sql, $prep_statement, $row); - - //check to see if user time zone is set - $sql = "select user_setting_uuid, user_setting_value from v_user_settings "; - $sql .= "where user_setting_category = 'domain' "; - $sql .= "and user_setting_subcategory = 'time_zone' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['user_setting_uuid'] == '' && $user_time_zone != '') { - //add user setting to array for insert - $array['user_settings'][$i]['user_setting_uuid'] = uuid(); - $array['user_settings'][$i]['user_uuid'] = $user_uuid; - $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; - $array['user_settings'][$i]['user_setting_category'] = 'domain'; - $array['user_settings'][$i]['user_setting_subcategory'] = 'time_zone'; - $array['user_settings'][$i]['user_setting_name'] = 'name'; - $array['user_settings'][$i]['user_setting_value'] = $user_time_zone; - $array['user_settings'][$i]['user_setting_enabled'] = 'true'; - $i++; - } - else { - if ($row['user_setting_value'] == '' || $user_time_zone == '') { - $sql = "delete from v_user_settings "; - $sql .= "where user_setting_category = 'domain' "; - $sql .= "and user_setting_subcategory = 'time_zone' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $db->exec(check_sql($sql)); - unset($sql); - } else { - //add user setting to array for update - $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + if ($row['user_setting_value'] == '' || $user_language == '') { + $sql = "delete from v_user_settings "; + $sql .= "where user_setting_category = 'domain' "; + $sql .= "and user_setting_subcategory = 'language' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); + } + else { + //add user setting to array for update + $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + $array['user_settings'][$i]['user_uuid'] = $user_uuid; + $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; + $array['user_settings'][$i]['user_setting_category'] = 'domain'; + $array['user_settings'][$i]['user_setting_subcategory'] = 'language'; + $array['user_settings'][$i]['user_setting_name'] = 'code'; + $array['user_settings'][$i]['user_setting_value'] = $user_language; + $array['user_settings'][$i]['user_setting_enabled'] = 'true'; + $i++; + } + } + } + unset($sql, $prep_statement, $row); + + //check to see if user time zone is set + $sql = "select user_setting_uuid, user_setting_value from v_user_settings "; + $sql .= "where user_setting_category = 'domain' "; + $sql .= "and user_setting_subcategory = 'time_zone' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['user_setting_uuid'] == '' && $user_time_zone != '') { + //add user setting to array for insert + $array['user_settings'][$i]['user_setting_uuid'] = uuid(); $array['user_settings'][$i]['user_uuid'] = $user_uuid; $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; $array['user_settings'][$i]['user_setting_category'] = 'domain'; @@ -260,177 +276,270 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { $array['user_settings'][$i]['user_setting_enabled'] = 'true'; $i++; } - } - } - - //assign the user to the group - if ((permission_exists('user_add') || permission_exists('user_edit')) && $_REQUEST["group_uuid_name"] != '') { - $group_data = explode('|', $group_uuid_name); - $group_uuid = $group_data[0]; - $group_name = $group_data[1]; - //only a superadmin can add other superadmins or admins, admins can only add other admins - switch ($group_name) { - case "superadmin": if (!if_group("superadmin")) { break; } - case "admin": if (!if_group("superadmin") && !if_group("admin")) { break; } - default: //add group user to array for insert - $array['group_users'][$n]['group_user_uuid'] = uuid(); - $array['group_users'][$n]['domain_uuid'] = $domain_uuid; - $array['group_users'][$n]['group_name'] = $group_name; - $array['group_users'][$n]['group_uuid'] = $group_uuid; - $array['group_users'][$n]['user_uuid'] = $user_uuid; - $n++; - } - } - - //update domain, if changed - if ((permission_exists('user_add') || permission_exists('user_edit')) && permission_exists('user_domain')) { - //adjust group user records - $sql = "select group_user_uuid from v_group_users "; - $sql .= "where user_uuid = '".$user_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - foreach ($result as $row) { - //add group user to array for update - $array['group_users'][$n]['group_user_uuid'] = $row['group_user_uuid']; - $array['group_users'][$n]['domain_uuid'] = $domain_uuid; - $n++; + else { + if ($row['user_setting_value'] == '' || $user_time_zone == '') { + $sql = "delete from v_user_settings "; + $sql .= "where user_setting_category = 'domain' "; + $sql .= "and user_setting_subcategory = 'time_zone' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); } - } - unset($sql, $prep_statement, $result, $row); - //adjust user setting records - $sql = "select user_setting_uuid from v_user_settings "; - $sql .= "where user_uuid = '".$user_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - foreach ($result as $row) { + else { //add user setting to array for update $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + $array['user_settings'][$i]['user_uuid'] = $user_uuid; $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; + $array['user_settings'][$i]['user_setting_category'] = 'domain'; + $array['user_settings'][$i]['user_setting_subcategory'] = 'time_zone'; + $array['user_settings'][$i]['user_setting_name'] = 'name'; + $array['user_settings'][$i]['user_setting_value'] = $user_time_zone; + $array['user_settings'][$i]['user_setting_enabled'] = 'true'; $i++; } } - unset($sql, $prep_statement, $result, $row); - //unassign any foreign domain groups - $sql = "delete from v_group_users where "; - $sql .= "domain_uuid = '".$domain_uuid."' "; - $sql .= "and user_uuid = '".$user_uuid."' "; - $sql .= "and group_uuid not in ("; - $sql .= " select group_uuid from v_groups where domain_uuid = '".$domain_uuid."' or domain_uuid is null "; - $sql .= ") "; - $db->exec(check_sql($sql)); - unset($sql); - } - - //add contact to array for insert - if ($action == 'add' && permission_exists('user_add') && permission_exists('contact_add')) { - $contact_uuid = uuid(); - $array['contacts'][$c]['domain_uuid'] = $domain_uuid; - $array['contacts'][$c]['contact_uuid'] = $contact_uuid; - $array['contacts'][$c]['contact_type'] = 'user'; - $array['contacts'][$c]['contact_organization'] = $contact_organization; - $array['contacts'][$c]['contact_name_given'] = $contact_name_given; - $array['contacts'][$c]['contact_name_family'] = $contact_name_family; - $array['contacts'][$c]['contact_nickname'] = $username; - $c++; - if (permission_exists('contact_email_add')) { - $contact_email_uuid = uuid(); - $array['contact_emails'][$c]['contact_email_uuid'] = $contact_email_uuid; - $array['contact_emails'][$c]['domain_uuid'] = $domain_uuid; - $array['contact_emails'][$c]['contact_uuid'] = $contact_uuid; - $array['contact_emails'][$c]['email_address'] = $user_email; - $array['contact_emails'][$c]['email_primary'] = '1'; - $c++; } - } - //add user setting to array for update - $array['users'][$x]['user_uuid'] = $user_uuid; - $array['users'][$x]['domain_uuid'] = $domain_uuid; - if ($username != '' && $username != $username_old) { - $array['users'][$x]['username'] = $username; - } - if ($password != '' && $password == $password_confirm) { - $salt = uuid(); - $array['users'][$x]['password'] = md5($salt.$password); - $array['users'][$x]['salt'] = $salt; - } - $array['users'][$x]['user_status'] = $user_status; - if (permission_exists('user_add') || permission_exists('user_edit')) { - $array['users'][$x]['api_key'] = ($api_key != '') ? $api_key : null; - $array['users'][$x]['user_enabled'] = $user_enabled; - $array['users'][$x]['contact_uuid'] = ($contact_uuid != '') ? $contact_uuid : null; - if ($action == 'add') { - $array['users'][$x]['add_user'] = $_SESSION["user"]["username"]; - $array['users'][$x]['add_date'] = date("Y-m-d H:i:s.uO"); - } - } - $x++; - - //add the user_edit permission - $p = new permissions; - $p->add("user_setting_add", "temp"); - $p->add("user_setting_edit", "temp"); - $p->add("user_edit", "temp"); - - //save the data - $database = new database; - $database->app_name = 'users'; - $database->app_uuid = '112124b3-95c2-5352-7e9d-d14c0b88f207'; - $database->save($array); - //$message = $database->message; - - //remove the temporary permission - $p->delete("user_setting_add", "temp"); - $p->delete("user_setting_edit", "temp"); - $p->delete("user_edit", "temp"); - - //if call center installed - if ($action == 'edit' && permission_exists('user_edit') && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_centers/app_config.php")) { - //get the call center agent uuid - $sql = "select call_center_agent_uuid from v_call_center_agents "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + //check to see if message key is set + if (permission_exists('message_view')) { + $sql = "select user_setting_uuid, user_setting_value from v_user_settings "; + $sql .= "where user_setting_category = 'message' "; + $sql .= "and user_setting_subcategory = 'key' "; $sql .= "and user_uuid = '".$user_uuid."' "; $prep_statement = $db->prepare(check_sql($sql)); if ($prep_statement) { $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - $call_center_agent_uuid = $row['call_center_agent_uuid']; + if ($row['user_setting_uuid'] == '' && $message_key != '') { + //add user setting to array for insert + $array['user_settings'][$i]['user_setting_uuid'] = uuid(); + $array['user_settings'][$i]['user_uuid'] = $user_uuid; + $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; + $array['user_settings'][$i]['user_setting_category'] = 'message'; + $array['user_settings'][$i]['user_setting_subcategory'] = 'key'; + $array['user_settings'][$i]['user_setting_name'] = 'text'; + $array['user_settings'][$i]['user_setting_value'] = $message_key; + $array['user_settings'][$i]['user_setting_enabled'] = 'true'; + $i++; + } + else { + if ($row['user_setting_value'] == '' || $message_key == '') { + $sql = "delete from v_user_settings "; + $sql .= "where user_setting_category = 'message' "; + $sql .= "and user_setting_subcategory = 'key' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); + } + else { + //add user setting to array for update + $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + $array['user_settings'][$i]['user_uuid'] = $user_uuid; + $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; + $array['user_settings'][$i]['user_setting_category'] = 'message'; + $array['user_settings'][$i]['user_setting_subcategory'] = 'key'; + $array['user_settings'][$i]['user_setting_name'] = 'text'; + $array['user_settings'][$i]['user_setting_value'] = $message_key; + $array['user_settings'][$i]['user_setting_enabled'] = 'true'; + $i++; + } + } } - unset($sql, $prep_statement, $result); + } - //update the user_status - if (isset($call_center_agent_uuid)) { - $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - $switch_cmd .= "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'"; - $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + //assign the user to the group + if ((permission_exists('user_add') || permission_exists('user_edit')) && $_REQUEST["group_uuid_name"] != '') { + $group_data = explode('|', $group_uuid_name); + $group_uuid = $group_data[0]; + $group_name = $group_data[1]; + //only a superadmin can add other superadmins or admins, admins can only add other admins + switch ($group_name) { + case "superadmin": if (!if_group("superadmin")) { break; } + case "admin": if (!if_group("superadmin") && !if_group("admin")) { break; } + default: //add group user to array for insert + $array['user_groups'][$n]['user_group_uuid'] = uuid(); + $array['user_groups'][$n]['domain_uuid'] = $domain_uuid; + $array['user_groups'][$n]['group_name'] = $group_name; + $array['user_groups'][$n]['group_uuid'] = $group_uuid; + $array['user_groups'][$n]['user_uuid'] = $user_uuid; + $n++; } + } - //update the user state - if (isset($call_center_agent_uuid)) { - $cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting"; - $response = event_socket_request($fp, $cmd); + //update domain, if changed + if ((permission_exists('user_add') || permission_exists('user_edit')) && permission_exists('user_domain')) { + //adjust group user records + $sql = "select user_group_uuid from v_user_groups "; + $sql .= "where user_uuid = '".$user_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + foreach ($result as $row) { + //add group user to array for update + $array['user_groups'][$n]['user_group_uuid'] = $row['user_group_uuid']; + $array['user_groups'][$n]['domain_uuid'] = $domain_uuid; + $n++; + } + } + unset($sql, $prep_statement, $result, $row); + //adjust user setting records + $sql = "select user_setting_uuid from v_user_settings "; + $sql .= "where user_uuid = '".$user_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + foreach ($result as $row) { + //add user setting to array for update + $array['user_settings'][$i]['user_setting_uuid'] = $row['user_setting_uuid']; + $array['user_settings'][$i]['domain_uuid'] = $domain_uuid; + $i++; + } + } + unset($sql, $prep_statement, $result, $row); + //unassign any foreign domain groups + $sql = "delete from v_user_groups where "; + $sql .= "domain_uuid = '".$domain_uuid."' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $sql .= "and group_uuid not in ("; + $sql .= " select group_uuid from v_groups where domain_uuid = '".$domain_uuid."' or domain_uuid is null "; + $sql .= ") "; + $db->exec(check_sql($sql)); + unset($sql); + } + + //add contact to array for insert + if ($action == 'add' && permission_exists('user_add') && permission_exists('contact_add')) { + $contact_uuid = uuid(); + $array['contacts'][$c]['domain_uuid'] = $domain_uuid; + $array['contacts'][$c]['contact_uuid'] = $contact_uuid; + $array['contacts'][$c]['contact_type'] = 'user'; + $array['contacts'][$c]['contact_organization'] = $contact_organization; + $array['contacts'][$c]['contact_name_given'] = $contact_name_given; + $array['contacts'][$c]['contact_name_family'] = $contact_name_family; + $array['contacts'][$c]['contact_nickname'] = $username; + $c++; + if (permission_exists('contact_email_add')) { + $contact_email_uuid = uuid(); + $array['contact_emails'][$c]['contact_email_uuid'] = $contact_email_uuid; + $array['contact_emails'][$c]['domain_uuid'] = $domain_uuid; + $array['contact_emails'][$c]['contact_uuid'] = $contact_uuid; + $array['contact_emails'][$c]['email_address'] = $user_email; + $array['contact_emails'][$c]['email_primary'] = '1'; + $c++; } - } + } - //redirect the browser - messages::add($text['message-update']); - if ($_REQUEST['action'] == $text['button-add'] || !permission_exists('user_edit')) { + //add user setting to array for update + $array['users'][$x]['user_uuid'] = $user_uuid; + $array['users'][$x]['domain_uuid'] = $domain_uuid; + if ($username != '' && $username != $username_old) { + $array['users'][$x]['username'] = $username; + } + if ($password != '' && $password == $password_confirm) { + $salt = uuid(); + $array['users'][$x]['password'] = md5($salt.$password); + $array['users'][$x]['salt'] = $salt; + } + $array['users'][$x]['user_status'] = $user_status; + if (permission_exists('user_add') || permission_exists('user_edit')) { + $array['users'][$x]['api_key'] = ($api_key != '') ? $api_key : null; + $array['users'][$x]['user_enabled'] = $user_enabled; + $array['users'][$x]['contact_uuid'] = ($contact_uuid != '') ? $contact_uuid : null; + if ($action == 'add') { + $array['users'][$x]['add_user'] = $_SESSION["user"]["username"]; + $array['users'][$x]['add_date'] = date("Y-m-d H:i:s.uO"); + } + } + $x++; + + //add the user_edit permission + $p = new permissions; + $p->add("user_setting_add", "temp"); + $p->add("user_setting_edit", "temp"); + $p->add("user_edit", "temp"); + + //save the data + $database = new database; + $database->app_name = 'users'; + $database->app_uuid = '112124b3-95c2-5352-7e9d-d14c0b88f207'; + $database->save($array); + //$message = $database->message; + + //remove the temporary permission + $p->delete("user_setting_add", "temp"); + $p->delete("user_setting_edit", "temp"); + $p->delete("user_edit", "temp"); + + //if call center installed + if ($action == 'edit' && permission_exists('user_edit') && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_centers/app_config.php")) { + //get the call center agent uuid + $sql = "select call_center_agent_uuid from v_call_center_agents "; + $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + $call_center_agent_uuid = $row['call_center_agent_uuid']; + } + unset($sql, $prep_statement, $result); + + //update the user_status + if (isset($call_center_agent_uuid)) { + $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); + $switch_cmd .= "callcenter_config agent set status ".$call_center_agent_uuid." '".$user_status."'"; + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + } + + //update the user state + if (isset($call_center_agent_uuid)) { + $cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting"; + $response = event_socket_request($fp, $cmd); + } + } + + //response message + if ($action == 'edit') { + message::add($text['message-update'],'positive'); + } + else { + message::add($text['message-add'],'positive'); + } header("Location: user_edit.php?id=".$user_uuid); - } - else { - header("Location: users.php"); - } - return; + exit; + } -} +//populate the form with values from session variable + if ( + is_array($_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']) && + sizeof($_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']) != 0 + ) { + $domain_uuid = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["domain_uuid"]; + $username = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["username"]; + $password = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["password"]; + $password_confirm = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["password_confirm"]; + $api_key = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["api_key"]; + $user_enabled = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["user_enabled"]; + $contact_uuid = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["contact_uuid"]; + $user_status = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']["user_status"]; + $password_confirm = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['password_confirm']; + $user_settings['domain']['language']['code'] = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['user_language']; + $user_settings['domain']['time_zone']['name'] = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['user_time_zone']; + $user_email = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['user_email']; + $contact_name_given = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['contact_name_given']; + $contact_name_family = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['contact_name_family']; + $contact_organization = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['contact_organization']; + $user_settings["message"]["key"]["text"] = $_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']['message_key']; -//pre-populate the form - if ($action == 'edit') { - //get user data + $unsaved = true; + unset($_SESSION['tmp'][$_SERVER['PHP_SELF']]['user']); + } + +//populate the form with values from db + else { + if ($action == 'edit') { $sql = "select * from v_users where user_uuid = '".$user_uuid."' "; if (!permission_exists('user_all')) { $sql .= "and domain_uuid = '".$domain_uuid."' "; @@ -442,13 +551,13 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { $domain_uuid = $row["domain_uuid"]; $user_uuid = $row["user_uuid"]; $username = $row["username"]; - $password = $row["password"]; $api_key = $row["api_key"]; $user_enabled = $row["user_enabled"]; $contact_uuid = $row["contact_uuid"]; $user_status = $row["user_status"]; } else { + message::add($text['message-invalid_user'], 'negative', 7500); header("Location: user_edit.php?id=".$_SESSION['user_uuid']); exit; } @@ -475,6 +584,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { } } } + } } //include the header @@ -508,49 +618,6 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " }\n"; echo " }\n"; - $req['length'] = $_SESSION['user']['password_length']['numeric']; - $req['number'] = ($_SESSION['user']['password_number']['boolean'] == 'true') ? true : false; - $req['lowercase'] = ($_SESSION['user']['password_lowercase']['boolean'] == 'true') ? true : false; - $req['uppercase'] = ($_SESSION['user']['password_uppercase']['boolean'] == 'true') ? true : false; - $req['special'] = ($_SESSION['user']['password_special']['boolean'] == 'true') ? true : false; - - echo " function check_password_strength(pwd) {\n"; - echo " if ($('#password').val() != '' || $('#password_confirm').val() != '') {\n"; - echo " var msg_errors = [];\n"; - if (is_numeric($req['length']) && $req['length'] != 0) { - echo " var re = /.{".$req['length'].",}/;\n"; //length - echo " if (!re.test(pwd)) { msg_errors.push('".$req['length']."+ ".$text['label-characters']."'); }\n"; - } - if ($req['number']) { - echo " var re = /(?=.*[\d])/;\n"; //number - echo " if (!re.test(pwd)) { msg_errors.push('1+ ".$text['label-numbers']."'); }\n"; - } - if ($req['lowercase']) { - echo " var re = /(?=.*[a-z])/;\n"; //lowercase - echo " if (!re.test(pwd)) { msg_errors.push('1+ ".$text['label-lowercase_letters']."'); }\n"; - } - if ($req['uppercase']) { - echo " var re = /(?=.*[A-Z])/;\n"; //uppercase - echo " if (!re.test(pwd)) { msg_errors.push('1+ ".$text['label-uppercase_letters']."'); }\n"; - } - if ($req['special']) { - echo " var re = /(?=.*[\W])/;\n"; //special - echo " if (!re.test(pwd)) { msg_errors.push('1+ ".$text['label-special_characters']."'); }\n"; - } - echo " if (msg_errors.length > 0) {\n"; - echo " var msg = '".$text['message-password_requirements'].": ' + msg_errors.join(', ');\n"; - echo " display_message(msg, 'negative', '6000');\n"; - echo " return false;\n"; - echo " }\n"; - echo " else {\n"; - echo " return true;\n"; - echo " }\n"; - echo " }\n"; - echo " else {\n"; - echo " return true;\n"; - echo " }\n"; - echo " }\n"; - echo " function show_strength_meter() {\n"; echo " $('#pwstrength_progress').slideDown();\n"; echo " }\n"; @@ -559,24 +626,17 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo "\n"; echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
".$text['header-user_edit']."\n"; - if (permission_exists('user_add') || permission_exists('user_edit')) { - echo " "; + echo "
\n"; + if ($unsaved) { + echo "".$text['message-unsaved_changes']." "; } - echo " "; - echo "
\n"; - echo " ".$text['description-user_edit']."\n"; - echo "
\n"; - - echo "
\n"; + if (permission_exists('user_add') || permission_exists('user_edit')) { + echo " "; + } + echo " "; + echo "\n"; + echo "".$text['header-user_edit']."
\n"; + echo $text['description-user_edit']."

\n"; echo ""; @@ -584,11 +644,12 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " "; echo " "; echo " "; @@ -596,15 +657,44 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; @@ -694,9 +784,33 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " "; echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " "; @@ -740,24 +854,24 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " "; } - if ((permission_exists("user_add") && $action == 'add') || (permission_exists("user_edit") && $action == 'edit')) { + if (permission_exists("user_groups")) { echo " "; - echo " "; + echo " "; echo " "; echo " "; + } - if (permission_exists('user_domain')) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - else { - echo ""; - } - - if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/api/app_config.php')) { - echo " "; - echo " "; - echo " "; - echo " "; - } - + if (permission_exists('user_domain')) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } @@ -872,35 +953,65 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo ""; } + if (permission_exists('api_key')) { + echo " "; + echo " "; + echo " "; + echo " "; + } + + if (permission_exists('message_view')) { + echo " "; + echo " "; + echo " "; + echo " "; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo " "; - echo " "; echo " "; echo "
".$text['label-username'].""; if (permission_exists("user_edit")) { - echo " \n"; + echo " \n"; + echo " \n"; //help defeat browser auto-fill } else { echo " ".escape($username)."\n"; - echo " \n"; + echo " \n"; } echo "
".$text['label-password'].""; - echo " "; - echo " "; - echo "
"; + echo " "; //help defeat browser auto-fill + echo " "; + echo "

\n"; + if ((is_numeric($required['length']) && $required['length'] != 0) || $required['number'] || $required['lowercase'] || $required['uppercase'] || $required['special']) { + echo $text['label-required'].': '; + if (is_numeric($required['length']) && $required['length'] != 0) { + echo $required['length']." ".$text['label-characters']; + if ($required['number'] || $required['lowercase'] || $required['uppercase'] || $required['special']) { + echo " ("; + } + } + if ($required['number']) { + $required_temp[] = $text['label-number']; + } + if ($required['lowercase']) { + $required_temp[] = $text['label-lowercase']; + } + if ($required['uppercase']) { + $required_temp[] = $text['label-uppercase']; + } + if ($required['special']) { + $required_temp[] = $text['label-special']; + } + if (is_array($required_temp) && sizeof($required_temp) != 0) { + echo implode(', ',$required_temp); + if (is_numeric($required['length']) && $required['length'] != 0) { + echo ")"; + } + } + unset($required_temp); + } echo "
".$text['label-confirm_password'].""; - echo " "; + echo "
\n"; + echo " ".$text['message-green_border_passwords_match']."\n"; echo "
".$text['label-contact']."\n"; - $sql = " select contact_uuid, contact_organization, contact_name_given, contact_name_family, contact_nickname from v_contacts "; - $sql .= " where domain_uuid = '".escape($domain_uuid)."' "; - $sql .= " order by contact_organization desc, contact_name_family asc, contact_name_given asc, contact_nickname asc "; + $sql = "select "; + $sql .= "c.contact_uuid, "; + $sql .= "c.contact_organization, "; + $sql .= "c.contact_name_given, "; + $sql .= "c.contact_name_family, "; + $sql .= "c.contact_nickname "; + $sql .= "from "; + $sql .= "v_contacts as c "; + $sql .= "where "; + $sql .= "c.domain_uuid = '".escape($domain_uuid)."' "; + $sql .= "and not exists ( "; + $sql .= " select "; + $sql .= " contact_uuid "; + $sql .= " from "; + $sql .= " v_users as u "; + $sql .= " where "; + $sql .= " u.domain_uuid = '".escape($domain_uuid)."' "; + if (is_uuid($contact_uuid)) { //don't exclude currently assigned contact + $sql .= "and u.contact_uuid <> '".escape($contact_uuid)."' "; + } + $sql .= " and u.contact_uuid = c.contact_uuid "; + $sql .= ") "; + $sql .= "order by "; + $sql .= "lower(c.contact_organization) asc, "; + $sql .= "lower(c.contact_name_family) asc, "; + $sql .= "lower(c.contact_name_given) asc, "; + $sql .= "lower(c.contact_nickname) asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -704,12 +818,12 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo "\n"; @@ -724,7 +838,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { else if ($action == 'add' && permission_exists("user_add")) { echo "
".$text['label-email']."
".$text['label-first_name']."
".$text['label-group'.(($action == 'edit') ? 's' : null)]."".$text['label-groups'].""; $sql = "select "; - $sql .= " gu.*, g.domain_uuid as group_domain_uuid "; + $sql .= " ug.*, g.domain_uuid as group_domain_uuid "; $sql .= "from "; - $sql .= " v_group_users as gu, "; + $sql .= " v_user_groups as ug, "; $sql .= " v_groups as g "; $sql .= "where "; - $sql .= " gu.group_uuid = g.group_uuid "; + $sql .= " ug.group_uuid = g.group_uuid "; $sql .= " and ("; $sql .= " g.domain_uuid = :domain_uuid "; $sql .= " or g.domain_uuid is null "; $sql .= " ) "; - $sql .= " and gu.domain_uuid = :domain_uuid "; - $sql .= " and gu.user_uuid = :user_uuid "; + $sql .= " and ug.domain_uuid = :domain_uuid "; + $sql .= " and ug.user_uuid = :user_uuid "; $sql .= "order by "; $sql .= " g.domain_uuid desc, "; $sql .= " g.group_name asc "; @@ -766,8 +880,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { $prep_statement->bindParam(':user_uuid', $user_uuid); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - if ($result_count > 0) { + if (is_array($result)) { echo "\n"; foreach($result as $field) { if (strlen($field['group_name']) > 0) { @@ -775,12 +888,10 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { echo " \n"; - if ($result_count > 1) { - if (permission_exists('group_member_delete') || if_group("superadmin")) { - echo " \n"; - } + if (permission_exists('group_member_delete') || if_group("superadmin")) { + echo " \n"; } echo "\n"; $assigned_groups[] = $field['group_uuid']; @@ -788,7 +899,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { } echo "
"; echo escape($field['group_name']).(($field['group_domain_uuid'] != '') ? "@".$_SESSION['domains'][$field['group_domain_uuid']]['domain_name'] : null); echo " \n"; - echo " ".$v_link_label_delete."\n"; - echo " \n"; + echo " ".$v_link_label_delete."\n"; + echo "
\n"; } - unset($sql, $prep_statement, $result, $result_count); + unset($sql, $prep_statement, $result); $sql = "select * from v_groups "; $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; @@ -798,73 +909,43 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") { $sql .= "order by domain_uuid desc, group_name asc "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - if ($result_count > 0) { + $groups = $prep_statement->fetchAll(PDO::FETCH_NAMED); + if (is_array($groups)) { if (isset($assigned_groups)) { echo "
\n"; } - echo "\n"; echo " \n"; - foreach($result as $field) { + foreach($groups as $field) { if ($field['group_name'] == "superadmin" && !if_group("superadmin")) { continue; } //only show the superadmin group to other superadmins if ($field['group_name'] == "admin" && (!if_group("superadmin") && !if_group("admin") )) { continue; } //only show the admin group to other admins if ( !isset($assigned_groups) || (isset($assigned_groups) && !in_array($field["group_uuid"], $assigned_groups)) ) { - echo " \n"; + if ($group_uuid_name == $field['group_uuid']."|".$field['group_name']) { $selected = "selected='selected'"; } else { $selected = ''; } + echo " \n"; } } echo ""; if ($action == 'edit') { - echo "\n"; + echo "\n"; } } - unset($sql, $prep_statement, $result); + unset($sql, $prep_statement, $groups); echo "
\n"; - echo " ".$text['label-domain']."\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-domain_name']."\n"; - echo "
".$text['label-api_key']."\n"; - echo " "; - echo " "; - if (strlen($text['description-api_key']) > 0) { - echo "
".$text['description-api_key']."
\n"; - } - echo "
\n"; - echo " ".$text['label-enabled']."\n"; + echo " ".$text['label-domain']."\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo $text['description-enabled']."\n"; + echo $text['description-domain_name']."\n"; echo "
".$text['label-api_key']."\n"; + echo " "; + echo " "; + if (strlen($text['description-api_key']) > 0) { + echo "
".$text['description-api_key']."
\n"; + } + echo "
".$text['label-message_key']."\n"; + echo " "; + echo " "; + if (strlen($text['description-message_key']) > 0) { + echo "
".$text['description-message_key']."
\n"; + } + echo "
\n"; + echo " ".$text['label-enabled']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-enabled']."\n"; + echo "
"; + echo " "; if ($action == 'edit') { echo " "; if (permission_exists("user_edit")) { - echo " "; + echo " "; } } echo "
"; - echo " "; + if ($unsaved) { + echo " ".$text['message-unsaved_changes']." "; + } + echo " "; echo "
"; echo "

"; echo ""; - echo "\n"; - if (permission_exists("user_edit") && permission_exists('user_setting_view') && $action == 'edit') { require "user_settings.php"; } diff --git a/core/users/user_imports.php b/core/users/user_imports.php new file mode 100644 index 0000000000..ec9dba1c5d --- /dev/null +++ b/core/users/user_imports.php @@ -0,0 +1,501 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2018 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('user_import')) { + //access granted + } + else { + echo "access denied"; + exit; + } + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher + if(!function_exists('str_getcsv')) { + function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") { + $fp = fopen("php://memory", 'r+'); + fputs($fp, $input); + rewind($fp); + $data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0 + fclose($fp); + return $data; + } + } + +//set the max php execution time + ini_set(max_execution_time,7200); + +//get the http get values and set them as php variables + $action = check_str($_POST["action"]); + $from_row = check_str($_POST["from_row"]); + $order_by = check_str($_POST["order_by"]); + $order = check_str($_POST["order"]); + $delimiter = check_str($_POST["data_delimiter"]); + $enclosure = check_str($_POST["data_enclosure"]); + +//save the data to the csv file + if (isset($_POST['data'])) { + $file = $_SESSION['server']['temp']['dir']."/users-".$_SESSION['domain_name'].".csv"; + file_put_contents($file, $_POST['data']); + $_SESSION['file'] = $file; + } + +//copy the csv file + //$_POST['submit'] == "Upload" && + if ( is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('user_imports')) { + if (check_str($_POST['type']) == 'csv') { + move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']); + $save_msg = "Uploaded file to ".$_SESSION['server']['temp']['dir']."/". htmlentities($_FILES['ulfile']['name']); + //system('chmod -R 744 '.$_SESSION['server']['temp']['dir'].'*'); + unset($_POST['txtCommand']); + $file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name']; + $_SESSION['file'] = $file; + } + } + +//get the schema + if (strlen($delimiter) > 0) { + //get the first line + $line = fgets(fopen($_SESSION['file'], 'r')); + $line_fields = explode($delimiter, $line); + + //get the schema + $x = 0; + include ("core/users/app_config.php"); + $i = 0; + foreach($apps[0]['db'] as $table) { + //get the table name and parent name + $table_name = $table["table"]['name']; + $parent_name = $table["table"]['parent']; + + //remove the v_ table prefix + if (substr($table_name, 0, 2) == 'v_') { + $table_name = substr($table_name, 2); + } + if (substr($parent_name, 0, 2) == 'v_') { + $parent_name = substr($parent_name, 2); + } + + //filter for specific tables and build the schema array + if ($table_name == "users") { + $schema[$i]['table'] = $table_name; + $schema[$i]['parent'] = $parent_name; + foreach($table['fields'] as $row) { + if ($row['deprecated'] !== 'true') { + if (is_array($row['name'])) { + $field_name = $row['name']['text']; + } + else { + $field_name = $row['name']; + } + $schema[$i]['fields'][] = $field_name; + } + } + $i++; + } + } + $schema[$i]['table'] = 'user_groups'; + $schema[$i]['parent'] = 'users'; + $schema[$i]['fields'][] = 'group_name'; + + //debug info + //echo "
\n";
+			//print_r($schema);
+			//echo "
\n"; + //exit; + } + +//match the column names to the field names + if (strlen($delimiter) > 0 && file_exists($_SESSION['file']) && $action != 'import') { + + //form to match the fields to the column names + require_once "resources/header.php"; + + echo "
\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + + //loop through user columns + $x = 0; + foreach ($line_fields as $line_field) { + $line_field = trim(trim($line_field), $enclosure); + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + $x++; + } + + echo " \n"; + echo " \n"; + echo " \n"; + + echo "
\n"; + echo " ".$text['header-import']."
\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['description-import']."\n"; + echo "
".$text['header-import']."\n"; + //echo " \n"; + //echo "
\n"; + //echo " ".$text['label-zzz']."\n"; + echo $line_field; + echo "\n"; + echo " \n"; + //echo "
\n"; + //echo $text['description-zzz']."\n"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + require_once "resources/footer.php"; + + //normalize the column names + //$line = strtolower($line); + //$line = str_replace("-", "_", $line); + //$line = str_replace($delimiter."title".$delimiter, $delimiter."contact_title".$delimiter, $line); + //$line = str_replace("firstname", "name_given", $line); + //$line = str_replace("lastname", "name_family", $line); + //$line = str_replace("company", "organization", $line); + //$line = str_replace("company", "contact_email", $line); + + //end the script + exit; + } + +//get the parent table + function get_parent($schema,$table_name) { + foreach ($schema as $row) { + if ($row['table'] == $table_name) { + return $row['parent']; + } + } + } + +//upload the csv + if (file_exists($_SESSION['file']) && $action == 'import') { + + //form to match the fields to the column names + //require_once "resources/header.php"; + + //user selected fields + $fields = $_POST['fields']; + + //set the domain_uuid + $domain_uuid = $_SESSION['domain_uuid']; + + + //get the groups + $sql = "select * from v_groups where domain_uuid is null "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + $groups = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + + //get the contents of the csv file and convert them into an array + $handle = @fopen($_SESSION['file'], "r"); + if ($handle) { + //set the starting identifiers + $row_id = 0; + $row_number = 1; + + //loop through the array + while (($line = fgets($handle, 4096)) !== false) { + if ($from_row <= $row_number) { + //get the user_uuid + $user_uuid = uuid(); + + //format the data + $y = 0; + foreach ($fields as $key => $value) { + + //get the line + $result = str_getcsv($line, $delimiter, $enclosure); + + //get the table and field name + $field_array = explode(".",$value); + $table_name = $field_array[0]; + $field_name = $field_array[1]; + //echo "value: $value
\n"; + //echo "table_name: $table_name
\n"; + //echo "field_name: $field_name
\n"; + + //get the parent table name + $parent = get_parent($schema, $table_name); + + //clean the phone number + //if ($field_name == "phone") { + // $result[$key] = preg_replace('{\D}', '', $result[$key]); + //} + + //build the data array + if (strlen($table_name) > 0) { + if (strlen($parent) == 0) { + $array[$table_name][$row_id]['domain_uuid'] = $domain_uuid; + $array[$table_name][$row_id][$field_name] = $result[$key]; + } + else { + if ($field_name != "group_name") { + $array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid; + $array[$parent][$row_id][$table_name][$y][$field_name] = $result[$key]; + } + } + + if ($field_name == "group_name") { + $group_name = ''; + foreach ($groups as $field) { + if ($field['group_name'] == $result[$key]) { + $group_name = $field['group_name']; + $array['user_groups'][$row_id]['user_group_uuid'] = uuid(); + $array['user_groups'][$row_id]['domain_uuid'] = $domain_uuid; + $array['user_groups'][$row_id]['group_name'] = $field['group_name']; + $array['user_groups'][$row_id]['group_uuid'] = $field['group_uuid']; + $array['user_groups'][$row_id]['user_uuid'] = $user_uuid; + } + } + + //remove superadmin if not the correct permission + if ($group_name == 'superadmin') { + if (!permission_exists('group_domain')) { + unset($array['user_groups'][$row_id]); + } + } + } + } + } + + //get the password, salt and hash the user password + $password = $array['users'][$row_id]['password']; + if (isset($array['users'][$row_id]['salt'])) { + $salt = $array['users'][$row_id]['salt']; + } + else { + $salt = uuid(); + $array['users'][$row_id]['salt'] = $salt; + } + $array['users'][$row_id]['password'] = md5($salt.$password); + + //set the user_uuid + $array['users'][$row_id]['user_uuid'] = $user_uuid; + + //debug + //echo "
\n";
+								//print_r($array);
+								//echo "
\n"; + //exit; + + //process a chunk of the array + if ($row_id === 1000) { + + //save to the data + $database = new database; + $database->app_name = 'users'; + $database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e'; + $database->save($array); + //$message = $database->message; + + //clear the array + unset($array); + + //set the row id back to 0 + $row_id = 0; + } + + } //if ($from_row <= $row_id) + $row_number++; + $row_id++; + } //end while + fclose($handle); + + //debug info + //echo "
\n";
+					//print_r($array);
+					//echo "
\n"; + //exit; + + //save to the data + if (is_array($array)) { + $database = new database; + $database->app_name = 'users'; + $database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e'; + $database->save($array); + //$message = $database->message; + } + + //send the redirect header + header("Location: users.php"); + return; + } + } + +//include the header + require_once "resources/header.php"; + +//begin the content + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['header-import']."
\n"; + echo " ".$text['description-import']."\n"; + echo "
\n"; + echo " \n"; + //echo " \n"; + echo "
"; + + echo "
\n"; + + echo "
\n"; + echo " \n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-import_data']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_data']."\n"; + echo "
\n"; + echo " ".$text['label-from_row']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-from_row']."\n"; + echo "
\n"; + echo " ".$text['label-import_delimiter']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_delimiter']."\n"; + echo "
\n"; + echo " ".$text['label-import_enclosure']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-import_enclosure']."\n"; + echo "
\n"; + echo " ".$text['label-import_file_upload']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "
\n"; + echo "  \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo "

"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; + +?> diff --git a/core/users/user_setting_delete.php b/core/users/user_setting_delete.php index 22abbd3d21..c3ac872f9b 100644 --- a/core/users/user_setting_delete.php +++ b/core/users/user_setting_delete.php @@ -60,7 +60,7 @@ } else { // set message - messages::add($text['message-delete_failed'], 'negative'); + message::add($text['message-delete_failed'], 'negative'); } header("Location: user_edit.php?id=".check_str($_REQUEST["user_uuid"])); diff --git a/core/users/user_setting_edit.php b/core/users/user_setting_edit.php index 41552b5d07..1067836c39 100644 --- a/core/users/user_setting_edit.php +++ b/core/users/user_setting_edit.php @@ -319,10 +319,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //redirect the browser if ($action == "update") { - messages::add($text['message-update']); + message::add($text['message-update']); } if ($action == "add") { - messages::add($text['message-add']); + message::add($text['message-add']); } header("Location: user_edit.php?id=".$user_uuid); return; @@ -373,7 +373,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } echo "\n"; echo ""; - echo " "; + echo " "; echo " \n"; echo "\n"; echo "\n"; @@ -395,7 +395,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; if (permission_exists('user_setting_category_edit')) { - echo " \n"; + echo " \n"; } else { echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-subcategory']."\n"; echo "\n"; @@ -429,7 +429,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-type']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-type']."\n"; echo "\n"; @@ -454,10 +454,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sub_result = $sub_prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($sub_result as $sub_row) { if (strtolower($row['user_setting_value']) == strtolower($sub_row["menu_uuid"])) { - echo " \n"; + echo " \n"; } } unset ($sub_prep_statement); @@ -474,10 +474,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $dir_label = str_replace('_', ' ', $dir_name); $dir_label = str_replace('-', ' ', $dir_label); if ($dir_name == $row['user_setting_value']) { - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -532,7 +532,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; } else { - echo " \n"; + echo " \n"; } $previous_category = $category; $x++; @@ -546,7 +546,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; } elseif ($subcategory == 'password' || substr_count($subcategory, '_password') > 0 || $category == "login" && $subcategory == "password_reset_key" && $name == "text") { - echo " \n"; + echo " \n"; } elseif ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) { echo " \n"; @@ -572,10 +572,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; echo " "; - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } } elseif ($category == "fax" && $subcategory == "page_size" && $name == "text" ) { @@ -641,7 +641,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; } else { - echo " \n"; + echo " \n"; } echo "
\n"; echo $text['description-value']."\n"; @@ -712,7 +712,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-description']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-description']."\n"; echo "\n"; @@ -720,9 +720,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; if ($action == "update") { - echo " \n"; + echo " \n"; } echo "
"; echo " \n"; @@ -753,4 +753,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?> diff --git a/core/users/user_settings.php b/core/users/user_settings.php index e45ead696e..0661e58a00 100644 --- a/core/users/user_settings.php +++ b/core/users/user_settings.php @@ -52,7 +52,7 @@ $db->exec(check_sql($sql)); unset($sql); - messages::add($text['message-update']); + message::add($text['message-update']); header("Location: user_edit.php?id=".$user_uuid); exit; } @@ -99,6 +99,7 @@ $sql .= "and not ( "; $sql .= "(user_setting_category = 'domain' and user_setting_subcategory = 'language') "; $sql .= "or (user_setting_category = 'domain' and user_setting_subcategory = 'time_zone') "; + $sql .= "or (user_setting_category = 'message' and user_setting_subcategory = 'key') "; $sql .= ") "; if (strlen($order_by) == 0) { $sql .= "order by user_setting_category, user_setting_subcategory, user_setting_order asc "; @@ -109,8 +110,7 @@ $sql .= "limit $rows_per_page offset $offset "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); + $user_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); $c = 0; @@ -120,9 +120,9 @@ //show the content echo "\n"; - if ($result_count > 0) { + if (is_array($user_settings)) { $previous_category = ''; - foreach($result as $row) { + foreach($user_settings as $row) { if ($previous_category != $row['user_setting_category']) { $c = 0; echo "\n"; @@ -234,20 +234,20 @@ echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo "\n"; $previous_category = $row['user_setting_category']; if ($c==0) { $c=1; } else { $c=0; } } //end foreach - unset($sql, $result, $row_count); + unset($sql, $user_settings); } //end if results echo "\n"; @@ -260,7 +260,7 @@ if (permission_exists('user_setting_add')) { echo "$v_link_label_add"; } - if (permission_exists('user_setting_delete') && $result_count > 0) { + if (permission_exists('user_setting_delete') && is_array($user_settings)) { echo "".$v_link_label_delete.""; } echo " \n"; diff --git a/core/users/users.php b/core/users/users.php index 4bf8b581ee..2571425e3e 100644 --- a/core/users/users.php +++ b/core/users/users.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -50,57 +50,26 @@ //set the variables $order_by = check_str($_GET["order_by"]); $order = check_str($_GET["order"]); - $search_value = check_str($_REQUEST["search_value"]); + $search = check_str($_REQUEST["search"]); + if (strlen($search) > 0) { + $search = strtolower($search); + } //get the list of superadmins $superadmins = superadmin_list($db); -//get the users' group(s) from the database - $sql = "select "; - $sql .= " gu.*, g.domain_uuid as group_domain_uuid "; - $sql .= "from "; - $sql .= " v_group_users as gu, "; - $sql .= " v_groups as g "; - $sql .= "where "; - $sql .= " gu.group_uuid = g.group_uuid "; - if (!(permission_exists('user_all') && $_GET['show'] == 'all')) { - $sql .= " and ("; - $sql .= " g.domain_uuid = '".$domain_uuid."' "; - $sql .= " or g.domain_uuid is null "; - $sql .= " ) "; - $sql .= " and gu.domain_uuid = '".$domain_uuid."' "; - } - $sql .= "order by "; - $sql .= " g.domain_uuid desc, "; - $sql .= " g.group_name asc "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - if (count($result) > 0) { - foreach($result as $row) { - $user_groups[$row['user_uuid']][] = $row['group_name'].(($row['group_domain_uuid'] != '') ? "@".$_SESSION['domains'][$row['group_domain_uuid']]['domain_name'] : null); - } - } - unset ($sql, $prep_statement); - -//get total user count from the database - $sql = "select count(*) as num_rows from v_users where 1 = 1 "; +//get the user count from the database + $sql = "select count(*) as num_rows from view_users where 1 = 1 "; if (!(permission_exists('user_all') && $_GET['show'] == 'all')) { $sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' "; } - $prep_statement = $db->prepare($sql); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - $total_users = $row['num_rows']; + if (strlen($search) > 0) { + $sql .= "and (lower(username) like '%".$search."%' \n"; + $sql .= "or lower(groups) like '%".$search."%' \n"; + $sql .= "or lower(contact_organization) like '%".$search."%' \n"; + $sql .= "or lower(contact_name_given) like '%".$search."%' \n"; + $sql .= "or lower(contact_name_family) like '%".$search."%') \n"; } - unset($prep_statement, $row); - -//get the users from the database (reuse $sql from above) - if (strlen($search_value) > 0) { - $sql .= "and username = '".$search_value."' "; - } - if (strlen($order_by) > 0) { $sql .= "order by ".$order_by." ".$order." "; } $prep_statement = $db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); @@ -113,8 +82,10 @@ } } unset ($prep_statement, $result, $sql); + +//prepare for paging $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - $param = "search=".escape($search_value); + $param = "search=".escape($search); if (permission_exists('user_all') && $_GET['show'] == 'all') { $param .= "&show=all"; } @@ -123,24 +94,36 @@ list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; - $sql = "select * from v_users where 1 = 1 "; +//get the users from the database + $sql = "select u.domain_uuid, u.user_uuid, u.contact_uuid, u.domain_name, u.username, u.user_enabled, u.contact_organization, u.contact_name_given, u.contact_name_family, u.groups \n"; + $sql .= "from view_users as u \n"; + $sql .= "where 1 = 1 \n"; if (!(permission_exists('user_all') && $_GET['show'] == 'all')) { - $sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and u.domain_uuid = '".$_SESSION['domain_uuid']."' \n"; } - if (strlen($search_value) > 0) { - $sql .= "and username like '%".$search_value."%' "; + if (strlen($search) > 0) { + $sql .= "and (lower(username) like '%".$search."%' \n"; + $sql .= "or lower(groups) like '%".$search."%' \n"; + $sql .= "or lower(contact_organization) like '%".$search."%' \n"; + $sql .= "or lower(contact_name_given) like '%".$search."%' \n"; + $sql .= "or lower(contact_name_family) like '%".$search."%') \n"; } if (strlen($order_by)> 0) { - $sql .= "order by ".$order_by." ".$order." "; + $sql .= "order by ".$order_by." ".$order." \n"; } else { - $sql .= "order by username asc "; + $sql .= "order by u.username asc \n"; } - $sql .= " limit ".$rows_per_page." offset ".$offset." "; + $sql .= "limit ".$rows_per_page." offset ".$offset." "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $users = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $user_count = count($users); + //if (!$users) { + // echo "
\n";
+	//	print_r($prep_statement->errorInfo());
+	//	echo "
\n"; + // exit; + //} unset ($prep_statement, $sql); //page title and description @@ -159,9 +142,9 @@ } } if (permission_exists('user_import')) { - echo "\n"; + echo "\n"; } - echo ""; + echo ""; echo ""; echo ""; echo "
\n"; @@ -180,7 +163,7 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; -//show the data +//show the users echo "
".$row['user_setting_description']." ".escape($row['user_setting_description'])." "; if (permission_exists('user_setting_edit')) { - echo "$v_link_label_edit"; + echo "$v_link_label_edit"; } if (permission_exists('user_setting_delete')) { - echo "$v_link_label_delete"; + echo "$v_link_label_delete"; } echo "
\n"; echo "\n"; @@ -188,7 +171,15 @@ echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, '', '', $param); } echo th_order_by('username', $text['label-username'], $order_by, $order); - echo "\n"; + echo th_order_by('groups', $text['label-groups'], $order_by, $order, '', '', $param); + echo th_order_by('contact_organization', $text['label-organization'], $order_by, $order, '', '', $param); + echo th_order_by('contact_name_given', $text['label-name'], $order_by, $order, '', '', $param); + if (permission_exists('ticket_edit')) { + echo "\n"; + } + else { + echo "\n"; + } echo th_order_by('user_enabled', $text['label-enabled'], $order_by, $order, '', '', $param); echo "\n"; if (permission_exists('user_all') && $_GET['show'] == 'all') { - echo " \n"; + echo " \n"; } echo " \n"; - echo " \n"; + + echo " \n"; + echo " \n"; + + echo " \n"; + echo " \n"; echo " \n"; diff --git a/resources/app_languages.php b/resources/app_languages.php index 6ace121fe5..a684aecc68 100644 --- a/resources/app_languages.php +++ b/resources/app_languages.php @@ -441,6 +441,27 @@ $text['button-save']['sv-se'] = "Spara"; $text['button-save']['uk-ua'] = "Зберегти"; $text['button-save']['tr-tr'] = "Kaydet"; +$text['button-send']['en-us'] = "Send"; +$text['button-send']['ar-eg'] = ""; +$text['button-send']['de-at'] = ""; +$text['button-send']['de-ch'] = ""; +$text['button-send']['de-de'] = ""; +$text['button-send']['es-cl'] = ""; +$text['button-send']['es-mx'] = ""; +$text['button-send']['fr-ca'] = ""; +$text['button-send']['fr-fr'] = ""; +$text['button-send']['he-il'] = ""; +$text['button-send']['it-it'] = ""; +$text['button-send']['nl-nl'] = ""; +$text['button-send']['pl-pl'] = ""; +$text['button-send']['pt-br'] = ""; +$text['button-send']['pt-pt'] = ""; +$text['button-send']['ro-ro'] = ""; +$text['button-send']['ru-ru'] = ""; +$text['button-send']['sv-se'] = ""; +$text['button-send']['uk-ua'] = ""; +$text['button-send']['tr-tr'] = ""; + $text['button-search']['en-us'] = "Search"; $text['button-search']['ar-eg'] = ""; $text['button-search']['de-at'] = "Suchen"; //copied from de-de @@ -1175,6 +1196,47 @@ $text['label-summary']['sv-se'] = ""; $text['label-summary']['uk-ua'] = ""; $text['label-summary']['tr-tr'] = "Özet"; +$text['header-import']['en-us'] = "Import"; +$text['header-import']['ar-eg'] = ""; +$text['header-import']['de-at'] = "Importieren"; //copied from de-de +$text['header-import']['de-ch'] = "Importieren"; //copied from de-de +$text['header-import']['de-de'] = "Importieren"; +$text['header-import']['es-cl'] = "Importar"; +$text['header-import']['es-mx'] = "Importar"; //copied from es-cl +$text['header-import']['fr-ca'] = "Importer"; //copied from fr-fr +$text['header-import']['fr-fr'] = "Importer"; +$text['header-import']['he-il'] = ""; +$text['header-import']['it-it'] = ""; +$text['header-import']['nl-nl'] = ""; +$text['header-import']['pl-pl'] = "Importuj"; +$text['header-import']['pt-br'] = "Importar"; +$text['header-import']['pt-pt'] = "Importat"; +$text['header-import']['ro-ro'] = ""; +$text['header-import']['ru-ru'] = "Импорт"; +$text['header-import']['sv-se'] = "Importera"; +$text['header-import']['uk-ua'] = ""; +$text['header-import']['tr-tr'] = "İçe Aktar"; + +$text['description-import']['en-us'] = "Upload delimitted data to add multiple records."; +$text['description-import']['ar-eg'] = ""; +$text['description-import']['de-at'] = ""; +$text['description-import']['de-ch'] = ""; +$text['description-import']['de-de'] = ""; +$text['description-import']['es-cl'] = ""; +$text['description-import']['es-mx'] = ""; +$text['description-import']['fr-ca'] = ""; +$text['description-import']['fr-fr'] = ""; +$text['description-import']['he-il'] = ""; +$text['description-import']['it-it'] = ""; +$text['description-import']['nl-nl'] = ""; +$text['description-import']['pl-pl'] = ""; +$text['description-import']['pt-br'] = ""; +$text['description-import']['pt-pt'] = ""; +$text['description-import']['ro-ro'] = ""; +$text['description-import']['ru-ru'] = ""; +$text['description-import']['sv-se'] = ""; +$text['description-import']['uk-ua'] = ""; + $text['label-import_data']['en-us'] = "Data"; $text['label-import_data']['ar-eg'] = ""; $text['label-import_data']['de-at'] = "Daten"; //copied from de-de @@ -1259,6 +1321,46 @@ $text['label-import_file_upload']['sv-se'] = "Fil att ladda upp"; $text['label-import_file_upload']['uk-ua'] = "Файл для завантаження"; $text['label-import_file_upload']['tr-tr'] = "Yüklenecek Dosya"; +$text['label-from_row']['en-us'] = "From Row"; +$text['label-from_row']['ar-eg'] = ""; +$text['label-from_row']['de-at'] = ""; +$text['label-from_row']['de-ch'] = ""; +$text['label-from_row']['de-de'] = ""; +$text['label-from_row']['es-cl'] = ""; +$text['label-from_row']['es-mx'] = ""; +$text['label-from_row']['fr-ca'] = ""; +$text['label-from_row']['fr-fr'] = ""; +$text['label-from_row']['he-il'] = ""; +$text['label-from_row']['it-it'] = ""; +$text['label-from_row']['nl-nl'] = ""; +$text['label-from_row']['pl-pl'] = ""; +$text['label-from_row']['pt-br'] = ""; +$text['label-from_row']['pt-pt'] = ""; +$text['label-from_row']['ro-ro'] = ""; +$text['label-from_row']['ru-ru'] = ""; +$text['label-from_row']['sv-se'] = ""; +$text['label-from_row']['uk-ua'] = ""; + +$text['description-from_row']['en-us'] = "Start importing the data from this row."; +$text['description-from_row']['ar-eg'] = ""; +$text['description-from_row']['de-at'] = ""; +$text['description-from_row']['de-ch'] = ""; +$text['description-from_row']['de-de'] = ""; +$text['description-from_row']['es-cl'] = ""; +$text['description-from_row']['es-mx'] = ""; +$text['description-from_row']['fr-ca'] = ""; +$text['description-from_row']['fr-fr'] = ""; +$text['description-from_row']['he-il'] = ""; +$text['description-from_row']['it-it'] = ""; +$text['description-from_row']['nl-nl'] = ""; +$text['description-from_row']['pl-pl'] = ""; +$text['description-from_row']['pt-br'] = ""; +$text['description-from_row']['pt-pt'] = ""; +$text['description-from_row']['ro-ro'] = ""; +$text['description-from_row']['ru-ru'] = ""; +$text['description-from_row']['sv-se'] = ""; +$text['description-from_row']['uk-ua'] = ""; + $text['description-import_data']['en-us'] = "Copy and paste the comma delimitted data into the text area to begin the import."; $text['description-import_data']['ar-eg'] = ""; $text['description-import_data']['de-at'] = "Kopieren Sie die komma-getrennten Daten in den Textbereich um den Import zu starten."; //copied from de-de @@ -1322,26 +1424,26 @@ $text['description-import_enclosure']['sv-se'] = "Välj inkapsling av text (dubb $text['description-import_enclosure']['uk-ua'] = ""; $text['description-import_enclosure']['tr-tr'] = "Metin sonlandırmasını seçin (çift tırnak ya da hiçbir şey)."; -$text['option-yesterday']['en-us'] = "Yesterday"; -$text['option-yesterday']['ar-eg'] = ""; -$text['option-yesterday']['de-at'] = "Gestern"; //copied from de-de -$text['option-yesterday']['de-ch'] = "Gestern"; //copied from de-de -$text['option-yesterday']['de-de'] = "Gestern"; -$text['option-yesterday']['es-cl'] = "Ayer"; -$text['option-yesterday']['es-mx'] = "Ayer"; //copied from es-cl -$text['option-yesterday']['fr-ca'] = "Hier"; //copied from fr-fr -$text['option-yesterday']['fr-fr'] = "Hier"; -$text['option-yesterday']['he-il'] = ""; -$text['option-yesterday']['it-it'] = ""; -$text['option-yesterday']['nl-nl'] = ""; -$text['option-yesterday']['pl-pl'] = "Wczoraj"; -$text['option-yesterday']['pt-br'] = "Ontem"; //copied from pt-pt -$text['option-yesterday']['pt-pt'] = "Ontem"; -$text['option-yesterday']['ro-ro'] = ""; -$text['option-yesterday']['ru-ru'] = "Вчера"; -$text['option-yesterday']['sv-se'] = "Igår"; -$text['option-yesterday']['uk-ua'] = "Вчора"; -$text['option-yesterday']['tr-tr'] = "Dün"; +$text['option-last_hour']['en-us'] = "Last Hour"; +$text['option-last_hour']['ar-eg'] = ""; +$text['option-last_hour']['de-at'] = "Letzte Stunde"; //copied from de-de +$text['option-last_hour']['de-ch'] = "Letzte Stunde"; //copied from de-de +$text['option-last_hour']['de-de'] = "Letzte Stunde"; +$text['option-last_hour']['es-cl'] = "Ultima Hora"; +$text['option-last_hour']['es-mx'] = "Ultima Hora"; //copied from es-cl +$text['option-last_hour']['fr-ca'] = "Dernière Heure"; //copied from fr-fr +$text['option-last_hour']['fr-fr'] = "Dernière Heure"; +$text['option-last_hour']['he-il'] = ""; +$text['option-last_hour']['it-it'] = ""; +$text['option-last_hour']['nl-nl'] = ""; +$text['option-last_hour']['pl-pl'] = "W ostatniej godzinie"; +$text['option-last_hour']['pt-br'] = "Próxima hora"; +$text['option-last_hour']['pt-pt'] = "Última Hora"; +$text['option-last_hour']['ro-ro'] = ""; +$text['option-last_hour']['ru-ru'] = "За последний час"; +$text['option-last_hour']['sv-se'] = "Senaste Timman"; +$text['option-last_hour']['uk-ua'] = "За останню годину"; +$text['option-last_hour']['tr-tr'] = "Geçtiğimiz Saat"; $text['option-today']['en-us'] = "Today"; $text['option-today']['ar-eg'] = ""; @@ -1364,26 +1466,26 @@ $text['option-today']['sv-se'] = "Idag"; $text['option-today']['uk-ua'] = "Сьогодні"; $text['option-today']['tr-tr'] = "Bugün"; -$text['option-this_year']['en-us'] = "This Year"; -$text['option-this_year']['ar-eg'] = ""; -$text['option-this_year']['de-at'] = "Dieses Jahr"; //copied from de-de -$text['option-this_year']['de-ch'] = "Dieses Jahr"; //copied from de-de -$text['option-this_year']['de-de'] = "Dieses Jahr"; -$text['option-this_year']['es-cl'] = "Este Año"; -$text['option-this_year']['es-mx'] = "Este Año"; //copied from es-cl -$text['option-this_year']['fr-ca'] = "Cette Année"; //copied from fr-fr -$text['option-this_year']['fr-fr'] = "Cette Année"; -$text['option-this_year']['he-il'] = ""; -$text['option-this_year']['it-it'] = ""; -$text['option-this_year']['nl-nl'] = ""; -$text['option-this_year']['pl-pl'] = "W tym roku"; -$text['option-this_year']['pt-br'] = "Este ano"; -$text['option-this_year']['pt-pt'] = "Este Ano"; -$text['option-this_year']['ro-ro'] = ""; -$text['option-this_year']['ru-ru'] = "В этом году"; -$text['option-this_year']['sv-se'] = "Detta Året"; -$text['option-this_year']['uk-ua'] = "Цього року"; -$text['option-this_year']['tr-tr'] = "Bu Yıl"; +$text['option-yesterday']['en-us'] = "Yesterday"; +$text['option-yesterday']['ar-eg'] = ""; +$text['option-yesterday']['de-at'] = "Gestern"; //copied from de-de +$text['option-yesterday']['de-ch'] = "Gestern"; //copied from de-de +$text['option-yesterday']['de-de'] = "Gestern"; +$text['option-yesterday']['es-cl'] = "Ayer"; +$text['option-yesterday']['es-mx'] = "Ayer"; //copied from es-cl +$text['option-yesterday']['fr-ca'] = "Hier"; //copied from fr-fr +$text['option-yesterday']['fr-fr'] = "Hier"; +$text['option-yesterday']['he-il'] = ""; +$text['option-yesterday']['it-it'] = ""; +$text['option-yesterday']['nl-nl'] = ""; +$text['option-yesterday']['pl-pl'] = "Wczoraj"; +$text['option-yesterday']['pt-br'] = "Ontem"; //copied from pt-pt +$text['option-yesterday']['pt-pt'] = "Ontem"; +$text['option-yesterday']['ro-ro'] = ""; +$text['option-yesterday']['ru-ru'] = "Вчера"; +$text['option-yesterday']['sv-se'] = "Igår"; +$text['option-yesterday']['uk-ua'] = "Вчора"; +$text['option-yesterday']['tr-tr'] = "Dün"; $text['option-this_week']['en-us'] = "This Week"; $text['option-this_week']['ar-eg'] = ""; @@ -1406,27 +1508,6 @@ $text['option-this_week']['sv-se'] = "Denna Månaden"; $text['option-this_week']['uk-ua'] = "Цього тижня"; $text['option-this_week']['tr-tr'] = "Bu Hafta"; -$text['option-this_month']['en-us'] = "This Month"; -$text['option-this_month']['ar-eg'] = ""; -$text['option-this_month']['de-at'] = "Diesen Monat"; //copied from de-de -$text['option-this_month']['de-ch'] = "Diesen Monat"; //copied from de-de -$text['option-this_month']['de-de'] = "Diesen Monat"; -$text['option-this_month']['es-cl'] = "Este Mes"; -$text['option-this_month']['es-mx'] = "Este Mes"; //copied from es-cl -$text['option-this_month']['fr-ca'] = "ce Mois"; //copied from fr-fr -$text['option-this_month']['fr-fr'] = "ce Mois"; -$text['option-this_month']['he-il'] = ""; -$text['option-this_month']['it-it'] = ""; -$text['option-this_month']['nl-nl'] = ""; -$text['option-this_month']['pl-pl'] = "W tym miesiącu"; -$text['option-this_month']['pt-br'] = "Este mês"; -$text['option-this_month']['pt-pt'] = "Este Mês"; -$text['option-this_month']['ro-ro'] = ""; -$text['option-this_month']['ru-ru'] = "В этом месяце"; -$text['option-this_month']['sv-se'] = "Denna Månaden"; -$text['option-this_month']['uk-ua'] = "Цього місяця"; -$text['option-this_month']['tr-tr'] = "Bu Ay"; - $text['option-last_seven_days']['en-us'] = "Last 7 Days"; $text['option-last_seven_days']['ar-eg'] = ""; $text['option-last_seven_days']['de-at'] = "Letzte 7 Tage"; //copied from de-de @@ -1448,26 +1529,152 @@ $text['option-last_seven_days']['sv-se'] = "Senaste 7 Dagarna"; $text['option-last_seven_days']['uk-ua'] = "За останні 7 днів"; $text['option-last_seven_days']['tr-tr'] = "Geçtiğimiz 7 Gün"; -$text['option-last_hour']['en-us'] = "Last Hour"; -$text['option-last_hour']['ar-eg'] = ""; -$text['option-last_hour']['de-at'] = "Letzte Stunde"; //copied from de-de -$text['option-last_hour']['de-ch'] = "Letzte Stunde"; //copied from de-de -$text['option-last_hour']['de-de'] = "Letzte Stunde"; -$text['option-last_hour']['es-cl'] = "Ultima Hora"; -$text['option-last_hour']['es-mx'] = "Ultima Hora"; //copied from es-cl -$text['option-last_hour']['fr-ca'] = "Dernière Heure"; //copied from fr-fr -$text['option-last_hour']['fr-fr'] = "Dernière Heure"; -$text['option-last_hour']['he-il'] = ""; -$text['option-last_hour']['it-it'] = ""; -$text['option-last_hour']['nl-nl'] = ""; -$text['option-last_hour']['pl-pl'] = "W ostatniej godzinie"; -$text['option-last_hour']['pt-br'] = "Próxima hora"; -$text['option-last_hour']['pt-pt'] = "Última Hora"; -$text['option-last_hour']['ro-ro'] = ""; -$text['option-last_hour']['ru-ru'] = "За последний час"; -$text['option-last_hour']['sv-se'] = "Senaste Timman"; -$text['option-last_hour']['uk-ua'] = "За останню годину"; -$text['option-last_hour']['tr-tr'] = "Geçtiğimiz Saat"; +$text['option-this_month']['en-us'] = "This Month"; +$text['option-this_month']['ar-eg'] = ""; +$text['option-this_month']['de-at'] = "Diesen Monat"; //copied from de-de +$text['option-this_month']['de-ch'] = "Diesen Monat"; //copied from de-de +$text['option-this_month']['de-de'] = "Diesen Monat"; +$text['option-this_month']['es-cl'] = "Este Mes"; +$text['option-this_month']['es-mx'] = "Este Mes"; //copied from es-cl +$text['option-this_month']['fr-ca'] = "ce Mois"; //copied from fr-fr +$text['option-this_month']['fr-fr'] = "ce Mois"; +$text['option-this_month']['he-il'] = ""; +$text['option-this_month']['it-it'] = ""; +$text['option-this_month']['nl-nl'] = ""; +$text['option-this_month']['pl-pl'] = "W tym miesiącu"; +$text['option-this_month']['pt-br'] = "Este mês"; +$text['option-this_month']['pt-pt'] = "Este Mês"; +$text['option-this_month']['ro-ro'] = ""; +$text['option-this_month']['ru-ru'] = "В этом месяце"; +$text['option-this_month']['sv-se'] = "Denna Månaden"; +$text['option-this_month']['uk-ua'] = "Цього місяця"; +$text['option-this_month']['tr-tr'] = "Bu Ay"; + +$text['option-this_year']['en-us'] = "This Year"; +$text['option-this_year']['ar-eg'] = ""; +$text['option-this_year']['de-at'] = "Dieses Jahr"; //copied from de-de +$text['option-this_year']['de-ch'] = "Dieses Jahr"; //copied from de-de +$text['option-this_year']['de-de'] = "Dieses Jahr"; +$text['option-this_year']['es-cl'] = "Este Año"; +$text['option-this_year']['es-mx'] = "Este Año"; //copied from es-cl +$text['option-this_year']['fr-ca'] = "Cette Année"; //copied from fr-fr +$text['option-this_year']['fr-fr'] = "Cette Année"; +$text['option-this_year']['he-il'] = ""; +$text['option-this_year']['it-it'] = ""; +$text['option-this_year']['nl-nl'] = ""; +$text['option-this_year']['pl-pl'] = "W tym roku"; +$text['option-this_year']['pt-br'] = "Este ano"; +$text['option-this_year']['pt-pt'] = "Este Ano"; +$text['option-this_year']['ro-ro'] = ""; +$text['option-this_year']['ru-ru'] = "В этом году"; +$text['option-this_year']['sv-se'] = "Detta Året"; +$text['option-this_year']['uk-ua'] = "Цього року"; +$text['option-this_year']['tr-tr'] = "Bu Yıl"; + +$text['option-hour']['en-us'] = "Hour"; +$text['option-hour']['ar-eg'] = ""; +$text['option-hour']['de-at'] = ""; //copied from de-de +$text['option-hour']['de-ch'] = ""; //copied from de-de +$text['option-hour']['de-de'] = ""; +$text['option-hour']['es-cl'] = ""; +$text['option-hour']['es-mx'] = ""; //copied from es-cl +$text['option-hour']['fr-ca'] = ""; //copied from fr-fr +$text['option-hour']['fr-fr'] = ""; +$text['option-hour']['he-il'] = ""; +$text['option-hour']['it-it'] = ""; +$text['option-hour']['nl-nl'] = ""; +$text['option-hour']['pl-pl'] = ""; +$text['option-hour']['pt-br'] = ""; +$text['option-hour']['pt-pt'] = ""; +$text['option-hour']['ro-ro'] = ""; +$text['option-hour']['ru-ru'] = ""; +$text['option-hour']['sv-se'] = ""; +$text['option-hour']['uk-ua'] = ""; +$text['option-hour']['tr-tr'] = ""; + +$text['option-day']['en-us'] = "Day"; +$text['option-day']['ar-eg'] = ""; +$text['option-day']['de-at'] = ""; //copied from de-de +$text['option-day']['de-ch'] = ""; //copied from de-de +$text['option-day']['de-de'] = ""; +$text['option-day']['es-cl'] = ""; +$text['option-day']['es-mx'] = ""; //copied from es-cl +$text['option-day']['fr-ca'] = ""; //copied from fr-fr +$text['option-day']['fr-fr'] = ""; +$text['option-day']['he-il'] = ""; +$text['option-day']['it-it'] = ""; +$text['option-day']['nl-nl'] = ""; +$text['option-day']['pl-pl'] = ""; +$text['option-day']['pt-br'] = ""; +$text['option-day']['pt-pt'] = ""; +$text['option-day']['ro-ro'] = ""; +$text['option-day']['ru-ru'] = ""; +$text['option-day']['sv-se'] = ""; +$text['option-day']['uk-ua'] = ""; +$text['option-day']['tr-tr'] = ""; + +$text['option-week']['en-us'] = "Week"; +$text['option-week']['ar-eg'] = ""; +$text['option-week']['de-at'] = "Woche"; //copied from de-de +$text['option-week']['de-ch'] = "Woche"; //copied from de-de +$text['option-week']['de-de'] = "Woche"; +$text['option-week']['es-cl'] = "Semana"; +$text['option-week']['es-mx'] = "Semana"; //copied from es-cl +$text['option-week']['fr-ca'] = "Semaine"; //copied from fr-fr +$text['option-week']['fr-fr'] = "Semaine"; +$text['option-week']['he-il'] = ""; +$text['option-week']['it-it'] = ""; +$text['option-week']['nl-nl'] = ""; +$text['option-week']['pl-pl'] = "W tym miesiącu"; +$text['option-week']['pt-br'] = "mês"; +$text['option-week']['pt-pt'] = "Semana"; +$text['option-week']['ro-ro'] = ""; +$text['option-week']['ru-ru'] = "На этой неделе"; +$text['option-week']['sv-se'] = "Månaden"; +$text['option-week']['uk-ua'] = "Цього тижня"; +$text['option-week']['tr-tr'] = "Bu Hafta"; + +$text['option-month']['en-us'] = "Month"; +$text['option-month']['ar-eg'] = ""; +$text['option-month']['de-at'] = "Monat"; //copied from de-de +$text['option-month']['de-ch'] = "Monat"; //copied from de-de +$text['option-month']['de-de'] = "Monat"; +$text['option-month']['es-cl'] = "Mes"; +$text['option-month']['es-mx'] = "Mes"; //copied from es-cl +$text['option-month']['fr-ca'] = "Mois"; //copied from fr-fr +$text['option-month']['fr-fr'] = "Mois"; +$text['option-month']['he-il'] = ""; +$text['option-month']['it-it'] = ""; +$text['option-month']['nl-nl'] = ""; +$text['option-month']['pl-pl'] = "Miesiącu"; +$text['option-month']['pt-br'] = "Mês"; +$text['option-month']['pt-pt'] = "Mês"; +$text['option-month']['ro-ro'] = ""; +$text['option-month']['ru-ru'] = "В этом месяце"; +$text['option-month']['sv-se'] = "Denna Månaden"; +$text['option-month']['uk-ua'] = "Цього місяця"; +$text['option-month']['tr-tr'] = "Bu Ay"; + +$text['option-year']['en-us'] = "Year"; +$text['option-year']['ar-eg'] = ""; +$text['option-year']['de-at'] = "Jahr"; //copied from de-de +$text['option-year']['de-ch'] = "Jahr"; //copied from de-de +$text['option-year']['de-de'] = "Jahr"; +$text['option-year']['es-cl'] = "Año"; +$text['option-year']['es-mx'] = "Año"; //copied from es-cl +$text['option-year']['fr-ca'] = "Année"; //copied from fr-fr +$text['option-year']['fr-fr'] = "Année"; +$text['option-year']['he-il'] = ""; +$text['option-year']['it-it'] = ""; +$text['option-year']['nl-nl'] = ""; +$text['option-year']['pl-pl'] = "W tym roku"; +$text['option-year']['pt-br'] = "Ano"; +$text['option-year']['pt-pt'] = "Ano"; +$text['option-year']['ro-ro'] = ""; +$text['option-year']['ru-ru'] = "В этом году"; +$text['option-year']['sv-se'] = "Året"; +$text['option-year']['uk-ua'] = "Цього року"; +$text['option-year']['tr-tr'] = "Bu Yıl"; $text['option-default']['en-us'] = "Default"; $text['option-default']['ar-eg'] = ""; @@ -2099,6 +2306,27 @@ $text['label-order']['sv-se'] = "Ordning"; $text['label-order']['uk-ua'] = "Інше"; $text['label-order']['tr-tr'] = "Sipariş"; +$text['label-add']['en-us'] = "Add"; +$text['label-add']['ar-eg'] = "اضافة"; +$text['label-add']['de-at'] = "Hinzufügen"; //copied from de-de +$text['label-add']['de-ch'] = "Hinzufügen"; //copied from de-de +$text['label-add']['de-de'] = "Hinzufügen"; +$text['label-add']['es-cl'] = "Agregar"; +$text['label-add']['es-mx'] = "Agregar"; //copied from es-cl +$text['label-add']['fr-ca'] = "Ajouter"; //copied from fr-fr +$text['label-add']['fr-fr'] = "Ajouter"; +$text['label-add']['he-il'] = " להוסיף"; +$text['label-add']['it-it'] = "Inserisci"; +$text['label-add']['nl-nl'] = ""; +$text['label-add']['pl-pl'] = "Dodaj"; +$text['label-add']['pt-br'] = "Adicionar"; //copied from pt-pt +$text['label-add']['pt-pt'] = "Adicionar"; +$text['label-add']['ro-ro'] = "Adăuga"; +$text['label-add']['ru-ru'] = "Добавить"; +$text['label-add']['sv-se'] = "Lägg Till"; +$text['label-add']['uk-ua'] = "Додати"; +$text['label-add']['tr-tr'] = "Ekle"; + $text['label-delete']['en-us'] = "Delete"; $text['label-delete']['ar-eg'] = ""; $text['label-delete']['de-at'] = "Löschen"; //copied from de-de @@ -2120,6 +2348,46 @@ $text['label-delete']['sv-se'] = "Ta Bort"; $text['label-delete']['uk-ua'] = "Видалити"; $text['label-delete']['tr-tr'] = "Sil"; +$text['label-actions']['en-us'] = "Actions"; +$text['label-actions']['ar-eg'] = "الأفعال"; +$text['label-actions']['de-at'] = "Aktionen"; //copied from de-de +$text['label-actions']['de-ch'] = "Aktionen"; //copied from de-de +$text['label-actions']['de-de'] = "Aktionen"; +$text['label-actions']['es-cl'] = "Accións"; +$text['label-actions']['es-mx'] = "Accións"; //copied from es-cl +$text['label-actions']['fr-ca'] = "Actions"; //copied from fr-fr +$text['label-actions']['fr-fr'] = "Actions"; +$text['label-actions']['he-il'] = "פעולות"; +$text['label-actions']['it-it'] = "Azioni"; +$text['label-actions']['nl-nl'] = ""; +$text['label-actions']['pl-pl'] = "Operacje (gdzie przesłać rozmowę)."; +$text['label-actions']['pt-br'] = "Ações"; //copied from pt-pt +$text['label-actions']['pt-pt'] = "Ações"; +$text['label-actions']['ro-ro'] = ""; +$text['label-actions']['ru-ru'] = "Действия"; +$text['label-actions']['sv-se'] = "Åtgärder"; +$text['label-actions']['uk-ua'] = "Дії"; + +$text['label-context']['en-us'] = "Context"; +$text['label-context']['ar-eg'] = ""; +$text['label-context']['de-at'] = "Kontext"; //copied from de-de +$text['label-context']['de-ch'] = "Kontext"; //copied from de-de +$text['label-context']['de-de'] = "Kontext"; +$text['label-context']['es-cl'] = "Contexto"; +$text['label-context']['es-mx'] = "Contexto"; //copied from es-cl +$text['label-context']['fr-ca'] = "Contexte"; //copied from fr-fr +$text['label-context']['fr-fr'] = "Contexte"; +$text['label-context']['he-il'] = ""; +$text['label-context']['it-it'] = "Contesto"; +$text['label-context']['nl-nl'] = ""; +$text['label-context']['pl-pl'] = "Kontekst"; +$text['label-context']['pt-br'] = "Contexto"; //copied from pt-pt +$text['label-context']['pt-pt'] = "Contexto"; +$text['label-context']['ro-ro'] = ""; +$text['label-context']['ru-ru'] = "Контекст"; +$text['label-context']['sv-se'] = "Context"; +$text['label-context']['uk-ua'] = "Контекст"; + $text['label-music_on_hold']['en-us'] = "Music on Hold"; $text['label-music_on_hold']['ar-eg'] = "موسيقى المؤجلة"; $text['label-music_on_hold']['de-at'] = "Wartemusik"; //copied from de-de @@ -2698,6 +2966,206 @@ $text['label-caller_id_name']['ru-ru'] = "Caller ID Имя"; $text['label-caller_id_name']['sv-se'] = "Namnpresentation"; $text['label-caller_id_name']['uk-ua'] = "Caller ID Ім’я"; +$text['label-characters']['en-us'] = "Characters"; +$text['label-characters']['ar-eg'] = "الشخصيات"; +$text['label-characters']['de-at'] = "Zeichen"; //copied from de-de +$text['label-characters']['de-ch'] = "Zeichen"; //copied from de-de +$text['label-characters']['de-de'] = "Zeichen"; +$text['label-characters']['es-cl'] = "Caracteres"; +$text['label-characters']['es-mx'] = "Caracteres"; //copied from es-cl +$text['label-characters']['fr-ca'] = "Personnages"; //copied from fr-fr +$text['label-characters']['fr-fr'] = "Personnages"; +$text['label-characters']['he-il'] = "דמויות"; +$text['label-characters']['it-it'] = "Caratteri"; +$text['label-characters']['nl-nl'] = ""; +$text['label-characters']['pl-pl'] = "Postacie"; +$text['label-characters']['pt-br'] = "Personagens"; //copied from pt-pt +$text['label-characters']['pt-pt'] = "Personagens"; +$text['label-characters']['ro-ro'] = "caractere"; +$text['label-characters']['ru-ru'] = "символов"; +$text['label-characters']['sv-se'] = "Tecken"; +$text['label-characters']['uk-ua'] = "персонажі"; + +$text['label-numbers']['en-us'] = "Numbers"; +$text['label-numbers']['ar-eg'] = "أرقام"; +$text['label-numbers']['de-at'] = "Nummern"; //copied from de-de +$text['label-numbers']['de-ch'] = "Nummern"; //copied from de-de +$text['label-numbers']['de-de'] = "Nummern"; +$text['label-numbers']['es-cl'] = "Números"; +$text['label-numbers']['es-mx'] = "Números"; //copied from es-cl +$text['label-numbers']['fr-ca'] = "Nombres"; //copied from fr-fr +$text['label-numbers']['fr-fr'] = "Nombres"; +$text['label-numbers']['he-il'] = "מספרים"; +$text['label-numbers']['it-it'] = "Numeri"; +$text['label-numbers']['nl-nl'] = ""; +$text['label-numbers']['pl-pl'] = "Liczby"; +$text['label-numbers']['pt-br'] = "Números"; //copied from pt-pt +$text['label-numbers']['pt-pt'] = "Números"; +$text['label-numbers']['ro-ro'] = "numere"; +$text['label-numbers']['ru-ru'] = "Цифры"; +$text['label-numbers']['sv-se'] = "Nummer"; +$text['label-numbers']['uk-ua'] = "чисел"; + +$text['label-lowercase_letters']['en-us'] = "Lowercase Letters"; +$text['label-lowercase_letters']['ar-eg'] = "أحرف صغيرة"; +$text['label-lowercase_letters']['de-at'] = "Kleinbuchstaben"; //copied from de-de +$text['label-lowercase_letters']['de-ch'] = "Kleinbuchstaben"; //copied from de-de +$text['label-lowercase_letters']['de-de'] = "Kleinbuchstaben"; +$text['label-lowercase_letters']['es-cl'] = "Letras minusculas"; +$text['label-lowercase_letters']['es-mx'] = "Letras minusculas"; //copied from es-cl +$text['label-lowercase_letters']['fr-ca'] = "Minuscules"; //copied from fr-fr +$text['label-lowercase_letters']['fr-fr'] = "Minuscules"; +$text['label-lowercase_letters']['he-il'] = "אותיות קטנות"; +$text['label-lowercase_letters']['it-it'] = "Lettere Minuscole"; +$text['label-lowercase_letters']['nl-nl'] = ""; +$text['label-lowercase_letters']['pl-pl'] = "Małe litery"; +$text['label-lowercase_letters']['pt-br'] = "Letras minúsculas"; //copied from pt-pt +$text['label-lowercase_letters']['pt-pt'] = "Letras minúsculas"; +$text['label-lowercase_letters']['ro-ro'] = "Litere mici"; +$text['label-lowercase_letters']['ru-ru'] = "Строчные буквы"; +$text['label-lowercase_letters']['sv-se'] = "Gemener"; +$text['label-lowercase_letters']['uk-ua'] = "Букви нижнього регістру"; + +$text['label-uppercase_letters']['en-us'] = "Uppercase Letters"; +$text['label-uppercase_letters']['ar-eg'] = "الأحرف الكبيرة"; +$text['label-uppercase_letters']['de-at'] = "Großbuchstaben"; //copied from de-de +$text['label-uppercase_letters']['de-ch'] = "Großbuchstaben"; //copied from de-de +$text['label-uppercase_letters']['de-de'] = "Großbuchstaben"; +$text['label-uppercase_letters']['es-cl'] = "Letras mayúsculas"; +$text['label-uppercase_letters']['es-mx'] = "Letras mayúsculas"; //copied from es-cl +$text['label-uppercase_letters']['fr-ca'] = "Lettres capitales"; //copied from fr-fr +$text['label-uppercase_letters']['fr-fr'] = "Lettres capitales"; +$text['label-uppercase_letters']['he-il'] = "אותיות רישיות"; +$text['label-uppercase_letters']['it-it'] = "Lettere Maiuscole"; +$text['label-uppercase_letters']['nl-nl'] = ""; +$text['label-uppercase_letters']['pl-pl'] = "Wielkie litery"; +$text['label-uppercase_letters']['pt-br'] = "Letras maiúsculas"; //copied from pt-pt +$text['label-uppercase_letters']['pt-pt'] = "Letras maiúsculas"; +$text['label-uppercase_letters']['ro-ro'] = "Litere mari"; +$text['label-uppercase_letters']['ru-ru'] = "Заглавные буквы"; +$text['label-uppercase_letters']['sv-se'] = "Versala bokstäver"; +$text['label-uppercase_letters']['uk-ua'] = "Великі літери"; + +$text['label-special_characters']['en-us'] = "Special Characters"; +$text['label-special_characters']['ar-eg'] = "أحرف خاصة"; +$text['label-special_characters']['de-at'] = "Sonderzeichen"; //copied from de-de +$text['label-special_characters']['de-ch'] = "Sonderzeichen"; //copied from de-de +$text['label-special_characters']['de-de'] = "Sonderzeichen"; +$text['label-special_characters']['es-cl'] = "Caracteres especiales"; +$text['label-special_characters']['es-mx'] = "Caracteres especiales"; //copied from es-cl +$text['label-special_characters']['fr-ca'] = "Caractères spéciaux"; //copied from fr-fr +$text['label-special_characters']['fr-fr'] = "Caractères spéciaux"; +$text['label-special_characters']['he-il'] = "תווים מיוחדים"; +$text['label-special_characters']['it-it'] = "Caratteri Speciali"; +$text['label-special_characters']['nl-nl'] = ""; +$text['label-special_characters']['pl-pl'] = "Znaki specjalne"; +$text['label-special_characters']['pt-br'] = "Caracteres especiais"; //copied from pt-pt +$text['label-special_characters']['pt-pt'] = "Caracteres especiais"; +$text['label-special_characters']['ro-ro'] = "caractere speciale"; +$text['label-special_characters']['ru-ru'] = "Специальные символы"; +$text['label-special_characters']['sv-se'] = "Speciella Karaktärer"; +$text['label-special_characters']['uk-ua'] = "спеціальні символи"; + +$text['label-bridges']['en-us'] = 'Bridges'; +$text['label-bridges']['ar-eg'] = ''; +$text['label-bridges']['de-at'] = ''; +$text['label-bridges']['de-ch'] = ''; +$text['label-bridges']['de-de'] = ''; +$text['label-bridges']['es-cl'] = ''; +$text['label-bridges']['es-mx'] = ''; +$text['label-bridges']['fr-ca'] = ''; +$text['label-bridges']['fr-fr'] = ''; +$text['label-bridges']['he-il'] = ''; +$text['label-bridges']['it-it'] = ''; +$text['label-bridges']['nl-nl'] = ''; +$text['label-bridges']['pl-pl'] = ''; +$text['label-bridges']['pt-br'] = ''; +$text['label-bridges']['pt-pt'] = ''; +$text['label-bridges']['ro-ro'] = ''; +$text['label-bridges']['ru-ru'] = ''; +$text['label-bridges']['sv-se'] = ''; +$text['label-bridges']['uk-ua'] = ''; + +$text['label-interval']['en-us'] = "Interval"; +$text['label-interval']['ar-eg'] = ""; +$text['label-interval']['de-at'] = "Intervall"; //copied from de-de +$text['label-interval']['de-ch'] = "Intervall"; //copied from de-de +$text['label-interval']['de-de'] = "Intervall"; +$text['label-interval']['es-cl'] = "Intervalo"; +$text['label-interval']['es-mx'] = "Intervalo"; //copied from es-cl +$text['label-interval']['fr-ca'] = "Intervalle"; //copied from fr-fr +$text['label-interval']['fr-fr'] = "Intervalle"; +$text['label-interval']['he-il'] = ""; +$text['label-interval']['it-it'] = "Intervallo"; +$text['label-interval']['nl-nl'] = ""; +$text['label-interval']['pl-pl'] = "Interwał"; +$text['label-interval']['pt-br'] = "Intervalo"; //copied from pt-pt +$text['label-interval']['pt-pt'] = "Intervalo"; +$text['label-interval']['ro-ro'] = ""; +$text['label-interval']['ru-ru'] = "Интервал"; +$text['label-interval']['sv-se'] = "Intervall"; +$text['label-interval']['uk-ua'] = "Інтервал"; + +$text['label-peak']['en-us'] = "Peak"; +$text['label-peak']['ar-eg'] = ""; +$text['label-peak']['de-at'] = ""; +$text['label-peak']['de-ch'] = ""; +$text['label-peak']['de-de'] = ""; +$text['label-peak']['es-cl'] = ""; +$text['label-peak']['es-mx'] = ""; +$text['label-peak']['fr-ca'] = ""; +$text['label-peak']['fr-fr'] = ""; +$text['label-peak']['he-il'] = ""; +$text['label-peak']['it-it'] = ""; +$text['label-peak']['nl-nl'] = ""; +$text['label-peak']['pl-pl'] = ""; +$text['label-peak']['pt-br'] = ""; +$text['label-peak']['pt-pt'] = ""; +$text['label-peak']['ro-ro'] = ""; +$text['label-peak']['ru-ru'] = ""; +$text['label-peak']['sv-se'] = ""; +$text['label-peak']['uk-ua'] = ""; + +$text['label-tools']['en-us'] = "Tools"; +$text['label-tools']['ar-eg'] = "الادوات"; +$text['label-tools']['de-at'] = "Funktionen"; //copied from de-de +$text['label-tools']['de-ch'] = "Funktionen"; //copied from de-de +$text['label-tools']['de-de'] = "Funktionen"; +$text['label-tools']['es-cl'] = "Herramientas"; +$text['label-tools']['es-mx'] = "Herramientas"; //copied from es-cl +$text['label-tools']['fr-ca'] = "Outils"; //copied from fr-fr +$text['label-tools']['fr-fr'] = "Outils"; +$text['label-tools']['he-il'] = "כלים"; +$text['label-tools']['it-it'] = "Strumenti"; +$text['label-tools']['nl-nl'] = ""; +$text['label-tools']['pl-pl'] = "Narzędzia"; +$text['label-tools']['pt-br'] = "Ferramentas"; //copied from pt-pt +$text['label-tools']['pt-pt'] = "Ferramentas"; +$text['label-tools']['ro-ro'] = "Utilitare"; +$text['label-tools']['ru-ru'] = "Инструменты"; +$text['label-tools']['sv-se'] = "Verktyg"; +$text['label-tools']['uk-ua'] = "Налаштування"; + +$text['label-tickets']['en-us'] = "Tickets"; +$text['label-tickets']['ar-eg'] = ""; +$text['label-tickets']['de-at'] = ""; //copied from de-de +$text['label-tickets']['de-ch'] = ""; //copied from de-de +$text['label-tickets']['de-de'] = ""; +$text['label-tickets']['es-cl'] = ""; +$text['label-tickets']['es-mx'] = ""; //copied from es-cl +$text['label-tickets']['fr-ca'] = ""; //copied from fr-fr +$text['label-tickets']['fr-fr'] = ""; +$text['label-tickets']['he-il'] = ""; +$text['label-tickets']['it-it'] = ""; +$text['label-tickets']['nl-nl'] = ""; +$text['label-tickets']['pl-pl'] = ""; +$text['label-tickets']['pt-br'] = ""; //copied from pt-pt +$text['label-tickets']['pt-pt'] = ""; +$text['label-tickets']['ro-ro'] = ""; +$text['label-tickets']['ru-ru'] = ""; +$text['label-tickets']['sv-se'] = ""; +$text['label-tickets']['uk-ua'] = ""; + $text['description-greeting']['en-us'] = "Select the desired Greeting."; $text['description-greeting']['ar-eg'] = ""; $text['description-greeting']['de-at'] = "Geben Sie die Begrüßungs-ID an."; //copied from de-de @@ -2865,4 +3333,24 @@ $text['description-enabled']['sv-se'] = ""; $text['description-enabled']['uk-ua'] = ""; $text['description-enabled']['tr-tr'] = ""; +$text['description-enter-context']['en-us'] = "Enter the context."; +$text['description-enter-context']['ar-eg'] = ""; +$text['description-enter-context']['de-at'] = "Geben Sie den Kontext ein."; //copied from de-de +$text['description-enter-context']['de-ch'] = "Geben Sie den Kontext ein."; //copied from de-de +$text['description-enter-context']['de-de'] = "Geben Sie den Kontext ein."; +$text['description-enter-context']['es-cl'] = "Ingrese un contexto"; +$text['description-enter-context']['es-mx'] = "Ingrese un contexto"; //copied from es-cl +$text['description-enter-context']['fr-ca'] = "Entrez le contexte"; //copied from fr-fr +$text['description-enter-context']['fr-fr'] = "Entrez le contexte"; +$text['description-enter-context']['he-il'] = ""; +$text['description-enter-context']['it-it'] = "Inserire il contesto."; +$text['description-enter-context']['nl-nl'] = ""; +$text['description-enter-context']['pl-pl'] = "Wprowadź kontekst"; +$text['description-enter-context']['pt-br'] = "Insira um contexto"; +$text['description-enter-context']['pt-pt'] = "Introduza um contexto."; +$text['description-enter-context']['ro-ro'] = ""; +$text['description-enter-context']['ru-ru'] = "Введите контекст."; +$text['description-enter-context']['sv-se'] = "Ange Context"; +$text['description-enter-context']['uk-ua'] = ""; + ?> diff --git a/resources/captcha/img.php b/resources/captcha/img.php deleted file mode 100644 index 21e8609a85..0000000000 --- a/resources/captcha/img.php +++ /dev/null @@ -1,124 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "config.php"; -error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings - -//start the session -ini_set("session.cookie_httponly", True); -if (!isset($_SESSION)) { session_start(); } - -// Captcha verification image ----------------------- -// Description this page is used to verify the captcha - -$_SESSION["captcha"] = substr(md5(date('r')), 0, 6); -$text = $_SESSION["captcha"]; -//echo $text; -exit; - - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function dircontents($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - while ($file = readdir ($dirlist)) { - if ($file != '.' && $file != '..') { - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - //do nothing - } - else { - $mod_array[] = end($level); - } - } - } - - closedir($dirlist); - return $mod_array; -} - -$fontarray = dircontents($pathtofonts); -//print_r($fontarray); - -function make_seed() -{ - list($usec, $sec) = explode(' ', microtime()); - return (float) $sec + ((float) $usec * 100000); -} -srand(make_seed()); -$random = (rand()%count($fontarray)); -$font = $pathtofonts.$fontarray[$random]; -//echo $font; - -//echo phpinfo(); -//exit; - -$fontsize = 16; -if(@$_GET['fontsize']) { - $fontsize = $_GET['fontsize']; -} - -//picked up from a note at http://www.php.net/imagettfbbox -function imagettfbbox_custom($size, $angle, $font, $text) { - $dummy = imagecreate(1, 1); - $black = imagecolorallocate($dummy, 0, 0, 0); - $bbox = imagettftext($dummy, $size, $angle, 0, 0, $black, $font, $text); - imagedestroy($dummy); - return $bbox; -} - -// Create the image -$size = imagettfbbox_custom($fontsize, 0, $font, $text); -$width = $size[2] + $size[0] + 8; -$height = abs($size[1]) + abs($size[7]); -//$width = 200; -//$height = 200; - -$im = imagecreate($width, $height); - -$colourBlack = imagecolorallocate($im, 255, 255, 255); -imagecolortransparent($im, $colourBlack); - -// Create some colors -$white = imagecolorallocate($im, 255, 255, 255); -$black = imagecolorallocate($im, 0, 0, 0); - -// Add the text -imagefttext($im, $fontsize, 0, 0, abs($size[5]), $black, $font, $text); - -// Set the content-type -header("Content-type: image/png"); -// Using imagepng() results in clearer text compared with -imagepng($im); -imagedestroy($im); -?> diff --git a/resources/check_auth.php b/resources/check_auth.php index eec0180c6d..03d4fd74a8 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -100,13 +100,13 @@ //redirect the user to the login page $target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"]; - messages::add($text['message-invalid_credentials'], 'negative'); + message::add($text['message-invalid_credentials'], 'negative'); header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path)); exit; } //get the groups assigned to the user and then set the groups in $_SESSION["groups"] - $sql = "SELECT * FROM v_group_users "; + $sql = "SELECT * FROM v_user_groups "; //$sql .= "where domain_uuid='".$domain_uuid."' "; //$sql .= "and user_uuid='".$_SESSION["user_uuid"]."' "; $sql .= "where domain_uuid=:domain_uuid "; diff --git a/resources/classes/cache.php b/resources/classes/cache.php index 249bbb93df..80339e355f 100644 --- a/resources/classes/cache.php +++ b/resources/classes/cache.php @@ -109,14 +109,15 @@ class cache { //cache method file if ($_SESSION['cache']['method']['text'] == "file") { - $key = str_replace(":", ".", $key); + //change the delimiter + $key = str_replace(":", ".", $key); // connect to event socket $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); if ($fp === false) { return false; } - + //send a custom event $event = "sendevent CUSTOM\n"; $event .= "Event-Name: CUSTOM\n"; @@ -124,7 +125,7 @@ class cache { $event .= "API-Command: cache\n"; $event .= "API-Command-Argument: delete ".$key."\n"; event_socket_request($fp, $event); - + //remove the local files if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) { unlink($_SESSION['cache']['location']['text'] . "/" . $key); @@ -149,7 +150,7 @@ class cache { if ($fp === false) { return false; } - + //send a custom event $event = "sendevent CUSTOM\n"; $event .= "Event-Name: CUSTOM\n"; @@ -157,11 +158,11 @@ class cache { $event .= "API-Command: memcache\n"; $event .= "API-Command-Argument: flush\n"; event_socket_request($fp, $event); - + //run the memcache $command = "memcache flush"; $result = event_socket_request($fp, 'api '.$command); - + //close event socket fclose($fp); diff --git a/resources/classes/captcha.php b/resources/classes/captcha.php new file mode 100644 index 0000000000..28462857c0 --- /dev/null +++ b/resources/classes/captcha.php @@ -0,0 +1,161 @@ + + Portions created by the Initial Developer are Copyright (C) 2019 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ + +/** + * captcha class + * + * @method string get + */ +class captcha { + + /** + * Called when the object is created + */ + //public $db; + //public $domain_uuid; + public $code; + + /** + * Class constructor + */ + public function __construct() { + + } + + /** + * Called when there are no references to a particular object + * unset the variables used in the class + */ + public function __destruct() { + foreach ($this as $key => $value) { + unset($this->$key); + } + } + + /** + * Create the captcha image + * @var string $code + */ + public function image_captcha() { + + //includes + include "root.php"; + require_once "config.php"; + require_once "resources/functions.php"; + error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings + + //start the session + ini_set("session.cookie_httponly", True); + if (!isset($_SESSION)) { session_start(); } + + //$_SESSION["captcha"] = substr(md5(uuid()), 0, 6); + //$text = $_SESSION["captcha"]; + $text = $this->code; + + // Set the font path + $font_path = $_SERVER["DOCUMENT_ROOT"]."/resources/captcha/fonts"; + + // Array of fonts + //$fonts[] = 'ROUGD.TTF'; + //$fonts[] = 'Zebra.ttf'; + //$fonts[] = 'hanshand.ttf'; + $fonts = glob($font_path.'/*.[tT][tT][fF]'); + //print_r($fonts); + //exit; + + // Randomize the fonts + srand(uuid()); + $random = (rand()%count($fonts)); + //$font = $font_path.'/'.$fonts[$random]; + $font = $fonts[$random]; + + // Set the font size + $font_size = 16; + if(@$_GET['fontsize']) { + $font_size = $_GET['fontsize']; + } + + // Create the image + $size = $this->image_size($font_size, 0, $font, $text); + $width = $size[2] + $size[0] + 8; + $height = abs($size[1]) + abs($size[7]); + //$width = 100; + //$height = 40; + + // Set the image size + $image = imagecreate($width, $height); + + // Create some colors + $white = imagecolorallocate($image, 255, 255, 255); + $black = imagecolorallocate($image, 0, 0, 0); + + // Set the transparent color + imagecolortransparent($image, $white); + + // Add the text + imagefttext($image, $font_size, 0, 0, abs($size[5]), $black, $font, $text); + + // Set the content-type + //header("Content-type: image/png"); + //imagepng($image)); + + ob_start(); + imagepng($image); + $image_buffer = ob_get_clean(); + //echo "\n"; + imagedestroy($image); + return $image_buffer; + } + + /** + * return the image in base64 + */ + public function image_base64() { + return base64_encode($this->image_captcha()); + } + + /** + * Get the image size + * @var string $value string image size + */ + private function image_size($size, $angle, $font, $text) { + $dummy = imagecreate(1, 1); + $black = imagecolorallocate($dummy, 0, 0, 0); + $bbox = imagettftext($dummy, $size, $angle, 0, 0, $black, $font, $text); + imagedestroy($dummy); + return $bbox; + } + +} + +/* +$captcha = new captcha; +$captcha->code = 'abcdefg'; +$image_base64 = $captcha->base64(); +echo "\n"; +*/ + +?> diff --git a/resources/classes/database.php b/resources/classes/database.php index 90a154302e..31fb1ad89c 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2010 - 2017 + Copyright (C) 2010 - 2019 All Rights Reserved. Contributor(s): @@ -450,20 +450,47 @@ include "root.php"; } // Use this function to execute complex queries - public function execute() { + public function execute($sql, $parameters = null) { //connect to the database if needed if (!$this->db) { $this->connect(); } - //get data from the database - $prep_statement = $this->db->prepare($this->sql); - if ($prep_statement) { - $prep_statement->execute(); + //set the error mode + $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + + //execute the query, and return the results + try { + $prep_statement = $this->db->prepare($sql); + if (is_array($parameters)) { + $prep_statement->execute($parameters); + } + else { + $prep_statement->execute(); + } + $message["message"] = "OK"; + $message["code"] = "200"; + $message["sql"] = $sql; + if (is_array($parameters)) { + $message["parameters"] = $parameters; + } + $this->message = $message; + //$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + //unset($prep_statement); return $prep_statement->fetchAll(PDO::FETCH_ASSOC); } - else { + catch(PDOException $e) { + $message["message"] = "Bad Request"; + $message["code"] = "400"; + $message["error"]["message"] = $e->getMessage(); + if ($this->debug["sql"]) { + $message["sql"] = $sql; + } + if (is_array($parameters)) { + $message["parameters"] = $parameters; + } + $this->message = $message; return false; } } @@ -636,60 +663,6 @@ include "root.php"; $this->connect(); } - //sanitize the table name - $this->table = preg_replace('#[^a-zA-Z0-9_\-]#', '', $this->table); - - //delete from the database - if (isset($this->table) && isset($this->where)) { - $i = 0; - $sql = "delete from ".$this->table." "; - if (is_array($this->where)) { - foreach($this->where as $row) { - //sanitize the name - $row['name'] = preg_replace('#[^a-zA-Z0-9_\-]#', '', $row['name']); - - //validate the operator - switch ($row['operator']) { - case "<": break; - case ">": break; - case "<=": break; - case ">=": break; - case "=": break; - case ">=": break; - case "<>": break; - case "!=": break; - default: - //invalid operator - return false; - } - - //build the sql - if ($i == 0) { - //$sql .= $row['name']." ".$row['operator']." '".$row['value']."' "; - $sql .= "where ".$row['name']." ".$row['operator']." :".$row['name']." "; - } - else { - //$sql .= $row['name']." ".$row['operator']." '".$row['value']."' "; - $sql .= "and ".$row['name']." ".$row['operator']." :".$row['name']." "; - } - - //add the name and value to the params array - $params[$row['name']] = $row['value']; - - //increment $i - $i++; - } - } - //echo $sql."
\n"; - $prep_statement = $this->db->prepare($sql); - $prep_statement->execute($params); - unset($sql, $this->where); - return; - } - - //return the array - if (!is_array($array)) { echo "not an array"; return false; } - //set the message id $m = 0; @@ -697,11 +670,9 @@ include "root.php"; if (!isset($this->app_name)) { $this->app_name = $this->name; } - - //normalize the array structure - //$new_array = $this->normalize_array($array, $this->name); - //unset($array); - $new_array = $array; + + //set the table prefix + $table_prefix = 'v_'; //debug sql $this->debug["sql"] = true; @@ -711,339 +682,82 @@ include "root.php"; //debug info //echo "
\n";
-					//print_r($new_array);
+					//print_r($array);
 					//echo "
\n"; //exit; - //get the $apps array from the installed apps from the core and mod directories - //$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/$schema_name/app_config.php"); - /* - $x = 0; - if (is_array($config_list)) { - foreach ($config_list as &$config_path) { - include($config_path); - $x++; - } - } - $tables = $apps[0]['db']; - if (is_array($tables)) { - foreach ($tables as &$row) { - //print_r($row); - $table = $row['table']; - echo $table."\n"; - foreach ($row['fields'] as &$field) { - if (isset($field['key']['type'])) { - print_r($field); - } + //get the current data + foreach($array as $table_name => $rows) { + foreach($rows as $row) { + $i = 0; + $sql = "select * from ".$table_prefix.$table_name." "; + foreach($row as $field_name => $field_value) { + if ($i == 0) { $sql .= "where "; } else { $sql .= "and "; } + $sql .= $field_name." = :".$field_name." "; + $parameters[$field_name] = $field_value; + $i++; } + $old_array[$table_name] = $this->execute($sql, $parameters); + unset($parameters); } } - */ - //loop through the array - if (is_array($new_array)) { - foreach ($new_array as $schema_name => $schema_array) { + //start the atomic transaction + $this->db->beginTransaction(); - $this->name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $schema_name); - if (is_array($schema_array)) { - foreach ($schema_array as $schema_id => $array) { - - //set the variables - $table_name = "v_".$this->name; - $parent_key_name = $this->singular($this->name)."_uuid"; - - //if the uuid is set then set parent key exists and value - //determine if the parent_key_exists - $parent_key_exists = false; - if (isset($array[$parent_key_name])) { - $parent_key_value = $array[$parent_key_name]; - $parent_key_exists = true; - } - else { - if (isset($this->uuid)) { - $parent_key_exists = true; - $parent_key_value = $this->uuid; - } - else { - $parent_key_value = uuid(); - } - } - - //get the parent field names - $parent_field_names = array(); - if (is_array($array)) { - foreach ($array as $key => $value) { - if (!is_array($value)) { - $parent_field_names[] = $key; - } - } - } - - //get the data before the delete - if ($parent_key_exists) { - $sql = "SELECT * FROM ".$table_name." "; - $sql .= "WHERE ".$parent_key_name." = '".$parent_key_value."' "; - $prep_statement = $this->db->prepare($sql); - if ($prep_statement) { - //get the data - try { - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - } - catch(PDOException $e) { - echo 'Caught exception: ', $e->getMessage(), "

\n"; - echo $sql; - exit; - } - - //set the action - if (count($result) > 0) { - $action = "delete"; - $old_array[$schema_name] = $result; - } - else { - $action = ""; - } - } - unset($prep_statement); - unset($result); - } - else { - $action = ""; - } - - //delete a specific uuid - if ($action == "delete") { - if (permission_exists($this->singular($this->name).'_delete') && strlen($parent_key_value) > 0 - && ($parent_key_exists) && is_uuid($parent_key_value)) { - //set the table name - $table_name = 'v_'.$this->name; - - //parent data - $sql = "DELETE FROM $table_name "; - $sql .= "WHERE $parent_key_name = '$parent_key_value' ;"; - //echo $sql; - //$sql = "DELETE FROM :table_name "; - //$sql .= "WHERE :parent_key_name = ':parent_key_value'; "; - //$statement = $this->db->prepare($sql); - //$statement->bindParam(':table_name', $table_name); - //$statement->bindParam(':parent_key_name', $parent_key_name); - //$statement->bindParam(':parent_key_value', $parent_key_value); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - //$statement->execute(); - $message["message"] = "OK"; - $message["code"] = "200"; - $message["uuid"] = $parent_key_value; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $parent_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - unset($sql); - unset($statement); - } - catch(PDOException $e) { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - } - else { - $message["name"] = $this->name; - $message["message"] = "Forbidden, does not have '".$this->singular($this->name)."_delete'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } - - //unset the variables - unset($sql, $action); - - //child data - if (is_array($array)) { - foreach ($array as $key => $value) { - - if (is_array($value)) { - $table_name = "v_".$key; - foreach ($value as $id => $row) { - //prepare the variables - $child_name = $this->singular($key); - $child_key_name = $child_name."_uuid"; - - //determine if the parent key exists in the child array - $parent_key_exists = false; - if (!isset($array[$parent_key_name])) { - $parent_key_exists = true; - } - - //determine if the uuid exists - $uuid_exists = false; - if (is_array($row)) { - foreach ($row as $k => $v) { - if ($child_key_name == $k) { - if (strlen($v) > 0) { - $child_key_value = $v; - $uuid_exists = true; - break; - } - } - else { - $uuid_exists = false; - } - } - } - - //get the child field names - $child_field_names = array(); - if (is_array($row)) { - foreach ($row as $k => $v) { - if (!is_array($v)) { - $child_field_names[] = $k; - } - } - } - - //get the child data - if ($uuid_exists) { - $sql = "SELECT * FROM ".$table_name." "; - $sql .= "WHERE ".$child_key_name." = '".$child_key_value."' "; - $prep_statement = $this->db->prepare($sql); - if ($prep_statement) { - //get the data - $prep_statement->execute(); - $child_array = $prep_statement->fetch(PDO::FETCH_ASSOC); - //set the action - if (is_array($child_array)) { - $action = "delete"; - } - else { - $action = ""; - } - //add to the parent array - if (is_array($child_array)) { - $old_array[$schema_name][$schema_id][$key][] = $child_array; - } - } - unset($prep_statement); - } - else { - $action = ""; - } - - //delete the child data - if ($action == "delete") { - if (permission_exists($child_name.'_delete')) { - $sql = "DELETE FROM ".$table_name." "; - $sql .= "WHERE ".$child_key_name." = '".$child_key_value."' "; - if (strlen($parent_key_value) > 0) { $sql .= "AND ".$parent_key_name." = '".$parent_key_value."' "; } - //$sql = "DELETE FROM :table_name "; - //$sql .= "WHERE :child_key_name = ':child_key_value' "; - //if (strlen($parent_key_value) > 0) { $sql .= "AND :parent_key_name = ':parent_key_value' }"; - //$statement = $this->db->prepare($sql); - //$statement->bindParam(':table_name', $table_name); - //$statement->bindParam(':parent_key_name', $parent_key_name); - //$statement->bindParam(':parent_key_value', $parent_key_value); - //$statement->bindParam(':child_key_name', $child_key_name); - //$statement->bindParam(':child_key_value', $child_key_value); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - //$statement->execute(); - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $child_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - if ($message["code"] = "200") { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - } - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - } - else { - $message["name"] = $child_name; - $message["message"] = "Forbidden, does not have '${child_name}_delete'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } //action update - - //unset the variables - unset($sql, $action, $child_key_name, $child_key_value); - } // foreach value - - } //is array - } //foreach array - - } //is_array array - } // foreach schema_array - - } //is_array $schema_array - } // foreach main array - } - - //return the before and after data - //log this in the future - //if (is_array($old_array)) { - //normalize the array structure - //$old_array = $this->normalize_array($old_array, $this->name); - - //debug info - //echo "
\n";
-							//print_r($old_array);
-							//echo "
\n"; - //exit; - //} - //$message["new"] = $new_array; - //$message["new"]["md5"] = md5(json_encode($new_array)); - $this->message = $message; + //delete the current data + foreach($array as $table_name => $rows) { + //echo "table: ".$table_name."\n"; + foreach($rows as $row) { + if (permission_exists($this->singular($table_name).'_delete')) { + $sql = "delete from ".$table_prefix.$table_name." "; + $i = 0; + foreach($row as $field_name => $field_value) { + //echo "field: ".$field_name." = ".$field_value."\n"; + if ($i == 0) { $sql .= "where "; } else { $sql .= "and "; } + $sql .= $field_name." = :".$field_name." "; + $parameters[$field_name] = $field_value; + $i++; + } + try { + $this->execute($sql, $parameters); + $message["message"] = "OK"; + $message["code"] = "200"; + $message["uuid"] = $id; + $message["details"][$m]["name"] = $this->name; + $message["details"][$m]["message"] = "OK"; + $message["details"][$m]["code"] = "200"; + //$message["details"][$m]["uuid"] = $parent_key_value; + if ($this->debug["sql"]) { + $message["details"][$m]["sql"] = $sql; + } + $this->message = $message; + $m++; + unset($sql); + unset($statement); + } + catch(PDOException $e) { + $message["message"] = "Bad Request"; + $message["code"] = "400"; + $message["details"][$m]["name"] = $this->name; + $message["details"][$m]["message"] = $e->getMessage(); + $message["details"][$m]["code"] = "400"; + if ($this->debug["sql"]) { + $message["details"][$m]["sql"] = $sql; + } + $this->message = $message; + $m++; + } + unset($parameters); + } //if permission + } //foreach rows + } //foreach $array //commit the atomic transaction - //$this->db->commit(); + $this->db->commit(); //set the action if not set - if (strlen($action) == 0) { - if (is_array($old_array)) { - $transaction_type = 'update'; - } - else { - $transaction_type = 'add'; - } - } - else { - $transaction_type = $action; - } + $transaction_type = 'delete'; //get the UUIDs $user_uuid = $_SESSION['user_uuid']; @@ -1060,7 +774,9 @@ include "root.php"; if (strlen($this->app_uuid) > 0) { $sql .= "app_uuid, "; } - $sql .= "app_name, "; + if (strlen($this->app_name) > 0) { + $sql .= "app_name, "; + } $sql .= "transaction_code, "; $sql .= "transaction_address, "; $sql .= "transaction_type, "; @@ -1074,31 +790,51 @@ include "root.php"; $sql .= "'".uuid()."', "; $sql .= "'".$this->domain_uuid."', "; if (strlen($user_uuid) > 0) { - $sql .= "'".$user_uuid."', "; + $sql .= ":user_uuid, "; } if (strlen($this->app_uuid) > 0) { - $sql .= "'".$this->app_uuid."', "; + $sql .= ":app_uuid, "; + } + if (strlen($this->app_name) > 0) { + $sql .= ":app_name, "; } - $sql .= "'".$this->app_name."', "; $sql .= "'".$message["code"]."', "; - $sql .= "'".$_SERVER['REMOTE_ADDR']."', "; + $sql .= ":remote_address, "; $sql .= "'".$transaction_type."', "; $sql .= "now(), "; if (is_array($old_array)) { - $sql .= "'".check_str(json_encode($old_array, JSON_PRETTY_PRINT))."', "; + $sql .= ":transaction_old, "; } else { $sql .= "null, "; } if (is_array($new_array)) { - $sql .= "'".check_str(json_encode($new_array, JSON_PRETTY_PRINT))."', "; + $sql .= ":transaction_new, "; } else { $sql .= "null, "; } - $sql .= "'".check_str(json_encode($this->message, JSON_PRETTY_PRINT))."' "; + $sql .= ":transaction_result "; $sql .= ")"; - $this->db->exec(check_sql($sql)); + $statement = $this->db->prepare($sql); + if (strlen($user_uuid) > 0) { + $statement->bindParam(':user_uuid', $user_uuid); + } + if (strlen($this->app_uuid) > 0) { + $statement->bindParam(':app_uuid', $this->app_uuid); + } + if (strlen($this->app_name) > 0) { + $statement->bindParam(':app_name', $this->app_name); + } + $statement->bindParam(':remote_address', $_SERVER['REMOTE_ADDR']); + if (is_array($old_array)) { + $statement->bindParam(':transaction_old', json_encode($old_array, JSON_PRETTY_PRINT)); + } + if (is_array($new_array)) { + $statement->bindParam(':transaction_new', json_encode($new_array, JSON_PRETTY_PRINT)); + } + $statement->bindParam(':transaction_result', json_encode($this->message, JSON_PRETTY_PRINT)); + $statement->execute(); unset($sql); } } //delete @@ -1170,42 +906,48 @@ include "root.php"; } //count - public function select($sql) { + public function select($sql, $parameters = null) { + //connect to the database if needed if (!$this->db) { $this->connect(); } + + //set the error mode + $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + //execute the query, and return the results try { - $prep_statement = $this->db->prepare(check_sql($sql)); - $prep_statement->execute(); + $prep_statement = $this->db->prepare($sql); + if (is_array($parameters)) { + $prep_statement->execute($parameters); + } + else { + $prep_statement->execute(); + } $message["message"] = "OK"; $message["code"] = "200"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; + $message["sql"] = $sql; + if (is_array($parameters)) { + $message["parameters"] = $parameters; } $this->message = $message; - $this->result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset($prep_statement); - $m++; - return $this; + //$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + //unset($prep_statement); + return $prep_statement->fetchAll(PDO::FETCH_ASSOC); } catch(PDOException $e) { $message["message"] = "Bad Request"; $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; + $message["error"]["message"] = $e->getMessage(); if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; + $message["sql"] = $sql; + } + if (is_array($parameters)) { + $message["parameters"] = $parameters; } $this->message = $message; - $this->result = ''; - $m++; - return $this; + return false; } } //select @@ -1946,62 +1688,94 @@ include "root.php"; //log the transaction results if (file_exists($_SERVER["PROJECT_ROOT"]."/app/database_transactions/app_config.php")) { - $sql = "insert into v_database_transactions "; - $sql .= "("; - $sql .= "database_transaction_uuid, "; - $sql .= "domain_uuid, "; - if (strlen($user_uuid) > 0) { - $sql .= "user_uuid, "; + try { + $sql = "insert into v_database_transactions "; + $sql .= "("; + $sql .= "database_transaction_uuid, "; + $sql .= "domain_uuid, "; + if (strlen($user_uuid) > 0) { + $sql .= "user_uuid, "; + } + if (strlen($this->app_uuid) > 0) { + $sql .= "app_uuid, "; + } + if (strlen($this->app_name) > 0) { + $sql .= "app_name, "; + } + $sql .= "transaction_code, "; + $sql .= "transaction_address, "; + $sql .= "transaction_type, "; + $sql .= "transaction_date, "; + $sql .= "transaction_old, "; + $sql .= "transaction_new, "; + $sql .= "transaction_result "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'".uuid()."', "; + if (is_null($this->domain_uuid)) { + $sql .= "null, "; + } + else { + $sql .= "'".$this->domain_uuid."', "; + } + if (strlen($user_uuid) > 0) { + $sql .= ":user_uuid, "; + } + if (strlen($this->app_uuid) > 0) { + $sql .= ":app_uuid, "; + } + if (strlen($this->app_name) > 0) { + $sql .= ":app_name, "; + } + $sql .= "'".$message["code"]."', "; + $sql .= ":remote_address, "; + $sql .= "'".$transaction_type."', "; + $sql .= "now(), "; + if (is_array($old_array)) { + $sql .= ":transaction_old, "; + } + else { + $sql .= "null, "; + } + if (is_array($new_array)) { + $sql .= ":transaction_new, "; + } + else { + $sql .= "null, "; + } + $sql .= ":transaction_result "; + $sql .= ")"; + $statement = $this->db->prepare($sql); + if (strlen($user_uuid) > 0) { + $statement->bindParam(':user_uuid', $user_uuid); + } + if (strlen($this->app_uuid) > 0) { + $statement->bindParam(':app_uuid', $this->app_uuid); + } + if (strlen($this->app_name) > 0) { + $statement->bindParam(':app_name', $this->app_name); + } + $statement->bindParam(':remote_address', $_SERVER['REMOTE_ADDR']); + if (is_array($old_array)) { + $old_json = json_encode($old_array, JSON_PRETTY_PRINT); + $statement->bindParam(':transaction_old', $old_json); + } + if (is_array($new_array)) { + $new_json = json_encode($new_array, JSON_PRETTY_PRINT); + $statement->bindParam(':transaction_new', $new_json); + } + $message = json_encode($this->message, JSON_PRETTY_PRINT); + $statement->bindParam(':transaction_result', $message); + $statement->execute(); + unset($sql); } - if (strlen($this->app_uuid) > 0) { - $sql .= "app_uuid, "; + catch(PDOException $e) { + echo $e->getMessage(); + exit; } - $sql .= "app_name, "; - $sql .= "transaction_code, "; - $sql .= "transaction_address, "; - $sql .= "transaction_type, "; - $sql .= "transaction_date, "; - $sql .= "transaction_old, "; - $sql .= "transaction_new, "; - $sql .= "transaction_result "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - if (is_null($this->domain_uuid)) { - $sql .= "null, "; - } - else { - $sql .= "'".$this->domain_uuid."', "; - } - if (strlen($user_uuid) > 0) { - $sql .= "'".$user_uuid."', "; - } - if (strlen($this->app_uuid) > 0) { - $sql .= "'".$this->app_uuid."', "; - } - $sql .= "'".$this->app_name."', "; - $sql .= "'".$message["code"]."', "; - $sql .= "'".$_SERVER['REMOTE_ADDR']."', "; - $sql .= "'".$transaction_type."', "; - $sql .= "now(), "; - if (is_array($old_array)) { - $sql .= "'".check_str(json_encode($old_array, JSON_PRETTY_PRINT))."', "; - } - else { - $sql .= "null, "; - } - if (is_array($new_array)) { - $sql .= "'".check_str(json_encode($new_array, JSON_PRETTY_PRINT))."', "; - } - else { - $sql .= "null, "; - } - $sql .= "'".check_str(json_encode($this->message, JSON_PRETTY_PRINT))."' "; - $sql .= ")"; - $this->db->exec(check_sql($sql)); - unset($sql); } + } //save method //define singular function to convert a word in english to singular diff --git a/resources/classes/destinations.php b/resources/classes/destinations.php index e1a5eaf8be..39e9eb490c 100644 --- a/resources/classes/destinations.php +++ b/resources/classes/destinations.php @@ -287,7 +287,199 @@ class destinations { } /** - * delete destinations + * Get all the destinations + * @var string $destination_type can be ivr, dialplan, call_center_contact or bridge + */ + public function all($destination_type) { + + //set the global variables + global $db_type; + + //get the destinations + if (!is_array($this->destinations)) { + + //get the array from the app_config.php files + $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php"); + $x = 0; + foreach ($config_list as &$config_path) { + include($config_path); + $x++; + } + $i = 0; + foreach ($apps as $x => &$app) { + if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) { + $this->destinations[] = $row; + } + } + + //put the array in order + foreach ($this->destinations as $row) { + $option_groups[] = $row['label']; + } + array_multisort($option_groups, SORT_ASC, $this->destinations); + + //add the sql and data to the array + $x = 0; + foreach ($this->destinations as $row) { + if ($row['type'] = 'sql') { + if (isset($row['sql'])) { + if (is_array($row['sql'])) { + $sql = trim($row['sql'][$db_type])." "; + } + else { + $sql = trim($row['sql'])." "; + } + } + else { + $field_count = count($row['field']); + $fields = ''; + $c = 1; + foreach ($row['field'] as $key => $value) { + if ($field_count != $c) { $delimiter = ','; } else { $delimiter = ''; } + $fields .= $value." as ".$key.$delimiter." "; + $c++; + } + $sql = "select ".$fields; + $sql .= " from v_".$row['name']." "; + } + if (isset($row['where'])) { + $sql .= trim($row['where'])." "; + } + $sql .= "order by ".trim($row['order_by']); + $sql = str_replace("\${domain_uuid}", $_SESSION['domain_uuid'], $sql); + $sql = trim($sql); + $statement = $this->db->prepare($sql); + $statement->execute(); + $result = $statement->fetchAll(PDO::FETCH_NAMED); + unset($statement); + + $this->destinations[$x]['result']['sql'] = $sql; + $this->destinations[$x]['result']['data'] = $result; + } + $x++; + } + $this->destinations[$x]['type'] = 'array'; + $this->destinations[$x]['label'] = 'other'; + $this->destinations[$x]['name'] = 'dialplans'; + $this->destinations[$x]['field']['name'] = "name"; + $this->destinations[$x]['field']['destination'] = "destination"; + $this->destinations[$x]['select_value']['dialplan'] = "transfer:\${destination}"; + $this->destinations[$x]['select_value']['ivr'] = "menu-exec-app:transfer \${destination}"; + $this->destinations[$x]['select_label'] = "\${name}"; + $y = 0; + $this->destinations[$x]['result']['data'][$y]['label'] = 'check_voicemail'; + $this->destinations[$x]['result']['data'][$y]['name'] = '*98'; + $this->destinations[$x]['result']['data'][$y]['destination'] = '*98 XML ${context}'; + $y++; + $this->destinations[$x]['result']['data'][$y]['label'] = 'company_directory'; + $this->destinations[$x]['result']['data'][$y]['name'] = '*411'; + $this->destinations[$x]['result']['data'][$y]['destination'] = '*411 XML ${context}'; + $y++; + $this->destinations[$x]['result']['data'][$y]['label'] = 'hangup'; + $this->destinations[$x]['result']['data'][$y]['name'] = 'hangup'; + $this->destinations[$x]['result']['data'][$y]['application'] = 'hangup'; + $this->destinations[$x]['result']['data'][$y]['destination'] = ''; + $y++; + $this->destinations[$x]['result']['data'][$y]['label'] = 'record'; + $this->destinations[$x]['result']['data'][$y]['name'] = '*732'; + $this->destinations[$x]['result']['data'][$y]['destination'] = '*732 XML ${context}'; + $y++; + } + + //remove special characters from the name + $destination_id = str_replace("]", "", $destination_name); + $destination_id = str_replace("[", "_", $destination_id); + + //set default to false + $select_found = false; + + foreach ($this->destinations as $row) { + + $name = $row['name']; + $label = $row['label']; + $destination = $row['field']['destination']; + + //add multi-lingual support + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$name."/app_languages.php")) { + $language2 = new text; + $text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name); + } + + if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) { + $label2 = $label; + foreach ($row['result']['data'] as $data) { + $select_value = $row['select_value'][$destination_type]; + $select_label = $row['select_label']; + foreach ($row['field'] as $key => $value) { + if ($key == 'destination' and is_array($value)){ + if ($value['type'] == 'csv') { + $array = explode($value['delimiter'], $data[$key]); + $select_value = str_replace("\${destination}", $array[0], $select_value); + $select_label = str_replace("\${destination}", $array[0], $select_label); + } + } + else { + if (strpos($value,',') !== false) { + $keys = explode(",", $value); + foreach ($keys as $k) { + if (strlen($data[$k]) > 0) { + $select_value = str_replace("\${".$key."}", $data[$k], $select_value); + if (strlen($data['label']) == 0) { + $select_label = str_replace("\${".$key."}", $data[$k], $select_label); + } + else { + $label = $data['label']; + $select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label); + } + } + } + + } + else { + $select_value = str_replace("\${".$key."}", $data[$key], $select_value); + if (strlen($data['label']) == 0) { + $select_label = str_replace("\${".$key."}", $data[$key], $select_label); + } + else { + $label = $data['label']; + $select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label); + } + } + //application: hangup + if (strlen($data['application']) > 0) { + $select_value = str_replace("transfer", $data['application'], $select_value); + } + } + } + + $select_value = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_value); + $select_value = str_replace("\${context}", $_SESSION['domain_name'], $select_value); + $select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label); + $select_label = str_replace("\${context}", $_SESSION['domain_name'], $select_label); + $select_label = str_replace("✉", '{email-icon}', $select_label); + $select_label = escape(trim($select_label)); + $select_label = str_replace('{email-icon}', '✉', $select_label); + if ($select_value == $destination_value) { $selected = "selected='selected' "; $select_found = true; } else { $selected = ''; } + if ($label2 == 'destinations') { $select_label = format_phone($select_label); } + $array[$label][$select_label] = $select_value; + } + unset($text); + } + } + if (!$select_found) { + $destination_label = str_replace(":", " ", $destination_value); + $destination_label = str_replace("menu-exec-app", "", $destination_label); + $destination_label = str_replace("transfer", "", $destination_label); + $destination_label = str_replace("XML ".$_SESSION['domain_name'], "", $destination_label); + $array[$label][$destination_label] = $destination_value; + } + + //return the formatted destinations + return $array; + } + + /** + * delete destinations and related dialplan */ public function delete($destinations) { if (permission_exists('destination_delete')) { @@ -304,36 +496,46 @@ class destinations { //delete the checked rows if ($action == 'delete') { + + //add the dialplan permission + $p = new permissions; + $p->add('dialplan_delete', 'temp'); + $p->add('dialplan_detail_delete', 'temp'); + + //loop through selected destinations foreach($destinations as $row) { if ($row['action'] == 'delete' or $row['checked'] == 'true') { - //get the list destinations - $sql = "select * from v_destinations "; - $sql .= "where destination_uuid = '".$row['destination_uuid']."';"; - $prep_statement = $this->db->prepare($sql); - $prep_statement->execute(); - $destinations = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $row = $destinations[0]; - //delete th dialplan - $sql = "delete from v_dialplan_details "; - $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; - $this->db->query($sql); - unset($sql); + //get the dialplan uuid and context + $sql = "select * from v_destinations "; + $sql .= "where destination_uuid = :destination_uuid "; + $database = new database; + $parameters['destination_uuid'] = $row['destination_uuid']; + $destinations = $database->select($sql,$parameters); + $row = $destinations[0]; - //delete th dialplan - $sql = "delete from v_dialplans "; - $sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."';"; - $this->db->query($sql); - unset($sql); + //prepare and then delete the selected data + if (isset($row["dialplan_uuid"]) && is_uuid($row["dialplan_uuid"])) { + $array['dialplan_details'][]['dialplan_uuid'] = $row["dialplan_uuid"]; + $array['dialplans'][]['dialplan_uuid'] = $row["dialplan_uuid"]; + } + $array['destinations'][]['destination_uuid'] = $row['destination_uuid']; + $database->app_name = 'destinations'; + $database->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139'; + $database->delete($array); + //$message = $database->message; + + //clear the cache + $cache = new cache; + $cache->delete("dialplan:".$row['destination_context']); - //delete the destinations - $sql = "delete from v_destinations "; - $sql .= "where destination_uuid = '".$row['destination_uuid']."';"; - $this->db->query($sql); - unset($sql); } } - unset($destinations); + unset($destinations, $row); + + //remove the temporary permission + $p->delete('dialplan_delete', 'temp'); + $p->delete('dialplan_detail_delete', 'temp'); } } } diff --git a/resources/classes/menu.php b/resources/classes/menu.php index 3b65a2d2d4..9d7353e9cc 100644 --- a/resources/classes/menu.php +++ b/resources/classes/menu.php @@ -223,13 +223,6 @@ if (!class_exists('menu')) { //get default global group_uuids $sql = "select group_uuid, group_name from v_groups "; $sql .= "where domain_uuid is null "; - $sql .= "and ( "; - $sql .= " group_name = 'public' "; - $sql .= " or group_name = 'user' "; - $sql .= " or group_name = 'admin' "; - $sql .= " or group_name = 'superadmin' "; - $sql .= " or group_name = 'agent' "; - $sql .= ") "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); diff --git a/resources/classes/messages.php b/resources/classes/message.php similarity index 84% rename from resources/classes/messages.php rename to resources/classes/message.php index 279b545920..17562a31e4 100644 --- a/resources/classes/messages.php +++ b/resources/classes/message.php @@ -25,8 +25,8 @@ Matthew Vale */ -if (!class_exists('messages')) { - class messages { +if (!class_exists('message')) { + class message { static function add($message, $mood = NULL, $delay = NULL) { $mood = $mood ?: 'positive'; @@ -35,21 +35,25 @@ if (!class_exists('messages')) { $_SESSION["messages"][$mood]['delay'][] = $delay; } + static function count() { + return is_array($_SESSION["messages"]) ? sizeof($_SESSION["messages"]) : 0; + } + static function html($clear_messages = true, $spacer = "") { $html = "${spacer}//render the messages\n"; $spacer .="\t"; - if (strlen($_SESSION['message']) > 0) { + if (is_string($_SESSION['message']) && strlen(trim($_SESSION['message'])) > 0) { self::add($_SESSION['message'], $_SESSION['message_mood'], $_SESSION['message_delay']); unset($_SESSION['message'], $_SESSION['message_mood'], $_SESSION['message_delay']); } - if(count($_SESSION['messages']) > 0 ) { + if (is_array($_SESSION['messages']) && count($_SESSION['messages']) > 0 ) { foreach ($_SESSION['messages'] as $message_mood => $message) { $message_text = str_replace(array("\r\n", "\n", "\r"),'\\n',addslashes(join('
', $message['message']))); $message_delay = array_sum($message['delay'])/count($message['delay']); $html .= "${spacer}display_message('$message_text', '$message_mood', '$message_delay');\n"; } } - if($clear_messages) { + if ($clear_messages) { unset($_SESSION['messages']); } return $html; diff --git a/resources/classes/orm.php b/resources/classes/orm.php deleted file mode 100644 index 899c0246a0..0000000000 --- a/resources/classes/orm.php +++ /dev/null @@ -1,924 +0,0 @@ - - Copyright (C) 2014-2016 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//define the orm class - if (!class_exists('orm')) { - class orm extends database { - //factory - sets the model_name - //set - sets the array - public $name; - //get - get the results - public $result; - //find - public $uuid; - //public $name; - public $where; - public $limit; - public $offset; - //save - //public $uuid; - //public $name; - public $message; - public $debug; - //delete - //public $uuid; - //public $name; - //public $where; - //public $message; - //application - public $app_name; - public $app_uuid; - - public function factory($name) { - $this->name = $name; - return $this; - } - - public function name($name) { - $this->name = $name; - return $this; - } - - public function uuid($uuid) { - $this->uuid = $uuid; - return $this; - } - - public function set($array) { - foreach ($array as $key => $value) { - //public $this->$$key = $value; - } - return $this; - } - - public function get() { - return $this->result; - } - - public function find() { - - //connect to the database if needed - if (!$this->db) { - $this->connect(); - } - //set the name - if (isset($array['name'])) { - $this->name = $array['name']; - } - //set the uuid - if (isset($array['uuid'])) { - $this->uuid = $array['uuid']; - } - //build the query - $sql = "SELECT * FROM v_".$this->name." "; - if (isset($this->uuid)) { - //get the specific uuid - $sql .= "WHERE ".$this->singular($this->name)."_uuid = '".$this->uuid."' "; - } - else { - //where - if (is_array($array['where'])) { - $i = 0; - foreach($array['where'] as $row) { - if ($i == 0) { - $sql .= "WHERE ".$row['name']." ".$row['operator']." '".$row['value']."' "; - } - else { - $sql .= "AND ".$row['name']." ".$row['operator']." '".$row['value']."' "; - } - $i++; - } - } - //order by - if (is_array($array['order_by'])) { - $sql .= "ORDER BY ".$array['order_by']." "; - } - //limit - if (isset($array['limit'])) { - $sql .= "LIMIT ".$array['limit']." "; - } - //offset - if (isset($array['offset'])) { - $sql .= "OFFSET ".$array['offset']." "; - } - } - //execute the query, and return the results - try { - $prep_statement = $this->db->prepare(check_sql($sql)); - $prep_statement->execute(); - $message["message"] = "OK"; - $message["code"] = "200"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $this->result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - unset($prep_statement); - $m++; - return $this; - } - catch(PDOException $e) { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $this->result = ''; - $m++; - return $this; - } - } - - public function delete($uuid = null, $array = null) { - //connect to the database if needed - if (!$this->db) { - $this->connect(); - } - - //delete a specific uuid - if (permission_exists($this->singular($this->name).'_delete')) { - if (isset($api_uuid)) { - //start the atomic transaction - $this->db->beginTransaction(); - //delete the primary data - $primary_key_name = $this->singular($this->name)."_uuid"; - $sql = "DELETE FROM v_".$this->name." "; - $sql .= "WHERE ".$this->singular($this->name)."_uuid = '".$uuid."' "; - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["message"] = "OK"; - $message["code"] = "200"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - //delete the related data - $relations = $this->get_relations($this->name); - foreach ($relations as &$row) { - $schema_name = $row['table']; - if (substr($schema_name, 0,2) == "v_") { - $schema_name = substr($schema_name, 2); - } - if (permission_exists($this->singular($schema_name).'_delete')) { - $sql = "DELETE FROM ".$row['table']." "; - $sql .= "WHERE ".$row['key']['field']." = '".$uuid."' "; - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["details"][$m]["name"] = $schema_name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - if ($message["code"] = "200") { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - } - $message["details"][$m]["name"] = $schema_name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - unset ($sql); - } - } - //commit the atomic transaction - if ($message["code"] == "200") { - $this->db->commit(); - } - } - } - else { - $message["name"] = $this->name; - $message["message"] = "Forbidden, does not have '".$this->singular($this->name)."_delete'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } - - private function normalize_array($array, $name) { - //get the depth of the array - $depth = $this->array_depth($array); - //before normalizing the array - //echo "before: ".$depth."
\n"; - //echo "
\n";
-					//print_r($array);
-					//echo "
\n"; - //normalize the array - if ($depth == 1) { - $return_array[$name][] = $array; - } else if ($depth == 2) { - $return_array[$name] = $array; - //} else if ($depth == 3) { - // $return_array[$name][] = $array; - } else { - $return_array = $array; - } - unset($array); - //after normalizing the array - $depth = $this->array_depth($new_array); - //echo "after: ".$depth."
\n"; - //echo "
\n";
-					//print_r($new_array);
-					//echo "
\n"; - //return the array - return $return_array; - } - - public function save($array) { - - //return the array - if (!is_array($array)) { echo "not an array"; return false; } - - //set the message id - $m = 0; - - //set the app name - if (!isset($this->app_name)) { - $this->app_name = $this->name; - } - - //normalize the array structure - //$new_array = $this->normalize_array($array, $this->name); - //unset($array); - $new_array = $array; - - //connect to the database if needed - if (!$this->db) { - $this->connect(); - } - - //debug sql - $this->debug["sql"] = true; - - //start the atomic transaction -// $this->db->beginTransaction(); - - //debug info - //echo "
\n";
-					//print_r($new_array);
-					//echo "
\n"; - //exit; - - //loop through the array - foreach ($new_array as $schema_name => $schema_array) { - - $this->name = $schema_name; - foreach ($schema_array as $schema_id => $array) { - - //set the variables - $table_name = "v_".$this->name; - $parent_key_name = $this->singular($this->name)."_uuid"; - - //if the uuid is set then set parent key exists and value - //determine if the parent_key_exists - $parent_key_exists = false; - if (isset($array[$parent_key_name])) { - $this->uuid = $array[$parent_key_name]; - $parent_key_value = $this->uuid; - $parent_key_exists = true; - } - else { - if (isset($this->uuid)) { - $parent_key_exists = true; - $parent_key_value = $this->uuid; - } - else { - $parent_key_value = uuid(); - } - } - - //get the parent field names - $parent_field_names = array(); - foreach ($array as $key => $value) { - if (!is_array($value)) { - $parent_field_names[] = $key; - } - } - - //determine action update or delete and get the original data - if ($parent_key_exists) { - $sql = "SELECT ".implode(", ", $parent_field_names)." FROM ".$table_name." "; - $sql .= "WHERE ".$parent_key_name." = '".$this->uuid."' "; - $prep_statement = $this->db->prepare($sql); - if ($prep_statement) { - //get the data - try { - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - } - catch(PDOException $e) { - echo 'Caught exception: ', $e->getMessage(), "

\n"; - echo $sql; - exit; - } - - //set the action - if (count($result) > 0) { - $action = "update"; - $old_array[$schema_name] = $result; - } - else { - $action = "add"; - } - } - unset($prep_statement); - unset($result); - } - else { - $action = "add"; - } - - //add a record - if ($action == "add") { - - if (permission_exists($this->singular($this->name).'_add')) { - - $sql = "INSERT INTO v_".$this->name." "; - $sql .= "("; - if (!$parent_key_exists) { - $sql .= $parent_key_name.", "; - } - //foreach ($parent_field_names as $field_name) { - // $sql .= check_str($field_name).", "; - //} - foreach ($array as $array_key => $array_value) { - if (!is_array($array_value)) { - $sql .= check_str($array_key).", "; - } - } - $sql .= ") "; - $sql .= "VALUES "; - $sql .= "("; - if (!$parent_key_exists) { - $sql .= "'".$parent_key_value."', "; - } - foreach ($array as $array_key => $array_value) { - if (!is_array($array_value)) { - if (strlen($array_value) == 0) { - $sql .= "null, "; - } - else { - $sql .= "'".check_str($array_value)."', "; - } - } - } - $sql .= ");"; - $sql = str_replace(", )", ")", $sql); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["message"] = "OK"; - $message["code"] = "200"; - $message["uuid"] = $parent_key_value; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $parent_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - unset($sql); - } - else { - $message["name"] = $this->name; - $message["message"] = "Forbidden, does not have '".$this->singular($this->name)."_add'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message[] = $message; - $m++; - } - } - - //edit a specific uuid - if ($action == "update") { - if (permission_exists($this->singular($this->name).'_edit')) { - - //parent data - $sql = "UPDATE v_".$this->name." SET "; - foreach ($array as $array_key => $array_value) { - if (!is_array($array_value) && $array_key != $parent_key_name) { - if (strlen($array_value) == 0) { - $sql .= check_str($array_key)." = null, "; - } - else { - $sql .= check_str($array_key)." = '".check_str($array_value)."', "; - } - } - } - $sql .= "WHERE ".$parent_key_name." = '".$parent_key_value."' "; - $sql = str_replace(", WHERE", " WHERE", $sql); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["message"] = "OK"; - $message["code"] = "200"; - $message["uuid"] = $parent_key_value; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $parent_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - unset($sql); - } - catch(PDOException $e) { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - $message["details"][$m]["name"] = $this->name; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - } - else { - $message["name"] = $this->name; - $message["message"] = "Forbidden, does not have '".$this->singular($this->name)."_edit'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } - - //unset the variables - unset($sql, $action); - - //child data - foreach ($array as $key => $value) { - - if (is_array($value)) { - $table_name = "v_".$key; - - foreach ($value as $id => $row) { - //prepare the variables - $child_name = $this->singular($key); - $child_key_name = $child_name."_uuid"; - - //determine if the parent key exists in the child array - $parent_key_exists = false; - if (!isset($array[$parent_key_name])) { - $parent_key_exists = true; - } - - //determine if the uuid exists - $uuid_exists = false; - foreach ($row as $k => $v) { - if ($child_key_name == $k) { - if (strlen($v) > 0) { - $child_key_value = $v; - $uuid_exists = true; - break; - } - } - else { - $uuid_exists = false; - } - } - - //get the child field names - $child_field_names = array(); - foreach ($row as $k => $v) { - if (!is_array($v)) { - $child_field_names[] = $k; - } - } - - //determine sql update or delete and get the original data - if ($uuid_exists) { - $sql = "SELECT ". implode(", ", $child_field_names)." FROM ".$table_name." "; - $sql .= "WHERE ".$child_key_name." = '".$child_key_value."' "; - $prep_statement = $this->db->prepare($sql); - if ($prep_statement) { - //get the data - $prep_statement->execute(); - $child_array = $prep_statement->fetch(PDO::FETCH_ASSOC); - //set the action - if (is_array($child_array)) { - $action = "update"; - } - else { - $action = "add"; - } - //add to the parent array - if (is_array($child_array)) { - $old_array[$schema_name][$schema_id][$key][] = $child_array; - } - } - unset($prep_statement); - } - else { - $action = "add"; - } - - //update the data - if ($action == "update") { - if (permission_exists($child_name.'_edit')) { - $sql = "UPDATE ".$table_name." SET "; - foreach ($row as $k => $v) { - //if (!is_array($v) && $k != $child_key_name) { //original - if (!is_array($v) && ($k != $parent_key_name || $k != $child_key_name)) { - if (strlen($v) == 0) { - $sql .= check_str($k)." = null, "; - } - else { - $sql .= check_str($k)." = '".check_str($v)."', "; - } - } - } - $sql .= "WHERE ".$parent_key_name." = '".$this->uuid."' "; - $sql .= "AND ".$child_key_name." = '".$child_key_value."' "; - $sql = str_replace(", WHERE", " WHERE", $sql); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $child_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - if ($message["code"] = "200") { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - } - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - } - else { - $message["name"] = $child_name; - $message["message"] = "Forbidden, does not have '${child_name}_edit'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } //action update - - //add the data - if ($action == "add") { - if (permission_exists($child_name.'_add')) { - //determine if child or parent key exists - $child_key_name = $this->singular($child_name).'_uuid'; - $parent_key_exists = false; - $child_key_exists = false; - foreach ($row as $k => $v) { - if ($k == $parent_key_name) { - $parent_key_exists = true; - } - if ($k == $child_key_name) { - $child_key_exists = true; - $child_key_value = $v; - } - } - if (!$child_key_value) { - $child_key_value = uuid(); - } - //build the insert - $sql = "INSERT INTO ".$table_name." "; - $sql .= "("; - if (!$parent_key_exists) { - $sql .= $this->singular($parent_key_name).", "; - } - if (!$child_key_exists) { - $sql .= $this->singular($child_key_name).", "; - } - foreach ($row as $k => $v) { - if (!is_array($v)) { - $sql .= check_str($k).", "; - } - } - $sql .= ") "; - $sql .= "VALUES "; - $sql .= "("; - if (!$parent_key_exists) { - $sql .= "'".$parent_key_value."', "; - } - if (!$child_key_exists) { - $sql .= "'".$child_key_value."', "; - } - foreach ($row as $k => $v) { - if (!is_array($v)) { - if (strlen($v) == 0) { - $sql .= "null, "; - } - else { - $sql .= "'".check_str($v)."', "; - } - } - } - $sql .= ");"; - $sql = str_replace(", )", ")", $sql); - $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - try { - $this->db->query(check_sql($sql)); - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = "OK"; - $message["details"][$m]["code"] = "200"; - $message["details"][$m]["uuid"] = $child_key_value; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - catch(PDOException $e) { - if ($message["code"] = "200") { - $message["message"] = "Bad Request"; - $message["code"] = "400"; - } - $message["details"][$m]["name"] = $key; - $message["details"][$m]["message"] = $e->getMessage(); - $message["details"][$m]["code"] = "400"; - if ($this->debug["sql"]) { - $message["details"][$m]["sql"] = $sql; - } - $this->message = $message; - $m++; - } - } - else { - $message["name"] = $child_name; - $message["message"] = "Forbidden, does not have '${child_name}_add'"; - $message["code"] = "403"; - $message["line"] = __line__; - $this->message = $message; - $m++; - } - } //action add - - //unset the variables - unset($sql, $action, $child_key_name, $child_key_value); - } // foreach value - - } //is array - } //foreach array - - } // foreach schema_array - } // foreach main array - - //return the before and after data - //log this in the future - if (is_array($old_array)) { - //normalize the array structure - //$old_array = $this->normalize_array($old_array, $this->name); - - //debug info - //echo "
\n";
-							//print_r($old_array);
-							//echo "
\n"; - //exit; - } - //$message["new"] = $new_array; - //$message["new"]["md5"] = md5(json_encode($new_array)); - $this->message = $message; - - //commit the atomic transaction -// $this->db->commit(); - - //get the domain uuid - $domain_uuid = $_SESSION['domain_uuid']; - - //log the transaction results - if (file_exists($_SERVER["PROJECT_ROOT"]."/app/database_transactions/app_config.php")) { - $sql = "insert into v_database_transactions "; - $sql .= "("; - $sql .= "database_transaction_uuid, "; - $sql .= "domain_uuid, "; - $sql .= "user_uuid, "; - if (isset($this->app_uuid)) { - $sql .= "app_uuid, "; - } - $sql .= "app_name, "; - $sql .= "transaction_code, "; - $sql .= "transaction_address, "; - //$sql .= "transaction_type, "; - $sql .= "transaction_date, "; - $sql .= "transaction_old, "; - $sql .= "transaction_new, "; - $sql .= "transaction_result "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'".$domain_uuid."', "; - $sql .= "'".$_SESSION['user_uuid']."', "; - if (isset($this->app_uuid)) { - $sql .= "'".$this->app_uuid."', "; - } - $sql .= "'".$this->app_name."', "; - $sql .= "'".$message["code"]."', "; - $sql .= "'".$_SERVER['REMOTE_ADDR']."', "; - //$sql .= "'$transaction_type', "; - $sql .= "now(), "; - $sql .= "'".check_str(json_encode($old_array, JSON_PRETTY_PRINT))."', "; - $sql .= "'".check_str(json_encode($new_array, JSON_PRETTY_PRINT))."', "; - $sql .= "'".check_str(json_encode($this->message, JSON_PRETTY_PRINT))."' "; - $sql .= ")"; - $this->db->exec(check_sql($sql)); - unset($sql); - } - } //save method - - //define singular function to convert a word in english to singular - private function singular($word) { - //"-es" is used for words that end in "-x", "-s", "-z", "-sh", "-ch" in which case you add - if (substr($word, -2) == "es") { - if (substr($word, -3, 1) == "x") { - return substr($word,0,-2); - } - if (substr($word, -3, 1) == "s") { - return substr($word,0,-2); - } - elseif (substr($word, -3, 1) == "z") { - return substr($word,0,-2); - } - elseif (substr($word, -4, 2) == "sh") { - return substr($word,0,-2); - } - elseif (substr($word, -4, 2) == "ch") { - return substr($word,0,-2); - } - else { - return rtrim($word, "s"); - } - } - else { - return rtrim($word, "s"); - } - } - - public function get_apps() { - //get the $apps array from the installed apps from the core and mod directories - $config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php"); - $x = 0; - foreach ($config_list as &$config_path) { - include($config_path); - $x++; - } - $_SESSION['apps'] = $apps; - } - - public function array_depth($array) { - if (is_array($array)) { - foreach ($array as $value) { - if (!isset($depth)) { $depth = 1; } - if (is_array($value)) { - $depth = $this->array_depth($value) + 1; - } - } - } - else { - $depth = 0; - } - return $depth; - } - - public function domain_uuid_exists($name) { - //get the $apps array from the installed apps from the core and mod directories - if (!is_array($_SESSION['apps'])) { - $this->get_apps(); - } - //search through all fields to see if domain_uuid exists - foreach ($_SESSION['apps'] as $x => &$app) { - foreach ($app['db'] as $y => &$row) { - if ($row['table'] == $name) { - foreach ($row['fields'] as $z => $field) { - if ($field['name'] == "domain_uuid") { - return true; - } - } - } - } - } - //not found - return false; - } - } - } - - //examples - /* - //get records - $orm = new orm(); - $result = $orm->name('dialplans')->find()->get(); - print_r($result); - - //get a single record - $orm = new orm(); - $orm->name('dialplans') - $orm->uuid('a8363085-8318-4dee-b87f-0818be0d6318'); - $orm->find(); - $result = $orm->get(); - print_r($result); - - //get a single record - $array['name'] = "dialplans"; - $array['uuid'] = "2d27e4a4-c954-4f8a-b734-88b0e1054b86"; - $orm = new orm(); - $result = $orm->find($array)->get(); - print_r($result); - - //get limited records with limit and offset - $array['name'] = "dialplans"; - $array['limit'] = "10"; - $array['offset'] = "2"; - $orm = new orm(); - $result = $orm->find($array)->get(); - print_r($result); - */ - -?> diff --git a/resources/classes/schema.php b/resources/classes/schema.php index 96e3c203e8..00f1921fc1 100644 --- a/resources/classes/schema.php +++ b/resources/classes/schema.php @@ -348,8 +348,14 @@ if (!class_exists('schema')) { public function db_create_table ($apps, $db_type, $table) { if (is_array($apps)) foreach ($apps as $x => &$app) { if (is_array($app['db'])) foreach ($app['db'] as $y => $row) { - if ($row['table']['name'] == $table) { - $sql = "CREATE TABLE " . $row['table']['name'] . " (\n"; + if (is_array($row['table']['name'])) { + $table_name = $row['table']['name']['text']; + } + else { + $table_name = $row['table']['name']; + } + if ($table_name == $table) { + $sql = "CREATE TABLE " . $table_name . " (\n"; $field_count = 0; if (is_array($row['fields'])) foreach ($row['fields'] as $field) { if ($field['deprecated'] == "true") { @@ -585,19 +591,26 @@ if (!class_exists('schema')) { if (isset($app['db'])) foreach ($app['db'] as $y => &$row) { if (is_array($row['table']['name'])) { $table_name = $row['table']['name']['text']; - if (!$this->db_table_exists($db_type, $db_name, $row['table']['name']['text'])) { - $row['exists'] = "true"; //testing - //if (db_table_exists($db_type, $db_name, $row['table']['name']['deprecated'])) { - if ($db_type == "pgsql") { - $sql_update .= "ALTER TABLE ".$row['table']['name']['deprecated']." RENAME TO ".$row['table']['name']['text'].";\n"; - } - if ($db_type == "mysql") { - $sql_update .= "RENAME TABLE ".$row['table']['name']['deprecated']." TO ".$row['table']['name']['text'].";\n"; - } - if ($db_type == "sqlite") { - $sql_update .= "ALTER TABLE ".$row['table']['name']['deprecated']." RENAME TO ".$row['table']['name']['text'].";\n"; - } - //} + if ($this->db_table_exists($db_type, $db_name, $row['table']['name']['deprecated'])) { + $row['exists'] = "false"; //testing + if ($db_type == "pgsql") { + $sql_update .= "ALTER TABLE ".$row['table']['name']['deprecated']." RENAME TO ".$row['table']['name']['text'].";\n"; + } + if ($db_type == "mysql") { + $sql_update .= "RENAME TABLE ".$row['table']['name']['deprecated']." TO ".$row['table']['name']['text'].";\n"; + } + if ($db_type == "sqlite") { + $sql_update .= "ALTER TABLE ".$row['table']['name']['deprecated']." RENAME TO ".$row['table']['name']['text'].";\n"; + } + } + else { + if ($this->db_table_exists($db_type, $db_name, $row['table']['name']['text'])) { + $row['exists'] = "true"; + } + else { + $row['exists'] = "false"; + $sql_update .= $this->db_create_table($apps, $db_type, $row['table']['name']['text']); + } } } else { @@ -635,6 +648,11 @@ if (!class_exists('schema')) { $sql_update .= "ALTER TABLE ".$table_name." ADD ".$field['name']." ".$field_type.";\n"; } } + else { + if ($field['exists'] == "false") { + $sql_update .= "ALTER TABLE ".$table_name." ADD ".$field['name']["text"]." ".$field_type.";\n"; + } + } } //rename fields where the name has changed if (is_array($field['name'])) { @@ -672,6 +690,8 @@ if (!class_exists('schema')) { //field type has not changed } elseif ($db_field_type = "timestamp without time zone" && strtolower($field_type) == "datetime") { //field type has not changed + } elseif ($db_field_type = "timestamp with time zone" && strtolower($field_type) == "timestamptz") { + //field type has not changed } elseif ($db_field_type = "integer" && strtolower($field_type) == "numeric") { //field type has not changed } elseif ($db_field_type = "character" && strtolower($field_type) == "char") { diff --git a/resources/fpdf/fpdf.php b/resources/fpdf/fpdf.php index 859db60300..c64e9a92d7 100644 --- a/resources/fpdf/fpdf.php +++ b/resources/fpdf/fpdf.php @@ -73,7 +73,7 @@ var $PDFVersion; // PDF version number * Public methods * * * *******************************************************************************/ -function FPDF($orientation='P', $unit='mm', $size='A4') +function __construct($orientation='P', $unit='mm', $size='A4') { // Some checks $this->_dochecks(); diff --git a/resources/functions.php b/resources/functions.php index b80fb56dc7..27e503bcef 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2016 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -27,7 +27,7 @@ if (!function_exists('software_version')) { function software_version() { - return '4.5.1'; + return '4.5.5'; } } @@ -45,6 +45,12 @@ } } + if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($string) { + return strtoupper($string); + } + } + if (!function_exists('check_float')) { function check_float($string) { $string = str_replace(",",".",$string); @@ -258,7 +264,7 @@ if (!function_exists('group_members')) { function group_members($db, $user_uuid) { global $domain_uuid; - $sql = "select * from v_group_users "; + $sql = "select * from v_user_groups "; $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and user_uuid = '".$user_uuid."' "; $prep_statement = $db->prepare(check_sql($sql)); @@ -289,7 +295,7 @@ if (!function_exists('superadmin_list')) { function superadmin_list($db) { global $domain_uuid; - $sql = "select * from v_group_users "; + $sql = "select * from v_user_groups "; $sql .= "where group_name = 'superadmin' "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); @@ -766,9 +772,9 @@ //add the user to the member group $group_name = 'user'; - $sql = "insert into v_group_users "; + $sql = "insert into v_user_groups "; $sql .= "("; - $sql .= "group_user_uuid, "; + $sql .= "user_group_uuid, "; $sql .= "domain_uuid, "; $sql .= "group_name, "; $sql .= "user_uuid "; @@ -850,69 +856,86 @@ function format_string ($format, $data) { return $phone_number; } +//format seconds into hh:mm:ss + function format_hours($seconds) { + $hours = floor($seconds / 3600); + $minutes = floor(($seconds / 60) % 60); + $seconds = $seconds % 60; + if (strlen($minutes) == 1) { $minutes = '0'.$minutes; } + if (strlen($seconds) == 1) { $seconds = '0'.$seconds; } + return "$hours:$minutes:$seconds"; + } + //browser detection without browscap.ini dependency function http_user_agent($info = '') { - $u_agent = $_SERVER['HTTP_USER_AGENT']; - $bname = 'Unknown'; - $platform = 'Unknown'; - $version= ""; - //get the platform? - if (preg_match('/linux/i', $u_agent)) { - $platform = 'linux'; + //set default values + $user_agent = $_SERVER['HTTP_USER_AGENT']; + $browser_name = 'Unknown'; + $platform = 'Unknown'; + $version = ''; + $mobile = false; + + //get the platform + if (preg_match('/linux/i', $user_agent)) { + $platform = 'Linux'; } - elseif (preg_match('/macintosh|mac os x/i', $u_agent)) { - $platform = 'mac'; + elseif (preg_match('/macintosh|mac os x/i', $user_agent)) { + $platform = 'Apple'; } - elseif (preg_match('/windows|win32/i', $u_agent)) { - $platform = 'windows'; + elseif (preg_match('/windows|win32/i', $user_agent)) { + $platform = 'Windows'; } - //get the name of the useragent yes seperately and for good reason - if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent)) - { - $bname = 'Internet Explorer'; - $ub = "MSIE"; + //set mobile to true or false + if (preg_match('/mobile/i', $user_agent)) { + $platform = 'Mobile'; + $mobile = true; } - elseif(preg_match('/Firefox/i',$u_agent)) - { - $bname = 'Mozilla Firefox'; - $ub = "Firefox"; + elseif (preg_match('/android/i', $user_agent)) { + $platform = 'Android'; + $mobile = true; } - elseif(preg_match('/Chrome/i',$u_agent)) - { - $bname = 'Google Chrome'; - $ub = "Chrome"; + + //get the name of the useragent + if (preg_match('/MSIE/i',$user_agent) && !preg_match('/Opera/i',$user_agent)) { + $browser_name = 'Internet Explorer'; + $browser_shortname = 'MSIE'; } - elseif(preg_match('/Safari/i',$u_agent)) - { - $bname = 'Apple Safari'; - $ub = "Safari"; + elseif (preg_match('/Firefox/i',$user_agent)) { + $browser_name = 'Mozilla Firefox'; + $browser_shortname = 'Firefox'; } - elseif(preg_match('/Opera/i',$u_agent)) - { - $bname = 'Opera'; - $ub = "Opera"; + elseif (preg_match('/Chrome/i',$user_agent)) { + $browser_name = 'Google Chrome'; + $browser_shortname = 'Chrome'; } - elseif(preg_match('/Netscape/i',$u_agent)) - { - $bname = 'Netscape'; - $ub = "Netscape"; + elseif (preg_match('/Safari/i',$user_agent)) { + $browser_name = 'Apple Safari'; + $browser_shortname = 'Safari'; + } + elseif (preg_match('/Opera/i',$user_agent)) { + $browser_name = 'Opera'; + $browser_shortname = 'Opera'; + } + elseif (preg_match('/Netscape/i',$user_agent)) { + $browser_name = 'Netscape'; + $browser_shortname = 'Netscape'; } //finally get the correct version number - $known = array('Version', $ub, 'other'); + $known = array('Version', $browser_shortname, 'other'); $pattern = '#(?' . join('|', $known) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; - if (!preg_match_all($pattern, $u_agent, $matches)) { - // we have no matching number just continue + if (!preg_match_all($pattern, $user_agent, $matches)) { + //we have no matching number just continue } - // see how many we have + //see how many we have $i = count($matches['browser']); if ($i != 1) { //we will have two since we are not using 'other' argument yet //see if version is before or after the name - if (strripos($u_agent,"Version") < strripos($u_agent,$ub)){ + if (strripos($user_agent,"Version") < strripos($user_agent,$browser_shortname)) { $version= $matches['version'][0]; } else { @@ -923,58 +946,63 @@ function format_string ($format, $data) { $version= $matches['version'][0]; } - // check if we have a number - if ($version==null || $version=="") {$version="?";} + //check if we have a number + if ($version == null || $version == "") { $version = "?"; } - switch ($info) { - case "agent": return $u_agent; break; - case "name": return $bname; break; - case "version": return $version; break; - case "platform": return $platform; break; - case "pattern": return $pattern; break; - default : - return array( - 'userAgent' => $u_agent, - 'name' => $bname, - 'version' => $version, - 'platform' => $platform, - 'pattern' => $pattern - ); - } + //return the data + switch ($info) { + case "agent": return $user_agent; break; + case "name": return $browser_name; break; + case "version": return $version; break; + case "platform": return $platform; break; + case "mobile": return $mobile; break; + case "pattern": return $pattern; break; + default : + return array( + 'user_agent' => $user_agent, + 'name' => $browser_name, + 'version' => $version, + 'platform' => $platform, + 'mobile' => $mobile, + 'pattern' => $pattern + ); + } } //tail php function for non posix systems function tail($file, $num_to_get=10) { - $fp = fopen($file, 'r'); - $position = filesize($file); - $chunklen = 4096; - if($position-$chunklen<=0) { + $fp = fopen($file, 'r'); + $position = filesize($file); + $chunklen = 4096; + if($position-$chunklen<=0) { + fseek($fp,0); + } + else { + fseek($fp, $position-$chunklen); + } + $data="";$ret="";$lc=0; + while($chunklen > 0) { + $data = fread($fp, $chunklen); + $dl=strlen($data); + for($i=$dl-1;$i>=0;$i--){ + if($data[$i]=="\n"){ + if($lc==0 && $ret!="")$lc++; + $lc++; + if($lc>$num_to_get)return $ret; + } + $ret=$data[$i].$ret; + } + if($position-$chunklen<=0){ fseek($fp,0); + $chunklen=$chunklen-abs($position-$chunklen); } else { fseek($fp, $position-$chunklen); } - $data="";$ret="";$lc=0; - while($chunklen > 0) - { - $data = fread($fp, $chunklen); - $dl=strlen($data); - for($i=$dl-1;$i>=0;$i--){ - if($data[$i]=="\n"){ - if($lc==0 && $ret!="")$lc++; - $lc++; - if($lc>$num_to_get)return $ret; - } - $ret=$data[$i].$ret; - } - if($position-$chunklen<=0){ - fseek($fp,0); - $chunklen=$chunklen-abs($position-$chunklen); - }else fseek($fp, $position-$chunklen); - $position = $position - $chunklen; - } - fclose($fp); - return $ret; + $position = $position - $chunklen; + } + fclose($fp); + return $ret; } //generate a random password with upper, lowercase and symbols @@ -982,8 +1010,8 @@ function format_string ($format, $data) { $password = ''; $charset = ''; if ($length === 0 && $strength === 0) { //set length and strenth if specified in default settings and strength isn't numeric-only - $length = (is_numeric($_SESSION["security"]["password_length"]["numeric"])) ? $_SESSION["security"]["password_length"]["numeric"] : 10; - $strength = (is_numeric($_SESSION["security"]["password_strength"]["numeric"])) ? $_SESSION["security"]["password_strength"]["numeric"] : 4; + $length = (is_numeric($_SESSION["extension"]["password_length"]["numeric"])) ? $_SESSION["extension"]["password_length"]["numeric"] : 10; + $strength = (is_numeric($_SESSION["extension"]["password_strength"]["numeric"])) ? $_SESSION["extension"]["password_strength"]["numeric"] : 4; } if ($strength >= 1) { $charset .= "0123456789"; } if ($strength >= 2) { $charset .= "abcdefghijkmnopqrstuvwxyz"; } @@ -1001,11 +1029,11 @@ function format_string ($format, $data) { function check_password_strength($password, $text, $type = 'default') { if ($password != '') { if ($type == 'default') { - $req['length'] = $_SESSION['security']['password_length']['numeric']; - $req['number'] = ($_SESSION['security']['password_number']['boolean'] == 'true') ? true : false; - $req['lowercase'] = ($_SESSION['security']['password_lowercase']['boolean'] == 'true') ? true : false; - $req['uppercase'] = ($_SESSION['security']['password_uppercase']['boolean'] == 'true') ? true : false; - $req['special'] = ($_SESSION['security']['password_special']['boolean'] == 'true') ? true : false; + $req['length'] = $_SESSION['extension']['password_length']['numeric']; + $req['number'] = ($_SESSION['extension']['password_number']['boolean'] == 'true') ? true : false; + $req['lowercase'] = ($_SESSION['extension']['password_lowercase']['boolean'] == 'true') ? true : false; + $req['uppercase'] = ($_SESSION['extension']['password_uppercase']['boolean'] == 'true') ? true : false; + $req['special'] = ($_SESSION['extension']['password_special']['boolean'] == 'true') ? true : false; } elseif ($type == 'user') { $req['length'] = $_SESSION['user']['password_length']['numeric']; $req['number'] = ($_SESSION['user']['password_number']['boolean'] == 'true') ? true : false; @@ -1029,7 +1057,7 @@ function format_string ($format, $data) { $msg_errors[] = '1+ '.$text['label-special_characters']; } if (is_array($msg_errors) && sizeof($msg_errors) > 0) { - messages::add($_SESSION["message"] = $text['message-password_requirements'].': '.implode(', ', $msg_errors), 'negative', 6000); + message::add($_SESSION["message"] = $text['message-password_requirements'].': '.implode(', ', $msg_errors), 'negative', 6000); return false; } else { @@ -1369,7 +1397,7 @@ function number_pad($number,$n) { //function to send email if (!function_exists('send_email')) { - function send_email($eml_recipients, $eml_subject, $eml_body, &$eml_error = '', $eml_from_address = '', $eml_from_name = '', $eml_priority = 3) { + function send_email($eml_recipients, $eml_subject, $eml_body, &$eml_error = '', $eml_from_address = '', $eml_from_name = '', $eml_priority = 3, $eml_debug_level = 0) { /* RECIPIENTS NOTE: @@ -1424,23 +1452,37 @@ function number_pad($number,$n) { $mail = new PHPMailer(); $mail -> IsSMTP(); + if ($_SESSION['email']['smtp_hostname']['text'] != '') { + $mail -> Hostname = $_SESSION['email']['smtp_hostname']['text']; + } $mail -> Host = $_SESSION['email']['smtp_host']['text']; - if ($_SESSION['email']['smtp_port']['text'] != '') { - $mail -> Port = $_SESSION['email']['smtp_port']['text']; + if (is_numeric($_SESSION['email']['smtp_port']['numeric'])) { + $mail -> Port = $_SESSION['email']['smtp_port']['numeric']; } if ($_SESSION['email']['smtp_auth']['text'] == "true") { $mail -> SMTPAuth = $_SESSION['email']['smtp_auth']['text']; - } - if ($_SESSION['email']['smtp_username']['text']) { $mail -> Username = $_SESSION['email']['smtp_username']['text']; $mail -> Password = $_SESSION['email']['smtp_password']['text']; } + else { + $mail -> SMTPAuth = 'false'; + } if ($_SESSION['email']['smtp_secure']['text'] == "none") { $_SESSION['email']['smtp_secure']['text'] = ''; } if ($_SESSION['email']['smtp_secure']['text'] != '') { $mail -> SMTPSecure = $_SESSION['email']['smtp_secure']['text']; } + if (isset($_SESSION['email']['smtp_validate_certificate']) && $_SESSION['email']['smtp_validate_certificate']['boolean'] == "false") { + // bypass TLS certificate check e.g. for self-signed certificates + $mail -> SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); + } $eml_from_address = ($eml_from_address != '') ? $eml_from_address : $_SESSION['email']['smtp_from']['text']; $eml_from_name = ($eml_from_name != '') ? $eml_from_name : $_SESSION['email']['smtp_from_name']['text']; $mail -> SetFrom($eml_from_address, $eml_from_name); @@ -1448,6 +1490,9 @@ function number_pad($number,$n) { $mail -> Subject = $eml_subject; $mail -> MsgHTML($eml_body); $mail -> Priority = $eml_priority; + if (is_numeric($eml_debug_level) && $eml_debug_level > 0) { + $mail -> SMTPDebug = $eml_debug_level; + } $address_found = false; @@ -1509,15 +1554,20 @@ function number_pad($number,$n) { //encrypt a string if (!function_exists('encrypt')) { - function encrypt($key, $str_to_enc) { - return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $str_to_enc, MCRYPT_MODE_CBC, md5(md5($key)))); + function encrypt($key, $data) { + $encryption_key = base64_decode($key); + $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); + $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv); + return base64_encode($encrypted.'::'.$iv); } } //decrypt a string if (!function_exists('decrypt')) { - function decrypt($key, $str_to_dec) { - return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($str_to_dec), MCRYPT_MODE_CBC, md5(md5($key))), "\0"); + function decrypt($key, $data) { + $encryption_key = base64_decode($key); + list($encrypted_data, $iv) = explode('::', base64_decode($data), 2); + return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv); } } @@ -1707,11 +1757,15 @@ function number_pad($number,$n) { //converts a string to a regular expression if (!function_exists('string_to_regex')) { - function string_to_regex($string) { + function string_to_regex($string, $prefix='') { //escape the plus if (substr($string, 0, 1) == "+") { $string = "^\\+(".substr($string, 1).")$"; } + //add prefix + if (strlen($prefix) > 0) { + $prefix = $prefix.'?'; + } //convert N,X,Z syntax to regex $string = str_ireplace("N", "[2-9]", $string); $string = str_ireplace("X", "[0-9]", $string); @@ -1724,10 +1778,10 @@ function number_pad($number,$n) { if (substr($string, -1) != "$") { $string = $string."$"; } - //add the round brackgets ( and ) + //add the round brackets ( and ) if (!strstr($string, '(')) { if (strstr($string, '^')) { - $string = str_replace("^", "^(", $string); + $string = str_replace("^", "^".$prefix."(", $string); } else { $string = '^('.$string; @@ -1930,4 +1984,105 @@ function number_pad($number,$n) { //return htmlentities($string, ENT_QUOTES, 'UTF-8'); } +//output pre-formatted array keys and values + if (!function_exists('view_array')) { + function view_array($array, $exit = true) { + echo '
'.print_r($array, true).'

'; + $exit and exit(); + } + } + +//format db date and/or time to local date and/or time + if (!function_exists('format_when_local')) { + function format_when_local($when, $format = 'dt', $include_seconds = false) { + if ($when != '') { + // determine when format + if (substr_count($when, ' ') > 0) { // date and time + $tmp = explode(' ', $when); + $date = $tmp[0]; + $time = $tmp[1]; + } + else if (substr_count($when, '-') > 0) { // date only + $date = $when; + } + else if (substr_count($when, ':') > 0) { // time only + $time = $when; + } + unset($when, $tmp); + + // format date + if ($date != '') { + $tmp = explode('-', $date); + $date = $tmp[1].'-'.$tmp[2].'-'.$tmp[0]; + } + + // format time + if ($time != '') { + $tmp = explode(':', $time); + if ($tmp[0] >= 0 && $tmp[0] <= 11) { + $meridiem = 'AM'; + $hour = ($tmp[0] == 0) ? 12 : $tmp[0]; + } + else { + $meridiem = 'PM'; + $hour = ($tmp[0] > 12) ? ($tmp[0] - 12) : $tmp[0]; + } + $minute = $tmp[1]; + $second = $tmp[2]; + } + + // structure requested time format + $time = $hour.':'.$minute; + if ($include_seconds) { $time .= ':'.$second; } + $time .= ' '.$meridiem; + + $return['d'] = $date; + $return['t'] = $time; + $return['dt'] = $date.' '.$time; + + return $return[$format]; + } + else { + return false; + } + } + } + +//define email button (src: https://buttons.cm) + if (!function_exists('email_button')) { + function email_button($text = 'Click Here!', $link = URL, $bg_color = '#dddddd', $fg_color = '#000000', $radius = '') { + + // default button radius + $radius = $radius != '' ? $radius : '3px'; + + // retrieve single/first numeric radius value for ms arc + $tmp = $radius; + if (substr_count($radius, ' ') > 0) { + $tmp = explode(' ', $radius); + $tmp = $tmp[0]; + } + $tmp = preg_replace("/[^0-9,.]/", '', $tmp); // remove non-numeric characters + $arc = floor($tmp / 35 * 100); // calculate percentage + + // create button code + $btn = " +
+ + ".$text." + +
+ "; + + return $btn; + } + } + + ?> diff --git a/resources/install/scripts/app/agent_status/index.lua b/resources/install/scripts/app/agent_status/index.lua index 893aa9c7b9..45b0d02b4c 100644 --- a/resources/install/scripts/app/agent_status/index.lua +++ b/resources/install/scripts/app/agent_status/index.lua @@ -18,6 +18,8 @@ json = require "resources.functions.lunajson" end + local presence_in = require "resources.functions.presence_in" + --set the api api = freeswitch.API(); @@ -181,6 +183,15 @@ event:addHeader("answer-state", "confirmed"); event:fire(); end + + if (action == "login") then + blf_status = "false" + end + if string.find(agent_name, 'agent+', nil, true) ~= 1 then + presence_in.turn_lamp( blf_status, + 'agent+'..agent_name.."@"..domain_name + ); + end end --unauthorized diff --git a/resources/install/scripts/app/call_block/index.lua b/resources/install/scripts/app/call_block/index.lua index eba554f766..ee5a888ed4 100644 --- a/resources/install/scripts/app/call_block/index.lua +++ b/resources/install/scripts/app/call_block/index.lua @@ -1,5 +1,5 @@ -- --- call_block-FS +-- call_block -- Version: MPL 1.1 -- -- The contents of this file are subject to the Mozilla Public License Version @@ -42,9 +42,14 @@ This method causes the script to get its manadatory arguments directly from the --set defaults expire = {} - expire["call_block"] = "60"; + expire["call_block"] = "900"; source = ""; +--includes + local cache = require"resources.functions.cache" + local log = require"resources.functions.log"["call_block"]; + --json = require "resources.functions.lunajson"; + -- Command line parameters local params = { cid_num = string.match(tostring(session:getVariable("caller_id_number")), "%d+"), @@ -71,7 +76,7 @@ This method causes the script to get its manadatory arguments directly from the local function logger(level, log, data) -- output data to console 'log' if debug level is on if string.find(params["loglevel"], level) then - freeswitch.consoleLog(log, "[Call Block]: " .. data .. "\n") + freeswitch.consoleLog(log, "[call_block] " .. data .. "\n") end end @@ -79,68 +84,81 @@ This method causes the script to get its manadatory arguments directly from the api = freeswitch.API(); -- ensure that we have a fresh status on exit - session:setVariable("call_block", "") + session:setVariable("call_block", ""); -- get the configuration variables from the DB local db = dbh or Database.new('system') local settings = Settings.new(db, domain_name, domain_uuid) local call_block_matching = settings:get('call block', 'call_block_matching', 'text'); - --send to the log logger("D", "NOTICE", "params are: " .. string.format("'%s', '%s', '%s', '%s'", params["cid_num"], params["cid_name"], params["userid"], params["domain_name"])); +--set the dialplan cache key + local cache_key = "app:call_block:" .. params["domain_name"] .. ":" .. params["cid_num"]; + --get the cache - if (trim(api:execute("module_exists", "mod_memcache")) == "true") then - cache = trim(api:execute("memcache", "get app:call_block:" .. params["domain_name"] .. ":" .. params["cid_num"])); - else - cache = "-ERR NOT FOUND"; + cache_data, err = cache.get(cache_key); + if (debug['cache']) then + if cache_data then + log.notice(cache_key.." source: cache"); + elseif (not cache_data) then + log.notice("error get element from cache: " .. err); + end end +--connect to the database + Database = require "resources.functions.database"; + dbh = Database.new('system'); + +--log if not connect + if dbh:connected() == false then + logger("W", "NOTICE", "db was not connected") + end + +--check if the the call block is blocked + sql = "SELECT * FROM v_call_block as c " + sql = sql .. "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid " + if ((database["type"] == "pgsql") and (call_block_matching == "regex")) then + logger("W", "NOTICE", "call_block using regex match on cid_num") + sql = sql .. "WHERE :cid_num ~ c.call_block_number AND d.domain_name = :domain_name " + elseif (((database["type"] == "mysql") or (database["type"] == "sqlite")) and (call_block_matching == "regex")) then + logger("W", "NOTICE", "call_block using regex match on cid_num") + sql = sql .. "WHERE :cid_num REGEXP c.call_block_number AND d.domain_name = :domain_name " + elseif call_block_matching == "like" then + logger("W", "NOTICE", "call_block using like match on cid_num") + sql = sql .. "WHERE :cid_num LIKE c.call_block_number AND d.domain_name = :domain_name " + else + logger("W", "NOTICE", "call_block using exact match on cid_num") + sql = sql .. "WHERE :cid_num = c.call_block_number AND d.domain_name = :domain_name " + end + --freeswitch.consoleLog("notice", "[call_block] " .. sql .. "\n"); + dbh:query(sql, params, function(rows) + found_cid_num = rows["call_block_number"]; + found_uuid = rows["call_block_uuid"]; + found_enabled = rows["call_block_enabled"]; + found_action = rows["call_block_action"]; + found_count = rows["call_block_count"]; + end) + -- dbh:affected_rows() doesn't do anything if using core:db so this is the workaround: + --check if number is in call_block list then increment the counter and block the call --if not cached then get the information from the database - if (cache == "-ERR NOT FOUND") then - --connect to the database - Database = require "resources.functions.database"; - dbh = Database.new('system'); - - --log if not connect - if dbh:connected() == false then - logger("W", "NOTICE", "db was not connected") - end - - --check if the the call block is blocked - sql = "SELECT * FROM v_call_block as c " - sql = sql .. "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid " - if ((database["type"] == "pgsql") and (call_block_matching == "regex")) then - logger("W", "NOTICE", "call_block using regex match on cid_num") - sql = sql .. "WHERE :cid_num ~ c.call_block_number AND d.domain_name = :domain_name " - elseif (((database["type"] == "mysql") or (database["type"] == "sqlite")) and (call_block_matching == "regex")) then - logger("W", "NOTICE", "call_block using regex match on cid_num") - sql = sql .. "WHERE :cid_num REGEXP c.call_block_number AND d.domain_name = :domain_name " - elseif call_block_matching == "like" then - logger("W", "NOTICE", "call_block using like match on cid_num") - sql = sql .. "WHERE :cid_num LIKE c.call_block_number AND d.domain_name = :domain_name " - else - logger("W", "NOTICE", "call_block using exact match on cid_num") - sql = sql .. "WHERE :cid_num = c.call_block_number AND d.domain_name = :domain_name " - end - dbh:query(sql, params, function(rows) - found_cid_num = rows["call_block_number"]; - found_uuid = rows["call_block_uuid"]; - found_enabled = rows["call_block_enabled"]; - found_action = rows["call_block_action"]; - found_count = rows["call_block_count"]; - end) - -- dbh:affected_rows() doesn't do anything if using core:db so this is the workaround: - + if (not cache_data) then --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"])); + cache_data = "found_cid_num=" .. found_cid_num .. "&found_uuid=" .. found_uuid .. "&found_enabled=" .. found_enabled .. "&found_action=" .. found_action; + local ok, err = cache.set(cache_key, cache_data, expire["call_block"]); + if debug["cache"] then + if ok then + freeswitch.consoleLog("notice", "[call_block] " .. cache_key .. " stored in the cache\n"); + else + freeswitch.consoleLog("warning", "[call_block] " .. cache_key .. " can not be stored in the cache: " .. tostring(err) .. "\n"); + end + end --set the source source = "database"; @@ -148,12 +166,12 @@ This method causes the script to get its manadatory arguments directly from the end else - --get from memcache + --get from the cache --add the function require "resources.functions.explode"; --parse the cache - array = explode("&", cache); + array = explode("&", cache_data); --define the array/table and variables local var = {} @@ -161,7 +179,7 @@ This method causes the script to get its manadatory arguments directly from the local value = ""; --parse the cache - key_pairs = explode("&", cache); + key_pairs = explode("&", cache_data); for k,v in pairs(key_pairs) do f = explode("=", v); key = f[1]; @@ -174,17 +192,17 @@ This method causes the script to get its manadatory arguments directly from the found_uuid = var["found_uuid"]; found_enabled = var["found_enabled"]; found_action = var["found_action"]; - found_count = var["found_count"]; --set the source - source = "memcache"; + source = "cache"; end --debug information - --freeswitch.consoleLog("error", "[call_block] " .. cache .. "\n"); + --freeswitch.consoleLog("error", "[call_block] " .. cache_data .. "\n"); --freeswitch.consoleLog("error", "[call_block] found_cid_num = " .. found_cid_num .. "\n"); --freeswitch.consoleLog("error", "[call_block] found_enabled = " .. found_enabled .. "\n"); --freeswitch.consoleLog("error", "[call_block] source = " .. source .. "\n"); + --freeswitch.consoleLog("error", "[call_block] found_count = " .. found_count .. "\n"); --block the call if found_cid_num then -- caller id exists @@ -196,13 +214,21 @@ This method causes the script to get its manadatory arguments directly from the --logger("W", "INFO", "Details: " .. details[k]) k = k + 1 end - if (source == "database") then - dbh:query("UPDATE v_call_block SET call_block_count = :call_block_count WHERE call_block_uuid = :call_block_uuid",{ - call_block_count = found_count + 1, call_block_uuid = found_uuid - }) - end - session:execute("set", "call_blocked=true"); logger("W", "NOTICE", "number " .. params["cid_num"] .. " blocked with " .. found_count .. " previous hits, domain_name: " .. params["domain_name"]) + + -- Command line parameters + local params = { + call_block_count = found_count + 1, + call_block_uuid = found_uuid + } + --update the call block count + local sql = "UPDATE v_call_block SET call_block_count = :call_block_count WHERE call_block_uuid = :call_block_uuid"; + dbh:query(sql, params); + freeswitch.consoleLog("error", "[call_block] udpate\n"); + --freeswitch.consoleLog("error", "[call_block] sql = " .. sql .. "\n"); + --freeswitch.consoleLog("error", "[call_block] " .. json.encode(params) .. "\n"); + + session:execute("set", "call_blocked=true"); if (found_action == "Reject") then session:hangup("CALL_REJECTED") elseif (found_action == "Busy") then @@ -216,4 +242,3 @@ This method causes the script to get its manadatory arguments directly from the end end end - diff --git a/resources/install/scripts/app/dialplan/resources/after/010_user_record.lua.noload b/resources/install/scripts/app/dialplan/resources/after/010_user_record.lua.noload index 844f2af268..95f82f446b 100644 --- a/resources/install/scripts/app/dialplan/resources/after/010_user_record.lua.noload +++ b/resources/install/scripts/app/dialplan/resources/after/010_user_record.lua.noload @@ -15,8 +15,11 @@ end path = path.."/archive/"..(os.date("%Y")).."/"..(os.date("%b")).."/"..(os.date("%d")); - --make sure the path exists - api:executeString("system mkdir -p "..path); + --add functions + require "resources.functions.mkdir"; + + --make sure the recordings directory exists + mkdir(path); --check whether to record the to user if (user_exists == "true") then diff --git a/resources/install/scripts/app/dialplan/resources/inbound/010_get_domain.lua.noload b/resources/install/scripts/app/dialplan/resources/inbound/010_get_domain.lua.noload index cbdeefea70..9d55c1bcdc 100644 --- a/resources/install/scripts/app/dialplan/resources/inbound/010_get_domain.lua.noload +++ b/resources/install/scripts/app/dialplan/resources/inbound/010_get_domain.lua.noload @@ -15,7 +15,7 @@ -- The Initial Developer of the Original Code is -- Mark J Crane --- Portions created by the Initial Developer are Copyright (C) 2014 +-- Portions created by the Initial Developer are Copyright (C) 2014-2019 -- the Initial Developer. All Rights Reserved. --set defaults @@ -23,6 +23,9 @@ expire["get_domain"] = "3600"; source = ""; +--include cache library + local cache = require "resources.functions.cache" + --get the variables local destination_number = session:getVariable("destination_number"); @@ -36,8 +39,10 @@ dbh = database_handle('system'); --get the cache - freeswitch.consoleLog("notice", "[app:dialplan:inbound:get_domain] memcache get app:dialplan:inbound:get_domain:" .. destination_number .. "\n"); - cache = trim(api:execute("memcache", "get app:dialplan:inbound:get_domain:" .. destination_number)); + if (cache.support() and destination_number) then + local key, err = "app:dialplan:inbound:get_domain:" .. destination_number; + cache, err = cache.get(key); + end --get the ring group destinations if (cache == "-ERR NOT FOUND") then @@ -55,11 +60,21 @@ --local destination_context = row.destination_context; --set the cache - cache = "domain_uuid=" .. domain_uuid .. "&domain_name=" .. domain_name; - result = trim(api:execute("memcache", "set app:dialplan:inbound:get_domain:" .. destination_number .. " '"..cache.."' "..expire["get_domain"])); + domain = "domain_uuid=" .. domain_uuid .. "&domain_name=" .. domain_name; + if cache.support() then + local key = app:dialplan:inbound:get_domain:" .. destination_number .. " '"..domain.."' "..expire["get_domain"]; + if debug['cache'] then + freeswitch.consoleLog("notice", "[dialplan][cache] set key: " .. key .. "\n") + end + local ok, err = cache.set(key, XML_STRING, expire["directory"]) + if debug["cache"] and not ok then + freeswitch.consoleLog("warning", "[dialplan][cache] set key: " .. key .. " fail: " .. tostring(err) .. "\n"); + end + end --set the source source = "database"; + end)); else @@ -88,7 +103,7 @@ domain_name = var["domain_name"]; --set the source - source = "memcache"; + source = "cache"; end if (domain_name ~= nil) then diff --git a/resources/install/scripts/app/failure_handler/index.lua b/resources/install/scripts/app/failure_handler/index.lua index 40256df854..25835a5457 100644 --- a/resources/install/scripts/app/failure_handler/index.lua +++ b/resources/install/scripts/app/failure_handler/index.lua @@ -16,7 +16,7 @@ -- -- The Initial Developer of the Original Code is -- Mark J Crane --- Copyright (C) 2010-2015 +-- Copyright (C) 2010-2018 -- the Initial Developer. All Rights Reserved. -- -- Contributor(s): @@ -123,6 +123,10 @@ hangup_on_call_reject = session:getVariable("hangup_on_call_reject"); caller_id_name = session:getVariable("caller_id_name"); caller_id_number = session:getVariable("caller_id_number"); + call_direction = session:getVariable("call_direction"); + if (caller_direction == "local") then + caller_id_name = session:getVariable("effective_caller_id_name"); + end sip_to_user = session:getVariable("sip_to_user"); dialed_user = session:getVariable("dialed_user"); missed_call_app = session:getVariable("missed_call_app"); diff --git a/resources/install/scripts/app/is_local/index.lua b/resources/install/scripts/app/is_local/index.lua index c62d8b9a59..d4b4b85db5 100644 --- a/resources/install/scripts/app/is_local/index.lua +++ b/resources/install/scripts/app/is_local/index.lua @@ -15,9 +15,10 @@ -- The Initial Developer of the Original Code is -- Mark J Crane --- Portions created by the Initial Developer are Copyright (C) 2014 +-- Portions created by the Initial Developer are Copyright (C) 2014-2019 -- the Initial Developer. All Rights Reserved. + --set defaults expire = {} expire["is_local"] = "3600"; @@ -28,8 +29,8 @@ outbound_caller_id_name = session:getVariable("outbound_caller_id_name"); outbound_caller_id_number = session:getVariable("outbound_caller_id_number"); ---connect to the database - local Database = require "resources.functions.database"; +--includes + local cache = require"resources.functions.cache" --include json library local json @@ -43,47 +44,58 @@ --define the trim function require "resources.functions.trim"; ---get the cache - cache = trim(api:execute("memcache", "get app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name)); +--set the cache key + key = "app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name; --get the destination number - if (cache == "-ERR NOT FOUND") then + value, err = cache.get(key); + if (err == 'NOT FOUND') then + + --connect to the database + local Database = require "resources.functions.database"; local dbh = Database.new('system'); - local sql = "SELECT destination_number, destination_context " - sql = sql .. "FROM v_destinations " - sql = sql .. "WHERE destination_number = :destination_number " - sql = sql .. "AND destination_type = 'inbound' " - sql = sql .. "AND destination_enabled = 'true' " + --select data from the database + local sql = "SELECT destination_number, destination_context "; + sql = sql .. "FROM v_destinations "; + sql = sql .. "WHERE ( "; + sql = sql .. " destination_number = :destination_number "; + sql = sql .. " OR destination_prefix || destination_number = :destination_number "; + sql = sql .. ") "; + sql = sql .. "AND destination_type = 'inbound' "; + sql = sql .. "AND destination_enabled = 'true' "; local params = {destination_number = destination_number}; if (debug["sql"]) then freeswitch.consoleLog("notice", "SQL:" .. sql .. "; params: " .. json.encode(params) .. "\n"); end dbh:query(sql, params, function(row) - --set the outbound caller id - if (outbound_caller_id_name ~= nil) then - session:execute("export", "caller_id_name="..outbound_caller_id_name); - session:execute("export", "effective_caller_id_name="..outbound_caller_id_name); - end - if (outbound_caller_id_number ~= nil) then - session:execute("export", "caller_id_number="..outbound_caller_id_number); - session:execute("export", "effective_caller_id_number="..outbound_caller_id_number); - end - --set the local variables destination_context = row.destination_context; --set the cache if (destination_number == row.destination_number) then - result = trim(api:execute("memcache", "set app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name .. " 'destination_number=" .. row.destination_number .. "&destination_context=" .. destination_context .. "' "..expire["is_local"])); + key = "app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name; + value = "destination_number=" .. row.destination_number .. "&destination_context=" .. destination_context; + ok, err = cache.set(key, value, expire["is_local"]); else - result = trim(api:execute("memcache", "set app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name .. " 'destination_number=" .. row.destination_number .. "&destination_context=" .. destination_context .. "' "..expire["is_local"])); - result = trim(api:execute("memcache", "set app:dialplan:outbound:is_local:" .. row.destination_number .. "@" .. domain_name .. " 'destination_number=" .. row.destination_number .. "&destination_context=" .. destination_context .. "' "..expire["is_local"])); + key = "app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name; + value = "destination_number=" .. row.destination_number .. "&destination_context=" .. destination_context; + ok, err = cache.set(key, value, expire["is_local"]); end --log the result - freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. destination_number .. " XML " .. destination_context .. " source: database\n"); + freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. row.destination_number .. " XML " .. destination_context .. " source: database\n"); + + --set the outbound caller id + if (outbound_caller_id_name ~= nil) then + session:execute("set", "caller_id_name="..outbound_caller_id_name); + session:execute("set", "effective_caller_id_name="..outbound_caller_id_name); + end + if (outbound_caller_id_number ~= nil) then + session:execute("set", "caller_id_number="..outbound_caller_id_number); + session:execute("set", "effective_caller_id_number="..outbound_caller_id_number); + end --transfer the call session:transfer(row.destination_number, "XML", row.destination_context); @@ -99,7 +111,7 @@ local value = ""; --parse the cache - key_pairs = explode("&", cache); + key_pairs = explode("&", value); for k,v in pairs(key_pairs) do f = explode("=", v); key = f[1]; @@ -109,16 +121,16 @@ --set the outbound caller id if (outbound_caller_id_name ~= nil) then - session:execute("export", "caller_id_name="..outbound_caller_id_name); - session:execute("export", "effective_caller_id_name="..outbound_caller_id_name); + session:execute("set", "caller_id_name="..outbound_caller_id_name); + session:execute("set", "effective_caller_id_name="..outbound_caller_id_name); end if (outbound_caller_id_number ~= nil) then - session:execute("export", "caller_id_number="..outbound_caller_id_number); - session:execute("export", "effective_caller_id_number="..outbound_caller_id_number); + session:execute("set", "caller_id_number="..outbound_caller_id_number); + session:execute("set", "effective_caller_id_number="..outbound_caller_id_number); end --send to the console - freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. cache .. " source: memcache\n"); + freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. value .. " source: cache\n"); --transfer the call session:transfer(var["destination_number"], "XML", var["destination_context"]); diff --git a/resources/install/scripts/app/messages/resources/events.lua b/resources/install/scripts/app/messages/resources/events.lua new file mode 100644 index 0000000000..12a3ee5770 --- /dev/null +++ b/resources/install/scripts/app/messages/resources/events.lua @@ -0,0 +1,335 @@ +-- +-- Version: MPL 1.1 +-- +-- The contents of this file are subject to the Mozilla Public License Version +-- 1.1 (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- http://www.mozilla.org/MPL/ +-- +-- Software distributed under the License is distributed on an "AS IS" basis, +-- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +-- for the specific language governing rights and limitations under the +-- License. +-- +-- The Original Code is FusionPBX +-- +-- The Initial Developer of the Original Code is +-- Mark J Crane +-- Copyright (C) 2018 + + +-- Start the script + -- + -- + +--prepare the api object + api = freeswitch.API(); + +--define the functions + require "resources.functions.trim"; + require "resources.functions.explode"; + require "resources.functions.base64"; + +--include the database class + local Database = require "resources.functions.database"; + +--set debug + debug["sql"] = false; + +--get the events + --serialize the data for the console + --freeswitch.consoleLog("notice","[events] " .. event:serialize("xml") .. "\n"); + --freeswitch.consoleLog("notice","[evnts] " .. event:serialize("json") .. "\n"); + +--intialize settings + --from_user = ''; + +--get the event variables + uuid = event:getHeader("Core-UUID"); + from_user = event:getHeader("from_user"); + from_host = event:getHeader("from_host"); + to_user = event:getHeader("to_user"); + to_host = event:getHeader("to_host"); + content_type = event:getHeader("type"); + message_text = event:getBody(); + +--set required variables + if (from_user ~= nil and from_host ~= nil) then + message_from = from_user .. '@' .. from_host; + end + if (to_user ~= nil and to_host ~= nil) then + message_to = to_user .. '@' .. to_host; + end + message_type = 'message'; + +--connect to the database + dbh = Database.new('system'); + +--exits the script if we didn't connect properly + assert(dbh:connected()); + +--set debug + debug["sql"] = true; + +--include json library + local json + if (debug["sql"]) then + json = require "resources.functions.lunajson" + end + +--check if the from user exits + if (from_user ~= nil and from_host ~= nil) then + cmd = "user_exists id ".. from_user .." "..from_host; + freeswitch.consoleLog("notice", "[messages][from] user exists " .. cmd .. "\n"); + from_user_exists = api:executeString(cmd); + else + from_user_exists = 'false'; + end + +--check if the to user exits + if (to_user ~= nil and to_host ~= nil) then + cmd = "user_exists id ".. to_user .." "..to_host; + freeswitch.consoleLog("notice", "[messages][to] user exists " .. cmd .. "\n"); + to_user_exists = api:executeString(cmd); + else + to_user_exists = 'false'; + end + +--add the message + if (from_user_exists == 'true') then + --set the direction + message_direction = 'send'; + + --get the from user_uuid + cmd = "user_data ".. from_user .."@"..from_host.." var domain_uuid"; + domain_uuid = trim(api:executeString(cmd)); + + --get the from user_uuid + cmd = "user_data ".. from_user .."@"..from_host.." var user_uuid"; + user_uuid = trim(api:executeString(cmd)); + + --get the from contact_uuid + cmd = "user_data ".. to_user .."@"..to_host.." var contact_uuid"; + contact_uuid = trim(api:executeString(cmd)); + + --create a new uuid and add it to the uuid list + message_uuid = api:executeString("create_uuid"); + + --sql statement + sql = "INSERT INTO v_messages "; + sql = sql .."( "; + sql = sql .."domain_uuid, "; + sql = sql .."message_uuid, "; + sql = sql .."user_uuid, "; + if (contact_uuid ~= null and string.len(contact_uuid) > 0) then + sql = sql .."contact_uuid, "; + end + sql = sql .."message_direction, "; + sql = sql .."message_date, "; + sql = sql .."message_type, "; + if (message_from ~= null and string.len(message_from) > 0) then + sql = sql .."message_from, "; + end + sql = sql .."message_to, "; + sql = sql .."message_text "; + sql = sql ..") "; + sql = sql .."VALUES ( "; + sql = sql ..":domain_uuid, "; + sql = sql ..":message_uuid, "; + sql = sql ..":user_uuid, "; + if (contact_uuid ~= null and string.len(contact_uuid) > 0) then + sql = sql ..":contact_uuid, "; + end + sql = sql ..":message_direction, "; + sql = sql .."now(), "; + sql = sql ..":message_type, "; + if (message_from ~= null and string.len(message_from) > 0) then + sql = sql ..":message_from, "; + end + sql = sql ..":message_to, "; + sql = sql ..":message_text "; + sql = sql ..") "; + + --set the parameters + local params= {} + params['domain_uuid'] = domain_uuid; + params['message_uuid'] = message_uuid; + params['user_uuid'] = user_uuid; + if (contact_uuid ~= null and string.len(contact_uuid) > 0) then + params['contact_uuid'] = contact_uuid; + end + params['message_direction'] = message_direction; + params['message_type'] = message_type; + if (message_from ~= null) then + params['message_from'] = message_from; + end + params['message_to'] = message_to; + params['message_text'] = message_text; + + --show debug info + if (debug["sql"]) then + freeswitch.consoleLog("notice", "[call_center] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); + end + + --run the query + dbh:query(sql, params); + end + if (to_user_exists == 'true') then + --sql statement + sql = "INSERT INTO v_messages "; + sql = sql .."( "; + sql = sql .."domain_uuid, "; + sql = sql .."message_uuid, "; + sql = sql .."user_uuid, "; + if (contact_uuid ~= null and string.len(contact_uuid) > 0) then + sql = sql .."contact_uuid, "; + end + sql = sql .."message_direction, "; + sql = sql .."message_date, "; + sql = sql .."message_type, "; + if (message_from ~= null and string.len(message_from) > 0) then + sql = sql .."message_from, "; + end + sql = sql .."message_to, "; + sql = sql .."message_text "; + sql = sql ..") "; + sql = sql .."VALUES ( "; + sql = sql ..":domain_uuid, "; + sql = sql ..":message_uuid, "; + sql = sql ..":user_uuid, "; + if (contact_uuid ~= null and string.len(contact_uuid) > 0) then + sql = sql ..":contact_uuid, "; + end + sql = sql ..":message_direction, "; + sql = sql .."now(), "; + sql = sql ..":message_type, "; + if (message_from ~= null and string.len(message_from) > 0) then + sql = sql ..":message_from, "; + end + sql = sql ..":message_to, "; + sql = sql ..":message_text "; + sql = sql ..") "; + + --set the direction + message_direction = 'receive'; + + --get the from user_uuid + cmd = "user_data ".. to_user .."@"..to_host.." var domain_uuid"; + domain_uuid = trim(api:executeString(cmd)); + + --get the from user_uuid + cmd = "user_data ".. to_user .."@"..to_host.." var user_uuid"; + user_uuid = trim(api:executeString(cmd)); + + --get the from contact_uuid + cmd = "user_data ".. to_user .."@"..to_host.." var contact_uuid"; + contact_uuid = trim(api:executeString(cmd)); + + --create a new uuid and add it to the uuid list + message_uuid = api:executeString("create_uuid"); + + --set the parameters + local params= {} + params['domain_uuid'] = domain_uuid; + params['message_uuid'] = message_uuid; + params['user_uuid'] = user_uuid; + if (contact_uuid ~= null and string.len(message_from) > 0) then + params['contact_uuid'] = contact_uuid; + end + params['message_direction'] = message_direction; + params['message_type'] = message_type; + params['message_from'] = message_from; + params['message_to'] = message_to; + params['message_text'] = message_text; + + --show debug info + if (debug["sql"]) then + freeswitch.consoleLog("notice", "[call_center] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); + end + + --run the query + dbh:query(sql, params); + + else + + --get setttings needed to send the message + require "resources.functions.settings"; + settings = settings(domain_uuid); + if (settings['message'] ~= nil) then + http_method = ''; + if (settings['message']['http_method'] ~= nil) then + if (settings['message']['http_method']['text'] ~= nil) then + http_method = settings['message']['http_method']['text']; + end + end + + http_content_type = ''; + if (settings['message']['http_content_type'] ~= nil) then + if (settings['message']['http_content_type']['text'] ~= nil) then + http_content_type = settings['message']['http_content_type']['text']; + end + end + + http_destination = ''; + if (settings['message']['http_destination'] ~= nil) then + if (settings['message']['http_destination']['text'] ~= nil) then + http_destination = settings['message']['http_destination']['text']; + end + end + + http_auth_enabled = 'false'; + if (settings['message']['http_auth_enabled'] ~= nil) then + if (settings['message']['http_auth_enabled']['boolean'] ~= nil) then + http_auth_enabled = settings['message']['http_auth_enabled']['boolean']; + end + end + + http_auth_type = ''; + if (settings['message']['http_auth_type'] ~= nil) then + if (settings['message']['http_auth_type']['text'] ~= nil) then + http_auth_type = settings['message']['http_auth_type']['text']; + end + end + + http_auth_user = ''; + if (settings['message']['http_auth_user'] ~= nil) then + if (settings['message']['http_auth_user']['text'] ~= nil) then + http_auth_user = settings['message']['http_auth_user']['text']; + end + end + + http_auth_password = ''; + if (settings['message']['http_auth_password'] ~= nil) then + if (settings['message']['http_auth_password']['text'] ~= nil) then + http_auth_password = settings['message']['http_auth_password']['text']; + end + end + end + + --get the sip user outbound_caller_id + if (from_user ~= nil and from_host ~= nil) then + cmd = "user_data ".. from_user .."@"..from_host.." var outbound_caller_id_number"; + from = trim(api:executeString(cmd)); + else + from = ''; + end + + --replace variables for their value + http_destination = http_destination:gsub("${from}", from); + + --send to the provider using curl + if (to_user ~= nil) then + cmd = [[curl ]].. http_destination ..[[ ]] + cmd = cmd .. [[-H "Content-Type: ]]..http_content_type..[[" ]]; + if (http_auth_type == 'basic') then + cmd = cmd .. [[-H "Authorization: Basic ]]..base64.encode(http_auth_user..":"..http_auth_password)..[[" ]]; + end + cmd = cmd .. [[-d '{"to":"]]..to_user..[[","text":"]]..message_text..[["}']] + result = api:executeString("system "..cmd); + --status = os.execute (cmd); + + --debug - log the command + freeswitch.consoleLog("notice", "[message] " .. cmd.. "\n"); + end + + end diff --git a/resources/install/scripts/app/messages/resources/send.lua b/resources/install/scripts/app/messages/resources/send.lua new file mode 100644 index 0000000000..0cb2e4ede7 --- /dev/null +++ b/resources/install/scripts/app/messages/resources/send.lua @@ -0,0 +1,73 @@ +-- FusionPBX +-- Version: MPL 1.1 + +-- The contents of this file are subject to the Mozilla Public License Version +-- 1.1 (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- http://www.mozilla.org/MPL/ + +-- Software distributed under the License is distributed on an "AS IS" basis, +-- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +-- for the specific language governing rights and limitations under the +-- License. + +-- The Original Code is FusionPBX + +-- The Initial Developer of the Original Code is +-- Mark J Crane +-- Portions created by the Initial Developer are Copyright (C) 2018 +-- the Initial Developer. All Rights Reserved. + +--get the argv values + script_name = argv[0]; + message_from = argv[1]; + message_to = argv[2]; + message_text = argv[3]; + +--send a message to the console + freeswitch.consoleLog("NOTICE",[[[message] from ]]..message_from); + freeswitch.consoleLog("NOTICE",[[[message] to ]] .. message_to); + freeswitch.consoleLog("NOTICE",[[[message] from ]]..message_text); + +--connect to the database + --local Database = require "resources.functions.database"; + --dbh = Database.new('system'); + +--include functions + require "resources.functions.trim"; + require "resources.functions.explode"; + --require "resources.functions.file_exists"; + +--create the api object + api = freeswitch.API(); + +--get the domain name for the destination + array = explode('@', message_to); + domain_name = array[2]; + freeswitch.consoleLog("NOTICE",[[[message] domain_name ]]..domain_name); + +--get the sip profile name + local sofia_contact = trim(api:executeString("sofia_contact */"..message_to)); + local array = explode("/", sofia_contact); + local sip_profile = array[2]; + +--send the sms message + local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE"); + event:addHeader("proto", "sip"); + event:addHeader("dest_proto", "sip"); + event:addHeader("from", message_from); + event:addHeader("from_full", "sip:"..message_from); + event:addHeader("to", message_to); + event:addHeader("subject", "sip:"..message_to); + --event:addHeader("type", "text/html"); + event:addHeader("type", "text/plain"); + event:addHeader("hint", "the hint"); + event:addHeader("replying", "true"); + event:addHeader("sip_profile", sip_profile); + event:addBody(message_text); + +--send info to the console + freeswitch.consoleLog("info", event:serialize()); + +--send the event + event:fire(); diff --git a/resources/install/scripts/app/ring_groups/index.lua b/resources/install/scripts/app/ring_groups/index.lua index 932703170d..70649fa49a 100644 --- a/resources/install/scripts/app/ring_groups/index.lua +++ b/resources/install/scripts/app/ring_groups/index.lua @@ -1,5 +1,5 @@ -- Part of FusionPBX --- Copyright (C) 2010-2018 Mark J Crane +-- Copyright (C) 2010-2019 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -25,7 +25,6 @@ -- -- Contributor(s): -- Mark J Crane --- Luis Daniel Lucio Qurioz --include the log log = require "resources.functions.log".ring_group @@ -137,8 +136,6 @@ --get the variables if (session:ready()) then session:setAutoHangup(false); - domain_name = session:getVariable("domain_name"); - domain_uuid = session:getVariable("domain_uuid"); ring_group_uuid = session:getVariable("ring_group_uuid"); recordings_dir = session:getVariable("recordings_dir"); sounds_dir = session:getVariable("sounds_dir"); @@ -156,6 +153,7 @@ context = session:getVariable("context"); call_direction = session:getVariable("call_direction"); accountcode = session:getVariable("accountcode"); + local_ip_v4 = session:getVariable("local_ip_v4") end --default to local if nil @@ -188,13 +186,6 @@ record_ext = "wav"; end ---set the recording path - record_path = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d"); - record_path = record_path:gsub("\\", "/"); - ---set the recording file - record_name = uuid .. "." .. record_ext; - --prepare the api object api = freeswitch.API(); @@ -207,24 +198,16 @@ --get current switchname hostname = trim(api:execute("switchname", "")) ---get the domain_uuid if it not already set - if (domain_uuid == nil or domain_uuid == '' and domain_name) then - sql = "SELECT domain_uuid FROM v_domains as d "; - sql = sql .. "where d.domain_name = :domain_name "; - local params = {domain_name = domain_name}; - status = dbh:query(sql, params, function(row) - domain_uuid = row["domain_uuid"]; - end); - end - --get the ring group - ring_group_forward_enabled = ""; - ring_group_forward_destination = ""; - sql = "SELECT r.* FROM v_ring_groups as r "; + ring_group_forward_enabled = ''; + ring_group_forward_destination = ''; + sql = "SELECT d.domain_name, r.* FROM v_ring_groups as r, v_domains as d "; sql = sql .. "where r.ring_group_uuid = :ring_group_uuid "; - sql = sql .. "and r.domain_uuid = :domain_uuid "; - local params = {ring_group_uuid = ring_group_uuid, domain_uuid = domain_uuid}; + sql = sql .. "and r.domain_uuid = d.domain_uuid "; + local params = {ring_group_uuid = ring_group_uuid}; status = dbh:query(sql, params, function(row) + domain_uuid = row["domain_uuid"]; + domain_name = row["domain_name"]; ring_group_name = row["ring_group_name"]; ring_group_extension = row["ring_group_extension"]; ring_group_greeting = row["ring_group_greeting"]; @@ -240,6 +223,13 @@ missed_call_data = row["ring_group_missed_call_data"]; end); +--set the recording path + record_path = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d"); + record_path = record_path:gsub("\\", "/"); + +--set the recording file + record_name = uuid .. "." .. record_ext; + ---set the call_timeout to a higher value to prevent the early timeout of the ring group if (session:ready()) then if (ring_group_call_timeout and #ring_group_call_timeout == 0) then @@ -251,6 +241,7 @@ --play the greeting if (session:ready()) then if (ring_group_greeting and #ring_group_greeting > 0) then + session:answer(); session:sleep(1000); play_file(dbh, domain_name, domain_uuid, ring_group_greeting) session:sleep(1000); @@ -261,8 +252,7 @@ sql = "SELECT r.*, u.user_uuid FROM v_ring_groups as r, v_ring_group_users as u "; sql = sql .. "where r.ring_group_uuid = :ring_group_uuid "; sql = sql .. "and r.ring_group_uuid = u.ring_group_uuid "; - sql = sql .. "and r.domain_uuid = :domain_uuid "; - local params = {ring_group_uuid = ring_group_uuid, domain_uuid = domain_uuid}; + local params = {ring_group_uuid = ring_group_uuid}; status = dbh:query(sql, params, function(row) user_uuid = row["user_uuid"]; end); @@ -353,7 +343,7 @@ --get the destination and follow the forward function get_forward_all(count, destination_number, domain_name) cmd = "user_exists id ".. destination_number .." "..domain_name; - freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. cmd .. "\n"); + --freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. cmd .. "\n"); user_exists = api:executeString(cmd); if (user_exists == "true") then ---check to see if the new destination is forwarded - third forward @@ -362,12 +352,12 @@ --get the toll_allow var cmd = "user_data ".. destination_number .."@" ..leg_domain_name.." var toll_allow"; toll_allow = api:executeString(cmd); - freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. destination_number .. " toll_allow is ".. toll_allow .."\n"); - + --freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. destination_number .. " toll_allow is ".. toll_allow .."\n"); + --get the new destination - third foward cmd = "user_data ".. destination_number .."@" ..domain_name.." var forward_all_destination"; destination_number = api:executeString(cmd); - freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. count .. " " .. cmd .. " ".. destination_number .."\n"); + --freeswitch.consoleLog("notice", "[ring groups][call forward all] " .. count .. " " .. cmd .. " ".. destination_number .."\n"); count = count + 1; if (count < 5) then count, destination_number = get_forward_all(count, destination_number, domain_name); @@ -431,8 +421,8 @@ freeswitch.consoleLog("notice", "[ring group] SQL:" .. sql .. "; params:" .. json.encode(params) .. "\n"); end destinations = {}; - x = 1; destination_count = 0; + x = 1; assert(dbh:query(sql, params, function(row) if (row.destination_prompt == "1" or row.destination_prompt == "2") then prompt = "true"; @@ -487,8 +477,63 @@ ) end + --prepare the array of destinations + x = 1; + for key, row in pairs(destinations) do + --set the values from the database as variables + user_exists = row.user_exists; + ring_group_strategy = row.ring_group_strategy; + ring_group_timeout_app = row.ring_group_timeout_app; + ring_group_timeout_data = row.ring_group_timeout_data; + ring_group_caller_id_name = row.ring_group_caller_id_name; + ring_group_caller_id_number = row.ring_group_caller_id_number; + ring_group_cid_name_prefix = row.ring_group_cid_name_prefix; + ring_group_cid_number_prefix = row.ring_group_cid_number_prefix; + ring_group_distinctive_ring = row.ring_group_distinctive_ring; + ring_group_ringback = row.ring_group_ringback; + destination_number = row.destination_number; + destination_delay = row.destination_delay; + destination_timeout = row.destination_timeout; + destination_prompt = row.destination_prompt; + toll_allow = row.toll_allow; + + --determine if the user is registered if not registered then lookup + cmd = "sofia_contact */".. destination_number .."@" ..domain_name; + if (api:executeString(cmd) == "error/user_not_registered") then + freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); + cmd = "user_data ".. destination_number .."@" ..domain_name.." var forward_user_not_registered_enabled"; + freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); + if (api:executeString(cmd) == "true") then + --get the new destination number + cmd = "user_data ".. destination_number .."@" ..domain_name.." var forward_user_not_registered_destination"; + freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); + not_registered_destination_number = api:executeString(cmd); + freeswitch.consoleLog("NOTICE", "[ring_group] "..not_registered_destination_number.."\n"); + if (not_registered_destination_number ~= nil) then + destination_number = not_registered_destination_number; + destinations[key]['destination_number'] = destination_number; + end + + --check the new destination number for user_exists + cmd = "user_exists id ".. destination_number .." "..domain_name; + user_exists = api:executeString(cmd); + if (user_exists == "true") then + destinations[key]['user_exists'] = "true"; + else + destinations[key]['user_exists'] = "false"; + end + end + end + end + --process the destinations - x = 0; + --x = 1; + --for key, row in pairs(destinations) do + -- freeswitch.consoleLog("NOTICE", "[ring group] destination_number: "..row.destination_number.."\n"); + --end + + --process the destinations + x = 1; for key, row in pairs(destinations) do --set the values from the database as variables user_exists = row.user_exists; @@ -505,35 +550,10 @@ destination_delay = row.destination_delay; destination_timeout = row.destination_timeout; destination_prompt = row.destination_prompt; - domain_name = row.domain_name; + group_confirm_key = row.group_confirm_key; + group_confirm_file = row.group_confirm_file; toll_allow = row.toll_allow; - - --determine if the user is registered if not registered then lookup - cmd = "sofia_contact */".. destination_number .."@" ..domain_name; - if (api:executeString(cmd) == "error/user_not_registered") then - freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); - cmd = "user_data ".. destination_number .."@" ..domain_name.." var forward_user_not_registered_enabled"; - freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); - if (api:executeString(cmd) == "true") then - --get the new destination number - cmd = "user_data ".. destination_number .."@" ..domain_name.." var forward_user_not_registered_destination"; - freeswitch.consoleLog("NOTICE", "[ring_group] "..cmd.."\n"); - not_registered_destination_number = api:executeString(cmd); - freeswitch.consoleLog("NOTICE", "[ring_group] "..not_registered_destination_number.."\n"); - if (not_registered_destination_number ~= nil) then - destination_number = not_registered_destination_number; - end - - --check the new destination number for user_exists - cmd = "user_exists id ".. destination_number .." "..domain_name; - user_exists = api:executeString(cmd); - if (user_exists == "true") then - row['user_exists'] = "true"; - else - row['user_exists'] = "false"; - end - end - end + user_exists = row.user_exists; --follow the forwards count, destination_number = get_forward_all(0, destination_number, leg_domain_name); @@ -589,8 +609,12 @@ --export the ringback if (ring_group_distinctive_ring ~= nil) then - ring_group_distinctive_ring = ring_group_distinctive_ring:gsub("${local_ip_v4}", session:getVariable("local_ip_v4")); - ring_group_distinctive_ring = ring_group_distinctive_ring:gsub("${domain_name}", session:getVariable("domain_name")); + if (local_ip_v4 ~= nil) then + ring_group_distinctive_ring = ring_group_distinctive_ring:gsub("${local_ip_v4}", local_ip_v4); + end + if (domain_name ~= nil) then + ring_group_distinctive_ring = ring_group_distinctive_ring:gsub("${domain_name}", domain_name); + end session:execute("export", "sip_h_Alert-Info="..ring_group_distinctive_ring); end @@ -651,99 +675,31 @@ --sip uri dial_string = "[sip_invite_domain="..domain_name..",call_direction="..call_direction..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay.."]" .. row.destination_number; else - --external number or direct dial - dial_string = nil + --external number + route_bridge = 'loopback/'..destination_number; - --prepare default actions - local confirm = string.gsub(group_confirm, ',$', '') -- remove `,` from end of string - local route = { -- predefined actions - "domain_name=${domain_name}", - "domain_uuid=${domain_uuid}", - "sip_invite_domain=${domain_name}", - "call_direction=${call_direction}", - "leg_timeout=${destination_timeout}", - delay_name .. "=${destination_delay}", - "ignore_early_media=true", - confirm, - } - - --prepare default variables - local session_mt = {__index = function(_, k) return session:getVariable(k) end} - local params = setmetatable({ - __api__ = api, - destination_number = destination_number, - user_exists = 'false', - call_direction = 'outbound', - domain_name = domain_name, - domain_uuid = domain_uuid, - destination_timeout = destination_timeout, - destination_delay = destination_delay, - toll_allow = toll_allow, - }, session_mt) - - --find destination route - if (tonumber(destination_number) == nil) then - --user define direct destination like `[key=value]sofia/gateway/carrier/123456` - local variables, destination = string.match(destination_number, "^%[(.-)%](.+)$") - if not variables then - destination = destination_number - else - for action in split_vars_pairs(variables) do - route[#route + 1] = action - end - end - route = route_to_bridge.apply_vars(route, params) - route.bridge = destination - else - --user define external number as destination - route = route_to_bridge.apply_vars(route, params) - route = route_to_bridge(dialplans, domain_uuid, params, route) + --set the toll allow to an empty string + if (toll_allow == nil) then + toll_allow = ''; end - --build the dial string - if route and route.bridge then - local remove_actions = { - ["effective_caller_id_name="] = true; - ["effective_caller_id_number="] = true; - ['sip_h_X-accountcode='] = true; - } - - -- cleanup variables - local i = 1 while i < #route do - -- remove vars from prev variant - if remove_actions[ route[i] ] then - table.remove(route, i) - i = i - 1 - -- remove vars with unresolved vars - elseif string.find(route[i], '%${.+}') then - table.remove(route, i) - i = i - 1 - -- remove vars with empty values - elseif string.find(route[i], '=$') then - table.remove(route, i) - i = i - 1 - end - i = i + 1 - end - - --set the caller id - caller_id = ''; - if (ring_group_caller_id_name ~= nil) then - caller_id = "origination_caller_id_name='"..ring_group_caller_id_name.."'" - end - if (ring_group_caller_id_number ~= nil) then - caller_id = caller_id .. ",origination_caller_id_number="..ring_group_caller_id_number..","; - end - - --set the destination dial string - dial_string = '['.. caller_id .. table.concat(route, ',') .. ']' .. route.bridge + --set the caller id + caller_id = ''; + if (ring_group_caller_id_name ~= nil) then + caller_id = "origination_caller_id_name='"..ring_group_caller_id_name.."'" end + if (ring_group_caller_id_number ~= nil) then + caller_id = caller_id .. ",origination_caller_id_number="..ring_group_caller_id_number..","; + end + + --set the destination dial string + dial_string = "[ignore_early_media=true,toll_allow=".. toll_allow ..",".. caller_id .."sip_invite_domain="..domain_name..",call_direction="..call_direction..","..group_confirm.."leg_timeout="..destination_timeout..","..delay_name.."="..destination_delay.."]"..route_bridge end --add a delimiter between destinations if (dial_string ~= nil) then --freeswitch.consoleLog("notice", "[ring group] dial_string: " .. dial_string .. "\n"); - if (x == 0) then + if (x == 1) then if (ring_group_strategy == "enterprise") then app_data = dial_string; else @@ -868,6 +824,8 @@ if ring_group_timeout_app and #ring_group_timeout_app > 0 then session:execute(ring_group_timeout_app, ring_group_timeout_data); end + --check and report missed call + missed(); end else if (ring_group_timeout_app ~= nil) then diff --git a/resources/install/scripts/app/servers/resources/file_cache.lua b/resources/install/scripts/app/servers/resources/file_cache.lua index 6a82dbc935..b6a3fa68f3 100644 --- a/resources/install/scripts/app/servers/resources/file_cache.lua +++ b/resources/install/scripts/app/servers/resources/file_cache.lua @@ -79,7 +79,7 @@ if (row.method == "curl") then api_command_argument = api_command_argument:gsub(" ", "%%20"); url = [[http://]]..row.username..[[:]]..row.password..[[@]]..row.hostname..[[:]]..row.port..[[/webapi/luarun?app/servers/resources/clear_cache.lua%20]]..api_command_argument; - os.execute("curl "..url); + api:executeString("system curl " .. url ); freeswitch.consoleLog("INFO", "[notice] curl ".. url .. " \n"); end end diff --git a/resources/install/scripts/app/speed_dial/index.lua b/resources/install/scripts/app/speed_dial/index.lua index d6783be499..22e6b678f8 100644 --- a/resources/install/scripts/app/speed_dial/index.lua +++ b/resources/install/scripts/app/speed_dial/index.lua @@ -15,7 +15,7 @@ -- The Initial Developer of the Original Code is -- Mark J Crane --- Portions created by the Initial Developer are Copyright (C) 2016 +-- Portions created by the Initial Developer are Copyright (C) 2019 -- the Initial Developer. All Rights Reserved. -- load config @@ -40,16 +40,15 @@ --get the argv values destination = argv[2]; --- search in memcache first +-- search in cache first local key = "app:dialplan:outbound:speed_dial:" .. user .. ":" .. destination .. "@" .. domain_name - local source = "memcache" local value = cache.get(key) --- decode value from memcache +-- decode value from cache if value then local t = json.decode(value) if not (t and t.phone_number) then - log.warningf("can not decode value from memcache: %s", value) + log.warningf("can not decode value from cache: %s", value) value = nil else value = t @@ -71,7 +70,7 @@ from v_contact_phones t0 inner join v_contacts t1 on t0.contact_uuid = t1.contact_uuid left outer join v_contact_groups t2 on t1.contact_uuid = t2.contact_uuid - left outer join v_group_users t3 on t2.group_uuid = t3.group_uuid + left outer join v_user_groups t3 on t2.group_uuid = t3.group_uuid left outer join v_users t4 on t3.user_uuid = t4.user_uuid left outer join v_extension_users t5 on t4.user_uuid = t5.user_uuid left outer join v_extensions t6 on t5.extension_uuid = t6.extension_uuid diff --git a/resources/install/scripts/app/voicemail/index.lua b/resources/install/scripts/app/voicemail/index.lua index 97037eef3a..7fc7cb2df5 100644 --- a/resources/install/scripts/app/voicemail/index.lua +++ b/resources/install/scripts/app/voicemail/index.lua @@ -1,5 +1,5 @@ -- Part of FusionPBX --- Copyright (C) 2013-2017 Mark J Crane +-- Copyright (C) 2013-2019 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -276,16 +276,17 @@ --unset bind meta app session:execute("unbind_meta_app", ""); - --set the callback function - if (session:ready()) then - session:setVariable("playback_terminators", "#"); - session:setInputCallback("on_dtmf", ""); - end end end end end +--set the callback function + if (session:ready()) then + session:setVariable("playback_terminators", "#"); + session:setInputCallback("on_dtmf", ""); + end + --general functions require "resources.functions.base64"; require "resources.functions.trim"; @@ -383,6 +384,13 @@ --leave a message if (voicemail_action == "save") then + --set the variables + if (session:ready()) then + session:setVariable("missed_call", "true"); + session:setVariable("voicemail_answer_stamp", api:execute("strftime")); + session:setVariable("voicemail_answer_epoch", api:execute("strepoch")); + end + --check the voicemail quota if (voicemail_uuid ~= nil and vm_disk_quota ~= nil) then --get voicemail message seconds diff --git a/resources/install/scripts/app/voicemail/resources/functions/macro.lua b/resources/install/scripts/app/voicemail/resources/functions/macro.lua index a2c213123a..2668d042ae 100644 --- a/resources/install/scripts/app/voicemail/resources/functions/macro.lua +++ b/resources/install/scripts/app/voicemail/resources/functions/macro.lua @@ -145,7 +145,7 @@ --At the tone please record your name press any key or stop talking to end the recording if (name == "record_name") then table.insert(actions, {app="streamFile",data="voicemail/vm-record_name1.wav"}); - table.insert(actions, {app="tone_stream",data="L=1;%(1000, 0, 640)"}); + table.insert(actions, {app="tone_stream",data="L=1;%(2000, 0, 640)"}); end --To change your password press 6 if (name == "change_password") then diff --git a/resources/install/scripts/app/voicemail/resources/functions/record_message.lua b/resources/install/scripts/app/voicemail/resources/functions/record_message.lua index bac165648a..989d97797b 100644 --- a/resources/install/scripts/app/voicemail/resources/functions/record_message.lua +++ b/resources/install/scripts/app/voicemail/resources/functions/record_message.lua @@ -38,6 +38,22 @@ end) end +--define escape function (prevents lua injection attacks) + local function esc(x) + return (x:gsub('%%', '%%%%') + :gsub('^%^', '%%^') + :gsub('%$$', '%%$') + :gsub('%(', '%%(') + :gsub('%)', '%%)') + :gsub('%.', '%%.') + :gsub('%[', '%%[') + :gsub('%]', '%%]') + :gsub('%*', '%%*') + :gsub('%+', '%%+') + :gsub('%-', '%%-') + :gsub('%?', '%%?')) + end + local function transcribe(file_path,settings,start_epoch) --transcription variables if (os.time() - start_epoch > 2) then @@ -48,7 +64,7 @@ freeswitch.consoleLog("notice", "[voicemail] transcribe_provider: " .. transcribe_provider .. "\n"); freeswitch.consoleLog("notice", "[voicemail] transcribe_language: " .. transcribe_language .. "\n"); - end + end if (transcribe_provider == "microsoft") then local api_key1 = settings:get('voicemail', 'microsoft_key1', 'text') or ''; @@ -81,6 +97,11 @@ return '' end local transcribe_json = JSON.decode(transcribe_result); + --Trancribe result can be nil + if (transcribe_json["results"] == nil) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: results = (null) \n"); + return '' + end if (debug["info"]) then if (transcribe_json["results"][1]["name"] == nil) then freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); @@ -93,19 +114,53 @@ freeswitch.consoleLog("notice", "[voicemail] CONFIDENCE: " .. transcribe_json["results"][1]["confidence"] .. "\n"); end end - + transcription = transcribe_json["results"][1]["name"]; transcription = transcription:gsub(".*<%/profanity>","..."); confidence = transcribe_json["results"][1]["confidence"]; return transcription; end end + if (transcribe_provider == "custom") then + local transcription_server = settings:get('voicemail', 'transcription_server', 'text') or ''; + local api_key = settings:get('voicemail', 'api_key', 'text') or ''; + local json_enabled = settings:get('voicemail', 'json_enabled', 'boolean') or "false"; + if (transcription_server ~= '') then + transcribe_cmd = "curl -X POST " .. transcription_server .. " -H 'Authorization: Bearer " .. api_key .. "' -F file=@"..file_path + local handle = io.popen(transcribe_cmd); + local transcribe_result = esc(handle:read("*a")); + handle:close(); + + if (debug["info"]) then + freeswitch.consoleLog("notice", "[voicemail] CMD: " .. transcribe_cmd .. "\n"); + freeswitch.consoleLog("notice", "[voicemail] RESULT: " .. transcribe_result .. "\n"); + end + --Trancribe request can fail + if (transcribe_result == '') then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: (null) \n"); + return '' + end + if (json_enabled == "true") then + local transcribe_json = JSON.decode(transcribe_result); + if (transcribe_json["message"] == nil) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_result .. "\n"); + transcribe_result = ''; + end + if (transcribe_json["error"] ~= nil) then + freeswitch.consoleLog("notice", "[voicemail] TRANSCRIPTION: " .. transcribe_result .. "\n"); + transcribe_result = ''; + end + transcribe_result = transcribe_json["message"]; + end + return transcribe_result; + end + end else if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail] message too short for transcription.\n"); - end + end end - + return ''; end @@ -116,12 +171,12 @@ local max_len_seconds = settings:get('voicemail', 'message_max_length', 'numeric') or 300; transcribe_enabled = settings:get('voicemail', 'transcribe_enabled', 'boolean') or "false"; - + if (debug["info"]) then freeswitch.consoleLog("notice", "[voicemail] transcribe_enabled: " .. transcribe_enabled .. "\n"); freeswitch.consoleLog("notice", "[voicemail] voicemail_transcription_enabled: " .. voicemail_transcription_enabled .. "\n"); end - + --record your message at the tone press any key or stop talking to end the recording if (skip_instructions == "true") then --skip the instructions diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index 02ddba4e24..46378dcdb5 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -95,7 +95,11 @@ local settings = Settings.new(dbh, domain_name, domain_uuid) local storage_type = settings:get('recordings', 'storage_type', 'text') - + local storage_path = settings:get('recordings', 'storage_path', 'text') + if (storage_path ~= nil) then + storage_path = storage_path:gsub("${domain_name}", domain_name) + storage_path = storage_path:gsub("${domain_uuid}", domain_uuid) + end --get the recordings from the database ivr_menu_greet_long_is_base64 = false; ivr_menu_greet_short_is_base64 = false; diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua index f0a2e3be74..097caab9dc 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua @@ -121,7 +121,7 @@ end else sql = "select dialplan_xml from v_dialplans as p "; - if (context_name == "public") then + if (context_name == "public" or string.match(context_name, "@")) then sql = sql .. "where p.dialplan_context = :call_context "; else sql = sql .. "where (p.dialplan_context = :call_context or p.dialplan_context = '${domain_name}') "; @@ -170,7 +170,7 @@ --send the xml to the console if (debug["xml_string"]) then - local file = assert(io.open(temp_dir .. "/" .. key .. ".xml", "w")); + local file = assert(io.open(temp_dir .. "/" .. dialplan_cache_key .. ".xml", "w")); file:write(XML_STRING); file:close(); end diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua index 2139539f36..3a9817b839 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -1,6 +1,6 @@ -- xml_handler.lua -- Part of FusionPBX --- Copyright (C) 2013 - 2016 Mark J Crane +-- Copyright (C) 2013 - 2019 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ -- Make sance only for extensions with number_alias -- false - you should register with AuthID=UserID=Extension (default) -- true - you should register with AuthID=Extension and UserID=Number Alias - -- also in this case you need 2 records in memcache for one extension + -- also in this case you need 2 records in cache for one extension local DIAL_STRING_BASED_ON_USERID = xml_handler and xml_handler["reg_as_number_alias"] -- Use number as presence_id @@ -150,15 +150,15 @@ -- get the cache. We can use cache only if we do not use `fs_path` -- or we do not need dial-string. In other way we have to use database. if (continue) and (not USE_FS_PATH) then - if cache.support() and domain_name then + if (cache.support() and domain_name) then local key, err = "directory:" .. (from_user or user) .. "@" .. domain_name XML_STRING, err = cache.get(key); if debug['cache'] then if not XML_STRING then - freeswitch.consoleLog("notice", "[xml_handler-directory][memcache] get key: " .. key .. " fail: " .. tostring(err) .. "\n") + freeswitch.consoleLog("notice", "[xml_handler-directory][cache] get key: " .. key .. " fail: " .. tostring(err) .. "\n") else - freeswitch.consoleLog("notice", "[xml_handler-directory][memcache] get key: " .. key .. " pass!" .. "\n") + freeswitch.consoleLog("notice", "[xml_handler-directory][cache] get key: " .. key .. " pass!" .. "\n") end end end @@ -295,6 +295,19 @@ number_alias = row.number_alias; number_alias_string = [[ number-alias="]] .. row.number_alias .. [["]]; end + + --get the user_uuid + local sql = "SELECT user_uuid FROM v_extension_users WHERE domain_uuid = :domain_uuid and extension_uuid = :extension_uuid " + local params = {domain_uuid=domain_uuid, extension_uuid=extension_uuid}; + user_uuid = dbh:first_value(sql, params); + + --get the contact_uuid + if (user_uuid ~= nil) and (string.len(user_uuid) > 0) then + local sql = "SELECT contact_uuid FROM v_users WHERE domain_uuid = :domain_uuid and user_uuid = :user_uuid " + local params = {domain_uuid=domain_uuid, user_uuid=user_uuid}; + contact_uuid = dbh:first_value(sql, params); + end + --params password = row.password; mwi_account = row.mwi_account; @@ -338,9 +351,15 @@ forward_no_answer_destination = row.forward_no_answer_destination; forward_user_not_registered_enabled = row.forward_user_not_registered_enabled; forward_user_not_registered_destination = row.forward_user_not_registered_destination; - do_not_disturb = row.do_not_disturb; + -- get the follow me information + if (row.follow_me_uuid ~= nil and string.len(row.follow_me_uuid) > 0) then + follow_me_uuid = row.follow_me_uuid; + follow_me_enabled = row.follow_me_enabled; + --follow_me_destinations= row.follow_me_destinations; + end + -- check matching UserID and AuthName if sip_auth_method then local check_from_number = METHODS[sip_auth_method] or METHODS._ANY_ @@ -349,7 +368,6 @@ else continue = (sip_from_user == user) and ((not check_from_number) or (from_user == user)) end - if not continue then XML_STRING = nil; return 1; @@ -494,6 +512,12 @@ table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); + if (user_uuid ~= nil) and (string.len(user_uuid) > 0) then + table.insert(xml, [[ ]]); + end + if (contact_uuid ~= nil) and (string.len(contact_uuid) > 0) then + table.insert(xml, [[ ]]); + end table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); @@ -606,6 +630,12 @@ if (forward_user_not_registered_destination ~= nil) and (string.len(forward_user_not_registered_destination) > 0) then table.insert(xml, [[ ]]); end + if (follow_me_enabled ~= nil) and (string.len(follow_me_enabled) > 0) then + table.insert(xml, [[ ]]); + end + --if (follow_me_destinations ~= nil) and (string.len(follow_me_destinations) > 0) then + -- table.insert(xml, [[ ]]); + --end if (do_not_disturb ~= nil) and (string.len(do_not_disturb) > 0) then table.insert(xml, [[ ]]); end diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/languages/languages.lua b/resources/install/scripts/app/xml_handler/resources/scripts/languages/languages.lua index 420c4e85ce..0480236847 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/languages/languages.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/languages/languages.lua @@ -98,7 +98,7 @@ --define the xml table local xml = {} - --get hte xml + --get the xml table.insert(xml, [[]]); table.insert(xml, [[]]); table.insert(xml, [[
]]); @@ -187,8 +187,8 @@ end --if XML_STRING --send the xml to the console - if (debug["xml_string"]) then - local file = assert(io.open(temp_dir .. "/acl.conf.xml", "w")); + if (debug["xml_string"] and XML_STRING ~= nil) then + local file = assert(io.open(temp_dir .. "/languages.conf.xml", "w")); file:write(XML_STRING); file:close(); end diff --git a/resources/install/scripts/blf_subscribe.lua b/resources/install/scripts/blf_subscribe.lua index a5050cca70..4be98621bb 100644 --- a/resources/install/scripts/blf_subscribe.lua +++ b/resources/install/scripts/blf_subscribe.lua @@ -9,6 +9,7 @@ end require "resources.functions.config" require "resources.functions.split" +require "resources.functions.trim"; local log = require "resources.functions.log"[service_name] local presence_in = require "resources.functions.presence_in" @@ -82,6 +83,34 @@ end end +local find_agent_status do + +local find_agent_uuid_sql = [[select t1.call_center_agent_uuid +from v_call_center_agents t1 inner join v_domains t2 on t1.domain_uuid = t2.domain_uuid +where t2.domain_name = :domain_name and t1.agent_name = :agent_name +]] + +function find_agent_status(user) + local agent_name, domain_name = split_first(user, '@', true) + local _, short = split_first(agent_name, '+', true) + if not domain_name then return end + local dbh = Database.new('system') + if not dbh then return end + local row = dbh:first_row(find_agent_uuid_sql, { + domain_name = domain_name, agent_name = agent_name + }) + dbh:release() + if not row then return end + if row.call_center_agent_uuid then + local cmd = "callcenter_config agent get status "..row.call_center_agent_uuid..""; + freeswitch.consoleLog("notice", "[user status][login] "..cmd.."\n"); + user_status = trim(api:executeString(cmd)); + end + return row.call_center_agent_uuid, user_status +end + +end + local protocols = {} protocols.flow = function(event) @@ -140,6 +169,24 @@ protocols.forward = function(event) end end +protocols.agent = function(event) + local from, to = event:getHeader('from'), event:getHeader('to') + local expires = tonumber(event:getHeader('expires')) + if expires and expires > 0 then + local proto, user = split_first(to, '+', true) + user = user or proto + local call_center_agent_uuid, agent_status = find_agent_status(user) + if agent_status then + log.noticef("Find agent: %s status: %s", user, tostring(agent_status)) + presence_in.turn_lamp(agent_status == "Available", to) + else + log.warningf("Can not find agent status: %s", to) + end + else + log.noticef("%s UNSUBSCRIBE from %s", from, to) + end +end + if proto ~= 'all' then for name in pairs(protocols) do if proto ~= name then diff --git a/resources/install/scripts/call_forward.lua b/resources/install/scripts/call_forward.lua index 0e5d97c832..bc97e5f130 100644 --- a/resources/install/scripts/call_forward.lua +++ b/resources/install/scripts/call_forward.lua @@ -298,8 +298,8 @@ --send notify to phone if feature sync is enabled if settings:get('device', 'feature_sync', 'boolean') == 'true' then -- Get values from the database - do_not_disturb, forward_all_enabled, forward_all_destination, forward_busy_enabled, forward_busy_destination, forward_no_answer_enabled, forward_no_answer_destination, call_timeout = notify.get_db_values(extension, domain_name) - + do_not_disturb, forward_all_enabled, forward_all_destination, forward_busy_enabled, forward_busy_destination, forward_no_answer_enabled, forward_no_answer_destination, call_timeout = notify.get_db_values(extension, domain_name); + -- Get the sip_profile if (extension ~= nil and domain_name ~= nil) then sip_profile = notify.get_profile(extension, domain_name); @@ -307,28 +307,28 @@ if (sip_profile ~= nil) then freeswitch.consoleLog("NOTICE", "[feature_event] SIP NOTIFY: CFWD set to "..forward_all_enabled.."\n"); - + --Do Not Disturb notify.dnd(extension, domain_name, sip_profile, do_not_disturb); --Forward all forward_immediate_enabled = forward_all_enabled; forward_immediate_destination = forward_all_destination; - + --workaround for freeswitch not sending NOTIFY when destination values are nil. Send 0. if (string.len(forward_immediate_destination) < 1) then forward_immediate_destination = '0'; end - + freeswitch.consoleLog("NOTICE", "[feature_event] forward_immediate_destination "..forward_immediate_destination.."\n"); notify.forward_immediate(extension, domain_name, sip_profile, forward_immediate_enabled, forward_immediate_destination); - + --Forward busy --workaround for freeswitch not sending NOTIFY when destination values are nil. Send 0. - if (string.len(forward_busy_destination) < 1) then + if (string.len(forward_busy_destination) < 1) then forward_busy_destination = '0'; end - + freeswitch.consoleLog("NOTICE", "[feature_event] forward_busy_destination "..forward_busy_destination.."\n"); notify.forward_busy(extension, domain_name, sip_profile, forward_busy_enabled, forward_busy_destination); @@ -338,14 +338,14 @@ if (string.len(forward_no_answer_destination) < 1) then forward_no_answer_destination = '0'; end - + freeswitch.consoleLog("NOTICE", "[feature_event] forward_no_answer_destination "..forward_no_answer_destination.."\n"); notify.forward_no_answer(extension, domain_name, sip_profile, forward_no_answer_enabled, forward_no_answer_destination, ring_count); end end - + --disconnect from database - dbh:release() + dbh:release(); --clear the cache if extension and #extension > 0 and cache.support() then @@ -365,9 +365,9 @@ -- BLF for display CF status blf.forward(enabled == 'true', extension, number_alias, - last_forward_all_destination, forward_all_destination, domain_name) + last_forward_all_destination, forward_all_destination, domain_name); -- turn off DND BLF - if enabled == 'true' then - blf.dnd(false, extension, number_alias, domain_name) + if (enabled == 'true') then + blf.dnd(false, extension, number_alias, domain_name); end diff --git a/resources/install/scripts/confirm.lua b/resources/install/scripts/confirm.lua index 82548fc66d..27cdb385d4 100644 --- a/resources/install/scripts/confirm.lua +++ b/resources/install/scripts/confirm.lua @@ -66,8 +66,8 @@ --if the screen file is found then set confirm to true if (domain_name ~= nil) then - call_screen_file = temp_dir .. "/" .. domain_name .. "-" .. caller_id_number .. "." .. record_ext; - if (file_exists(call_screen_file)) then + if (file_exists(temp_dir .. "/" .. domain_name .. "-" .. caller_id_number .. "." .. record_ext)) then + call_screen_file = temp_dir .. "/" .. domain_name .. "-" .. caller_id_number .. "." .. record_ext; confirm = "true"; end end @@ -81,7 +81,7 @@ min_digits = 1; max_digits = 1; digit = ''; - if (file_exists(call_screen_file)) then + if (call_screen_file ~= nil) then max_tries = "1"; digit = session:playAndGetDigits(min_digits, max_digits, max_tries, "500", "#", call_screen_file:gsub("\\","/"), "", "\\d+"); end diff --git a/resources/install/scripts/dial_string.lua b/resources/install/scripts/dial_string.lua index 58a7815fe5..cfc1b8010d 100644 --- a/resources/install/scripts/dial_string.lua +++ b/resources/install/scripts/dial_string.lua @@ -16,7 +16,7 @@ -- -- The Initial Developer of the Original Code is -- Mark J Crane --- Copyright (C) 2010 - 2014 +-- Copyright (C) 2010 - 2019 -- the Initial Developer. All Rights Reserved. -- -- Contributor(s): @@ -228,20 +228,20 @@ if ( session:ready() ) then end --clear the cache - if (user_name ~= nil) then - cmd = "delete directory:"..user_name.."@"..context; - result = api:execute("memcache", cmd); - if (debug["var"]) then - freeswitch.consoleLog("NOTICE", "[dial_string] memcache ".. cmd .. "\n"); - freeswitch.consoleLog("NOTICE", "[dial_string] result: ".. result .. "\n"); + if (user_name ~= nil and context ~= nil) then + if (cache.support()) then + cache.del("directory:"..user_name.."@"..context); + if #number_alias > 0 then + cache.del("directory:"..number_alias.."@"..domain_name); + end end end - if (db_extension ~= nil) then - cmd = "delete directory:"..db_extension.."@"..context; - result = api:execute("memcache", cmd); - if (debug["var"]) then - freeswitch.consoleLog("NOTICE", "[dial_string] memcache ".. cmd .. "\n"); - freeswitch.consoleLog("NOTICE", "[dial_string] result: ".. result .. "\n"); + if (db_extension ~= nil and context ~= nil) then + if (cache.support()) then + cache.del("directory:"..db_extension.."@"..context); + if #number_alias > 0 then + cache.del("directory:"..number_alias.."@"..domain_name); + end end end @@ -267,4 +267,4 @@ if ( session:ready() ) then --show call variables --session:execute("info", ""); -end \ No newline at end of file +end diff --git a/resources/install/scripts/follow_me.lua b/resources/install/scripts/follow_me.lua index abe1efac92..bafb80cc38 100644 --- a/resources/install/scripts/follow_me.lua +++ b/resources/install/scripts/follow_me.lua @@ -16,7 +16,7 @@ -- -- The Initial Developer of the Original Code is -- Mark J Crane --- Copyright (C) 2010-2014 +-- Copyright (C) 2010-2018 -- the Initial Developer. All Rights Reserved. -- -- Contributor(s): diff --git a/resources/install/scripts/recordings.lua b/resources/install/scripts/recordings.lua index 927d52ab26..01b11f2e3b 100644 --- a/resources/install/scripts/recordings.lua +++ b/resources/install/scripts/recordings.lua @@ -16,7 +16,7 @@ -- -- The Initial Developer of the Original Code is -- Mark J Crane --- Copyright (C) 2010 +-- Copyright (C) 2010 - 2019 -- the Initial Developer. All Rights Reserved. -- -- Contributor(s): @@ -30,7 +30,7 @@ recordings_dir = ""; file_name = ""; recording_number = ""; - recording_slots = ""; + recording_id = ""; recording_prefix = ""; --include config.lua @@ -70,9 +70,8 @@ if (settings['recordings']['storage_path'] ~= nil) then if (settings['recordings']['storage_path']['text'] ~= nil) then storage_path = settings['recordings']['storage_path']['text']; - storage_path = storage_path:gsub("${domain_name}", domain_name); - storage_path = storage_path:gsub("${voicemail_id}", voicemail_id); - storage_path = storage_path:gsub("${voicemail_dir}", voicemail_dir); + storage_path = storage_path:gsub("${domain_name}", session:getVariable("domain_name")); + storage_path = storage_path:gsub("${domain_uuid}", domain_uuid); end end end @@ -103,19 +102,23 @@ if (not default_language) then default_language = 'en'; end if (not default_dialect) then default_dialect = 'us'; end if (not default_voice) then default_voice = 'callie'; end - recording_slots = session:getVariable("recording_slots"); + recording_id = session:getVariable("recording_id"); recording_prefix = session:getVariable("recording_prefix"); recording_name = session:getVariable("recording_name"); record_ext = session:getVariable("record_ext"); domain_name = session:getVariable("domain_name"); - --select the recording number - if (recording_slots) then + --select the recording number and set the recording name + if (recording_id == nil) then min_digits = 1; max_digits = 20; session:sleep(1000); - recording_number = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-id_number.wav", "", "\\d+"); - recording_name = recording_prefix..recording_number.."."..record_ext; + recording_id = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-id_number.wav", "", "\\d+"); + recording_name = recording_prefix..recording_id.."."..record_ext; + elseif (tonumber(recording_id) ~= nil) then + recording_name = recording_prefix..recording_id.."."..record_ext; + else + recording_name = recording_prefix.."."..record_ext; end --set the default recording name if one was not provided @@ -130,14 +133,14 @@ session:streamFile(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_started.wav"); session:execute("set", "playback_terminators=#"); + --make the directory + mkdir(recordings_dir); + --begin recording if (storage_type == "base64") then --include the file io local file = require "resources.functions.file" - --make the directory - mkdir(recordings_dir); - --record the file to the file system -- syntax is session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs); session:execute("record", recordings_dir .."/".. recording_name); @@ -152,10 +155,19 @@ freeswitch.consoleLog("notice", "[recordings] ".. storage_type .. " ".. storage_path .."\n"); session:execute("record", storage_path .."/"..recording_name); else + freeswitch.consoleLog("notice", "[recordings] ".. storage_type .. " ".. recordings_dir .."\n"); -- syntax is session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs); session:execute("record", "'"..recordings_dir.."/"..recording_name.."' 10800 500 500"); end + --get the description of the previous recording + sql = "SELECT recording_description FROM v_recordings "; + sql = sql .. "where domain_uuid = :domain_uuid "; + sql = sql .. "and recording_filename = :recording_name "; + sql = sql .. "limit 1"; + local params = {domain_uuid = domain_uuid, recording_name = recording_name}; + local recording_description = dbh:first_value(sql, params) or '' + --delete the previous recording sql = "delete from v_recordings "; sql = sql .. "where domain_uuid = :domain_uuid "; @@ -172,6 +184,7 @@ table.insert(array, "recording_uuid, "); table.insert(array, "domain_uuid, "); table.insert(array, "recording_filename, "); + table.insert(array, "recording_description, "); if (storage_type == "base64") then table.insert(array, "recording_base64, "); end @@ -182,6 +195,7 @@ table.insert(array, ":recording_uuid, "); table.insert(array, ":domain_uuid, "); table.insert(array, ":recording_name, "); + table.insert(array, ":recording_description, "); if (storage_type == "base64") then table.insert(array, ":recording_base64, "); end @@ -193,6 +207,7 @@ recording_uuid = recording_uuid; domain_uuid = domain_uuid; recording_name = recording_name; + recording_description = recording_description; recording_base64 = recording_base64; }; @@ -270,6 +285,9 @@ if ( session:ready() ) then --add the domain name to the recordings directory recordings_dir = recordings_dir .. "/"..domain_name; + --if a recording directory is specified, use that instead + if (storage_path ~= nil and string.len(storage_path) > 0) then recordings_dir = storage_path; end + --set the sounds path for the language, dialect and voice default_language = session:getVariable("default_language"); default_dialect = session:getVariable("default_dialect"); diff --git a/resources/install/scripts/resources/functions/send_mail.lua b/resources/install/scripts/resources/functions/send_mail.lua index eeef53df6a..6af806a035 100644 --- a/resources/install/scripts/resources/functions/send_mail.lua +++ b/resources/install/scripts/resources/functions/send_mail.lua @@ -41,8 +41,8 @@ if not freeswitch then log.warningf("Mailer Error: %s", err) local email_uuid = uuid.new() - local sql = "insert into v_emails ( " - sql = sql .. "email_uuid, " + local sql = "insert into v_email_logs ( " + sql = sql .. "email_log_uuid, " if call_uuid then sql = sql .. "call_uuid, " end sql = sql .. "domain_uuid, " sql = sql .. "sent_date, " @@ -50,7 +50,7 @@ if not freeswitch then sql = sql .. "status, " sql = sql .. "email " sql = sql .. ") values ( " - sql = sql .. ":email_uuid, " + sql = sql .. ":email_log_uuid, " if call_uuid then sql = sql .. ":call_uuid, " end sql = sql .. ":domain_uuid, " sql = sql .. "now()," @@ -60,7 +60,7 @@ if not freeswitch then sql = sql .. ") " local params = { - email_uuid = email_uuid; + email_log_uuid = email_log_uuid; call_uuid = call_uuid; domain_uuid = domain_uuid; email_type = email_type; @@ -68,7 +68,7 @@ if not freeswitch then db:query(sql, params) - log.infof("Retained in v_emails as email_uuid = %s", email_uuid) + log.infof("Retained in v_email_logs as email_log_uuid = %s", email_log_uuid) else log.infof("Mail to %s sent!", address) end diff --git a/resources/licenses.php b/resources/licenses.php index 05d1b1872e..afc06e4beb 100644 --- a/resources/licenses.php +++ b/resources/licenses.php @@ -21,7 +21,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -37,12 +37,6 @@ License: MPL (Mozilla Public License) //----------------------------------------------------------------------------------- -EditArea -http://www.cdolivet.com/editarea/editarea/docs/license.html -License BSD/Apache/LGPL - -//----------------------------------------------------------------------------------- - PHPMailer http://code.google.com/a/apache-extras.org/p/phpmailer/ License: LGPL @@ -94,31 +88,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //----------------------------------------------------------------------------------- -Copyright (c) 2007 reCAPTCHA -- http://recaptcha.net -AUTHORS: - Mike Crawford - Ben Maurer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -//----------------------------------------------------------------------------------- - EmailAddressValidator Class http://code.google.com/p/php-email-address-validation/ diff --git a/resources/login.php b/resources/login.php index 281242f502..78e599c863 100644 --- a/resources/login.php +++ b/resources/login.php @@ -28,8 +28,155 @@ $language = new text; $text = $language->get(null,'core/user_settings'); +//get action, if any + if (isset($_REQUEST['action'])) { + $action = check_str($_REQUEST['action']); + } + +//retrieve parse reset key + if ($action == 'define') { + $key = $_GET['key']; + $key_part = explode('|', decrypt($_SESSION['login']['password_reset_key']['text'], $key)); + $username = $key_part[0]; + $domain_uuid = $key_part[1]; + $password_submitted = $key_part[2]; + //get current salt, see if same as submitted salt + $sql = "select password from v_users where domain_uuid = :domain_uuid and username = :username "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->bindParam(':domain_uuid', $domain_uuid); + $prep_statement->bindParam(':username', $username); + $prep_statement->execute(); + $result = $prep_statement->fetch(PDO::FETCH_NAMED); + $password_current = $result['password']; + unset($prep_statement, $result); + + //set flag + if ($username != '' && $domain_uuid == $_SESSION['domain_uuid'] && $password_submitted == $password_current) { + $password_reset = true; + $_SESSION['valid_username'] = $username; + } + else { + header("Location: /login.php"); + exit; + } + } + +//send password reset link + if ($action == 'request') { + if (valid_email($_REQUEST['email'])) { + $email = check_str($_REQUEST['email']); + //see if email exists + $sql = "select "; + $sql .= "u.username, "; + $sql .= "u.password "; + $sql .= "from "; + $sql .= "v_users as u, "; + $sql .= "v_contact_emails as e "; + $sql .= "where "; + $sql .= "e.domain_uuid = u.domain_uuid "; + $sql .= "and e.contact_uuid = u.contact_uuid "; + $sql .= "and e.email_address = :email "; + $sql .= "and e.domain_uuid = '".$_SESSION['domain_uuid']."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->bindParam(':email', $email); + $prep_statement->execute(); + $result = $prep_statement->fetch(PDO::FETCH_NAMED); + unset($prep_statement); + + if ($result['username'] != '') { + //generate reset link email and body variables + $key = encrypt($_SESSION['login']['password_reset_key']['text'], $result['username'].'|'.$_SESSION['domain_uuid'].'|'.$result['password']); + $reset_link = "https://".$_SESSION['domain_name'].PROJECT_PATH."/login.php?action=define&key=".urlencode($key); + $reset_button = email_button(strtoupper($text['label-reset_password']), $reset_link, '#2e82d0', '#fff'); + $logo_full = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABGCAYAAADl5IkzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NjAzQjkyMEYxMzA5MTFFNEJCMEVBNTk1RkYzM0FEMjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NjAzQjkyMTAxMzA5MTFFNEJCMEVBNTk1RkYzM0FEMjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MDNCOTIwRDEzMDkxMUU0QkIwRUE1OTVGRjMzQUQyNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2MDNCOTIwRTEzMDkxMUU0QkIwRUE1OTVGRjMzQUQyNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PufA528AAFJVSURBVHja7H0HnBRV8n/15Lg5B9hdwpKDkiQJBlA5Eczp7sR05sN0Zw5n+OmZw5m9UzFgVowICh4gIhmJy7I5787O7OTY8//Wm55lWBZEz/Pu703zaWZ2Zvr169fvW/WtelXVUjQapd62t99+mw5lO+200w72tZTwPkr/3k36hc6T3JLbz7YdKs5+Avb22TQ/N9i2b98upaSkdAO8qKhI/ingwwBIh3Ch0YMIkgMdnxQEye1/bvs5gC41NDSo+I1er5eys7PFh+3t7fK2bduiB5I8PYAsxfe8vDy1RqNRDR06VKt8p+pxqKxSqSRZlqPr168Pd3R0hJ1OZ1yYRBOB3EMQ9BQCScAntyTQD0GbCu0NkEsMcP4sEAhEV69eLR8E1ALM0Pjq4cOHGw0GgxF/G9RqtRG7GQC24tUiSRLvJuxqBehxsMswNbj9CPYwwO4vLi524TN3OBzm3YPPPOiHz263e3HekAJouQf4o0nQJ7ck0A8R5EzRGeSJ2rsXzamCltfk5OSYzGZzqlarzQSYs7FnAdi5eM3Bawb2NACbwZ6GPQXvDfH+4b0AuuJPiMaBjr/9kUikC69dALgLeyf2duxtmZmZraWlpfzeHgqFHB6Px4k+egB+uQfwk2BPbkmg9wS4YocTgxyUOQrwyL2BG9TbZLFY0gFsBnUewFsASt5X2UvxWTE+s2A3RtxuQ3tVFfna2sjNu8NBQZeLIoEARYJBikYiFOfmKq2WNHo9aUwm0mK3pKeTMTeXzAUFlFtaGlVJkg/gdjPYoeFbsNdAGNRDyNRnZWU14+9WAL/NZrN17dmzxw8GEgUrkdFf1ZAhQxJt+CTwk9v/rkaHRjwQENT9+vUzpKenp0HL5wHg/QDogdj5tT/+7o/XnIjPJ9WuXk0Na9dS265dZKupIV97O/kB7JDPR2HsQYBbDodJBsDjqwKJ/DuqUpGkVpNFo6FMAF8NwJPZTJA+kgTmkF5WZiodOTKncMSIYVkjR5LZag2jvSYAfDeAXgXg7zEajbtzc3NrmAGkpqba29ra/BBakR+w7ZNbcvv/cpN+4vJaos2tHjRoUArAkqfT6foB5MMB6CEA9iD8PTDo81laNm+m6q++op3LllHLzp0kA8zRUEiAGLSc1AAs7wTwavGqYiDjc7xh3i4ALiV42gBO8ZkRgiAd73UQCjgXaVnb43gWErDTyYv2261WShs4kAaMH08FkyZR+ogRlJmW1smgx74dv1vn9/vXgZ1UAegOxSxIgj25/SLbf+vyWhzgqoKCAn1+fn4WNGMf1tgA+BiAbTxrcr/Nlr7j00+pdsUKqli+nJorKoQGNhoMpAcg1UYjaSwWAs3uBrUAdswg3/c10ROnAJ3b4m9lAJu9bTpuB5+puX1odj00vDE1lYwpKaTDubx1dWT76CP6JwaVz23p1y8je9as8cOmTRufnpMzA/b7xwD9wpEjR1ZDiDjRlzAofQCUPpQEfXL7n6LubMOC3qoyMjKAn5RMALs/gD0K+2F4Px6vJdsXL1ZtXbSIqr75hppgxxO0tgmAs2Rmkh6alsEswB2jEmInaGWo6ARRIsWkSQ+tToowiFN4SVG9QewmtCO0PLfD79FmCPRf4/eTFsBOB30vzMigSRACrq4uam9ooJoFC+jDW2+lnNNPLzzujjtOhw3vBqWvhNDy4TxOXGN9Tk5OHa7ZoXjvk4BPbr96oEtdXV2avn37prMjzWQyTQSwgRvzUZFAIG3tK6/QmpdeogaAm21trV5PKWlppGI6DnBqAbwwQCcD+BJ2BrdaFdPCWrVG2NwsAKIMaABVmBORMIUje8HLbanRrhZg1YAVRBLoPL+P8HEMdrQdYecdzhMBhQ+BwqthKnjtdmEaWPr3p9yJE2kYKH3zhg305V13U+SWW1JwTTO1Ot1p6E9xKBxaD0q/Vq1Wr8L1bkhPT2+y2+1u9tgnwZ7cftVAh9Y247UUmu63APgcZ2trwZLnnqOVTz1FHaDGTJF1AKIlK4v0AGwYGjUA0EcBMq1OS6k5uZTety9Zc3PIkp9PhuwcMkMYpIDCq40GUuF4/BCIDZHsD1DI6aIut5v8Djt5mprJ29ZKflsndeJcDH6m6bJC6+NAjyhaXXjpWbgw2Nmxx3/jcwZ90OEgNSi/IT2dDKD2Um4ue/HDUjhcIDlaMmoeO59Sj/r9mJSJp7IpMg6mxaug9Z87HI5qhUAkt+T2qwS6WC6DlrVCuw21WCxnrnr++Yz37rqLOpqaKAtgMYMWMw1ngIWdTuEIS8vOpmHHHEO5hx9OOUMGU/aAAZRZXBzVZGT2bD+2OJ7gFJT22uf7hLGGQburli+Xvrj5ZiFEVBAs4QSgh6HBGdwaAJm1OTvl+DUCYSNYAFgFe/Y1Hg8ZsLOW7+JIvhiL0ETCPnKu+5LsK74ky6gnqOCCvx5uGjDO53Q6K3HdbW63O3665JbcfpUaXQ0QcaRaXwbEtx98QA0AeT7sbwao3+UUFNwKwI+aO4fKTziBSiZPJlN2TjTaw63fC6ClHuDeTxDEj1FDqJTPmUMrH3hA8nZ0CKDzNwHsWvbOQ2sHAWDZ6yUT+qKF1mdmIcCOVzWEQJjX5tmMAFtwVVezYy7eB7Xsw3WYBX0h16a15Nm+itIHHdEHfeM1f2Y0To7yS9L35Parpe6grxqAXQfQSUUFBbQOH/qhYTNBw/uPP4oOP+VkGnX66RAD2m5wM/Ck2NYNaIfTT502p2Tr9FJbm5u6uvzkcgcoLEdJUkkJwkCitFQDlQ/IkcaMLhZtckPehgbJb7PF7Hlli4e6RQHmDmhuc3k5dVZUUCEYhrawUGh5LXah4Rnk/AqB0Pn991R44myK+f5UqmBnI3EMntqkF+fXpOUITY/rSOHrT7AUklty+1UCnem4HAwGfZFIJABqbC2Cdj3qkkvosDPPiOaOGMkx6NEQECFFIpIqtokoum1bG6Wd25qporKD6psd1AGA2xx+cnugYdUSGSwG4WSTI7Ct8S8oS2Rz+sjX5SW7w0eeLg+t//qP0sihBULr1yxdSoGWFmFfy4n8HqB2gc6XX345HQWzYsOiRbTlj38ko9Uq2o9Auwt7nbU6NH4YQG/fXUmDB/QXQgT9VYdbd5FKxwE5Eqm0OlKZUtgcCGAP+/3+pBZPbr96oEdhn4P1BtoBpj2TL700a9r8P1J6/wFBAJ8FAGeUqbTYOC59xVfb6ZMPvpeqatsBGBXpDTqypFooLdNCpQNzSWfQCi97KCyTNyiT2x+igDdIQfzdGYpSpstHsicEwdBFoWAa5eenUZwW1K5cSUHY2bxkF1HUKwOetbYLDGLkBRcIrl88Zoy0Q6MRVF144hWNzjt/BsObWvB+2vCRIg5HrVZrQx3b0V+18N6T0UzarBKCJnfj+lxerzeeIJPcktuvD+hDhw6V2traJJ/P58HebLfbt2YWF2cYDIYcKDoNa0KSNMbNG6vp/bc3SCuX7aCCwlQaOaYfnTxuDECtIZ1OC01N5PGHyYfdD2B7/EFyh2Tyh6MU8AQA+gh1BqHRAyGK+gIUxHd7Gl10w+WTKDfTLPriqaulJmh0PbQ5r6+r45QdwOwCcIvGjaPMkhLx2+ply8gFO74A1F144KHNdQx4xWZ3NjaSr29fSklPZTAL+yLcuAF2v5ZkKG+1VkOajDwKRCIC6BBoAuhJ+zy5/Wo1ul6vlx0OhxeK0sGx4Xj1QXlr6mo7jIs/3aJa/tVWcjtDdPSxw+ieh04nk1lLIYDFCzB7fGFy+SLkC4QpADAHg3gPoLuBfL/MJkEYmjxCdoA8xHZ6KEzusES7bCHK65tJV5w3rrsf37/8CjmbGslUWCS87VHlAgBGnN9JZTNndvsUbBs2iGU+9hOI5BjY7gx2NV55haBlxQoqHjM2HoarCns7Kdq5hyRodO6YyqAnTRbOY2t3cQqsQh6SIE9uv16gs30OrcfY8kGTa81mS/97/vKOaeOGaupTnEW/v3AqDR/eF/QZgIUN7nFDcweC0NxhaG6ZfAB3EN8FgmEBeA9rcoAaX1MUn3cFZAJjF6Bz4bMmn0TtriA99+eplGbRiz546+to23PPki49Q4TAxr1igs/D3k7Jz6fS446L9Rd7x6pVlAr7nNfW40ttQqvzWjte6+obaMRVV/E5RSEL/54VUjTiA1Hg0NwwaVOySK1R4bAwp8D6kkBPbr96oHO+ucKSZWhyq98XNL3+8jJ64bUraMSIPuTpCpPd7gbeQqDeADY0uT8Q6QY5a/KQAHkINjmoOlrCxxAMoNBAe0iBT0dEBc2upj1tTjptRjnNmzu8uw+rbryR/HYH6bKzhcddpaCOaTmntJbPnk15w4aJ37Zu2kTtW7ZQGqg5a3S23xnkGuz8nr32bbDfc4+cLoQL+xdCNSuV0NtYvJ0mrz+bBDgsyAkwcY2+XxGNHzne3UUvkiZAcvuvArqSbx5f6+alJkpLs8ijDx+okmQNOTuDZGt3UyDEkWcyeaHJAwC51x/pBnmwW5PDBsf0Znudvexu2ObBCEe0RakxDJD7YVs3OmlIeQ49e8tReyn7U09R5QcfkDEtnSIazT4oY1rOGW/lJ53U/fu6jz8mNce7Y9dw7Htco3PGHD7jpbecIUPImmqNSux4Y/u87mvRoEiwgWFg6DtUOOKw21wul5NlSnp6unrAgAEpGo0mlavh4DMD0/4DZQB22xExP2KE8+TxWyfsfefq1as9nAefBPzPu/VSoqw3Ydu99Rz/XmoVHnIbBzj2UEqb9TxPb4VQov9WoCeeyOv1+kDjXaFw2DVoUGHq+jU1VJCfBlBzBJosNHZAaHIAnal6iCl7GNode4QXzyTQdZns4OdVrU6q7/BDm4OuQ5N7wxzfHqURg3Jo0V1HUYoulrPWtOJr+u6OO0ijN4hAFnbAhZUOqRjMXi9lDx1Kw845p7ujW998k6wpKRThUFyAWw2qL7zuDHRo9araWup/7bUi3E+AvH07ReyVMftcuNyiZCgdw0B3QKN34Lq93G5paWmeXq8fajQap3J+PT4yEXWTC/qBm8gVcWycFuvxeFbj+N1sdCTNgZ8P4EOHDlWPGTOGS5Sx99YEgarqDTS45bi1oYDf7/ctXbrUa7fbu82y/v3769LS0sxow4L7peMV48TjlaVYfglgbgRaW1s98ZJlUASqgQMHchUlEx+bcC6PGxt+F+zFoct1FtXFxcUGzC0L5ir3W83nYCsUpqMPu1en0wWUMm3RfzfQZafT6cZE7cBuHz6iJPW9d9bSzBNGABAx+ztG16G9xd+y+NznC1OrM0QNHR7a2eQiJ7R8HwiHocMKaVauiXIyzGQ1aknPy3B6DR05IofMBjFGZNu4nr783e9FoowpJyeW0Ra/cxy2yuD1+2n0xRd3d3I7QO6oqqLCzEwuKhfT5qxO8crHeFpbyYW/844+Ni4lpdDOj6SoywHb38yePSKdgXR9RsOs8LfhJnVSDP68ejjQZDKdVVdf97sG2PgHiebbX0pGuQENjRo1ciZu2n3oSzvfyHhm3MG0zAG0xU/6/SFosB9s+1/p10/p4yH2FRhR82pQP4zvELwvwGcW2re4qFiN5RJkXGfQarW2AZz1AHzdnj17uBoRZ2cWQpAP43Rr3N90vu89tKqsCG03fmdHG40FBQX1AL0X507FzgVWShXGx6ajG23VoT87Ro4cWbt582Z7PDmKrwfn15SUlORxv7mGA1djwmFcSzGAY21cNwFt7QH2GhXF8G/X6DIA7sUFtft8vqYB5fklthY3NTQ6KAJNzM421uw+AJxpfBiUvd3mpeVbmsmH4T1sZDHdNnsYTRmVRwU51kMyb+s++ZRaa2oplePRlcw28cqJKwC5F7Z2n7Fjxdp5fFv/7LPQzFoKcVpsjC8Lbc7x71GAnSvaZIw+jIrLSmIBfLye3/ClIluh0cM+0uUPI21GFgUaGtpwzTZuBlLXihs/xGKxnHrHbXfS7h0NlJufTSKpVvphkLOjcvv2LbRg4Yv548aOOxZao6qsrGxLSkpKCDeZC4AwtQ+APPg5D56lN0+G7du3q/A9ayouoqlHH3QxpaKK4vcilmf9+vXeqqqqONGRioqKNNBuBkxEo0pRPxzoBKXiV7RKd6zRuHHjuDAnMxOhvbDxf9ywnzVWe3t7aPny5ZFe6KmKNdjw4cNNmNg67Go+uMe5QtRLIQ9ug7XY6NGjTQAl91GjgIJ9Ij5cj4+vJ/GcRxxxhKgMDK3Hvxfn42tDP4M2m41JFyw4TRku+XSNJM0LORyp+1VVQffE/NFoZLXZHNKbTI2RYHATALYW92IN7rUf7Y8EG7wyYLMNY/anCPPEuG0WKbKk08m6lJQumIYVOGYbhEUNzp+r02pnh93uEp6fYp6iC5aioiaNx7MQ7z8BK9xUXV3dpdQuVPfp06eA07x5XuGYE8OdnQbOshTZmmp1VG+1/tPhcDyG37J+8v9Up/AhB8wokwNjEeDJ31pSmhXNzrVKtbUdlJ+XQT5vEJo8Sn4GOSa1Hxr+0zX1dPWF4+h3J42I/oDN0+s25OKLaPsrr1DnnioyMXC5tBQGEIKG/E4n8RL+xDvv3OtPeO01qlu7llSg7UFOgWVVzE44Jckl5HZTa3sHDTrh+O4A+kjbVlWk+isisAkewijMD9Pgo5jys1BrxQQSQMdk4AKWfRlofK9Hjx5FRX0KIeTkQ7oWvmibrSMWjqvVDobmOBNAGYfJEVU0RCfGdRf+rgG1b8VnTPUEaMEiMjAZ+uK4cnxfiD4YebUAux3H7MBv90CrtDGmCwsLcwCeYv6dUniTaaQM8HVA+7QAYI3QDg2VlZXuAQMGpOJ3fSBIhuCVNaCBccrt4to5N39PfX09axKvUgmFNZAafUpDW7noTz7az+NCn1y5V6G2rIk6IcBacnJymqGRWgHajjht5d+A3hpw/TzBy5gl4dhM5dhOnLeCz4s/m3GMLz58EByW1NTUYvyejynjIqIkQijkTvx+N8bMzcVPNAbDKYsuuCDVX1lJGSUlUjzNWTQCQRZlM85gUMkWiyYnI6N/3pQp/Qcee+x0tPcZzrEbgmLSnq++GvYZWOLAqVOFksDxUqK/JcK2oNGo1qSmZuUWFWWVnXrqxJTc3Ap8p1395psl/4RZePiRRwpl4/d4SJeXVzD3uecu4/RpCHh27H7P9zwvL8+K8402m81nOyorT1o8fz6lZWSQxmgkf10dbayrk/787bdHYlw+xpzfSv9CCPaP0ujYg5BcTN1bcnP1rpKy/JStmxopc5pF2OWsuXkVjkHu4iUzScUg7y4ZxeNUD9t8R10XVbT6qMnppy4c5PJDQOA3Me+7imaPzqZ5k4tIn5NHx774PH0852RyNjeTCu2ZQeELRx9OBrz2mzOb+kyf3i2JNr38MgUDAbIq+eoRRaNHldRVL4SDPy+PDjvj7LjgkYLbF5Lswfc6kyDoUehFQ9l4boft6WaAwq5cO2u9VMERcQPxOTnsZvohR1x8iwm/AMZBxUIjH5NyLrerVLjlwQkCFFs7OjoewoRgye1TLotBzTUAzoDUP4cr5YoCHLHzcmRiE94/lJ+fvxsAt+J3hwG4R+D9MKVsNttBDF4/tF8jgMR59iugHWvxmQngOReTbYbyW0kBXAi/rezs7HwYbXE/BAsYMWJEBgDMNQCHoP0RXHhEASozDZarrETDim3ZgnNtxDVtLC8v3wwBtGvTpk0dCsfOwHHjISzOwziMVSr+suzFIcEt+P4NvF8OAbFHccloWFvimMkQENcAlPnsGI4fg/7vxPsv8Fl+IBRKyQRQDr/nHsqaODFWtix+j+IZlvjMA2bXsmoVbfvb36jivfcyj3/mmdNw3l3Y0zgD88jjjqNxL7xAMudVxGlZ7AKFAxiMgRw7dlDlsmX0xfnn09ibbx5YOnly16iTTw52LlqkG3/ZZZQ9ebIIzf783HNp1YIFhvFnnXUK8FMLe7wNArQzNzeXTcGZOotl9rK//IWm//a3VPb73wsmsBZ/56amkspi2eVpakKXfT9lleenOeN40DHBO3HSOmi61uEjilPeeGMVjRpfSh7cDo5qY9ruDUOrY85YrTq66r6vqLAgVdpS30W7mtxk90ZFZFxTN6njLBLs7AiLxm7rB9+2UE66nmYNzaacKdNo1qJFVLngNcqaNJEKZ/yGTLnp+z3VwQ6t316xW0hDtuXjobGcvsppsyquH1dbS32uu470OjXTxKikVqtCW/8Gbc5Xh89CPlKnZZCu7xhyer3NuClN7AhRAKnhBJe40HI4ushkNnYLsVAwRC4whljue3QfAcDvQ6EgNTXUx5052nnzztOuXPEtxsjKTj9eszd+9dXSSZjM3wC8VbzayN1nYDOwMJlPvPbaa7Jef+0tgvYW5+lyOoyrvlmRajZb5mCCVmPSDIQwOHbZsmWq119/nbZs3grpAUaj1lBeQU7KrBNOyDnnnLNHQysfid8vY4cUgDbjzjvvyHn15TfIkmIlLpsP7Whc8OrLhw0ZMuQY/IZB5ABFz8Bx4wH8Y9CXY7Radclnn31Bn372CW37fht12rtEWLNer6WBgwbQscfMyPnNibNGQIOdjPY+wTUsHTVq1EqAvRXXVAQhMQ0U9tizzz4XbNAvav2ppKhxwWuvTBkwYGCUa/P379+/C8yDx4EzpYpw7hlfffXVgHnnzaOsrFxRYMTv9Rjvf+C+8ccce6yMOelUqdUaHhv7nj0UxVzgnAamwZJS4Yi/ixkeKio88UTKhzDY+Nxz9Onll+tnPf54P85t4KCqrtZWsq9fT367PVYZiY/HMXFzjwWGrk8fOuzSS6nPxo205JJLyPrRR5b0Pn28I6++WrP0mmtU026/XdRZGA6gfwbmOXjGjL643ydCWNVj/Gtxvybhfh239sUXpXQwz+yRI8m2Zg21rlhBu8FMT1m8OAqJsBuYa23jDLB/wXH7Y2vGcby7GwBoZBCMm1gy4KUFK6ihzUNmkz5mp4djgTAc7TaiJI2+g40e2NxCOo2KXAAT7gNpjVrKsGqBaYnCALmsUQNnGEQoN/5M9sl06kuVtOkaI5XnWyh30mSxH2xL7VNK6SWl5GhpEVI3rATOiDBZ0PYgQNhhMtPJF19K8Uy44LonJBkTNMomahDnhfmhGzIRNnppNNjQIICu2EUCn3uRKzEYxM4ytqvLSXtqttOYMaNIpzOwagaLiIoknTjQw0ENHT1zEsEWZDopb9r8PQ0eOILycvME0D/8+H1ofD8Z9cYSzpaL3xscyx7kYnQ3bU9lDRXklND4w8cBFGp66bUXye3xUkZG5kiAYKQ/4Cs+ac5J9N03m2ncmAk0bNDhilkqEUx/evrxV+ieu/9KDz/y1/K5c+fmsq8FbZsrdldQnz4DqaykRPR56dKl1MFpwCoVO5WKYVfy0uIETMozMDmPfOGFF+mxRx4Dq/HTqOGHUZ/CgdSvRBtjTrhkj9tDD/zfk3TdNTfQeeefa4WAOtNqTRmCfhSASaxkRxnaLWNTxucO0rjDJ5PFaqJNW76nP//pRlr8xedTodmbwTa4f98y0AHqTBzTpw0ADAc0NGHMFFEteBf6XgsByiaEgC8AybkQPmhsLgcunLGcB1FVFVuK5RLhRUWkgYD1QBiwACg7+mhas2AB7V650lA6YYLMsVsAuOTG9yHcY74ud309uZuaxAoO7GZK7d+fVAYDOdE+VyEee9pp9OVNN6nPevNNXfHYscGKWbMM255+mgaedRZ7/2gYBMrya66hua++OgFAb4ewrMT1HWtvayvZ+eCDNB0KqGPbNsFAvoWQnvbii+Rsb9+G+7ABzIorF/tob9nEf7tG5xP5ITkbMUnqi0uKfNmZKca6mg4qG5gPkOPLoAzNHhbLaq5ghApzTNCqErWHJTLjaC90cRDwk6KxenBqjVoMNgOdYHNz0lvQIJHfJdOoR7fRpxeW0/QBaQlrfOtg7H5OUmALpCpM2YyLSMo+l9RaifoePZ1qVq4QTjfYUQKhDHQdbnRTWzuNuuHPlJqdwXZdVMXafPNDrMjFr1hCC9rebyIFfD727tRAkrbEaauU4GKPqmRB3a1WswBRQ10DjRwxkt5++90IbwxktnX3dch1q3h+q7NyeWqMAU8CNEhmi570Wh1/ycsrxriMwmRm5xvbv2qLxQzNp6ZwJEy8+mIymshg0HO7ZlxO2gnH/YbsHV76zawTRREOGV0QzkKcQwdNO27cGGpr76B5v7uYdAt1aTNmzOB+SinWFGojdyyOAP+4FBhPaGxcunsQQD4UlP30ltamERdeeAlt2biTpk85hlLTLeI8QgOEw93XikkMoXc4RcKj6d03P6F333mPHnz4gRGzTpjFBQqKICBdGLds7pNOrxNj4AcIhw0dQp9++ik98cSTdOmll8zAte+GkKln5xWPCY7VazBGXLFI2N4yTxmMnUmYUGw66NFrie1qD0w9TVqa0MINoNfNXV2UA0EWRD/d0NRFoMVZhx0mfDf8nIBM/N3yySfqsiOO0LBpxgD3ANzMAFwQGlvRRub48YL8haHld61cSQNAzblSEd9aLjqqBpUHMNWwuV1H33yzeuHUqVrrl19SCsdsFBZScPVq+v799y2DTzxxGgTzCIxT2YfnnUeD0C4HcXHEZ8U771DJ2WdT/rBhjtra2g12u30D5lpTgiPuF9HofKIAblQ79j0Ae9u0o4f1Xfj+esotyRFe9yBoOWeh2Rnwip+qHXPAJ5bJJXIx0DEwQaZBvOPiZA6C0fDfahH1pmaKlYab3xakc96qoT3XjyIjW5qe70jaMT52ycJe4t6AWQLovA075Uza8Oxz5IVU1Gm1FED7BkwIzptn23zclX+MU2cpuPYhKdxSS7LKAKmPPgQhgqyppB9wDLSftxnXV40BtilAV+/jWIPM93o95PX4hOXhhVYNhUM82cM4tsvtdrMfwyV0v2L24ivOnNECMDmZmZnF/CEkNWm0GiEYmYZyRVyWQZjEcbtdwufMAMSSPwOis9NO9k6HiElgjYbJwtejv//++1U7tu6haUceQ20QanxeO9iKzdZOWoAjKzMLQsHAsoUG9BtKl/zhMqpvqDULoQcm5XA6yNZhFecI+L1C4PITc6DFx4N+D6qqqhz0m9/MpZBfTVMnTcM99lNri0+wkQCXDeN8Arw3QLtx6W29EBYSjRo1mmqqa+ics35PT/7t0bxzzjnnZAgRdvRlaHV68vkC1GHrRN+04oKHDB5Gd95+F8068fj0vJz8WRAyO1paWjZg/IRjTSXYiQeAsmO8Q+Tscsalpyoe18jU2tvWRhqAkJVI6/btNPqFF6IDp0wJsC3UXFWlWzV/vkQbNpAhPz9W1xBj3wXhIHKscQ3s7PWAHTLQO6FpC2bMoGMefDCE+xFmv8qORYu02++4Q1U2fboQJixMrTCpmlatUg86/ngVqK9v8oMPar865xwazhWKIXSKBw+mtffeSwPnzMnRwSTb9PLLRnnzZtKdcILor2vXLuqEwJhzww3U0NCwxeFwfGez2SpwRU5liZd+KaDzBmHncWBCV2OvP2nusL6PP7OM3DYnaLhWpJ7aQ6CqykoYh7VyJjdjvkuW2HtEYQCagc22OQNd2NRcwhl/RzSg9Hy7IjjIKGPCqPeuhDq+joFcn0Bg/G3gWTtIMgymrCEDaMAJs+i7V14WEpbb5DpxLQ4HHXXrrZSakSYUqywHpeDmJ0lwtCi0KDor+2HLlhxBhv5j5M7GxlpcWx17mxXhti/Q0f9gyE++gEcUy/AFPdC02liNeqhWTHKx9MOrTQrYGbAMVomXTMRnOK6jo1OYMoFgAJNWFlpUlsM9V4W6mQQX1HR0OQQwuPPhcBCswoK5rNEu/vxLSk/PArg7xbg3NNZRRo6Fzjh7NrV3dtDrrywkszFDXLO9s41U2iDV19epi4qKuYAAOewOmA0m4V/wAeiwwTl11wKQjwOdL5h78mmCZZWXDwQraBPRjtDw6E87pWdaqXxQOY6xErQvNTY0g51YqbCgEOc0k8lsoaK8fnTZJVdSYVFB1tQpR6qZ+XAdfr6GTpgJRrMhZjpD6KjVZvz2cvr8889Hgd4el5+f78SYGOKj4fUB6GAmLFy5qq+U4AtRxVzxYulVjZ0LkHL5MDUrl2CQH+EVzisu1h12xRXW7847T+o/e3asRgHb+2grCBDz8iyHVXvQL27Lh891aIMzGGHO8ZyIDps7N23jffepXI2NpGF2xvMaLCDQ2Smxnc9KovCww9T9fvtbc8U//kF9p0wR9noaGMSKO+9UH/6nP1k3/u1v1Le8XKRMRyD0t69bR3PAHKDFq6AE1uCVvfM2xTEb+SVt9HjRVS/A3sDLESUlWWPGjCszbK91Ur+yLLIxyGGf81KYDZrSK8ovy9QJjsz54mHFDg9EEowBOWb3kklLosSLHFVWEjR03KAUMiq9jNpWk+RLCIFQKT7Z+kehpp4VHx1586205YP3xbIGF5yox80qxSBP/OPV7GiK2ebf3CuFm2ooatBTNAAWEY7RduPIudBmfofL5dqFa2s40ACzHev1ucnj8wqtxRTZ0WUDuOq1RoMpLRQKpsuxNVRBhmPCJSJCNbKzsz0sbSAPyO3rIqMHNr0/AFYROoQAHEmc1+XqEsFAPNFNRrPkdDp0VXuqQGEzyOmJ1exTa6O0Zs3qqA+oZZf1Gaedqp88eSplZ+XSNddfRjffehOFQ7KPKS+flqN8LSkWsVwYCuN4tagUpAYLSLvwgguourKBhg0ZQV1OOwRTiPZUVdCowwfTU889QLNO+A2DIBzzcanUFRU7pbvuvpfeePVtKu3bjyyWFGh6PQSBheZfOZ+2bN1s4YxAnUYj2IDT00URKdQt1bIzM+mLxV/T0888I80777wp7LzyserHhOBxC4R81MXHsO3tde3jjOYpwYyQQatlRxqEGNcfoJgpIitL/bIJ58C9Jj8AJnw47e0wAzPEkiwzqxB/h+MZ6AG0Zdx7b7pzqZgt8G84hwJSRAgGEzQ3WE4XgLoT5/JPuP32Ua9//rnUAc1t5rRo7NUvvUQ1y5dLmfy4MbThA5PgpxeN+ctfKLtfP3d9ff16aPMNmIP1vMyqzPLoL63RBX1HR5pxAyrRmcZ5Z4/td86V71JaYToFfbjoQJC4jKKb1EJDdEVYm2vIIzMolAATq4pSss2UmgKKB17O694OfO/twoEBJSAe3509IkfhEbhpre/HPGzMbFkgwFamkExS6CWKlj6EgbdgIAvpyOuvo/f+9KdY5RrQyKNuuY00UsxKlp21UmDdX0nWspMOtB1tyQEfSdB2lvHnk93lqoQQq4RE7lBoe68D7Pf7YMt7hI3Itvr2rbtAm49mra0S9rFSq16cU44Iiooz0VfLl5lGjRoJja4ht9sF6m1AW34ANyKYwsEYmgS7PBAG0AFmGbiKyLGitGyzuzxucTslFTQTBIfRpBHzkQNK2IMNaRxdsmSJgTVyRkamw9Zhb2PBEjMjMO7+mAARdfcwAVnbsqmxc/sO1Ssvv0aF+SXkdDvEeWvqq+m00+bQW2+9TZgHraCZ7WBAHEEYBZtJycnJy3v5pZdyxo4Zo54//1oqKigBnddTVlYGbd+5nR595DHt5VdcoeeH6UYiQXK5nWykdGtlZjapKal020230slz55Rgns3EeXaxicL94nnvQV9EeDVofKJ8lJQoSDdrcy5aCtAGoI3NmZkSzBz2dUQ9brd6wwMPSCkw51ygzHyTuioqKPP443mtPQK6rvFCo7sBfr75XgA9jeMyYAOhb6lM3Td88IEmUFtLftjeEtqXebkVvy+eMiUK07ER2ngLxr0R9nr69CefLPnwyCOpmFkrzIL03FxyVVaSql8/sWzsrKoi07hxdNj8+dTe2LgFdv5qUHaOj7AfbA7+u4EuYMfpm5CyNQD6nslT+/XrW5BC1RXtVJipIw/umSOigZKO4r1ETsYubkpZYQadOCGfjh6eRcP6pFEm6JpOqxbPaGAlHsJxnb4Q7Wj309f1bso0qWlKH2PsjNXPxwIAxYqrSlk7U8XogDtI0q6biIY+Ln46+frrqeLLZfTN4s/ojBtvpkHHHi0ccDxz/V9eTBGXHwLAStEgtDkERcTjJ+OkeWjb4HO2trI2r1HCDXutKsMTKxjxkRcCgjUM/80TsNPmEGymuza9gnReyw/LMccCa9vYWrJEHq+TjG49+ZkWyhFSqQ6u0WOyQwYgHSK3IF5ANzUlXU5LTVE3NzYDOFkCKFV7GujMM8+S3njj9VReRuMQzYkTJwZxz7pAr7/v6upq5KAV2MC5HIDj9WNiu42CfYVDDHRdFNekf+yJx9X4hPwwUwJBmBu2Dho5apgAOSZjTWNj41porx0cQciaEvY52H7aANBtsOMrypsaG7V/feABysosgOmhIq3aRM+/8CJdc+21RiMoLxMBv89BbNFExJKhnSzmVAhAPTW31tEf/nAJvffeeyPYSckFOlWqmBXlBANh2u9Bv/YLZeCoSWhXDYDOk4ufCrT0d78jXWqqLghAsjMtit0M+5wf6qmCYLPBvBs0cqTw4bBdzlSO25DZjwRlUbNkCb37299qJLdb4wVdd3JhUauVfG63OB9T+PzTTqOUrCxvR1XVbozv92CGeoxFdt+RI7NG33CDZd0dd1BuWRlB6pEBfXOj/Qj6YUMb5zz1FLk7O6va29u/YU87Pwz056Ds/wrQldVugtBz1QIUu7xe/+gLfzcu+/q7FlNuejG5/UxTMVig6w5ip1CILjixnF64ZlL0QFVg+X/OYzEDMMUpWprRz9ojo6aOJBft9cKppb1kjSf97ieIii4iSo2ltp7y0ss0ac03nNUWLyxJgfVPScEdS3DjoOnDGnRRRRGAlR3G1smXc805jg/YDWlcrwxy78sZytObnc5OimkYheqElbry0cSlNQ7a2euR1ut1sYvmgC3IEZu9je1yEeWn+gHqHh+7js5WcQzFIpj44sJTpk5Uv/HGQmrrgM2oiXmy33rrTdi5n6ruvff/jJdccomRs/G4BibaaQaoOGCG+Xkkdh8iot14dKzZbBLlu77++mvxd2dXB8XYeZTuv/8+XnVoaW5uXgVt/iU7ZpUQTe6gCd/t4r9ZUNxy260DXn7lFWpt5aUprRAku3bt5LgCyajXCWbENneQY4TkmB+Cr0Gtio3rhx9+SAsXLtSecsophezs1Om0Ij/Bhr5GFSd0z2GLKnxXxRpZ+H7U5Nm1i9xxIcvhpdCsrtZW8UARpxcmGEA76Pzzw5GY91M4Z1gI8GO/xOi0tFDzwoXihoqSwRBSLKCjACknVhmGDqVTX32Vx4UFng2CtV7Ed9jtawH28umg8A0YSxtscD3MBnZEC4EEATPpiScoq6TEi7Hcit+v5xUtZTx/tvJlqp94nByn77jJO7nu+UmzBlOf/FTaWuUQGWzsSfZ5AyTBngO3pKIsowhSUZaeumOtZY+N5K4mcPtG6FBMtPAB4vb7XhnrLcOPVb9fWXDwq2JiB3c2+t3emPeU3KzowNmzY5qcJVPHLpX/n9fHouUi7GnnsFh87vCQadQppC8ZCo3mrgTQKzGfHAejTHHABUMBaGV39+4PeoU3OhQJ4JKDYo/RazlBK8feR5QhiAOW6b30A7cj2uMYwRCCwtsfuu2227v7yppOjsZMAKfTRdCslJOTQ48++qiFI9tKSkom9enTp8xqtabFSoEl3tbYZjKZJYyFVFdXF+tvrJIWBICZZs6YyWHIDbjvnIm3CV9wJl61slfywysxN9awr8OgN/iOP/6E7jbi4Pz6639CSOoxPrF+BtgUCvroN7Nn0bRp07s/5+3iiy9mbW/mQCOYAIqYjfRUGN2bG5K7Eq810JYN0Jp1AHwTQM5rVBzPW4vv90CzV4KSbwFImb5Nf+wxMlmtIRECLMsSO2iqAMJ6HMt7IwDdhPvOx/N3dR6PaLceNn4FTC83tDQ/XATCjbPn9EpEoR1jUY+9neNPhlxwATEfr4VZwW1Wc3QdhNBE3B+Yb1z3oEFxAncpYSA/W2aj6l84lu+EGzeUacpWnVZlP2PucGpv7iKvN0x2P+eDR4W3k7Qq+nhtC6n2clMpULlKan1gLLU/chh1PDuROl6YQJ0vjSPny6PJ/dYE8i8+jUJbX9x7M9PLKTrgaoo6FQgGpb17SCN8eVSzluRVF++3ds3OWN9n5xCMDUxlC0AOjQeTIuLxYiS1ZJ14MZeiqgfQeYLuUWh7+EBZVL05zfgzjljLzc2j9PQMSktLp9TUNLFbrCliyclisQpbdd9l9YO3GxdUB8oSUJbfQgCvb/ny5SJDrreNl/JuvPFGGjBgAG3evHkQqPWs1NTUIZxQIvXSMOYqtHCbxP6DxG348OGiKg8HtPCz5/FRq2JLupSdhWQLBMEe/KaGWURZWel+7VfBLo09YHPfKQhzgj766CMyGA3dn3FgEhgJFLFGjz73dkP210LKNAko+sCloIf3TmVnJ0xuWhpd8uabNOzssz2Yx82C4SjCON6GX5kQzoQ23MoeUKzJnWvW0N+GDWOzIBt9HFZUVMS5AzLem5RcBcuKe+8VgAsm7J0wE5bdeScvk6ZBiJqysrI0CrbknxPoP9VG7/a+Axh10AxbIN1HXXDOYWP/sXAD7WmwUVpWCqn1GuHsSsXr+i0t9OXGRmnaiDzFt9ZE7g3rSAOGruFaj2BqYHbEYQ/MzCPSGlKp36FoVwXpJt0fO+vIu0mufIOkrhaoHIwFh3HzEpnMnm2t0Bjy2udBgXNIP/HueLEMyf3JxRSs3EAyLx+FDfgdQB4MQ5uDco04kYyjjo02NzZW4EZvgxZqU+6f/GMGZOrUqfTVV191P/C1u5i91F2rXmy8PMOBH7Is9+JTl3oG1wgw7I3Hk3pjFxIA5Ya9XD969OiCxsamrAugORgsvW28/DVlyhQOTMk96qijDPGVgd48/GKloMfGAku5rgD65laWIEMQivEKPCEFGw4eeiUhqDcB1atg6+pysZAJP/boY5o//OEP3Z8vWLCAmYkWwlTqLWEoceNagWz4mZXveKQPnzEj9gguDC0HyKSUllLRtGnU/5hjyOV0ttbW1m7nzLnCwsLhasgbY0KOK0+GsiFDaOBJJ4GhBsUTfhpWrqSaCsxN5Rz82uBy0ZfXX0/H//3vwzMzM8dDMFnxOoaB//n8+bRn+3bK6KFdeaC+gO0+ZO5cS2pp6SgIxnIOFGppafFSQkWi/xTQ42DnTCU7wFEBwG8uKUkrn3fOmJTr71lC4ZQwqXVqEVyi0cri6p75tJKOGlXAGihqPfyUaGdxPykCBapS4wZAE/G6N6nZKQVqquEa7H6SV/6VpL4nk7ZoPEkM1DEvUujjWRhwdvFCI0RVIngkNiKYUCovhb+5h+RAkLRH3C4Fvn2U/AB/RMt03SSCYyJhCRZCgCIqI6VMv4q8bncz9x9Ar0ywjX4cNeJYABixYAWdaKdFKT8VVQAvKwEzGtz0fEjt0khkfxBJMb+DKnEu4HfxB2JIvQGDQ22DoaADtt0uaL4mTNSR77//fvbSpUs1d999N63EhOxtO+mkuaDfHo7Ci/TubQ2BlaRyTOk+psIeDhuFGoaG4swrXaLXIrFbMBH0+J6z40xNTU37tS/i9XsRdhR7Mq584YUXyq+88opq1apV3V+dd9550j333HNIk1qnvMrK+3MXL+ZlL56vnMnHjyDgRBFHTXV1I3v0MX41UFiZGOr+IpJQOV6lSLK+EybQ9Dvv5CSiMMdIcOzCkquvVi9//HER1sG/5bjlikWL6Kiurjy0NY0zAzmvoH7VKv3XMA2sSl+iijY3KO3zhPt43jy6YP36UZgnx+IcNQD7GrAwN/2HbfR9tDo6xOGi32Owdl5z8QQaVJZJPncg5hnGoGlxQ816Nb2zspYqm1yxmAZJilqPvppgzlI4oKZwiG1mftVg54qtZgDfAs2LEyy9pFu9agaeQKox11LIS2LtOcwOtbAK7/HKx8opFIam9337AHW9MJI8K+7E32grbIl9H1KhbZkirphtbhl1DC8RbUP/N0NgNcU9nQcvmrD/sHEACZsmaGdPQ0PDElDTd2pqat6CjfsWtMU7+Pvt5ubmpRx7wFT7QFpOrVZzeSq1EqQTD7IROdu9CgcVJ5LodaB9Kmhbzv5yAPB2MAwPGEYIO02aNGl/IIcC9Nhjj/MSu643H6Df549mZmbJ+fl5+3ze2NhIu3fv5ii7wrS0tP4QXKz4NJxSq+Sqi6jj3Nzc/haLZRD6lMJ96LmNHz9eedR1D1MlKpyZMpcXf/bZZ/f5dseOHXTdddcdIAl4Xx9KXFrGU744go/HBfdmI9r5GPtbfE/q6+vfxT1aBEb0Lca9kcMspARpq0pY8mDhwMwJ97ESc6VzxqOPRlPUMReHWonjcsKW79y1i+9JOcey64zG/p+cd54AilYRPGajkUadfLJgCpLCPHZs2EDf3HcfzDvLdBYSMK1KlUOk/zTQKUE4dWGC7wTQNwWCYccdV08nr9MPMIZJCmOPyKTjdVJfkO5+czMpxRDkjJmXR7UFh1HY7QP4QKcBwkhQJQAfCWEPGCisNlOgchN5P7+m+5bqpz5IUr/jKdTJKYdcs50j4NQxgREEmAHqsJxKoY5GCAIOAsEe1gqQs08p4mZnlZkyT76TuhyOagiqdej7bsUMC/6w9j5QeIEIdeU11G8xHt9AgPwTE2MZ2l+GScbhjGvwPXtUwykp+9uaEAjszMmCFijDJGEFYYTm6w/NyM9+0/emGTnkFJMqFZp8DOz0aRAKAzG2KTARnLzGPW7cONfXX38dPieh1FZ8++ab1ZISwbffdx6PqJ5F48aN3e+7G264gSfkYNDSE8rLy6cOHTq0D86dyvvgwYPzcc4p+G4WfjP673//B9cd3Od4joXHRBYZfT0tpLhLAsD0Dxw4MHz77bf3btsnLEX27D5nwmnikjJ+d2Jhuh3t7e0r0cYHEMLvMcBbW1u/gnDkDjZAKHk4iDH+zIDEXVJuOqdpe73eJi4PxeOWUlAQ8+QrWl04e2PefSPay1px8820h9fJld/wN9MeeohOf/ddKhs+XFB3raLdl9x4I7kbG7MwbicA7IfDzk+Pn/6/AejM6zyYzNXQVt/jdcsZc0fQSTPLqbO1CxctC6BrcUN5+ezdZTW0vcEpxeoAyNH0k26jkMsP8IViIBc7g57rvQHsQSPJMODdKx4h77qXu8FuOvFtWFIDKGz3iWqyMSHBwoGXzFhQ6CgCsLPjjdsTgoTb9skU7HRQ2qxrSJNT7AP4NoJqb+abFw95/aESSL1SaKU2ASaZz2QycZmoOsULXavsdbjxnCTTwTnbffv23a+NhQvfIBzbF9R+1vDhw8+GJj4rLy9vLrT1MGhSDYC5z++zs3NIr9NG0G5qS0t73/nz56fgWPVzzz2rRzvMFDlkswvX5r7vvvvk3oJ+evgB9qYpwtLgYmcXXnThfse999579NDDD6shjI4GoC9CHy8uLS09F0A/CwC+KCMj43J8d+KOHTvT/vCHi/Zrm9fGA2IL7r8GHmOqXLasBXOp8Q7Yr4MHD0kQshrhwFNJ6gNPaqUceKJmjsZiG+xgRbz0t0PZK5R7w/fLBSEZiT8rMFGjC4ERK0oaBYvJys7OLsT4pmDSU1d9fYziK+dkwPIDRjjYyFZRYfznvfcKyq5RqOKQsWNpzCWXsK/Gd8yTT4qaURHlOBZ7n5x7Lq9sjMJ+DO7lUAhxw38D0Lttddbq/BQXDt0DcOrumD9ZRL25HB6SmdaGI2RRR8nT5qRH3tosxcsOpYyfHbVMOJtCdhs0sizAzRo6tsfoeCSaIuzqrkVXkr/6m5gENZrJfOYSilqgGexu8Vuxh9T7viptxYRAFFreRoayCZQx5yYO+NiB/q7D6y7FmXpItvmBvO5igoCsgNaGFKHhVZyz7LR1Y5K5gB1RnmrixIn7tfHww4/T2rXrzbBvpwJAl+NGX4eJNRft9bnssstp76pkbJs+fbqwZ0HBjf37l9JTTz0lPn/66WdJrdEaAbZcaAf2+BqWLv1qv05nc4kuUiKO9zMjZOFzmDljZnTChCP2+/56UOg///kGDUA3Dee5GPuf0Neb8Ho5tNHM119/LWPCuHGxAKJEbavWgBH8mZ8TEGSg93QwMoh5anCGZFtb2/e4P40LFryyz3RTCaCrDng/oj2AGrf9uao32IRHAXa7skLgVnxi4cR2ugUFr7nzePhFzjxHA5UAhAMd27ZlfDB7tsRaTity6SUB2Iy8PM4rZ+FrWDJvngjs1SkTiwE/45lneBmXc0W6CidODE286qruSceg37FqFa1je95qPQb7kf369ev7c1B4zb+KcqXIHV8jL0/UYVKuw14ydFCf7D9dMsF484Nfg17qSA+qxZlaBr2KXvpoF10wc5A0bnCmWFfPPesetW/bSgo77KROTY9ltKmjIuRTVoMRqHTYs0lytJHtpVMo46IlZCwaRrqsvtGU3y+RbM8eQxGvj6Iqo9CsjAf2xMsRtXgvwlz5bzeEDkhU1il3Uigc7OAUQHbCgU63HZptTt2JFzFmoVKmnhxP6+wGfDyKX2lPjBEmtw+SvBU3uvrUU08d8Ntzf98dxsqtud1dNG36NDr9tFMNA8vL8w0Q5ryOvXjxYtjFFQn2aKyLs2efJIDe0tLSw7NeRSOGD1effeaZpj4lfWnnzl30JLRHzw3CRo5lhO0v8JWUfQ6H9S1YsMDCy3I9/UIPPPBXevPNN2nGsTNSB5YPTOVHb9XV1RMH2axfv67XsXv88ccJwoAr0MgidqAHSGNLbuIJO+28osNe/pEjR2befPMthnvuuVusBLCwSDyu5xKdVqHuIoyXi3rsvS8y7lNYwV04YaVAlSgwmKaLnFf2o+D86RASDUuW0JtHHqnlYqQhl4s6KyvJj7Gz6PWxoqU4DzdSeswxfF5p3aOPqqvXrqV42BefdMott1D60KEcy74dQHeA/Qw+9rHHymo++ojaqqtJr/x2BSh82Zw52dasrOMwZ6qUAhwt/0qUnIZ+ni2u1XFvHDsA9NWgNkU3XTltzOdfVtLKTU2Uq00TwWxWgL3d4adbn18rLX1sFseFR3S5feXMk29WNT1/FUU1QVKZ9OD1LLWjFMEgqgToOW89l8JtrdT25EzKvuJzMhUNJ33BkKh5xv9JnQsvA/+xdoM8GonF1Yv3DHLYTeFOJ+zya8g65pgIpwEC6N8p6+aug62bx5fpogo/j9trkjIpWfvtE+XX+8MdxBgB5E0ul2sn6O3YO+68Lf3WW29R2lfHQmsDfnr11Vd7dThxbEvcAz5o0FA688zTYQ4GQhdffJH+oYce3EcQ7NixnW69/bYeINIQp8kzjTWbrXT++fPYpxBmJ3ov3nzOwvJzzH9BQX7hhx9+kHpSQu38mM6TAexaeuHF5w9CGPeuEN1440108R8uDmHM7cwyZE5+6qbgcQEWwxwA6cJY7eAlOgiGwrvvvuvwDz9cRFu3bhEhxXHB2oNRiTHnpBaN8tp9U2Jev4OWY4om1IYTyS0xhkaSxUL+jg4Rl96dbsVLeFzNiKvNcOJLOEyQdDQd9nfQ7VZ9C1AbFKHjx3clI0bQlLvuoubm5oqmpqbl7BhEd+3ASeqMF1/MfOOo2HMMTDify+ejldD0sz/8cCzu7wyAvTk3N9fV2trq+qlA/zmoe7zCp9DqXE8ON3JTR0fHt9Dw9U/fewKlmzXktnvF41nU4RClm7T05fJKeuLNTcIZxLZ65vEXRdOOPp8itk7Y0RFhc4cVb7qg38Izb6CIOocCbe3U8uhJ5K7eJEqW+nZ9R6GQUXHGqWO2fUQdc+qxN94PGgq73DRoEuWddz9T9grs3wDo27i4oELd5B9aPusGs7x33Xsv9VQlTiTVAaIJg7A7mzGBd2J8Nt9yy810/IzjlEkWjhV9UOtF+KfExTmw83v+TMPho8q6tlZjoL///QWOTnNy7jsHy/zlzrsTqK1mvzY0aiXmQDGKn3nmaZE/HwsPVu3nvRZJM5EI+152NTY2bpwxY4ZryZKllJuT1305sfPoxGucKKsAMbXEn2n3ifn46/0PEMAaAfvY1d7eXgGm4AmLtfR9PeeSqEei4tRbzqdoxm/Xg8Kv4hWRp576W3eEnZxQlDMasz2kRImqJPN33ww5ZqOL8rk/oLDYeUSKE4lUvHPZKGhus8kkPObsTNQZDGI+iGKlTOuZli9YIGoaLj7zTAFWXs7gIihM3Y9+7jkCHho4lh3zbg3uG2eorcE82NgXJtiEq6+OlVngFSq8bFkEofb3vxPMuBlQnKNhZhUoiln6jwE9Aeysbpy4oCpOmsdFrRs4INt3/43Hks/pxe4jKRAmvRwiKG26/ek1VNXkUilUTS667HEyDhxDEU4m8HEJIJXwpsvCW67Y4Bzwosshf5uNGh85lapvPoLsKxYSD0+425mnOPS4PBTsctntIo0xlfIvfYIzzjpYCGECrwd9avihKLiECDVefw0KOhuO0W0O0+QwV0HNgsG4VogcJKqJ12/ZG76T840xPtsXfbKILrv0yu72OHyWX9kc4D3+Wew8UTps1Bha9c0KGjFieCcAuB7M5DsAYdett91MN910q2Jzh5U2ImKP95M/1wCYzz33PJ111pkhFhQMKl566rkcHhK172Q3xmgnzrMcdPOfEyaMt23esomuuOwqYp0ZO0+s3Xi+MSfARKJ7Q3BnzjieVq9eTVf98UoP2lgDU2QZa2qMpSMEYRIMBvcJv+Xae4owCkFrOwH2JgBjHSd6TJx4RPC6a6+PjXckuI82ZwcnMxBezQk5nYJe+pTkFGGAA4xcjomXNg+kFfn+cqlqLvMsjgdIfR6PSFzh3e/1ikw43rkSMT/Xg6v69psyhU5eupTKTzklsvaBB2jDZ58JNHLBU55cR9x0E+WNGcNLc+y/WscBMbEIXftGzINv2Rcx6Z57qKhfP0Et42sRn19wAXXt3JnJdepxXZn/CgP/uah7otbice3ERW1FB3P58coXnjt20vfbWunxZ1eQuiiDdEYdmaFF2pvsdOmdS+iL505RxQCikovmv6iqvvNEijjtJBlyYzRZ6uXOmFIp7Ia95KgjSZ/BT0uL5bRHlfLvgnpxnrmPIgEv5Vz0IBn6Dg7U1tZ+y8tfnC+sOOCCh3JdHGwRz9CChlV4Y3zlIyxCW0FM2FHd1dtk6uHLqMYkXsPFFNhuf+TRB4dccunFxoVvLKRPP/2MamvrRf24aCRWAiotNVWshZ922uk09+TZImsMgFkP7fgdL6OhjTous3zHHbeOPOXkOYZnn32ePvtssaj7xokonA5aUlJMs0G9L7zwfA4z7QDo6nhdGNppqFql1u/PYNgkifADBCohkBr4gRN478zKyjr80ccfLr32umu077z7Ln3y0Se0dds28ri9IgPPaNBTn9K+dMJxx9GcuXMIwoH7W1tdXb0JE3o1xr0yMzMznyPAmLoboB35mX1xU4Cr4XB9e4DWiTFinHbiOraazeZizKW8++6/dwyXm9q+Y++SnU6rZ4HBT0NphgbMG3HZZZbCsWNF2W/OWGJBwJ5wGwYM53UdgL1F+JycUJI5ZMjYWTfcQGoOt+3hQ5DiNddZs+fmUsagQWIP+P1ero/PlXV+c/PNXL1VVKfRgQUMvfxywrVvZOXHMRuKI5DTh/kpxetxTC4ofO7MV1/NaVi8mCR+4i9XRursJH97O+nz8qy4Pk3ChIv+R4GeOJkxoLw8sl6r1WZiT334rhnDtu1soi9XVlFOQbrIIEq3aGjp0p30lydXSLdePlmsrRuKy6nw8mdUDQ+dG0sBtWTEJHz84Q0JXlRIC4ChR05+NIEJsja0t1D2addS5ozzZGg/1gwrMPE2KaHOh+qA4wAOXqaqxw1b8/gTj0y+9767RTioyIqD/c9lmpzOrl2gmBzV5DnAZBJxBwCQHX3YhjGSefmLaWl2dlb/W269uejue+7ics4qt9sjnklnMhpE/DoLGvyuHYBhtsTe6A24FhZWnI1Wj2P4+fVtRcVF5Y8/8WgRJo/J5/OLvnGlWR5LnMvFy6DYtrHjFPfFwDmlf7nrzoHX/+m67kw81vAQBh7Y399z27wExTQIAHTxMiSOHWqxWPpcdtklBVdf/Ud+jJDGBdYkQzClWC18n/hhHz70l2u61+P325X+cm1yfp4dvnJtLS0rHVpZWZGrrFaIaDymxxgbZluNbDrw73HeNvyezcFcXFf6xk3r+9lsdmGng99TWkqKp6m5iYOeKtFfV+7UqWMLjjuO21UrD5TwtrS1sTbdhjGy0f6FHKK4lxzV2Iw2N1BmZvawW27hPABdT2ApkcyiJiBXrOH7V1Nd7ea8fwjNlNJ58/KUB20wKPncvqaWlgooFzY/NuH3zXEWyW1zVB6n9jIWs8rKxg+9/voC5YEW7KgOerzeWgjajaxlWIjE05z/0xo9DvZQLEjIXY3JswYXwo/KSX/16dMLjz7peaqqd1Bappn0uJ4Uo4ru/9tKGto/U3XyzMEiiSNl9FHRvHn3SW0LbiV1Rg4knKX3NSAx8BGi3mqrY5zDDdsoZexxlPu7u6mluXkLQPo1JhFrwQZlWSV0iA85ZKcXPz5rd1NT01IApxODngcyb1BoPWxvD3vTN3GaKwuF3oCeIAi9PHlxk8Eo/RzJVoeJ0A8TpQ/2HIxZCiaLlp1LDrsMdhjy4vxcZpuzmzhegcNda5XcjDDeM9Nw4rUebZbzchzayeY67xx263DYQ5iULpyrhVNKMeEreMIDrOkAohdY5xrtubgeLkTJms1VVbWHH4qwkSv+KkLRDiHh4Xp6mLD8oIO+HB2Hnc/DD54UEZ2dnZyhGXQFlLr4XGQT7exO6C9/H0Zb33HWKTTZIH5oJQs31uS4R+ysXMd1DriIpMK4nPiskh9zxPwc/R6C8c+KRFQa7mttXW0Vr6Bw37BX4LdVGMM85Qk0HH7MzKQa/dnKQTO9AJ2TdII4Xwuun9vhZ6ptxvlSlTLfiYJaAJ3vOXYvsxy+XrbsMA4Wnus8HsoTdUTdBmZcGO8daHcX7a3/Jtgvr/hwVCabDVxRBmORr/SbGZVga/jNNn5wCvrzH/e6H8gLj/G37+ALx8Cn9enTZ+aCZ09PnXPGS2TrcFFampnMXJQvEKLL//QxDeqXrRrSP4sHUc44+ncqORSUbO/cR7p+hwHsZpHjvr93uOe1S2K5JdRcQbqcEiq48gVy2e3VmEAroRG+4aKPP2bNXAEn3xQProULYoYBlFoMejqXEVQmqJ+derghdZyxxWWS6AAVO5X2lMRaNh39YsmNJTsmbw72TK7VxtpEPB8J9Jo1Ej/w0R97FhzTPrsyYeIPeeBHEvmwd7CjETQ3D2PO7XCxBm1MqUUY6OJxWooDkuuacf87GVT8UAV+EIPyW37iKz+LrJofwUV7n/nFDyZ0KWWwvwfIs7BncvIGzmNQgqAYAOyUtfP50E4n7c1uExE6ACILxy38dBUcu0Wp2qLm59Arzxur4Xx5tM0aUzgAeKLjuM147cJYbVf6yxpbsEem3Nj5PGpc+05+EEOsTJbEF8Qa14b3NvYNHODesG3WiTHcjmtp4+KVOJ6XtjV7syBjW8x/LASwT5nncVONHwvFj6gyK9jivvswhja+LvSrK+74TVCIrEC4DgJH2rGASuMHWij3nhWCg80mtOnA9f3kApHSgZ40ojyC51CAcKDjpXisPzpZnJubO5lTIwsLC49cvmyX8ezfvSYe35QCzc4LuR1dPhrYL4e+eP8iyssyReLPLe/45FnJ9v7DZBg2BXZRCoAd3mc5RgA9upevc4mmYCMYrd9DRde/TmFrZivs0S9gnn0KoK+nWFql9xApe+K1qJWYBouyG5VYiPgyqU8Bb3xCH9TBp7SpSsjBMCbsugR7TFYmkl/pd+LkiiQ4VTVKuDUfb1Jetd3Gb0wzxoN44qWDtUqotVX5vTrhtx7lWjy0Nze/t/4aEnJI4rHA8f7GfWF+ZYzi9da0Sh9TlPPrlbZDCePopr0VVuIrXvHxtyYcE78ujzIupPQnPobRhP7Es0MjB3jYpFo5zqC0r01YSYn28EXJCdcaZ29q5Rh1wliGlXMHep5bOaeUcO/ie3wsQ8px8WPDieuVB8LeLwr0hAvhgUuDdC7NzMycXFBQcDzAPvHDDzYbLrjodQFyc4pRXG+73UPjxpTQp+9fFLWYdRGlfpjK9sU/VJ3vPkTGMTNIa82CYg91r6FwPfaYpgfIuaJqw04KtVRR0fy/UzS3zMYeY9CwxewIgnRsVCZv5Mc+lzxhIsTDmhNDqaMJNz3+NCg6lHMk3GxVj3bVvUyq+C73bD9BcKgS+pj42OD4pAsnrAokXk/i0k0k4beCMvUyOVU9wsF7jkViX+UENpN4vDbhminhOuPn7QmKnuMvHQBwUsK1U8L1yrT/Y4sPdC+kg6xKRfdZKtjXMyT1WK8/6Lnjz7TrEbErJbSbePw+SyP/NUBPiDpiKZXOj4bNzs6ekpeXN6OoqOiID97bqLv0D6+Jp7GaUgwiqq2t00NTJw+kd969KGo1acQk4yoojn++rer44CEyjz6WdJlFFA2H9gKdH1Sg0VOgZTf5d62ngsv+RqrCckdDQ8M/ock/b29vXwPKVqeAPPhjQd5jIlAvQTHRxNef0n4vbfc2sX7so4ilg7WR8Ftpv7C7Q7iWXo4/5P4e5NwHPPaHrq0XwUeHOm4/MI4HWk4+pGN/4Lf7R0YdWLD8KOz90kCPSyoGu3h+dVZW1iRo9pnQ7OM/+3CT/qJ5L5PHHaC0DIu4IpvNTWPGltFbH10azcmyiKefsGfXs/Vrdfs/biL90CPI2G+sUpCNV+U05KtaR74dq6nwsqeJCgc6oMlXAuSLAfJvcXi9Etf8k0Ge3JLbv2M7VJz9q0BX/bsvRAFWvLoPO2iq2CnW3Ny8BGD89rjZI/2vvnUR5cJWt3HR/UCIMq16Wru2guZOf1iqqbJpWKPzArVp6NRQ4Z9fpXBDBXk3LRGFKDSZBeTf8x35K9dT4RXPMMjtaHcFqPpS9rAD5A1x51sS5Mntf3VT/RInSQC7CKYB2PcA7Cubmpq+AL3+Zsr0cs+ir+bT8P4F1Obu5PImlG3Q09YdNXTSkQ/Q11/u0GixMdhVmX2CRTe8JautaeT48hVyLH6ewu31VDz/JYrklLWjva+hyZdw5BkX5lNAzppcTt7u5JYE+i8Mdi4eCK27AmD/rL6+fkXfsizbZ2tupONnjKZGfzt5Al6yGLS0p7mRTj/hIXrmscW8bKLnMkAhUvlyz38wkj55LmlT0qnwjy+S15hWx443MAXheOPnUCt0PZAEeXJLAv0X3HqCPRgM8vr2KoD907q6ui+j0VD1e4uvoxv+OIfcUTfZ/HYy6yXyyG664tqn6IJzn1L7AzKX/VVxbTb12Dkd1t8/0N7S5V4LYfE52+RgCt/Jshy3yX/WkrnJLbn9/7ppfukTJgSgCLBzmirAyRFEHE3lAPgn3vvIOUOHHV4k3Xj1K1RvqycTWYhzsV5euJDeeftL+mb9I8b8AksDB4dwyCmOq8e+W6nHxnm78YiqaNIuT27J7T8A9F7AzllhEYCWI4hc2Dlk0H3q6UcMnzhpgPmqy56ljxdzcUFeadPRGeceSRaLgQv97cExX3PkHcwAjh/uVLR4vPxwkq4nt+T2nwR6Ao1nwIvikgxOaOcgNLuHs4hgY9tycnJGf/T5XwoeeXgkPfXkB/TIY5fRCbPGh2GHf9fY2MbJKd+yNqe90Wi9Rj0lt+SWBPp/eGPNq4BdREJBOwdB5TlWuoN3gH/YlVedNPzqa07RdXV1NdXU1Gzr7OxcDY2+Ad/XsCYvKioKpaamigisIUOGJEGe3JLbfxvQE6h8RKHdYS4PyskLnIjg9Xpruegk1zbn5ADODgP4t3A2k0LVAw0NDREAXQLIk3Q9uSW3/1ag9wB7vKxT0OFwcFpko16v53KlWiUDq1WW5Q6F7ifmkyc1eXJLbv/tQO9ht/OyWMRisXB5Xn7GV2c8XxnvOc9d5JIn7fHkltwObfuXY93/nX2jfTOkJNo3IyqpxZPb//T2Y2LdNf/F1xEPromnVxL1yKxKbsktuR3apvov718isJMgT27J7Sdu/0+AAQDJxwXsCF3uggAAAABJRU5ErkJggg=='; + $logo_shield = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAeCAYAAADU8sWcAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACVVJREFUeNqcVgtwlNUV/v59b3Y3u2Gzm2XJg7wJIUASSBShToECArUwjhAqVVt8tEVn+lBbRtFAtQ4gPlBaFftQUSi+WpmkKPJQCkyCgBBDSMhrEzab3Wyy2ezj3/0f+/f8a9JBC07wzny789+593z3nHPPdy4jSRJGh2L0P4Grj1TCRIKDMIGgJjCj63nCEMFD6CNEMI6hGjVwNVI7oVqGGI9XBFyuyUPd3bZQf39aNBBQCrEYEqJIFlTQ6PVItVgEg9MZMGRleUxOZ4fBaGwiw6dofwNh4GrkzBWey0NHWEpY6b1wYf6lI0ecPY2N8LW0INjTg3gwCFEmHV0sjbosn36SUgmrxQJDZiashYVIKSqCQf4vKPA4ysoOm8zmF0cP8n/kZsK9bCBwT+OePcVf7NuHS8eOYSSRSMbWQDARtFotGPJU9piPxyHSXp3ZDE1GBkw8nzxAqtUKY3o6DDTPmExgJk5EkNYWrFnTbCsre53MeAnvyamRw54X9Pk+OLB16/Rju3ahd2QENposLilBzuzZyJ5WknAU5klmm1XSGVLAKBSQBA4DHj/jbutmXP85ruhqbICgViPKMNCEw9AQqYFgzc+HY9EiXDp0CMFhNts22LbJ9daz+kl3P3WXKtVaI5OXHtq1a/qz27fjlqJi3P7oBqFq1Y8E/eQSZjSiTJh+BsNgvFH6kGeUQMZMSNnLwGdWVmraV6xQ8OQpy7KQ6HAMRSGFUhQeGABHKePIc2vpTI67fEDqfuYVvT6vfL59+f3lMrm7ZNYs32t7XreX1dzpo29Nj1/QtR7pVPV2eZRefwSDw1EEQnGEWBHBGI8LFzyYXmRH3d6fKQJNZxmRiBgiDwwP47Z335WCZ8+if+dOJoXCH/J4wNOhTGkaBft5q84wmcokLSM+FvYLJYsX7wvEpHvrPm6xeDrcGo4VoFCr5CQjNc0AlVEPTYSHIhCFGGQRoqr8Yc1NyfI89+bbyfxyRGwtLUVedTWOf/ghI5C3Asch0N4OLitbMjBQ+nrOqNRUsBqrU857r1zb8dZWd+nOLXu1iIU1FZV5uGFeMRw59mQZhaMcfME4LntD6BliUd/kR9W8Kfj5imJcfPE5eBsaYbLbESfyslWrkpe4t74eaoMBVKLwdXXBWDBVkMuacx1TaDMMUFud/fTtkz2XRD4h5mQ7MGNGPlouuDE4EkcwyqO1axBt3ghYiS6ZgoFfUKC6Ohd7ty0Be+YkDj36BIx0m/lQKHnLq9avR9cnn8Df1ARzRQUEurwhyv/kqnkJhM+reLcbuuwqIs/sJN6YTI7iKc6GTw+3LDx1qgNcQgE/edrtCcI+KU1auqwMMwrTGbvV8DWB2P3LXyEok8qyRv9LNm6EitJ08vnnIdKlE6gcA53EMbMczmyLFDvytEoMUtlmTaeKQdOYwkGpUjaYU1PQ/GUfnPkT0dkXBK9U4f61syVeSDDnXcNobvRgICIgyCXw0KqpuH1rLXb/eB0s06ox86ZlmLvxHnR8VIfmAweQmZUFiTz2eb2YumGzHHJEm95VMnpAXyCLJk7/j1z+yMlN7/qsoTtX70yHQqXECF2sNY/sV7QEePRGpa+W6rRkRcTBtiBOPr4E67q7ITEqMMqhpJGIP5QUII5qfogUUU0qV7L6VhFdb6m47k4obUbo8m5so6VnrmwmfeWzcj9ValXo6PJjiHI+wkkIiAwYgx6qCaRvDgtpaBpQkYVWVwxr/txO59GAcS8BjpIsBTZg2h01cM6YCV9fH1xUflPW/0YkvZZCh7ao+BDd8pxq6LJKj45p/Rg5UgzautKpk/BFcz9CVMuDMRF9IQE9PSMQ+ARMFh3M6UYwlFfodMgvzKNdLUDrwa8E/uJfksZueqgWnZEIrPPno/KuGhHNO9WxjiYIJE76aStkqv1XdrWx8fGiBVPOv/HPpukezwg6KdRKixHbH6hKLKjKkpyOFLrvYIaokZ2jc8+RG+vFfwFy0VhJ8lw0mfEkytc+Jt3R9HumbO19lOtBJlD/sJKLkZcTMmGcvfoErT54NfKRgnzbm3Mqsra9tO8ckG7BFKcFD9xaHNcgwuD0Szrww0g3aFDkzKfltxHpAkikVUxQ/MrCZxvBGBcwy7c8zSUN7v6eJu5jERumxrS4Bmqzba+sK9dqqbaWi97j1St3FQomI1i1Fnt23MnVVIqJtp86dBqGhT6dTkxbUuYshX5lHYSTT0A4shlKh5bUL45EigP6nzQm2IZXmeD+JxkOGnB8GnIe/7xFY8ucO/ro+NrrZWwMlEzJeGX92tlgXX7QLrz6j2MaesQk7MsfTkSpw/A6J3ijBSPH6xE7/TJUN24i+fw+gpfiiCmtYP1DGNiSpxg++Awj6BwI9XBIvflBEPGLVxJfzXN5GMKh2NHypS/PavdTslINeP9Pa+MrK9MSFx8s0SeGW0kosqDg/VCIUdh+3QBNVpU0sKOC4S+fpZA4kHzlJPSIXO6HylGOom2nDjNKxcLR9weu5XmyXI0m3Ybtjy0CQvQUC4Txhx0HtfLGwvte4NhBCRFvDDEhA9GwGr1/nAth2I0Jd9dLbMyM6KCAWNSMsE9APKLFxLufE4i49pvESXGrra292vOqs7jApo2GY/NOfHIR/f0kHnqdYsGymzkmwaj9R+sYhS6N9D6NnlYRBE+8w7C97Qzr6QcfU0KIK8H2kFreuRnpC9duIntvjucN982o7F+2+rWl9e+fhyLXjo/fWsctmD1RcD13b0rgxIfQ55RSeEUkosMQ2SBUqRnUiqk5dn8J8w3LkfvIG++QjVXXIvg2cnlkRSLxwzcveqHg9IlWZJYX4vhHv41n29Riz45fpLCuZugnT6PWGaXWKL8BdIh7u6AyWZH78N/PKLQpcp4D35VcHjN83lD9ksXPO8+eO4+yWZU4eviR6ASTQnT/9XcmbsgHQ0E5JIpA3NOBRCyCSeu2dKot9ltob9u3WpbJx4HyAe9I79yKWjrpQml60aNSX180QvMD/rqdQu/fHpM8+7ZJva8+JMX97naanzoeu+MllzE1znKtq5dsp13VUobpLunzU+4QzbuGT3wQd+/eLPFD/efou2C8Nq+HXIaNsP+pje/RzjmEQmnTE+/QlHRcksQH6d9+Pfaul3wMmw78u1GqqnhA2v3GoSh9z/8udsZz4a41fkCgZo63x14m1zv+K8AAzpBEP7qfQcsAAAAASUVORK5CYII='; + $domain = $_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name']; + //get email template from db + $sql = "select template_subject, template_body from v_email_templates "; + $sql .= "where template_language = '".$_SESSION['domain']['language']['code']."' "; + $sql .= "and (domain_uuid = '".$_SESSION['domain_uuid']."' or domain_uuid is null) "; + $sql .= "and template_category = 'password_reset' "; + $sql .= "and template_subcategory = 'default' "; + $sql .= "and template_type = 'html' "; + $sql .= "and template_enabled = 'true' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_NAMED); + $eml_subject = $row['template_subject']; + $eml_body = $row['template_body']; + unset($prep_statement, $row); + //replace variables in email body + $eml_body = str_replace('${reset_link}', $reset_link, $eml_body); + $eml_body = str_replace('${reset_button}', $reset_button, $eml_body); + $eml_body = str_replace('${logo_full}', $logo_full, $eml_body); + $eml_body = str_replace('${logo_shield}', $logo_shield, $eml_body); + $eml_body = str_replace('${domain}', $domain, $eml_body); + //send reset link + if (send_email($email, $eml_subject, $eml_body)) { + //email sent + message::add($text['message-reset_link_sent'], 'positive', 2500); + } + else { + //email failed + message::add($eml_error, 'negative', 5000); + } + } + else { + //not found + message::add($text['message-invalid_email'], 'negative', 5000); + } + } + else { + //not found + message::add($text['message-invalid_email'], 'negative', 5000); + } + } + +//reset password + if ($action == 'reset') { + $authorized_username = check_str($_REQUEST['au']); + $username = check_str($_REQUEST['username']); + $password_new = check_str($_REQUEST['password_new']); + $password_repeat = check_str($_REQUEST['password_repeat']); + + if ($username != '' && + $authorized_username == hash('sha256',$_SESSION['login']['password_reset_key']['text'].$username) && + $password_new != '' && + $password_repeat != '' && + $password_new == $password_repeat + ) { + + if (!check_password_strength($password_new, $text)) { + $password_reset = true; + } + else { + $salt = generate_password('20', '4'); + $sql = "update v_users set "; + $sql .= "password = :password, "; + $sql .= "salt = :salt "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and username = :username "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->bindParam(':password', md5($salt.$password_new)); + $prep_statement->bindParam(':salt', $salt); + $prep_statement->bindParam(':username', $username); + $prep_statement->execute(); + unset($prep_statement); + + message::add($text['message-password_reset'], 'positive', 2500); + unset($_SESSION['valid_username']); + $password_reset = false; + } + } + else { + //not found + message::add($text['message-invalid_username_mismatch_passwords'], 'negative', 5000); + $password_reset = true; + } + } + //get the http values and set as variables - if (isset($_GET["msg"])) { $msg = check_str($_GET["msg"]); } else { $msg = null; } + $msg = isset($_GET["msg"]) ? check_str($_GET["msg"]) : null; //set variable if not set if (!isset($_SESSION['login']['domain_name_visible']['boolean'])) { $_SESSION['login']['domain_name_visible']['boolean'] = null; } @@ -85,31 +232,166 @@ } //show the content - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - if ($_SESSION['login']['domain_name_visible']['boolean'] == "true") { - if (count($_SESSION['login']['domain_name']) > 0) { - $click_change_color = ($_SESSION['theme']['login_input_text_color']['text'] != '') ? $_SESSION['theme']['login_input_text_color']['text'] : (($_SESSION['theme']['input_text_color']['text'] != '') ? $_SESSION['theme']['input_text_color']['text'] : '#000000'); - $placeholder_color = ($_SESSION['theme']['login_input_text_placeholder_color']['text'] != '') ? 'color: '.$_SESSION['theme']['login_input_text_placeholder_color']['text'].';' : 'color: #999999;'; - echo "
\n"; - } - else { - echo "
\n"; - } - } - echo "\n"; + echo ""; - echo ""; - echo ""; - echo "
"; + echo "
\n"; + + if (!$password_reset) { + + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + if ($_SESSION['login']['domain_name_visible']['boolean'] == "true") { + if (count($_SESSION['login']['domain_name']) > 0) { + $click_change_color = ($_SESSION['theme']['login_input_text_color']['text'] != '') ? $_SESSION['theme']['login_input_text_color']['text'] : (($_SESSION['theme']['input_text_color']['text'] != '') ? $_SESSION['theme']['input_text_color']['text'] : '#000000'); + $placeholder_color = ($_SESSION['theme']['login_input_text_placeholder_color']['text'] != '') ? 'color: '.$_SESSION['theme']['login_input_text_placeholder_color']['text'].';' : 'color: #999999;'; + echo "
\n"; + } + else { + echo "
\n"; + } + } + echo "\n"; + if ( + function_exists('openssl_encrypt') && + $_SESSION['login']['password_reset_key']['text'] != '' && + $_SESSION['email']['smtp_host']['text'] != '' + ) { + echo "

"; + } + echo ""; + echo ""; + echo "
"; + + echo ""; + + } + else { + + echo "\n"; + + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "
\n"; + echo "
"; + echo "
\n"; + echo "\n"; + echo "

"; + echo ""; + + echo "\n"; + echo "
"; + + } //add the footer $default_login = true; diff --git a/resources/pdo.php b/resources/pdo.php index 693a57490a..32f6d46c8a 100644 --- a/resources/pdo.php +++ b/resources/pdo.php @@ -255,7 +255,7 @@ if ($db_type == "pgsql") { } //end if db_type pgsql //get the domain list - if (!is_array($_SESSION['domains']) or (!isset($_SESSION["domain_uuid"])) or (strlen($_SESSION["domain_uuid"]) == 0)) { + if (!is_array($_SESSION['domains']) or !isset($_SESSION["domain_uuid"])) { //get the domain $domain_array = explode(":", $_SERVER["HTTP_HOST"]); @@ -333,8 +333,8 @@ if ($db_type == "pgsql") { $domain_uuid = uuid(); } -//check the domain cidr range - if (is_array($_SESSION['domain']["cidr"])) { +//check the domain cidr range + if (isset($_SESSION['domain']["cidr"]) && !defined('STDIN')) { $found = false; foreach($_SESSION['domain']["cidr"] as $cidr) { if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { @@ -349,7 +349,7 @@ if ($db_type == "pgsql") { } //check the api cidr range - if (is_array($_SESSION['api']["cidr"])) { + if (isset($_SESSION['api']["cidr"])) { $found = false; foreach($_SESSION['api']["cidr"] as $cidr) { if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { diff --git a/resources/qr_code/QR8bitByte.php b/resources/qr_code/QR8bitByte.php new file mode 100644 index 0000000000..360b88d570 --- /dev/null +++ b/resources/qr_code/QR8bitByte.php @@ -0,0 +1,81 @@ + + * @package phpQr + */ +class QR8bitByte implements QRByte +{ + /** + * The data + * @var array + */ + private $data; + + /** + * The mode + * @var unknown + */ + private $mode; + + /** + * Retrieve the mode + * + * @return int The mode + * @see QRByte::getMode() + */ + public function getMode() + { + return $this->mode; + } + + /** + * Retrieve the length + * + * @return int The length + * @see QRByte::getLength() + */ + public function getLength() + { + return strlen($this->data); + } + + /** + * Write data to byte + * + * @param QRBitBuffer $buffer The data to write into byte + * + * @see QRByte::write() + */ + public function write(QRBitBuffer $buffer) + { + for($i = 0; $i < strlen($this->data); $i++) + { + $buffer->put(ord($this->data[$i]), 8); + } + } + + /** + * Create a new instance of a QR8bitByte + * + * @param array $data The data for the Byte + */ + public function __construct($data) + { + $this->data = $data; + $this->mode = QRMode::MODE_8BIT_BYTE; + } +} \ No newline at end of file diff --git a/resources/qr_code/QRBitBuffer.php b/resources/qr_code/QRBitBuffer.php new file mode 100644 index 0000000000..e6b091f4a3 --- /dev/null +++ b/resources/qr_code/QRBitBuffer.php @@ -0,0 +1,107 @@ + + * @package phpQr + */ +class QRBitBuffer +{ + /** + * Array based buffer access + * + * @var array + */ + private $buffer; + + /** + * Length of array + * + * @var int + */ + private $length; + + /** + * Create a new instance of QRBitBuffer + */ + public function __construct() + { + $this->buffer = array(); + $this->length = 0; + } + + /** + * Get particular bit given by index + * + * @param int $index The index of bit + * @return boolean + */ + public function get($index) + { + $bufIndex = floor($index / 8); + return ( ($this->buffer[$bufIndex] >> (7 - $index % 8) ) & 1) == 1; + } + + /** + * Get the byte at particular index + * + * @param int $index The index of the byte + * @return string + */ + public function getAt($index) + { + return $this->buffer[$index]; + } + + /** + * Put amount of bits + * @param int $num The data to put + * @param int $length The length of data + */ + public function put($num, $length) + { + for($i = 0; $i < $length; $i++) + { + $this->putBit((($num >> ($length - $i - 1)) & 1) == 1); + } + } + + /** + * Get current length in bits + * + * @return int The amount of bits + */ + public function getLengthInBits() + { + return $this->length; + } + + /** + * Put particular bit + * + * @param int $bit The bit to put + */ + public function putBit($bit) + { + $bufIndex = floor($this->length / 8); + if(sizeof($this->buffer) <= $bufIndex) + { + array_push($this->buffer, 0); + } + + if($bit) + { + $this->buffer[$bufIndex] |= (0x80 >> ($this->length % 8)); + } + + $this->length++; + } +} \ No newline at end of file diff --git a/resources/qr_code/QRByte.php b/resources/qr_code/QRByte.php new file mode 100644 index 0000000000..dd63f575ee --- /dev/null +++ b/resources/qr_code/QRByte.php @@ -0,0 +1,41 @@ + + * @package phpQr + */ +interface QRByte +{ + /** + * Retrieve the mode + * + * @return int The mode + */ + public function getMode(); + + /** + * Retrieve the length + * + * @return int The length + */ + public function getLength(); + + /** + * Write data to byte + * + * @param QRBitBuffer $buffer The data to write into byte + */ + public function write(QRBitBuffer $buffer); +} \ No newline at end of file diff --git a/resources/qr_code/QRCode.php b/resources/qr_code/QRCode.php new file mode 100644 index 0000000000..9f80398fc1 --- /dev/null +++ b/resources/qr_code/QRCode.php @@ -0,0 +1,656 @@ + + */ + +/** + * Import necessary dependencies + */ +require_once 'QR8bitByte.php'; +require_once 'QRBitBuffer.php'; +require_once 'QRRSBlock.php'; +require_once 'QRUtil.php'; +require_once 'QRCodeException.php'; + +/** + * This is the main class + * + * It provides the functionality to generate a QRCode bitmap + * out of appended data elements. + * + * @package phpQr + * @author Maik Greubel + */ +class QRCode +{ + /** + * Needed for padding + * + * @final + * + */ + const PAD0 = 0xec; + + /** + * Needed for padding + * + * @final + * + */ + const PAD1 = 0x11; + + /** + * The type number of qrcode + * + * @var int + */ + private $typeNumber; + + /** + * Level of error correction + * + * @see QRErrorCorrectLevel + * + * @var int + */ + private $errorCorrectLevel; + + /** + * Bitmap + * + * @var array + */ + private $modules; + + /** + * Amount of modules in bitmap + * + * @var int + */ + private $moduleCount; + + /** + * The data as array + * + * @var array + */ + private $dataCache; + + /** + * All append data elements + * + * @var array + */ + private $dataList; + + /** + * Create a new instance of QRCode + * + * @param int $typeNumber + * The type of QRCode + * @param int $errorCorrectLevel + * The error correction level + */ + public function __construct($typeNumber, $errorCorrectLevel) + { + $this->typeNumber = $typeNumber; + $this->errorCorrectLevel = $errorCorrectLevel; + $this->modules = null; + $this->moduleCount = 0; + $this->dataCache = null; + $this->dataList = array (); + } + + /** + * This function is only needed for debugging purposes and returns the bitmap + * DONT USE THIS TO MANIPULATE THE BITMAP! + * + * @return array + */ + public function getModules() + { + return $this->modules; + } + + /** + * Add a new data element to the QRCode + * + * @param string $data + */ + public function addData($data) + { + $newData = new QR8bitByte ( $data ); + array_push ( $this->dataList, $newData ); + $this->dataCache = null; + } + + /** + * Returns whether a given bitmap entry is dark or not + * + * @param int $row + * The row in bitmap + * @param int $col + * The column in bitmap + * + * @throws QRCodeException + * @return true in case of its a dark bit, false otherwise + */ + public function isDark($row, $col) + { + if ($row < 0 || $this->moduleCount <= $row || $col < 0 || $this->moduleCount <= $col) + { + throw new QRCodeException ( "$row,$col" ); + } + + return $this->modules [$row] [$col]; + } + + /** + * Get the amount of modules in bitmap + * + * @return int + */ + public function getModuleCount() + { + return $this->moduleCount; + } + + /** + * Generate the QRCode bitmap + */ + public function make() + { + if ($this->typeNumber < 1) + { + $typeNumber = 1; + for($typeNumber = 1; $typeNumber < 40; $typeNumber ++) + { + $rsBlocks = QRRSBlock::getInstance ()->getRSBlocks ( $typeNumber, $this->errorCorrectLevel ); + + $buffer = new QRBitBuffer (); + $totalDataCount = 0; + for($i = 0; $i < sizeof ( $rsBlocks ); $i ++) + { + $totalDataCount += $rsBlocks [$i]->getDataCount (); + } + + for($i = 0; $i < sizeof ( $this->dataList ); $i ++) + { + $data = $this->dataList [$i]; + + assert ( $data instanceof QRByte ); + + $buffer->put ( $data->getMode (), 4 ); + $buffer->put ( $data->getLength (), QRUtil::getInstance ()->getLengthInBits ( $data->getMode (), $typeNumber ) ); + $data->write ( $buffer ); + } + if ($buffer->getLengthInBits () <= $totalDataCount * 8) + break; + } + $this->typeNumber = $typeNumber; + } + $this->makeImpl ( false, $this->getBestMaskPattern () ); + } + + /** + * Generates the bitmap (really) + * + * @param boolean $test + * @param int $maskPattern + */ + private function makeImpl($test, $maskPattern) + { + $this->moduleCount = $this->typeNumber * 4 + 17; + $this->modules = QRUtil::getInstance ()->createEmptyArray ( $this->moduleCount ); + + for($row = 0; $row < $this->moduleCount; $row ++) + { + $this->modules [$row] = QRUtil::getInstance ()->createEmptyArray ( $this->moduleCount ); + + for($col = 0; $col < $this->moduleCount; $col ++) + { + $this->modules [$row] [$col] = null; + } + } + + $this->setupPositionProbePattern ( 0, 0 ); + $this->setupPositionProbePattern ( $this->moduleCount - 7, 0 ); + $this->setupPositionProbePattern ( 0, $this->moduleCount - 7 ); + $this->setupPositionAdjustPattern (); + $this->setupTimingPattern (); + $this->setupTypeInfo ( $test, $maskPattern ); + + if ($this->typeNumber >= 7) + { + $this->setTypeNumber ( $test ); + } + + if ($this->dataCache == null) + { + $this->dataCache = self::createData ( $this->typeNumber, $this->errorCorrectLevel, $this->dataList ); + } + + $this->mapData ( $this->dataCache, $maskPattern ); + } + + /** + * Add the position probes to the bitmap + * + * @param int $row + * @param int $col + */ + private function setupPositionProbePattern($row, $col) + { + for($r = - 1; $r <= 7; $r ++) + { + if ($row + $r <= - 1 || $this->moduleCount <= $row + $r) + continue; + + for($c = - 1; $c <= 7; $c ++) + { + if ($col + $c <= - 1 || $this->moduleCount <= $col + $c) + continue; + + if ((0 <= $r && $r <= 6 && ($c == 0 || $c == 6)) || (0 <= $c && $c <= 6 && ($r == 0 || $r == 6)) || (2 <= $r && $r <= 4 && 2 <= $c && $c <= 4)) + { + $this->modules [$row + $r] [$col + $c] = true; + } + else + { + $this->modules [$row + $r] [$col + $c] = false; + } + } + } + } + + /** + * Get the best mask pattern for this QRCode + * + * @return int + */ + private function getBestMaskPattern() + { + $minLostPoint = 0; + $pattern = 0; + + for($i = 0; $i < 8; $i ++) + { + $this->makeImpl ( true, $i ); + + $lostPoint = QRUtil::getInstance ()->getLostPoint ( $this ); + + if ($i == 0 || $minLostPoint > $lostPoint) + { + $minLostPoint = $lostPoint; + $pattern = $i; + } + } + + return $pattern; + } + + /** + * Add the timing pattern to bitmap + */ + private function setupTimingPattern() + { + for($r = 8; $r < $this->moduleCount - 8; $r ++) + { + if ($this->modules [$r] [6] != null) + { + continue; + } + $this->modules [$r] [6] = ($r % 2 == 0); + } + + for($c = 8; $c < $this->moduleCount - 8; $c ++) + { + if ($this->modules [6] [$c] != null) + { + continue; + } + $this->modules [6] [$c] = ($c % 2 == 0); + } + } + + /** + * Add the position adjust pattern to bitmap + */ + private function setupPositionAdjustPattern() + { + $pos = QRUtil::getInstance ()->getPatternPosition ( $this->typeNumber ); + + for($i = 0; $i < sizeof ( $pos ); $i ++) + { + for($j = 0; $j < sizeof ( $pos ); $j ++) + { + $row = $pos [$i]; + $col = $pos [$j]; + + if ($this->modules [$row] [$col] != null) + { + continue; + } + + for($r = - 2; $r <= 2; $r ++) + { + for($c = - 2; $c <= 2; $c ++) + { + if ($r == - 2 || $r == 2 || $c == - 2 || $c == 2 || ($r == 0 && $c == 0)) + { + $this->modules [$row + $r] [$col + $c] = true; + } + else + { + $this->modules [$row + $r] [$col + $c] = false; + } + } + } + } + } + } + + /** + * Add the type number to bitmap + * + * @param boolean $test + */ + private function setTypeNumber($test) + { + $bits = QRUtil::getInstance ()->getBCHTypeNumber ( $this->typeNumber ); + + for($i = 0; $i < 18; $i ++) + { + $mod = (! $test && (($bits >> $i) & 1) == 1); + $this->modules [floor ( $i / 3 )] [$i % 3 + $this->moduleCount - 8 - 3] = $mod; + } + + for($i = 0; $i < 18; $i ++) + { + $mod = (! $test && (($bits >> $i) & 1) == 1); + $this->modules [$i % 3 + $this->moduleCount - 8 - 3] [floor ( $i / 3 )] = $mod; + } + } + + /** + * Add the type info to bitmap + * + * @param boolean $test + * @param int $maskPattern + */ + private function setupTypeInfo($test, $maskPattern) + { + $data = ($this->errorCorrectLevel << 3) | $maskPattern; + $bits = QRUtil::getInstance ()->getBCHTypeInfo ( $data ); + + // vertical + for($i = 0; $i < 15; $i ++) + { + $mod = (! $test && (($bits >> $i) & 1) == 1); + if ($i < 6) + { + $this->modules [$i] [8] = $mod; + } + else if ($i < 8) + { + $this->modules [$i + 1] [8] = $mod; + } + else + { + $this->modules [$this->moduleCount - 15 + $i] [8] = $mod; + } + } + + // horizontal + for($i = 0; $i < 15; $i ++) + { + $mod = (! $test && (($bits >> $i) & 1) == 1); + + if ($i < 8) + { + $this->modules [8] [$this->moduleCount - $i - 1] = $mod; + } + else if ($i < 9) + { + $this->modules [8] [15 - $i - 1 + 1] = $mod; + } + else + { + $this->modules [8] [15 - $i - 1] = $mod; + } + } + + // fixed module + $this->modules [$this->moduleCount - 8] [8] = (! $test); + } + + /** + * Add the data to bitmap + * + * @param array $data + * @param int $maskPattern + */ + private function mapData($data, $maskPattern) + { + $inc = - 1; + $row = $this->moduleCount - 1; + $bitIndex = 7; + $byteIndex = 0; + + for($col = $this->moduleCount - 1; $col > 0; $col -= 2) + { + if ($col == 6) + $col --; + + while ( true ) + { + for($c = 0; $c < 2; $c ++) + { + if ($this->modules [$row] [$col - $c] === null) + { + $dark = false; + + if ($byteIndex < sizeof ( $data )) + { + $dark = ((($data [$byteIndex] >> $bitIndex) & 1) == 1); + } + + $mask = QRUtil::getInstance ()->getMask ( $maskPattern, $row, $col - $c ); + + if ($mask) + $dark = ! $dark; + + $this->modules [$row] [$col - $c] = $dark; + $bitIndex --; + + if ($bitIndex == - 1) + { + $byteIndex ++; + $bitIndex = 7; + } + } + } + + $row += $inc; + + if ($row < 0 || $this->moduleCount <= $row) + { + $row -= $inc; + $inc = - $inc; + break; + } + } + } + } + + /** + * Create a bitmap out of all append data elements + * + * @param int $typeNumber + * @param int $errorCorrectLevel + * @param array $dataList + * + * @throws QRCodeException + * + * @return array + */ + private function createData($typeNumber, $errorCorrectLevel, $dataList) + { + $rsBlocks = QRRSBlock::getInstance ()->getRSBlocks ( $typeNumber, $errorCorrectLevel ); + + $buffer = new QRBitBuffer (); + + for($i = 0; $i < sizeof ( $dataList ); $i ++) + { + $data = $dataList [$i]; + assert ( $data instanceof QRByte ); + + $buffer->put ( $data->getMode (), 4 ); + $buffer->put ( $data->getLength (), QRUtil::getInstance ()->getLengthInBits ( $data->getMode (), $typeNumber ) ); + $data->write ( $buffer ); + } + + // calc num max data + $totalDataCount = 0; + for($i = 0; $i < sizeof ( $rsBlocks ); $i ++) + { + $totalDataCount += $rsBlocks [$i]->getDataCount (); + } + + if ($buffer->getLengthInBits () > $totalDataCount * 8) + { + throw new QRCodeException ( "code length overflow (" . $buffer->getLengthInBits () . " > " . ($totalDataCount * 8) . ")" ); + } + + // end code + if ($buffer->getLengthInBits () + 4 <= $totalDataCount * 8) + { + $buffer->put ( 0, 4 ); + } + + // padding + while ( $buffer->getLengthInBits () % 8 != 0 ) + { + $buffer->putBit ( false ); + } + + // padding + while ( true ) + { + if ($buffer->getLengthInBits () >= $totalDataCount * 8) + { + break; + } + + $buffer->put ( QRCode::PAD0, 8 ); + + if ($buffer->getLengthInBits () >= $totalDataCount * 8) + { + break; + } + $buffer->put ( QRCode::PAD1, 8 ); + } + + return $this->createBytes ( $buffer, $rsBlocks ); + } + + /** + * Create bitmap out of the bit buffer using reed solomon blocks + * + * @param QRBitBuffer $buffer + * @param array $rsBlocks + * @return array + */ + public function createBytes(QRBitBuffer $buffer, $rsBlocks) + { + $offset = 0; + $maxDcCount = 0; + $maxEcCount = 0; + + $dcdata = QRUtil::getInstance ()->createEmptyArray ( sizeof ( $rsBlocks ) ); + $ecdata = QRUtil::getInstance ()->createEmptyArray ( sizeof ( $rsBlocks ) ); + + for($r = 0; $r < sizeof ( $rsBlocks ); $r ++) + { + $dcCount = $rsBlocks [$r]->getDataCount (); + $ecCount = $rsBlocks [$r]->getTotalCount () - $dcCount; + + $maxDcCount = max ( array ( + $maxDcCount, + $dcCount + ) ); + $maxEcCount = max ( array ( + $maxEcCount, + $ecCount + ) ); + + $dcdata [$r] = QRUtil::getInstance ()->createEmptyArray ( $dcCount ); + + for($i = 0; $i < sizeof ( $dcdata [$r] ); $i ++) + { + $dcdata [$r] [$i] = 0xff & $buffer->getAt ( $i + $offset ); + } + $offset += $dcCount; + + $rsPoly = QRUtil::getInstance ()->getErrorCorrectPolynominal ( $ecCount ); + $rawPoly = new QRPolynominal ( $dcdata [$r], $rsPoly->getLength () - 1 ); + + $modPoly = $rawPoly->mod ( $rsPoly ); + $ecdata [$r] = QRUtil::getInstance ()->createEmptyArray ( $rsPoly->getLength () - 1 ); + for($i = 0; $i < sizeof ( $ecdata [$r] ); $i ++) + { + $modIndex = $i + $modPoly->getLength () - sizeof ( $ecdata [$r] ); + $ecdata [$r] [$i] = ($modIndex >= 0) ? $modPoly->get ( $modIndex ) : 0; + } + } + + $totalCodeCount = 0; + for($i = 0; $i < sizeof ( $rsBlocks ); $i ++) + { + $totalCodeCount += $rsBlocks [$i]->getTotalCount (); + } + + $data = QRUtil::getInstance ()->createEmptyArray ( $totalCodeCount ); + $index = 0; + + for($i = 0; $i < $maxDcCount; $i ++) + { + for($r = 0; $r < sizeof ( $rsBlocks ); $r ++) + { + if ($i < sizeof ( $dcdata [$r] )) + { + $data [$index ++] = $dcdata [$r] [$i]; + } + } + } + + for($i = 0; $i < $maxEcCount; $i ++) + { + for($r = 0; $r < sizeof ( $rsBlocks ); $r ++) + { + if ($i < sizeof ( $ecdata [$r] )) + { + $data [$index ++] = $ecdata [$r] [$i]; + } + } + } + + return $data; + } +} \ No newline at end of file diff --git a/resources/qr_code/QRCodeException.php b/resources/qr_code/QRCodeException.php new file mode 100644 index 0000000000..074084df28 --- /dev/null +++ b/resources/qr_code/QRCodeException.php @@ -0,0 +1,14 @@ + + * @package phpQr + */ +class QRCodeException extends ErrorException {}; diff --git a/resources/qr_code/QRCodeImage.php b/resources/qr_code/QRCodeImage.php new file mode 100644 index 0000000000..a0fc10a5c4 --- /dev/null +++ b/resources/qr_code/QRCodeImage.php @@ -0,0 +1,187 @@ + + * @package phpQr + */ +class QRCodeImageException extends QRCodeException{}; + +/** + * This class provides all needed functionality to create an image out of an QRCode bitmap + * + * @author Maik Greubel + * @package phpQr + */ +class QRCodeImage +{ + /** + * The previously created QRCode + * + * @var QRCode + */ + private $qrcode; + + /** + * The desired width of the destination image + * + * @var int + */ + private $width; + + /** + * The desired height of the destination image + * + * @var int + */ + private $height; + + /** + * Quality of the destination image + * + * @var int + */ + private $quality; + + /** + * The image buffer provided by GD function imagecreate() + * + * @var resource + */ + private $img; + + /** + * Create a new QRCodeImage instance + * + * @param QRCode $qrcode The previously created QRCode + * @param int $width The desired width of the destination image + * @param int $height The desired height of the destination image + * @param int $quality The desired quality of the destination image + */ + public function __construct(QRCode $qrcode, $width, $height, $quality = 90) + { + $this->qrcode = $qrcode; + $this->width = $width; + $this->height = $height; + $this->quality = $quality; + $this->img = null; + } + + /** + * Draw the image + */ + public function draw() + { + $moduleCount = $this->qrcode->getModuleCount(); + $tileWidth = $this->width / $moduleCount; + $tileHeight = $this->height / $moduleCount; + + $this->img = imagecreatetruecolor($this->width, $this->height); + + if($this->img) + { + $fg = imagecolorallocate($this->img, 0, 0, 0); + if($fg === false) + { + $this->finish(); + throw new QRCodeImageException('Could not allocate foreground color!'); + } + $bg = imagecolorallocate($this->img, 255, 255, 255); + if($bg === false) + { + $this->finish(); + throw new QRCodeImageException('Could not allocate background color!'); + } + + for($row = 0; $row < $moduleCount; $row++) + { + for($col = 0; $col < $moduleCount; $col++) + { + $fillStyle = $this->qrcode->isDark($row, $col) ? $fg : $bg; + + $x = round($col * $tileWidth); + $y = round($row * $tileHeight); + $w = (ceil(($col + 1) * $tileWidth) - floor($col * $tileWidth)); + if($x + $w > $this->width) + { + $w = $this->width - $x; + } + $h = (ceil(($row + 1) * $tileWidth) - floor($row * $tileWidth)); + if($y + $h > $this->height) + { + $h = $this->height - $y; + } + + if(!imagefilledrectangle($this->img, $x, $y, $x + $w, $y + $h, $fillStyle)) + { + $this->finish(); + throw new QRCodeImageException(sprintf('Could not fill the rectangle using desired coordinates (x = %d, y = %d, w = %d, h = %d, c = %d)', + $x, $y, $w, $h, $fillStyle)); + } + } + } + } + else + { + throw new QRCodeImageException('Could not create true color image buffer!'); + } + } + + /** + * Store the image + * + * @param string $filename + */ + public function store($filename) + { + if($this->img) + { + if(!imagejpeg($this->img, $filename, $this->quality)) + { + throw new QRCodeImageException(sprintf('Could not save image to file %s', $filename)); + } + } + } + + /** + * Return the image as string + */ + public function getImage() + { + if($this->img) + { + ob_start(); + if(!imagejpeg($this->img, null, $this->quality)) + { + ob_end_flush(); + throw new QRCodeImageException('Could not create a jpeg out of the image buffer!'); + } + $out = ob_get_clean(); + return $out; + } + throw new QRCodeImageException('No image data available!'); + } + + /** + * Clean the image buffer + */ + public function finish() + { + if($this->img) + { + imagedestroy($this->img); + $this->img = null; + } + } +} \ No newline at end of file diff --git a/resources/qr_code/QRErrorCorrectLevel.php b/resources/qr_code/QRErrorCorrectLevel.php new file mode 100644 index 0000000000..9e7bebef16 --- /dev/null +++ b/resources/qr_code/QRErrorCorrectLevel.php @@ -0,0 +1,20 @@ + + * @package phpQr + */ +abstract class QRErrorCorrectLevel +{ + const L = 1; + const M = 0; + const Q = 3; + const H = 2; +} diff --git a/resources/qr_code/QRMath.php b/resources/qr_code/QRMath.php new file mode 100644 index 0000000000..c1e1edf441 --- /dev/null +++ b/resources/qr_code/QRMath.php @@ -0,0 +1,145 @@ + + * @package phpQr + */ +class QRMathException extends QRCodeException +{ +} + +/** + * QR Code math helper class + * + * @author Maik Greubel + * @package phpQr + */ +final class QRMath +{ + /** + * Exponent table + * + * @var array + */ + private $EXP_TABLE = null; + + /** + * Logarithm table + * + * @var array + */ + private $LOG_TABLE = null; + + /** + * Singleton pattern + * + * @var QRMath + */ + private static $instance = null; + + /** + * Singleton pattern + * + * @return QRMath Singleton + */ + public static function getInstance() + { + if (! self::$instance) + { + self::$instance = new self (); + } + + return self::$instance; + } + + /** + * Create a new instance of QRMath + */ + private function __construct() + { + $this->init (); + } + + /** + * Initialize the tables + */ + private function init() + { + $this->EXP_TABLE = array (); + for($i = 0; $i < 8; $i ++) + { + $this->EXP_TABLE [$i] = 1 << $i; + } + + for($i = 8; $i < 256; $i ++) + { + $this->EXP_TABLE [$i] = $this->EXP_TABLE [$i - 4] ^ $this->EXP_TABLE [$i - 5] ^ $this->EXP_TABLE [$i - 6] ^ $this->EXP_TABLE [$i - 8]; + } + + $this->LOG_TABLE = array (); + for($i = 0; $i < 255; $i ++) + { + $this->LOG_TABLE [$this->EXP_TABLE [$i]] = $i; + } + } + + /** + * Get logarithm of n + * + * @param int $n + * @throws QRMathException + * @return int + */ + public function glog($n) + { + if ($n < 1) + { + throw new QRMathException ( "glog(" . $n . ")" ); + } + + foreach ( $this->LOG_TABLE as $key => $value ) + { + if ($key == $n) + return $value; + } + + throw new QRMathException ( "glog($n)" ); + } + + /** + * Get the exponent of n + * + * @param int $n + * @return int + */ + public function gexp($n) + { + while ( $n < 0 ) + { + $n += 255; + } + while ( $n >= 256 ) + { + $n -= 255; + } + foreach ( $this->EXP_TABLE as $key => $value ) + { + if ($key == $n) + return $value; + } + + throw new QRMathException ( "gexp($n)" ); + } +} \ No newline at end of file diff --git a/resources/qr_code/QRMode.php b/resources/qr_code/QRMode.php new file mode 100644 index 0000000000..46cd4a2c2c --- /dev/null +++ b/resources/qr_code/QRMode.php @@ -0,0 +1,20 @@ + + * @package phpQr + */ +abstract class QRMode +{ + const MODE_NUMBER = 1; + const MODE_ALPHA_NUM = 2; + const MODE_8BIT_BYTE = 4; + const MODE_KANJI = 8; +} diff --git a/resources/qr_code/QRPolynominal.php b/resources/qr_code/QRPolynominal.php new file mode 100644 index 0000000000..5186b6e959 --- /dev/null +++ b/resources/qr_code/QRPolynominal.php @@ -0,0 +1,145 @@ + + * @package phpQr + */ +class QRPolynominalException extends QRCodeException{}; + +/** + * The purpose of this class is to provide a polynominal implementation for the QRCode package + * + * @author Maik Greubel + * @package phpQr + */ +class QRPolynominal +{ + /** + * Bitmap + * + * @var array + */ + private $num; + + /** + * Create a new QRPolynominal instance + * + * @param array $num + * @param int $shift + * + * @throws QRPolynominalException + */ + public function __construct($num, $shift) + { + if(sizeof($num) == 0) + { + throw new QRPolynominalException("Invalid num size"); + } + + $offset = 0; + while($offset < sizeof($num) && $num[$offset] == 0) + { + $offset++; + } + + $this->num = QRUtil::getInstance()->createEmptyArray(sizeof($num) - $offset + $shift); + for($i = 0; $i < sizeof($num) - $offset; $i++) + { + $this->num[$i] = $num[$i + $offset]; + } + } + + /** + * Get a particular bitmap index + * + * @param int $index + * @return multitype: + */ + public function get($index) + { + return $this->num[$index]; + } + + /** + * Get the length of bitmap + */ + public function getLength() + { + return sizeof($this->num); + } + + /** + * Multiply another polynom against this + * + * @param QRPolynominal $e The other + * @return QRPolynominal The multiplied result + */ + public function multiply(QRPolynominal $e) + { + $num = QRUtil::getInstance()->createEmptyArray($this->getLength() + $e->getLength() - 1); + + for($i = 0; $i < $this->getLength(); $i++) + { + for($j = 0; $j < $e->getLength(); $j++) + { + $a = QRMath::getInstance()->glog($this->get($i)); + $b = QRMath::getInstance()->glog($e->get($j)); + + $base = 0; + if(isset($num[$i + $j])) + $base = $num[$i + $j]; + $num[$i + $j] = $base ^ QRMath::getInstance()->gexp( $a + $b ); + } + } + + return new QRPolynominal($num, 0); + } + + /** + * Perform modulus against another polynom + * + * @param QRPolynominal $e + * + * @return QRPolynominal + */ + public function mod(QRPolynominal $e) + { + if($this->getLength() - $e->getLength() < 0) + { + return $this; + } + + $ratio = QRMath::getInstance()->glog($this->get(0)) - QRMath::getInstance()->glog($e->get(0)); + + $num = QRUtil::getInstance()->createEmptyArray($this->getLength()); + + for($i = 0; $i < $this->getLength(); $i++) + { + $num[$i] = $this->get($i); + } + + for($i = 0; $i < $e->getLength(); $i++) + { + $num[$i] ^= QRMath::getInstance()->gexp(QRMath::getInstance()->glog($e->get($i)) + $ratio); + } + + $result = new QRPolynominal($num, 0); + $result = $result->mod($e); + + return $result; + } +} \ No newline at end of file diff --git a/resources/qr_code/QRRSBlock.php b/resources/qr_code/QRRSBlock.php new file mode 100644 index 0000000000..9ecf7d0c84 --- /dev/null +++ b/resources/qr_code/QRRSBlock.php @@ -0,0 +1,503 @@ + + * @package phpQr + */ +class QRRSBlockException extends QRCodeException +{ +} + +/** + * This class is a Reed-Solomon implementation for the QRCode. + * The purpose is to provide error correction and block information. + * + * Inspired by qrcode.js from https://github.com/jeromeetienne/jquery-qrcode + * + * @author Maik Greubel + * @package phpQr + * @link http://www.thonky.com/qr-code-tutorial/error-correction-table/ + */ +class QRRSBlock +{ + /** + * The total count of blocks + * + * @var int The total count of blocks + */ + private $totalCount; + + /** + * The data count of blocks + * + * @var int The data count of blocks + */ + private $dataCount; + + /** + * The block table + * @var array The block table + */ + private $RS_BLOCK_TABLE; + + /** + * Singleton pattern + * + * @var QRRSBlock Singleton + */ + private static $instance; + + /** + * The serialized block data for faster initialization + * + * @var string + */ + private $blockFileName = 'rsblock.dat'; + + /** + * Singleton pattern + * + * @return QRRSBlock + */ + public static function getInstance() + { + if(!self::$instance) + { + self::$instance = new self(0, 0); + } + + return self::$instance; + } + + /** + * Retrieve the data count + * + * @return int The data count + */ + public function getDataCount() + { + return $this->dataCount; + } + + /** + * Retrieve the total count + * + * @return int The total count + */ + public function getTotalCount() + { + return $this->totalCount; + } + + /** + * Create a new QR Reed-Solomon block instance + * + * @param int $totalCount The total count of blocks + * @param int $dataCount The data count of blocks + */ + private function __construct($totalCount, $dataCount) + { + $this->initRsBlock(); + + $this->totalCount = $totalCount; + $this->dataCount = $dataCount; + } + + /** + * Get rs blocks of particular type and error correction level + * + * @param int $typeNumber + * @param int $errorCorrectLevel + * @throws QRRSBlockException + * @return QRRSBlock + */ + public function getRSBlocks($typeNumber, $errorCorrectLevel) + { + $rsBlock = $this->getRsBlockTable($typeNumber, $errorCorrectLevel); + + if(!$rsBlock) + { + throw new QRRSBlockException("Bad RS Block at type number " . $typeNumber . " / error correct level " . $errorCorrectLevel); + } + + $length = sizeof($rsBlock) / 3; + + $list = array(); + + for($i = 0; $i < $length; $i++) + { + $count = $rsBlock[$i * 3 + 0]; + $totalCount = $rsBlock[$i * 3 + 1]; + $dataCount = $rsBlock[$i * 3 + 2]; + + for($j = 0; $j < $count; $j++) + { + array_push($list, new QRRSBlock($totalCount, $dataCount)); + } + } + + return $list; + } + + /** + * Get the reed-solomon block table + * + * @param int $typeNumber + * @param int $errorCorrectLevel + * @return int|NULL + */ + public function getRsBlockTable($typeNumber, $errorCorrectLevel) + { + switch ($errorCorrectLevel) + { + case QRErrorCorrectLevel::L: + return $this->RS_BLOCK_TABLE[($typeNumber - 1) * 4 + 0]; + case QRErrorCorrectLevel::M: + return $this->RS_BLOCK_TABLE[($typeNumber - 1) * 4 + 1]; + case QRErrorCorrectLevel::Q: + return $this->RS_BLOCK_TABLE[($typeNumber - 1) * 4 + 2]; + case QRErrorCorrectLevel::H: + return $this->RS_BLOCK_TABLE[($typeNumber - 1) * 4 + 3]; + default: + return null; + } + } + + /** + * This method initialize the RS block + */ + private function initRsBlock() + { + if($this->loadBlockFile()) + { + return; + } + + $this->RS_BLOCK_TABLE = array(); + + // L + // M + // Q + // H + + // 1 + $this->addRsBlock(array(1, 26, 19)); + $this->addRsBlock(array(1, 26, 16)); + $this->addRsBlock(array(1, 26, 13)); + $this->addRsBlock(array(1, 26, 9)); + + // 2 + $this->addRsBlock(array(1, 44, 34)); + $this->addRsBlock(array(1, 44, 28)); + $this->addRsBlock(array(1, 44, 22)); + $this->addRsBlock(array(1, 44, 16)); + + // 3 + $this->addRsBlock(array(1, 70, 55)); + $this->addRsBlock(array(1, 70, 44)); + $this->addRsBlock(array(2, 35, 17)); + $this->addRsBlock(array(2, 35, 13)); + + // 4 + $this->addRsBlock(array(1, 100, 80)); + $this->addRsBlock(array(2, 50, 32)); + $this->addRsBlock(array(2, 50, 24)); + $this->addRsBlock(array(4, 25, 9)); + + // 5 + $this->addRsBlock(array(1, 134, 108)); + $this->addRsBlock(array(2, 67, 43)); + $this->addRsBlock(array(2, 33, 15, 2, 34, 16)); + $this->addRsBlock(array(2, 33, 11, 2, 34, 12)); + + // 6 + $this->addRsBlock(array(2, 86, 68)); + $this->addRsBlock(array(4, 43, 27)); + $this->addRsBlock(array(4, 43, 19)); + $this->addRsBlock(array(4, 43, 15)); + + // 7 + $this->addRsBlock(array(2, 98, 78)); + $this->addRsBlock(array(4, 49, 31)); + $this->addRsBlock(array(2, 32, 14, 4, 33, 15)); + $this->addRsBlock(array(4, 39, 13, 1, 40, 14)); + + // 8 + $this->addRsBlock(array(2, 121, 97)); + $this->addRsBlock(array(2, 60, 38, 2, 61, 39)); + $this->addRsBlock(array(4, 40, 18, 2, 41, 19)); + $this->addRsBlock(array(4, 40, 14, 2, 41, 15)); + + // 9 + $this->addRsBlock(array(2, 146, 116)); + $this->addRsBlock(array(3, 58, 36, 2, 59, 37)); + $this->addRsBlock(array(4, 36, 16, 4, 37, 17)); + $this->addRsBlock(array(4, 36, 12, 4, 37, 13)); + + // 10 + $this->addRsBlock(array(2, 86, 68, 2, 87, 69)); + $this->addRsBlock(array(4, 69, 43, 1, 70, 44)); + $this->addRsBlock(array(6, 43, 19, 2, 44, 20)); + $this->addRsBlock(array(6, 43, 15, 2, 44, 16)); + + // 11 + $this->addRsBlock(array(4, 101, 81)); + $this->addRsBlock(array(1, 80, 50, 4, 81, 51)); + $this->addRsBlock(array(4, 50, 22, 4, 51, 23)); + $this->addRsBlock(array(3, 36, 12, 8, 37, 13)); + + // 12 + $this->addRsBlock(array(2, 116, 92, 2, 117, 93)); + $this->addRsBlock(array(6, 58, 36, 2, 59, 37)); + $this->addRsBlock(array(4, 46, 20, 6, 47, 21)); + $this->addRsBlock(array(7, 42, 14, 4, 43, 15)); + + // 13 + $this->addRsBlock(array(4, 133, 107)); + $this->addRsBlock(array(8, 59, 37, 1, 60, 38)); + $this->addRsBlock(array(8, 44, 20, 4, 45, 21)); + $this->addRsBlock(array(12, 33, 11, 4, 34, 12)); + + // 14 + $this->addRsBlock(array(3, 145, 115, 1, 146, 116)); + $this->addRsBlock(array(4, 64, 40, 5, 65, 41)); + $this->addRsBlock(array(11, 36, 16, 5, 37, 17)); + $this->addRsBlock(array(11, 36, 12, 5, 37, 13)); + + // 15 + $this->addRsBlock(array(5, 109, 87, 1, 110, 88)); + $this->addRsBlock(array(5, 65, 41, 5, 66, 42)); + $this->addRsBlock(array(5, 54, 24, 7, 55, 25)); + $this->addRsBlock(array(11, 36, 12)); + + // 16 + $this->addRsBlock(array(5, 122, 98, 1, 123, 99)); + $this->addRsBlock(array(7, 73, 45, 3, 74, 46)); + $this->addRsBlock(array(15, 43, 19, 2, 44, 20)); + $this->addRsBlock(array(3, 45, 15, 13, 46, 16)); + + // 17 + $this->addRsBlock(array(1, 135, 107, 5, 136, 108)); + $this->addRsBlock(array(10, 74, 46, 1, 75, 47)); + $this->addRsBlock(array(1, 50, 22, 15, 51, 23)); + $this->addRsBlock(array(2, 42, 14, 17, 43, 15)); + + // 18 + $this->addRsBlock(array(5, 150, 120, 1, 151, 121)); + $this->addRsBlock(array(9, 69, 43, 4, 70, 44)); + $this->addRsBlock(array(17, 50, 22, 1, 51, 23)); + $this->addRsBlock(array(2, 42, 14, 19, 43, 15)); + + // 19 + $this->addRsBlock(array(3, 141, 113, 4, 142, 114)); + $this->addRsBlock(array(3, 70, 44, 11, 71, 45)); + $this->addRsBlock(array(17, 47, 21, 4, 48, 22)); + $this->addRsBlock(array(9, 39, 13, 16, 40, 14)); + + // 20 + $this->addRsBlock(array(3, 135, 107, 5, 136, 108)); + $this->addRsBlock(array(3, 67, 41, 13, 68, 42)); + $this->addRsBlock(array(15, 54, 24, 5, 55, 25)); + $this->addRsBlock(array(15, 43, 15, 10, 44, 16)); + + // 21 + $this->addRsBlock(array(4, 144, 116, 4, 145, 117)); + $this->addRsBlock(array(17, 68, 42)); + $this->addRsBlock(array(17, 50, 22, 6, 51, 23)); + $this->addRsBlock(array(19, 46, 16, 6, 47, 17)); + + // 22 + $this->addRsBlock(array(2, 139, 111, 7, 140, 112)); + $this->addRsBlock(array(17, 74, 46)); + $this->addRsBlock(array(7, 54, 24, 16, 55, 25)); + $this->addRsBlock(array(34, 37, 13)); + + // 23 + $this->addRsBlock(array(4, 151, 121, 5, 152, 122)); + $this->addRsBlock(array(4, 75, 47, 14, 76, 48)); + $this->addRsBlock(array(11, 54, 24, 14, 55, 25)); + $this->addRsBlock(array(16, 45, 15, 14, 46, 16)); + + // 24 + $this->addRsBlock(array(6, 147, 117, 4, 148, 118)); + $this->addRsBlock(array(6, 73, 45, 14, 74, 46)); + $this->addRsBlock(array(11, 54, 24, 16, 55, 25)); + $this->addRsBlock(array(30, 46, 16, 2, 47, 17)); + + // 25 + $this->addRsBlock(array(8, 132, 106, 4, 133, 107)); + $this->addRsBlock(array(8, 75, 47, 13, 76, 48)); + $this->addRsBlock(array(7, 54, 24, 22, 55, 25)); + $this->addRsBlock(array(22, 45, 15, 13, 46, 16)); + + // 26 + $this->addRsBlock(array(10, 142, 114, 2, 143, 115)); + $this->addRsBlock(array(19, 74, 46, 4, 75, 47)); + $this->addRsBlock(array(28, 50, 22, 6, 51, 23)); + $this->addRsBlock(array(33, 46, 16, 4, 47, 17)); + + // 27 + $this->addRsBlock(array(8, 152, 122, 4, 153, 123)); + $this->addRsBlock(array(22, 73, 45, 3, 74, 46)); + $this->addRsBlock(array(8, 53, 23, 26, 54, 24)); + $this->addRsBlock(array(12, 45, 15, 28, 46, 16)); + + // 28 + $this->addRsBlock(array(3, 147, 117, 10, 148, 118)); + $this->addRsBlock(array(3, 73, 45, 23, 74, 46)); + $this->addRsBlock(array(4, 54, 24, 31, 55, 25)); + $this->addRsBlock(array(11, 45, 15, 31, 46, 16)); + + // 29 + $this->addRsBlock(array(7, 146, 116, 7, 147, 117)); + $this->addRsBlock(array(21, 73, 45, 7, 74, 46)); + $this->addRsBlock(array(1, 53, 23, 37, 54, 24)); + $this->addRsBlock(array(19, 45, 15, 26, 46, 16)); + + // 30 + $this->addRsBlock(array(5, 145, 115, 10, 146, 116)); + $this->addRsBlock(array(19, 75, 47, 10, 76, 48)); + $this->addRsBlock(array(15, 54, 24, 25, 55, 25)); + $this->addRsBlock(array(23, 45, 15, 25, 46, 16)); + + // 31 + $this->addRsBlock(array(13, 145, 115, 3, 146, 116)); + $this->addRsBlock(array(2, 74, 46, 29, 75, 47)); + $this->addRsBlock(array(42, 54, 24, 1, 55, 25)); + $this->addRsBlock(array(23, 45, 15, 28, 46, 16)); + + // 32 + $this->addRsBlock(array(17, 145, 115)); + $this->addRsBlock(array(10, 74, 46, 23, 75, 47)); + $this->addRsBlock(array(42, 54, 24, 1, 55, 25)); + $this->addRsBlock(array(23, 45, 15, 28, 46, 16)); + + // 33 + $this->addRsBlock(array(17, 145, 115, 1, 146, 116)); + $this->addRsBlock(array(14, 74, 46, 21, 75, 47)); + $this->addRsBlock(array(29, 54, 24, 19, 55, 25)); + $this->addRsBlock(array(11, 45, 15, 46, 46, 16)); + + // 34 + $this->addRsBlock(array(13, 145, 115, 6, 146, 116)); + $this->addRsBlock(array(14, 74, 46, 21, 75, 47)); + $this->addRsBlock(array(44, 54, 24, 7, 55, 25)); + $this->addRsBlock(array(59, 46, 16, 1, 47, 17)); + + // 35 + $this->addRsBlock(array(12, 151, 121, 7, 152, 122)); + $this->addRsBlock(array(12, 75, 47, 26, 76, 48)); + $this->addRsBlock(array(39, 54, 24, 14, 55, 25)); + $this->addRsBlock(array(22, 45, 15, 41, 46, 16)); + + // 36 + $this->addRsBlock(array(6, 151, 121, 14, 152, 122)); + $this->addRsBlock(array(6, 75, 47, 34, 76, 48)); + $this->addRsBlock(array(46, 54, 24, 10, 55, 25)); + $this->addRsBlock(array(2, 45, 15, 64, 46, 16)); + + // 37 + $this->addRsBlock(array(17, 152, 122, 4, 153, 123)); + $this->addRsBlock(array(29, 74, 46, 14, 75, 47)); + $this->addRsBlock(array(49, 54, 24, 10, 55, 25)); + $this->addRsBlock(array(24, 45, 15, 46, 46, 16)); + + // 38 + $this->addRsBlock(array(4, 152, 122, 18, 153, 123)); + $this->addRsBlock(array(13, 74, 46, 32, 75, 47)); + $this->addRsBlock(array(48, 54, 24, 14, 55, 25)); + $this->addRsBlock(array(42, 45, 15, 32, 46, 16)); + + // 39 + $this->addRsBlock(array(20, 147, 117, 4, 148, 118)); + $this->addRsBlock(array(40, 75, 47, 7, 76, 48)); + $this->addRsBlock(array(43, 54, 24, 22, 55, 25)); + $this->addRsBlock(array(10, 45, 15, 67, 46, 16)); + + // 40 + $this->addRsBlock(array(19, 148, 118, 6, 149, 119)); + $this->addRsBlock(array(18, 75, 47, 31, 76, 48)); + $this->addRsBlock(array(34, 54, 24, 34, 55, 25)); + $this->addRsBlock(array(20, 45, 15, 61, 46, 16)); + + $this->saveBlockFile(); + } + + /** + * Add a new block information to the block + * + * @param array $block + */ + private function addRsBlock($block) + { + array_push($this->RS_BLOCK_TABLE, $block); + } + + /** + * Return the absolute path to the block file + * @return string + */ + private function getBlockFileAbsolute() + { + return sprintf("%s%s%s", dirname(__FILE__), DIRECTORY_SEPARATOR, $this->blockFileName); + } + + /** + * Try to load the block file + * + * @return boolean + */ + private function loadBlockFile() + { + $file = $this->getBlockFileAbsolute(); + + if(!file_exists($file)) + { + return false; + } + + $serialized = file_get_contents($file); + + if(!$serialized) + { + return false; + } + + $this->RS_BLOCK_TABLE = unserialize($serialized); + + if(!$this->RS_BLOCK_TABLE) + { + return false; + } + + return true; + } + + /** + * Try to save the block file + */ + private function saveBlockFile() + { + $file = $this->getBlockFileAbsolute(); + + if(file_exists($file)) + { + unlink($file); + } + + file_put_contents($file, serialize($this->RS_BLOCK_TABLE)); + } +} \ No newline at end of file diff --git a/resources/qr_code/QRUtil.php b/resources/qr_code/QRUtil.php new file mode 100644 index 0000000000..d370ed4cc8 --- /dev/null +++ b/resources/qr_code/QRUtil.php @@ -0,0 +1,464 @@ + + * @package phpQr + */ +class QRUtilException extends QRCodeException {}; + +/** + * Mask pattern enumeration + * + * @author Maik Greubel + * @package phpQr + */ +abstract class QRMaskPattern +{ + const PATTERN000 = 0; + const PATTERN001 = 1; + const PATTERN010 = 2; + const PATTERN011 = 3; + const PATTERN100 = 4; + const PATTERN101 = 5; + const PATTERN110 = 6; + const PATTERN111 = 7; +} + +/** + * The purpose of this class is to provide some common utility + * functionality for the QRCode class and its parts. + * + * @author Maik Greubel + * @package phpQr + */ +class QRUtil +{ + /** + * Pattern position table + * + * @var array + */ + private $PATTERN_POSITION_TABLE = null; + + /** + * + * @var int G15 pattern + */ + private $G15; + + /** + * + * @var int G18 pattern + */ + private $G18; + + /** + * + * @var int G15 mask pattern + */ + private $G15_MASK; + + /** + * + * @var QRUtil Singleton + */ + private static $instance; + + /** + * Singleton pattern + * + * @return QRUtil + */ + public static function getInstance() + { + if(!self::$instance) + { + self::$instance = new self; + } + + return self::$instance; + } + + /** + * Create a new instance of QRUtil + */ + private function __construct() + { + $this->init(); + $this->G15 = ((1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)); + $this->G18 = ((1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)); + $this->G15_MASK = ((1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)); + } + + /** + * Retrieve the Bose-Chaudhuri-Hocquenghem code type info + * + * @param array $data + * + * @return int + */ + public function getBCHTypeInfo($data) + { + $d = $data << 10; + while($this->getBCHDigit($d) - $this->getBCHDigit($this->G15) >= 0) + { + $d ^= ($this->G15 << ($this->getBCHDigit($d) - $this->getBCHDigit($this->G15))); + } + + return (($data << 10) | $d) ^ $this->G15_MASK; + } + + /** + * Retrieve the Bose-Chaudhuri-Hocquenghem code type number + * + * @param array $data + * + * @return int + */ + public function getBCHTypeNumber($data) + { + $d = $data << 12; + while($this->getBCHDigit($d) - $this->getBCHDigit($this->G18) >= 0) + { + $d ^= ($this->G18 << ($this->getBCHDigit($d) - $this->getBCHDigit($this->G18))); + } + return ($data << 12) | $d; + } + + /** + * Retrieve the Bose-Chaudhuri-Hocquenghem digit + * + * @param array $data + * + * @return int + */ + public function getBCHDigit($data) + { + $digit = 0; + while($data != 0) + { + $digit++; + $data = $data >> 1; + } + + return $digit; + } + + /** + * Return the pattern position + * + * @param int $typeNumber + * @return array + */ + public function getPatternPosition($typeNumber) + { + return $this->PATTERN_POSITION_TABLE[$typeNumber - 1]; + } + + /** + * Return whether to mask a bit + * + * @param int $maskPattern + * @param int $i + * @param int $j + * @throws QRUtilException + * @return boolean + */ + public function getMask($maskPattern, $i, $j) + { + switch($maskPattern) + { + case QRMaskPattern::PATTERN000: return ($i + $j) % 2 == 0; + case QRMaskPattern::PATTERN001: return ($i % 2) == 0; + case QRMaskPattern::PATTERN010: return ($j % 3) == 0; + case QRMaskPattern::PATTERN011: return ($i + $j) % 3 == 0; + case QRMaskPattern::PATTERN100: return (floor($i / 2) + floor($j / 3)) % 2 == 0; + case QRMaskPattern::PATTERN101: return ($i * $j) % 2 + ($i * $j) % 3 == 0; + case QRMaskPattern::PATTERN110: return (($i * $j) % 2 + ($i * $j) % 3) % 2 == 0; + case QRMaskPattern::PATTERN111: return (($i * $j) % 3 + ($i + $j) % 2) % 2 == 0; + + default: throw new QRUtilException("Bad mask pattern " . $maskPattern); + } + } + + /** + * Return error correction polynom + * + * @param int $errorCorrectLength + * @return QRPolynominal + */ + public function getErrorCorrectPolynominal($errorCorrectLength) + { + $a = new QRPolynominal(array(1), 0); + for($i = 0; $i < $errorCorrectLength; $i++) + { + $a = $a->multiply(new QRPolynominal(array(1, QRMath::getInstance()->gexp($i)), 0)); + } + + return $a; + } + + /** + * Get the bitmap length in bits + * + * @param int $mode + * @param int $type + * @throws QRUtilException + * @return int + */ + public function getLengthInBits($mode, $type) + { + // 1 - 9 + if(1 <= $type && $type < 10) + { + switch($mode) + { + case QRMode::MODE_NUMBER: return 10; + case QRMode::MODE_ALPHA_NUM: return 9; + case QRMode::MODE_8BIT_BYTE: return 8; + case QRMode::MODE_KANJI: return 8; + default: throw new QRUtilException("Bad mode " . $mode); + } + } + // 10 - 26 + else if($type < 27) + { + switch($mode) + { + case QRMode::MODE_NUMBER: return 12; + case QRMode::MODE_ALPHA_NUM: return 11; + case QRMode::MODE_8BIT_BYTE: return 16; + case QRMode::MODE_KANJI: return 10; + default: throw new QRUtilException("Bad mode " . $mode); + } + } + // 27 - 40 + else if($type < 41) + { + switch($mode) + { + case QRMode::MODE_NUMBER: return 14; + case QRMode::MODE_ALPHA_NUM: return 13; + case QRMode::MODE_8BIT_BYTE: return 16; + case QRMode::MODE_KANJI: return 12; + default: throw new QRUtilException("Bad mode " . $mode); + + } + } + else + { + throw new QRUtilException("Bad type " . $type); + } + } + + /** + * Calculate the lost point + * + * @param QRCode $qrCode + * + * @return number + */ + public function getLostPoint(QRCode $qrCode) + { + $moduleCount = $qrCode->getModuleCount(); + + $lostPoint = 0; + + // Level 1 + for($row = 0; $row < $moduleCount; $row++) + { + for($col = 0; $col < $moduleCount; $col++) + { + $sameCount = 0; + $dark = $qrCode->isDark($row, $col); + + for($r = -1; $r <= 1; $r++) + { + if($row + $r < 0 || $moduleCount <= $row + $r) + { + continue; + } + + for($c = -1; $c <= 1; $c++) + { + if($col + $c < 0 || $moduleCount <= $col + $c) + { + continue; + } + + if($r == 0 && $c == 0) + { + continue; + } + + if($dark == $qrCode->isDark($row + $r, $col + $c)) + { + $sameCount++; + } + } + } + + if($sameCount > 5) + { + $lostPoint += (3 + $sameCount - 5); + } + } + } + + // Level 2 + for($row = 0; $row < $moduleCount - 1; $row++) + { + for($col = 0; $col < $moduleCount - 1; $col++) + { + $count = 0; + if($qrCode->isDark($row, $col )) $count++; + if($qrCode->isDark($row + 1, $col )) $count++; + if($qrCode->isDark($row, $col + 1)) $count++; + if($qrCode->isDark($row + 1, $col + 1)) $count++; + if($count == 0 || $count == 4) + { + $lostPoint += 3; + } + } + } + + // Level 3 + for($row = 0; $row < $moduleCount; $row++) + { + for($col = 0; $col < $moduleCount - 6; $col++) + { + if($qrCode->isDark($row, $col) + && !$qrCode->isDark($row, $col + 1) + && $qrCode->isDark($row, $col + 2) + && $qrCode->isDark($row, $col + 3) + && $qrCode->isDark($row, $col + 4) + && !$qrCode->isDark($row, $col + 5) + && $qrCode->isDark($row, $col + 6)) + { + $lostPoint += 40; + } + } + } + + for($col = 0; $col < $moduleCount; $col++) + { + for($row = 0; $row < $moduleCount - 6; $row++) + { + if($qrCode->isDark($row, $col) + && !$qrCode->isDark($row + 1, $col) + && $qrCode->isDark($row + 2, $col) + && $qrCode->isDark($row + 3, $col) + && $qrCode->isDark($row + 4, $col) + && !$qrCode->isDark($row + 5, $col) + && $qrCode->isDark($row + 6, $col)) + { + $lostPoint += 40; + } + } + } + + // Level 4 + $darkCount = 0; + + for($col = 0; $col < $moduleCount; $col++) + { + for($row = 0; $row < $moduleCount; $row++) + { + if($qrCode->isDark($row, $col)) + { + $darkCount++; + } + } + } + + $ratio = abs(100 * $darkCount / $moduleCount / $moduleCount - 50) / 5; + $lostPoint += $ratio * 10; + + return $lostPoint; + } + + /** + * Initialize the pattern position table + */ + private function init() + { + $this->PATTERN_POSITION_TABLE = array(); + + $this->addPattern(array()); + $this->addPattern(array(6, 18)); + $this->addPattern(array(6, 22)); + $this->addPattern(array(6, 26)); + $this->addPattern(array(6, 30)); + $this->addPattern(array(6, 34)); + $this->addPattern(array(6, 22, 38)); + $this->addPattern(array(6, 24, 42)); + $this->addPattern(array(6, 26, 46)); + $this->addPattern(array(6, 28, 50)); + $this->addPattern(array(6, 30, 54)); + $this->addPattern(array(6, 32, 58)); + $this->addPattern(array(6, 34, 62)); + $this->addPattern(array(6, 26, 46, 66)); + $this->addPattern(array(6, 26, 48, 70)); + $this->addPattern(array(6, 26, 50, 74)); + $this->addPattern(array(6, 30, 54, 78)); + $this->addPattern(array(6, 30, 56, 82)); + $this->addPattern(array(6, 30, 58, 86)); + $this->addPattern(array(6, 34, 62, 90)); + $this->addPattern(array(6, 28, 50, 72, 94)); + $this->addPattern(array(6, 26, 50, 74, 98)); + $this->addPattern(array(6, 30, 54, 78, 102)); + $this->addPattern(array(6, 28, 54, 80, 106)); + $this->addPattern(array(6, 32, 58, 84, 110)); + $this->addPattern(array(6, 30, 58, 86, 114)); + $this->addPattern(array(6, 34, 62, 90, 118)); + $this->addPattern(array(6, 26, 50, 74, 98, 122)); + $this->addPattern(array(6, 30, 54, 78, 102, 126)); + $this->addPattern(array(6, 26, 52, 78, 104, 130)); + $this->addPattern(array(6, 30, 56, 82, 108, 134)); + $this->addPattern(array(6, 34, 60, 86, 112, 138)); + $this->addPattern(array(6, 30, 58, 86, 114, 142)); + $this->addPattern(array(6, 34, 62, 90, 118, 146)); + $this->addPattern(array(6, 30, 54, 78, 102, 126, 150)); + $this->addPattern(array(6, 24, 50, 76, 102, 128, 154)); + $this->addPattern(array(6, 28, 54, 80, 106, 132, 158)); + $this->addPattern(array(6, 32, 58, 84, 110, 136, 162)); + $this->addPattern(array(6, 26, 54, 82, 110, 138, 166)); + $this->addPattern(array(6, 30, 58, 86, 114, 142, 170)); + } + + /** + * Add a pattern to the pattern position table + * + * @param array $d + */ + private function addPattern($d) + { + array_push($this->PATTERN_POSITION_TABLE, $d); + } + + /** + * Create an empty array of n elements + * + * All elements are uninitialed. + * + * @param int $numElements + * @return array + */ + public function createEmptyArray($numElements) + { + return array_fill(0, $numElements, null); + } +} \ No newline at end of file diff --git a/resources/qr_code/README.md b/resources/qr_code/README.md new file mode 100644 index 0000000000..778205fb87 --- /dev/null +++ b/resources/qr_code/README.md @@ -0,0 +1,30 @@ +phpQr - A QRCode encoder class +=== + +by Maik Greubel (greubel@nkey.de) + +The intention to create a basic qrcode encoder for PHP was a request on phpclasses.org. +- + +The author studied multiple sources to get an idea how qrcode implementation works under the hood. +The best source was the JavaScript library jquery which provides a HTML Table based implementation. +See source and documentation at + +So the hard work was already done by Jerome Etienne. My part was only to port it to PHP code. + +Currently this package does not have the capability to read QRCodes. + +Further readings +- +For a detailed description of QRCode and its features please check + +Trademark information +- + +QR Code is registered trademark of +DENSO WAVE INCORPORATED + +License +- +All files in the package are published under the terms of the BSD 2 License. + \ No newline at end of file diff --git a/resources/qr_code/rsblock.dat b/resources/qr_code/rsblock.dat new file mode 100644 index 0000000000..2aaaa1796b --- /dev/null +++ b/resources/qr_code/rsblock.dat @@ -0,0 +1 @@ +a:160:{i:0;a:3:{i:0;i:1;i:1;i:26;i:2;i:19;}i:1;a:3:{i:0;i:1;i:1;i:26;i:2;i:16;}i:2;a:3:{i:0;i:1;i:1;i:26;i:2;i:13;}i:3;a:3:{i:0;i:1;i:1;i:26;i:2;i:9;}i:4;a:3:{i:0;i:1;i:1;i:44;i:2;i:34;}i:5;a:3:{i:0;i:1;i:1;i:44;i:2;i:28;}i:6;a:3:{i:0;i:1;i:1;i:44;i:2;i:22;}i:7;a:3:{i:0;i:1;i:1;i:44;i:2;i:16;}i:8;a:3:{i:0;i:1;i:1;i:70;i:2;i:55;}i:9;a:3:{i:0;i:1;i:1;i:70;i:2;i:44;}i:10;a:3:{i:0;i:2;i:1;i:35;i:2;i:17;}i:11;a:3:{i:0;i:2;i:1;i:35;i:2;i:13;}i:12;a:3:{i:0;i:1;i:1;i:100;i:2;i:80;}i:13;a:3:{i:0;i:2;i:1;i:50;i:2;i:32;}i:14;a:3:{i:0;i:2;i:1;i:50;i:2;i:24;}i:15;a:3:{i:0;i:4;i:1;i:25;i:2;i:9;}i:16;a:3:{i:0;i:1;i:1;i:134;i:2;i:108;}i:17;a:3:{i:0;i:2;i:1;i:67;i:2;i:43;}i:18;a:6:{i:0;i:2;i:1;i:33;i:2;i:15;i:3;i:2;i:4;i:34;i:5;i:16;}i:19;a:6:{i:0;i:2;i:1;i:33;i:2;i:11;i:3;i:2;i:4;i:34;i:5;i:12;}i:20;a:3:{i:0;i:2;i:1;i:86;i:2;i:68;}i:21;a:3:{i:0;i:4;i:1;i:43;i:2;i:27;}i:22;a:3:{i:0;i:4;i:1;i:43;i:2;i:19;}i:23;a:3:{i:0;i:4;i:1;i:43;i:2;i:15;}i:24;a:3:{i:0;i:2;i:1;i:98;i:2;i:78;}i:25;a:3:{i:0;i:4;i:1;i:49;i:2;i:31;}i:26;a:6:{i:0;i:2;i:1;i:32;i:2;i:14;i:3;i:4;i:4;i:33;i:5;i:15;}i:27;a:6:{i:0;i:4;i:1;i:39;i:2;i:13;i:3;i:1;i:4;i:40;i:5;i:14;}i:28;a:3:{i:0;i:2;i:1;i:121;i:2;i:97;}i:29;a:6:{i:0;i:2;i:1;i:60;i:2;i:38;i:3;i:2;i:4;i:61;i:5;i:39;}i:30;a:6:{i:0;i:4;i:1;i:40;i:2;i:18;i:3;i:2;i:4;i:41;i:5;i:19;}i:31;a:6:{i:0;i:4;i:1;i:40;i:2;i:14;i:3;i:2;i:4;i:41;i:5;i:15;}i:32;a:3:{i:0;i:2;i:1;i:146;i:2;i:116;}i:33;a:6:{i:0;i:3;i:1;i:58;i:2;i:36;i:3;i:2;i:4;i:59;i:5;i:37;}i:34;a:6:{i:0;i:4;i:1;i:36;i:2;i:16;i:3;i:4;i:4;i:37;i:5;i:17;}i:35;a:6:{i:0;i:4;i:1;i:36;i:2;i:12;i:3;i:4;i:4;i:37;i:5;i:13;}i:36;a:6:{i:0;i:2;i:1;i:86;i:2;i:68;i:3;i:2;i:4;i:87;i:5;i:69;}i:37;a:6:{i:0;i:4;i:1;i:69;i:2;i:43;i:3;i:1;i:4;i:70;i:5;i:44;}i:38;a:6:{i:0;i:6;i:1;i:43;i:2;i:19;i:3;i:2;i:4;i:44;i:5;i:20;}i:39;a:6:{i:0;i:6;i:1;i:43;i:2;i:15;i:3;i:2;i:4;i:44;i:5;i:16;}i:40;a:3:{i:0;i:4;i:1;i:101;i:2;i:81;}i:41;a:6:{i:0;i:1;i:1;i:80;i:2;i:50;i:3;i:4;i:4;i:81;i:5;i:51;}i:42;a:6:{i:0;i:4;i:1;i:50;i:2;i:22;i:3;i:4;i:4;i:51;i:5;i:23;}i:43;a:6:{i:0;i:3;i:1;i:36;i:2;i:12;i:3;i:8;i:4;i:37;i:5;i:13;}i:44;a:6:{i:0;i:2;i:1;i:116;i:2;i:92;i:3;i:2;i:4;i:117;i:5;i:93;}i:45;a:6:{i:0;i:6;i:1;i:58;i:2;i:36;i:3;i:2;i:4;i:59;i:5;i:37;}i:46;a:6:{i:0;i:4;i:1;i:46;i:2;i:20;i:3;i:6;i:4;i:47;i:5;i:21;}i:47;a:6:{i:0;i:7;i:1;i:42;i:2;i:14;i:3;i:4;i:4;i:43;i:5;i:15;}i:48;a:3:{i:0;i:4;i:1;i:133;i:2;i:107;}i:49;a:6:{i:0;i:8;i:1;i:59;i:2;i:37;i:3;i:1;i:4;i:60;i:5;i:38;}i:50;a:6:{i:0;i:8;i:1;i:44;i:2;i:20;i:3;i:4;i:4;i:45;i:5;i:21;}i:51;a:6:{i:0;i:12;i:1;i:33;i:2;i:11;i:3;i:4;i:4;i:34;i:5;i:12;}i:52;a:6:{i:0;i:3;i:1;i:145;i:2;i:115;i:3;i:1;i:4;i:146;i:5;i:116;}i:53;a:6:{i:0;i:4;i:1;i:64;i:2;i:40;i:3;i:5;i:4;i:65;i:5;i:41;}i:54;a:6:{i:0;i:11;i:1;i:36;i:2;i:16;i:3;i:5;i:4;i:37;i:5;i:17;}i:55;a:6:{i:0;i:11;i:1;i:36;i:2;i:12;i:3;i:5;i:4;i:37;i:5;i:13;}i:56;a:6:{i:0;i:5;i:1;i:109;i:2;i:87;i:3;i:1;i:4;i:110;i:5;i:88;}i:57;a:6:{i:0;i:5;i:1;i:65;i:2;i:41;i:3;i:5;i:4;i:66;i:5;i:42;}i:58;a:6:{i:0;i:5;i:1;i:54;i:2;i:24;i:3;i:7;i:4;i:55;i:5;i:25;}i:59;a:3:{i:0;i:11;i:1;i:36;i:2;i:12;}i:60;a:6:{i:0;i:5;i:1;i:122;i:2;i:98;i:3;i:1;i:4;i:123;i:5;i:99;}i:61;a:6:{i:0;i:7;i:1;i:73;i:2;i:45;i:3;i:3;i:4;i:74;i:5;i:46;}i:62;a:6:{i:0;i:15;i:1;i:43;i:2;i:19;i:3;i:2;i:4;i:44;i:5;i:20;}i:63;a:6:{i:0;i:3;i:1;i:45;i:2;i:15;i:3;i:13;i:4;i:46;i:5;i:16;}i:64;a:6:{i:0;i:1;i:1;i:135;i:2;i:107;i:3;i:5;i:4;i:136;i:5;i:108;}i:65;a:6:{i:0;i:10;i:1;i:74;i:2;i:46;i:3;i:1;i:4;i:75;i:5;i:47;}i:66;a:6:{i:0;i:1;i:1;i:50;i:2;i:22;i:3;i:15;i:4;i:51;i:5;i:23;}i:67;a:6:{i:0;i:2;i:1;i:42;i:2;i:14;i:3;i:17;i:4;i:43;i:5;i:15;}i:68;a:6:{i:0;i:5;i:1;i:150;i:2;i:120;i:3;i:1;i:4;i:151;i:5;i:121;}i:69;a:6:{i:0;i:9;i:1;i:69;i:2;i:43;i:3;i:4;i:4;i:70;i:5;i:44;}i:70;a:6:{i:0;i:17;i:1;i:50;i:2;i:22;i:3;i:1;i:4;i:51;i:5;i:23;}i:71;a:6:{i:0;i:2;i:1;i:42;i:2;i:14;i:3;i:19;i:4;i:43;i:5;i:15;}i:72;a:6:{i:0;i:3;i:1;i:141;i:2;i:113;i:3;i:4;i:4;i:142;i:5;i:114;}i:73;a:6:{i:0;i:3;i:1;i:70;i:2;i:44;i:3;i:11;i:4;i:71;i:5;i:45;}i:74;a:6:{i:0;i:17;i:1;i:47;i:2;i:21;i:3;i:4;i:4;i:48;i:5;i:22;}i:75;a:6:{i:0;i:9;i:1;i:39;i:2;i:13;i:3;i:16;i:4;i:40;i:5;i:14;}i:76;a:6:{i:0;i:3;i:1;i:135;i:2;i:107;i:3;i:5;i:4;i:136;i:5;i:108;}i:77;a:6:{i:0;i:3;i:1;i:67;i:2;i:41;i:3;i:13;i:4;i:68;i:5;i:42;}i:78;a:6:{i:0;i:15;i:1;i:54;i:2;i:24;i:3;i:5;i:4;i:55;i:5;i:25;}i:79;a:6:{i:0;i:15;i:1;i:43;i:2;i:15;i:3;i:10;i:4;i:44;i:5;i:16;}i:80;a:6:{i:0;i:4;i:1;i:144;i:2;i:116;i:3;i:4;i:4;i:145;i:5;i:117;}i:81;a:3:{i:0;i:17;i:1;i:68;i:2;i:42;}i:82;a:6:{i:0;i:17;i:1;i:50;i:2;i:22;i:3;i:6;i:4;i:51;i:5;i:23;}i:83;a:6:{i:0;i:19;i:1;i:46;i:2;i:16;i:3;i:6;i:4;i:47;i:5;i:17;}i:84;a:6:{i:0;i:2;i:1;i:139;i:2;i:111;i:3;i:7;i:4;i:140;i:5;i:112;}i:85;a:3:{i:0;i:17;i:1;i:74;i:2;i:46;}i:86;a:6:{i:0;i:7;i:1;i:54;i:2;i:24;i:3;i:16;i:4;i:55;i:5;i:25;}i:87;a:3:{i:0;i:34;i:1;i:37;i:2;i:13;}i:88;a:6:{i:0;i:4;i:1;i:151;i:2;i:121;i:3;i:5;i:4;i:152;i:5;i:122;}i:89;a:6:{i:0;i:4;i:1;i:75;i:2;i:47;i:3;i:14;i:4;i:76;i:5;i:48;}i:90;a:6:{i:0;i:11;i:1;i:54;i:2;i:24;i:3;i:14;i:4;i:55;i:5;i:25;}i:91;a:6:{i:0;i:16;i:1;i:45;i:2;i:15;i:3;i:14;i:4;i:46;i:5;i:16;}i:92;a:6:{i:0;i:6;i:1;i:147;i:2;i:117;i:3;i:4;i:4;i:148;i:5;i:118;}i:93;a:6:{i:0;i:6;i:1;i:73;i:2;i:45;i:3;i:14;i:4;i:74;i:5;i:46;}i:94;a:6:{i:0;i:11;i:1;i:54;i:2;i:24;i:3;i:16;i:4;i:55;i:5;i:25;}i:95;a:6:{i:0;i:30;i:1;i:46;i:2;i:16;i:3;i:2;i:4;i:47;i:5;i:17;}i:96;a:6:{i:0;i:8;i:1;i:132;i:2;i:106;i:3;i:4;i:4;i:133;i:5;i:107;}i:97;a:6:{i:0;i:8;i:1;i:75;i:2;i:47;i:3;i:13;i:4;i:76;i:5;i:48;}i:98;a:6:{i:0;i:7;i:1;i:54;i:2;i:24;i:3;i:22;i:4;i:55;i:5;i:25;}i:99;a:6:{i:0;i:22;i:1;i:45;i:2;i:15;i:3;i:13;i:4;i:46;i:5;i:16;}i:100;a:6:{i:0;i:10;i:1;i:142;i:2;i:114;i:3;i:2;i:4;i:143;i:5;i:115;}i:101;a:6:{i:0;i:19;i:1;i:74;i:2;i:46;i:3;i:4;i:4;i:75;i:5;i:47;}i:102;a:6:{i:0;i:28;i:1;i:50;i:2;i:22;i:3;i:6;i:4;i:51;i:5;i:23;}i:103;a:6:{i:0;i:33;i:1;i:46;i:2;i:16;i:3;i:4;i:4;i:47;i:5;i:17;}i:104;a:6:{i:0;i:8;i:1;i:152;i:2;i:122;i:3;i:4;i:4;i:153;i:5;i:123;}i:105;a:6:{i:0;i:22;i:1;i:73;i:2;i:45;i:3;i:3;i:4;i:74;i:5;i:46;}i:106;a:6:{i:0;i:8;i:1;i:53;i:2;i:23;i:3;i:26;i:4;i:54;i:5;i:24;}i:107;a:6:{i:0;i:12;i:1;i:45;i:2;i:15;i:3;i:28;i:4;i:46;i:5;i:16;}i:108;a:6:{i:0;i:3;i:1;i:147;i:2;i:117;i:3;i:10;i:4;i:148;i:5;i:118;}i:109;a:6:{i:0;i:3;i:1;i:73;i:2;i:45;i:3;i:23;i:4;i:74;i:5;i:46;}i:110;a:6:{i:0;i:4;i:1;i:54;i:2;i:24;i:3;i:31;i:4;i:55;i:5;i:25;}i:111;a:6:{i:0;i:11;i:1;i:45;i:2;i:15;i:3;i:31;i:4;i:46;i:5;i:16;}i:112;a:6:{i:0;i:7;i:1;i:146;i:2;i:116;i:3;i:7;i:4;i:147;i:5;i:117;}i:113;a:6:{i:0;i:21;i:1;i:73;i:2;i:45;i:3;i:7;i:4;i:74;i:5;i:46;}i:114;a:6:{i:0;i:1;i:1;i:53;i:2;i:23;i:3;i:37;i:4;i:54;i:5;i:24;}i:115;a:6:{i:0;i:19;i:1;i:45;i:2;i:15;i:3;i:26;i:4;i:46;i:5;i:16;}i:116;a:6:{i:0;i:5;i:1;i:145;i:2;i:115;i:3;i:10;i:4;i:146;i:5;i:116;}i:117;a:6:{i:0;i:19;i:1;i:75;i:2;i:47;i:3;i:10;i:4;i:76;i:5;i:48;}i:118;a:6:{i:0;i:15;i:1;i:54;i:2;i:24;i:3;i:25;i:4;i:55;i:5;i:25;}i:119;a:6:{i:0;i:23;i:1;i:45;i:2;i:15;i:3;i:25;i:4;i:46;i:5;i:16;}i:120;a:6:{i:0;i:13;i:1;i:145;i:2;i:115;i:3;i:3;i:4;i:146;i:5;i:116;}i:121;a:6:{i:0;i:2;i:1;i:74;i:2;i:46;i:3;i:29;i:4;i:75;i:5;i:47;}i:122;a:6:{i:0;i:42;i:1;i:54;i:2;i:24;i:3;i:1;i:4;i:55;i:5;i:25;}i:123;a:6:{i:0;i:23;i:1;i:45;i:2;i:15;i:3;i:28;i:4;i:46;i:5;i:16;}i:124;a:3:{i:0;i:17;i:1;i:145;i:2;i:115;}i:125;a:6:{i:0;i:10;i:1;i:74;i:2;i:46;i:3;i:23;i:4;i:75;i:5;i:47;}i:126;a:6:{i:0;i:42;i:1;i:54;i:2;i:24;i:3;i:1;i:4;i:55;i:5;i:25;}i:127;a:6:{i:0;i:23;i:1;i:45;i:2;i:15;i:3;i:28;i:4;i:46;i:5;i:16;}i:128;a:6:{i:0;i:17;i:1;i:145;i:2;i:115;i:3;i:1;i:4;i:146;i:5;i:116;}i:129;a:6:{i:0;i:14;i:1;i:74;i:2;i:46;i:3;i:21;i:4;i:75;i:5;i:47;}i:130;a:6:{i:0;i:29;i:1;i:54;i:2;i:24;i:3;i:19;i:4;i:55;i:5;i:25;}i:131;a:6:{i:0;i:11;i:1;i:45;i:2;i:15;i:3;i:46;i:4;i:46;i:5;i:16;}i:132;a:6:{i:0;i:13;i:1;i:145;i:2;i:115;i:3;i:6;i:4;i:146;i:5;i:116;}i:133;a:6:{i:0;i:14;i:1;i:74;i:2;i:46;i:3;i:21;i:4;i:75;i:5;i:47;}i:134;a:6:{i:0;i:44;i:1;i:54;i:2;i:24;i:3;i:7;i:4;i:55;i:5;i:25;}i:135;a:6:{i:0;i:59;i:1;i:46;i:2;i:16;i:3;i:1;i:4;i:47;i:5;i:17;}i:136;a:6:{i:0;i:12;i:1;i:151;i:2;i:121;i:3;i:7;i:4;i:152;i:5;i:122;}i:137;a:6:{i:0;i:12;i:1;i:75;i:2;i:47;i:3;i:26;i:4;i:76;i:5;i:48;}i:138;a:6:{i:0;i:39;i:1;i:54;i:2;i:24;i:3;i:14;i:4;i:55;i:5;i:25;}i:139;a:6:{i:0;i:22;i:1;i:45;i:2;i:15;i:3;i:41;i:4;i:46;i:5;i:16;}i:140;a:6:{i:0;i:6;i:1;i:151;i:2;i:121;i:3;i:14;i:4;i:152;i:5;i:122;}i:141;a:6:{i:0;i:6;i:1;i:75;i:2;i:47;i:3;i:34;i:4;i:76;i:5;i:48;}i:142;a:6:{i:0;i:46;i:1;i:54;i:2;i:24;i:3;i:10;i:4;i:55;i:5;i:25;}i:143;a:6:{i:0;i:2;i:1;i:45;i:2;i:15;i:3;i:64;i:4;i:46;i:5;i:16;}i:144;a:6:{i:0;i:17;i:1;i:152;i:2;i:122;i:3;i:4;i:4;i:153;i:5;i:123;}i:145;a:6:{i:0;i:29;i:1;i:74;i:2;i:46;i:3;i:14;i:4;i:75;i:5;i:47;}i:146;a:6:{i:0;i:49;i:1;i:54;i:2;i:24;i:3;i:10;i:4;i:55;i:5;i:25;}i:147;a:6:{i:0;i:24;i:1;i:45;i:2;i:15;i:3;i:46;i:4;i:46;i:5;i:16;}i:148;a:6:{i:0;i:4;i:1;i:152;i:2;i:122;i:3;i:18;i:4;i:153;i:5;i:123;}i:149;a:6:{i:0;i:13;i:1;i:74;i:2;i:46;i:3;i:32;i:4;i:75;i:5;i:47;}i:150;a:6:{i:0;i:48;i:1;i:54;i:2;i:24;i:3;i:14;i:4;i:55;i:5;i:25;}i:151;a:6:{i:0;i:42;i:1;i:45;i:2;i:15;i:3;i:32;i:4;i:46;i:5;i:16;}i:152;a:6:{i:0;i:20;i:1;i:147;i:2;i:117;i:3;i:4;i:4;i:148;i:5;i:118;}i:153;a:6:{i:0;i:40;i:1;i:75;i:2;i:47;i:3;i:7;i:4;i:76;i:5;i:48;}i:154;a:6:{i:0;i:43;i:1;i:54;i:2;i:24;i:3;i:22;i:4;i:55;i:5;i:25;}i:155;a:6:{i:0;i:10;i:1;i:45;i:2;i:15;i:3;i:67;i:4;i:46;i:5;i:16;}i:156;a:6:{i:0;i:19;i:1;i:148;i:2;i:118;i:3;i:6;i:4;i:149;i:5;i:119;}i:157;a:6:{i:0;i:18;i:1;i:75;i:2;i:47;i:3;i:31;i:4;i:76;i:5;i:48;}i:158;a:6:{i:0;i:34;i:1;i:54;i:2;i:24;i:3;i:34;i:4;i:55;i:5;i:25;}i:159;a:6:{i:0;i:20;i:1;i:45;i:2;i:15;i:3;i:61;i:4;i:46;i:5;i:16;}} \ No newline at end of file diff --git a/resources/recaptchalib.php b/resources/recaptchalib.php deleted file mode 100644 index ba4a7e2e93..0000000000 --- a/resources/recaptchalib.php +++ /dev/null @@ -1,268 +0,0 @@ - $value ) - $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; - - // Cut the last '&' - $req=substr($req,0,strlen($req)-1); - return $req; -} - -/** - * Submits an HTTP POST to a reCAPTCHA server - * @param string $host - * @param string $path - * @param array $data - * @param int port - * @return array response - */ -function _recaptcha_http_post($host, $path, $data, $port = 80) { - - $req = _recaptcha_qsencode ($data); - - $http_request = "POST $path HTTP/1.0\r\n"; - $http_request .= "Host: $host\r\n"; - $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; - $http_request .= "Content-Length: " . strlen($req) . "\r\n"; - $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; - $http_request .= "\r\n"; - $http_request .= $req; - - $response = ''; - if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { - die ('Could not open socket'); - } - - fwrite($fs, $http_request); - - while ( !feof($fs) ) - $response .= fgets($fs, 1160); // One TCP-IP packet - fclose($fs); - $response = explode("\r\n\r\n", $response, 2); - - return $response; -} - -/** - * Gets the challenge HTML (javascript and non-javascript version). - * This is called from the browser, and the resulting reCAPTCHA HTML widget - * is embedded within the HTML form it was called from. - * @param string $pubkey A public key for reCAPTCHA - * @param string $error The error given by reCAPTCHA (optional, default is null) - * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) - - * @return string - The HTML to be embedded in the user's form. - */ -function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) -{ - if ($pubkey == null || $pubkey == '') { - require_once "resources/header.php"; - echo "To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"; - require_once "resources/footer.php"; - exit; - } - - if ($use_ssl) { - $server = RECAPTCHA_API_SECURE_SERVER; - } else { - $server = RECAPTCHA_API_SERVER; - } - - $errorpart = ""; - if ($error) { - $errorpart = "&error=" . $error; - } - return ' - - '; -} - -/** - * A ReCaptchaResponse is returned from recaptcha_check_answer() - */ -class ReCaptchaResponse { - var $is_valid; - var $error; -} - -/** - * Calls an HTTP POST function to verify if the user's guess was correct - * @param string $privkey - * @param string $remoteip - * @param string $challenge - * @param string $response - * @param array $extra_params an array of extra variables to post to the server - * @return ReCaptchaResponse - */ -function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) -{ - if ($privkey == null || $privkey == '') { - die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); - } - - if ($remoteip == null || $remoteip == '') { - die ("For security reasons, you must pass the remote ip to reCAPTCHA"); - } - - //discard spam submissions - if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { - $recaptcha_response = new ReCaptchaResponse(); - $recaptcha_response->is_valid = false; - $recaptcha_response->error = 'incorrect-captcha-sol'; - return $recaptcha_response; - } - - $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", - array ( - 'privatekey' => $privkey, - 'remoteip' => $remoteip, - 'challenge' => $challenge, - 'response' => $response - ) + $extra_params - ); - - $answers = explode ("\n", $response [1]); - $recaptcha_response = new ReCaptchaResponse(); - - if (trim ($answers [0]) == 'true') { - $recaptcha_response->is_valid = true; - } - else { - $recaptcha_response->is_valid = false; - $recaptcha_response->error = $answers [1]; - } - return $recaptcha_response; - -} - -/** - * gets a URL where the user can sign up for reCAPTCHA. If your application - * has a configuration page where you enter a key, you should provide a link - * using this function. - * @param string $_SESSION['domain_name'] The domain where the page is hosted - * @param string $app_name The name of your application - */ -function recaptcha_get_signup_url ($domain_name = null, $app_name = null) { - return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain_name, 'app' => $app_name)); -} - -function _recaptcha_aes_pad($val) { - $block_size = 16; - $numpad = $block_size - (strlen ($val) % $block_size); - return str_pad($val, strlen ($val) + $numpad, chr($numpad)); -} - -/* Mailhide related code */ - -function _recaptcha_aes_encrypt($val,$ky) { - if (! function_exists ("mcrypt_encrypt")) { - die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); - } - $mode=MCRYPT_MODE_CBC; - $enc=MCRYPT_RIJNDAEL_128; - $val=_recaptcha_aes_pad($val); - return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); -} - -function _recaptcha_mailhide_urlbase64 ($x) { - return strtr(base64_encode ($x), '+/', '-_'); -} - -/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ -function recaptcha_mailhide_url($pubkey, $privkey, $email) { - if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { - die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . - "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); - } - - - $ky = pack('H*', $privkey); - $cryptmail = _recaptcha_aes_encrypt ($email, $ky); - - return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); -} - -/** - * gets the parts of the email to expose to the user. - * eg, given johndoe@example,com return ["john", "example.com"]. - * the email is then displayed as john...@example.com - */ -function _recaptcha_mailhide_email_parts ($email) { - $arr = preg_split("/@/", $email ); - - if (strlen ($arr[0]) <= 4) { - $arr[0] = substr ($arr[0], 0, 1); - } else if (strlen ($arr[0]) <= 6) { - $arr[0] = substr ($arr[0], 0, 3); - } else { - $arr[0] = substr ($arr[0], 0, 4); - } - return $arr; -} - -/** - * Gets html to display an email address given a public an private key. - * to get a key, go to: - * - * http://www.google.com/recaptcha/mailhide/apikey - */ -function recaptcha_mailhide_html($pubkey, $privkey, $email) { - $emailparts = _recaptcha_mailhide_email_parts ($email); - $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); - - return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); - -} - -?> \ No newline at end of file diff --git a/resources/switch.php b/resources/switch.php index e4fdd923de..ed15401005 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -93,11 +93,15 @@ function event_socket_request_cmd($cmd) { return $response; } -function byte_convert($bytes, $decimals = 2) { - if ($bytes <= 0) { return '0 Bytes'; } - $convention = 1024; - $formattedbytes = array_reduce( array(' B', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', 'ZB'), create_function( '$a,$b', 'return is_numeric($a)?($a>='.$convention.'?$a/'.$convention.':number_format($a,'.$decimals.').$b):$a;' ), $bytes ); - return $formattedbytes; +function byte_convert($bytes, $precision = 2) { + static $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); + $step = 1024; + $i = 0; + while (($bytes / $step) > 0.9) { + $bytes = $bytes / $step; + $i++; + } + return round($bytes, $precision).' '.$units[$i]; } function remove_config_from_cache($name) { @@ -170,7 +174,9 @@ function save_setting_xml() { $xml .= " \n"; $xml .= " \n"; $xml .= " \n"; - $xml .= " \n"; + if (strlen($row['event_socket_acl']) > 0) { + $xml .= " \n"; + } $xml .= " \n"; $xml .= ""; fwrite($fout, $xml); @@ -567,13 +573,10 @@ function extension_presence_id($extension, $number_alias = false) { $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and (extension = '$extension' "; $sql .= "or number_alias = '$extension') "; - $sql .= "and enabled = 'true' "; - $result = $db->query($sql)->fetchAll(PDO::FETCH_ASSOC); if (count($result) == 0) { return false; } - foreach ($result as &$row) { $extension = $row['extension']; $number_alias = $row['number_alias']; @@ -1303,7 +1306,6 @@ if (!function_exists('switch_conf_xml')) { else { if (file_exists(PHP_BINDIR.'/php')) { define("PHP_BIN", "php"); } $v_mailer_app = PHP_BINDIR."/".PHP_BIN." ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/v_mailto.php"; - $v_mailer_app = sprintf('"%s"', $v_mailer_app); $v_mailer_app_args = "-t"; } diff --git a/resources/templates/conf/autoload_configs/conference.conf b/resources/templates/conf/autoload_configs/conference.conf index 76637c0919..d7d54807d0 100644 --- a/resources/templates/conf/autoload_configs/conference.conf +++ b/resources/templates/conf/autoload_configs/conference.conf @@ -289,6 +289,7 @@ + diff --git a/resources/templates/conf/autoload_configs/curl.conf.xml b/resources/templates/conf/autoload_configs/curl.conf.xml new file mode 100644 index 0000000000..eff3c6b9ac --- /dev/null +++ b/resources/templates/conf/autoload_configs/curl.conf.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/resources/templates/conf/autoload_configs/lua.conf.xml b/resources/templates/conf/autoload_configs/lua.conf.xml index 5a5e894275..0eaa4ebe9e 100644 --- a/resources/templates/conf/autoload_configs/lua.conf.xml +++ b/resources/templates/conf/autoload_configs/lua.conf.xml @@ -57,6 +57,6 @@ - + diff --git a/resources/templates/conf/autoload_configs/post_load_switch.conf.xml b/resources/templates/conf/autoload_configs/post_load_switch.conf.xml new file mode 100644 index 0000000000..1ebf4d51a1 --- /dev/null +++ b/resources/templates/conf/autoload_configs/post_load_switch.conf.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/resources/templates/conf/autoload_configs/switch.conf.xml b/resources/templates/conf/autoload_configs/switch.conf.xml index a5bef3de66..dbeee854aa 100644 --- a/resources/templates/conf/autoload_configs/switch.conf.xml +++ b/resources/templates/conf/autoload_configs/switch.conf.xml @@ -117,7 +117,7 @@ - + @@ -141,7 +141,7 @@ - + - \ No newline at end of file + diff --git a/resources/templates/conf/freeswitch.xml b/resources/templates/conf/freeswitch.xml index d42cb6c6f3..4946135719 100644 --- a/resources/templates/conf/freeswitch.xml +++ b/resources/templates/conf/freeswitch.xml @@ -63,5 +63,6 @@ +
diff --git a/resources/templates/conf/languages/ar/ar.xml b/resources/templates/conf/languages/ar/ar.xml new file mode 100644 index 0000000000..0133450806 --- /dev/null +++ b/resources/templates/conf/languages/ar/ar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/demo/demo-ivr.xml b/resources/templates/conf/languages/ar/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/ar/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/demo/demo.xml b/resources/templates/conf/languages/ar/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/ar/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/dir/sounds.xml b/resources/templates/conf/languages/ar/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/ar/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/dir/tts.xml b/resources/templates/conf/languages/ar/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/ar/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/ivr/pin_number.xml b/resources/templates/conf/languages/ar/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/ar/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/ivr/sounds.xml b/resources/templates/conf/languages/ar/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/ar/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/ivr/wakeup.xml b/resources/templates/conf/languages/ar/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/ar/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/vm/sounds.xml b/resources/templates/conf/languages/ar/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/ar/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/vm/tts.xml b/resources/templates/conf/languages/ar/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/ar/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ar/vm/voicemail_ivr.xml b/resources/templates/conf/languages/ar/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/ar/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/de.xml b/resources/templates/conf/languages/de/de.xml index 4936318ed3..86e1f07019 100644 --- a/resources/templates/conf/languages/de/de.xml +++ b/resources/templates/conf/languages/de/de.xml @@ -1,11 +1,14 @@ - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/demo/demo-ivr.xml b/resources/templates/conf/languages/de/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/de/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/demo/demo.xml b/resources/templates/conf/languages/de/demo/demo.xml index 4786ac69c3..76139e5859 100644 --- a/resources/templates/conf/languages/de/demo/demo.xml +++ b/resources/templates/conf/languages/de/demo/demo.xml @@ -7,7 +7,7 @@ - + @@ -52,19 +52,19 @@ - + - + - + - + - + diff --git a/resources/templates/conf/languages/de/dir/sounds.xml b/resources/templates/conf/languages/de/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/de/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/dir/tts.xml b/resources/templates/conf/languages/de/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/de/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/ivr/pin_number.xml b/resources/templates/conf/languages/de/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/de/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/ivr/sounds.xml b/resources/templates/conf/languages/de/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/de/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/ivr/wakeup.xml b/resources/templates/conf/languages/de/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/de/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/de/vm/sounds.xml b/resources/templates/conf/languages/de/vm/sounds.xml index 0ba3d79a85..dd1e0b97f4 100644 --- a/resources/templates/conf/languages/de/vm/sounds.xml +++ b/resources/templates/conf/languages/de/vm/sounds.xml @@ -26,6 +26,22 @@ + + + + + + + + + + + + + + + + @@ -54,8 +70,7 @@ - - + @@ -63,7 +78,7 @@ - + @@ -78,16 +93,19 @@ + + + @@ -104,21 +122,25 @@ + + + + @@ -304,16 +326,23 @@ - + + + + + + + + @@ -361,8 +390,7 @@ - - + diff --git a/resources/templates/conf/languages/de/vm/tts.xml b/resources/templates/conf/languages/de/vm/tts.xml index 5395d4adf0..9a8b6a0e35 100644 --- a/resources/templates/conf/languages/de/vm/tts.xml +++ b/resources/templates/conf/languages/de/vm/tts.xml @@ -3,7 +3,7 @@ - + @@ -11,7 +11,7 @@ - + @@ -19,7 +19,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -43,20 +43,20 @@ - + - + - + - + - + @@ -65,16 +65,16 @@ + data="To listen to new messages, press $1, To listen to saved messages, press $2, For advanced options, press $3, to exit, press $4."/> - + + data="To record a greeting, press $1, To choose a greeting, press $2, To record your name, press $3, to change your password, press $5, to return to the main menu, press $5."/> @@ -82,7 +82,8 @@ - + + @@ -91,7 +92,7 @@ + data="To listen to the recording, press $1, To save the recording, press $2, To re record, press $3."/> @@ -100,16 +101,40 @@ + data="To mark this message urgent, press $1, To continue, press $2."/> + + + + + + + + + + + + + + + + + + + + + + + + - + + data="To listen to the recording again, press $1, To save the recording, press $2, To delete the recording, press $3, to forward the recording to your email, press $4, to call the caller now, press $5, To forward this message to another extension, press $6."/> @@ -117,7 +142,7 @@ - + @@ -125,7 +150,7 @@ - + @@ -133,7 +158,7 @@ - + @@ -141,7 +166,7 @@ - + @@ -149,7 +174,7 @@ - + @@ -157,7 +182,7 @@ - + @@ -173,7 +198,7 @@ - + @@ -197,7 +222,7 @@ - + @@ -205,7 +230,7 @@ - + diff --git a/resources/templates/conf/languages/de/vm/voicemail_ivr.xml b/resources/templates/conf/languages/de/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/de/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/demo/demo-ivr.xml b/resources/templates/conf/languages/es/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/es/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/demo/demo.xml b/resources/templates/conf/languages/es/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/es/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/dir/sounds.xml b/resources/templates/conf/languages/es/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/es/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/dir/tts.xml b/resources/templates/conf/languages/es/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/es/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/es.xml b/resources/templates/conf/languages/es/es.xml new file mode 100644 index 0000000000..c7dfd03cd2 --- /dev/null +++ b/resources/templates/conf/languages/es/es.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/ivr/pin_number.xml b/resources/templates/conf/languages/es/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/es/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/ivr/sounds.xml b/resources/templates/conf/languages/es/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/es/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/ivr/wakeup.xml b/resources/templates/conf/languages/es/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/es/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/vm/sounds.xml b/resources/templates/conf/languages/es/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/es/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/vm/tts.xml b/resources/templates/conf/languages/es/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/es/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/es/vm/voicemail_ivr.xml b/resources/templates/conf/languages/es/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/es/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/demo/demo-ivr.xml b/resources/templates/conf/languages/fr/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/fr/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/demo/demo.xml b/resources/templates/conf/languages/fr/demo/demo.xml index 36ac98c06a..76139e5859 100644 --- a/resources/templates/conf/languages/fr/demo/demo.xml +++ b/resources/templates/conf/languages/fr/demo/demo.xml @@ -2,17 +2,70 @@ - + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/dir/sounds.xml b/resources/templates/conf/languages/fr/dir/sounds.xml index 7a40d2af49..fc288ff622 100644 --- a/resources/templates/conf/languages/fr/dir/sounds.xml +++ b/resources/templates/conf/languages/fr/dir/sounds.xml @@ -1,122 +1,119 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - + + + + + + + + - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + diff --git a/resources/templates/conf/languages/fr/dir/tts.xml b/resources/templates/conf/languages/fr/dir/tts.xml index 72ecd23ab6..84007b7d52 100644 --- a/resources/templates/conf/languages/fr/dir/tts.xml +++ b/resources/templates/conf/languages/fr/dir/tts.xml @@ -1,101 +1,95 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + diff --git a/resources/templates/conf/languages/fr/fr.xml b/resources/templates/conf/languages/fr/fr.xml index 0841add952..339e7ec939 100644 --- a/resources/templates/conf/languages/fr/fr.xml +++ b/resources/templates/conf/languages/fr/fr.xml @@ -1,12 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/ivr/pin_number.xml b/resources/templates/conf/languages/fr/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/fr/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/ivr/sounds.xml b/resources/templates/conf/languages/fr/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/fr/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/ivr/wakeup.xml b/resources/templates/conf/languages/fr/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/fr/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/vm/sounds.xml b/resources/templates/conf/languages/fr/vm/sounds.xml index 6a9c7bcf23..dd1e0b97f4 100644 --- a/resources/templates/conf/languages/fr/vm/sounds.xml +++ b/resources/templates/conf/languages/fr/vm/sounds.xml @@ -3,7 +3,8 @@ - + + @@ -11,7 +12,8 @@ - + + @@ -19,7 +21,23 @@ - + + + + + + + + + + + + + + + + + @@ -27,7 +45,7 @@ - + @@ -35,7 +53,7 @@ - + @@ -43,25 +61,26 @@ - + - + - + + + + - + - - - - - - + + + + @@ -69,8 +88,28 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -78,8 +117,34 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -87,8 +152,7 @@ - - + @@ -96,8 +160,15 @@ - + + + + + + + + + @@ -105,17 +176,87 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -123,7 +264,7 @@ - + @@ -131,7 +272,7 @@ - + @@ -139,7 +280,7 @@ - + @@ -147,15 +288,17 @@ - + - + - + + + @@ -163,36 +306,43 @@ - + + + - + - + - + - - - - - - + + + + + + + + - + + + + @@ -200,35 +350,39 @@ - + - + - + - + + - + + - + + - + + @@ -236,9 +390,41 @@ - + - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/vm/tts.xml b/resources/templates/conf/languages/fr/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/fr/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/fr/vm/voicemail_ivr.xml b/resources/templates/conf/languages/fr/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/fr/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/demo/demo-ivr.xml b/resources/templates/conf/languages/he/demo/demo-ivr.xml index d95157fd3f..99f4932f21 100644 --- a/resources/templates/conf/languages/he/demo/demo-ivr.xml +++ b/resources/templates/conf/languages/he/demo/demo-ivr.xml @@ -138,9 +138,8 @@ - - + diff --git a/resources/templates/conf/languages/he/dir/sounds.xml b/resources/templates/conf/languages/he/dir/sounds.xml index a42b2c1898..fc288ff622 100644 --- a/resources/templates/conf/languages/he/dir/sounds.xml +++ b/resources/templates/conf/languages/he/dir/sounds.xml @@ -1,122 +1,119 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - + + + + + + + + - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + diff --git a/resources/templates/conf/languages/he/dir/tts.xml b/resources/templates/conf/languages/he/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/he/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/he.xml b/resources/templates/conf/languages/he/he.xml index e268c07cae..fb0c48ed70 100644 --- a/resources/templates/conf/languages/he/he.xml +++ b/resources/templates/conf/languages/he/he.xml @@ -1,11 +1,14 @@ - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/ivr/pin_number.xml b/resources/templates/conf/languages/he/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/he/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/ivr/sounds.xml b/resources/templates/conf/languages/he/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/he/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/ivr/wakeup.xml b/resources/templates/conf/languages/he/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/he/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/vm/sounds.xml b/resources/templates/conf/languages/he/vm/sounds.xml index e52fa8691f..dd1e0b97f4 100644 --- a/resources/templates/conf/languages/he/vm/sounds.xml +++ b/resources/templates/conf/languages/he/vm/sounds.xml @@ -26,6 +26,22 @@ + + + + + + + + + + + + + + + + @@ -316,9 +332,17 @@ + + + + + + + + @@ -366,7 +390,7 @@ - + diff --git a/resources/templates/conf/languages/he/vm/tts.xml b/resources/templates/conf/languages/he/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/he/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/he/vm/voicemail_ivr.xml b/resources/templates/conf/languages/he/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/he/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/demo/demo-ivr.xml b/resources/templates/conf/languages/it/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/it/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/demo/demo.xml b/resources/templates/conf/languages/it/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/it/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/dir/sounds.xml b/resources/templates/conf/languages/it/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/it/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/dir/tts.xml b/resources/templates/conf/languages/it/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/it/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/it.xml b/resources/templates/conf/languages/it/it.xml new file mode 100644 index 0000000000..420e5ecca0 --- /dev/null +++ b/resources/templates/conf/languages/it/it.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/ivr/pin_number.xml b/resources/templates/conf/languages/it/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/it/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/ivr/sounds.xml b/resources/templates/conf/languages/it/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/it/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/ivr/wakeup.xml b/resources/templates/conf/languages/it/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/it/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/vm/sounds.xml b/resources/templates/conf/languages/it/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/it/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/vm/tts.xml b/resources/templates/conf/languages/it/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/it/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/it/vm/voicemail_ivr.xml b/resources/templates/conf/languages/it/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/it/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/demo/demo-ivr.xml b/resources/templates/conf/languages/nl/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/nl/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/demo/demo.xml b/resources/templates/conf/languages/nl/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/nl/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/dir/sounds.xml b/resources/templates/conf/languages/nl/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/nl/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/dir/tts.xml b/resources/templates/conf/languages/nl/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/nl/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/demo/demo-ivr.xml b/resources/templates/conf/languages/nl/en/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/demo/demo.xml b/resources/templates/conf/languages/nl/en/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/dir/sounds.xml b/resources/templates/conf/languages/nl/en/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/dir/tts.xml b/resources/templates/conf/languages/nl/en/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/en.xml b/resources/templates/conf/languages/nl/en/en.xml new file mode 100644 index 0000000000..0133450806 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/en.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/ivr/pin_number.xml b/resources/templates/conf/languages/nl/en/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/ivr/sounds.xml b/resources/templates/conf/languages/nl/en/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/ivr/wakeup.xml b/resources/templates/conf/languages/nl/en/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/vm/sounds.xml b/resources/templates/conf/languages/nl/en/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/vm/tts.xml b/resources/templates/conf/languages/nl/en/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/en/vm/voicemail_ivr.xml b/resources/templates/conf/languages/nl/en/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/nl/en/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/ivr/pin_number.xml b/resources/templates/conf/languages/nl/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/nl/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/ivr/sounds.xml b/resources/templates/conf/languages/nl/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/nl/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/ivr/wakeup.xml b/resources/templates/conf/languages/nl/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/nl/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/nl.xml b/resources/templates/conf/languages/nl/nl.xml new file mode 100644 index 0000000000..a8b9e34dc9 --- /dev/null +++ b/resources/templates/conf/languages/nl/nl.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/vm/sounds.xml b/resources/templates/conf/languages/nl/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/nl/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/vm/tts.xml b/resources/templates/conf/languages/nl/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/nl/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/nl/vm/voicemail_ivr.xml b/resources/templates/conf/languages/nl/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/nl/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/demo/demo-ivr.xml b/resources/templates/conf/languages/pt/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/pt/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/demo/demo.xml b/resources/templates/conf/languages/pt/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/pt/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/dir/sounds.xml b/resources/templates/conf/languages/pt/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/pt/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/dir/tts.xml b/resources/templates/conf/languages/pt/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/pt/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/ivr/pin_number.xml b/resources/templates/conf/languages/pt/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/pt/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/ivr/sounds.xml b/resources/templates/conf/languages/pt/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/pt/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/ivr/wakeup.xml b/resources/templates/conf/languages/pt/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/pt/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/pt.xml b/resources/templates/conf/languages/pt/pt.xml new file mode 100644 index 0000000000..efd9efd5eb --- /dev/null +++ b/resources/templates/conf/languages/pt/pt.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/vm/sounds.xml b/resources/templates/conf/languages/pt/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/pt/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/vm/tts.xml b/resources/templates/conf/languages/pt/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/pt/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/pt/vm/voicemail_ivr.xml b/resources/templates/conf/languages/pt/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/pt/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/demo/demo-ivr.xml b/resources/templates/conf/languages/ro/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/ro/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/demo/demo.xml b/resources/templates/conf/languages/ro/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/ro/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/dir/sounds.xml b/resources/templates/conf/languages/ro/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/ro/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/dir/tts.xml b/resources/templates/conf/languages/ro/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/ro/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/ivr/pin_number.xml b/resources/templates/conf/languages/ro/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/ro/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/ivr/sounds.xml b/resources/templates/conf/languages/ro/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/ro/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/ivr/wakeup.xml b/resources/templates/conf/languages/ro/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/ro/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/ro.xml b/resources/templates/conf/languages/ro/ro.xml new file mode 100644 index 0000000000..06ee6beaf0 --- /dev/null +++ b/resources/templates/conf/languages/ro/ro.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/vm/sounds.xml b/resources/templates/conf/languages/ro/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/ro/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/vm/tts.xml b/resources/templates/conf/languages/ro/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/ro/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ro/vm/voicemail_ivr.xml b/resources/templates/conf/languages/ro/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/ro/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/demo/demo-ivr.xml b/resources/templates/conf/languages/ru/demo/demo-ivr.xml index 71962c05a1..99f4932f21 100644 --- a/resources/templates/conf/languages/ru/demo/demo-ivr.xml +++ b/resources/templates/conf/languages/ru/demo/demo-ivr.xml @@ -1,6 +1,4 @@ - - - + @@ -12,7 +10,7 @@ - + @@ -23,7 +21,7 @@ - + @@ -41,36 +39,39 @@ - - - - + + - + + + + + + - + - + - + @@ -105,7 +106,7 @@ - + @@ -137,9 +138,8 @@ - - + diff --git a/resources/templates/conf/languages/ru/demo/demo.xml b/resources/templates/conf/languages/ru/demo/demo.xml index 7e450fbc83..76139e5859 100644 --- a/resources/templates/conf/languages/ru/demo/demo.xml +++ b/resources/templates/conf/languages/ru/demo/demo.xml @@ -1,100 +1,71 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/dir/sounds.xml b/resources/templates/conf/languages/ru/dir/sounds.xml index 02d6b3671f..fc288ff622 100644 --- a/resources/templates/conf/languages/ru/dir/sounds.xml +++ b/resources/templates/conf/languages/ru/dir/sounds.xml @@ -1,121 +1,119 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + + + + + - + + + + + + + - - - - - - + + + + + + + - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - + diff --git a/resources/templates/conf/languages/ru/dir/tts.xml b/resources/templates/conf/languages/ru/dir/tts.xml index 67ae5ab265..84007b7d52 100644 --- a/resources/templates/conf/languages/ru/dir/tts.xml +++ b/resources/templates/conf/languages/ru/dir/tts.xml @@ -1,96 +1,95 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - + + + + + + + - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + diff --git a/resources/templates/conf/languages/ru/ivr/pin_number.xml b/resources/templates/conf/languages/ru/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/ru/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/ivr/sounds.xml b/resources/templates/conf/languages/ru/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/ru/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/ivr/wakeup.xml b/resources/templates/conf/languages/ru/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/ru/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/ru.xml b/resources/templates/conf/languages/ru/ru.xml index bd855ed488..a4c09f1bcf 100644 --- a/resources/templates/conf/languages/ru/ru.xml +++ b/resources/templates/conf/languages/ru/ru.xml @@ -1,13 +1,15 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/vm/sounds.xml b/resources/templates/conf/languages/ru/vm/sounds.xml index 4e9c87a9fc..dd1e0b97f4 100644 --- a/resources/templates/conf/languages/ru/vm/sounds.xml +++ b/resources/templates/conf/languages/ru/vm/sounds.xml @@ -1,10 +1,10 @@ - - + + - - + + @@ -12,8 +12,8 @@ - - + + @@ -21,7 +21,23 @@ - + + + + + + + + + + + + + + + + + @@ -29,7 +45,7 @@ - + @@ -37,7 +53,7 @@ - + @@ -45,38 +61,26 @@ - + - + - - - - - + + + + - - + - - - - - - - - - - - - - - + + + + @@ -84,50 +88,71 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + @@ -135,15 +160,15 @@ - - - - - - - - - + + + + + + + + + @@ -151,12 +176,12 @@ - - - - - - + + + + + + @@ -164,12 +189,12 @@ - - - - - - + + + + + + @@ -177,9 +202,9 @@ - - - + + + @@ -187,7 +212,7 @@ - + @@ -239,7 +264,7 @@ - + @@ -247,7 +272,7 @@ - + @@ -255,7 +280,7 @@ - + @@ -263,7 +288,7 @@ - + @@ -271,9 +296,9 @@ - - - + + + @@ -281,9 +306,9 @@ - - - + + + @@ -291,7 +316,7 @@ - + @@ -299,17 +324,25 @@ - - - + + + + + + + + - + + + + @@ -317,7 +350,7 @@ - + @@ -325,31 +358,31 @@ - + - - + + - - + + - - + + - - + + @@ -357,9 +390,41 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/ru/vm/tts.xml b/resources/templates/conf/languages/ru/vm/tts.xml index 3264b33e8b..9a8b6a0e35 100644 --- a/resources/templates/conf/languages/ru/vm/tts.xml +++ b/resources/templates/conf/languages/ru/vm/tts.xml @@ -1,8 +1,9 @@ - + + - + @@ -10,7 +11,7 @@ - + @@ -18,7 +19,7 @@ - + @@ -26,7 +27,7 @@ - + @@ -34,7 +35,7 @@ - + @@ -42,7 +43,7 @@ - + @@ -50,12 +51,12 @@ - + - + @@ -63,27 +64,25 @@ - + - - + - - + @@ -92,8 +91,8 @@ - + @@ -101,8 +100,8 @@ - + @@ -110,7 +109,7 @@ - + @@ -118,7 +117,7 @@ - + @@ -126,7 +125,7 @@ - + @@ -134,8 +133,8 @@ - + @@ -143,7 +142,7 @@ - + @@ -151,7 +150,7 @@ - + @@ -159,7 +158,7 @@ - + @@ -167,7 +166,7 @@ - + @@ -175,7 +174,7 @@ - + @@ -183,7 +182,7 @@ - + @@ -191,7 +190,7 @@ - + @@ -199,7 +198,7 @@ - + @@ -207,7 +206,7 @@ - + @@ -215,7 +214,7 @@ - + @@ -223,7 +222,7 @@ - + @@ -231,9 +230,9 @@ - + - + diff --git a/resources/templates/conf/languages/ru/vm/voicemail_ivr.xml b/resources/templates/conf/languages/ru/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/ru/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/demo/demo-ivr.xml b/resources/templates/conf/languages/sv/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/sv/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/demo/demo.xml b/resources/templates/conf/languages/sv/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/sv/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/dir/sounds.xml b/resources/templates/conf/languages/sv/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/sv/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/dir/tts.xml b/resources/templates/conf/languages/sv/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/sv/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/ivr/pin_number.xml b/resources/templates/conf/languages/sv/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/sv/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/ivr/sounds.xml b/resources/templates/conf/languages/sv/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/sv/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/ivr/wakeup.xml b/resources/templates/conf/languages/sv/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/sv/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/sv.xml b/resources/templates/conf/languages/sv/sv.xml new file mode 100644 index 0000000000..7585eb7209 --- /dev/null +++ b/resources/templates/conf/languages/sv/sv.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/vm/sounds.xml b/resources/templates/conf/languages/sv/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/sv/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/vm/tts.xml b/resources/templates/conf/languages/sv/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/sv/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/sv/vm/voicemail_ivr.xml b/resources/templates/conf/languages/sv/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/sv/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/demo/demo-ivr.xml b/resources/templates/conf/languages/tr/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/tr/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/demo/demo.xml b/resources/templates/conf/languages/tr/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/tr/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/dir/sounds.xml b/resources/templates/conf/languages/tr/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/tr/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/dir/tts.xml b/resources/templates/conf/languages/tr/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/tr/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/ivr/pin_number.xml b/resources/templates/conf/languages/tr/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/tr/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/ivr/sounds.xml b/resources/templates/conf/languages/tr/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/tr/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/ivr/wakeup.xml b/resources/templates/conf/languages/tr/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/tr/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/tr.xml b/resources/templates/conf/languages/tr/tr.xml new file mode 100644 index 0000000000..affa2b63c9 --- /dev/null +++ b/resources/templates/conf/languages/tr/tr.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/vm/sounds.xml b/resources/templates/conf/languages/tr/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/tr/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/vm/tts.xml b/resources/templates/conf/languages/tr/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/tr/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/tr/vm/voicemail_ivr.xml b/resources/templates/conf/languages/tr/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/tr/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/demo/demo-ivr.xml b/resources/templates/conf/languages/uk/demo/demo-ivr.xml new file mode 100644 index 0000000000..99f4932f21 --- /dev/null +++ b/resources/templates/conf/languages/uk/demo/demo-ivr.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/demo/demo.xml b/resources/templates/conf/languages/uk/demo/demo.xml new file mode 100644 index 0000000000..76139e5859 --- /dev/null +++ b/resources/templates/conf/languages/uk/demo/demo.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/dir/sounds.xml b/resources/templates/conf/languages/uk/dir/sounds.xml new file mode 100644 index 0000000000..fc288ff622 --- /dev/null +++ b/resources/templates/conf/languages/uk/dir/sounds.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/dir/tts.xml b/resources/templates/conf/languages/uk/dir/tts.xml new file mode 100644 index 0000000000..84007b7d52 --- /dev/null +++ b/resources/templates/conf/languages/uk/dir/tts.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/ivr/pin_number.xml b/resources/templates/conf/languages/uk/ivr/pin_number.xml new file mode 100644 index 0000000000..c07a676ff3 --- /dev/null +++ b/resources/templates/conf/languages/uk/ivr/pin_number.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/ivr/sounds.xml b/resources/templates/conf/languages/uk/ivr/sounds.xml new file mode 100644 index 0000000000..a1c9a56b81 --- /dev/null +++ b/resources/templates/conf/languages/uk/ivr/sounds.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/ivr/wakeup.xml b/resources/templates/conf/languages/uk/ivr/wakeup.xml new file mode 100644 index 0000000000..83b0d23a03 --- /dev/null +++ b/resources/templates/conf/languages/uk/ivr/wakeup.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/uk.xml b/resources/templates/conf/languages/uk/uk.xml new file mode 100644 index 0000000000..9f405558d7 --- /dev/null +++ b/resources/templates/conf/languages/uk/uk.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/vm/sounds.xml b/resources/templates/conf/languages/uk/vm/sounds.xml new file mode 100644 index 0000000000..dd1e0b97f4 --- /dev/null +++ b/resources/templates/conf/languages/uk/vm/sounds.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/vm/tts.xml b/resources/templates/conf/languages/uk/vm/tts.xml new file mode 100644 index 0000000000..9a8b6a0e35 --- /dev/null +++ b/resources/templates/conf/languages/uk/vm/tts.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/languages/uk/vm/voicemail_ivr.xml b/resources/templates/conf/languages/uk/vm/voicemail_ivr.xml new file mode 100644 index 0000000000..2ff2034164 --- /dev/null +++ b/resources/templates/conf/languages/uk/vm/voicemail_ivr.xml @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/conf/sip_profiles/external-ipv6.xml.noload b/resources/templates/conf/sip_profiles/external-ipv6.xml.noload index 583accce5e..d41740e9f4 100644 --- a/resources/templates/conf/sip_profiles/external-ipv6.xml.noload +++ b/resources/templates/conf/sip_profiles/external-ipv6.xml.noload @@ -56,7 +56,11 @@ - + + + + + diff --git a/resources/templates/conf/sip_profiles/external.xml.noload b/resources/templates/conf/sip_profiles/external.xml.noload index 054fe031b1..374224aa58 100644 --- a/resources/templates/conf/sip_profiles/external.xml.noload +++ b/resources/templates/conf/sip_profiles/external.xml.noload @@ -39,10 +39,12 @@ + - - + + + - + + diff --git a/resources/templates/conf/sip_profiles/internal-ipv6.xml.noload b/resources/templates/conf/sip_profiles/internal-ipv6.xml.noload index 14f1ed83ba..1129d7a80b 100644 --- a/resources/templates/conf/sip_profiles/internal-ipv6.xml.noload +++ b/resources/templates/conf/sip_profiles/internal-ipv6.xml.noload @@ -105,7 +105,8 @@ - + + diff --git a/resources/templates/conf/sip_profiles/internal.xml.noload b/resources/templates/conf/sip_profiles/internal.xml.noload index 04ea5e0599..96b60b5538 100644 --- a/resources/templates/conf/sip_profiles/internal.xml.noload +++ b/resources/templates/conf/sip_profiles/internal.xml.noload @@ -237,7 +237,8 @@ - + + @@ -378,5 +379,7 @@ + + diff --git a/resources/templates/conf/vars.xml b/resources/templates/conf/vars.xml index ab929122a5..9420b91508 100644 --- a/resources/templates/conf/vars.xml +++ b/resources/templates/conf/vars.xml @@ -54,6 +54,7 @@ + @@ -127,14 +128,12 @@ - - diff --git a/resources/templates/engine/smarty/Autoloader.php b/resources/templates/engine/smarty/Autoloader.php new file mode 100644 index 0000000000..e4dc450f0e --- /dev/null +++ b/resources/templates/engine/smarty/Autoloader.php @@ -0,0 +1,110 @@ + 'Smarty.class.php', 'smartybc' => 'SmartyBC.class.php',); + + /** + * Registers Smarty_Autoloader backward compatible to older installations. + * + * @param bool $prepend Whether to prepend the autoloader or not. + */ + public static function registerBC($prepend = false) + { + /** + * register the class autoloader + */ + if (!defined('SMARTY_SPL_AUTOLOAD')) { + define('SMARTY_SPL_AUTOLOAD', 0); + } + if (SMARTY_SPL_AUTOLOAD + && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false + ) { + $registeredAutoLoadFunctions = spl_autoload_functions(); + if (!isset($registeredAutoLoadFunctions[ 'spl_autoload' ])) { + spl_autoload_register(); + } + } else { + self::register($prepend); + } + } + + /** + * Registers Smarty_Autoloader as an SPL autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not. + */ + public static function register($prepend = false) + { + self::$SMARTY_DIR = defined('SMARTY_DIR') ? SMARTY_DIR : dirname(__FILE__) . DIRECTORY_SEPARATOR; + self::$SMARTY_SYSPLUGINS_DIR = defined('SMARTY_SYSPLUGINS_DIR') ? SMARTY_SYSPLUGINS_DIR : + self::$SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR; + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend); + } else { + spl_autoload_register(array(__CLASS__, 'autoload')); + } + } + + /** + * Handles auto loading of classes. + * + * @param string $class A class name. + */ + public static function autoload($class) + { + if ($class[ 0 ] !== 'S' && strpos($class, 'Smarty') !== 0) { + return; + } + $_class = strtolower($class); + if (isset(self::$rootClasses[ $_class ])) { + $file = self::$SMARTY_DIR . self::$rootClasses[ $_class ]; + if (is_file($file)) { + include $file; + } + } else { + $file = self::$SMARTY_SYSPLUGINS_DIR . $_class . '.php'; + if (is_file($file)) { + include $file; + } + } + return; + } +} diff --git a/resources/templates/engine/smarty/Smarty.license.txt b/resources/templates/engine/smarty/LICENSE similarity index 93% rename from resources/templates/engine/smarty/Smarty.license.txt rename to resources/templates/engine/smarty/LICENSE index 02bbb60bc4..fb8ca6c6fb 100644 --- a/resources/templates/engine/smarty/Smarty.license.txt +++ b/resources/templates/engine/smarty/LICENSE @@ -1,3 +1,17 @@ +Smarty: the PHP compiling template engine + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU Lesser General Public License below for more details. + + GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 @@ -162,4 +176,4 @@ General Public License ever published by the Free Software Foundation. whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the -Library. \ No newline at end of file +Library. diff --git a/resources/templates/engine/smarty/README b/resources/templates/engine/smarty/README index b6a5d84ca5..9a71519bd7 100644 --- a/resources/templates/engine/smarty/README +++ b/resources/templates/engine/smarty/README @@ -1,4 +1,4 @@ -Smarty 3.1.15 +Smarty 3.x Author: Monte Ohrt Author: Uwe Tews @@ -260,12 +260,12 @@ Example: {$object->method1($x)->method2($y)} {for} tag added for looping (replacement for {section} tag): {for $x=0, $y=count($foo); $x<$y; $x++} .... {/for} Any number of statements can be used separated by comma as the first -inital expression at {for}. +initial expression at {for}. {for $x = $start to $end step $step} ... {/for}is in the SVN now . You can use also {for $x = $start to $end} ... {/for} -In this case the step value will be automaticall 1 or -1 depending on the start and end values. +In this case the step value will be automatically 1 or -1 depending on the start and end values. Instead of $start and $end you can use any valid expression. Inside the loop the following special vars can be accessed: $x@iteration = number of iteration @@ -460,19 +460,20 @@ included template. PLUGINS ======= -Smarty3 are following the same coding rules as in Smarty2. -The only difference is that the template object is passed as additional third parameter. +Smarty 3 plugins follow the same coding rules as in Smarty 2. +The main difference is that the template object is now passed in place of the smarty object. +The smarty object can be still be accessed through $template->smarty. -smarty_plugintype_name (array $params, object $smarty, object $template) +smarty_plugintype_name (array $params, Smarty_Internal_Template $template) -The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals. +The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty 2 internals. TEMPLATE INHERITANCE: ===================== With template inheritance you can define blocks, which are areas that can be -overriden by child templates, so your templates could look like this: +overridden by child templates, so your templates could look like this: parent.tpl: @@ -507,8 +508,8 @@ grandchild.tpl: We redefined all the blocks here, however in the title block we used {$smarty.block.parent}, which tells Smarty to insert the default content from the parent template in its place. -The content block was overriden to display the image files, and page-title has also be -overriden to display a completely different title. +The content block was overridden to display the image files, and page-title has also be +overridden to display a completely different title. If we render grandchild.tpl we will get this: diff --git a/resources/templates/engine/smarty/Smarty.class.php b/resources/templates/engine/smarty/Smarty.class.php index 732b2df316..a8969926b1 100644 --- a/resources/templates/engine/smarty/Smarty.class.php +++ b/resources/templates/engine/smarty/Smarty.class.php @@ -2,7 +2,6 @@ /** * Project: Smarty: the PHP compiling template engine * File: Smarty.class.php - * SVN: $Id: Smarty.class.php 4778 2013-09-17 20:44:41Z Uwe.Tews@googlemail.com $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,47 +16,50 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * For questions, help, comments, discussion, etc., please join the * Smarty mailing list. Send a blank e-mail to * smarty-discussion-subscribe@googlegroups.com * - * @link http://www.smarty.net/ - * @copyright 2008 New Digital Group, Inc. - * @author Monte Ohrt - * @author Uwe Tews - * @author Rodney Rehm - * @package Smarty - * @version 3.1.15 + * @link http://www.smarty.net/ + * @copyright 2018 New Digital Group, Inc. + * @copyright 2018 Uwe Tews + * @author Monte Ohrt + * @author Uwe Tews + * @author Rodney Rehm + * @package Smarty + * @version 3.1.33 */ - -/** - * define shorthand directory separator constant - */ -if (!defined('DS')) { - define('DS', DIRECTORY_SEPARATOR); -} - /** * set SMARTY_DIR to absolute path to Smarty library files. * Sets SMARTY_DIR only if user application has not already defined it. */ if (!defined('SMARTY_DIR')) { - define('SMARTY_DIR', dirname(__FILE__) . DS); + /** + * + */ + define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR); } - /** * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. */ if (!defined('SMARTY_SYSPLUGINS_DIR')) { - define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); + /** + * + */ + define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DIRECTORY_SEPARATOR); } if (!defined('SMARTY_PLUGINS_DIR')) { - define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); + /** + * + */ + define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DIRECTORY_SEPARATOR); } if (!defined('SMARTY_MBSTRING')) { - define('SMARTY_MBSTRING', function_exists('mb_split')); + /** + * + */ + define('SMARTY_MBSTRING', function_exists('mb_get_info')); } if (!defined('SMARTY_RESOURCE_CHAR_SET')) { // UTF-8 can only be done properly when mbstring is available! @@ -72,124 +74,120 @@ if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { */ define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); } - /** - * register the class autoloader + * Load Smarty_Autoloader */ -if (!defined('SMARTY_SPL_AUTOLOAD')) { - define('SMARTY_SPL_AUTOLOAD', 0); +if (!class_exists('Smarty_Autoloader')) { + include dirname(__FILE__) . '/bootstrap.php'; } - -if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) { - $registeredAutoLoadFunctions = spl_autoload_functions(); - if (!isset($registeredAutoLoadFunctions['spl_autoload'])) { - spl_autoload_register(); - } -} else { - spl_autoload_register('smartyAutoload'); -} - /** * Load always needed external class files */ -include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_data.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_templatebase.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_template.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_resource.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_resource_file.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_cacheresource.php'; -include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_cacheresource_file.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_data.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_extension_handler.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_templatebase.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_template.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_resource.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_variable.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_template_source.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_template_resource_base.php'; +require_once SMARTY_SYSPLUGINS_DIR . 'smarty_internal_resource_file.php'; /** * This is the main Smarty class + * * @package Smarty + * + * The following methods will be dynamically loaded by the extension handler when they are called. + * They are located in a corresponding Smarty_Internal_Method_xxxx class + * + * @method int clearAllCache(int $exp_time = null, string $type = null) + * @method int clearCache(string $template_name, string $cache_id = null, string $compile_id = null, int $exp_time = null, string $type = null) + * @method int compileAllTemplates(string $extension = '.tpl', bool $force_compile = false, int $time_limit = 0, $max_errors = null) + * @method int compileAllConfig(string $extension = '.conf', bool $force_compile = false, int $time_limit = 0, $max_errors = null) + * @method int clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) */ class Smarty extends Smarty_Internal_TemplateBase { - /**#@+ - * constant definitions - */ - /** * smarty version */ - const SMARTY_VERSION = 'Smarty-3.1.15'; - + const SMARTY_VERSION = '3.1.33'; /** * define variable scopes */ - const SCOPE_LOCAL = 0; - const SCOPE_PARENT = 1; - const SCOPE_ROOT = 2; - const SCOPE_GLOBAL = 3; + const SCOPE_LOCAL = 1; + const SCOPE_PARENT = 2; + const SCOPE_TPL_ROOT = 4; + const SCOPE_ROOT = 8; + const SCOPE_SMARTY = 16; + const SCOPE_GLOBAL = 32; /** * define caching modes */ - const CACHING_OFF = 0; + const CACHING_OFF = 0; const CACHING_LIFETIME_CURRENT = 1; - const CACHING_LIFETIME_SAVED = 2; + const CACHING_LIFETIME_SAVED = 2; /** - * define constant for clearing cache files be saved expiration datees + * define constant for clearing cache files be saved expiration dates */ const CLEAR_EXPIRED = -1; - /** * define compile check modes */ - const COMPILECHECK_OFF = 0; - const COMPILECHECK_ON = 1; + const COMPILECHECK_OFF = 0; + const COMPILECHECK_ON = 1; const COMPILECHECK_CACHEMISS = 2; + /** + * define debug modes + */ + const DEBUG_OFF = 0; + const DEBUG_ON = 1; + const DEBUG_INDIVIDUAL = 2; /** * modes for handling of "" tags in templates. */ const PHP_PASSTHRU = 0; //-> print tags as plain text - const PHP_QUOTE = 1; //-> escape tags as entities - const PHP_REMOVE = 2; //-> escape tags as entities - const PHP_ALLOW = 3; //-> escape tags as entities + const PHP_QUOTE = 1; //-> escape tags as entities + const PHP_REMOVE = 2; //-> escape tags as entities + const PHP_ALLOW = 3; //-> escape tags as entities /** * filter types */ - const FILTER_POST = 'post'; - const FILTER_PRE = 'pre'; - const FILTER_OUTPUT = 'output'; + const FILTER_POST = 'post'; + const FILTER_PRE = 'pre'; + const FILTER_OUTPUT = 'output'; const FILTER_VARIABLE = 'variable'; /** * plugin types */ - const PLUGIN_FUNCTION = 'function'; - const PLUGIN_BLOCK = 'block'; - const PLUGIN_COMPILER = 'compiler'; - const PLUGIN_MODIFIER = 'modifier'; + const PLUGIN_FUNCTION = 'function'; + const PLUGIN_BLOCK = 'block'; + const PLUGIN_COMPILER = 'compiler'; + const PLUGIN_MODIFIER = 'modifier'; const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; - /**#@-*/ - /** * assigned global tpl vars */ public static $global_tpl_vars = array(); - /** - * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors() - */ - public static $_previous_error_handler = null; - /** - * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() - */ - public static $_muted_directories = array(); /** * Flag denoting if Multibyte String functions are available */ public static $_MBSTRING = SMARTY_MBSTRING; + /** * The character set to adhere to (e.g. "UTF-8") */ public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + /** * The date format to be used internally * (accepts date() and strftime()) */ public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; + /** * Flag denoting if PCRE should run in UTF-8 mode */ @@ -200,709 +198,644 @@ class Smarty extends Smarty_Internal_TemplateBase */ public static $_IS_WINDOWS = false; - /**#@+ - * variables - */ - /** - * auto literal on delimiters with whitspace + * auto literal on delimiters with whitespace + * * @var boolean */ public $auto_literal = true; + /** * display error on not assigned variables + * * @var boolean */ public $error_unassigned = false; + /** - * look up relative filepaths in include_path + * look up relative file path in include_path + * * @var boolean */ public $use_include_path = false; + /** - * template directory - * @var array + * flag if template_dir is normalized + * + * @var bool */ - private $template_dir = array(); + public $_templateDirNormalized = false; + /** * joined template directory string used in cache keys + * * @var string */ - public $joined_template_dir = null; + public $_joined_template_dir = null; + + /** + * flag if config_dir is normalized + * + * @var bool + */ + public $_configDirNormalized = false; + /** * joined config directory string used in cache keys + * * @var string */ - public $joined_config_dir = null; + public $_joined_config_dir = null; + /** * default template handler + * * @var callable */ public $default_template_handler_func = null; + /** * default config handler + * * @var callable */ public $default_config_handler_func = null; + /** * default plugin handler + * * @var callable */ public $default_plugin_handler_func = null; + /** - * compile directory - * @var string + * flag if template_dir is normalized + * + * @var bool */ - private $compile_dir = null; + public $_compileDirNormalized = false; + /** - * plugins directory - * @var array + * flag if plugins_dir is normalized + * + * @var bool */ - private $plugins_dir = array(); + public $_pluginsDirNormalized = false; + /** - * cache directory - * @var string + * flag if template_dir is normalized + * + * @var bool */ - private $cache_dir = null; - /** - * config directory - * @var array - */ - private $config_dir = array(); + public $_cacheDirNormalized = false; + /** * force template compiling? + * * @var boolean */ public $force_compile = false; - /** - * check template for modifications? - * @var boolean - */ - public $compile_check = true; + /** * use sub dirs for compiled/cached files? + * * @var boolean */ public $use_sub_dirs = false; + /** * allow ambiguous resources (that are made unique by the resource handler) + * * @var boolean */ public $allow_ambiguous_resources = false; - /** - * caching enabled - * @var boolean - */ - public $caching = false; + /** * merge compiled includes + * * @var boolean */ public $merge_compiled_includes = false; - /** - * cache lifetime in seconds - * @var integer - */ - public $cache_lifetime = 3600; + + /* + * flag for behaviour when extends: resource and {extends} tag are used simultaneous + * if false disable execution of {extends} in templates called by extends resource. + * (behaviour as versions < 3.1.28) + * + * @var boolean + */ + public $extends_recursion = true; + /** * force cache file creation + * * @var boolean */ public $force_cache = false; - /** - * Set this if you want different sets of cache files for the same - * templates. - * - * @var string - */ - public $cache_id = null; - /** - * Set this if you want different sets of compiled files for the same - * templates. - * - * @var string - */ - public $compile_id = null; + /** * template left-delimiter + * * @var string */ public $left_delimiter = "{"; + /** * template right-delimiter + * * @var string */ public $right_delimiter = "}"; - /**#@+ - * security + + /** + * array of strings which shall be treated as literal by compiler + * + * @var array string */ + public $literals = array(); + /** * class name - * * This should be instance of Smarty_Security. * * @var string * @see Smarty_Security */ public $security_class = 'Smarty_Security'; + /** * implementation of security class * * @var Smarty_Security */ public $security_policy = null; + /** * controls handling of PHP-blocks * * @var integer */ public $php_handling = self::PHP_PASSTHRU; + /** * controls if the php template file resource is allowed * * @var bool */ public $allow_php_templates = false; - /** - * Should compiled-templates be prevented from being called directly? - * - * {@internal - * Currently used by Smarty_Internal_Template only. - * }} - * - * @var boolean - */ - public $direct_access_security = true; - /**#@-*/ + /** * debug mode - * * Setting this to true enables the debug-console. * * @var boolean */ public $debugging = false; + /** * This determines if debugging is enable-able from the browser. *
    *
  • NONE => no debugging control allowed
  • *
  • URL => enable debugging when SMARTY_DEBUG is found in the URL.
  • *
+ * * @var string */ public $debugging_ctrl = 'NONE'; + /** * Name of debugging URL-param. - * * Only used when $debugging_ctrl is set to 'URL'. * The name of the URL-parameter that activates debugging. * - * @var type + * @var string */ public $smarty_debug_id = 'SMARTY_DEBUG'; + /** * Path of debug template. + * * @var string */ public $debug_tpl = null; + /** * When set, smarty uses this value as error_reporting-level. + * * @var int */ public $error_reporting = null; - /** - * Internal flag for getTags() - * @var boolean - */ - public $get_used_tags = false; - - /**#@+ - * config var settings - */ /** * Controls whether variables with the same name overwrite each other. + * * @var boolean */ public $config_overwrite = true; + /** * Controls whether config values of on/true/yes and off/false/no get converted to boolean. + * * @var boolean */ public $config_booleanize = true; + /** * Controls whether hidden config sections/vars are read from the file. + * * @var boolean */ public $config_read_hidden = false; - /**#@-*/ - - /**#@+ - * resource locking - */ - /** * locking concurrent compiles + * * @var boolean */ public $compile_locking = true; + /** - * Controls whether cache resources should emply locking mechanism + * Controls whether cache resources should use locking mechanism + * * @var boolean */ public $cache_locking = false; + /** * seconds to wait for acquiring a lock before ignoring the write lock + * * @var float */ public $locking_timeout = 10; - /**#@-*/ - - /** - * global template functions - * @var array - */ - public $template_functions = array(); /** * resource type used if none given - * * Must be an valid key of $registered_resources. + * * @var string */ public $default_resource_type = 'file'; + /** * caching type - * * Must be an element of $cache_resource_types. * * @var string */ public $caching_type = 'file'; - /** - * internal config properties - * @var array - */ - public $properties = array(); + /** * config type + * * @var string */ public $default_config_type = 'file'; - /** - * cached template objects - * @var array - */ - public $template_objects = array(); + /** * check If-Modified-Since headers + * * @var boolean */ public $cache_modified_check = false; + /** * registered plugins + * * @var array */ public $registered_plugins = array(); - /** - * plugin search order - * @var array - */ - public $plugin_search_order = array('function', 'block', 'compiler', 'class'); + /** * registered objects + * * @var array */ public $registered_objects = array(); + /** * registered classes + * * @var array */ public $registered_classes = array(); + /** * registered filters + * * @var array */ public $registered_filters = array(); + /** * registered resources + * * @var array */ public $registered_resources = array(); - /** - * resource handler cache - * @var array - */ - public $_resource_handlers = array(); + /** * registered cache resources + * * @var array */ public $registered_cache_resources = array(); - /** - * cache resource handler cache - * @var array - */ - public $_cacheresource_handlers = array(); + /** * autoload filter + * * @var array */ public $autoload_filters = array(); + /** * default modifier + * * @var array */ public $default_modifiers = array(); + /** * autoescape variable output + * * @var boolean */ public $escape_html = false; - /** - * global internal smarty vars - * @var array - */ - public static $_smarty_vars = array(); + /** * start time for execution time calculation + * * @var int */ public $start_time = 0; - /** - * default file permissions - * @var int - */ - public $_file_perms = 0644; - /** - * default dir permissions - * @var int - */ - public $_dir_perms = 0771; - /** - * block tag hierarchy - * @var array - */ - public $_tag_stack = array(); - /** - * self pointer to Smarty object - * @var Smarty - */ - public $smarty; + /** * required by the compiler for BC + * * @var string */ public $_current_file = null; + /** * internal flag to enable parser debugging + * * @var bool */ public $_parserdebug = false; + /** - * Saved parameter of merged templates during compilation + * This object type (Smarty = 1, template = 2, data = 4) + * + * @var int + */ + public $_objType = 1; + + /** + * Debug object + * + * @var Smarty_Internal_Debug + */ + public $_debug = null; + + /** + * template directory * * @var array */ - public $merged_templates_func = array(); - /**#@-*/ + protected $template_dir = array('./templates/'); + + /** + * flags for normalized template directory entries + * + * @var array + */ + protected $_processedTemplateDir = array(); + + /** + * config directory + * + * @var array + */ + protected $config_dir = array('./configs/'); + + /** + * flags for normalized template directory entries + * + * @var array + */ + protected $_processedConfigDir = array(); + + /** + * compile directory + * + * @var string + */ + protected $compile_dir = './templates_c/'; + + /** + * plugins directory + * + * @var array + */ + protected $plugins_dir = array(); + + /** + * cache directory + * + * @var string + */ + protected $cache_dir = './cache/'; + + /** + * removed properties + * + * @var string[] + */ + protected $obsoleteProperties = array( + 'resource_caching', 'template_resource_caching', 'direct_access_security', + '_dir_perms', '_file_perms', 'plugin_search_order', + 'inheritance_merge_compiled_includes', 'resource_cache_mode', + ); + + /** + * List of private properties which will call getter/setter on a direct access + * + * @var string[] + */ + protected $accessMap = array( + 'template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', + 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', + 'cache_dir' => 'CacheDir', + ); /** * Initialize new Smarty object - * */ public function __construct() { - // selfpointer needed by some other class methods - $this->smarty = $this; + $this->_clearTemplateCache(); + parent::__construct(); if (is_callable('mb_internal_encoding')) { mb_internal_encoding(Smarty::$_CHARSET); } $this->start_time = microtime(true); - // set default dirs - $this->setTemplateDir('.' . DS . 'templates' . DS) - ->setCompileDir('.' . DS . 'templates_c' . DS) - ->setPluginsDir(SMARTY_PLUGINS_DIR) - ->setCacheDir('.' . DS . 'cache' . DS) - ->setConfigDir('.' . DS . 'configs' . DS); - - $this->debug_tpl = 'file:' . dirname(__FILE__) . '/debug.tpl'; - if (isset($_SERVER['SCRIPT_NAME'])) { - $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); + if (isset($_SERVER[ 'SCRIPT_NAME' ])) { + Smarty::$global_tpl_vars[ 'SCRIPT_NAME' ] = new Smarty_Variable($_SERVER[ 'SCRIPT_NAME' ]); + } + // Check if we're running on windows + Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 + if (Smarty::$_CHARSET !== 'UTF-8') { + Smarty::$_UTF8_MODIFIER = ''; } } /** - * Class destructor + * Enable error handler to mute expected messages + * + * @return boolean + * @deprecated */ - public function __destruct() + public static function muteExpectedErrors() { - // intentionally left blank + return Smarty_Internal_ErrorHandler::muteExpectedErrors(); } /** - * <> set selfpointer on cloned object + * Disable error handler muting expected messages + * + * @deprecated */ - public function __clone() + public static function unmuteExpectedErrors() { - $this->smarty = $this; - } - - /** - * <> Generic getter. - * - * Calls the appropriate getter function. - * Issues an E_USER_NOTICE if no valid getter is found. - * - * @param string $name property name - * @return mixed - */ - public function __get($name) - { - $allowed = array( - 'template_dir' => 'getTemplateDir', - 'config_dir' => 'getConfigDir', - 'plugins_dir' => 'getPluginsDir', - 'compile_dir' => 'getCompileDir', - 'cache_dir' => 'getCacheDir', - ); - - if (isset($allowed[$name])) { - return $this->{$allowed[$name]}(); - } else { - trigger_error('Undefined property: '. get_class($this) .'::$'. $name, E_USER_NOTICE); - } - } - - /** - * <> Generic setter. - * - * Calls the appropriate setter function. - * Issues an E_USER_NOTICE if no valid setter is found. - * - * @param string $name property name - * @param mixed $value parameter passed to setter - */ - public function __set($name, $value) - { - $allowed = array( - 'template_dir' => 'setTemplateDir', - 'config_dir' => 'setConfigDir', - 'plugins_dir' => 'setPluginsDir', - 'compile_dir' => 'setCompileDir', - 'cache_dir' => 'setCacheDir', - ); - - if (isset($allowed[$name])) { - $this->{$allowed[$name]}($value); - } else { - trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); - } + restore_error_handler(); } /** * Check if a template resource exists * - * @param string $resource_name template name - * @return boolean status + * @param string $resource_name template name + * + * @return bool status + * @throws \SmartyException */ public function templateExists($resource_name) { - // create template object - $save = $this->template_objects; - $tpl = new $this->template_class($resource_name, $this); - // check if it does exists - $result = $tpl->source->exists; - $this->template_objects = $save; - - return $result; - } - - /** - * Returns a single or all global variables - * - * @param object $smarty - * @param string $varname variable name or null - * @return string variable value or or array of variables - */ - public function getGlobal($varname = null) - { - if (isset($varname)) { - if (isset(self::$global_tpl_vars[$varname])) { - return self::$global_tpl_vars[$varname]->value; - } else { - return ''; - } - } else { - $_result = array(); - foreach (self::$global_tpl_vars AS $key => $var) { - $_result[$key] = $var->value; - } - - return $_result; - } - } - - /** - * Empty cache folder - * - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - public function clearAllCache($exp_time = null, $type = null) - { - // load cache resource and call clearAll - $_cache_resource = Smarty_CacheResource::load($this, $type); - Smarty_CacheResource::invalidLoadedCache($this); - - return $_cache_resource->clearAll($this, $exp_time); - } - - /** - * Empty cache for a specific template - * - * @param string $template_name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) - { - // load cache resource and call clear - $_cache_resource = Smarty_CacheResource::load($this, $type); - Smarty_CacheResource::invalidLoadedCache($this); - - return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time); + // create source object + $source = Smarty_Template_Source::load(null, $this, $resource_name); + return $source->exists; } /** * Loads security class and enables security * - * @param string|Smarty_Security $security_class if a string is used, it must be class-name + * @param string|Smarty_Security $security_class if a string is used, it must be class-name + * * @return Smarty current Smarty instance for chaining - * @throws SmartyException when an invalid class name is provided + * @throws \SmartyException */ public function enableSecurity($security_class = null) { - if ($security_class instanceof Smarty_Security) { - $this->security_policy = $security_class; - - return $this; - } elseif (is_object($security_class)) { - throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security."); - } - if ($security_class == null) { - $security_class = $this->security_class; - } - if (!class_exists($security_class)) { - throw new SmartyException("Security class '$security_class' is not defined"); - } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) { - throw new SmartyException("Class '$security_class' must extend Smarty_Security."); - } else { - $this->security_policy = new $security_class($this); - } - + Smarty_Security::enableSecurity($this, $security_class); return $this; } /** * Disable security + * * @return Smarty current Smarty instance for chaining */ public function disableSecurity() { $this->security_policy = null; - - return $this; - } - - /** - * Set template directory - * - * @param string|array $template_dir directory(s) of template sources - * @return Smarty current Smarty instance for chaining - */ - public function setTemplateDir($template_dir) - { - $this->template_dir = array(); - foreach ((array) $template_dir as $k => $v) { - $this->template_dir[$k] = rtrim($v, '/\\') . DS; - } - - $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir); - return $this; } /** * Add template directory(s) * - * @param string|array $template_dir directory(s) of template sources - * @param string $key of the array element to assign the template dir to + * @param string|array $template_dir directory(s) of template sources + * @param string $key of the array element to assign the template dir to + * @param bool $isConfig true for config_dir + * * @return Smarty current Smarty instance for chaining - * @throws SmartyException when the given template directory is not valid */ - public function addTemplateDir($template_dir, $key=null) + public function addTemplateDir($template_dir, $key = null, $isConfig = false) { - // make sure we're dealing with an array - $this->template_dir = (array) $this->template_dir; - + if ($isConfig) { + $processed = &$this->_processedConfigDir; + $dir = &$this->config_dir; + $this->_configDirNormalized = false; + } else { + $processed = &$this->_processedTemplateDir; + $dir = &$this->template_dir; + $this->_templateDirNormalized = false; + } if (is_array($template_dir)) { foreach ($template_dir as $k => $v) { if (is_int($k)) { // indexes are not merged but appended - $this->template_dir[] = rtrim($v, '/\\') . DS; + $dir[] = $v; } else { // string indexes are overridden - $this->template_dir[$k] = rtrim($v, '/\\') . DS; + $dir[ $k ] = $v; + unset($processed[ $key ]); } } - } elseif ($key !== null) { - // override directory at specified index - $this->template_dir[$key] = rtrim($template_dir, '/\\') . DS; } else { - // append new directory - $this->template_dir[] = rtrim($template_dir, '/\\') . DS; + if ($key !== null) { + // override directory at specified index + $dir[ $key ] = $template_dir; + unset($processed[ $key ]); + } else { + // append new directory + $dir[] = $template_dir; + } } - $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir); - return $this; } /** * Get template directories * - * @param mixed index of directory to get, null to get all - * @return array|string list of template directories, or directory of $index + * @param mixed $index index of directory to get, null to get all + * @param bool $isConfig true for config_dir + * + * @return array list of template directories, or directory of $index */ - public function getTemplateDir($index=null) + public function getTemplateDir($index = null, $isConfig = false) { - if ($index !== null) { - return isset($this->template_dir[$index]) ? $this->template_dir[$index] : null; + if ($isConfig) { + $dir = &$this->config_dir; + } else { + $dir = &$this->template_dir; } - - return (array) $this->template_dir; + if ($isConfig ? !$this->_configDirNormalized : !$this->_templateDirNormalized) { + $this->_normalizeTemplateConfig($isConfig); + } + if ($index !== null) { + return isset($dir[ $index ]) ? $dir[ $index ] : null; + } + return $dir; } /** - * Set config directory + * Set template directory * - * @param string|array $template_dir directory(s) of configuration sources - * @return Smarty current Smarty instance for chaining + * @param string|array $template_dir directory(s) of template sources + * @param bool $isConfig true for config_dir + * + * @return \Smarty current Smarty instance for chaining */ - public function setConfigDir($config_dir) + public function setTemplateDir($template_dir, $isConfig = false) { - $this->config_dir = array(); - foreach ((array) $config_dir as $k => $v) { - $this->config_dir[$k] = rtrim($v, '/\\') . DS; + if ($isConfig) { + $this->config_dir = array(); + $this->_processedConfigDir = array(); + } else { + $this->template_dir = array(); + $this->_processedTemplateDir = array(); } - - $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir); - + $this->addTemplateDir($template_dir, null, $isConfig); return $this; } @@ -910,97 +843,53 @@ class Smarty extends Smarty_Internal_TemplateBase * Add config directory(s) * * @param string|array $config_dir directory(s) of config sources - * @param string key of the array element to assign the config dir to + * @param mixed $key key of the array element to assign the config dir to + * * @return Smarty current Smarty instance for chaining */ - public function addConfigDir($config_dir, $key=null) + public function addConfigDir($config_dir, $key = null) { - // make sure we're dealing with an array - $this->config_dir = (array) $this->config_dir; - - if (is_array($config_dir)) { - foreach ($config_dir as $k => $v) { - if (is_int($k)) { - // indexes are not merged but appended - $this->config_dir[] = rtrim($v, '/\\') . DS; - } else { - // string indexes are overridden - $this->config_dir[$k] = rtrim($v, '/\\') . DS; - } - } - } elseif ($key !== null) { - // override directory at specified index - $this->config_dir[$key] = rtrim($config_dir, '/\\') . DS; - } else { - // append new directory - $this->config_dir[] = rtrim($config_dir, '/\\') . DS; - } - - $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir); - - return $this; + return $this->addTemplateDir($config_dir, $key, true); } /** * Get config directory * - * @param mixed index of directory to get, null to get all - * @return array|string configuration directory + * @param mixed $index index of directory to get, null to get all + * + * @return array configuration directory */ - public function getConfigDir($index=null) + public function getConfigDir($index = null) { - if ($index !== null) { - return isset($this->config_dir[$index]) ? $this->config_dir[$index] : null; - } - - return (array) $this->config_dir; + return $this->getTemplateDir($index, true); } /** - * Set plugins directory + * Set config directory + * + * @param $config_dir * - * @param string|array $plugins_dir directory(s) of plugins * @return Smarty current Smarty instance for chaining */ - public function setPluginsDir($plugins_dir) + public function setConfigDir($config_dir) { - $this->plugins_dir = array(); - foreach ((array) $plugins_dir as $k => $v) { - $this->plugins_dir[$k] = rtrim($v, '/\\') . DS; - } - - return $this; + return $this->setTemplateDir($config_dir, true); } /** * Adds directory of plugin files * - * @param object $smarty - * @param string $ |array $ plugins folder + * @param null|array|string $plugins_dir + * * @return Smarty current Smarty instance for chaining */ public function addPluginsDir($plugins_dir) { - // make sure we're dealing with an array - $this->plugins_dir = (array) $this->plugins_dir; - - if (is_array($plugins_dir)) { - foreach ($plugins_dir as $k => $v) { - if (is_int($k)) { - // indexes are not merged but appended - $this->plugins_dir[] = rtrim($v, '/\\') . DS; - } else { - // string indexes are overridden - $this->plugins_dir[$k] = rtrim($v, '/\\') . DS; - } - } - } else { - // append new directory - $this->plugins_dir[] = rtrim($plugins_dir, '/\\') . DS; + if (empty($this->plugins_dir)) { + $this->plugins_dir[] = SMARTY_PLUGINS_DIR; } - - $this->plugins_dir = array_unique($this->plugins_dir); - + $this->plugins_dir = array_merge($this->plugins_dir, (array)$plugins_dir); + $this->_pluginsDirNormalized = false; return $this; } @@ -1011,22 +900,34 @@ class Smarty extends Smarty_Internal_TemplateBase */ public function getPluginsDir() { - return (array) $this->plugins_dir; + if (empty($this->plugins_dir)) { + $this->plugins_dir[] = SMARTY_PLUGINS_DIR; + $this->_pluginsDirNormalized = false; + } + if (!$this->_pluginsDirNormalized) { + if (!is_array($this->plugins_dir)) { + $this->plugins_dir = (array)$this->plugins_dir; + } + foreach ($this->plugins_dir as $k => $v) { + $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, '/\\') . DIRECTORY_SEPARATOR, true); + } + $this->_cache[ 'plugin_files' ] = array(); + $this->_pluginsDirNormalized = true; + } + return $this->plugins_dir; } /** - * Set compile directory + * Set plugins directory * - * @param string $compile_dir directory to store compiled templates in - * @return Smarty current Smarty instance for chaining + * @param string|array $plugins_dir directory(s) of plugins + * + * @return Smarty current Smarty instance for chaining */ - public function setCompileDir($compile_dir) + public function setPluginsDir($plugins_dir) { - $this->compile_dir = rtrim($compile_dir, '/\\') . DS; - if (!isset(Smarty::$_muted_directories[$this->compile_dir])) { - Smarty::$_muted_directories[$this->compile_dir] = null; - } - + $this->plugins_dir = (array)$plugins_dir; + $this->_pluginsDirNormalized = false; return $this; } @@ -1037,22 +938,23 @@ class Smarty extends Smarty_Internal_TemplateBase */ public function getCompileDir() { + if (!$this->_compileDirNormalized) { + $this->_normalizeDir('compile_dir', $this->compile_dir); + $this->_compileDirNormalized = true; + } return $this->compile_dir; } /** - * Set cache directory * - * @param string $cache_dir directory to store cached templates in + * @param string $compile_dir directory to store compiled templates in + * * @return Smarty current Smarty instance for chaining */ - public function setCacheDir($cache_dir) + public function setCompileDir($compile_dir) { - $this->cache_dir = rtrim($cache_dir, '/\\') . DS; - if (!isset(Smarty::$_muted_directories[$this->cache_dir])) { - Smarty::$_muted_directories[$this->cache_dir] = null; - } - + $this->_normalizeDir('compile_dir', $compile_dir); + $this->_compileDirNormalized = true; return $this; } @@ -1063,513 +965,461 @@ class Smarty extends Smarty_Internal_TemplateBase */ public function getCacheDir() { + if (!$this->_cacheDirNormalized) { + $this->_normalizeDir('cache_dir', $this->cache_dir); + $this->_cacheDirNormalized = true; + } return $this->cache_dir; } /** - * Set default modifiers + * Set cache directory * - * @param array|string $modifiers modifier or list of modifiers to set - * @return Smarty current Smarty instance for chaining - */ - public function setDefaultModifiers($modifiers) - { - $this->default_modifiers = (array) $modifiers; - - return $this; - } - - /** - * Add default modifiers + * @param string $cache_dir directory to store cached templates in * - * @param array|string $modifiers modifier or list of modifiers to add - * @return Smarty current Smarty instance for chaining - */ - public function addDefaultModifiers($modifiers) - { - if (is_array($modifiers)) { - $this->default_modifiers = array_merge($this->default_modifiers, $modifiers); - } else { - $this->default_modifiers[] = $modifiers; - } - - return $this; - } - - /** - * Get default modifiers - * - * @return array list of default modifiers - */ - public function getDefaultModifiers() - { - return $this->default_modifiers; - } - - - /** - * Set autoload filters - * - * @param array $filters filters to load automatically - * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types * @return Smarty current Smarty instance for chaining */ - public function setAutoloadFilters($filters, $type=null) + public function setCacheDir($cache_dir) { - if ($type !== null) { - $this->autoload_filters[$type] = (array) $filters; - } else { - $this->autoload_filters = (array) $filters; - } - - return $this; - } - - /** - * Add autoload filters - * - * @param array $filters filters to load automatically - * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types - * @return Smarty current Smarty instance for chaining - */ - public function addAutoloadFilters($filters, $type=null) - { - if ($type !== null) { - if (!empty($this->autoload_filters[$type])) { - $this->autoload_filters[$type] = array_merge($this->autoload_filters[$type], (array) $filters); - } else { - $this->autoload_filters[$type] = (array) $filters; - } - } else { - foreach ((array) $filters as $key => $value) { - if (!empty($this->autoload_filters[$key])) { - $this->autoload_filters[$key] = array_merge($this->autoload_filters[$key], (array) $value); - } else { - $this->autoload_filters[$key] = (array) $value; - } - } - } - - return $this; - } - - /** - * Get autoload filters - * - * @param string $type type of filter to get autoloads for. Defaults to all autoload filters - * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified - */ - public function getAutoloadFilters($type=null) - { - if ($type !== null) { - return isset($this->autoload_filters[$type]) ? $this->autoload_filters[$type] : array(); - } - - return $this->autoload_filters; - } - - /** - * return name of debugging template - * - * @return string - */ - public function getDebugTemplate() - { - return $this->debug_tpl; - } - - /** - * set the debug template - * - * @param string $tpl_name - * @return Smarty current Smarty instance for chaining - * @throws SmartyException if file is not readable - */ - public function setDebugTemplate($tpl_name) - { - if (!is_readable($tpl_name)) { - throw new SmartyException("Unknown file '{$tpl_name}'"); - } - $this->debug_tpl = $tpl_name; - + $this->_normalizeDir('cache_dir', $cache_dir); + $this->_cacheDirNormalized = true; return $this; } /** * creates a template object * - * @param string $template the resource handle of the template file - * @param mixed $cache_id cache id to be used with this template - * @param mixed $compile_id compile id to be used with this template - * @param object $parent next higher level of Smarty variables - * @param boolean $do_clone flag is Smarty object shall be cloned - * @return object template object + * @param string $template the resource handle of the template file + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @param boolean $do_clone flag is Smarty object shall be cloned + * + * @return \Smarty_Internal_Template template object + * @throws \SmartyException */ public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) { - if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) { + if ($cache_id !== null && (is_object($cache_id) || is_array($cache_id))) { $parent = $cache_id; $cache_id = null; } - if (!empty($parent) && is_array($parent)) { + if ($parent !== null && is_array($parent)) { $data = $parent; $parent = null; } else { $data = null; } - // default to cache_id and compile_id of Smarty object - $cache_id = $cache_id === null ? $this->cache_id : $cache_id; - $compile_id = $compile_id === null ? $this->compile_id : $compile_id; - // already in template cache? - if ($this->allow_ambiguous_resources) { - $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id; - } else { - $_templateId = $this->joined_template_dir . '#' . $template . $cache_id . $compile_id; + if (!$this->_templateDirNormalized) { + $this->_normalizeTemplateConfig(false); } - if (isset($_templateId[150])) { - $_templateId = sha1($_templateId); + $_templateId = $this->_getTemplateId($template, $cache_id, $compile_id); + $tpl = null; + if ($this->caching && isset(Smarty_Internal_Template::$isCacheTplObj[ $_templateId ])) { + $tpl = $do_clone ? clone Smarty_Internal_Template::$isCacheTplObj[ $_templateId ] : + Smarty_Internal_Template::$isCacheTplObj[ $_templateId ]; + $tpl->inheritance = null; + $tpl->tpl_vars = $tpl->config_vars = array(); + } elseif (!$do_clone && isset(Smarty_Internal_Template::$tplObjCache[ $_templateId ])) { + $tpl = clone Smarty_Internal_Template::$tplObjCache[ $_templateId ]; + $tpl->inheritance = null; + $tpl->tpl_vars = $tpl->config_vars = array(); + } else { + /* @var Smarty_Internal_Template $tpl */ + $tpl = new $this->template_class($template, $this, null, $cache_id, $compile_id, null, null); + $tpl->templateId = $_templateId; } if ($do_clone) { - if (isset($this->template_objects[$_templateId])) { - // return cached template object - $tpl = clone $this->template_objects[$_templateId]; - $tpl->smarty = clone $tpl->smarty; - $tpl->parent = $parent; - $tpl->tpl_vars = array(); - $tpl->config_vars = array(); - } else { - $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); - } - } else { - if (isset($this->template_objects[$_templateId])) { - // return cached template object - $tpl = $this->template_objects[$_templateId]; - $tpl->parent = $parent; - $tpl->tpl_vars = array(); - $tpl->config_vars = array(); - } else { - $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); - } + $tpl->smarty = clone $tpl->smarty; } + $tpl->parent = $parent ? $parent : $this; // fill data if present if (!empty($data) && is_array($data)) { // set up variable values foreach ($data as $_key => $_val) { - $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + $tpl->tpl_vars[ $_key ] = new Smarty_Variable($_val); + } + } + if ($this->debugging || $this->debugging_ctrl === 'URL') { + $tpl->smarty->_debug = new Smarty_Internal_Debug(); + // check URL debugging control + if (!$this->debugging && $this->debugging_ctrl === 'URL') { + $tpl->smarty->_debug->debugUrl($tpl->smarty); } } - return $tpl; } - /** * Takes unknown classes and loads plugin files for them * class name format: Smarty_PluginType_PluginName * plugin filename format: plugintype.pluginname.php * - * @param string $plugin_name class plugin name to load - * @param bool $check check if already loaded + * @param string $plugin_name class plugin name to load + * @param bool $check check if already loaded + * * @return string |boolean filepath of loaded file or false + * @throws \SmartyException */ public function loadPlugin($plugin_name, $check = true) { - // if function or class exists, exit silently (already loaded) - if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) { - return true; - } - // Plugin name is expected to be: Smarty_[Type]_[Name] - $_name_parts = explode('_', $plugin_name, 3); - // class name must have three parts to be valid plugin - // count($_name_parts) < 3 === !isset($_name_parts[2]) - if (!isset($_name_parts[2]) || strtolower($_name_parts[0]) !== 'smarty') { - throw new SmartyException("plugin {$plugin_name} is not a valid name format"); + return $this->ext->loadPlugin->loadPlugin($this, $plugin_name, $check); + } - return false; + /** + * Get unique template id + * + * @param string $template_name + * @param null|mixed $cache_id + * @param null|mixed $compile_id + * @param null $caching + * @param \Smarty_Internal_Template $template + * + * @return string + * @throws \SmartyException + */ + public function _getTemplateId( + $template_name, + $cache_id = null, + $compile_id = null, + $caching = null, + Smarty_Internal_Template $template = null + ) { + $template_name = (strpos($template_name, ':') === false) ? "{$this->default_resource_type}:{$template_name}" : + $template_name; + $cache_id = $cache_id === null ? $this->cache_id : $cache_id; + $compile_id = $compile_id === null ? $this->compile_id : $compile_id; + $caching = (int)($caching === null ? $this->caching : $caching); + if ((isset($template) && strpos($template_name, ':.') !== false) || $this->allow_ambiguous_resources) { + $_templateId = + Smarty_Resource::getUniqueTemplateName((isset($template) ? $template : $this), $template_name) . + "#{$cache_id}#{$compile_id}#{$caching}"; + } else { + $_templateId = $this->_joined_template_dir . "#{$template_name}#{$cache_id}#{$compile_id}#{$caching}"; } - // if type is "internal", get plugin from sysplugins - if (strtolower($_name_parts[1]) == 'internal') { - $file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php'; - if (file_exists($file)) { - require_once($file); + if (isset($_templateId[ 150 ])) { + $_templateId = sha1($_templateId); + } + return $_templateId; + } - return $file; - } else { - return false; + /** + * Normalize path + * - remove /./ and /../ + * - make it absolute if required + * + * @param string $path file path + * @param bool $realpath if true - convert to absolute + * false - convert to relative + * null - keep as it is but + * remove /./ /../ + * + * @return string + */ + public function _realpath($path, $realpath = null) + { + $nds = array('/' => '\\', '\\' => '/'); + preg_match( + '%^(?(?:[[:alpha:]]:[\\\\/]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?(.*))$%u', + $path, + $parts + ); + $path = $parts[ 'path' ]; + if ($parts[ 'root' ] === '\\') { + $parts[ 'root' ] = substr(getcwd(), 0, 2) . $parts[ 'root' ]; + } else { + if ($realpath !== null && !$parts[ 'root' ]) { + $path = getcwd() . DIRECTORY_SEPARATOR . $path; } } - // plugin filename is expected to be: [type].[name].php - $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; - - $_stream_resolve_include_path = function_exists('stream_resolve_include_path'); - - // loop through plugin dirs and find the plugin - foreach ($this->getPluginsDir() as $_plugin_dir) { - $names = array( - $_plugin_dir . $_plugin_filename, - $_plugin_dir . strtolower($_plugin_filename), + // normalize DIRECTORY_SEPARATOR + $path = str_replace($nds[ DIRECTORY_SEPARATOR ], DIRECTORY_SEPARATOR, $path); + $parts[ 'root' ] = str_replace($nds[ DIRECTORY_SEPARATOR ], DIRECTORY_SEPARATOR, $parts[ 'root' ]); + do { + $path = preg_replace( + array('#[\\\\/]{2}#', '#[\\\\/][.][\\\\/]#', '#[\\\\/]([^\\\\/.]+)[\\\\/][.][.][\\\\/]#'), + DIRECTORY_SEPARATOR, + $path, + -1, + $count ); - foreach ($names as $file) { - if (file_exists($file)) { - require_once($file); - - return $file; - } - if ($this->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) { - // try PHP include_path - if ($_stream_resolve_include_path) { - $file = stream_resolve_include_path($file); - } else { - $file = Smarty_Internal_Get_Include_Path::getIncludePath($file); - } - - if ($file !== false) { - require_once($file); - - return $file; - } - } - } - } - // no plugin loaded - return false; + } while ($count > 0); + return $realpath !== false ? $parts[ 'root' ] . $path : str_ireplace(getcwd(), '.', $parts[ 'root' ] . $path); } /** - * Compile all template files - * - * @param string $extension file extension - * @param bool $force_compile force all to recompile - * @param int $time_limit - * @param int $max_errors - * @return integer number of template files recompiled + * Empty template objects cache */ - public function compileAllTemplates($extension = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) + public function _clearTemplateCache() { - return Smarty_Internal_Utility::compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, $this); + Smarty_Internal_Template::$isCacheTplObj = array(); + Smarty_Internal_Template::$tplObjCache = array(); } /** - * Compile all config files - * - * @param string $extension file extension - * @param bool $force_compile force all to recompile - * @param int $time_limit - * @param int $max_errors - * @return integer number of template files recompiled + * @param boolean $use_sub_dirs */ - public function compileAllConfig($extension = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null) + public function setUseSubDirs($use_sub_dirs) { - return Smarty_Internal_Utility::compileAllConfig($extension, $force_compile, $time_limit, $max_errors, $this); + $this->use_sub_dirs = $use_sub_dirs; } /** - * Delete compiled template file - * - * @param string $resource_name template name - * @param string $compile_id compile id - * @param integer $exp_time expiration time - * @return integer number of template files deleted + * @param int $error_reporting */ - public function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) + public function setErrorReporting($error_reporting) { - return Smarty_Internal_Utility::clearCompiledTemplate($resource_name, $compile_id, $exp_time, $this); + $this->error_reporting = $error_reporting; } - /** - * Return array of tag/attributes of all tags used by an template - * - * @param object $templae template object - * @return array of tag/attributes + * @param boolean $escape_html */ - public function getTags(Smarty_Internal_Template $template) + public function setEscapeHtml($escape_html) { - return Smarty_Internal_Utility::getTags($template); + $this->escape_html = $escape_html; } /** - * Run installation test + * Return auto_literal flag * - * @param array $errors Array to write errors into, rather than outputting them - * @return boolean true if setup is fine, false if something is wrong - */ - public function testInstall(&$errors=null) - { - return Smarty_Internal_Utility::testInstall($this, $errors); - } - - /** - * Error Handler to mute expected messages - * - * @link http://php.net/set_error_handler - * @param integer $errno Error level * @return boolean */ - public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) + public function getAutoLiteral() { - $_is_muted_directory = false; - - // add the SMARTY_DIR to the list of muted directories - if (!isset(Smarty::$_muted_directories[SMARTY_DIR])) { - $smarty_dir = realpath(SMARTY_DIR); - if ($smarty_dir !== false) { - Smarty::$_muted_directories[SMARTY_DIR] = array( - 'file' => $smarty_dir, - 'length' => strlen($smarty_dir), - ); - } - } - - // walk the muted directories and test against $errfile - foreach (Smarty::$_muted_directories as $key => &$dir) { - if (!$dir) { - // resolve directory and length for speedy comparisons - $file = realpath($key); - if ($file === false) { - // this directory does not exist, remove and skip it - unset(Smarty::$_muted_directories[$key]); - continue; - } - $dir = array( - 'file' => $file, - 'length' => strlen($file), - ); - } - if (!strncmp($errfile, $dir['file'], $dir['length'])) { - $_is_muted_directory = true; - break; - } - } - - // pass to next error handler if this error did not occur inside SMARTY_DIR - // or the error was within smarty but masked to be ignored - if (!$_is_muted_directory || ($errno && $errno & error_reporting())) { - if (Smarty::$_previous_error_handler) { - return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext); - } else { - return false; - } - } + return $this->auto_literal; } /** - * Enable error handler to mute expected messages + * Set auto_literal flag * - * @return void + * @param boolean $auto_literal */ - public static function muteExpectedErrors() + public function setAutoLiteral($auto_literal = true) { - /* - error muting is done because some people implemented custom error_handlers using - http://php.net/set_error_handler and for some reason did not understand the following paragraph: + $this->auto_literal = $auto_literal; + } - It is important to remember that the standard PHP error handler is completely bypassed for the - error types specified by error_types unless the callback function returns FALSE. - error_reporting() settings will have no effect and your error handler will be called regardless - - however you are still able to read the current value of error_reporting and act appropriately. - Of particular note is that this value will be 0 if the statement that caused the error was - prepended by the @ error-control operator. + /** + * @param boolean $force_compile + */ + public function setForceCompile($force_compile) + { + $this->force_compile = $force_compile; + } - Smarty deliberately uses @filemtime() over file_exists() and filemtime() in some places. Reasons include - - @filemtime() is almost twice as fast as using an additional file_exists() - - between file_exists() and filemtime() a possible race condition is opened, - which does not exist using the simple @filemtime() approach. - */ - $error_handler = array('Smarty', 'mutingErrorHandler'); - $previous = set_error_handler($error_handler); + /** + * @param boolean $merge_compiled_includes + */ + public function setMergeCompiledIncludes($merge_compiled_includes) + { + $this->merge_compiled_includes = $merge_compiled_includes; + } - // avoid dead loops - if ($previous !== $error_handler) { - Smarty::$_previous_error_handler = $previous; + /** + * Get left delimiter + * + * @return string + */ + public function getLeftDelimiter() + { + return $this->left_delimiter; + } + + /** + * Set left delimiter + * + * @param string $left_delimiter + */ + public function setLeftDelimiter($left_delimiter) + { + $this->left_delimiter = $left_delimiter; + } + + /** + * Get right delimiter + * + * @return string $right_delimiter + */ + public function getRightDelimiter() + { + return $this->right_delimiter; + } + + /** + * Set right delimiter + * + * @param string + */ + public function setRightDelimiter($right_delimiter) + { + $this->right_delimiter = $right_delimiter; + } + + /** + * @param boolean $debugging + */ + public function setDebugging($debugging) + { + $this->debugging = $debugging; + } + + /** + * @param boolean $config_overwrite + */ + public function setConfigOverwrite($config_overwrite) + { + $this->config_overwrite = $config_overwrite; + } + + /** + * @param boolean $config_booleanize + */ + public function setConfigBooleanize($config_booleanize) + { + $this->config_booleanize = $config_booleanize; + } + + /** + * @param boolean $config_read_hidden + */ + public function setConfigReadHidden($config_read_hidden) + { + $this->config_read_hidden = $config_read_hidden; + } + + /** + * @param boolean $compile_locking + */ + public function setCompileLocking($compile_locking) + { + $this->compile_locking = $compile_locking; + } + + /** + * @param string $default_resource_type + */ + public function setDefaultResourceType($default_resource_type) + { + $this->default_resource_type = $default_resource_type; + } + + /** + * @param string $caching_type + */ + public function setCachingType($caching_type) + { + $this->caching_type = $caching_type; + } + + /** + * Test install + * + * @param null $errors + */ + public function testInstall(&$errors = null) + { + Smarty_Internal_TestInstall::testInstall($this, $errors); + } + + /** + * Get Smarty object + * + * @return Smarty + */ + public function _getSmartyObj() + { + return $this; + } + + /** + * <> Generic getter. + * Calls the appropriate getter function. + * Issues an E_USER_NOTICE if no valid getter is found. + * + * @param string $name property name + * + * @return mixed + */ + public function __get($name) + { + if (isset($this->accessMap[ $name ])) { + $method = 'get' . $this->accessMap[ $name ]; + return $this->{$method}(); + } elseif (isset($this->_cache[ $name ])) { + return $this->_cache[ $name ]; + } elseif (in_array($name, $this->obsoleteProperties)) { + return null; + } else { + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); + } + return null; + } + + /** + * <> Generic setter. + * Calls the appropriate setter function. + * Issues an E_USER_NOTICE if no valid setter is found. + * + * @param string $name property name + * @param mixed $value parameter passed to setter + * + */ + public function __set($name, $value) + { + if (isset($this->accessMap[ $name ])) { + $method = 'set' . $this->accessMap[ $name ]; + $this->{$method}($value); + } elseif (in_array($name, $this->obsoleteProperties)) { + return; + } elseif (is_object($value) && method_exists($value, $name)) { + $this->$name = $value; + } else { + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); } } /** - * Disable error handler muting expected messages + * Normalize and set directory string * - * @return void + * @param string $dirName cache_dir or compile_dir + * @param string $dir filepath of folder */ - public static function unmuteExpectedErrors() + private function _normalizeDir($dirName, $dir) { - restore_error_handler(); + $this->{$dirName} = $this->_realpath(rtrim($dir, "/\\") . DIRECTORY_SEPARATOR, true); + if (class_exists('Smarty_Internal_ErrorHandler', false)) { + if (!isset(Smarty_Internal_ErrorHandler::$mutedDirectories[ $this->{$dirName} ])) { + Smarty_Internal_ErrorHandler::$mutedDirectories[ $this->{$dirName} ] = null; + } + } } -} -// Check if we're running on windows -Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; - -// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 -if (Smarty::$_CHARSET !== 'UTF-8') { - Smarty::$_UTF8_MODIFIER = ''; -} - -/** - * Smarty exception class - * @package Smarty - */ -class SmartyException extends Exception -{ - public static $escape = false; - - public function __toString() + /** + * Normalize template_dir or config_dir + * + * @param bool $isConfig true for config_dir + */ + private function _normalizeTemplateConfig($isConfig) { - return ' --> Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- '; - } -} - -/** - * Smarty compiler exception class - * @package Smarty - */ -class SmartyCompilerException extends SmartyException -{ - public function __toString() - { - return ' --> Smarty Compiler: ' . $this->message . ' <-- '; - } - /** - * The line number of the template error - * @type int|null - */ - public $line = null; - /** - * The template source snippet relating to the error - * @type string|null - */ - public $source = null; - /** - * The raw text of the error message - * @type string|null - */ - public $desc = null; - /** - * The resource identifier or template name - * @type string|null - */ - public $template = null; -} - -/** - * Autoloader - */ -function smartyAutoload($class) -{ - $_class = strtolower($class); - static $_classes = array( - 'smarty_config_source' => true, - 'smarty_config_compiled' => true, - 'smarty_security' => true, - 'smarty_cacheresource' => true, - 'smarty_cacheresource_custom' => true, - 'smarty_cacheresource_keyvaluestore' => true, - 'smarty_resource' => true, - 'smarty_resource_custom' => true, - 'smarty_resource_uncompiled' => true, - 'smarty_resource_recompiled' => true, - ); - - if (!strncmp($_class, 'smarty_internal_', 16) || isset($_classes[$_class])) { - include SMARTY_SYSPLUGINS_DIR . $_class . '.php'; + if ($isConfig) { + $processed = &$this->_processedConfigDir; + $dir = &$this->config_dir; + } else { + $processed = &$this->_processedTemplateDir; + $dir = &$this->template_dir; + } + if (!is_array($dir)) { + $dir = (array)$dir; + } + foreach ($dir as $k => $v) { + if (!isset($processed[ $k ])) { + $dir[ $k ] = $v = $this->_realpath(rtrim($v, "/\\") . DIRECTORY_SEPARATOR, true); + $processed[ $k ] = true; + } + } + $isConfig ? $this->_configDirNormalized = true : $this->_templateDirNormalized = true; + $isConfig ? $this->_joined_config_dir = join('#', $this->config_dir) : + $this->_joined_template_dir = join('#', $this->template_dir); } } diff --git a/resources/templates/engine/smarty/SmartyBC.class.php b/resources/templates/engine/smarty/SmartyBC.class.php new file mode 100644 index 0000000000..836f98153a --- /dev/null +++ b/resources/templates/engine/smarty/SmartyBC.class.php @@ -0,0 +1,477 @@ + + * @author Uwe Tews + * @author Rodney Rehm + * @package Smarty + */ +/** + * @ignore + */ +require_once dirname(__FILE__) . '/Smarty.class.php'; + +/** + * Smarty Backward Compatibility Wrapper Class + * + * @package Smarty + */ +class SmartyBC extends Smarty +{ + /** + * Smarty 2 BC + * + * @var string + */ + public $_version = self::SMARTY_VERSION; + + /** + * This is an array of directories where trusted php scripts reside. + * + * @var array + */ + public $trusted_dir = array(); + + /** + * Initialize new SmartyBC object + */ + public function __construct() + { + parent::__construct(); + } + + /** + * wrapper for assign_by_ref + * + * @param string $tpl_var the template variable name + * @param mixed &$value the referenced value to assign + */ + public function assign_by_ref($tpl_var, &$value) + { + $this->assignByRef($tpl_var, $value); + } + + /** + * wrapper for append_by_ref + * + * @param string $tpl_var the template variable name + * @param mixed &$value the referenced value to append + * @param boolean $merge flag if array elements shall be merged + */ + public function append_by_ref($tpl_var, &$value, $merge = false) + { + $this->appendByRef($tpl_var, $value, $merge); + } + + /** + * clear the given assigned template variable. + * + * @param string $tpl_var the template variable to clear + */ + public function clear_assign($tpl_var) + { + $this->clearAssign($tpl_var); + } + + /** + * Registers custom function to be used in templates + * + * @param string $function the name of the template function + * @param string $function_impl the name of the PHP function to register + * @param bool $cacheable + * @param mixed $cache_attrs + * + * @throws \SmartyException + */ + public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null) + { + $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs); + } + + /** + * Unregister custom function + * + * @param string $function name of template function + */ + public function unregister_function($function) + { + $this->unregisterPlugin('function', $function); + } + + /** + * Registers object to be used in templates + * + * @param string $object name of template object + * @param object $object_impl the referenced PHP object to register + * @param array $allowed list of allowed methods (empty = all) + * @param boolean $smarty_args smarty argument format, else traditional + * @param array $block_methods list of methods that are block format + * + * @throws SmartyException + * @internal param array $block_functs list of methods that are block format + */ + public function register_object( + $object, + $object_impl, + $allowed = array(), + $smarty_args = true, + $block_methods = array() + ) { + settype($allowed, 'array'); + settype($smarty_args, 'boolean'); + $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods); + } + + /** + * Unregister object + * + * @param string $object name of template object + */ + public function unregister_object($object) + { + $this->unregisterObject($object); + } + + /** + * Registers block function to be used in templates + * + * @param string $block name of template block + * @param string $block_impl PHP function to register + * @param bool $cacheable + * @param mixed $cache_attrs + * + * @throws \SmartyException + */ + public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null) + { + $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs); + } + + /** + * Unregister block function + * + * @param string $block name of template function + */ + public function unregister_block($block) + { + $this->unregisterPlugin('block', $block); + } + + /** + * Registers compiler function + * + * @param string $function name of template function + * @param string $function_impl name of PHP function to register + * @param bool $cacheable + * + * @throws \SmartyException + */ + public function register_compiler_function($function, $function_impl, $cacheable = true) + { + $this->registerPlugin('compiler', $function, $function_impl, $cacheable); + } + + /** + * Unregister compiler function + * + * @param string $function name of template function + */ + public function unregister_compiler_function($function) + { + $this->unregisterPlugin('compiler', $function); + } + + /** + * Registers modifier to be used in templates + * + * @param string $modifier name of template modifier + * @param string $modifier_impl name of PHP function to register + * + * @throws \SmartyException + */ + public function register_modifier($modifier, $modifier_impl) + { + $this->registerPlugin('modifier', $modifier, $modifier_impl); + } + + /** + * Unregister modifier + * + * @param string $modifier name of template modifier + */ + public function unregister_modifier($modifier) + { + $this->unregisterPlugin('modifier', $modifier); + } + + /** + * Registers a resource to fetch a template + * + * @param string $type name of resource + * @param array $functions array of functions to handle resource + */ + public function register_resource($type, $functions) + { + $this->registerResource($type, $functions); + } + + /** + * Unregister a resource + * + * @param string $type name of resource + */ + public function unregister_resource($type) + { + $this->unregisterResource($type); + } + + /** + * Registers a prefilter function to apply + * to a template before compiling + * + * @param callable $function + * + * @throws \SmartyException + */ + public function register_prefilter($function) + { + $this->registerFilter('pre', $function); + } + + /** + * Unregister a prefilter function + * + * @param callable $function + */ + public function unregister_prefilter($function) + { + $this->unregisterFilter('pre', $function); + } + + /** + * Registers a postfilter function to apply + * to a compiled template after compilation + * + * @param callable $function + * + * @throws \SmartyException + */ + public function register_postfilter($function) + { + $this->registerFilter('post', $function); + } + + /** + * Unregister a postfilter function + * + * @param callable $function + */ + public function unregister_postfilter($function) + { + $this->unregisterFilter('post', $function); + } + + /** + * Registers an output filter function to apply + * to a template output + * + * @param callable $function + * + * @throws \SmartyException + */ + public function register_outputfilter($function) + { + $this->registerFilter('output', $function); + } + + /** + * Unregister an outputfilter function + * + * @param callable $function + */ + public function unregister_outputfilter($function) + { + $this->unregisterFilter('output', $function); + } + + /** + * load a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + * + * @throws \SmartyException + */ + public function load_filter($type, $name) + { + $this->loadFilter($type, $name); + } + + /** + * clear cached content for the given template and cache id + * + * @param string $tpl_file name of template file + * @param string $cache_id name of cache_id + * @param string $compile_id name of compile_id + * @param string $exp_time expiration time + * + * @return boolean + */ + public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) + { + return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time); + } + + /** + * clear the entire contents of cache (all templates) + * + * @param string $exp_time expire time + * + * @return boolean + */ + public function clear_all_cache($exp_time = null) + { + return $this->clearCache(null, null, null, $exp_time); + } + + /** + * test to see if valid cache exists for this template + * + * @param string $tpl_file name of template file + * @param string $cache_id + * @param string $compile_id + * + * @return bool + * @throws \Exception + * @throws \SmartyException + */ + public function is_cached($tpl_file, $cache_id = null, $compile_id = null) + { + return $this->isCached($tpl_file, $cache_id, $compile_id); + } + + /** + * clear all the assigned template variables. + */ + public function clear_all_assign() + { + $this->clearAllAssign(); + } + + /** + * clears compiled version of specified template resource, + * or all compiled template files if one is not specified. + * This function is for advanced use only, not normally needed. + * + * @param string $tpl_file + * @param string $compile_id + * @param string $exp_time + * + * @return boolean results of {@link smarty_core_rm_auto()} + */ + public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) + { + return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time); + } + + /** + * Checks whether requested template exists. + * + * @param string $tpl_file + * + * @return bool + * @throws \SmartyException + */ + public function template_exists($tpl_file) + { + return $this->templateExists($tpl_file); + } + + /** + * Returns an array containing template variables + * + * @param string $name + * + * @return array + */ + public function get_template_vars($name = null) + { + return $this->getTemplateVars($name); + } + + /** + * Returns an array containing config variables + * + * @param string $name + * + * @return array + */ + public function get_config_vars($name = null) + { + return $this->getConfigVars($name); + } + + /** + * load configuration values + * + * @param string $file + * @param string $section + * @param string $scope + */ + public function config_load($file, $section = null, $scope = 'global') + { + $this->ConfigLoad($file, $section, $scope); + } + + /** + * return a reference to a registered object + * + * @param string $name + * + * @return object + */ + public function get_registered_object($name) + { + return $this->getRegisteredObject($name); + } + + /** + * clear configuration values + * + * @param string $var + */ + public function clear_config($var = null) + { + $this->clearConfig($var); + } + + /** + * trigger Smarty error + * + * @param string $error_msg + * @param integer $error_type + */ + public function trigger_error($error_msg, $error_type = E_USER_WARNING) + { + trigger_error("Smarty error: $error_msg", $error_type); + } +} diff --git a/resources/templates/engine/smarty/bootstrap.php b/resources/templates/engine/smarty/bootstrap.php new file mode 100644 index 0000000000..2c830468ed --- /dev/null +++ b/resources/templates/engine/smarty/bootstrap.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +/** + * Load and register Smarty Autoloader + */ +if (!class_exists('Smarty_Autoloader')) { + include dirname(__FILE__) . '/Autoloader.php'; +} +Smarty_Autoloader::register(true); diff --git a/resources/templates/engine/smarty/debug.tpl b/resources/templates/engine/smarty/debug.tpl index 4369a99d04..edc7bef98f 100644 --- a/resources/templates/engine/smarty/debug.tpl +++ b/resources/templates/engine/smarty/debug.tpl @@ -1,133 +1,160 @@ {capture name='_smarty_debug' assign=debug_output} - - - - Smarty Debug Console - - - + #table_config_vars th { + color: maroon; + } -

Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

+ {/literal} + + + -{if !empty($template_data)} -

included templates & config files (load time in seconds)

+

Smarty {Smarty::SMARTY_VERSION} Debug Console + - {if isset($template_name)}{$template_name|debug_print_var nofilter} {/if}{if !empty($template_data)}Total Time {$execution_time|string_format:"%.5f"}{/if}

-
-{foreach $template_data as $template} - {$template.name} - - (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) - -
-{/foreach} -
-{/if} + {if !empty($template_data)} +

included templates & config files (load time in seconds)

+
+ {foreach $template_data as $template} + {$template.name} +
   + (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) + +
+ {/foreach} +
+ {/if} -

assigned template variables

+

assigned template variables

-
".$text['label-groups']."".$text['label-tools']." "; if (permission_exists('user_add')) { @@ -207,7 +198,7 @@ $tr_link = (permission_exists('user_edit')) ? "href='user_edit.php?id=".escape($row['user_uuid'])."'" : null; echo "
".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."".escape($row['domain_name']).""; if (permission_exists('user_edit')) { @@ -217,11 +208,18 @@ echo escape($row['username']); } echo " "; - if (sizeof($user_groups[$row['user_uuid']]) > 0) { - echo escape(implode(', ', $user_groups[$row['user_uuid']])); + echo " \n"; + echo " ".$row['groups']." \n"; + echo " ".$row['contact_organization']."  ".$row['contact_name_given']." ".$row['contact_name_family']."  \n"; + if (permission_exists('ticket_edit')) { + echo " \n"; } - echo " "; if ($row['user_enabled'] == 'true') { echo $text['option-true']; @@ -247,7 +245,7 @@ if ($c==0) { $c=1; } else { $c=0; } } } //end foreach - unset($sql, $users, $user_count); + unset($sql, $users); } //end if results echo "
- {foreach $assigned_vars as $vars} - - - - {/foreach} -
${$vars@key|escape:'html'}{$vars|debug_print_var nofilter}
+ + {foreach $assigned_vars as $vars} + + + + + {/foreach} +

${$vars@key}

+ {if isset($vars['nocache'])}Nocache
{/if} + {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +

Value

{$vars['value']|debug_print_var:10:80 nofilter}
{if isset($vars['attributes'])}

Attributes

{$vars['attributes']|debug_print_var nofilter} {/if}
-

assigned config file variables (outer template scope)

+

assigned config file variables

- - {foreach $config_vars as $vars} - - - - {/foreach} +
{$vars@key|escape:'html'}{$vars|debug_print_var nofilter}
+ {foreach $config_vars as $vars} + + + + + {/foreach} -

#{$vars@key}#

+ {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if} +
{$vars['value']|debug_print_var:10:80 nofilter}
- - + + + {/capture} diff --git a/resources/templates/engine/smarty/plugins/block.textformat.php b/resources/templates/engine/smarty/plugins/block.textformat.php index b62a4f8eee..5e494637ed 100644 --- a/resources/templates/engine/smarty/plugins/block.textformat.php +++ b/resources/templates/engine/smarty/plugins/block.textformat.php @@ -2,42 +2,51 @@ /** * Smarty plugin to format text blocks * - * @package Smarty + * @package Smarty * @subpackage PluginsBlock */ - /** * Smarty {textformat}{/textformat} block plugin - * - * Type: block function
- * Name: textformat
+ * Type: block function + * Name: textformat * Purpose: format text a certain way with preset styles - * or custom wrap/indent settings
+ * or custom wrap/indent settings * Params: - *
+ *
  * - style         - string (email)
  * - indent        - integer (0)
  * - wrap          - integer (80)
  * - wrap_char     - string ("\n")
  * - indent_char   - string (" ")
  * - wrap_boundary - boolean (true)
- * 
* - * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat} - * (Smarty online manual) + * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat} + * (Smarty online manual) + * * @param array $params parameters * @param string $content contents of the block * @param Smarty_Internal_Template $template template object * @param boolean &$repeat repeat flag + * * @return string content re-formatted * @author Monte Ohrt + * @throws \SmartyException */ -function smarty_block_textformat($params, $content, $template, &$repeat) +function smarty_block_textformat($params, $content, Smarty_Internal_Template $template, &$repeat) { if (is_null($content)) { return; } - + if (Smarty::$_MBSTRING) { + $template->_checkPlugins( + array( + array( + 'function' => 'smarty_modifier_mb_wordwrap', + 'file' => SMARTY_PLUGINS_DIR . 'modifier.mb_wordwrap.php' + ) + ) + ); + } $style = null; $indent = 0; $indent_first = 0; @@ -46,52 +55,55 @@ function smarty_block_textformat($params, $content, $template, &$repeat) $wrap_char = "\n"; $wrap_cut = false; $assign = null; - foreach ($params as $_key => $_val) { switch ($_key) { case 'style': case 'indent_char': case 'wrap_char': case 'assign': - $$_key = (string) $_val; + $$_key = (string)$_val; break; - case 'indent': case 'indent_first': case 'wrap': - $$_key = (int) $_val; + $$_key = (int)$_val; break; - case 'wrap_cut': - $$_key = (bool) $_val; + $$_key = (bool)$_val; break; - default: - trigger_error("textformat: unknown attribute '$_key'"); + trigger_error("textformat: unknown attribute '{$_key}'"); } } - - if ($style == 'email') { + if ($style === 'email') { $wrap = 72; } // split into paragraphs $_paragraphs = preg_split('![\r\n]{2}!', $content); - $_output = ''; - foreach ($_paragraphs as &$_paragraph) { if (!$_paragraph) { continue; } // convert mult. spaces & special chars to single space - $_paragraph = preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph); + $_paragraph = + preg_replace( + array( + '!\s+!' . Smarty::$_UTF8_MODIFIER, + '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER + ), + array( + ' ', + '' + ), + $_paragraph + ); // indent first line if ($indent_first > 0) { $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph; } // wordwrap sentences if (Smarty::$_MBSTRING) { - require_once(SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php'); - $_paragraph = smarty_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut); + $_paragraph = smarty_modifier_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut); } else { $_paragraph = wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut); } @@ -101,7 +113,6 @@ function smarty_block_textformat($params, $content, $template, &$repeat) } } $_output = implode($wrap_char . $wrap_char, $_paragraphs); - if ($assign) { $template->assign($assign, $_output); } else { diff --git a/resources/templates/engine/smarty/plugins/function.counter.php b/resources/templates/engine/smarty/plugins/function.counter.php index cd147634fd..a4129e77c7 100644 --- a/resources/templates/engine/smarty/plugins/function.counter.php +++ b/resources/templates/engine/smarty/plugins/function.counter.php @@ -1,76 +1,62 @@ - * Name: counter
+ * Type: function + * Name: counter * Purpose: print out a counter value * * @author Monte Ohrt - * @link http://www.smarty.net/manual/en/language.function.counter.php {counter} - * (Smarty online manual) + * @link http://www.smarty.net/manual/en/language.function.counter.php {counter} + * (Smarty online manual) + * * @param array $params parameters * @param Smarty_Internal_Template $template template object + * * @return string|null */ function smarty_function_counter($params, $template) { static $counters = array(); - - $name = (isset($params['name'])) ? $params['name'] : 'default'; - if (!isset($counters[$name])) { - $counters[$name] = array( - 'start'=>1, - 'skip'=>1, - 'direction'=>'up', - 'count'=>1 - ); + $name = (isset($params[ 'name' ])) ? $params[ 'name' ] : 'default'; + if (!isset($counters[ $name ])) { + $counters[ $name ] = array('start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1); } - $counter =& $counters[$name]; - - if (isset($params['start'])) { - $counter['start'] = $counter['count'] = (int) $params['start']; + $counter =& $counters[ $name ]; + if (isset($params[ 'start' ])) { + $counter[ 'start' ] = $counter[ 'count' ] = (int)$params[ 'start' ]; } - - if (!empty($params['assign'])) { - $counter['assign'] = $params['assign']; + if (!empty($params[ 'assign' ])) { + $counter[ 'assign' ] = $params[ 'assign' ]; } - - if (isset($counter['assign'])) { - $template->assign($counter['assign'], $counter['count']); + if (isset($counter[ 'assign' ])) { + $template->assign($counter[ 'assign' ], $counter[ 'count' ]); } - - if (isset($params['print'])) { - $print = (bool) $params['print']; + if (isset($params[ 'print' ])) { + $print = (bool)$params[ 'print' ]; } else { - $print = empty($counter['assign']); + $print = empty($counter[ 'assign' ]); } - if ($print) { - $retval = $counter['count']; + $retval = $counter[ 'count' ]; } else { $retval = null; } - - if (isset($params['skip'])) { - $counter['skip'] = $params['skip']; + if (isset($params[ 'skip' ])) { + $counter[ 'skip' ] = $params[ 'skip' ]; } - - if (isset($params['direction'])) { - $counter['direction'] = $params['direction']; + if (isset($params[ 'direction' ])) { + $counter[ 'direction' ] = $params[ 'direction' ]; + } + if ($counter[ 'direction' ] === 'down') { + $counter[ 'count' ] -= $counter[ 'skip' ]; + } else { + $counter[ 'count' ] += $counter[ 'skip' ]; } - - if ($counter['direction'] == "down") - $counter['count'] -= $counter['skip']; - else - $counter['count'] += $counter['skip']; - return $retval; - } diff --git a/resources/templates/engine/smarty/plugins/function.cycle.php b/resources/templates/engine/smarty/plugins/function.cycle.php index 9bf26f8c4a..07ffcc5e24 100644 --- a/resources/templates/engine/smarty/plugins/function.cycle.php +++ b/resources/templates/engine/smarty/plugins/function.cycle.php @@ -2,19 +2,17 @@ /** * Smarty plugin * - * @package Smarty + * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {cycle} function plugin - * - * Type: function
- * Name: cycle
- * Date: May 3, 2002
- * Purpose: cycle through given values
+ * Type: function + * Name: cycle + * Date: May 3, 2002 + * Purpose: cycle through given values * Params: - *
+ *
  * - name      - name of cycle (optional)
  * - values    - comma separated list of values to cycle, or an array of values to cycle
  *               (this can be left out for subsequent calls)
@@ -23,83 +21,72 @@
  * - advance   - boolean - whether or not to advance the cycle
  * - delimiter - the value delimiter, default is ","
  * - assign    - boolean, assigns to template var instead of printed.
- * 
- * Examples:
- *
+ *
+ * Examples:
+ *
  * {cycle values="#eeeeee,#d0d0d0d"}
  * {cycle name=row values="one,two,three" reset=true}
  * {cycle name=row}
- * 
* - * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle} - * (Smarty online manual) - * @author Monte Ohrt - * @author credit to Mark Priatel - * @author credit to Gerard - * @author credit to Jason Sweat - * @version 1.3 + * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle} + * (Smarty online manual) + * @author Monte Ohrt + * @author credit to Mark Priatel + * @author credit to Gerard + * @author credit to Jason Sweat + * @version 1.3 + * * @param array $params parameters * @param Smarty_Internal_Template $template template object + * * @return string|null */ - function smarty_function_cycle($params, $template) { static $cycle_vars; - - $name = (empty($params['name'])) ? 'default' : $params['name']; - $print = (isset($params['print'])) ? (bool) $params['print'] : true; - $advance = (isset($params['advance'])) ? (bool) $params['advance'] : true; - $reset = (isset($params['reset'])) ? (bool) $params['reset'] : false; - - if (!isset($params['values'])) { - if (!isset($cycle_vars[$name]['values'])) { - trigger_error("cycle: missing 'values' parameter"); - + $name = (empty($params[ 'name' ])) ? 'default' : $params[ 'name' ]; + $print = (isset($params[ 'print' ])) ? (bool)$params[ 'print' ] : true; + $advance = (isset($params[ 'advance' ])) ? (bool)$params[ 'advance' ] : true; + $reset = (isset($params[ 'reset' ])) ? (bool)$params[ 'reset' ] : false; + if (!isset($params[ 'values' ])) { + if (!isset($cycle_vars[ $name ][ 'values' ])) { + trigger_error('cycle: missing \'values\' parameter'); return; } } else { - if(isset($cycle_vars[$name]['values']) - && $cycle_vars[$name]['values'] != $params['values'] ) { - $cycle_vars[$name]['index'] = 0; + if (isset($cycle_vars[ $name ][ 'values' ]) && $cycle_vars[ $name ][ 'values' ] !== $params[ 'values' ]) { + $cycle_vars[ $name ][ 'index' ] = 0; } - $cycle_vars[$name]['values'] = $params['values']; + $cycle_vars[ $name ][ 'values' ] = $params[ 'values' ]; } - - if (isset($params['delimiter'])) { - $cycle_vars[$name]['delimiter'] = $params['delimiter']; - } elseif (!isset($cycle_vars[$name]['delimiter'])) { - $cycle_vars[$name]['delimiter'] = ','; + if (isset($params[ 'delimiter' ])) { + $cycle_vars[ $name ][ 'delimiter' ] = $params[ 'delimiter' ]; + } elseif (!isset($cycle_vars[ $name ][ 'delimiter' ])) { + $cycle_vars[ $name ][ 'delimiter' ] = ','; } - - if (is_array($cycle_vars[$name]['values'])) { - $cycle_array = $cycle_vars[$name]['values']; + if (is_array($cycle_vars[ $name ][ 'values' ])) { + $cycle_array = $cycle_vars[ $name ][ 'values' ]; } else { - $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']); + $cycle_array = explode($cycle_vars[ $name ][ 'delimiter' ], $cycle_vars[ $name ][ 'values' ]); } - - if (!isset($cycle_vars[$name]['index']) || $reset ) { - $cycle_vars[$name]['index'] = 0; + if (!isset($cycle_vars[ $name ][ 'index' ]) || $reset) { + $cycle_vars[ $name ][ 'index' ] = 0; } - - if (isset($params['assign'])) { + if (isset($params[ 'assign' ])) { $print = false; - $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]); + $template->assign($params[ 'assign' ], $cycle_array[ $cycle_vars[ $name ][ 'index' ] ]); } - if ($print) { - $retval = $cycle_array[$cycle_vars[$name]['index']]; + $retval = $cycle_array[ $cycle_vars[ $name ][ 'index' ] ]; } else { $retval = null; } - if ($advance) { - if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) { - $cycle_vars[$name]['index'] = 0; + if ($cycle_vars[ $name ][ 'index' ] >= count($cycle_array) - 1) { + $cycle_vars[ $name ][ 'index' ] = 0; } else { - $cycle_vars[$name]['index']++; + $cycle_vars[ $name ][ 'index' ]++; } } - return $retval; } diff --git a/resources/templates/engine/smarty/plugins/function.fetch.php b/resources/templates/engine/smarty/plugins/function.fetch.php index a4eaef37fa..768761b238 100644 --- a/resources/templates/engine/smarty/plugins/function.fetch.php +++ b/resources/templates/engine/smarty/plugins/function.fetch.php @@ -2,166 +2,156 @@ /** * Smarty plugin * - * @package Smarty + * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {fetch} plugin - * - * Type: function
- * Name: fetch
+ * Type: function + * Name: fetch * Purpose: fetch file, web or ftp data and display results * - * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch} - * (Smarty online manual) + * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch} + * (Smarty online manual) * @author Monte Ohrt + * * @param array $params parameters * @param Smarty_Internal_Template $template template object + * + * @throws SmartyException * @return string|null if the assign parameter is passed, Smarty assigns the result to a template variable */ function smarty_function_fetch($params, $template) { - if (empty($params['file'])) { - trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE); - + if (empty($params[ 'file' ])) { + trigger_error('[plugin] fetch parameter \'file\' cannot be empty', E_USER_NOTICE); return; } - // strip file protocol - if (stripos($params['file'], 'file://') === 0) { - $params['file'] = substr($params['file'], 7); + if (stripos($params[ 'file' ], 'file://') === 0) { + $params[ 'file' ] = substr($params[ 'file' ], 7); } - - $protocol = strpos($params['file'], '://'); + $protocol = strpos($params[ 'file' ], '://'); if ($protocol !== false) { - $protocol = strtolower(substr($params['file'], 0, $protocol)); + $protocol = strtolower(substr($params[ 'file' ], 0, $protocol)); } - if (isset($template->smarty->security_policy)) { if ($protocol) { // remote resource (or php stream, …) - if (!$template->smarty->security_policy->isTrustedUri($params['file'])) { + if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) { return; } } else { // local file - if (!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) { + if (!$template->smarty->security_policy->isTrustedResourceDir($params[ 'file' ])) { return; } } } - $content = ''; - if ($protocol == 'http') { + if ($protocol === 'http') { // http fetch - if ($uri_parts = parse_url($params['file'])) { + if ($uri_parts = parse_url($params[ 'file' ])) { // set defaults - $host = $server_name = $uri_parts['host']; + $host = $server_name = $uri_parts[ 'host' ]; $timeout = 30; - $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - $agent = "Smarty Template Engine ". Smarty::SMARTY_VERSION; - $referer = ""; - $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; - $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; + $accept = 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*'; + $agent = 'Smarty Template Engine ' . Smarty::SMARTY_VERSION; + $referer = ''; + $uri = !empty($uri_parts[ 'path' ]) ? $uri_parts[ 'path' ] : '/'; + $uri .= !empty($uri_parts[ 'query' ]) ? '?' . $uri_parts[ 'query' ] : ''; $_is_proxy = false; - if (empty($uri_parts['port'])) { + if (empty($uri_parts[ 'port' ])) { $port = 80; } else { - $port = $uri_parts['port']; + $port = $uri_parts[ 'port' ]; } - if (!empty($uri_parts['user'])) { - $user = $uri_parts['user']; + if (!empty($uri_parts[ 'user' ])) { + $user = $uri_parts[ 'user' ]; } - if (!empty($uri_parts['pass'])) { - $pass = $uri_parts['pass']; + if (!empty($uri_parts[ 'pass' ])) { + $pass = $uri_parts[ 'pass' ]; } // loop through parameters, setup headers foreach ($params as $param_key => $param_value) { switch ($param_key) { - case "file": - case "assign": - case "assign_headers": + case 'file': + case 'assign': + case 'assign_headers': break; - case "user": + case 'user': if (!empty($param_value)) { $user = $param_value; } break; - case "pass": + case 'pass': if (!empty($param_value)) { $pass = $param_value; } break; - case "accept": + case 'accept': if (!empty($param_value)) { $accept = $param_value; } break; - case "header": + case 'header': if (!empty($param_value)) { - if (!preg_match('![\w\d-]+: .+!',$param_value)) { - trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE); - + if (!preg_match('![\w\d-]+: .+!', $param_value)) { + trigger_error("[plugin] invalid header format '{$param_value}'", E_USER_NOTICE); return; } else { $extra_headers[] = $param_value; } } break; - case "proxy_host": + case 'proxy_host': if (!empty($param_value)) { $proxy_host = $param_value; } break; - case "proxy_port": + case 'proxy_port': if (!preg_match('!\D!', $param_value)) { - $proxy_port = (int) $param_value; + $proxy_port = (int)$param_value; } else { - trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); - + trigger_error("[plugin] invalid value for attribute '{$param_key }'", E_USER_NOTICE); return; } break; - case "agent": + case 'agent': if (!empty($param_value)) { $agent = $param_value; } break; - case "referer": + case 'referer': if (!empty($param_value)) { $referer = $param_value; } break; - case "timeout": + case 'timeout': if (!preg_match('!\D!', $param_value)) { - $timeout = (int) $param_value; + $timeout = (int)$param_value; } else { - trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); - + trigger_error("[plugin] invalid value for attribute '{$param_key}'", E_USER_NOTICE); return; } break; default: - trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE); - + trigger_error("[plugin] unrecognized attribute '{$param_key}'", E_USER_NOTICE); return; } } if (!empty($proxy_host) && !empty($proxy_port)) { $_is_proxy = true; - $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); + $fp = fsockopen($proxy_host, $proxy_port, $errno, $errstr, $timeout); } else { - $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); + $fp = fsockopen($server_name, $port, $errno, $errstr, $timeout); } - if (!$fp) { - trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE); - + trigger_error("[plugin] unable to fetch: $errstr ($errno)", E_USER_NOTICE); return; } else { if ($_is_proxy) { - fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); + fputs($fp, 'GET ' . $params[ 'file' ] . " HTTP/1.0\r\n"); } else { fputs($fp, "GET $uri HTTP/1.0\r\n"); } @@ -179,40 +169,35 @@ function smarty_function_fetch($params, $template) } if (isset($extra_headers) && is_array($extra_headers)) { foreach ($extra_headers as $curr_header) { - fputs($fp, $curr_header."\r\n"); + fputs($fp, $curr_header . "\r\n"); } } if (!empty($user) && !empty($pass)) { - fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); + fputs($fp, 'Authorization: BASIC ' . base64_encode("$user:$pass") . "\r\n"); } - fputs($fp, "\r\n"); while (!feof($fp)) { - $content .= fgets($fp,4096); + $content .= fgets($fp, 4096); } fclose($fp); - $csplit = preg_split("!\r\n\r\n!",$content,2); - - $content = $csplit[1]; - - if (!empty($params['assign_headers'])) { - $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0])); + $csplit = preg_split("!\r\n\r\n!", $content, 2); + $content = $csplit[ 1 ]; + if (!empty($params[ 'assign_headers' ])) { + $template->assign($params[ 'assign_headers' ], preg_split("!\r\n!", $csplit[ 0 ])); } } } else { - trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE); - + trigger_error("[plugin fetch] unable to parse URL, check syntax", E_USER_NOTICE); return; } } else { - $content = @file_get_contents($params['file']); + $content = @file_get_contents($params[ 'file' ]); if ($content === false) { - throw new SmartyException("{fetch} cannot read resource '" . $params['file'] ."'"); + throw new SmartyException("{fetch} cannot read resource '" . $params[ 'file' ] . "'"); } } - - if (!empty($params['assign'])) { - $template->assign($params['assign'], $content); + if (!empty($params[ 'assign' ])) { + $template->assign($params[ 'assign' ], $content); } else { return $content; } diff --git a/resources/templates/engine/smarty/plugins/function.html_checkboxes.php b/resources/templates/engine/smarty/plugins/function.html_checkboxes.php index ad0e9cd415..302358edd8 100644 --- a/resources/templates/engine/smarty/plugins/function.html_checkboxes.php +++ b/resources/templates/engine/smarty/plugins/function.html_checkboxes.php @@ -2,26 +2,24 @@ /** * Smarty plugin * - * @package Smarty + * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {html_checkboxes} function plugin - * - * File: function.html_checkboxes.php
- * Type: function
- * Name: html_checkboxes
- * Date: 24.Feb.2003
- * Purpose: Prints out a list of checkbox input types
+ * File: function.html_checkboxes.php + * Type: function + * Name: html_checkboxes + * Date: 24.Feb.2003 + * Purpose: Prints out a list of checkbox input types * Examples: - *
+ *
  * {html_checkboxes values=$ids output=$names}
  * {html_checkboxes values=$ids name='box' separator='
' output=$names} * {html_checkboxes values=$ids checked=$checked separator='
' output=$names} - *
+ * * Params: - *
+ *
  * - name       (optional) - string default "checkbox"
  * - values     (required) - array
  * - options    (optional) - associative array
@@ -30,22 +28,30 @@
  * - output     (optional) - the output next to each checkbox
  * - assign     (optional) - assign the output as an array to this variable
  * - escape     (optional) - escape the content (not value), defaults to true
- * 
* - * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} - * (Smarty online manual) - * @author Christopher Kvarme - * @author credits to Monte Ohrt - * @version 1.0 - * @param array $params parameters - * @param object $template template object + * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} + * (Smarty online manual) + * @author Christopher Kvarme + * @author credits to Monte Ohrt + * @version 1.0 + * + * @param array $params parameters + * @param Smarty_Internal_Template $template template object + * * @return string - * @uses smarty_function_escape_special_chars() + * @uses smarty_function_escape_special_chars() + * @throws \SmartyException */ -function smarty_function_html_checkboxes($params, $template) +function smarty_function_html_checkboxes($params, Smarty_Internal_Template $template) { - require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); - + $template->_checkPlugins( + array( + array( + 'function' => 'smarty_function_escape_special_chars', + 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php' + ) + ) + ); $name = 'checkbox'; $values = null; $options = null; @@ -55,181 +61,226 @@ function smarty_function_html_checkboxes($params, $template) $labels = true; $label_ids = false; $output = null; - $extra = ''; - foreach ($params as $_key => $_val) { switch ($_key) { case 'name': case 'separator': - $$_key = (string) $_val; + $$_key = (string)$_val; break; - case 'escape': case 'labels': case 'label_ids': - $$_key = (bool) $_val; + $$_key = (bool)$_val; break; - case 'options': - $$_key = (array) $_val; + $$_key = (array)$_val; break; - case 'values': case 'output': - $$_key = array_values((array) $_val); + $$_key = array_values((array)$_val); break; - case 'checked': case 'selected': if (is_array($_val)) { $selected = array(); foreach ($_val as $_sel) { if (is_object($_sel)) { - if (method_exists($_sel, "__toString")) { - $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); + if (method_exists($_sel, '__toString')) { + $_sel = smarty_function_escape_special_chars((string)$_sel->__toString()); } else { - trigger_error("html_checkboxes: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE); + trigger_error( + 'html_checkboxes: selected attribute contains an object of class \'' . + get_class($_sel) . '\' without __toString() method', + E_USER_NOTICE + ); continue; } } else { - $_sel = smarty_function_escape_special_chars((string) $_sel); + $_sel = smarty_function_escape_special_chars((string)$_sel); } - $selected[$_sel] = true; + $selected[ $_sel ] = true; } } elseif (is_object($_val)) { - if (method_exists($_val, "__toString")) { - $selected = smarty_function_escape_special_chars((string) $_val->__toString()); + if (method_exists($_val, '__toString')) { + $selected = smarty_function_escape_special_chars((string)$_val->__toString()); } else { - trigger_error("html_checkboxes: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE); + trigger_error( + 'html_checkboxes: selected attribute is an object of class \'' . get_class($_val) . + '\' without __toString() method', + E_USER_NOTICE + ); } } else { - $selected = smarty_function_escape_special_chars((string) $_val); + $selected = smarty_function_escape_special_chars((string)$_val); } break; - case 'checkboxes': - trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); - $options = (array) $_val; + trigger_error( + 'html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', + E_USER_WARNING + ); + $options = (array)$_val; break; - case 'assign': break; - - case 'strict': break; - + case 'strict': + break; case 'disabled': case 'readonly': - if (!empty($params['strict'])) { + if (!empty($params[ 'strict' ])) { if (!is_scalar($_val)) { - trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE); + trigger_error( + "html_options: {$_key} attribute must be a scalar, only boolean true or string '{$_key}' will actually add the attribute", + E_USER_NOTICE + ); } - if ($_val === true || $_val === $_key) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_key) . '"'; } - break; } - // omit break; to fall through! - + // omit break; to fall through! + // no break default: if (!is_array($_val)) { - $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; + $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; } else { - trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + trigger_error("html_checkboxes: extra attribute '{$_key}' cannot be an array", E_USER_NOTICE); } break; } } - - if (!isset($options) && !isset($values)) - return ''; /* raise error here? */ - + if (!isset($options) && !isset($values)) { + return ''; + } /* raise error here? */ $_html_result = array(); - if (isset($options)) { - foreach ($options as $_key=>$_val) { - $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); + foreach ($options as $_key => $_val) { + $_html_result[] = + smarty_function_html_checkboxes_output( + $name, + $_key, + $_val, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape + ); } } else { - foreach ($values as $_i=>$_key) { - $_val = isset($output[$_i]) ? $output[$_i] : ''; - $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); + foreach ($values as $_i => $_key) { + $_val = isset($output[ $_i ]) ? $output[ $_i ] : ''; + $_html_result[] = + smarty_function_html_checkboxes_output( + $name, + $_key, + $_val, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape + ); } } - - if (!empty($params['assign'])) { - $template->assign($params['assign'], $_html_result); + if (!empty($params[ 'assign' ])) { + $template->assign($params[ 'assign' ], $_html_result); } else { return implode("\n", $_html_result); } - } -function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true) -{ +/** + * @param $name + * @param $value + * @param $output + * @param $selected + * @param $extra + * @param $separator + * @param $labels + * @param $label_ids + * @param bool $escape + * + * @return string + */ +function smarty_function_html_checkboxes_output( + $name, + $value, + $output, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape = true +) { $_output = ''; - if (is_object($value)) { - if (method_exists($value, "__toString")) { - $value = (string) $value->__toString(); + if (method_exists($value, '__toString')) { + $value = (string)$value->__toString(); } else { - trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE); - + trigger_error( + 'html_options: value is an object of class \'' . get_class($value) . + '\' without __toString() method', + E_USER_NOTICE + ); return ''; } } else { - $value = (string) $value; + $value = (string)$value; } - if (is_object($output)) { - if (method_exists($output, "__toString")) { - $output = (string) $output->__toString(); + if (method_exists($output, '__toString')) { + $output = (string)$output->__toString(); } else { - trigger_error("html_options: output is an object of class '". get_class($output) ."' without __toString() method", E_USER_NOTICE); - + trigger_error( + 'html_options: output is an object of class \'' . get_class($output) . + '\' without __toString() method', + E_USER_NOTICE + ); return ''; } } else { - $output = (string) $output; + $output = (string)$output; } - if ($labels) { if ($label_ids) { - $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value)); + $_id = smarty_function_escape_special_chars( + preg_replace( + '![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, + '_', + $name . '_' . $value + ) + ); $_output .= '
\n"; + } + return $status; + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_internal_undefined.php b/resources/templates/engine/smarty/sysplugins/smarty_internal_undefined.php new file mode 100644 index 0000000000..7df0acc2d0 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_internal_undefined.php @@ -0,0 +1,67 @@ +class = $class; + } + + /** + * Wrapper for obsolete class Smarty_Internal_Runtime_ValidateCompiled + * + * @param \Smarty_Internal_Template $tpl + * @param array $properties special template properties + * @param bool $cache flag if called from cache file + * + * @return bool false + */ + public function decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false) + { + if ($cache) { + $tpl->cached->valid = false; + } else { + $tpl->mustCompile = true; + } + return false; + } + + /** + * Call error handler for undefined method + * + * @param string $name unknown method-name + * @param array $args argument array + * + * @return mixed + * @throws SmartyException + */ + public function __call($name, $args) + { + if (isset($this->class)) { + throw new SmartyException("undefined extension class '{$this->class}'"); + } else { + throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method"); + } + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php b/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php deleted file mode 100644 index 8c8f9e6bea..0000000000 --- a/resources/templates/engine/smarty/sysplugins/smarty_internal_utility.php +++ /dev/null @@ -1,822 +0,0 @@ - - * @author Uwe Tews - * @package Smarty - * @subpackage PluginsInternal - * @version 3-SVN$Rev: 3286 $ - */ - -/** - * Utility class - * - * @package Smarty - * @subpackage Security - */ -class Smarty_Internal_Utility -{ - /** - * private constructor to prevent calls creation of new instances - */ - final private function __construct() - { - // intentionally left blank - } - - /** - * Compile all template files - * - * @param string $extension template file name extension - * @param bool $force_compile force all to recompile - * @param int $time_limit set maximum execution time - * @param int $max_errors set maximum allowed errors - * @param Smarty $smarty Smarty instance - * @return integer number of template files compiled - */ - public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) - { - // switch off time limit - if (function_exists('set_time_limit')) { - @set_time_limit($time_limit); - } - $smarty->force_compile = $force_compile; - $_count = 0; - $_error_count = 0; - // loop over array of template directories - foreach ($smarty->getTemplateDir() as $_dir) { - $_compileDirs = new RecursiveDirectoryIterator($_dir); - $_compile = new RecursiveIteratorIterator($_compileDirs); - foreach ($_compile as $_fileinfo) { - $_file = $_fileinfo->getFilename(); - if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue; - if (!substr_compare($_file, $extension, - strlen($extension)) == 0) continue; - if ($_fileinfo->getPath() == substr($_dir, 0, -1)) { - $_template_file = $_file; - } else { - $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; - } - echo '
', $_dir, '---', $_template_file; - flush(); - $_start_time = microtime(true); - try { - $_tpl = $smarty->createTemplate($_template_file,null,null,null,false); - if ($_tpl->mustCompile()) { - $_tpl->compileTemplateSource(); - $_count++; - echo ' compiled in ', microtime(true) - $_start_time, ' seconds'; - flush(); - } else { - echo ' is up to date'; - flush(); - } - } catch (Exception $e) { - echo 'Error: ', $e->getMessage(), "

"; - $_error_count++; - } - // free memory - $smarty->template_objects = array(); - $_tpl->smarty->template_objects = array(); - $_tpl = null; - if ($max_errors !== null && $_error_count == $max_errors) { - echo '

too many errors'; - exit(); - } - } - } - - return $_count; - } - - /** - * Compile all config files - * - * @param string $extension config file name extension - * @param bool $force_compile force all to recompile - * @param int $time_limit set maximum execution time - * @param int $max_errors set maximum allowed errors - * @param Smarty $smarty Smarty instance - * @return integer number of config files compiled - */ - public static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) - { - // switch off time limit - if (function_exists('set_time_limit')) { - @set_time_limit($time_limit); - } - $smarty->force_compile = $force_compile; - $_count = 0; - $_error_count = 0; - // loop over array of template directories - foreach ($smarty->getConfigDir() as $_dir) { - $_compileDirs = new RecursiveDirectoryIterator($_dir); - $_compile = new RecursiveIteratorIterator($_compileDirs); - foreach ($_compile as $_fileinfo) { - $_file = $_fileinfo->getFilename(); - if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue; - if (!substr_compare($_file, $extension, - strlen($extension)) == 0) continue; - if ($_fileinfo->getPath() == substr($_dir, 0, -1)) { - $_config_file = $_file; - } else { - $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; - } - echo '
', $_dir, '---', $_config_file; - flush(); - $_start_time = microtime(true); - try { - $_config = new Smarty_Internal_Config($_config_file, $smarty); - if ($_config->mustCompile()) { - $_config->compileConfigSource(); - $_count++; - echo ' compiled in ', microtime(true) - $_start_time, ' seconds'; - flush(); - } else { - echo ' is up to date'; - flush(); - } - } catch (Exception $e) { - echo 'Error: ', $e->getMessage(), "

"; - $_error_count++; - } - if ($max_errors !== null && $_error_count == $max_errors) { - echo '

too many errors'; - exit(); - } - } - } - - return $_count; - } - - /** - * Delete compiled template file - * - * @param string $resource_name template name - * @param string $compile_id compile id - * @param integer $exp_time expiration time - * @param Smarty $smarty Smarty instance - * @return integer number of template files deleted - */ - public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) - { - $_compile_dir = $smarty->getCompileDir(); - $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; - $_dir_sep = $smarty->use_sub_dirs ? DS : '^'; - if (isset($resource_name)) { - $_save_stat = $smarty->caching; - $smarty->caching = false; - $tpl = new $smarty->template_class($resource_name, $smarty); - $smarty->caching = $_save_stat; - - // remove from template cache - $tpl->source; // have the template registered before unset() - if ($smarty->allow_ambiguous_resources) { - $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id; - } else { - $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id; - } - if (isset($_templateId[150])) { - $_templateId = sha1($_templateId); - } - unset($smarty->template_objects[$_templateId]); - - if ($tpl->source->exists) { - $_resource_part_1 = basename(str_replace('^', '/', $tpl->compiled->filepath)); - $_resource_part_1_length = strlen($_resource_part_1); - } else { - return 0; - } - - $_resource_part_2 = str_replace('.php','.cache.php',$_resource_part_1); - $_resource_part_2_length = strlen($_resource_part_2); - } - $_dir = $_compile_dir; - if ($smarty->use_sub_dirs && isset($_compile_id)) { - $_dir .= $_compile_id . $_dir_sep; - } - if (isset($_compile_id)) { - $_compile_id_part = $_compile_dir . $_compile_id . $_dir_sep; - $_compile_id_part_length = strlen($_compile_id_part); - } - $_count = 0; - try { - $_compileDirs = new RecursiveDirectoryIterator($_dir); - // NOTE: UnexpectedValueException thrown for PHP >= 5.3 - } catch (Exception $e) { - return 0; - } - $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST); - foreach ($_compile as $_file) { - if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false || strpos($_file, '.git') !== false) continue; - - $_filepath = (string) $_file; - - if ($_file->isDir()) { - if (!$_compile->isDot()) { - // delete folder if empty - @rmdir($_file->getPathname()); - } - } else { - $unlink = false; - if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length))) - && (!isset($resource_name) - || (isset($_filepath[$_resource_part_1_length]) - && substr_compare($_filepath, $_resource_part_1, -$_resource_part_1_length, $_resource_part_1_length) == 0) - || (isset($_filepath[$_resource_part_2_length]) - && substr_compare($_filepath, $_resource_part_2, -$_resource_part_2_length, $_resource_part_2_length) == 0))) { - if (isset($exp_time)) { - if (time() - @filemtime($_filepath) >= $exp_time) { - $unlink = true; - } - } else { - $unlink = true; - } - } - - if ($unlink && @unlink($_filepath)) { - $_count++; - } - } - } - // clear compiled cache - Smarty_Resource::$sources = array(); - Smarty_Resource::$compileds = array(); - - return $_count; - } - - /** - * Return array of tag/attributes of all tags used by an template - * - * @param Smarty_Internal_Template $templae template object - * @return array of tag/attributes - */ - public static function getTags(Smarty_Internal_Template $template) - { - $template->smarty->get_used_tags = true; - $template->compileTemplateSource(); - - return $template->used_tags; - } - - /** - * diagnose Smarty setup - * - * If $errors is secified, the diagnostic report will be appended to the array, rather than being output. - * - * @param Smarty $smarty Smarty instance to test - * @param array $errors array to push results into rather than outputting them - * @return bool status, true if everything is fine, false else - */ - public static function testInstall(Smarty $smarty, &$errors=null) - { - $status = true; - - if ($errors === null) { - echo "
\n";
-            echo "Smarty Installation test...\n";
-            echo "Testing template directory...\n";
-        }
-
-        $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
-
-        // test if all registered template_dir are accessible
-        foreach ($smarty->getTemplateDir() as $template_dir) {
-            $_template_dir = $template_dir;
-            $template_dir = realpath($template_dir);
-            // resolve include_path or fail existence
-            if (!$template_dir) {
-                if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
-                    // try PHP include_path
-                    if ($_stream_resolve_include_path) {
-                        $template_dir = stream_resolve_include_path($_template_dir);
-                    } else {
-                        $template_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_template_dir);
-                    }
-
-                    if ($template_dir !== false) {
-                        if ($errors === null) {
-                            echo "$template_dir is OK.\n";
-                        }
-
-                        continue;
-                    } else {
-                        $status = false;
-                        $message = "FAILED: $_template_dir does not exist (and couldn't be found in include_path either)";
-                        if ($errors === null) {
-                            echo $message . ".\n";
-                        } else {
-                            $errors['template_dir'] = $message;
-                        }
-
-                        continue;
-                    }
-                } else {
-                    $status = false;
-                    $message = "FAILED: $_template_dir does not exist";
-                    if ($errors === null) {
-                        echo $message . ".\n";
-                    } else {
-                        $errors['template_dir'] = $message;
-                    }
-
-                    continue;
-                }
-            }
-
-            if (!is_dir($template_dir)) {
-                $status = false;
-                $message = "FAILED: $template_dir is not a directory";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['template_dir'] = $message;
-                }
-            } elseif (!is_readable($template_dir)) {
-                $status = false;
-                $message = "FAILED: $template_dir is not readable";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['template_dir'] = $message;
-                }
-            } else {
-                if ($errors === null) {
-                    echo "$template_dir is OK.\n";
-                }
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing compile directory...\n";
-        }
-
-        // test if registered compile_dir is accessible
-        $__compile_dir = $smarty->getCompileDir();
-        $_compile_dir = realpath($__compile_dir);
-        if (!$_compile_dir) {
-            $status = false;
-            $message = "FAILED: {$__compile_dir} does not exist";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['compile_dir'] = $message;
-            }
-        } elseif (!is_dir($_compile_dir)) {
-            $status = false;
-            $message = "FAILED: {$_compile_dir} is not a directory";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['compile_dir'] = $message;
-            }
-        } elseif (!is_readable($_compile_dir)) {
-            $status = false;
-            $message = "FAILED: {$_compile_dir} is not readable";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['compile_dir'] = $message;
-            }
-        } elseif (!is_writable($_compile_dir)) {
-            $status = false;
-            $message = "FAILED: {$_compile_dir} is not writable";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['compile_dir'] = $message;
-            }
-        } else {
-            if ($errors === null) {
-                echo "{$_compile_dir} is OK.\n";
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing plugins directory...\n";
-        }
-
-        // test if all registered plugins_dir are accessible
-        // and if core plugins directory is still registered
-        $_core_plugins_dir = realpath(dirname(__FILE__) .'/../plugins');
-        $_core_plugins_available = false;
-        foreach ($smarty->getPluginsDir() as $plugin_dir) {
-            $_plugin_dir = $plugin_dir;
-            $plugin_dir = realpath($plugin_dir);
-            // resolve include_path or fail existence
-            if (!$plugin_dir) {
-                if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
-                    // try PHP include_path
-                    if ($_stream_resolve_include_path) {
-                        $plugin_dir = stream_resolve_include_path($_plugin_dir);
-                    } else {
-                        $plugin_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_plugin_dir);
-                    }
-
-                    if ($plugin_dir !== false) {
-                        if ($errors === null) {
-                            echo "$plugin_dir is OK.\n";
-                        }
-
-                        continue;
-                    } else {
-                        $status = false;
-                        $message = "FAILED: $_plugin_dir does not exist (and couldn't be found in include_path either)";
-                        if ($errors === null) {
-                            echo $message . ".\n";
-                        } else {
-                            $errors['plugins_dir'] = $message;
-                        }
-
-                        continue;
-                    }
-                } else {
-                    $status = false;
-                    $message = "FAILED: $_plugin_dir does not exist";
-                    if ($errors === null) {
-                        echo $message . ".\n";
-                    } else {
-                        $errors['plugins_dir'] = $message;
-                    }
-
-                    continue;
-                }
-            }
-
-            if (!is_dir($plugin_dir)) {
-                $status = false;
-                $message = "FAILED: $plugin_dir is not a directory";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['plugins_dir'] = $message;
-                }
-            } elseif (!is_readable($plugin_dir)) {
-                $status = false;
-                $message = "FAILED: $plugin_dir is not readable";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['plugins_dir'] = $message;
-                }
-            } elseif ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {
-                $_core_plugins_available = true;
-                if ($errors === null) {
-                    echo "$plugin_dir is OK.\n";
-                }
-            } else {
-                if ($errors === null) {
-                    echo "$plugin_dir is OK.\n";
-                }
-            }
-        }
-        if (!$_core_plugins_available) {
-            $status = false;
-            $message = "WARNING: Smarty's own libs/plugins is not available";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } elseif (!isset($errors['plugins_dir'])) {
-                $errors['plugins_dir'] = $message;
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing cache directory...\n";
-        }
-
-        // test if all registered cache_dir is accessible
-        $__cache_dir = $smarty->getCacheDir();
-        $_cache_dir = realpath($__cache_dir);
-        if (!$_cache_dir) {
-            $status = false;
-            $message = "FAILED: {$__cache_dir} does not exist";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['cache_dir'] = $message;
-            }
-        } elseif (!is_dir($_cache_dir)) {
-            $status = false;
-            $message = "FAILED: {$_cache_dir} is not a directory";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['cache_dir'] = $message;
-            }
-        } elseif (!is_readable($_cache_dir)) {
-            $status = false;
-            $message = "FAILED: {$_cache_dir} is not readable";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['cache_dir'] = $message;
-            }
-        } elseif (!is_writable($_cache_dir)) {
-            $status = false;
-            $message = "FAILED: {$_cache_dir} is not writable";
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['cache_dir'] = $message;
-            }
-        } else {
-            if ($errors === null) {
-                echo "{$_cache_dir} is OK.\n";
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing configs directory...\n";
-        }
-
-        // test if all registered config_dir are accessible
-        foreach ($smarty->getConfigDir() as $config_dir) {
-            $_config_dir = $config_dir;
-            $config_dir = realpath($config_dir);
-            // resolve include_path or fail existence
-            if (!$config_dir) {
-                if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_config_dir)) {
-                    // try PHP include_path
-                    if ($_stream_resolve_include_path) {
-                        $config_dir = stream_resolve_include_path($_config_dir);
-                    } else {
-                        $config_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_config_dir);
-                    }
-
-                    if ($config_dir !== false) {
-                        if ($errors === null) {
-                            echo "$config_dir is OK.\n";
-                        }
-
-                        continue;
-                    } else {
-                        $status = false;
-                        $message = "FAILED: $_config_dir does not exist (and couldn't be found in include_path either)";
-                        if ($errors === null) {
-                            echo $message . ".\n";
-                        } else {
-                            $errors['config_dir'] = $message;
-                        }
-
-                        continue;
-                    }
-                } else {
-                    $status = false;
-                    $message = "FAILED: $_config_dir does not exist";
-                    if ($errors === null) {
-                        echo $message . ".\n";
-                    } else {
-                        $errors['config_dir'] = $message;
-                    }
-
-                    continue;
-                }
-            }
-
-            if (!is_dir($config_dir)) {
-                $status = false;
-                $message = "FAILED: $config_dir is not a directory";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['config_dir'] = $message;
-                }
-            } elseif (!is_readable($config_dir)) {
-                $status = false;
-                $message = "FAILED: $config_dir is not readable";
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['config_dir'] = $message;
-                }
-            } else {
-                if ($errors === null) {
-                    echo "$config_dir is OK.\n";
-                }
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing sysplugin files...\n";
-        }
-        // test if sysplugins are available
-        $source = SMARTY_SYSPLUGINS_DIR;
-        if (is_dir($source)) {
-            $expected = array(
-                "smarty_cacheresource.php" => true,
-                "smarty_cacheresource_custom.php" => true,
-                "smarty_cacheresource_keyvaluestore.php" => true,
-                "smarty_config_source.php" => true,
-                "smarty_internal_cacheresource_file.php" => true,
-                "smarty_internal_compile_append.php" => true,
-                "smarty_internal_compile_assign.php" => true,
-                "smarty_internal_compile_block.php" => true,
-                "smarty_internal_compile_break.php" => true,
-                "smarty_internal_compile_call.php" => true,
-                "smarty_internal_compile_capture.php" => true,
-                "smarty_internal_compile_config_load.php" => true,
-                "smarty_internal_compile_continue.php" => true,
-                "smarty_internal_compile_debug.php" => true,
-                "smarty_internal_compile_eval.php" => true,
-                "smarty_internal_compile_extends.php" => true,
-                "smarty_internal_compile_for.php" => true,
-                "smarty_internal_compile_foreach.php" => true,
-                "smarty_internal_compile_function.php" => true,
-                "smarty_internal_compile_if.php" => true,
-                "smarty_internal_compile_include.php" => true,
-                "smarty_internal_compile_include_php.php" => true,
-                "smarty_internal_compile_insert.php" => true,
-                "smarty_internal_compile_ldelim.php" => true,
-                "smarty_internal_compile_nocache.php" => true,
-                "smarty_internal_compile_private_block_plugin.php" => true,
-                "smarty_internal_compile_private_function_plugin.php" => true,
-                "smarty_internal_compile_private_modifier.php" => true,
-                "smarty_internal_compile_private_object_block_function.php" => true,
-                "smarty_internal_compile_private_object_function.php" => true,
-                "smarty_internal_compile_private_print_expression.php" => true,
-                "smarty_internal_compile_private_registered_block.php" => true,
-                "smarty_internal_compile_private_registered_function.php" => true,
-                "smarty_internal_compile_private_special_variable.php" => true,
-                "smarty_internal_compile_rdelim.php" => true,
-                "smarty_internal_compile_section.php" => true,
-                "smarty_internal_compile_setfilter.php" => true,
-                "smarty_internal_compile_while.php" => true,
-                "smarty_internal_compilebase.php" => true,
-                "smarty_internal_config.php" => true,
-                "smarty_internal_config_file_compiler.php" => true,
-                "smarty_internal_configfilelexer.php" => true,
-                "smarty_internal_configfileparser.php" => true,
-                "smarty_internal_data.php" => true,
-                "smarty_internal_debug.php" => true,
-                "smarty_internal_filter_handler.php" => true,
-                "smarty_internal_function_call_handler.php" => true,
-                "smarty_internal_get_include_path.php" => true,
-                "smarty_internal_nocache_insert.php" => true,
-                "smarty_internal_parsetree.php" => true,
-                "smarty_internal_resource_eval.php" => true,
-                "smarty_internal_resource_extends.php" => true,
-                "smarty_internal_resource_file.php" => true,
-                "smarty_internal_resource_registered.php" => true,
-                "smarty_internal_resource_stream.php" => true,
-                "smarty_internal_resource_string.php" => true,
-                "smarty_internal_smartytemplatecompiler.php" => true,
-                "smarty_internal_template.php" => true,
-                "smarty_internal_templatebase.php" => true,
-                "smarty_internal_templatecompilerbase.php" => true,
-                "smarty_internal_templatelexer.php" => true,
-                "smarty_internal_templateparser.php" => true,
-                "smarty_internal_utility.php" => true,
-                "smarty_internal_write_file.php" => true,
-                "smarty_resource.php" => true,
-                "smarty_resource_custom.php" => true,
-                "smarty_resource_recompiled.php" => true,
-                "smarty_resource_uncompiled.php" => true,
-                "smarty_security.php" => true,
-            );
-            $iterator = new DirectoryIterator($source);
-            foreach ($iterator as $file) {
-                if (!$file->isDot()) {
-                    $filename = $file->getFilename();
-                    if (isset($expected[$filename])) {
-                        unset($expected[$filename]);
-                    }
-                }
-            }
-            if ($expected) {
-                $status = false;
-                $message = "FAILED: files missing from libs/sysplugins: ". join(', ', array_keys($expected));
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['sysplugins'] = $message;
-                }
-            } elseif ($errors === null) {
-                echo "... OK\n";
-            }
-        } else {
-            $status = false;
-            $message = "FAILED: ". SMARTY_SYSPLUGINS_DIR .' is not a directory';
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['sysplugins_dir_constant'] = $message;
-            }
-        }
-
-        if ($errors === null) {
-            echo "Testing plugin files...\n";
-        }
-        // test if core plugins are available
-        $source = SMARTY_PLUGINS_DIR;
-        if (is_dir($source)) {
-            $expected = array(
-                "block.textformat.php" => true,
-                "function.counter.php" => true,
-                "function.cycle.php" => true,
-                "function.fetch.php" => true,
-                "function.html_checkboxes.php" => true,
-                "function.html_image.php" => true,
-                "function.html_options.php" => true,
-                "function.html_radios.php" => true,
-                "function.html_select_date.php" => true,
-                "function.html_select_time.php" => true,
-                "function.html_table.php" => true,
-                "function.mailto.php" => true,
-                "function.math.php" => true,
-                "modifier.capitalize.php" => true,
-                "modifier.date_format.php" => true,
-                "modifier.debug_print_var.php" => true,
-                "modifier.escape.php" => true,
-                "modifier.regex_replace.php" => true,
-                "modifier.replace.php" => true,
-                "modifier.spacify.php" => true,
-                "modifier.truncate.php" => true,
-                "modifiercompiler.cat.php" => true,
-                "modifiercompiler.count_characters.php" => true,
-                "modifiercompiler.count_paragraphs.php" => true,
-                "modifiercompiler.count_sentences.php" => true,
-                "modifiercompiler.count_words.php" => true,
-                "modifiercompiler.default.php" => true,
-                "modifiercompiler.escape.php" => true,
-                "modifiercompiler.from_charset.php" => true,
-                "modifiercompiler.indent.php" => true,
-                "modifiercompiler.lower.php" => true,
-                "modifiercompiler.noprint.php" => true,
-                "modifiercompiler.string_format.php" => true,
-                "modifiercompiler.strip.php" => true,
-                "modifiercompiler.strip_tags.php" => true,
-                "modifiercompiler.to_charset.php" => true,
-                "modifiercompiler.unescape.php" => true,
-                "modifiercompiler.upper.php" => true,
-                "modifiercompiler.wordwrap.php" => true,
-                "outputfilter.trimwhitespace.php" => true,
-                "shared.escape_special_chars.php" => true,
-                "shared.literal_compiler_param.php" => true,
-                "shared.make_timestamp.php" => true,
-                "shared.mb_str_replace.php" => true,
-                "shared.mb_unicode.php" => true,
-                "shared.mb_wordwrap.php" => true,
-                "variablefilter.htmlspecialchars.php" => true,
-            );
-            $iterator = new DirectoryIterator($source);
-            foreach ($iterator as $file) {
-                if (!$file->isDot()) {
-                    $filename = $file->getFilename();
-                    if (isset($expected[$filename])) {
-                        unset($expected[$filename]);
-                    }
-                }
-            }
-            if ($expected) {
-                $status = false;
-                $message = "FAILED: files missing from libs/plugins: ". join(', ', array_keys($expected));
-                if ($errors === null) {
-                    echo $message . ".\n";
-                } else {
-                    $errors['plugins'] = $message;
-                }
-            } elseif ($errors === null) {
-                echo "... OK\n";
-            }
-        } else {
-            $status = false;
-            $message = "FAILED: ". SMARTY_PLUGINS_DIR .' is not a directory';
-            if ($errors === null) {
-                echo $message . ".\n";
-            } else {
-                $errors['plugins_dir_constant'] = $message;
-            }
-        }
-
-        if ($errors === null) {
-            echo "Tests complete.\n";
-            echo "
\n"; - } - - return $status; - } - -} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_resource.php b/resources/templates/engine/smarty/sysplugins/smarty_resource.php index 0cb4ce0bec..aae7e42f70 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_resource.php +++ b/resources/templates/engine/smarty/sysplugins/smarty_resource.php @@ -2,73 +2,191 @@ /** * Smarty Resource Plugin * - * @package Smarty + * @package Smarty * @subpackage TemplateResources - * @author Rodney Rehm + * @author Rodney Rehm */ /** * Smarty Resource Plugin - * * Base implementation for resource plugins * - * @package Smarty + * @package Smarty * @subpackage TemplateResources + * + * @method renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template) + * @method populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template) + * @method process(Smarty_Internal_Template $_smarty_tpl) */ abstract class Smarty_Resource { - /** - * cache for Smarty_Template_Source instances - * @var array - */ - public static $sources = array(); - /** - * cache for Smarty_Template_Compiled instances - * @var array - */ - public static $compileds = array(); - /** - * cache for Smarty_Resource instances - * @var array - */ - public static $resources = array(); /** * resource types provided by the core + * * @var array */ - protected static $sysplugins = array( - 'file' => true, - 'string' => true, - 'extends' => true, - 'stream' => true, - 'eval' => true, - 'php' => true + public static $sysplugins = array( + 'file' => 'smarty_internal_resource_file.php', + 'string' => 'smarty_internal_resource_string.php', + 'extends' => 'smarty_internal_resource_extends.php', + 'stream' => 'smarty_internal_resource_stream.php', + 'eval' => 'smarty_internal_resource_eval.php', + 'php' => 'smarty_internal_resource_php.php' ); /** - * Name of the Class to compile this resource's contents with - * @var string + * Source is bypassing compiler + * + * @var boolean */ - public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler'; + public $uncompiled = false; /** - * Name of the Class to tokenize this resource's contents with - * @var string + * Source must be recompiled on every occasion + * + * @var boolean */ - public $template_lexer_class = 'Smarty_Internal_Templatelexer'; + public $recompiled = false; /** - * Name of the Class to parse this resource's contents with - * @var string + * Flag if resource does implement populateCompiledFilepath() method + * + * @var bool */ - public $template_parser_class = 'Smarty_Internal_Templateparser'; + public $hasCompiledHandler = false; + + /** + * Load Resource Handler + * + * @param Smarty $smarty smarty object + * @param string $type name of the resource + * + * @throws SmartyException + * @return Smarty_Resource Resource Handler + */ + public static function load(Smarty $smarty, $type) + { + // try smarty's cache + if (isset($smarty->_cache[ 'resource_handlers' ][ $type ])) { + return $smarty->_cache[ 'resource_handlers' ][ $type ]; + } + // try registered resource + if (isset($smarty->registered_resources[ $type ])) { + return $smarty->_cache[ 'resource_handlers' ][ $type ] = + $smarty->registered_resources[ $type ] instanceof Smarty_Resource ? + $smarty->registered_resources[ $type ] : new Smarty_Internal_Resource_Registered(); + } + // try sysplugins dir + if (isset(self::$sysplugins[ $type ])) { + $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type); + return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class(); + } + // try plugins dir + $_resource_class = 'Smarty_Resource_' . ucfirst($type); + if ($smarty->loadPlugin($_resource_class)) { + if (class_exists($_resource_class, false)) { + return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class(); + } else { + $smarty->registerResource( + $type, + array( + "smarty_resource_{$type}_source", "smarty_resource_{$type}_timestamp", + "smarty_resource_{$type}_secure", "smarty_resource_{$type}_trusted" + ) + ); + // give it another try, now that the resource is registered properly + return self::load($smarty, $type); + } + } + // try streams + $_known_stream = stream_get_wrappers(); + if (in_array($type, $_known_stream)) { + // is known stream + if (is_object($smarty->security_policy)) { + $smarty->security_policy->isTrustedStream($type); + } + return $smarty->_cache[ 'resource_handlers' ][ $type ] = new Smarty_Internal_Resource_Stream(); + } + // TODO: try default_(template|config)_handler + // give up + throw new SmartyException("Unknown resource type '{$type}'"); + } + + /** + * extract resource_type and resource_name from template_resource and config_resource + * + * @note "C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including). + * + * @param string $resource_name template_resource or config_resource to parse + * @param string $default_resource the default resource_type defined in $smarty + * + * @return array with parsed resource name and type + */ + public static function parseResourceName($resource_name, $default_resource) + { + if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]/', $resource_name, $match)) { + $type = $match[ 1 ]; + $name = substr($resource_name, strlen($match[ 0 ])); + } else { + // no resource given, use default + // or single character before the colon is not a resource type, but part of the filepath + $type = $default_resource; + $name = $resource_name; + } + return array($name, $type); + } + + /** + * modify template_resource according to resource handlers specifications + * + * @param \Smarty_Internal_Template|\Smarty $obj Smarty instance + * @param string $template_resource template_resource to extract resource handler and + * name of + * + * @return string unique resource name + * @throws \SmartyException + */ + public static function getUniqueTemplateName($obj, $template_resource) + { + $smarty = $obj->_getSmartyObj(); + list($name, $type) = self::parseResourceName($template_resource, $smarty->default_resource_type); + // TODO: optimize for Smarty's internal resource types + $resource = Smarty_Resource::load($smarty, $type); + // go relative to a given template? + $_file_is_dotted = $name[ 0 ] === '.' && ($name[ 1 ] === '.' || $name[ 1 ] === '/'); + if ($obj->_isTplObj() && $_file_is_dotted + && ($obj->source->type === 'file' || $obj->parent->source->type === 'extends') + ) { + $name = $smarty->_realpath(dirname($obj->parent->source->filepath) . DIRECTORY_SEPARATOR . $name); + } + return $resource->buildUniqueResourceName($smarty, $name); + } + + /** + * initialize Source Object for given resource + * wrapper for backward compatibility to versions < 3.1.22 + * Either [$_template] or [$smarty, $template_resource] must be specified + * + * @param Smarty_Internal_Template $_template template object + * @param Smarty $smarty smarty object + * @param string $template_resource resource identifier + * + * @return \Smarty_Template_Source Source Object + * @throws \SmartyException + */ + public static function source( + Smarty_Internal_Template $_template = null, + Smarty $smarty = null, + $template_resource = null + ) { + return Smarty_Template_Source::load($_template, $smarty, $template_resource); + } /** * Load template's source into current template object * - * {@internal The loaded source is assigned to $_template->source->content directly.}} + * @param Smarty_Template_Source $source source object * - * @param Smarty_Template_Source $source source object * @return string template source * @throws SmartyException if source cannot be loaded */ @@ -80,7 +198,7 @@ abstract class Smarty_Resource * @param Smarty_Template_Source $source source object * @param Smarty_Internal_Template $_template template object */ - abstract public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null); + abstract public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null); /** * populate Source Object with timestamp and exists from Resource @@ -95,775 +213,50 @@ abstract class Smarty_Resource /** * modify resource_name according to resource handlers specifications * - * @param Smarty $smarty Smarty instance - * @param string $resource_name resource_name to make unique - * @param boolean $is_config flag for config resource + * @param Smarty $smarty Smarty instance + * @param string $resource_name resource_name to make unique + * @param boolean $isConfig flag for config resource + * * @return string unique resource name */ - protected function buildUniqueResourceName(Smarty $smarty, $resource_name, $is_config = false) + public function buildUniqueResourceName(Smarty $smarty, $resource_name, $isConfig = false) { - if ($is_config) { - return get_class($this) . '#' . $smarty->joined_config_dir . '#' . $resource_name; + if ($isConfig) { + if (!isset($smarty->_joined_config_dir)) { + $smarty->getTemplateDir(null, true); + } + return get_class($this) . '#' . $smarty->_joined_config_dir . '#' . $resource_name; } else { - return get_class($this) . '#' . $smarty->joined_template_dir . '#' . $resource_name; + if (!isset($smarty->_joined_template_dir)) { + $smarty->getTemplateDir(); + } + return get_class($this) . '#' . $smarty->_joined_template_dir . '#' . $resource_name; } } - /** - * populate Compiled Object with compiled filepath + /* + * Check if resource must check time stamps when when loading complied or cached templates. + * Resources like 'extends' which use source components my disable timestamp checks on own resource. * - * @param Smarty_Template_Compiled $compiled compiled object - * @param Smarty_Internal_Template $_template template object + * @return bool */ - public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template) - { - $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null; - $_filepath = $compiled->source->uid; - // if use_sub_dirs, break file into directories - if ($_template->smarty->use_sub_dirs) { - $_filepath = substr($_filepath, 0, 2) . DS - . substr($_filepath, 2, 2) . DS - . substr($_filepath, 4, 2) . DS - . $_filepath; - } - $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^'; - if (isset($_compile_id)) { - $_filepath = $_compile_id . $_compile_dir_sep . $_filepath; - } - // caching token - if ($_template->caching) { - $_cache = '.cache'; - } else { - $_cache = ''; - } - $_compile_dir = $_template->smarty->getCompileDir(); - // set basename if not specified - $_basename = $this->getBasename($compiled->source); - if ($_basename === null) { - $_basename = basename( preg_replace('![^\w\/]+!', '_', $compiled->source->name) ); - } - // separate (optional) basename by dot - if ($_basename) { - $_basename = '.' . $_basename; - } - - $compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php'; - } - - /** - * Normalize Paths "foo/../bar" to "bar" - * - * @param string $_path path to normalize - * @param boolean $ds respect windows directory separator - * @return string normalized path - */ - protected function normalizePath($_path, $ds=true) - { - if ($ds) { - // don't we all just love windows? - $_path = str_replace('\\', '/', $_path); - } - - $offset = 0; - - // resolve simples - $_path = preg_replace('#/\./(\./)*#', '/', $_path); - // resolve parents - while (true) { - $_parent = strpos($_path, '/../', $offset); - if (!$_parent) { - break; - } elseif ($_path[$_parent - 1] === '.') { - $offset = $_parent + 3; - continue; - } - - $_pos = strrpos($_path, '/', $_parent - strlen($_path) - 1); - if ($_pos === false) { - // don't we all just love windows? - $_pos = $_parent; - } - - $_path = substr_replace($_path, '', $_pos, $_parent + 3 - $_pos); - } - - if ($ds && DS != '/') { - // don't we all just love windows? - $_path = str_replace('/', '\\', $_path); - } - - return $_path; - } - - /** - * build template filepath by traversing the template_dir array - * - * @param Smarty_Template_Source $source source object - * @param Smarty_Internal_Template $_template template object - * @return string fully qualified filepath - * @throws SmartyException if default template handler is registered but not callable - */ - protected function buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null) - { - $file = $source->name; - if ($source instanceof Smarty_Config_Source) { - $_directories = $source->smarty->getConfigDir(); - $_default_handler = $source->smarty->default_config_handler_func; - } else { - $_directories = $source->smarty->getTemplateDir(); - $_default_handler = $source->smarty->default_template_handler_func; - } - - // go relative to a given template? - $_file_is_dotted = $file[0] == '.' && ($file[1] == '.' || $file[1] == '/' || $file[1] == "\\"); - if ($_template && $_template->parent instanceof Smarty_Internal_Template && $_file_is_dotted) { - if ($_template->parent->source->type != 'file' && $_template->parent->source->type != 'extends' && !$_template->parent->allow_relative_path) { - throw new SmartyException("Template '{$file}' cannot be relative to template of resource type '{$_template->parent->source->type}'"); - } - $file = dirname($_template->parent->source->filepath) . DS . $file; - $_file_exact_match = true; - if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) { - // the path gained from the parent template is relative to the current working directory - // as expansions (like include_path) have already been done - $file = getcwd() . DS . $file; - } - } - - // resolve relative path - if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) { - // don't we all just love windows? - $_path = str_replace('\\', '/', $file); - $_path = DS . trim($file, '/'); - $_was_relative = true; - } else { - // don't we all just love windows? - $_path = str_replace('\\', '/', $file); - } - $_path = $this->normalizePath($_path, false); - if (DS != '/') { - // don't we all just love windows? - $_path = str_replace('/', '\\', $_path); - } - // revert to relative - if (isset($_was_relative)) { - $_path = substr($_path, 1); - } - - // this is only required for directories - $file = rtrim($_path, '/\\'); - - // files relative to a template only get one shot - if (isset($_file_exact_match)) { - return $this->fileExists($source, $file) ? $file : false; - } - - // template_dir index? - if (preg_match('#^\[(?P[^\]]+)\](?P.+)$#', $file, $match)) { - $_directory = null; - // try string indexes - if (isset($_directories[$match['key']])) { - $_directory = $_directories[$match['key']]; - } elseif (is_numeric($match['key'])) { - // try numeric index - $match['key'] = (int) $match['key']; - if (isset($_directories[$match['key']])) { - $_directory = $_directories[$match['key']]; - } else { - // try at location index - $keys = array_keys($_directories); - $_directory = $_directories[$keys[$match['key']]]; - } - } - - if ($_directory) { - $_file = substr($file, strpos($file, ']') + 1); - $_filepath = $_directory . $_file; - if ($this->fileExists($source, $_filepath)) { - return $_filepath; - } - } - } - - $_stream_resolve_include_path = function_exists('stream_resolve_include_path'); - - // relative file name? - if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) { - foreach ($_directories as $_directory) { - $_filepath = $_directory . $file; - if ($this->fileExists($source, $_filepath)) { - return $this->normalizePath($_filepath); - } - if ($source->smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_directory)) { - // try PHP include_path - if ($_stream_resolve_include_path) { - $_filepath = stream_resolve_include_path($_filepath); - } else { - $_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath); - } - - if ($_filepath !== false) { - if ($this->fileExists($source, $_filepath)) { - return $this->normalizePath($_filepath); - } - } - } - } - } - - // try absolute filepath - if ($this->fileExists($source, $file)) { - return $file; - } - - // no tpl file found - if ($_default_handler) { - if (!is_callable($_default_handler)) { - if ($source instanceof Smarty_Config_Source) { - throw new SmartyException("Default config handler not callable"); - } else { - throw new SmartyException("Default template handler not callable"); - } - } - $_return = call_user_func_array($_default_handler, - array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty)); - if (is_string($_return)) { - $source->timestamp = @filemtime($_return); - $source->exists = !!$source->timestamp; - - return $_return; - } elseif ($_return === true) { - $source->content = $_content; - $source->timestamp = $_timestamp; - $source->exists = true; - - return $_filepath; - } - } - - // give up - return false; - } - - /** - * test is file exists and save timestamp - * - * @param Smarty_Template_Source $source source object - * @param string $file file name - * @return bool true if file exists - */ - protected function fileExists(Smarty_Template_Source $source, $file) - { - $source->timestamp = is_file($file) ? @filemtime($file) : false; - - return $source->exists = !!$source->timestamp; - - } - /** * Determine basename for compiled filename * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object + * * @return string resource's basename */ - protected function getBasename(Smarty_Template_Source $source) + public function getBasename(Smarty_Template_Source $source) { - return null; + return basename(preg_replace('![^\w]+!', '_', $source->name)); } /** - * Load Resource Handler - * - * @param Smarty $smarty smarty object - * @param string $type name of the resource - * @return Smarty_Resource Resource Handler + * @return bool */ - public static function load(Smarty $smarty, $type) + public function checkTimestamps() { - // try smarty's cache - if (isset($smarty->_resource_handlers[$type])) { - return $smarty->_resource_handlers[$type]; - } - - // try registered resource - if (isset($smarty->registered_resources[$type])) { - if ($smarty->registered_resources[$type] instanceof Smarty_Resource) { - $smarty->_resource_handlers[$type] = $smarty->registered_resources[$type]; - // note registered to smarty is not kept unique! - return $smarty->_resource_handlers[$type]; - } - - if (!isset(self::$resources['registered'])) { - self::$resources['registered'] = new Smarty_Internal_Resource_Registered(); - } - if (!isset($smarty->_resource_handlers[$type])) { - $smarty->_resource_handlers[$type] = self::$resources['registered']; - } - - return $smarty->_resource_handlers[$type]; - } - - // try sysplugins dir - if (isset(self::$sysplugins[$type])) { - if (!isset(self::$resources[$type])) { - $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type); - self::$resources[$type] = new $_resource_class(); - } - - return $smarty->_resource_handlers[$type] = self::$resources[$type]; - } - - // try plugins dir - $_resource_class = 'Smarty_Resource_' . ucfirst($type); - if ($smarty->loadPlugin($_resource_class)) { - if (isset(self::$resources[$type])) { - return $smarty->_resource_handlers[$type] = self::$resources[$type]; - } - - if (class_exists($_resource_class, false)) { - self::$resources[$type] = new $_resource_class(); - - return $smarty->_resource_handlers[$type] = self::$resources[$type]; - } else { - $smarty->registerResource($type, array( - "smarty_resource_{$type}_source", - "smarty_resource_{$type}_timestamp", - "smarty_resource_{$type}_secure", - "smarty_resource_{$type}_trusted" - )); - - // give it another try, now that the resource is registered properly - return self::load($smarty, $type); - } - } - - // try streams - $_known_stream = stream_get_wrappers(); - if (in_array($type, $_known_stream)) { - // is known stream - if (is_object($smarty->security_policy)) { - $smarty->security_policy->isTrustedStream($type); - } - if (!isset(self::$resources['stream'])) { - self::$resources['stream'] = new Smarty_Internal_Resource_Stream(); - } - - return $smarty->_resource_handlers[$type] = self::$resources['stream']; - } - - // TODO: try default_(template|config)_handler - - // give up - throw new SmartyException("Unkown resource type '{$type}'"); + return true; } - - /** - * extract resource_type and resource_name from template_resource and config_resource - * - * @note "C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including). - * @param string $resource_name template_resource or config_resource to parse - * @param string $default_resource the default resource_type defined in $smarty - * @param string &$name the parsed resource name - * @param string &$type the parsed resource type - * @return void - */ - protected static function parseResourceName($resource_name, $default_resource, &$name, &$type) - { - $parts = explode(':', $resource_name, 2); - if (!isset($parts[1]) || !isset($parts[0][1])) { - // no resource given, use default - // or single character before the colon is not a resource type, but part of the filepath - $type = $default_resource; - $name = $resource_name; - } else { - $type = $parts[0]; - $name = $parts[1]; - } - } - - /** - * modify resource_name according to resource handlers specifications - * - * @param Smarty $smarty Smarty instance - * @param string $resource_name resource_name to make unique - * @return string unique resource name - */ - - /** - * modify template_resource according to resource handlers specifications - * - * @param string $smarty Smarty instance - * @param string $template_resource template_resource to extracate resource handler and name of - * @return string unique resource name - */ - public static function getUniqueTemplateName($smarty, $template_resource) - { - self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type); - // TODO: optimize for Smarty's internal resource types - $resource = Smarty_Resource::load($smarty, $type); - - return $resource->buildUniqueResourceName($smarty, $name); - } - - /** - * initialize Source Object for given resource - * - * Either [$_template] or [$smarty, $template_resource] must be specified - * - * @param Smarty_Internal_Template $_template template object - * @param Smarty $smarty smarty object - * @param string $template_resource resource identifier - * @return Smarty_Template_Source Source Object - */ - public static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null) - { - if ($_template) { - $smarty = $_template->smarty; - $template_resource = $_template->template_resource; - } - - // parse resource_name, load resource handler, identify unique resource name - self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type); - $resource = Smarty_Resource::load($smarty, $type); - $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name); - - // check runtime cache - $_cache_key = 'template|' . $unique_resource_name; - if ($smarty->compile_id) { - $_cache_key .= '|'.$smarty->compile_id; - } - if (isset(self::$sources[$_cache_key])) { - return self::$sources[$_cache_key]; - } - - // create source - $source = new Smarty_Template_Source($resource, $smarty, $template_resource, $type, $name, $unique_resource_name); - $resource->populate($source, $_template); - - // runtime cache - self::$sources[$_cache_key] = $source; - - return $source; - } - - /** - * initialize Config Source Object for given resource - * - * @param Smarty_Internal_Config $_config config object - * @return Smarty_Config_Source Source Object - */ - public static function config(Smarty_Internal_Config $_config) - { - static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true); - $config_resource = $_config->config_resource; - $smarty = $_config->smarty; - - // parse resource_name - self::parseResourceName($config_resource, $smarty->default_config_type, $name, $type); - - // make sure configs are not loaded via anything smarty can't handle - if (isset($_incompatible_resources[$type])) { - throw new SmartyException ("Unable to use resource '{$type}' for config"); - } - - // load resource handler, identify unique resource name - $resource = Smarty_Resource::load($smarty, $type); - $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name, true); - - // check runtime cache - $_cache_key = 'config|' . $unique_resource_name; - if (isset(self::$sources[$_cache_key])) { - return self::$sources[$_cache_key]; - } - - // create source - $source = new Smarty_Config_Source($resource, $smarty, $config_resource, $type, $name, $unique_resource_name); - $resource->populate($source, null); - - // runtime cache - self::$sources[$_cache_key] = $source; - - return $source; - } - -} - -/** - * Smarty Resource Data Object - * - * Meta Data Container for Template Files - * - * @package Smarty - * @subpackage TemplateResources - * @author Rodney Rehm - * - * @property integer $timestamp Source Timestamp - * @property boolean $exists Source Existence - * @property boolean $template Extended Template reference - * @property string $content Source Content - */ -class Smarty_Template_Source -{ - /** - * Name of the Class to compile this resource's contents with - * @var string - */ - public $compiler_class = null; - - /** - * Name of the Class to tokenize this resource's contents with - * @var string - */ - public $template_lexer_class = null; - - /** - * Name of the Class to parse this resource's contents with - * @var string - */ - public $template_parser_class = null; - - /** - * Unique Template ID - * @var string - */ - public $uid = null; - - /** - * Template Resource (Smarty_Internal_Template::$template_resource) - * @var string - */ - public $resource = null; - - /** - * Resource Type - * @var string - */ - public $type = null; - - /** - * Resource Name - * @var string - */ - public $name = null; - - /** - * Unique Resource Name - * @var string - */ - public $unique_resource = null; - - /** - * Source Filepath - * @var string - */ - public $filepath = null; - - /** - * Source is bypassing compiler - * @var boolean - */ - public $uncompiled = null; - - /** - * Source must be recompiled on every occasion - * @var boolean - */ - public $recompiled = null; - - /** - * The Components an extended template is made of - * @var array - */ - public $components = null; - - /** - * Resource Handler - * @var Smarty_Resource - */ - public $handler = null; - - /** - * Smarty instance - * @var Smarty - */ - public $smarty = null; - - /** - * create Source Object container - * - * @param Smarty_Resource $handler Resource Handler this source object communicates with - * @param Smarty $smarty Smarty instance this source object belongs to - * @param string $resource full template_resource - * @param string $type type of resource - * @param string $name resource name - * @param string $unique_resource unqiue resource name - */ - public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource) - { - $this->handler = $handler; // Note: prone to circular references - - $this->compiler_class = $handler->compiler_class; - $this->template_lexer_class = $handler->template_lexer_class; - $this->template_parser_class = $handler->template_parser_class; - $this->uncompiled = $this->handler instanceof Smarty_Resource_Uncompiled; - $this->recompiled = $this->handler instanceof Smarty_Resource_Recompiled; - - $this->smarty = $smarty; - $this->resource = $resource; - $this->type = $type; - $this->name = $name; - $this->unique_resource = $unique_resource; - } - - /** - * get a Compiled Object of this source - * - * @param Smarty_Internal_Template $_template template objet - * @return Smarty_Template_Compiled compiled object - */ - public function getCompiled(Smarty_Internal_Template $_template) - { - // check runtime cache - $_cache_key = $this->unique_resource . '#' . $_template->compile_id; - if (isset(Smarty_Resource::$compileds[$_cache_key])) { - return Smarty_Resource::$compileds[$_cache_key]; - } - - $compiled = new Smarty_Template_Compiled($this); - $this->handler->populateCompiledFilepath($compiled, $_template); - $compiled->timestamp = @filemtime($compiled->filepath); - $compiled->exists = !!$compiled->timestamp; - - // runtime cache - Smarty_Resource::$compileds[$_cache_key] = $compiled; - - return $compiled; - } - - /** - * render the uncompiled source - * - * @param Smarty_Internal_Template $_template template object - */ - public function renderUncompiled(Smarty_Internal_Template $_template) - { - return $this->handler->renderUncompiled($this, $_template); - } - - /** - * <> Generic Setter. - * - * @param string $property_name valid: timestamp, exists, content, template - * @param mixed $value new value (is not checked) - * @throws SmartyException if $property_name is not valid - */ - public function __set($property_name, $value) - { - switch ($property_name) { - // regular attributes - case 'timestamp': - case 'exists': - case 'content': - // required for extends: only - case 'template': - $this->$property_name = $value; - break; - - default: - throw new SmartyException("invalid source property '$property_name'."); - } - } - - /** - * <> Generic getter. - * - * @param string $property_name valid: timestamp, exists, content - * @return mixed - * @throws SmartyException if $property_name is not valid - */ - public function __get($property_name) - { - switch ($property_name) { - case 'timestamp': - case 'exists': - $this->handler->populateTimestamp($this); - - return $this->$property_name; - - case 'content': - return $this->content = $this->handler->getContent($this); - - default: - throw new SmartyException("source property '$property_name' does not exist."); - } - } - -} - -/** - * Smarty Resource Data Object - * - * Meta Data Container for Template Files - * - * @package Smarty - * @subpackage TemplateResources - * @author Rodney Rehm - * - * @property string $content compiled content - */ -class Smarty_Template_Compiled -{ - /** - * Compiled Filepath - * @var string - */ - public $filepath = null; - - /** - * Compiled Timestamp - * @var integer - */ - public $timestamp = null; - - /** - * Compiled Existence - * @var boolean - */ - public $exists = false; - - /** - * Compiled Content Loaded - * @var boolean - */ - public $loaded = false; - - /** - * Template was compiled - * @var boolean - */ - public $isCompiled = false; - - /** - * Source Object - * @var Smarty_Template_Source - */ - public $source = null; - - /** - * Metadata properties - * - * populated by Smarty_Internal_Template::decodeProperties() - * @var array - */ - public $_properties = null; - - /** - * create Compiled Object container - * - * @param Smarty_Template_Source $source source object this compiled object belongs to - */ - public function __construct(Smarty_Template_Source $source) - { - $this->source = $source; - } - } diff --git a/resources/templates/engine/smarty/sysplugins/smarty_resource_custom.php b/resources/templates/engine/smarty/sysplugins/smarty_resource_custom.php index bf5c4ea6d0..8d66be3ae1 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_resource_custom.php +++ b/resources/templates/engine/smarty/sysplugins/smarty_resource_custom.php @@ -2,17 +2,16 @@ /** * Smarty Resource Plugin * - * @package Smarty + * @package Smarty * @subpackage TemplateResources - * @author Rodney Rehm + * @author Rodney Rehm */ /** * Smarty Resource Plugin - * * Wrapper Implementation for custom resource plugins * - * @package Smarty + * @package Smarty * @subpackage TemplateResources */ abstract class Smarty_Resource_Custom extends Smarty_Resource @@ -28,11 +27,11 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource /** * Fetch template's modification timestamp from data source - * * {@internal implementing this method is optional. * Only implement it if modification times can be accessed faster than loading the complete template source.}} * - * @param string $name template name + * @param string $name template name + * * @return integer|boolean timestamp (epoch) the template was modified, or false if not found */ protected function fetchTimestamp($name) @@ -46,19 +45,19 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource * @param Smarty_Template_Source $source source object * @param Smarty_Internal_Template $_template template object */ - public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null) + public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null) { - $source->filepath = strtolower($source->type . ':' . $source->name); + $source->filepath = $source->type . ':' . substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25); $source->uid = sha1($source->type . ':' . $source->name); - $mtime = $this->fetchTimestamp($source->name); if ($mtime !== null) { $source->timestamp = $mtime; } else { $this->fetch($source->name, $content, $timestamp); $source->timestamp = isset($timestamp) ? $timestamp : false; - if( isset($content) ) + if (isset($content)) { $source->content = $content; + } } $source->exists = !!$source->timestamp; } @@ -66,7 +65,8 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource /** * Load template's source into current template object * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object + * * @return string template source * @throws SmartyException if source cannot be loaded */ @@ -76,19 +76,18 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource if (isset($content)) { return $content; } - throw new SmartyException("Unable to read template {$source->type} '{$source->name}'"); } /** * Determine basename for compiled filename * - * @param Smarty_Template_Source $source source object + * @param Smarty_Template_Source $source source object + * * @return string resource's basename */ - protected function getBasename(Smarty_Template_Source $source) + public function getBasename(Smarty_Template_Source $source) { - return basename($source->name); + return basename(substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25)); } - } diff --git a/resources/templates/engine/smarty/sysplugins/smarty_resource_recompiled.php b/resources/templates/engine/smarty/sysplugins/smarty_resource_recompiled.php index 0658138929..760c4dd338 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_resource_recompiled.php +++ b/resources/templates/engine/smarty/sysplugins/smarty_resource_recompiled.php @@ -2,26 +2,74 @@ /** * Smarty Resource Plugin * - * @package Smarty + * @package Smarty * @subpackage TemplateResources - * @author Rodney Rehm + * @author Rodney Rehm */ /** * Smarty Resource Plugin - * * Base implementation for resource plugins that don't compile cache * - * @package Smarty + * @package Smarty * @subpackage TemplateResources */ abstract class Smarty_Resource_Recompiled extends Smarty_Resource { + /** + * Flag that it's an recompiled resource + * + * @var bool + */ + public $recompiled = true; + + /** + * Resource does implement populateCompiledFilepath() method + * + * @var bool + */ + public $hasCompiledHandler = true; + + /** + * compile template from source + * + * @param Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template + * + * @throws Exception + */ + public function process(Smarty_Internal_Template $_smarty_tpl) + { + $compiled = &$_smarty_tpl->compiled; + $compiled->file_dependency = array(); + $compiled->includes = array(); + $compiled->nocache_hash = null; + $compiled->unifunc = null; + $level = ob_get_level(); + ob_start(); + $_smarty_tpl->loadCompiler(); + // call compiler + try { + eval('?>' . $_smarty_tpl->compiler->compileTemplate($_smarty_tpl)); + } catch (Exception $e) { + unset($_smarty_tpl->compiler); + while (ob_get_level() > $level) { + ob_end_clean(); + } + throw $e; + } + // release compiler object to free memory + unset($_smarty_tpl->compiler); + ob_get_clean(); + $compiled->timestamp = time(); + $compiled->exists = true; + } + /** * populate Compiled Object with compiled filepath * - * @param Smarty_Template_Compiled $compiled compiled object - * @param Smarty_Internal_Template $_template template object + * @param Smarty_Template_Compiled $compiled compiled object + * @param Smarty_Internal_Template $_template template object + * * @return void */ public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template) @@ -31,4 +79,16 @@ abstract class Smarty_Resource_Recompiled extends Smarty_Resource $compiled->exists = false; } + /* + * Disable timestamp checks for recompiled resource. + * + * @return bool + */ + /** + * @return bool + */ + public function checkTimestamps() + { + return false; + } } diff --git a/resources/templates/engine/smarty/sysplugins/smarty_resource_uncompiled.php b/resources/templates/engine/smarty/sysplugins/smarty_resource_uncompiled.php index 808f3a3045..a11e2c14c7 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_resource_uncompiled.php +++ b/resources/templates/engine/smarty/sysplugins/smarty_resource_uncompiled.php @@ -2,41 +2,48 @@ /** * Smarty Resource Plugin * - * @package Smarty + * @package Smarty * @subpackage TemplateResources - * @author Rodney Rehm + * @author Rodney Rehm */ /** * Smarty Resource Plugin - * * Base implementation for resource plugins that don't use the compiler * - * @package Smarty + * @package Smarty * @subpackage TemplateResources */ abstract class Smarty_Resource_Uncompiled extends Smarty_Resource { /** - * Render and output the template (without using the compiler) + * Flag that it's an uncompiled resource * - * @param Smarty_Template_Source $source source object - * @param Smarty_Internal_Template $_template template object - * @throws SmartyException on failure + * @var bool */ - abstract public function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template); + public $uncompiled = true; + + /** + * Resource does implement populateCompiledFilepath() method + * + * @var bool + */ + public $hasCompiledHandler = true; /** * populate compiled object with compiled filepath * * @param Smarty_Template_Compiled $compiled compiled object - * @param Smarty_Internal_Template $_template template object (is ignored) + * @param Smarty_Internal_Template $_template template object */ public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template) { - $compiled->filepath = false; - $compiled->timestamp = false; - $compiled->exists = false; + $compiled->filepath = $_template->source->filepath; + $compiled->timestamp = $_template->source->timestamp; + $compiled->exists = $_template->source->exists; + if ($_template->smarty->merge_compiled_includes || $_template->source->handler->checkTimestamps()) { + $compiled->file_dependency[ $_template->source->uid ] = + array($compiled->filepath, $compiled->timestamp, $_template->source->type,); + } } - } diff --git a/resources/templates/engine/smarty/sysplugins/smarty_security.php b/resources/templates/engine/smarty/sysplugins/smarty_security.php index 7263a011b6..441a7e2840 100644 --- a/resources/templates/engine/smarty/sysplugins/smarty_security.php +++ b/resources/templates/engine/smarty/sysplugins/smarty_security.php @@ -2,16 +2,16 @@ /** * Smarty plugin * - * @package Smarty + * @package Smarty * @subpackage Security - * @author Uwe Tews + * @author Uwe Tews */ - -/* +/** * FIXME: Smarty_Security API * - getter and setter instead of public properties would allow cultivating an internal cache properly - * - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir are immutable - * the cache is killed every time either of the variables change. That means that two distinct Smarty objects with differing + * - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir + * are immutable the cache is killed every time either of the variables change. That means that two distinct + * Smarty objects with differing * $template_dir or $config_dir should NOT share the same Smarty_Security instance, * as this would lead to (severe) performance penalty! how should this be handled? */ @@ -34,6 +34,7 @@ class Smarty_Security * @var integer */ public $php_handling = Smarty::PHP_PASSTHRU; + /** * This is the list of template directories that are considered secure. * $template_dir is in this list implicitly. @@ -41,6 +42,7 @@ class Smarty_Security * @var array */ public $secure_dir = array(); + /** * This is an array of directories where trusted php scripts reside. * {@link $security} is disabled during their inclusion/execution. @@ -48,123 +50,208 @@ class Smarty_Security * @var array */ public $trusted_dir = array(); + /** * List of regular expressions (PCRE) that include trusted URIs * * @var array */ public $trusted_uri = array(); + + /** + * List of trusted constants names + * + * @var array + */ + public $trusted_constants = array(); + /** * This is an array of trusted static classes. - * * If empty access to all static classes is allowed. * If set to 'none' none is allowed. + * * @var array */ public $static_classes = array(); + + /** + * This is an nested array of trusted classes and static methods. + * If empty access to all static classes and methods is allowed. + * Format: + * array ( + * 'class_1' => array('method_1', 'method_2'), // allowed methods listed + * 'class_2' => array(), // all methods of class allowed + * ) + * If set to null none is allowed. + * + * @var array + */ + public $trusted_static_methods = array(); + + /** + * This is an array of trusted static properties. + * If empty access to all static classes and properties is allowed. + * Format: + * array ( + * 'class_1' => array('prop_1', 'prop_2'), // allowed properties listed + * 'class_2' => array(), // all properties of class allowed + * ) + * If set to null none is allowed. + * + * @var array + */ + public $trusted_static_properties = array(); + /** * This is an array of trusted PHP functions. - * * If empty all functions are allowed. * To disable all PHP functions set $php_functions = null. + * * @var array */ - public $php_functions = array( - 'isset', 'empty', - 'count', 'sizeof', - 'in_array', 'is_array', - 'time', - 'nl2br', - ); + public $php_functions = array('isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'time',); + /** * This is an array of trusted PHP modifiers. - * * If empty all modifiers are allowed. - * To disable all modifier set $modifiers = null. + * To disable all modifier set $php_modifiers = null. + * * @var array */ - public $php_modifiers = array( - 'escape', - 'count' - ); + public $php_modifiers = array('escape', 'count', 'nl2br',); + /** * This is an array of allowed tags. - * * If empty no restriction by allowed_tags. + * * @var array */ public $allowed_tags = array(); + /** * This is an array of disabled tags. - * * If empty no restriction by disabled_tags. + * * @var array */ public $disabled_tags = array(); + /** * This is an array of allowed modifier plugins. - * * If empty no restriction by allowed_modifiers. + * * @var array */ public $allowed_modifiers = array(); + /** * This is an array of disabled modifier plugins. - * * If empty no restriction by disabled_modifiers. + * * @var array */ public $disabled_modifiers = array(); + + /** + * This is an array of disabled special $smarty variables. + * + * @var array + */ + public $disabled_special_smarty_vars = array(); + /** * This is an array of trusted streams. - * * If empty all streams are allowed. * To disable all streams set $streams = null. + * * @var array */ public $streams = array('file'); + /** * + flag if constants can be accessed from template + * * @var boolean */ public $allow_constants = true; + /** * + flag if super globals can be accessed from template + * * @var boolean */ public $allow_super_globals = true; /** - * Cache for $resource_dir lookups + * max template nesting level + * + * @var int + */ + public $max_template_nesting = 0; + + /** + * current template nesting level + * + * @var int + */ + private $_current_template_nesting = 0; + + /** + * Cache for $resource_dir lookup + * * @var array */ - protected $_resource_dir = null; + protected $_resource_dir = array(); + /** - * Cache for $template_dir lookups + * Cache for $template_dir lookup + * * @var array */ - protected $_template_dir = null; + protected $_template_dir = array(); + /** - * Cache for $config_dir lookups + * Cache for $config_dir lookup + * * @var array */ - protected $_config_dir = null; + protected $_config_dir = array(); + /** - * Cache for $secure_dir lookups + * Cache for $secure_dir lookup + * * @var array */ - protected $_secure_dir = null; + protected $_secure_dir = array(); + /** - * Cache for $php_resource_dir lookups + * Cache for $php_resource_dir lookup + * * @var array */ protected $_php_resource_dir = null; + /** - * Cache for $trusted_dir lookups + * Cache for $trusted_dir lookup + * * @var array */ protected $_trusted_dir = null; + /** + * Cache for include path status + * + * @var bool + */ + protected $_include_path_status = false; + + /** + * Cache for $_include_array lookup + * + * @var array + */ + protected $_include_dir = array(); + /** * @param Smarty $smarty */ @@ -176,73 +263,119 @@ class Smarty_Security /** * Check if PHP function is trusted. * - * @param string $function_name - * @param object $compiler compiler object + * @param string $function_name + * @param object $compiler compiler object + * * @return boolean true if function is trusted - * @throws SmartyCompilerException if php function is not trusted */ public function isTrustedPhpFunction($function_name, $compiler) { - if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) { + if (isset($this->php_functions) + && (empty($this->php_functions) || in_array($function_name, $this->php_functions)) + ) { return true; } - $compiler->trigger_template_error("PHP function '{$function_name}' not allowed by security setting"); - return false; // should not, but who knows what happens to the compiler in the future? } /** * Check if static class is trusted. * - * @param string $class_name - * @param object $compiler compiler object + * @param string $class_name + * @param object $compiler compiler object + * * @return boolean true if class is trusted - * @throws SmartyCompilerException if static class is not trusted */ public function isTrustedStaticClass($class_name, $compiler) { - if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) { + if (isset($this->static_classes) + && (empty($this->static_classes) || in_array($class_name, $this->static_classes)) + ) { return true; } - $compiler->trigger_template_error("access to static class '{$class_name}' not allowed by security setting"); + return false; // should not, but who knows what happens to the compiler in the future? + } + /** + * Check if static class method/property is trusted. + * + * @param string $class_name + * @param string $params + * @param object $compiler compiler object + * + * @return boolean true if class method is trusted + */ + public function isTrustedStaticClassAccess($class_name, $params, $compiler) + { + if (!isset($params[ 2 ])) { + // fall back + return $this->isTrustedStaticClass($class_name, $compiler); + } + if ($params[ 2 ] === 'method') { + $allowed = $this->trusted_static_methods; + $name = substr($params[ 0 ], 0, strpos($params[ 0 ], '(')); + } else { + $allowed = $this->trusted_static_properties; + // strip '$' + $name = substr($params[ 0 ], 1); + } + if (isset($allowed)) { + if (empty($allowed)) { + // fall back + return $this->isTrustedStaticClass($class_name, $compiler); + } + if (isset($allowed[ $class_name ]) + && (empty($allowed[ $class_name ]) || in_array($name, $allowed[ $class_name ])) + ) { + return true; + } + } + $compiler->trigger_template_error("access to static class '{$class_name}' {$params[2]} '{$name}' not allowed by security setting"); return false; // should not, but who knows what happens to the compiler in the future? } /** * Check if PHP modifier is trusted. * - * @param string $modifier_name - * @param object $compiler compiler object + * @param string $modifier_name + * @param object $compiler compiler object + * * @return boolean true if modifier is trusted - * @throws SmartyCompilerException if modifier is not trusted */ public function isTrustedPhpModifier($modifier_name, $compiler) { - if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) { + if (isset($this->php_modifiers) + && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers)) + ) { return true; } - $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting"); - return false; // should not, but who knows what happens to the compiler in the future? } /** * Check if tag is trusted. * - * @param string $tag_name - * @param object $compiler compiler object + * @param string $tag_name + * @param object $compiler compiler object + * * @return boolean true if tag is trusted - * @throws SmartyCompilerException if modifier is not trusted */ public function isTrustedTag($tag_name, $compiler) { // check for internal always required tags - if (in_array($tag_name, array('assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin', 'private_object_block_function', - 'private_object_function', 'private_registered_function', 'private_registered_block', 'private_special_variable', 'private_print_expression', 'private_modifier'))) { + if (in_array( + $tag_name, + array( + 'assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin', + 'private_object_block_function', 'private_object_function', 'private_registered_function', + 'private_registered_block', 'private_special_variable', 'private_print_expression', + 'private_modifier' + ) + ) + ) { return true; } // check security settings @@ -250,24 +383,45 @@ class Smarty_Security if (empty($this->disabled_tags) || !in_array($tag_name, $this->disabled_tags)) { return true; } else { - $compiler->trigger_template_error("tag '{$tag_name}' disabled by security setting", $compiler->lex->taglineno); + $compiler->trigger_template_error("tag '{$tag_name}' disabled by security setting", null, true); } } elseif (in_array($tag_name, $this->allowed_tags) && !in_array($tag_name, $this->disabled_tags)) { return true; } else { - $compiler->trigger_template_error("tag '{$tag_name}' not allowed by security setting", $compiler->lex->taglineno); + $compiler->trigger_template_error("tag '{$tag_name}' not allowed by security setting", null, true); } + return false; // should not, but who knows what happens to the compiler in the future? + } + /** + * Check if special $smarty variable is trusted. + * + * @param string $var_name + * @param object $compiler compiler object + * + * @return boolean true if tag is trusted + */ + public function isTrustedSpecialSmartyVar($var_name, $compiler) + { + if (!in_array($var_name, $this->disabled_special_smarty_vars)) { + return true; + } else { + $compiler->trigger_template_error( + "special variable '\$smarty.{$var_name}' not allowed by security setting", + null, + true + ); + } return false; // should not, but who knows what happens to the compiler in the future? } /** * Check if modifier plugin is trusted. * - * @param string $modifier_name - * @param object $compiler compiler object + * @param string $modifier_name + * @param object $compiler compiler object + * * @return boolean true if tag is trusted - * @throws SmartyCompilerException if modifier is not trusted */ public function isTrustedModifier($modifier_name, $compiler) { @@ -280,21 +434,58 @@ class Smarty_Security if (empty($this->disabled_modifiers) || !in_array($modifier_name, $this->disabled_modifiers)) { return true; } else { - $compiler->trigger_template_error("modifier '{$modifier_name}' disabled by security setting", $compiler->lex->taglineno); + $compiler->trigger_template_error( + "modifier '{$modifier_name}' disabled by security setting", + null, + true + ); } - } elseif (in_array($modifier_name, $this->allowed_modifiers) && !in_array($modifier_name, $this->disabled_modifiers)) { + } elseif (in_array($modifier_name, $this->allowed_modifiers) + && !in_array($modifier_name, $this->disabled_modifiers) + ) { return true; } else { - $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting", $compiler->lex->taglineno); + $compiler->trigger_template_error( + "modifier '{$modifier_name}' not allowed by security setting", + null, + true + ); } - return false; // should not, but who knows what happens to the compiler in the future? } + /** + * Check if constants are enabled or trusted + * + * @param string $const constant name + * @param object $compiler compiler object + * + * @return bool + */ + public function isTrustedConstant($const, $compiler) + { + if (in_array($const, array('true', 'false', 'null'))) { + return true; + } + if (!empty($this->trusted_constants)) { + if (!in_array(strtolower($const), $this->trusted_constants)) { + $compiler->trigger_template_error("Security: access to constant '{$const}' not permitted"); + return false; + } + return true; + } + if ($this->allow_constants) { + return true; + } + $compiler->trigger_template_error("Security: access to constants not permitted"); + return false; + } + /** * Check if stream is trusted. * - * @param string $stream_name + * @param string $stream_name + * * @return boolean true if stream is trusted * @throws SmartyException if stream is not trusted */ @@ -303,119 +494,85 @@ class Smarty_Security if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) { return true; } - throw new SmartyException("stream '{$stream_name}' not allowed by security setting"); } /** * Check if directory of file resource is trusted. * - * @param string $filepath - * @return boolean true if directory is trusted - * @throws SmartyException if directory is not trusted + * @param string $filepath + * @param null|bool $isConfig + * + * @return bool true if directory is trusted + * @throws \SmartyException if directory is not trusted */ - public function isTrustedResourceDir($filepath) + public function isTrustedResourceDir($filepath, $isConfig = null) { - $_template = false; - $_config = false; - $_secure = false; - - $_template_dir = $this->smarty->getTemplateDir(); - $_config_dir = $this->smarty->getConfigDir(); - - // check if index is outdated - if ((!$this->_template_dir || $this->_template_dir !== $_template_dir) - || (!$this->_config_dir || $this->_config_dir !== $_config_dir) - || (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir)) - ) { - $this->_resource_dir = array(); - $_template = true; - $_config = true; - $_secure = !empty($this->secure_dir); - } - - // rebuild template dir index - if ($_template) { - $this->_template_dir = $_template_dir; - foreach ($_template_dir as $directory) { - $directory = realpath($directory); - $this->_resource_dir[$directory] = true; + if ($this->_include_path_status !== $this->smarty->use_include_path) { + $_dir = + $this->smarty->use_include_path ? $this->smarty->ext->_getIncludePath->getIncludePathDirs($this->smarty) : array(); + if ($this->_include_dir !== $_dir) { + $this->_updateResourceDir($this->_include_dir, $_dir); + $this->_include_dir = $_dir; } + $this->_include_path_status = $this->smarty->use_include_path; } - - // rebuild config dir index - if ($_config) { - $this->_config_dir = $_config_dir; - foreach ($_config_dir as $directory) { - $directory = realpath($directory); - $this->_resource_dir[$directory] = true; + $_dir = $this->smarty->getTemplateDir(); + if ($this->_template_dir !== $_dir) { + $this->_updateResourceDir($this->_template_dir, $_dir); + $this->_template_dir = $_dir; + } + $_dir = $this->smarty->getConfigDir(); + if ($this->_config_dir !== $_dir) { + $this->_updateResourceDir($this->_config_dir, $_dir); + $this->_config_dir = $_dir; + } + if ($this->_secure_dir !== $this->secure_dir) { + $this->secure_dir = (array)$this->secure_dir; + foreach ($this->secure_dir as $k => $d) { + $this->secure_dir[ $k ] = $this->smarty->_realpath($d . DIRECTORY_SEPARATOR, true); } - } - - // rebuild secure dir index - if ($_secure) { + $this->_updateResourceDir($this->_secure_dir, $this->secure_dir); $this->_secure_dir = $this->secure_dir; - foreach ((array) $this->secure_dir as $directory) { - $directory = realpath($directory); - $this->_resource_dir[$directory] = true; - } } - - $_filepath = realpath($filepath); - $directory = dirname($_filepath); - $_directory = array(); - while (true) { - // remember the directory to add it to _resource_dir in case we're successful - $_directory[$directory] = true; - // test if the directory is trusted - if (isset($this->_resource_dir[$directory])) { - // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups - $this->_resource_dir = array_merge($this->_resource_dir, $_directory); - - return true; - } - // abort if we've reached root - if (($pos = strrpos($directory, DS)) === false || !isset($directory[1])) { - break; - } - // bubble up one level - $directory = substr($directory, 0, $pos); + $addPath = $this->_checkDir($filepath, $this->_resource_dir); + if ($addPath !== false) { + $this->_resource_dir = array_merge($this->_resource_dir, $addPath); } - - // give up - throw new SmartyException("directory '{$_filepath}' not allowed by security setting"); + return true; } /** * Check if URI (e.g. {fetch} or {html_image}) is trusted - * * To simplify things, isTrustedUri() resolves all input to "{$PROTOCOL}://{$HOSTNAME}". * So "http://username:password@hello.world.example.org:8080/some-path?some=query-string" * is reduced to "http://hello.world.example.org" prior to applying the patters from {@link $trusted_uri}. - * @param string $uri + * + * @param string $uri + * * @return boolean true if URI is trusted * @throws SmartyException if URI is not trusted - * @uses $trusted_uri for list of patterns to match against $uri + * @uses $trusted_uri for list of patterns to match against $uri */ public function isTrustedUri($uri) { $_uri = parse_url($uri); - if (!empty($_uri['scheme']) && !empty($_uri['host'])) { - $_uri = $_uri['scheme'] . '://' . $_uri['host']; + if (!empty($_uri[ 'scheme' ]) && !empty($_uri[ 'host' ])) { + $_uri = $_uri[ 'scheme' ] . '://' . $_uri[ 'host' ]; foreach ($this->trusted_uri as $pattern) { if (preg_match($pattern, $_uri)) { return true; } } } - throw new SmartyException("URI '{$uri}' not allowed by security setting"); } /** * Check if directory of file resource is trusted. * - * @param string $filepath + * @param string $filepath + * * @return boolean true if directory is trusted * @throws SmartyException if PHP directory is not trusted */ @@ -424,40 +581,141 @@ class Smarty_Security if (empty($this->trusted_dir)) { throw new SmartyException("directory '{$filepath}' not allowed by security setting (no trusted_dir specified)"); } - // check if index is outdated if (!$this->_trusted_dir || $this->_trusted_dir !== $this->trusted_dir) { $this->_php_resource_dir = array(); - $this->_trusted_dir = $this->trusted_dir; - foreach ((array) $this->trusted_dir as $directory) { - $directory = realpath($directory); - $this->_php_resource_dir[$directory] = true; + foreach ((array)$this->trusted_dir as $directory) { + $directory = $this->smarty->_realpath($directory . '/', true); + $this->_php_resource_dir[ $directory ] = true; } } - - $_filepath = realpath($filepath); - $directory = dirname($_filepath); - $_directory = array(); - while (true) { - // remember the directory to add it to _resource_dir in case we're successful - $_directory[] = $directory; - // test if the directory is trusted - if (isset($this->_php_resource_dir[$directory])) { - // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups - $this->_php_resource_dir = array_merge($this->_php_resource_dir, $_directory); - - return true; - } - // abort if we've reached root - if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) { - break; - } - // bubble up one level - $directory = substr($directory, 0, $pos); + $addPath = $this->_checkDir($filepath, $this->_php_resource_dir); + if ($addPath !== false) { + $this->_php_resource_dir = array_merge($this->_php_resource_dir, $addPath); } - - throw new SmartyException("directory '{$_filepath}' not allowed by security setting"); + return true; } + /** + * Remove old directories and its sub folders, add new directories + * + * @param array $oldDir + * @param array $newDir + */ + private function _updateResourceDir($oldDir, $newDir) + { + foreach ($oldDir as $directory) { + // $directory = $this->smarty->_realpath($directory, true); + $length = strlen($directory); + foreach ($this->_resource_dir as $dir) { + if (substr($dir, 0, $length) === $directory) { + unset($this->_resource_dir[ $dir ]); + } + } + } + foreach ($newDir as $directory) { + // $directory = $this->smarty->_realpath($directory, true); + $this->_resource_dir[ $directory ] = true; + } + } + + /** + * Check if file is inside a valid directory + * + * @param string $filepath + * @param array $dirs valid directories + * + * @return array|bool + * @throws \SmartyException + */ + private function _checkDir($filepath, $dirs) + { + $directory = dirname($this->smarty->_realpath($filepath, true)) . DIRECTORY_SEPARATOR; + $_directory = array(); + if (!preg_match('#[\\\\/][.][.][\\\\/]#', $directory)) { + while (true) { + // test if the directory is trusted + if (isset($dirs[ $directory ])) { + return $_directory; + } + // abort if we've reached root + if (!preg_match('#[\\\\/][^\\\\/]+[\\\\/]$#', $directory)) { + // give up + break; + } + // remember the directory to add it to _resource_dir in case we're successful + $_directory[ $directory ] = true; + // bubble up one level + $directory = preg_replace('#[\\\\/][^\\\\/]+[\\\\/]$#', DIRECTORY_SEPARATOR, $directory); + } + } + // give up + throw new SmartyException(sprintf('Smarty Security: not trusted file path \'%s\' ', $filepath)); + } + + /** + * Loads security class and enables security + * + * @param \Smarty $smarty + * @param string|Smarty_Security $security_class if a string is used, it must be class-name + * + * @return \Smarty current Smarty instance for chaining + * @throws \SmartyException when an invalid class name is provided + */ + public static function enableSecurity(Smarty $smarty, $security_class) + { + if ($security_class instanceof Smarty_Security) { + $smarty->security_policy = $security_class; + return $smarty; + } elseif (is_object($security_class)) { + throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security."); + } + if ($security_class === null) { + $security_class = $smarty->security_class; + } + if (!class_exists($security_class)) { + throw new SmartyException("Security class '$security_class' is not defined"); + } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) { + throw new SmartyException("Class '$security_class' must extend Smarty_Security."); + } else { + $smarty->security_policy = new $security_class($smarty); + } + return $smarty; + } + + /** + * Start template processing + * + * @param $template + * + * @throws SmartyException + */ + public function startTemplate($template) + { + if ($this->max_template_nesting > 0 && $this->_current_template_nesting++ >= $this->max_template_nesting) { + throw new SmartyException("maximum template nesting level of '{$this->max_template_nesting}' exceeded when calling '{$template->template_resource}'"); + } + } + + /** + * Exit template processing + */ + public function endTemplate() + { + if ($this->max_template_nesting > 0) { + $this->_current_template_nesting--; + } + } + + /** + * Register callback functions call at start/end of template rendering + * + * @param \Smarty_Internal_Template $template + */ + public function registerCallBacks(Smarty_Internal_Template $template) + { + $template->startRenderCallbacks[] = array($this, 'startTemplate'); + $template->endRenderCallbacks[] = array($this, 'endTemplate'); + } } diff --git a/resources/templates/engine/smarty/sysplugins/smarty_template_cached.php b/resources/templates/engine/smarty/sysplugins/smarty_template_cached.php new file mode 100644 index 0000000000..508d27f366 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_template_cached.php @@ -0,0 +1,257 @@ +compile_id = $_template->compile_id; + $this->cache_id = $_template->cache_id; + $this->source = $_template->source; + if (!class_exists('Smarty_CacheResource', false)) { + include SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php'; + } + $this->handler = Smarty_CacheResource::load($_template->smarty); + } + + /** + * @param Smarty_Internal_Template $_template + * + * @return Smarty_Template_Cached + */ + public static function load(Smarty_Internal_Template $_template) + { + $_template->cached = new Smarty_Template_Cached($_template); + $_template->cached->handler->populate($_template->cached, $_template); + // caching enabled ? + if (!$_template->caching || $_template->source->handler->recompiled + ) { + $_template->cached->valid = false; + } + return $_template->cached; + } + + /** + * Render cache template + * + * @param \Smarty_Internal_Template $_template + * @param bool $no_output_filter + * + * @throws \Exception + */ + public function render(Smarty_Internal_Template $_template, $no_output_filter = true) + { + if ($this->isCached($_template)) { + if ($_template->smarty->debugging) { + if (!isset($_template->smarty->_debug)) { + $_template->smarty->_debug = new Smarty_Internal_Debug(); + } + $_template->smarty->_debug->start_cache($_template); + } + if (!$this->processed) { + $this->process($_template); + } + $this->getRenderedTemplateCode($_template); + if ($_template->smarty->debugging) { + $_template->smarty->_debug->end_cache($_template); + } + return; + } else { + $_template->smarty->ext->_updateCache->updateCache($this, $_template, $no_output_filter); + } + } + + /** + * Check if cache is valid, lock cache if required + * + * @param \Smarty_Internal_Template $_template + * + * @return bool flag true if cache is valid + */ + public function isCached(Smarty_Internal_Template $_template) + { + if ($this->valid !== null) { + return $this->valid; + } + while (true) { + while (true) { + if ($this->exists === false || $_template->smarty->force_compile || $_template->smarty->force_cache) { + $this->valid = false; + } else { + $this->valid = true; + } + if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_CURRENT + && $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime) + ) { + // lifetime expired + $this->valid = false; + } + if ($this->valid && $_template->compile_check === Smarty::COMPILECHECK_ON + && $_template->source->getTimeStamp() > $this->timestamp + ) { + $this->valid = false; + } + if ($this->valid || !$_template->smarty->cache_locking) { + break; + } + if (!$this->handler->locked($_template->smarty, $this)) { + $this->handler->acquireLock($_template->smarty, $this); + break 2; + } + $this->handler->populate($this, $_template); + } + if ($this->valid) { + if (!$_template->smarty->cache_locking || $this->handler->locked($_template->smarty, $this) === null) { + // load cache file for the following checks + if ($_template->smarty->debugging) { + $_template->smarty->_debug->start_cache($_template); + } + if ($this->handler->process($_template, $this) === false) { + $this->valid = false; + } else { + $this->processed = true; + } + if ($_template->smarty->debugging) { + $_template->smarty->_debug->end_cache($_template); + } + } else { + $this->is_locked = true; + continue; + } + } else { + return $this->valid; + } + if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_SAVED + && $_template->cached->cache_lifetime >= 0 + && (time() > ($_template->cached->timestamp + $_template->cached->cache_lifetime)) + ) { + $this->valid = false; + } + if ($_template->smarty->cache_locking) { + if (!$this->valid) { + $this->handler->acquireLock($_template->smarty, $this); + } elseif ($this->is_locked) { + $this->handler->releaseLock($_template->smarty, $this); + } + } + return $this->valid; + } + return $this->valid; + } + + /** + * Process cached template + * + * @param Smarty_Internal_Template $_template template object + * @param bool $update flag if called because cache update + */ + public function process(Smarty_Internal_Template $_template, $update = false) + { + if ($this->handler->process($_template, $this, $update) === false) { + $this->valid = false; + } + if ($this->valid) { + $this->processed = true; + } else { + $this->processed = false; + } + } + + /** + * Read cache content from handler + * + * @param Smarty_Internal_Template $_template template object + * + * @return string|false content + */ + public function read(Smarty_Internal_Template $_template) + { + if (!$_template->source->handler->recompiled) { + return $this->handler->readCachedContent($_template); + } + return false; + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_template_compiled.php b/resources/templates/engine/smarty/sysplugins/smarty_template_compiled.php new file mode 100644 index 0000000000..37d8f0a9ef --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_template_compiled.php @@ -0,0 +1,257 @@ +source->handler->hasCompiledHandler) { + $_template->source->handler->populateCompiledFilepath($compiled, $_template); + } else { + $compiled->populateCompiledFilepath($_template); + } + return $compiled; + } + + /** + * populate Compiled Object with compiled filepath + * + * @param Smarty_Internal_Template $_template template object + **/ + public function populateCompiledFilepath(Smarty_Internal_Template $_template) + { + $source = &$_template->source; + $smarty = &$_template->smarty; + $this->filepath = $smarty->getCompileDir(); + if (isset($_template->compile_id)) { + $this->filepath .= preg_replace('![^\w]+!', '_', $_template->compile_id) . + ($smarty->use_sub_dirs ? DIRECTORY_SEPARATOR : '^'); + } + // if use_sub_dirs, break file into directories + if ($smarty->use_sub_dirs) { + $this->filepath .= $source->uid[ 0 ] . $source->uid[ 1 ] . DIRECTORY_SEPARATOR . $source->uid[ 2 ] . + $source->uid[ 3 ] . DIRECTORY_SEPARATOR . $source->uid[ 4 ] . $source->uid[ 5 ] . + DIRECTORY_SEPARATOR; + } + $this->filepath .= $source->uid . '_'; + if ($source->isConfig) { + $this->filepath .= (int)$smarty->config_read_hidden + (int)$smarty->config_booleanize * 2 + + (int)$smarty->config_overwrite * 4; + } else { + $this->filepath .= (int)$smarty->merge_compiled_includes + (int)$smarty->escape_html * 2 + + (($smarty->merge_compiled_includes && $source->type === 'extends') ? + (int)$smarty->extends_recursion * 4 : 0); + } + $this->filepath .= '.' . $source->type; + $basename = $source->handler->getBasename($source); + if (!empty($basename)) { + $this->filepath .= '.' . $basename; + } + if ($_template->caching) { + $this->filepath .= '.cache'; + } + $this->filepath .= '.php'; + $this->timestamp = $this->exists = is_file($this->filepath); + if ($this->exists) { + $this->timestamp = filemtime($this->filepath); + } + } + + /** + * render compiled template code + * + * @param Smarty_Internal_Template $_template + * + * @return string + * @throws Exception + */ + public function render(Smarty_Internal_Template $_template) + { + // checks if template exists + if (!$_template->source->exists) { + $type = $_template->source->isConfig ? 'config' : 'template'; + throw new SmartyException("Unable to load {$type} '{$_template->source->type}:{$_template->source->name}'"); + } + if ($_template->smarty->debugging) { + if (!isset($_template->smarty->_debug)) { + $_template->smarty->_debug = new Smarty_Internal_Debug(); + } + $_template->smarty->_debug->start_render($_template); + } + if (!$this->processed) { + $this->process($_template); + } + if (isset($_template->cached)) { + $_template->cached->file_dependency = + array_merge($_template->cached->file_dependency, $this->file_dependency); + } + if ($_template->source->handler->uncompiled) { + $_template->source->handler->renderUncompiled($_template->source, $_template); + } else { + $this->getRenderedTemplateCode($_template); + } + if ($_template->caching && $this->has_nocache_code) { + $_template->cached->hashes[ $this->nocache_hash ] = true; + } + if ($_template->smarty->debugging) { + $_template->smarty->_debug->end_render($_template); + } + } + + /** + * load compiled template or compile from source + * + * @param Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template + * + * @throws Exception + */ + public function process(Smarty_Internal_Template $_smarty_tpl) + { + $source = &$_smarty_tpl->source; + $smarty = &$_smarty_tpl->smarty; + if ($source->handler->recompiled) { + $source->handler->process($_smarty_tpl); + } elseif (!$source->handler->uncompiled) { + if (!$this->exists || $smarty->force_compile + || ($_smarty_tpl->compile_check && $source->getTimeStamp() > $this->getTimeStamp()) + ) { + $this->compileTemplateSource($_smarty_tpl); + $compileCheck = $_smarty_tpl->compile_check; + $_smarty_tpl->compile_check = Smarty::COMPILECHECK_OFF; + $this->loadCompiledTemplate($_smarty_tpl); + $_smarty_tpl->compile_check = $compileCheck; + } else { + $_smarty_tpl->mustCompile = true; + @include $this->filepath; + if ($_smarty_tpl->mustCompile) { + $this->compileTemplateSource($_smarty_tpl); + $compileCheck = $_smarty_tpl->compile_check; + $_smarty_tpl->compile_check = Smarty::COMPILECHECK_OFF; + $this->loadCompiledTemplate($_smarty_tpl); + $_smarty_tpl->compile_check = $compileCheck; + } + } + $_smarty_tpl->_subTemplateRegister(); + $this->processed = true; + } + } + + /** + * compile template from source + * + * @param Smarty_Internal_Template $_template + * + * @throws Exception + */ + public function compileTemplateSource(Smarty_Internal_Template $_template) + { + $this->file_dependency = array(); + $this->includes = array(); + $this->nocache_hash = null; + $this->unifunc = null; + // compile locking + if ($saved_timestamp = (!$_template->source->handler->recompiled && is_file($this->filepath))) { + $saved_timestamp = $this->getTimeStamp(); + touch($this->filepath); + } + // compile locking + try { + // call compiler + $_template->loadCompiler(); + $this->write($_template, $_template->compiler->compileTemplate($_template)); + } catch (Exception $e) { + // restore old timestamp in case of error + if ($saved_timestamp && is_file($this->filepath)) { + touch($this->filepath, $saved_timestamp); + } + unset($_template->compiler); + throw $e; + } + // release compiler object to free memory + unset($_template->compiler); + } + + /** + * Write compiled code by handler + * + * @param Smarty_Internal_Template $_template template object + * @param string $code compiled code + * + * @return bool success + * @throws \SmartyException + */ + public function write(Smarty_Internal_Template $_template, $code) + { + if (!$_template->source->handler->recompiled) { + if ($_template->smarty->ext->_writeFile->writeFile($this->filepath, $code, $_template->smarty) === true) { + $this->timestamp = $this->exists = is_file($this->filepath); + if ($this->exists) { + $this->timestamp = filemtime($this->filepath); + return true; + } + } + return false; + } + return true; + } + + /** + * Read compiled content from handler + * + * @param Smarty_Internal_Template $_template template object + * + * @return string content + */ + public function read(Smarty_Internal_Template $_template) + { + if (!$_template->source->handler->recompiled) { + return file_get_contents($this->filepath); + } + return isset($this->content) ? $this->content : false; + } + + /** + * Load fresh compiled template by including the PHP file + * HHVM requires a work around because of a PHP incompatibility + * + * @param \Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template + */ + private function loadCompiledTemplate(Smarty_Internal_Template $_smarty_tpl) + { + if (function_exists('opcache_invalidate') + && (!function_exists('ini_get') || strlen(ini_get("opcache.restrict_api")) < 1) + ) { + opcache_invalidate($this->filepath, true); + } elseif (function_exists('apc_compile_file')) { + apc_compile_file($this->filepath); + } + if (defined('HHVM_VERSION')) { + eval('?>' . file_get_contents($this->filepath)); + } else { + include $this->filepath; + } + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_template_config.php b/resources/templates/engine/smarty/sysplugins/smarty_template_config.php new file mode 100644 index 0000000000..850ae32e7c --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_template_config.php @@ -0,0 +1,100 @@ + true, 'php' => true); + if ($_template) { + $smarty = $_template->smarty; + $template_resource = $_template->template_resource; + } + if (empty($template_resource)) { + throw new SmartyException('Source: Missing name'); + } + // parse resource_name, load resource handler + list($name, $type) = Smarty_Resource::parseResourceName($template_resource, $smarty->default_config_type); + // make sure configs are not loaded via anything smarty can't handle + if (isset($_incompatible_resources[ $type ])) { + throw new SmartyException("Unable to use resource '{$type}' for config"); + } + $source = new Smarty_Template_Config($smarty, $template_resource, $type, $name); + $source->handler->populate($source, $_template); + if (!$source->exists && isset($smarty->default_config_handler_func)) { + Smarty_Internal_Method_RegisterDefaultTemplateHandler::_getDefaultTemplate($source); + $source->handler->populate($source, $_template); + } + return $source; + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_template_resource_base.php b/resources/templates/engine/smarty/sysplugins/smarty_template_resource_base.php new file mode 100644 index 0000000000..52bfba2525 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_template_resource_base.php @@ -0,0 +1,152 @@ +smarty; + $_template->isRenderingCache = $this->isCache; + $level = ob_get_level(); + try { + if (!isset($unifunc)) { + $unifunc = $this->unifunc; + } + if (empty($unifunc) || !function_exists($unifunc)) { + throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'"); + } + if ($_template->startRenderCallbacks) { + foreach ($_template->startRenderCallbacks as $callback) { + call_user_func($callback, $_template); + } + } + $unifunc($_template); + foreach ($_template->endRenderCallbacks as $callback) { + call_user_func($callback, $_template); + } + $_template->isRenderingCache = false; + } catch (Exception $e) { + $_template->isRenderingCache = false; + while (ob_get_level() > $level) { + ob_end_clean(); + } + if (isset($smarty->security_policy)) { + $smarty->security_policy->endTemplate(); + } + throw $e; + } + } + + /** + * Get compiled time stamp + * + * @return int + */ + public function getTimeStamp() + { + if ($this->exists && !$this->timestamp) { + $this->timestamp = filemtime($this->filepath); + } + return $this->timestamp; + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_template_source.php b/resources/templates/engine/smarty/sysplugins/smarty_template_source.php new file mode 100644 index 0000000000..16b47f23c1 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_template_source.php @@ -0,0 +1,213 @@ +handler = + isset($smarty->_cache[ 'resource_handlers' ][ $type ]) ? $smarty->_cache[ 'resource_handlers' ][ $type ] : + Smarty_Resource::load($smarty, $type); + $this->smarty = $smarty; + $this->resource = $resource; + $this->type = $type; + $this->name = $name; + } + + /** + * initialize Source Object for given resource + * Either [$_template] or [$smarty, $template_resource] must be specified + * + * @param Smarty_Internal_Template $_template template object + * @param Smarty $smarty smarty object + * @param string $template_resource resource identifier + * + * @return Smarty_Template_Source Source Object + * @throws SmartyException + */ + public static function load( + Smarty_Internal_Template $_template = null, + Smarty $smarty = null, + $template_resource = null + ) { + if ($_template) { + $smarty = $_template->smarty; + $template_resource = $_template->template_resource; + } + if (empty($template_resource)) { + throw new SmartyException('Source: Missing name'); + } + // parse resource_name, load resource handler, identify unique resource name + if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]([\s\S]*)$/', $template_resource, $match)) { + $type = $match[ 1 ]; + $name = $match[ 2 ]; + } else { + // no resource given, use default + // or single character before the colon is not a resource type, but part of the filepath + $type = $smarty->default_resource_type; + $name = $template_resource; + } + // create new source object + $source = new Smarty_Template_Source($smarty, $template_resource, $type, $name); + $source->handler->populate($source, $_template); + if (!$source->exists && isset($_template->smarty->default_template_handler_func)) { + Smarty_Internal_Method_RegisterDefaultTemplateHandler::_getDefaultTemplate($source); + $source->handler->populate($source, $_template); + } + return $source; + } + + /** + * Get source time stamp + * + * @return int + */ + public function getTimeStamp() + { + if (!isset($this->timestamp)) { + $this->handler->populateTimestamp($this); + } + return $this->timestamp; + } + + /** + * Get source content + * + * @return string + * @throws \SmartyException + */ + public function getContent() + { + return isset($this->content) ? $this->content : $this->handler->getContent($this); + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smarty_undefined_variable.php b/resources/templates/engine/smarty/sysplugins/smarty_undefined_variable.php new file mode 100644 index 0000000000..6d31a8a055 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smarty_undefined_variable.php @@ -0,0 +1,33 @@ +value = $value; + $this->nocache = $nocache; + } + + /** + * <> String conversion + * + * @return string + */ + public function __toString() + { + return (string)$this->value; + } +} diff --git a/resources/templates/engine/smarty/sysplugins/smartycompilerexception.php b/resources/templates/engine/smarty/sysplugins/smartycompilerexception.php new file mode 100644 index 0000000000..f7ad39b931 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smartycompilerexception.php @@ -0,0 +1,45 @@ + Smarty Compiler: ' . $this->message . ' <-- '; + } + + /** + * The line number of the template error + * + * @type int|null + */ + public $line = null; + + /** + * The template source snippet relating to the error + * + * @type string|null + */ + public $source = null; + + /** + * The raw text of the error message + * + * @type string|null + */ + public $desc = null; + + /** + * The resource identifier or template name + * + * @type string|null + */ + public $template = null; +} diff --git a/resources/templates/engine/smarty/sysplugins/smartyexception.php b/resources/templates/engine/smarty/sysplugins/smartyexception.php new file mode 100644 index 0000000000..7f7b9aa435 --- /dev/null +++ b/resources/templates/engine/smarty/sysplugins/smartyexception.php @@ -0,0 +1,19 @@ + Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- '; + } +} diff --git a/resources/templates/provision/aastra/include/general b/resources/templates/provision/aastra/include/general index 85bb08186c..4a0b44e4c8 100644 --- a/resources/templates/provision/aastra/include/general +++ b/resources/templates/provision/aastra/include/general @@ -14,16 +14,16 @@ tone set: UK # Australia, Europe (generic tones), France, # === display date and time === #time format: 0 # 1 for 24 hr format #date format: 3 # 0 == WWW MMM DD, 1 == DD-MMM-YY, 2 == YYYY-MM-DD, see reference for others -#time zone name: GB-London # Check reference for list of named time zones on page A-27, or set offset below -#time zone code: GMT # Check reference for list of named time zones on page A-27, or set offset below +#time zone name: GB-London # Check reference for list of named time zones on page A-27, or set offset below +#time zone code: GMT # Check reference for list of named time zones on page A-27, or set offset below #time zone minutes: 300 # Offset in minutes from GMT, 300 = GMT-5 = Eastern Standard Time, -120 = GMT+2 = Eastern European Time -{if isset($aastra_time_format)}time format: ${aastra_time_format}{"\n"}{/if} -{if isset($aastra_date_format)}date format: ${aastra_date_format}{"\n"}{/if} -{if isset($aastra_gmt_offset)}time zone minutes: ${aastra_gmt_offset}{"\n"}{/if} +{if isset($aastra_time_format)}time format: {$aastra_time_format}{"\n"}{/if} +{if isset($aastra_date_format)}date format: {$aastra_date_format}{"\n"}{/if} +{if isset($aastra_gmt_offset)}time zone minutes: {$aastra_gmt_offset}{"\n"}{/if} dst config: 3 # Day Light Savings, 0 == off, 1 == 30 min summertime, 2 == 1 hr summertime, 3 (default) == automatic dst minutes: 60 # amount of time to offset the clock in minutes -dst start relative date: 1 # Specifies how to interpret the start day, month, and week parameters, 0 - absolute, 1 - relative -dst end relative date: 1 # Specifies how to interpret the end day, month, and week parameters, 0 - absolute, 1 - relative +dst start relative date: 1 # Specifies how to interpret the start day, month, and week parameters, 0 - absolute, 1 - relative +dst end relative date: 1 # Specifies how to interpret the end day, month, and week parameters, 0 - absolute, 1 - relative dst start month: {$daylight_savings_start_month} {if isset($daylight_savings_start_day)}dst start week: {math equation="( x / 7 ) + 1" x=$daylight_savings_start_day format="%d"}{"\n"}{/if} {if isset($daylight_savings_start_weekday)}dst start day: {math equation= "( x + 1 ) % 7" x=$daylight_savings_start_weekday}{"\n"}{/if} diff --git a/resources/templates/provision/algo/8180/algom{$mac}.conf b/resources/templates/provision/algo/8180/algom{$mac}.conf index 4017e90d8d..bf143de62e 100644 --- a/resources/templates/provision/algo/8180/algom{$mac}.conf +++ b/resources/templates/provision/algo/8180/algom{$mac}.conf @@ -190,10 +190,10 @@ sip.ka.period = 30 sip.mwi.event = 0 sip.mwi.mode = 0 sip.mwi.subs = 0 -sip.obproxy = {$outbound_proxy_1} +sip.obproxy = {$account.1.outbound_proxy} sip.page.use = 1 -sip.proxy = {$server_address_1} -sip.regexp = {$register_expires_1} +sip.proxy = {$account.1.server_address} +sip.regexp = {$account.1.register_expires} sip.register.use = 1 sip.registrar = sip.ssr.chkact = 0 @@ -202,9 +202,9 @@ sip.ssr.method = 0 sip.ssr.nofb = 0 sip.ssr.use = 0 sip.stun = -sip.u1.auth = {$auth_id_1} -sip.u1.pwd = {$user_password_1} -sip.u1.user = {$user_id_1} +sip.u1.auth = {$account.1.auth_id} +sip.u1.pwd = {$account.1.password} +sip.u1.user = {$account.1.user_id} synapps.port = 6789 synapps.server = synapps.use = 1 diff --git a/resources/templates/provision/cisco/7940/directory.xml b/resources/templates/provision/cisco/7940/directory.xml index e217da30d7..7b660119aa 100644 --- a/resources/templates/provision/cisco/7940/directory.xml +++ b/resources/templates/provision/cisco/7940/directory.xml @@ -11,10 +11,10 @@ Enterprise - http://{$domain_name}/app/provision/?file=directory_enterprise.xml&mac=$mac} + http://{$domain_name}/app/provision/?file=directory_enterprise.xml&mac={$mac} Speed Dial http://{$domain_name}/app/provision/?file=directory_speed_dial.xml&mac={$mac} - \ No newline at end of file + diff --git a/resources/templates/provision/cisco/7960/directory.xml b/resources/templates/provision/cisco/7960/directory.xml index e217da30d7..7b660119aa 100644 --- a/resources/templates/provision/cisco/7960/directory.xml +++ b/resources/templates/provision/cisco/7960/directory.xml @@ -11,10 +11,10 @@ Enterprise - http://{$domain_name}/app/provision/?file=directory_enterprise.xml&mac=$mac} + http://{$domain_name}/app/provision/?file=directory_enterprise.xml&mac={$mac} Speed Dial http://{$domain_name}/app/provision/?file=directory_speed_dial.xml&mac={$mac} - \ No newline at end of file + diff --git a/resources/templates/provision/cisco/spa112/{$mac}.xml b/resources/templates/provision/cisco/spa112/{$mac}.xml index 6434784d91..6834de93a7 100644 --- a/resources/templates/provision/cisco/spa112/{$mac}.xml +++ b/resources/templates/provision/cisco/spa112/{$mac}.xml @@ -21,15 +21,15 @@ Yes *97 {$server_address_1} -{$outbound_proxy_primary_1} -{if isset ($outbound_proxy_primary_1)}Yes{else}No{/if} -{$sip_transport_1|upper} -{$sip_port_1} -{$register_expires_1} +{$account.1.outbound_proxy_primary} +{if isset ($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.sip_transport|upper} +{$account.1.sip_port} +{$account.1.register_expires} Yes -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No {$spa_call_waiting} @@ -37,16 +37,16 @@ Yes *97 -{$server_address_2} -{$outbound_proxy_primary_2} -{if isset ($outbound_proxy_primary_2)}Yes{else}No{/if} +{$account.2.server_address} +{$account.2.outbound_proxy_primary} +{if isset ($account.2.outbound_proxy_primary)}Yes{else}No{/if} Yes -{$sip_transport_2|upper} -{$sip_port_2} -{$register_expires_2} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} +{$account.2.register_expires} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No {$spa_dial_plan} diff --git a/resources/templates/provision/cisco/spa122/{$mac}.xml b/resources/templates/provision/cisco/spa122/{$mac}.xml index 38fc92c545..3981c1563b 100644 --- a/resources/templates/provision/cisco/spa122/{$mac}.xml +++ b/resources/templates/provision/cisco/spa122/{$mac}.xml @@ -158,8 +158,8 @@ 6 high Yes -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -187,12 +187,12 @@ {$domain_name} -{$outbound_proxy_primary_1} -{if isset ($outbound_proxy_primary_1)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{if isset ($account.1.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No No No @@ -200,9 +200,9 @@ Normal -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -284,8 +284,8 @@ 6 high Yes -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -313,8 +313,8 @@ {$domain_name} -{$outbound_proxy_primary_2} -{if isset ($outbound_proxy_primary_2)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{if isset ($account.2.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No @@ -327,9 +327,9 @@ Normal -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No diff --git a/resources/templates/provision/cisco/spa301/{$mac}.xml b/resources/templates/provision/cisco/spa301/{$mac}.xml index 2ac1eb8abb..89fd0ecc58 100644 --- a/resources/templates/provision/cisco/spa301/{$mac}.xml +++ b/resources/templates/provision/cisco/spa301/{$mac}.xml @@ -398,7 +398,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -419,8 +419,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -461,7 +461,7 @@ No -{$server_address_1} +{$account.1.server_address} @@ -469,7 +469,7 @@ Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No No No @@ -478,9 +478,9 @@ No -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No diff --git a/resources/templates/provision/cisco/spa303/{$mac}.xml b/resources/templates/provision/cisco/spa303/{$mac}.xml index 81c3ae0f5a..864e8e07e2 100644 --- a/resources/templates/provision/cisco/spa303/{$mac}.xml +++ b/resources/templates/provision/cisco/spa303/{$mac}.xml @@ -250,8 +250,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -288,13 +288,13 @@ Yes -{$server_address_1} -{$outbound_proxy_primary_1} -{if isset ($outbound_proxy_primary_1)}Yes{else}No{/if} +{$account.1.server_address} +{$account.1.outbound_proxy_primary} +{if isset ($account.1.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No No No @@ -302,9 +302,9 @@ Normal -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -362,8 +362,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -400,9 +400,9 @@ Yes -{$server_address_2} -{$outbound_proxy_primary_2} -{if isset ($outbound_proxy_primary_2)}Yes{else}No{/if} +{$account.2.server_address} +{$account.2.outbound_proxy_primary} +{if isset ($account.2.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No @@ -414,9 +414,9 @@ Normal -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -474,8 +474,8 @@ up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -512,7 +512,7 @@ Yes -{$server_address_3} +{$account.3.server_address} No Yes @@ -586,8 +586,8 @@ up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -630,7 +630,7 @@ Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No No No @@ -698,8 +698,8 @@ up and down -{$sip_transport_5|upper} -{$sip_port_5} +{$account.5.sip_transport|upper} +{$account.5.sip_port} No Yes @@ -810,8 +810,8 @@ up and down -{$sip_transport_6|upper} -{$sip_port_6} +{$account.6.sip_transport|upper} +{$account.6.sip_port} No Yes @@ -854,7 +854,7 @@ Yes Yes No -{$register_expires_6} +{$account.6.register_expires} No No No @@ -922,8 +922,8 @@ up and down -{$sip_transport_7|upper} -{$sip_port_7} +{$account.7.sip_transport|upper} +{$account.7.sip_port} No Yes @@ -966,7 +966,7 @@ Yes Yes No -{$register_expires_7} +{$account.7.register_expires} No No No @@ -1034,8 +1034,8 @@ up and down -{$sip_transport_8|upper} -{$sip_port_8} +{$account.8.sip_transport|upper} +{$account.8.sip_port} No Yes @@ -1078,7 +1078,7 @@ Yes Yes No -{$register_expires_8} +{$account.8.register_expires} No No No @@ -1146,8 +1146,8 @@ up and down -{$sip_transport_9|upper} -{$sip_port_9} +{$account.9.sip_transport|upper} +{$account.9.sip_port} No Yes @@ -1190,7 +1190,7 @@ Yes Yes No -{$register_expires_9} +{$account.9.register_expires} No No No @@ -1258,8 +1258,8 @@ up and down -{$sip_transport_10|upper} -{$sip_port_10} +{$account.10.sip_transport|upper} +{$account.10.sip_port} No Yes @@ -1370,8 +1370,8 @@ up and down -{$sip_transport_11|upper} -{$sip_port_11} +{$account.11.sip_transport|upper} +{$account.11.sip_port} No Yes @@ -1482,8 +1482,8 @@ up and down -{$sip_transport_12|upper} -{$sip_port_12} +{$account.12.sip_transport|upper} +{$account.12.sip_port} No Yes diff --git a/resources/templates/provision/cisco/spa501g/{$mac}.xml b/resources/templates/provision/cisco/spa501g/{$mac}.xml index 0032bc86f6..1e3bd8625f 100644 --- a/resources/templates/provision/cisco/spa501g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa501g/{$mac}.xml @@ -434,7 +434,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -455,8 +455,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -498,18 +498,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -517,9 +517,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -558,7 +558,7 @@ Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -579,8 +579,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -622,18 +622,18 @@ No -{$server_address_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} -{$outbound_proxy_primary_2} -{$server_address_2} -{$outbound_proxy_secondary_2} +{$account.2.server_address} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{$account.2.server_address} +{$account.2.outbound_proxy_secondary} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -641,9 +641,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -682,7 +682,7 @@ Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -703,8 +703,8 @@ up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -746,18 +746,18 @@ No -{$server_address_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} -{$outbound_proxy_primary_3} -{$server_address_3} -{$outbound_proxy_secondary_3} +{$account.3.server_address} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{$account.3.server_address} +{$account.3.outbound_proxy_secondary} Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -806,7 +806,7 @@ Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -827,8 +827,8 @@ up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -870,18 +870,18 @@ No -{$server_address_4} -{if isset($outbound_proxy_primary_4)}Yes{else}No{/if} -{$outbound_proxy_primary_4} -{$server_address_4} -{$outbound_proxy_secondary_4} +{$account.4.server_address} +{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if} +{$account.4.outbound_proxy_primary} +{$account.4.server_address} +{$account.4.outbound_proxy_secondary} Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -889,9 +889,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_4} -{$user_id_4} -{$user_password_4} +{$account.4.display_name} +{$account.4.user_id} +{$account.4.password} No @@ -930,7 +930,7 @@ Yes -{if $shared_line_5 == "shared"}shared{else}private{/if} +{if $account.5.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -951,8 +951,8 @@ up and down -{$sip_transport_5|upper} -{$sip_port_5} +{$account.5.sip_transport|upper} +{$account.5.sip_port} No Yes @@ -994,18 +994,18 @@ No -{$server_address_5} -{if isset($outbound_proxy_primary_5)}Yes{else}No{/if} -{$outbound_proxy_primary_5} -{$server_address_5} -{$outbound_proxy_secondary_5} +{$account.5.server_address} +{if isset($account.5.outbound_proxy_primary)}Yes{else}No{/if} +{$account.5.outbound_proxy_primary} +{$account.5.server_address} +{$account.5.outbound_proxy_secondary} Yes Yes No -{$register_expires_5} +{$account.5.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.5.sip_transport == 'dns srv'}Yes{/if} +{if $account.5.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1013,9 +1013,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_5} -{$user_id_5} -{$user_password_5} +{$account.5.display_name} +{$account.5.user_id} +{$account.5.password} No @@ -1054,7 +1054,7 @@ Yes -{if $shared_line_6 == "shared"}shared{else}private{/if} +{if $account.6.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1075,8 +1075,8 @@ up and down -{$sip_transport_6|upper} -{$sip_port_6} +{$account.6.sip_transport|upper} +{$account.6.sip_port} No Yes @@ -1118,18 +1118,18 @@ No -{$server_address_6} -{if isset($outbound_proxy_primary_6)}Yes{else}No{/if} -{$outbound_proxy_primary_6} -{$server_address_6} -{$outbound_proxy_secondary_6} +{$account.6.server_address} +{if isset($account.6.outbound_proxy_primary)}Yes{else}No{/if} +{$account.6.outbound_proxy_primary} +{$account.6.server_address} +{$account.6.outbound_proxy_secondary} Yes Yes No -{$register_expires_6} +{$account.6.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.6.sip_transport == 'dns srv'}Yes{/if} +{if $account.6.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1137,9 +1137,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_6} -{$user_id_6} -{$user_password_6} +{$account.6.display_name} +{$account.6.user_id} +{$account.6.password} No @@ -1178,7 +1178,7 @@ Yes -{if $shared_line_7 == "shared"}shared{else}private{/if} +{if $account.7.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1199,8 +1199,8 @@ up and down -{$sip_transport_7|upper} -{$sip_port_7} +{$account.7.sip_transport|upper} +{$account.7.sip_port} No Yes @@ -1242,18 +1242,18 @@ No -{$server_address_7} -{if isset($outbound_proxy_primary_7)}Yes{else}No{/if} -{$outbound_proxy_primary_7} -{$server_address_7} -{$outbound_proxy_secondary_7} +{$account.7.server_address} +{if isset($account.7.outbound_proxy_primary)}Yes{else}No{/if} +{$account.7.outbound_proxy_primary} +{$account.7.server_address} +{$account.7.outbound_proxy_secondary} Yes Yes No -{$register_expires_7} +{$account.7.register_expires} No -{if $sip_transport_7 == 'dns srv'}Yes{/if} -{if $sip_transport_7 != 'dns srv'}No{/if} +{if $account.7.sip_transport == 'dns srv'}Yes{/if} +{if $account.7.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1261,9 +1261,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_7} -{$user_id_7} -{$user_password_7} +{$account.7.display_name} +{$account.7.user_id} +{$account.7.password} No @@ -1302,7 +1302,7 @@ Yes -{if $shared_line_8 == "shared"}shared{else}private{/if} +{if $account.8.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1323,8 +1323,8 @@ up and down -{$sip_transport_8|upper} -{$sip_port_8} +{$account.8.sip_transport|upper} +{$account.8.sip_port} No Yes @@ -1366,18 +1366,18 @@ No -{$server_address_8} -{if isset($outbound_proxy_primary_8)}Yes{else}No{/if} -{$outbound_proxy_primary_8} -{$server_address_8} -{$outbound_proxy_secondary_8} +{$account.8.server_address} +{if isset($account.8.outbound_proxy_primary)}Yes{else}No{/if} +{$account.8.outbound_proxy_primary} +{$account.8.server_address} +{$account.8.outbound_proxy_secondary} Yes Yes No -{$register_expires_8} +{$account.8.register_expires} No -{if $sip_transport_8 == 'dns srv'}Yes{/if} -{if $sip_transport_8 != 'dns srv'}No{/if} +{if $account.8.sip_transport == 'dns srv'}Yes{/if} +{if $account.8.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1385,9 +1385,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_8} -{$user_id_8} -{$user_password_8} +{$account.8.display_name} +{$account.8.user_id} +{$account.8.password} No diff --git a/resources/templates/provision/cisco/spa502g/{$mac}.xml b/resources/templates/provision/cisco/spa502g/{$mac}.xml index aafdb4d5cb..fed1e63f1c 100644 --- a/resources/templates/provision/cisco/spa502g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa502g/{$mac}.xml @@ -348,7 +348,7 @@ {$device_label} -{$display_name_1} +{$account.1.display_name} {$voicemail_number} @@ -496,7 +496,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -517,8 +517,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -560,18 +560,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -581,9 +581,9 @@ {if isset($spa_dual_registration)}Yes{else}No{/if} {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No diff --git a/resources/templates/provision/cisco/spa504g/{$mac}.xml b/resources/templates/provision/cisco/spa504g/{$mac}.xml index 0212580349..a9462c6301 100644 --- a/resources/templates/provision/cisco/spa504g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa504g/{$mac}.xml @@ -268,7 +268,7 @@ No Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -281,8 +281,8 @@ 6 high up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -311,26 +311,26 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal {if isset($spa_dual_registration)}Yes{else}No{/if} {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -354,7 +354,7 @@ Yes Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -367,8 +367,8 @@ 6 high up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -397,26 +397,26 @@ No -{$server_address_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} -{$outbound_proxy_primary_2} -{$server_address_2} -{$outbound_proxy_secondary_2} +{$account.2.server_address} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{$account.2.server_address} +{$account.2.outbound_proxy_secondary} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal {if isset($spa_dual_registration)}Yes{else}No{/if} {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.$display_name} +{$account.2.user_id} +{$account.2.password} No @@ -440,7 +440,7 @@ Yes Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -453,8 +453,8 @@ 6 high up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -483,26 +483,26 @@ No -{$server_address_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} -{$outbound_proxy_primary_3} -{$server_address_3} -{$outbound_proxy_secondary_3} +{$account.3.server_address} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{$account.3.server_address} +{$account.3.outbound_proxy_secondary} Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No -{if $sip_transport_3 == 'dns srv'}Yes{/if} -{if $sip_transport_3 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal {if isset($spa_dual_registration)}Yes{else}No{/if} {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_3} -{$user_id_3} -{$user_password_3} +{$account.3.display_name} +{$account.3.user_id} +{$account.3.password} No @@ -526,7 +526,7 @@ Yes Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -539,8 +539,8 @@ 6 high up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -569,26 +569,26 @@ No -{$server_address_4} -{if isset($outbound_proxy_primary_4)}Yes{else}No{/if} -{$outbound_proxy_primary_4} -{$server_address_4} -{$outbound_proxy_secondary_4} +{$account.4.server_address} +{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if} +{$account.4.outbound_proxy_primary} +{$account.4.server_address} +{$account.4.outbound_proxy_secondary} Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No -{if $sip_transport_4 == 'dns srv'}Yes{/if} -{if $sip_transport_4 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal {if isset($spa_dual_registration)}Yes{else}No{/if} {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_4} -{$user_id_4} -{$user_password_4} +{$account.4.display_name} +{$account.4.user_id} +{$account.4.password} No diff --git a/resources/templates/provision/cisco/spa508g/{$mac}.xml b/resources/templates/provision/cisco/spa508g/{$mac}.xml index 8381b6cd29..238bf66e35 100644 --- a/resources/templates/provision/cisco/spa508g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa508g/{$mac}.xml @@ -521,7 +521,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -542,8 +542,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -585,18 +585,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -604,9 +604,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -645,7 +645,7 @@ Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -666,8 +666,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -709,18 +709,18 @@ No -{$server_address_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} -{$outbound_proxy_primary_2} -{$server_address_2} -{$outbound_proxy_secondary_2} +{$account.2.server_address} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{$account.2.server_address} +{$account.2.outbound_proxy_secondary} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -728,9 +728,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -769,7 +769,7 @@ Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -790,8 +790,8 @@ up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -833,18 +833,18 @@ No -{$server_address_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} -{$outbound_proxy_primary_3} -{$server_address_3} -{$outbound_proxy_secondary_3} +{$account.3.server_address} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{$account.3.server_address} +{$account.3.outbound_proxy_secondary} Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No -{if $sip_transport_3 == 'dns srv'}Yes{/if} -{if $sip_transport_3 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -852,9 +852,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_3} -{$user_id_3} -{$user_password_3} +{$account.3.display_name} +{$account.3.user_id} +{$account.3.password} No @@ -892,7 +892,7 @@ Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -913,8 +913,8 @@ up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -956,18 +956,18 @@ No -{$server_address_4} -{if isset($outbound_proxy_primary_4)}Yes{else}No{/if} -{$outbound_proxy_primary_4} -{$server_address_4} -{$outbound_proxy_secondary_4} +{$account.4.server_address} +{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if} +{$account.4.outbound_proxy_primary} +{$account.4.server_address} +{$account.4.$outbound_proxy_secondary} Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No -{if $sip_transport_4 == 'dns srv'}Yes{/if} -{if $sip_transport_4 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -975,9 +975,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_4} -{$user_id_4} -{$user_password_4} +{$account.4.display_name} +{$account.4.user_id} +{$account.4.password} No @@ -1016,7 +1016,7 @@ Yes -{if $shared_line_5 == "shared"}shared{else}private{/if} +{if $account.5.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1037,8 +1037,8 @@ up and down -{$sip_transport_5|upper} -{$sip_port_5} +{$account.5.sip_transport|upper} +{$account.5.sip_port} No Yes @@ -1080,18 +1080,18 @@ No -{$server_address_5} -{if isset($outbound_proxy_primary_5)}Yes{else}No{/if} -{$outbound_proxy_primary_5} -{$server_address_5} -{$outbound_proxy_secondary_5} +{$account.5.server_address} +{if isset($account.5.outbound_proxy_primary)}Yes{else}No{/if} +{$account.5.outbound_proxy_primary} +{$account.5.server_address} +{$account.5.outbound_proxy_secondary} Yes Yes No -{$register_expires_5} +{$account.5.register_expires} No -{if $sip_transport_5 == 'dns srv'}Yes{/if} -{if $sip_transport_5 != 'dns srv'}No{/if} +{if $account.5.sip_transport == 'dns srv'}Yes{/if} +{if $account.5.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1099,9 +1099,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_5} -{$user_id_5} -{$user_password_5} +{$account.5.display_name} +{$account.5.user_id} +{$account.5.password} No @@ -1140,7 +1140,7 @@ Yes -{if $shared_line_6 == "shared"}shared{else}private{/if} +{if $account.6.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1161,8 +1161,8 @@ up and down -{$sip_transport_6|upper} -{$sip_port_6} +{$account.6.sip_transport|upper} +{$account.6.sip_port} No Yes @@ -1204,18 +1204,18 @@ No -{$server_address_6} -{if isset($outbound_proxy_primary_6)}Yes{else}No{/if} -{$outbound_proxy_primary_6} -{$server_address_6} -{$outbound_proxy_secondary_6} +{$account.6.server_address} +{if isset($account.6.outbound_proxy_primary)}Yes{else}No{/if} +{$account.6.outbound_proxy_primary} +{$account.6.server_address} +{$account.6.outbound_proxy_secondary} Yes Yes No -{$register_expires_6} +{$account.6.register_expires} No -{if $sip_transport_6 == 'dns srv'}Yes{/if} -{if $sip_transport_6 != 'dns srv'}No{/if} +{if $account.6.sip_transport == 'dns srv'}Yes{/if} +{if $account.6.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1223,9 +1223,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_6} -{$user_id_6} -{$user_password_6} +{$account.6.display_name} +{$account.6.user_id} +{$account.6.password} No @@ -1264,7 +1264,7 @@ Yes -{if $shared_line_7 == "shared"}shared{else}private{/if} +{if $account.7.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1285,8 +1285,8 @@ up and down -{$sip_transport_7|upper} -{$sip_port_7} +{$account.7.sip_transport|upper} +{$account.7.sip_port} No Yes @@ -1328,18 +1328,18 @@ No -{$server_address_7} -{if isset($outbound_proxy_primary_7)}Yes{else}No{/if} -{$outbound_proxy_primary_7} -{$server_address_7} -{$outbound_proxy_secondary_7} +{$account.7.server_address} +{if isset($account.7.outbound_proxy_primary)}Yes{else}No{/if} +{$account.7.outbound_proxy_primary} +{$account.7.server_address} +{$account.7.outbound_proxy_secondary} Yes Yes No -{$register_expires_7} +{$account.7.register_expires} No -{if $sip_transport_7 == 'dns srv'}Yes{/if} -{if $sip_transport_7 != 'dns srv'}No{/if} +{if $account.7.sip_transport == 'dns srv'}Yes{/if} +{if $account.7.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1347,9 +1347,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_7} -{$user_id_7} -{$user_password_7} +{$account.7.display_name} +{$account.7.user_id} +{$account.7.password} No @@ -1388,7 +1388,7 @@ Yes -{if $shared_line_8 == "shared"}shared{else}private{/if} +{if $account.8.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1409,8 +1409,8 @@ up and down -{$sip_transport_8|upper} -{$sip_port_8} +{$account.8.sip_transport|upper} +{$account.8.sip_port} No Yes @@ -1452,18 +1452,18 @@ No -{$server_address_8} -{if isset($outbound_proxy_primary_8)}Yes{else}No{/if} -{$outbound_proxy_primary_8} -{$server_address_8} -{$outbound_proxy_secondary_8} +{$account.8.server_address} +{if isset($account.8.outbound_proxy_primary)}Yes{else}No{/if} +{$account.8.outbound_proxy_primary} +{$account.8.server_address} +{$account.8.outbound_proxy_secondary} Yes Yes No -{$register_expires_8} +{$account.8.register_expires} No -{if $sip_transport_8 == 'dns srv'}Yes{/if} -{if $sip_transport_8 != 'dns srv'}No{/if} +{if $account.8.sip_transport == 'dns srv'}Yes{/if} +{if $account.8.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1471,9 +1471,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_8} -{$user_id_8} -{$user_password_8} +{$account.8.display_name} +{$account.8.user_id} +{$account.8.password} No diff --git a/resources/templates/provision/cisco/spa509g/{$mac}.xml b/resources/templates/provision/cisco/spa509g/{$mac}.xml index 03c0c6209b..7802cb86b0 100644 --- a/resources/templates/provision/cisco/spa509g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa509g/{$mac}.xml @@ -350,7 +350,7 @@ {$device_label} -{$display_name_1} +{$account.1.display_name} {$voicemail_number} http://{$domain_name}/themes/enhanced/images/logo.bmp @@ -523,7 +523,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -544,8 +544,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport} +{$account.1.sip_port} No Yes @@ -586,18 +586,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -605,9 +605,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -646,7 +646,7 @@ Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -667,8 +667,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport} +{$account.2.sip_port} No Yes @@ -709,18 +709,18 @@ No -{$server_address_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} -{$outbound_proxy_primary_2} -{$server_address_2} -{$outbound_proxy_secondary_2} +{$account.2.server_address} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{$account.2.server_address} +{$account.2.outbound_proxy_secondary} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -728,9 +728,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -769,7 +769,7 @@ Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -790,8 +790,8 @@ up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport} +{$account.3.sip_port} No Yes @@ -832,18 +832,18 @@ No -{$server_address_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} -{$outbound_proxy_primary_3} -{$server_address_3} -{$outbound_proxy_secondary_3} +{$account.3.server_address} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{$account.3.server_address} +{$account.3.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.3.register_expires} No -{if $sip_transport_3 == 'dns srv'}Yes{/if} -{if $sip_transport_3 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -851,9 +851,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_3} -{$user_id_3} -{$user_password_3} +{$account.3.display_name} +{$account.3.user_id} +{$account.3.assword} No @@ -892,7 +892,7 @@ Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -913,8 +913,8 @@ up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport} +{$account.4.sip_port} No Yes @@ -965,8 +965,8 @@ No {$register_expires_4} No -{if $sip_transport_4 == 'dns srv'}Yes{/if} -{if $sip_transport_4 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1015,7 +1015,7 @@ Yes -{if $shared_line_5 == "shared"}shared{else}private{/if} +{if $account.5.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1036,8 +1036,8 @@ up and down -{$sip_transport_5|upper} -{$sip_port_5} +{$account.5.sip_transport} +{$account.5.sip_port} No Yes @@ -1078,18 +1078,18 @@ No -{$server_address_5} -{if isset($outbound_proxy_primary_5)}Yes{else}No{/if} -{$outbound_proxy_primary_5} -{$server_address_5} +{$account.5.server_address} +{if isset($account.5.outbound_proxy_primary)}Yes{else}No{/if} +{$account.5.outbound_proxy_primary} +{$account.5.server_address} {$outbound_proxy_secondary_5} Yes Yes No -{$register_expires_5} +{$account.5.register_expires} No -{if $sip_transport_5 == 'dns srv'}Yes{/if} -{if $sip_transport_5 != 'dns srv'}No{/if} +{if $account.5.sip_transport == 'dns srv'}Yes{/if} +{if $account.5.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1138,7 +1138,7 @@ Yes -{if $shared_line_6 == "shared"}shared{else}private{/if} +{if $account.6.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1159,8 +1159,8 @@ up and down -{$sip_transport_6|upper} -{$sip_port_6} +{$account.6.sip_transport} +{$account.6.sip_port} No Yes @@ -1201,18 +1201,18 @@ No -{$server_address_6} -{if isset($outbound_proxy_primary_6)}Yes{else}No{/if} -{$outbound_proxy_primary_6} -{$server_address_6} -{$outbound_proxy_secondary_6} +{$account.6.server_address} +{if isset($account.6.outbound_proxy_primary)}Yes{else}No{/if} +{$account.6.outbound_proxy_primary} +{$account.6.server_address} +{$account.6.outbound_proxy_secondary} Yes Yes No -{$register_expires_6} +{$account.6.register_expires} No -{if $sip_transport_6 == 'dns srv'}Yes{/if} -{if $sip_transport_6 != 'dns srv'}No{/if} +{if $account.6.sip_transport == 'dns srv'}Yes{/if} +{if $account.6.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1220,9 +1220,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_6} -{$user_id_6} -{$user_password_6} +{$account.6.display_name} +{$account.6.user_id} +{$account.6.password} No @@ -1261,7 +1261,7 @@ Yes -{if $shared_line_7 == "shared"}shared{else}private{/if} +{if $account.7.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1282,8 +1282,8 @@ up and down -{$sip_transport_7|upper} -{$sip_port_7} +{$account.7.sip_transport} +{$account.7.sip_port} No Yes @@ -1324,18 +1324,18 @@ No -{$server_address_7} -{if isset($outbound_proxy_primary_7)}Yes{else}No{/if} -{$outbound_proxy_primary_7} -{$server_address_7} -{$outbound_proxy_secondary_7} +{$account.7.server_address} +{if isset($account.7.outbound_proxy_primary)}Yes{else}No{/if} +{$account.7.outbound_proxy_primary} +{$account.7.server_address} +{$account.7.outbound_proxy_secondary} Yes Yes No -{$register_expires_7} +{$account.7.register_expires} No -{if $sip_transport_7 == 'dns srv'}Yes{/if} -{if $sip_transport_7 != 'dns srv'}No{/if} +{if $account.7.sip_transport == 'dns srv'}Yes{/if} +{if $account.7.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1343,9 +1343,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_7} -{$user_id_7} -{$user_password_7} +{$account.7.display_name} +{$account.7.user_id} +{$account.7.password} No @@ -1384,7 +1384,7 @@ Yes -{if $shared_line_8 == "shared"}shared{else}private{/if} +{if $account.8.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1405,8 +1405,8 @@ up and down -{$sip_transport_8|upper} -{$sip_port_8} +{$account.8.sip_transport} +{$account.8.sip_port} No Yes @@ -1447,18 +1447,18 @@ No -{$server_address_8} -{if isset($outbound_proxy_primary_8)}Yes{else}No{/if} -{$outbound_proxy_primary_8} -{$server_address_8} -{$outbound_proxy_secondary_8} +{$account.8.server_address} +{if isset($account.8.outbound_proxy_primary)}Yes{else}No{/if} +{$account.8.outbound_proxy_primary} +{$account.8.server_address} +{$account.8.outbound_proxy_secondary} Yes Yes No -{$register_expires_8} +{$account.8.register_expires} No -{if $sip_transport_8 == 'dns srv'}Yes{/if} -{if $sip_transport_8 != 'dns srv'}No{/if} +{if $account.8.sip_transport == 'dns srv'}Yes{/if} +{if $account.8.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1466,9 +1466,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_8} -{$user_id_8} -{$user_password_8} +{$account.8.display_name} +{$account.8.user_id} +{$account.8.password} No @@ -1507,7 +1507,7 @@ Yes -{if $shared_line_9 == "shared"}shared{else}private{/if} +{if $account.9.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1528,8 +1528,8 @@ up and down -{$sip_transport_9|upper} -{$sip_port_9} +{$account.9.sip_transport} +{$account.9.sip_port} No Yes @@ -1570,18 +1570,18 @@ No -{$server_address_9} -{if isset($outbound_proxy_primary_9)}Yes{else}No{/if} -{$outbound_proxy_primary_9} -{$server_address_9} -{$outbound_proxy_secondary_9} +{$account.9.server_address} +{if isset($account.9.outbound_proxy_primary)}Yes{else}No{/if} +{$account.9.outbound_proxy_primary} +{$account.9.server_address} +{$account.9.outbound_proxy_secondary} Yes Yes No -{$register_expires_9} +{$account.9.register_expires} No -{if $sip_transport_9 == 'dns srv'}Yes{/if} -{if $sip_transport_9 != 'dns srv'}No{/if} +{if $account.9.sip_transport == 'dns srv'}Yes{/if} +{if $account.9.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1589,9 +1589,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_9} -{$user_id_9} -{$user_password_9} +{$account.9.display_name} +{$account.9.user_id} +{$account.9.password} No @@ -1630,7 +1630,7 @@ Yes -{if $shared_line_10 == "shared"}shared{else}private{/if} +{if $account.10.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1651,8 +1651,8 @@ up and down -{$sip_transport_10|upper} -{$sip_port_10} +{$account.10.sip_transport} +{$account.10.sip_port} No Yes @@ -1693,18 +1693,18 @@ No -{$server_address_7} -{if isset($outbound_proxy_primary_10)}Yes{else}No{/if} -{$outbound_proxy_primary_10} -{$server_address_10} -{$outbound_proxy_secondary_10} +{$account.10.server_address} +{if isset($account.10.outbound_proxy_primary)}Yes{else}No{/if} +{$account.10.outbound_proxy_primary} +{$account.10.server_address} +{$account.10.outbound_proxy_secondary} Yes Yes No -{$register_expires_10} +{$account.10.register_expires} No -{if $sip_transport_10 == 'dns srv'}Yes{/if} -{if $sip_transport_10 != 'dns srv'}No{/if} +{if $account.10.sip_transport == 'dns srv'}Yes{/if} +{if $account.10.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1712,9 +1712,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_10} -{$user_id_10} -{$user_password_10} +{$account.10.display_name} +{$account.10.user_id} +{$account.10.password} No @@ -1753,7 +1753,7 @@ Yes -{if $shared_line_11 == "shared"}shared{else}private{/if} +{if $account.11.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1774,8 +1774,8 @@ up and down -{$sip_transport_11|upper} -{$sip_port_11} +{$account.11.sip_transport} +{$account.11.sip_port} No Yes @@ -1816,18 +1816,18 @@ No -{$server_address_11} -{if isset($outbound_proxy_primary_11)}Yes{else}No{/if} -{$outbound_proxy_primary_11} -{$server_address_11} -{$outbound_proxy_secondary_11} +{$account.11.server_address} +{if isset($account.11.outbound_proxy_primary)}Yes{else}No{/if} +{$account.11.outbound_proxy_primary} +{$account.11.server_address} +{$account.11.outbound_proxy_secondary} Yes Yes No -{$register_expires_11} +{$account.11.register_expires} No -{if $sip_transport_11 == 'dns srv'}Yes{/if} -{if $sip_transport_11 != 'dns srv'}No{/if} +{if $account.11.sip_transport == 'dns srv'}Yes{/if} +{if $account.11.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1835,9 +1835,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_11} -{$user_id_11} -{$user_password_11} +{$account.11.display_name} +{$account.11.user_id} +{$account.11.password} No @@ -1876,7 +1876,7 @@ Yes -{if $shared_line_12 == "shared"}shared{else}private{/if} +{if $account.12.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1897,8 +1897,8 @@ up and down -{$sip_transport_12|upper} -{$sip_port_12} +{$account.12.sip_transport} +{$account.12.sip_port} No Yes @@ -1939,18 +1939,18 @@ No -{$server_address_12} -{if isset($outbound_proxy_primary_12)}Yes{else}No{/if} -{$outbound_proxy_primary_12} -{$server_address_12} -{$outbound_proxy_secondary_12} +{$account.12.server_address} +{if isset($account.12.outbound_proxy_primary)}Yes{else}No{/if} +{$account.12.outbound_proxy_primary} +{$account.12.server_address} +{$account.12.outbound_proxy_secondary} Yes Yes No -{$register_expires_12} +{$account.12.register_expires} No -{if $sip_transport_12 == 'dns srv'}Yes{/if} -{if $sip_transport_12 != 'dns srv'}No{/if} +{if $account.12.sip_transport == 'dns srv'}Yes{/if} +{if $account.12.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -1958,9 +1958,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_12} -{$user_id_12} -{$user_password_12} +{$account.12.display_name} +{$account.12.user_id} +{$account.12.password} No diff --git a/resources/templates/provision/cisco/spa512g/{$mac}.xml b/resources/templates/provision/cisco/spa512g/{$mac}.xml index 93c14f253d..a3c6d6c353 100644 --- a/resources/templates/provision/cisco/spa512g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa512g/{$mac}.xml @@ -350,7 +350,7 @@ {$device_label} -{$display_name_1} +{$account.1.display_name} {$voicemail_number} @@ -499,7 +499,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -520,8 +520,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -563,18 +563,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -582,9 +582,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No diff --git a/resources/templates/provision/cisco/spa514g/{$mac}.xml b/resources/templates/provision/cisco/spa514g/{$mac}.xml index 86a8fbe233..da2d5e4769 100644 --- a/resources/templates/provision/cisco/spa514g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa514g/{$mac}.xml @@ -212,7 +212,7 @@ Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -233,8 +233,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -276,18 +276,18 @@ No -{$server_address_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} -{$outbound_proxy_primary_1} -{$server_address_1} -{$outbound_proxy_secondary_1} +{$account.1.server_address} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{$account.1.server_address} +{$account.1.outbound_proxy_secondary} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -295,9 +295,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -336,7 +336,7 @@ Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -357,8 +357,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -400,18 +400,18 @@ No -{$server_address_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} -{$outbound_proxy_primary_2} -{$server_address_2} -{$outbound_proxy_secondary_2} +{$account.2.server_address} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{$account.2.server_address} +{$account.2.outbound_proxy_secondary} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -419,9 +419,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -460,7 +460,7 @@ Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -479,8 +479,8 @@ 6 high up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -522,18 +522,18 @@ No -{$server_address_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} -{$outbound_proxy_primary_3} -{$server_address_3} -{$outbound_proxy_secondary_3} +{$account.3.server_address} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{$account.3.server_address} +{$account.3.outbound_proxy_secondary} Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No -{if $sip_transport_3 == 'dns srv'}Yes{/if} -{if $sip_transport_3 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -541,9 +541,9 @@ {if isset($spa_register_when_failover)}Yes{else}No{/if} -{$display_name_3} -{$user_id_3} -{$user_password_3} +{$account.3.display_name} +{$account.3.user_id} +{$account.3.password} No @@ -582,7 +582,7 @@ Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -601,8 +601,8 @@ 6 high up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -644,18 +644,18 @@ No -{$server_address_4} -{if isset($outbound_proxy_primary_4)}Yes{else}No{/if} -{$outbound_proxy_primary_4} -{$server_address_4} -{$outbound_proxy_secondary_4} +{$account.4.server_address} +{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if} +{$account.4.outbound_proxy_primary} +{$account.4.server_address} +{$account.4.outbound_proxy_secondary} Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No -{if $sip_transport_4 == 'dns srv'}Yes{/if} -{if $sip_transport_4 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal @@ -664,9 +664,9 @@ -{$display_name_4} -{$user_id_4} -{$user_password_4} +{$account.4.display_name} +{$account.4.user_id} +{$account.4.password} No diff --git a/resources/templates/provision/cisco/spa525g/{$mac}.xml b/resources/templates/provision/cisco/spa525g/{$mac}.xml index 1347046b25..5fa2bf204b 100644 --- a/resources/templates/provision/cisco/spa525g/{$mac}.xml +++ b/resources/templates/provision/cisco/spa525g/{$mac}.xml @@ -250,8 +250,8 @@ up and down -{$sip_transport_1|upper} -{$sip_port_1} +{$account.1.sip_transport|upper} +{$account.1.sip_port} No Yes @@ -290,23 +290,23 @@ {$domain_name} -{$outbound_proxy_primary_1} -{if isset($outbound_proxy_primary_1)}Yes{else}No{/if} +{$account.1.outbound_proxy_primary} +{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No -{if $sip_transport_1 == 'dns srv'}Yes{/if} -{if $sip_transport_1 != 'dns srv'}No{/if} +{if $account.1.sip_transport == 'dns srv'}Yes{/if} +{if $account.1.sip_transport != 'dns srv'}No{/if} No 600 Normal -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -343,7 +343,7 @@ Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -364,8 +364,8 @@ up and down -{$sip_transport_2|upper} -{$sip_port_2} +{$account.2.sip_transport|upper} +{$account.2.sip_port} No Yes @@ -404,23 +404,23 @@ {$domain_name} -{$outbound_proxy_primary_2} -{if isset($outbound_proxy_primary_2)}Yes{else}No{/if} +{$account.2.outbound_proxy_primary} +{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No -{if $sip_transport_2 == 'dns srv'}Yes{/if} -{if $sip_transport_2 != 'dns srv'}No{/if} +{if $account.2.sip_transport == 'dns srv'}Yes{/if} +{if $account.2.sip_transport != 'dns srv'}No{/if} No 600 Normal -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No @@ -457,7 +457,7 @@ Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -478,8 +478,8 @@ up and down -{$sip_transport_3|upper} -{$sip_port_3} +{$account.3.sip_transport|upper} +{$account.3.sip_port} No Yes @@ -518,23 +518,23 @@ {$domain_name} -{$outbound_proxy_primary_3} -{if isset($outbound_proxy_primary_3)}Yes{else}No{/if} +{$account.3.outbound_proxy_primary} +{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No -{if $sip_transport_3 == 'dns srv'}Yes{/if} -{if $sip_transport_3 != 'dns srv'}No{/if} +{if $account.3.sip_transport == 'dns srv'}Yes{/if} +{if $account.3.sip_transport != 'dns srv'}No{/if} No 600 Normal -{$display_name_3} -{$user_id_3} -{$user_password_3} +{$account.3.display_name} +{$account.3.user_id} +{$account.3.password} No @@ -571,7 +571,7 @@ Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -592,8 +592,8 @@ up and down -{$sip_transport_4|upper} -{$sip_port_4} +{$account.4.sip_transport|upper} +{$account.4.sip_port} No Yes @@ -632,23 +632,23 @@ {$domain_name} -{$outbound_proxy_primary_4} -{if isset($outbound_proxy_primary_4)}Yes{else}No{/if} +{$account.4.outbound_proxy_primary} +{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_4} +{$account.4.register_expires} No -{if $sip_transport_4 == 'dns srv'}Yes{/if} -{if $sip_transport_4 != 'dns srv'}No{/if} +{if $account.4.sip_transport == 'dns srv'}Yes{/if} +{if $account.4.sip_transport != 'dns srv'}No{/if} No 600 Normal -{$display_name_4} -{$user_id_4} -{$user_password_4} +{$account.4.display_name} +{$account.4.user_id} +{$account.4.password} No @@ -685,7 +685,7 @@ Yes -{if $shared_line_5 == "shared"}shared{else}private{/if} +{if $account.5.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -706,8 +706,8 @@ up and down -{$sip_transport_5|upper} -{$sip_port_5} +{$account.5.sip_transport|upper} +{$account.5.sip_port} No Yes @@ -746,22 +746,22 @@ {$domain_name} -{$outbound_proxy_primary_5} -{if isset($outbound_proxy_primary_5)}Yes{else}No{/if} +{$account.5.outbound_proxy_primary} +{if isset($account.5.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_5} +{$account.5.register_expires} No -{if $sip_transport_5 == 'dns srv'}Yes{/if} -{if $sip_transport_5 != 'dns srv'}No{/if} +{if $account.5.sip_transport == 'dns srv'}Yes{/if} +{if $account.5.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_5} -{$user_id_5} -{$user_password_5} +{$account.5.display_name} +{$account.5.user_id} +{$account.5.user_password} No @@ -798,7 +798,7 @@ Yes -{if $shared_line_6 == "shared"}shared{else}private{/if} +{if $account.6.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -819,8 +819,8 @@ up and down -{$sip_transport_6|upper} -{$sip_port_6} +{$account.6.sip_transport|upper} +{$account.6.sip_port} No Yes @@ -859,23 +859,23 @@ {$domain_name} -{$outbound_proxy_primary_6} -{if isset($outbound_proxy_primary_6)}Yes{else}No{/if} +{$account.6.outbound_proxy_primary} +{if isset($account.6.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_6} +{$account.6.register_expires} No -{if $sip_transport_6 == 'dns srv'}Yes{/if} -{if $sip_transport_6 != 'dns srv'}No{/if} +{if $account.6.sip_transport == 'dns srv'}Yes{/if} +{if $account.6.sip_transport != 'dns srv'}No{/if} No 600 Normal -{$display_name_6} -{$user_id_6} -{$user_password_6} +{$account.6.display_name} +{$account.6.user_id} +{$account.6.password} No @@ -912,7 +912,7 @@ Yes -{if $shared_line_7 == "shared"}shared{else}private{/if} +{if $account.7.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -933,8 +933,8 @@ up and down -{$sip_transport_7|upper} -{$sip_port_7} +{$account.7.sip_transport|upper} +{$account.7.sip_port} No Yes @@ -973,22 +973,22 @@ {$domain_name} -{$outbound_proxy_primary_7} -{if isset($outbound_proxy_primary_7)}Yes{else}No{/if} +{$account.7.outbound_proxy_primary} +{if isset($account.7.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_7} +{$account.7.register_expires} No -{if $sip_transport_7 == 'dns srv'}Yes{/if} -{if $sip_transport_7 != 'dns srv'}No{/if} +{if $account.7.sip_transport == 'dns srv'}Yes{/if} +{if $account.7.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_7} -{$user_id_7} -{$user_password_7} +{$account.7.display_name} +{$account.7.user_id} +{$account.7.password} No @@ -1025,7 +1025,7 @@ Yes -{if $shared_line_8 == "shared"}shared{else}private{/if} +{if $account.8.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1046,8 +1046,8 @@ up and down -{$sip_transport_8|upper} -{$sip_port_8} +{$account.8.sip_transport|upper} +{$account.8.sip_port} No Yes @@ -1086,22 +1086,22 @@ {$domain_name} -{$outbound_proxy_primary_8} -{if isset($outbound_proxy_primary_8)}Yes{else}No{/if} +{$account.8.outbound_proxy_primary} +{if isset($account.8.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_8} +{$account.8.register_expires} No -{if $sip_transport_8 == 'dns srv'}Yes{/if} -{if $sip_transport_8 != 'dns srv'}No{/if} +{if $account.8.sip_transport == 'dns srv'}Yes{/if} +{if $account.8.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_8} -{$user_id_8} -{$user_password_8} +{$account.8.display_name} +{$account.8.user_id} +{$account.8.password} No @@ -1138,7 +1138,7 @@ Yes -{if $shared_line_9 == "shared"}shared{else}private{/if} +{if $account.9.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1159,8 +1159,8 @@ up and down -{$sip_transport_9|upper} -{$sip_port_9} +{$account.9.sip_transport|upper} +{$account.9.sip_port} No Yes @@ -1199,22 +1199,22 @@ {$domain_name} -{$outbound_proxy_primary_9} -{if isset($outbound_proxy_primary_9)}Yes{else}No{/if} +{$account.9.outbound_proxy_primary} +{if isset($account.9.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_9} +{$account.9.register_expires} No -{if $sip_transport_9 == 'dns srv'}Yes{/if} -{if $sip_transport_9 != 'dns srv'}No{/if} +{if $account.9.sip_transport == 'dns srv'}Yes{/if} +{if $account.9.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_9} -{$user_id_9} -{$user_password_9} +{$account.9.display_name} +{$account.9.user_id} +{$account.9.password} No @@ -1251,7 +1251,7 @@ Yes -{if $shared_line_10 == "shared"}shared{else}private{/if} +{if $account.10.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1272,8 +1272,8 @@ up and down -{$sip_transport_10|upper} -{$sip_port_10} +{$account.10.sip_transport|upper} +{$account.10.sip_port} No Yes @@ -1312,22 +1312,22 @@ {$domain_name} -{$outbound_proxy_primary_10} -{if isset($outbound_proxy_primary_10)}Yes{else}No{/if} +{$account.10.outbound_proxy_primary} +{if isset($account.10.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_10} +{$account.10.register_expires} No -{if $sip_transport_10 == 'dns srv'}Yes{/if} -{if $sip_transport_10 != 'dns srv'}No{/if} +{if $account.10.sip_transport == 'dns srv'}Yes{/if} +{if $account.10.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_10} -{$user_id_10} -{$user_password_10} +{$account.10.display_name} +{$account.10.user_id} +{$account.10.password} No @@ -1364,7 +1364,7 @@ Yes -{if $shared_line_11 == "shared"}shared{else}private{/if} +{if $account.11.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1385,8 +1385,8 @@ up and down -{$sip_transport_11|upper} -{$sip_port_11} +{$account.11.sip_transport|upper} +{$account.11.sip_port} No Yes @@ -1425,22 +1425,22 @@ {$domain_name} -{$outbound_proxy_primary_11} -{if isset($outbound_proxy_primary_11)}Yes{else}No{/if} +{$account.11.outbound_proxy_primary} +{if isset($account.11.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_11} +{$account.11.register_expires} No -{if $sip_transport_11 == 'dns srv'}Yes{/if} -{if $sip_transport_11 != 'dns srv'}No{/if} +{if $account.11.sip_transport == 'dns srv'}Yes{/if} +{if $account.11.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_11} -{$user_id_11} -{$user_password_11} +{$account.11.display_name} +{$account.11.user_id} +{$account.11.password} No @@ -1477,7 +1477,7 @@ Yes -{if $shared_line_12 == "shared"}shared{else}private{/if} +{if $account.12.shared_line == "shared"}shared{else}private{/if} 3600 No @@ -1498,8 +1498,8 @@ up and down -{$sip_transport_12|upper} -{$sip_port_12} +{$account.12.sip_transport|upper} +{$account.12.sip_port} No Yes @@ -1538,22 +1538,22 @@ {$domain_name} -{$outbound_proxy_primary_12} -{if isset($outbound_proxy_primary_12)}Yes{else}No{/if} +{$account.12.outbound_proxy_primary} +{if isset($account.12.outbound_proxy_primary)}Yes{else}No{/if} Yes Yes No -{$register_expires_12} +{$account.12.register_expires} No -{if $sip_transport_12 == 'dns srv'}Yes{/if} -{if $sip_transport_12 != 'dns srv'}No{/if} +{if $account.12.sip_transport == 'dns srv'}Yes{/if} +{if $account.12.sip_transport != 'dns srv'}No{/if} 600 Normal -{$display_name_12} -{$user_id_12} -{$user_password_12} +{$account.12.display_name} +{$account.12.user_id} +{$account.12.password} No diff --git a/resources/templates/provision/cisco/spa525g2/{$mac}.xml b/resources/templates/provision/cisco/spa525g2/{$mac}.xml index ef24f66fa7..00f8814607 100644 --- a/resources/templates/provision/cisco/spa525g2/{$mac}.xml +++ b/resources/templates/provision/cisco/spa525g2/{$mac}.xml @@ -690,7 +690,7 @@ .1 12dB No - $USER {$display_name_1} + $USER {$account.1.display_name} *97 Phone @@ -884,7 +884,7 @@ -{$user_id_1} +{$account.1.user_id} 86400 @@ -897,7 +897,7 @@ No 3600 {$domain_name} -{$outbound_proxy_1} +{$account.1.outbound_proxy} Yes @@ -913,8 +913,8 @@ No No {$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.user_id} +{$account.1.password} No @@ -1145,7 +1145,7 @@ Yes No -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 No diff --git a/resources/templates/provision/fanvil/i30/{$mac}.cfg b/resources/templates/provision/fanvil/i30/{$mac}.cfg new file mode 100644 index 0000000000..deb992ea2a --- /dev/null +++ b/resources/templates/provision/fanvil/i30/{$mac}.cfg @@ -0,0 +1,951 @@ + + +2.0002 + +DHCP + +255.255.255.0 + +{if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} +{if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} +1 +0 +Fanvil i30 +1 +1 +10 + +VOIP +0 +16384 +200 +{$ntp_server_primary} +{$ntp_server_secondary} +{if isset($ntp_server_primary)}1{else}0{/if} +{$fanvil_time_zone} +{$fanvil_location} +{$fanvil_time_zone_name} +{$fanvil_enable_dst} +{$fanvil_dst_fixed_type} +60 +{if isset($fanvil_dst_minute_offset)}{$fanvil_dst_minute_offset}{else}60{/if} +3 +5 +0 +2 +0 +10 +5 +0 +2 +0 +0 +1500 + +1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +2 +0 +72 +{$fanvil_network_failure_reboot} +{$fanvil_network_failure_wait_time} +{$fanvil_sip_failure_reboot} +{$fanvil_sip_failure_wait_time} + + +10.10.99.49 +255.255.255.0 +0 +1 + + +1 +1 +4 +1 +5 +1 + + +P1 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +0 +0 +0 + +0 +0 +1 +3 +1 +2 +3 +0 +1 +1 +1 +1 +0 +10 +10 +0 +0 +1 +1 +0 +0 + +1 +0 +30 +4 + + +1 +0 +0 +0 +0 + + +11 +1 +1 +0 +0 +0 +101 +0 +0 +3 +7 +0 +117 +2 + + +P1 +5 +5 +5 +4 +5 +0 +10 +G722/8000 +PCMA/8000 +PCMU/8000 +G729/8000 + + + + + + +Alert1 + +1 + + +Alert2 + +2 + + +Alert3 + +3 + + +Alert4 + +4 + + +Alert5 + +5 + + +Alert6 + +6 + + +Alert7 + +7 + + +Alert8 + +8 + + +Alert9 + +9 + + +Alert10 + +10 + + + + +{$sip_port} +{if isset($fanvil_stun_server)}{$fanvil_stun_server}{else}{/if} +{if isset($fanvil_stun_port)}{$fanvil_stun_port}{else}3478{/if} +50 +800 + +32 +0 +0 +1 +0 +0 + + +SIP1 +{$auth_id_1} +{$display_name_1} + +{$server_address_1} +{$sip_port_1} +{$auth_id_1} +{$user_password_1} +{$register_expires_1} +{if isset($user_password_1)}1{else}0{/if} +{$outbound_proxy_primary_1} +{$outbound_proxy_1_port} +{$auth_id_1} +{$user_password_1} +{$outbound_proxy_secondary_1} +{$outbound_proxy_2_port} +{if isset($outbound_proxy_secondary_1)}1{else}0{/if} +0 + +0 + +0 + +0 +0 +0 + + + +5 +0 + +0 +0 + + +1 +60 +0 + +1 +0 +0 +0 +0 +1 +1 +0 +1 +0 +{$register_expires_1} +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +5060 +1 +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +0 +0 + +0 +0 +1 +0 +{$voicemail_number} + + + +1 +0 +5 +1 +0 + + + + + + + + + + +G722,G711U,G711A,G729,G726-32,G723 + + +0 +0 +4 +0 +1 +0 +1 +0 +0 +0 +0 +0 +0 +1 + + +SIP2 +{$account.2.user_id} +{$account.2.display_name} + +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} +{if isset($account.2.password)}1{else}0{/if} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.1.sip_port} +{if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} +0 + +0 + +0 + +0 +0 +0 + + + +5 +0 + +0 +0 + + +1 +60 +0 + +1 +0 +0 +0 +0 +1 +1 +0 +1 +0 +{$account.2.register_expires} +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +5060 +1 +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +0 +0 + +0 +0 +1 +0 +{$voicemail_number} + + + +1 +0 +5 +1 +0 + + + + + + + + + + +G722,G711U,G711A,G729,G726-32,G723 + + +0 +0 +4 +0 +1 +0 +1 +0 +0 +0 +0 +0 +0 +1 + + + + +0 +0 + + +MCAST1 +0 + + + + +MCAST2 +0 + + + + +MCAST3 +0 + + + + +MCAST4 +0 + + + + +MCAST5 +0 + + + + +MCAST6 +0 + + + + +MCAST7 +0 + + + + +MCAST8 +0 + + + + +MCAST9 +0 + + + + +MCAST10 +0 + + + + + + +0 +3600 + + + + + +0 +{if isset($fanvil_egs_enable_card_reader)}{$fanvil_egs_enable_card_reader}{else}1{/if} +{if isset($fanvil_egs_switch_open_duration)}{$fanvil_egs_switch_open_duration}{else}1{/if} +5 +120 +0 +2 +{if isset($fanvil_egs_enable_access_table)}{$fanvil_egs_enable_access_table}{else}1{/if} +0 +* +{if isset($fanvil_egs_opening_door_code_remote)}{$fanvil_egs_opening_door_code_remote}{else}*{/if} +{if isset($fanvil_egs_opening_door_code_local)}{$fanvil_egs_opening_door_code_local}{else}6789{/if} +i30 IP Door Phone +0 +16 +360 +1080 +{if isset($fanvil_egs_enable_syslog)}{$fanvil_egs_enable_syslog}{else}0{/if} +{if isset($fanvil_egs_log_port)}{$fanvil_egs_log_port}{else}514{/if} +{if isset($fanvil_egs_log_server)}{$fanvil_egs_log_server}{else}0.0.0.0{/if} +{if isset($fanvil_egs_enable_indoor_open)}{$fanvil_egs_enable_indoor_open}{else}1{/if} +1 +{$fanvil_egs_enable_digit_pad} +0 +{$fanvil_egs_enable_function_key_answer} +{if isset($fanvil_egs_switch_mode)}{$fanvil_egs_switch_mode}{else}0{/if} +0 +4 +0 +180 +1 +1 +0 +180 +1 +1 +0 +0 +0 +0 +1 +0 +1 +0 +0 +0 +0 +1 +1 +0 +1 +5 +1 +0 +1 +1 +1 +0 +0 +0 +1 +5 +0 +1 +1 +1 +1 +0 +0 +6 +6 +1 +6 +0 +5 + +1234 +5678 +OUT1_SOS +OUT2_SOS +0 +8 +Tamper_Alarm +Tamper_Reset +0 +1 +1 +1 +1 +1 + + +Profile1 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + + +Profile2 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + + +Profile3 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + + +Profile4 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + + + + +user123 +password +ANY + + + +80 +0 +443 + + +{$fanvil_enable_vlan} +{$fanvil_enable_diffserv} +{$fanvil_lldp_tx_enable} +{$fanvil_lldp_refresh} +{$fanvil_lldp_learn} +{$fanvil_dscp_sip} +{$fanvil_dscp_rtp_voice} +{$fanvil_dscp_rtp_video} +{if isset($fanvil_lan_port_vlan)}{$fanvil_lan_port_vlan}{else}256{/if} +{$fanvil_qos_sip} +{$fanvil_qos_rtp_voice} +{$fanvil_qos_rtp_video} +1 +1 +254 + + +0 +0 +0 +1 +0 + + +{$fanvil_syslog_enable} +{$fanvil_syslog_server} +{$fanvil_syslog_server_port} + + +0 +0 + + +30 +0 +0 +1 + +{foreach $keys["memory"] as $row} +{if $row.device_key_id <= 1} + +Fkey{$row.device_key_id} +1 +{$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} +{$row.device_key_label} + +{/if} +{/foreach} + + + +http://{$domain_name}/app/fanvil/resources/firmware/{$fanvil_firmware_i30} + + +1 + + + +0.0.0.0 +1 +0 +1 +66 +1 +224.0.1.75 +5060 +0 +1 +0 +0 +0 + + +2 + + + +1 +0 +0.0.0.0 +80 +VPN +12345 + + +admin +admin +0 +01:80:C2:00:00:03 +1 + + +1 +0.0.0.0 +admin +admin +0.0.0.0 +admin +admin +dps +dps + + +0 +0 +0 +0 +0 +0 +3600 +020 +0 +0.0.0.0 +3478 +30000 + + +1 +0 +0 +720P +H.264 +VBR +1000 +1 +2 +20 +1 +3 +CIF +H.264 +VBR +318 +2 +2 +20 +1 +3 +128 +128 +128 +128 +128 +1 +0 +1 +0 +1 +1 +1 +1 +0 +50 +0 +0 +18:00:00 +07:00:00 +0 +29 +0 +5 +1 +2 +3 +50 +1 +1 +30 +1500 +1 +2 +1 +1 +ipCameraName +{if isset($admin_name)}{$admin_name}{else}admin{/if} +{if isset($admin_password)}{$admin_password}{else}admin{/if} +1 + +554 + + +0 +1 +Front Door + + diff --git a/resources/templates/provision/fanvil/x2p/{$mac}.cfg b/resources/templates/provision/fanvil/x2p/{$mac}.cfg index 14bed62932..d08068e9e9 100644 --- a/resources/templates/provision/fanvil/x2p/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x2p/{$mac}.cfg @@ -267,23 +267,23 @@ SIP1 -{$user_id_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.display_name} {$fanvil_server_name} -{$server_address_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$register_expires_1} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} -{if isset($user_password_1)}1{else}0{/if} +{if isset($account.1.password)}1{else}0{/if} -{$outbound_proxy_primary_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$outbound_proxy_secondary_1} -{$sip_port_1} +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} 1 0 @@ -333,11 +333,11 @@ 1 5060 -{if $sip_transport_1 == 'udp'}0{/if} -{if $sip_transport_1 == 'tcp'}1{/if} -{if $sip_transport_1 == 'tls'}2{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} 1 0 @@ -402,23 +402,23 @@ SIP2 -{$user_id_2} -{$display_name_2} +{$account.2.user_id} +{$display_name} {$fanvil_server_name} -{$server_address_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$register_expires_2} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} -{if isset($user_password_2)}1{else}0{/if} +{if isset($account.2.password)}1{else}0{/if} -{$outbound_proxy_primary_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$outbound_proxy_secondary_2} -{$sip_port_2} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} 1 0 @@ -468,11 +468,11 @@ 1 5060 -{if $sip_transport_2 == 'udp'}0{/if} -{if $sip_transport_2 == 'tcp'}1{/if} -{if $sip_transport_2 == 'tls'}2{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} 1 0 diff --git a/resources/templates/provision/fanvil/x3g/{$mac}.cfg b/resources/templates/provision/fanvil/x3g/{$mac}.cfg index 3282d67940..084518ea01 100644 --- a/resources/templates/provision/fanvil/x3g/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x3g/{$mac}.cfg @@ -265,23 +265,23 @@ SIP1 -{$user_id_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.display_name} {$fanvil_server_name} -{$server_address_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$register_expires_1} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} -{if isset($user_password_1)}1{else}0{/if} +{if isset($account.1.password)}1{else}0{/if} -{$outbound_proxy_primary_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$outbound_proxy_secondary_1} -{$sip_port_1} +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} 1 0 @@ -331,11 +331,11 @@ 1 5060 -{if $sip_transport_1 == 'udp'}0{/if} -{if $sip_transport_1 == 'tcp'}1{/if} -{if $sip_transport_1 == 'tls'}2{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} 1 0 @@ -400,23 +400,23 @@ SIP2 -{$user_id_2} -{$display_name_2} +{$account.2.user_id} +{$account.2.display_name} {$fanvil_server_name} -{$server_address_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$register_expires_2} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} -{if isset($user_password_2)}1{else}0{/if} +{if isset($account.2.password)}1{else}0{/if} -{$outbound_proxy_primary_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$outbound_proxy_secondary_2} -{$sip_port_2} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} 1 0 @@ -466,11 +466,11 @@ 1 5060 -{if $sip_transport_2 == 'udp'}0{/if} -{if $sip_transport_2 == 'tcp'}1{/if} -{if $sip_transport_2 == 'tls'}2{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} 1 0 diff --git a/resources/templates/provision/fanvil/x3sp/{$mac}.cfg b/resources/templates/provision/fanvil/x3sp/{$mac}.cfg index f131d8d94d..092433be86 100644 --- a/resources/templates/provision/fanvil/x3sp/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x3sp/{$mac}.cfg @@ -265,23 +265,23 @@ SIP1 -{$user_id_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.display_name} {$fanvil_server_name} -{$server_address_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$register_expires_1} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} -{if isset($user_password_1)}1{else}0{/if} +{if isset($account.1.password)}1{else}0{/if} -{$outbound_proxy_primary_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$outbound_proxy_secondary_1} -{$sip_port_1} +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} 1 0 @@ -331,11 +331,11 @@ 1 5060 -{if $sip_transport_1 == 'udp'}0{/if} -{if $sip_transport_1 == 'tcp'}1{/if} -{if $sip_transport_1 == 'tls'}2{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} 1 0 @@ -400,23 +400,23 @@ SIP2 -{$user_id_2} -{$display_name_2} +{$account.2.user_id} +{$account.2.display_name} {$fanvil_server_name} -{$server_address_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$register_expires_2} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} -{if isset($user_password_2)}1{else}0{/if} +{if isset($account.2.password)}1{else}0{/if} -{$outbound_proxy_primary_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$outbound_proxy_secondary_2} -{$sip_port_2} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} 1 0 @@ -466,11 +466,11 @@ 1 5060 -{if $sip_transport_2 == 'udp'}0{/if} -{if $sip_transport_2 == 'tcp'}1{/if} -{if $sip_transport_2 == 'tls'}2{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} 1 0 diff --git a/resources/templates/provision/fanvil/x4/{$mac}.cfg b/resources/templates/provision/fanvil/x4/{$mac}.cfg index b72a0750e0..59354d3d41 100644 --- a/resources/templates/provision/fanvil/x4/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x4/{$mac}.cfg @@ -268,23 +268,23 @@ SIP1 -{$user_id_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.display_name} {$fanvil_server_name} -{$server_address_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$register_expires_1} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} -{if isset($user_password_1)}1{else}0{/if} +{if isset($account.1.password)}1{else}0{/if} -{$outbound_proxy_primary_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$outbound_proxy_secondary_1} -{$sip_port_1} +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} 1 0 @@ -334,11 +334,11 @@ 1 5060 -{if $sip_transport_1 == 'udp'}0{/if} -{if $sip_transport_1 == 'tcp'}1{/if} -{if $sip_transport_1 == 'tls'}2{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} 1 0 @@ -403,23 +403,23 @@ SIP2 -{$user_id_2} -{$display_name_2} +{$account.2.user_id} +{$account.2.display_name} {$fanvil_server_name} -{$server_address_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$register_expires_2} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} -{if isset($user_password_2)}1{else}0{/if} +{if isset($account.2.password)}1{else}0{/if} -{$outbound_proxy_primary_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$outbound_proxy_secondary_2} -{$sip_port_2} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} 1 0 @@ -469,11 +469,11 @@ 1 5060 -{if $sip_transport_2 == 'udp'}0{/if} -{if $sip_transport_2 == 'tcp'}1{/if} -{if $sip_transport_2 == 'tls'}2{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} 1 0 @@ -538,23 +538,23 @@ SIP3 -{$user_id_3} -{$display_name_3} +{$account.3.user_id} +{$account.3.display_name} {$fanvil_server_name} -{$server_address_3} -{$sip_port_3} -{$auth_id_3} -{$user_password_3} -{$register_expires_3} +{$account.3.server_address} +{$account.3.sip_port} +{$account.3.auth_id} +{$account.3.password} +{$account.3.register_expires} -{if isset($user_password_3)}1{else}0{/if} +{if isset($account.3.password)}1{else}0{/if} -{$outbound_proxy_primary_3} -{$sip_port_3} -{$auth_id_3} -{$user_password_3} -{$outbound_proxy_secondary_3} -{$sip_port_3} +{$account.3.outbound_proxy_primary} +{$account.3.sip_port} +{$account.3.auth_id} +{$account.3.password} +{$account.3.outbound_proxy_secondary} +{$account.3.sip_port} 1 0 @@ -604,11 +604,11 @@ 1 5060 -{if $sip_transport_3 == 'udp'}0{/if} -{if $sip_transport_3 == 'tcp'}1{/if} -{if $sip_transport_3 == 'tls'}2{/if} -{if $sip_transport_3 == 'dns srv'}1{/if} -{if $sip_transport_3 == 'dns srv'}1{/if} +{if $account.3.sip_transport == 'udp'}0{/if} +{if $account.3.sip_transport == 'tcp'}1{/if} +{if $account.3.sip_transport == 'tls'}2{/if} +{if $account.3.sip_transport == 'dns srv'}1{/if} +{if $account.3.sip_transport == 'dns srv'}1{/if} 1 0 @@ -673,23 +673,23 @@ SIP4 -{$user_id_4} -{$display_name_4} +{$account.4.user_id} +{$account.4.display_name} {$fanvil_server_name} -{$server_address_4} -{$sip_port_4} -{$auth_id_4} -{$user_password_4} -{$register_expires_4} +{$account.4.server_address} +{$account.4.sip_port} +{$account.4.auth_id} +{$account.4.password} +{$account.4.register_expires} -{if isset($user_password_4)}1{else}0{/if} +{if isset($account.4.password)}1{else}0{/if} -{$outbound_proxy_primary_4} -{$sip_port_4} -{$auth_id_4} -{$user_password_4} -{$outbound_proxy_secondary_4} -{$sip_port_4} +{$account.4.outbound_proxy_primary} +{$account.4.sip_port} +{$account.4.auth_id} +{$account.4.password} +{$account.4.outbound_proxy_secondary} +{$account.4.sip_port} 1 0 @@ -739,11 +739,11 @@ 1 5060 -{if $sip_transport_4 == 'udp'}0{/if} -{if $sip_transport_4 == 'tcp'}1{/if} -{if $sip_transport_4 == 'tls'}2{/if} -{if $sip_transport_4 == 'dns srv'}1{/if} -{if $sip_transport_4 == 'dns srv'}1{/if} +{if $account.4.sip_transport == 'udp'}0{/if} +{if $account.4.sip_transport == 'tcp'}1{/if} +{if $account.4.sip_transport == 'tls'}2{/if} +{if $account.4.sip_transport == 'dns srv'}1{/if} +{if $account.4.sip_transport == 'dns srv'}1{/if} 1 0 @@ -1208,25 +1208,25 @@ Fkey1 2 SIP1 -{$display_name_1} +{$account.1.display_name} Fkey2 2 SIP2 -{$display_name_2} +{$account.2.display_name} Fkey3 2 SIP3 -{$display_name_3} +{$account.3.display_name} Fkey4 2 SIP4 -{$display_name_4} +{$account.4.display_name} Fkey5 diff --git a/resources/templates/provision/fanvil/x4g/{$mac}.cfg b/resources/templates/provision/fanvil/x4g/{$mac}.cfg index 982a054fd0..c41a644fe5 100644 --- a/resources/templates/provision/fanvil/x4g/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x4g/{$mac}.cfg @@ -268,23 +268,23 @@ SIP1 -{$user_id_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.display_name} {$fanvil_server_name} -{$server_address_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$register_expires_1} +{$account.1.server_address} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.register_expires} -{if isset($user_password_1)}1{else}0{/if} +{if isset($account.1.password)}1{else}0{/if} -{$outbound_proxy_primary_1} -{$sip_port_1} -{$auth_id_1} -{$user_password_1} -{$outbound_proxy_secondary_1} -{$sip_port_1} +{$account.1.outbound_proxy_primary} +{$account.1.sip_port} +{$account.1.auth_id} +{$account.1.password} +{$account.1.outbound_proxy_secondary} +{$account.1.sip_port} 1 0 @@ -334,11 +334,11 @@ 1 5060 -{if $sip_transport_1 == 'udp'}0{/if} -{if $sip_transport_1 == 'tcp'}1{/if} -{if $sip_transport_1 == 'tls'}2{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} -{if $sip_transport_1 == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'udp'}0{/if} +{if $account.1.sip_transport == 'tcp'}1{/if} +{if $account.1.sip_transport == 'tls'}2{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} +{if $account.1.sip_transport == 'dns srv'}1{/if} 1 0 @@ -403,23 +403,23 @@ SIP2 -{$user_id_2} -{$display_name_2} +{$account.2.user_id} +{$account.2.display_name} {$fanvil_server_name} -{$server_address_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$register_expires_2} +{$account.2.server_address} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.register_expires} -{if isset($user_password_2)}1{else}0{/if} +{if isset($account.2.password)}1{else}0{/if} -{$outbound_proxy_primary_2} -{$sip_port_2} -{$auth_id_2} -{$user_password_2} -{$outbound_proxy_secondary_2} -{$sip_port_2} +{$account.2.outbound_proxy_primary} +{$account.2.sip_port} +{$account.2.auth_id} +{$account.2.password} +{$account.2.outbound_proxy_secondary} +{$account.2.sip_port} 1 0 @@ -469,11 +469,11 @@ 1 5060 -{if $sip_transport_2 == 'udp'}0{/if} -{if $sip_transport_2 == 'tcp'}1{/if} -{if $sip_transport_2 == 'tls'}2{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} -{if $sip_transport_2 == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'udp'}0{/if} +{if $account.2.sip_transport == 'tcp'}1{/if} +{if $account.2.sip_transport == 'tls'}2{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} +{if $account.2.sip_transport == 'dns srv'}1{/if} 1 0 @@ -538,23 +538,23 @@ SIP3 -{$user_id_3} -{$display_name_3} +{$account.3.user_id} +{$account.3.display_name} {$fanvil_server_name} -{$server_address_3} -{$sip_port_3} -{$auth_id_3} -{$user_password_3} -{$register_expires_3} +{$account.3.server_address} +{$account.3.sip_port} +{$account.3.auth_id} +{$account.3.password} +{$account.3.register_expires} -{if isset($user_password_3)}1{else}0{/if} +{if isset($account.3.password)}1{else}0{/if} -{$outbound_proxy_primary_3} -{$sip_port_3} -{$auth_id_3} -{$user_password_3} -{$outbound_proxy_secondary_3} -{$sip_port_3} +{$account.3.outbound_proxy_primary} +{$account.3.sip_port} +{$account.3.auth_id} +{$account.3.password} +{$account.3.outbound_proxy_secondary} +{$account.3.sip_port} 1 0 @@ -604,11 +604,11 @@ 1 5060 -{if $sip_transport_3 == 'udp'}0{/if} -{if $sip_transport_3 == 'tcp'}1{/if} -{if $sip_transport_3 == 'tls'}2{/if} -{if $sip_transport_3 == 'dns srv'}1{/if} -{if $sip_transport_3 == 'dns srv'}1{/if} +{if $account.3.sip_transport == 'udp'}0{/if} +{if $account.3.sip_transport == 'tcp'}1{/if} +{if $account.3.sip_transport == 'tls'}2{/if} +{if $account.3.sip_transport == 'dns srv'}1{/if} +{if $account.3.sip_transport == 'dns srv'}1{/if} 1 0 @@ -673,23 +673,23 @@ SIP4 -{$user_id_4} -{$display_name_4} +{$account.4.user_id} +{$account.4.display_name} {$fanvil_server_name} -{$server_address_4} -{$sip_port_4} -{$auth_id_4} -{$user_password_4} -{$register_expires_4} +{$account.4.server_address} +{$account.4.sip_port} +{$account.4.auth_id} +{$account.4.password} +{$account.4.register_expires} -{if isset($user_password_4)}1{else}0{/if} +{if isset($account.4.password)}1{else}0{/if} -{$outbound_proxy_primary_4} -{$sip_port_4} -{$auth_id_4} -{$user_password_4} -{$outbound_proxy_secondary_4} -{$sip_port_4} +{$account.4.outbound_proxy_primary} +{$account.4.sip_port} +{$account.4.auth_id} +{$account.4.password} +{$account.4.outbound_proxy_secondary} +{$account.4.sip_port} 1 0 @@ -739,11 +739,11 @@ 1 5060 -{if $sip_transport_4 == 'udp'}0{/if} -{if $sip_transport_4 == 'tcp'}1{/if} -{if $sip_transport_4 == 'tls'}2{/if} -{if $sip_transport_4 == 'dns srv'}1{/if} -{if $sip_transport_4 == 'dns srv'}1{/if} +{if $account.4.sip_transport == 'udp'}0{/if} +{if $account.4.sip_transport == 'tcp'}1{/if} +{if $account.4.sip_transport == 'tls'}2{/if} +{if $account.4.sip_transport == 'dns srv'}1{/if} +{if $account.4.sip_transport == 'dns srv'}1{/if} 1 0 @@ -1208,25 +1208,25 @@ Fkey1 2 SIP1 -{$display_name_1} +{$account.1.display_name} Fkey2 2 SIP2 -{$display_name_2} +{$account.2.display_name} Fkey3 2 SIP3 -{$display_name_3} +{$account.3.display_name} Fkey4 2 SIP4 -{$display_name_4} +{$account.4.display_name} Fkey5 diff --git a/resources/templates/provision/fanvil/x5s/{$mac}.cfg b/resources/templates/provision/fanvil/x5s/{$mac}.cfg index 3b5d98688b..2cf1d0260c 100644 --- a/resources/templates/provision/fanvil/x5s/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x5s/{$mac}.cfg @@ -72,24 +72,24 @@ 0 1 - {$user_id_1} - {$display_name_1} + {$account.1.user_id} + {$account.1.display_name} - {$server_address_1} - {$sip_port_1} - {$auth_id_1} - {$user_password_1} - {$register_expires_1} + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} - {if isset($user_password_1)}1{else}0{/if} + {if isset($account.1.password)}1{else}0{/if} - {$outbound_proxy_primary_1} - {$sip_port_1} - {$auth_id_1} - {$user_password_1} - {$outbound_proxy_secondary_1} - {$sip_port_1} - {if isset($outbound_proxy_secondary_1)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -141,11 +141,11 @@ 5060 - {if $sip_transport_1 == 'udp'}0{/if} - {if $sip_transport_1 == 'tcp'}1{/if} - {if $sip_transport_1 == 'tls'}2{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 @@ -211,24 +211,24 @@ 0 - {$user_id_2} - {$display_name_2} + {$account.2.user_id} + {$account.2.display_name} - {$server_address_2} - {$sip_port_2} - {$auth_id_2} - {$user_password_2} - {$register_expires_2} + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} - {if isset($user_password_2)}1{else}0{/if} + {if isset($account.2.password)}1{else}0{/if} - {$outbound_proxy_primary_2} - {$sip_port_2} - {$auth_id_2} - {$user_password_2} - {$outbound_proxy_secondary_2} - {$sip_port_2} - {if isset($outbound_proxy_secondary_2)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -278,11 +278,11 @@ 0 5060 - {if $sip_transport_2 == 'udp'}0{/if} - {if $sip_transport_2 == 'tcp'}1{/if} - {if $sip_transport_2 == 'tls'}2{/if} - {if $sip_transport_2 == 'dns srv'}1{/if} - {if $sip_transport_2 == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 @@ -348,24 +348,24 @@ 0 - {$user_id_3} - {$display_name_3} + {$account.3.user_id} + {$account.3.display_name} - {$server_address_3} - {$sip_port_3} - {$auth_id_3} - {$user_password_3} - {$register_expires_3} + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} - {if isset($user_password_3)}1{else}0{/if} + {if isset($account.3.password)}1{else}0{/if} - {$outbound_proxy_primary_3} - {$sip_port_3} - {$auth_id_3} - {$user_password_3} - {$outbound_proxy_secondary_3} - {$sip_port_3} - {if isset($outbound_proxy_secondary_3)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -415,11 +415,11 @@ 0 5060 - {if $sip_transport_3 == 'udp'}0{/if} - {if $sip_transport_3 == 'tcp'}1{/if} - {if $sip_transport_3 == 'tls'}2{/if} - {if $sip_transport_3 == 'dns srv'}1{/if} - {if $sip_transport_3 == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 @@ -485,24 +485,24 @@ 0 - {$user_id_4} - {$display_name_4} + {$account.4.user_id} + {$account.4.display_name} - {$server_address_4} - {$sip_port_4} - {$auth_id_4} - {$user_password_4} - {$register_expires_4} + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.register_expires} - {if isset($user_password_4)}1{else}0{/if} + {if isset($account.4.password)}1{else}0{/if} - {$outbound_proxy_primary_4} - {$sip_port_4} - {$auth_id_4} - {$user_password_4} - {$outbound_proxy_secondary_4} - {$sip_port_4} - {if isset($outbound_proxy_secondary_4)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -552,11 +552,11 @@ 0 5060 - {if $sip_transport_4 == 'udp'}0{/if} - {if $sip_transport_4 == 'tcp'}1{/if} - {if $sip_transport_4 == 'tls'}2{/if} - {if $sip_transport_4 == 'dns srv'}1{/if} - {if $sip_transport_4 == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 @@ -622,24 +622,24 @@ 0 - {$user_id_5} - {$display_name_5} + {$account.5.user_id} + {$account.5.display_name} - {$server_address_5} - {$sip_port_5} - {$auth_id_5} - {$user_password_5} - {$register_expires_5} + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} - {if isset($user_password_5)}1{else}0{/if} + {if isset($account.5.password)}1{else}0{/if} - {$outbound_proxy_primary_5} - {$sip_port_5} - {$auth_id_5} - {$user_password_5} - {$outbound_proxy_secondary_5} - {$sip_port_5} - {if isset($outbound_proxy_secondary_5)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -689,11 +689,11 @@ 0 5060 - {if $sip_transport_5 == 'udp'}0{/if} - {if $sip_transport_5 == 'tcp'}1{/if} - {if $sip_transport_5 == 'tls'}2{/if} - {if $sip_transport_5 == 'dns srv'}1{/if} - {if $sip_transport_5 == 'dns srv'}1{/if} + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} + {if $account.5.sip_transport == 'dns srv'}1{/if} + {if $account.5.sip_transport == 'dns srv'}1{/if} 0 @@ -759,24 +759,24 @@ 0 - {$user_id_6} - {$display_name_6} + {$account.6.user_id} + {$account.6.display_name} - {$server_address_6} - {$sip_port_6} - {$auth_id_6} - {$user_password_6} - {$register_expires_6} + {$account.6.server_address} + {$account.6.sip_port} + {$account.6.auth_id} + {$account.6.password} + {$account.6.register_expires} - {if isset($user_password_6)}1{else}0{/if} + {if isset($account.6.password)}1{else}0{/if} - {$outbound_proxy_primary_6} - {$sip_port_6} - {$auth_id_6} - {$user_password_6} - {$outbound_proxy_secondary_6} - {$sip_port_6} - {if isset($outbound_proxy_secondary_6)}1{else}0{/if} + {$account.6.outbound_proxy_primary} + {$account.6.sip_port} + {$account.6.auth_id} + {$account.6.password} + {$account.6.outbound_proxy_secondary} + {$account.6.sip_port} + {if isset($account.6.outbound_proxy_secondary)}1{else}0{/if} 0 0 @@ -826,11 +826,11 @@ 0 5060 - {if $sip_transport_6 == 'udp'}0{/if} - {if $sip_transport_6 == 'tcp'}1{/if} - {if $sip_transport_6 == 'tls'}2{/if} - {if $sip_transport_6 == 'dns srv'}1{/if} - {if $sip_transport_6 == 'dns srv'}1{/if} + {if $account.6.sip_transport == 'udp'}0{/if} + {if $account.6.sip_transport == 'tcp'}1{/if} + {if $account.6.sip_transport == 'tls'}2{/if} + {if $account.6.sip_transport == 'dns srv'}1{/if} + {if $account.6.sip_transport == 'dns srv'}1{/if} 0 diff --git a/resources/templates/provision/fanvil/x6/{$mac}.cfg b/resources/templates/provision/fanvil/x6/{$mac}.cfg index b7c3a31291..d231659fde 100644 --- a/resources/templates/provision/fanvil/x6/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x6/{$mac}.cfg @@ -2,20 +2,34 @@ 2.0000000000 + 0 255.255.255.0 - {$dns_server_primary} - {$dns_server_secondary} + {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}208.67.222.222{/if} 1 1 - 0 + 1 + 1 0 Fanvil X6 0 user123 password + 2 + + + + + + + 1 + 1 + 0 + 0 + Fanvil X6 {$fanvil_wifi_enable} @@ -26,6 +40,10 @@ 20 108 109 + 103 + 104 + 102 + 105 101 107 0 @@ -57,10 +75,11 @@ PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,opus,G722 - H264 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}H264{/if} 25 2000000 4 + 2 @@ -80,24 +99,29 @@ 0 1 - {$user_id_1} - {$display_name_1} + {$account.1.user_id} + {$account.1.display_name} - {$server_address_1} - {$sip_port_1} - {$auth_id_1} - {$user_password_1} - {$register_expires_1} - - {if isset($user_password_1)}1{else}0{/if} - - {$outbound_proxy_primary_1} - {$sip_port_1} - {$auth_id_1} - {$user_password_1} - {$outbound_proxy_secondary_1} - {$sip_port_1} - {if isset($outbound_proxy_secondary_1)}1{else}0{/if} + {$account.1.server_address} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.register_expires} + + 5060 + 0 + 3600 + {if isset($account.1.password)}1{else}0{/if} + {$account.1.outbound_proxy_primary} + {$account.1.sip_port} + {$account.1.auth_id} + {$account.1.password} + {$account.1.outbound_proxy_secondary} + {$account.1.sip_port} + {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -117,7 +141,7 @@ - default + {if isset($fanvil_ringtone_line1)}{$fanvil_ringtone_line1}{else}default{/if} 2 60 0 @@ -132,14 +156,12 @@ 0 1 0 - {$register_expires_1} + {$account.1.register_expires} 0 0 1 0 0 - - 0 0 0 @@ -148,13 +170,12 @@ 1 0 5060 - - {if $sip_transport_1 == 'udp'}0{/if} - {if $sip_transport_1 == 'tcp'}1{/if} - {if $sip_transport_1 == 'tls'}2{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 0 @@ -186,7 +207,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -223,24 +244,29 @@ Record:off - {$user_id_2} - {$display_name_2} + {$account.2.user_id} + {$account.2.display_name} - {$server_address_2} - {$sip_port_2} - {$auth_id_2} - {$user_password_2} - {$register_expires_2} - - {if isset($user_password_2)}1{else}0{/if} - - {$outbound_proxy_primary_2} - {$sip_port_2} - {$auth_id_2} - {$user_password_2} - {$outbound_proxy_secondary_2} - {$sip_port_1} - {if isset($outbound_proxy_secondary_2)}1{else}0{/if} + {$account.2.server_address} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.register_expires} + + 5060 + 0 + 3600 + {if isset($account.2.password)}1{else}0{/if} + {$account.2.outbound_proxy_primary} + {$account.2.sip_port} + {$account.2.auth_id} + {$account.2.password} + {$account.2.outbound_proxy_secondary} + {$account.2.sip_port} + {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -260,7 +286,7 @@ - default + {if isset($fanvil_ringtone_line2)}{$fanvil_ringtone_line2}{else}default{/if} 2 60 0 @@ -275,7 +301,7 @@ 0 1 0 - {$register_expires_2} + {$account.2.register_expires} 0 0 1 @@ -290,13 +316,12 @@ 1 0 5060 - - {if $sip_transport_2 == 'udp'}0{/if} - {if $sip_transport_2 == 'tcp'}1{/if} - {if $sip_transport_2 == 'tls'}2{/if} - {if $sip_transport_2 == 'dns srv'}1{/if} - {if $sip_transport_2 == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} 0 @@ -328,7 +353,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -365,24 +390,29 @@ Record:off - {$user_id_3} - {$display_name_3} + {$account.3.user_id} + {$account.3.display_name} - {$server_address_3} - {$sip_port_3} - {$auth_id_3} - {$user_password_3} - {$register_expires_3} - - {if isset($user_password_3)}1{else}0{/if} - - {$outbound_proxy_primary_3} - {$sip_port_3} - {$auth_id_3} - {$user_password_3} - {$outbound_proxy_secondary_3} - {$sip_port_3} - {if isset($outbound_proxy_secondary_3)}1{else}0{/if} + {$account.3.server_address} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.register_expires} + + 5060 + 0 + 3600 + {if isset($account.3.password)}1{else}0{/if} + {$account.3.outbound_proxy_primary} + {$account.3.sip_port} + {$account.3.auth_id} + {$account.3.password} + {$account.3.outbound_proxy_secondary} + {$account.3.sip_port} + {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -402,7 +432,7 @@ - default + {if isset($fanvil_ringtone_line3)}{$fanvil_ringtone_line3}{else}default{/if} 2 60 0 @@ -417,7 +447,7 @@ 0 1 0 - {$register_expires_3} + {$account.3.register_expires} 0 0 1 @@ -432,13 +462,12 @@ 1 0 5060 - - - {if $sip_transport_3 == 'udp'}0{/if} - {if $sip_transport_3 == 'tcp'}1{/if} - {if $sip_transport_3 == 'tls'}2{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} + + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} 0 @@ -472,7 +501,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -509,24 +538,29 @@ Record:off - {$user_id_4} - {$display_name_4} + {$account.4.user_id} + {$account.4.display_name} - {$server_address_4} - {$sip_port_4} - {$auth_id_4} - {$user_password_4} - {$register_expires_1} - - {if isset($user_password_4)}1{else}0{/if} - - {$outbound_proxy_primary_4} - {$sip_port_4} - {$auth_id_4} - {$user_password_4} - {$outbound_proxy_secondary_4} - {$sip_port_4} - {if isset($outbound_proxy_secondary_4)}1{else}0{/if} + {$account.4.server_address} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.1.register_expires} + + 5060 + 0 + 3600 + {if isset($account.4.password)}1{else}0{/if} + {$account.4.outbound_proxy_primary} + {$account.4.sip_port} + {$account.4.auth_id} + {$account.4.password} + {$account.4.outbound_proxy_secondary} + {$account.4.sip_port} + {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -546,7 +580,7 @@ - default + {if isset($fanvil_ringtone_line4)}{$fanvil_ringtone_line4}{else}default{/if} 2 60 0 @@ -561,7 +595,7 @@ 0 1 0 - {$register_expires_4} + {$account.4.register_expires} 0 0 1 @@ -577,10 +611,11 @@ 0 5060 - {if $sip_transport_4 == 'udp'}0{/if} - {if $sip_transport_4 == 'tcp'}1{/if} - {if $sip_transport_4 == 'dns srv'}1{/if} - {if $sip_transport_4 == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} 0 @@ -612,7 +647,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -649,24 +684,29 @@ Record:off - {$user_id_5} - {$display_name_5} + {$account.5.user_id} + {$account.5.display_name} - {$server_address_5} - {$sip_port_5} - {$auth_id_5} - {$user_password_5} - {$register_expires_5} - - {if isset($user_password_5)}1{else}0{/if} - - {$outbound_proxy_primary_5} - {$sip_port_5} - {$auth_id_5} - {$user_password_5} - {$outbound_proxy_secondary_5} - {$sip_port_5} - {if isset($outbound_proxy_secondary_5)}1{else}0{/if} + {$account.5.server_address} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.register_expires} + + 5060 + 0 + 3600 + {if isset($account.5.password)}1{else}0{/if} + {$account.5.outbound_proxy_primary} + {$account.5.sip_port} + {$account.5.auth_id} + {$account.5.password} + {$account.5.outbound_proxy_secondary} + {$account.5.sip_port} + {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -686,7 +726,7 @@ - default + {if isset($fanvil_ringtone_line5)}{$fanvil_ringtone_line5}{else}default{/if} 2 60 0 @@ -701,7 +741,7 @@ 0 1 0 - {$register_expires_5} + {$account.5.register_expires} 0 0 1 @@ -716,13 +756,12 @@ 1 0 5060 - - - {if $sip_transport_5 == 'udp'}0{/if} - {if $sip_transport_5 == 'tcp'}1{/if} - {if $sip_transport_5 == 'tls'}2{/if} - {if $sip_transport_5 == 'dns srv'}1{/if} - {if $sip_transport_5 == 'dns srv'}1{/if} + + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} + {if $account.5.sip_transport == 'dns srv'}1{/if} + {if $account.5.sip_transport == 'dns srv'}1{/if} 0 @@ -754,7 +793,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -791,24 +830,29 @@ Record:off - {$user_id_6} - {$display_name_6} + {$account.6.user_id} + {$account.6.display_name} - {$server_address_6} - {$sip_port_6} - {$auth_id_6} - {$user_password_6} - {$register_expires_6} - - {if isset($user_password_6)}1{else}0{/if} - - {$outbound_proxy_primary_6} - {$sip_port_6} - {$auth_id_6} - {$user_password_6} - {$outbound_proxy_secondary_6} - {$sip_port_6} - {if isset($outbound_proxy_secondary_6)}1{else}0{/if} + {$account.6.server_address} + {$account.6.sip_port} + {$aaccount.6.uth_id} + {$account.6.password} + {$account.6.register_expires} + + 5060 + 0 + 3600 + {if isset($account.6.password)}1{else}0{/if} + {$account.6.outbound_proxy_primary} + {$account.6.sip_port} + {$account.6.auth_id} + {$account.6.password} + {$account.6.outbound_proxy_secondary} + {$account.6.sip_port} + {if isset($account.6.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -828,7 +872,7 @@ - default + {if isset($fanvil_ringtone_line6)}{$fanvil_ringtone_line6}{else}default{/if} 2 60 0 @@ -843,7 +887,7 @@ 0 1 0 - {$register_expires_6} + {$account.6.register_expires} 0 0 1 @@ -857,14 +901,13 @@ 0 1 0 - 5060 - - - {if $sip_transport_6 == 'udp'}0{/if} - {if $sip_transport_6 == 'tcp'}1{/if} - {if $sip_transport_6 == 'tls'}2{/if} - {if $sip_transport_6 == 'dns srv'}1{/if} - {if $sip_transport_6 == 'dns srv'}1{/if} + 5060 + + {if $account.6.sip_transport == 'udp'}0{/if} + {if $account.6.sip_transport == 'tcp'}1{/if} + {if $account.6.sip_transport == 'tls'}2{/if} + {if $account.6.sip_transport == 'dns srv'}1{/if} + {if $account.6.sip_transport == 'dns srv'}1{/if} 0 @@ -896,7 +939,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -982,8 +1025,8 @@ 0 0 0 - 2 - 2 + {$fanvil_default_answer_mode} + {$fanvil_default_dial_mode} 0 1 1 @@ -1058,11 +1101,12 @@ - 123 + {if isset($fanvil_menu_password)}{$fanvil_menu_password}{else}123{/if} 123 0 0 + 0 110 0 @@ -1074,12 +1118,16 @@ 1 $name 0 + 0 + 1 + 1 + 0 {$fanvil_greeting} 5 - 4 - 12 - 45 + {if isset($fanvil_display_brightness_inactive)}{$fanvil_display_brightness_inactive}{else}4{/if} + {if isset($fanvil_display_brightness_active)}{$fanvil_display_brightness_active}{else}12{/if} + {if isset($fanvil_display_inactivity_time)}{$fanvil_display_inactivity_time}{else}45{/if} 0 bcm911188sv @@ -1101,28 +1149,25 @@ 5 3 5 - 5 + 8 3 4 - Type 2 + {if isset($fanvil_default_ringtone)}{$fanvil_default_ringtone}{else}Type 2{/if} - 1 {$ntp_server_primary} {$ntp_server_secondary} - {$fanvil_time_zone} - {$fanvil_location} {$fanvil_time_zone_name} + 60 {$fanvil_enable_dst} 2 - 60 1 - 4 + {if isset($fanvil_location)}{$fanvil_location}{else}4{/if} 0 - 60 + {if isset($fanvil_dst_minute_offset)}{$fanvil_dst_minute_offset}{else}60{/if} 3 5 0 @@ -1131,31 +1176,21 @@ 5 0 2 + 1 + 2 0 - {if isset($fanvil_time_display)}1{else}0{/if} - - 6 - 1 + {if isset($fanvil_date_display)}{$fanvil_date_display}{else}6{/if} + {if isset($fanvil_date_separator)}{$fanvil_date_separator}{else}0{/if} - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - - history;contact;dnd;menu; - hold;xfer;conf;end; - accept;none;forward;reject; + 0 + {if isset($fanvil_softkey_exit)}{$fanvil_softkey_exit}{else}1{/if} + {if isset($fanvil_softkey_desktopsoftkey)}{$fanvil_softkey_desktopsoftkey}{else}history;contact;dnd;menu;{/if} + {if isset($fanvil_softkey_talkingsoftkey)}{$fanvil_softkey_talkingsoftkey}{else}hold;xfer;conf;end;{/if} + {if isset($fanvil_softkey_ringingsoftkey)}{$fanvil_softkey_ringingsoftkey}{else}accept;none;forward;reject;{/if} end;none;none;none; end;none;none;none; hold;none;split;end; @@ -1165,7 +1200,7 @@ repeat;2aB;delete;exit; repeat;2aB;delete;exit; repeat;2aB;delete;exit; - history;status;none;none;none; + {if isset($fanvil_softkey_desktopclick)}{$fanvil_softkey_desktopclick}{else}history;status;none;none;none;{/if} none;none;none;none;none; none;none;voldown;volup;none; status;none;none;none;reset; @@ -1393,6 +1428,18 @@ 0 + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + 0 + 0 + 120 @@ -1505,8 +1552,8 @@ 30 - {$admin_name} - {$admin_password} + {if isset($admin_name)}{$admin_name}{else}admin{/if} + {if isset($admin_password)}{$admin_password}{else}admin{/if} 10 @@ -1577,6 +1624,7 @@ 0 + 0 {$http_auth_username} @@ -1593,6 +1641,7 @@ 1 1 720 + 0 1 224.0.1.75 @@ -1602,33 +1651,37 @@ 66 + 0 0 + + - 0 - - - 24 + {if isset($fanvil_enable_auto_upgrade)}{$fanvil_enable_auto_upgrade}{else}0{/if} + {if isset($fanvil_firmware_upgrade_server_1)}{$fanvil_firmware_upgrade_server_1}{else}{/if} + {if isset($fanvil_firmware_upgrade_server_2)}{$fanvil_firmware_upgrade_server_2}{else}{/if} + {if isset($fanvil_firmware_upgrade_interval)}{$fanvil_firmware_upgrade_interval}{else}24{/if} - 0 - 256 - 0 - 254 - 0 - 0 - 0 - 0 - 46 - 46 - 46 - 0 - 60 - 0 - 0 + {if isset($fanvil_enable_vlan)}{$fanvil_enable_vlan}{else}0{/if} + {if isset($fanvil_lan_port_vlan)}{$fanvil_lan_port_vlan}{else}256{/if} + {if isset($fanvil_pc_port_vlan)}2{else}0{/if} + {if isset($fanvil_pc_port_vlan)}{$fanvil_pc_port_vlan}{else}254{/if} + {if isset($fanvil_qos_sip)}{$fanvil_qos_sip}{else}0{/if} + {if isset($fanvil_qos_rtp_voice)}{$fanvil_qos_rtp_voice}{else}0{/if} + {if isset($fanvil_qos_rtp_video)}{$fanvil_qos_rtp_video}{else}0{/if} + 0 + {if isset($fanvil_enable_diffserv)}{$fanvil_enable_diffserv}{else}0{/if} + {if isset($fanvil_dscp_sip)}{$fanvil_dscp_sip}{else}46{/if} + {if isset($fanvil_dscp_rtp_voice)}{$fanvil_dscp_rtp_voice}{else}46{/if} + {if isset($fanvil_dscp_rtp_video)}{$fanvil_dscp_rtp_video}{else}34{/if} + {if isset($fanvil_lldp_tx_enable)}{$fanvil_lldp_tx_enable}{else}0{/if} + {if isset($fanvil_lldp_refresh)}{$fanvil_lldp_refresh}{else}60{/if} + {if isset($fanvil_lldp_learn)}{$fanvil_lldp_learn}{else}0{/if} + 1 0 60 0 @@ -1636,12 +1689,12 @@ INFO - stdout + stdout{if $fanvil_syslog_enable == '1'},syslog{else}{/if} platform.log 512KB platform - 0.0.0.0 - 514 + {if isset($fanvil_syslog_server)}{$fanvil_syslog_server}{else}0.0.0.0{/if} + {if isset($fanvil_syslog_server_port)}{$fanvil_syslog_server_port}{else}514{/if} 1 @@ -1667,15 +1720,17 @@ 0 0 0 + 0 + 1 G729 0 8 - - 0 + 0.0.0.0 + 10000 0000000000000000 @@ -1684,888 +1739,162 @@ + + + + + + + + + + + 0 3 5 0 - 0 0 0 0 0 0 + + + + + + + + + + +{strip}{*-- Each Internal Index contains 12 keys --*}{/strip} - - 2 - SIP1 - - - - 2 - SIP2 - - - - 2 - SIP3 - - - - 2 - SIP4 - - - - 2 - SIP5 - - - - 2 - SIP6 - - - - 3 - F_MWI - - - - 3 - F_HEADSET - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id <= 12} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + {$row.device_key_icon} +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 12 && $row.device_key_id < 24} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + {$row.device_key_icon} +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 24 && $row.device_key_id < 36} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + {$row.device_key_icon} +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 35 && $row.device_key_id < 48} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + {$row.device_key_icon} +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 47 && $row.device_key_id < 61} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + {$row.device_key_icon} +{/if} +{/foreach} - - 0 - - +{foreach $keys["programmable"] as $row} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - +{/foreach} +{strip}{*-- Each External Index contains 20 keys --*}{/strip} + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id < 20} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 19 && $row.device_key_id < 40} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 39 && $row.device_key_id < 60} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 59 && $row.device_key_id < 80} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 79 && $row.device_key_id < 100} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} diff --git a/resources/templates/provision/grandstream/README.md b/resources/templates/provision/grandstream/README.md new file mode 100644 index 0000000000..04bff74428 --- /dev/null +++ b/resources/templates/provision/grandstream/README.md @@ -0,0 +1,18 @@ +Device Specific Firmware Versions +====================== +Select Grandstream phones (particularly the GXP2140 and similar) need firmware upgrades in a certain order. +Grandstream also offers beta firmware quite often, which you may want to test on only some devices. + +We've attempted to make the process of changing firmware easier, by serving a phone with the firmware specified in a field called +Firmware under Accounts => Devices then click on the MAC address of the relevant device, filling in said field. + +To use configurable firmware locations, enable device_firmware for the superadmin group under Advanced => Group Manager, set the +URL for grandstream_firmware_path under Advanced => Default Variables and set Enabled to True for grandstream_firmware_path. + +We would suggest creating a folder called firmware on the webserver that you host the firmware on, setting grandstream_firmware_path +to the full URL (excluding the protocol - leave off the `http://`) for example `mydomain.com/firmware` or `mydomain.com/firmware/grandstream` +if you are hosting multiple different vendors firmware images. When a device goes to hit this server, it will attempt to load +`///`, or `mydomain.com/firmware/gxp2140/1.0.9.69/gxp2140fw.bin` +in our case, assuming we have a Grandstream GXP2140 phone and we are feeding it firmware version 1.0.9.69. For Grandstream phones, +the firmware filename is relatively static, and the files Grandstream distributes are generally named correctly for their phones +to download. diff --git a/resources/templates/provision/grandstream/dp715.sm/{$mac}.xml b/resources/templates/provision/grandstream/dp715.sm/{$mac}.xml index 4e0f2a53c8..cbdf460782 100644 --- a/resources/templates/provision/grandstream/dp715.sm/{$mac}.xml +++ b/resources/templates/provision/grandstream/dp715.sm/{$mac}.xml @@ -67,7 +67,13 @@ 2 -{domain_name}/firmware/gs +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/dp715/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/dp715 +{else} +{$domain_name}{$project_path}/app/provision +{/if} {$domain_name}{$project_path}/app/provision @@ -222,7 +228,7 @@ 1 -{domain_name} +{$domain_name} @@ -361,7 +367,12 @@ 1 + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} 1 @@ -735,16 +746,16 @@ 0 -{$user_id_1} +{$account.1.user_id} -{$user_id_2} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{$displayname_1} +{$account.1.display_name} 0 @@ -761,16 +772,16 @@ 0 -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} -{$displayname_2} +{$account.2.display_name} 0 @@ -786,16 +797,16 @@ 0 -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$password_3} +{$account.3.password} -{$displayname_3} +{$account.3.display_name} 0 @@ -811,16 +822,16 @@ 0 -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_4} +{$account.4.password} -{$displayname_4} +{$account.4.display_name} 0 @@ -836,16 +847,16 @@ 0 -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.user_id} -{$user_password_5} +{$account.5.password} -{$displayname_5} +{$account.5.display_name} 0 diff --git a/resources/templates/provision/grandstream/dp715/{$mac}.xml b/resources/templates/provision/grandstream/dp715/{$mac}.xml index 1e5e44e9d7..1b46ac8222 100644 --- a/resources/templates/provision/grandstream/dp715/{$mac}.xml +++ b/resources/templates/provision/grandstream/dp715/{$mac}.xml @@ -29,12 +29,14 @@ 1 - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/dp715/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/dp715 {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision @@ -136,7 +138,7 @@ 1 - {$server_address_1} + {$account.1.server_address} @@ -230,7 +232,13 @@ 1 + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + 0 @@ -305,7 +313,7 @@ 1 - {$server_address_2} + {$account.2.server_address} @@ -477,13 +485,13 @@ 0 - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.auth_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} 0 @@ -492,13 +500,13 @@ 0 - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.auth_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} 0 @@ -507,13 +515,13 @@ 0 - {$user_id_3} + {$account.3.user_id} - {$user_id_3} + {$account.3.auth_id} - {$user_password_3} + {$account.3.password} - {$display_name_3} + {$account.3.display_name} 0 @@ -522,13 +530,13 @@ 0 - {$user_id_4} + {$account.4.user_id} - {$user_id_4} + {$account.4.auth_id} - {$user_password_4} + {$account.4.password} - {$display_name_4} + {$account.4.display_name} 0 @@ -537,13 +545,13 @@ 0 - {$user_id_5} + {$account.5.user_id} - {$user_id_5} + {$account.5.auth_id} - {$user_password_5} + {$account.5.password} - {$display_name_5} + {$account.5.display_name} 0 diff --git a/resources/templates/provision/grandstream/dp750/{$mac}.xml b/resources/templates/provision/grandstream/dp750/{$mac}.xml index da63c57dce..a1b7383bf2 100644 --- a/resources/templates/provision/grandstream/dp750/{$mac}.xml +++ b/resources/templates/provision/grandstream/dp750/{$mac}.xml @@ -19,7 +19,7 @@ -{if isset($user_password_1)} +{if isset($account.1.password)} 1 {else} 0 @@ -27,7 +27,7 @@ -{$server_address_1} +{$account.1.server_address} @@ -40,7 +40,7 @@ -{$outbound_proxy_1} +{$account.1.outbound_proxy} @@ -106,10 +106,10 @@ {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -475,7 +475,13 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + @@ -552,7 +558,7 @@ -{if isset($user_password_2)} +{if isset($account.2.password)} 1 {else} 0 @@ -560,7 +566,7 @@ -{$server_address_2} +{$account.2.server_address} @@ -573,7 +579,7 @@ -{$outbound_proxy_2} +{$account.2.outbound_proxy} @@ -596,8 +602,8 @@ -{if isset($dns_mode_2)} -{$dns_mode_2} +{if isset($account.2.dns_mode)} +{$account.2.dns_mode} {else} 0 {/if} @@ -639,10 +645,10 @@ {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -1077,14 +1083,14 @@ -{if isset($user_password_3)} +{if isset($account.3.password)} 1 {else} 0 {/if} -{$server_address_3} +{$account.3.server_address} @@ -1097,7 +1103,7 @@ -{$outbound_proxy_3} +{$account.3.outbound_proxy} @@ -1120,8 +1126,8 @@ -{if isset($dns_mode_3) } -{$dns_mode_3} +{if isset($account.3.dns_mode) } +{$account.3.dns_mode} {else} 0 {/if} @@ -1163,10 +1169,10 @@ {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -1601,7 +1607,7 @@ -{if isset($user_password_4)} +{if isset($account.4.password)} 1 {else} 0 @@ -1609,7 +1615,7 @@ -{$server_address_4} +{$account.4.server_address} @@ -1622,7 +1628,7 @@ -{$outbound_proxy_4} +{$account.4.outbound_proxy} @@ -1645,8 +1651,8 @@ -{if isset($dns_mode_4) } -{$dns_mode_4} +{if isset($account.4.dns_mode) } +{$account.4.dns_mode} {else} 0 {/if} @@ -1688,10 +1694,10 @@ {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -2138,24 +2144,35 @@ +{if isset($grandstream_repeater_mode_enable) } +{$grandstream_repeater_mode_enable} +{else} 0 +{/if} + + +{if isset($grandstream_repeater_management_enable) } +{$grandstream_repeater_management_enable} +{else} +0 +{/if} -{$user_id_1} -{$user_id_2} -{$user_id_3} -{$user_id_4} -{$user_id_5} +{$account.1.user_id} +{$account.2.user_id} +{$account.3.user_id} +{$account.4.user_id} +{$account.5.user_id} -PB1 -PB2 -PB3 -PB4 -PB5 +1 +2 +3 +4 +5 @@ -2169,52 +2186,52 @@ -{$user_id_1} -{$user_id_2} -{$user_id_3} -{$user_id_4} -{$user_id_5} -{$user_id_6} -{$user_id_7} -{$user_id_8} -{$user_id_9} -{$user_id_10} +{$account.1.user_id} +{$account.2.user_id} +{$account.3.user_id} +{$account.4.user_id} +{$account.5.user_id} +{$account.6.user_id} +{$account.7.user_id} +{$account.8.user_id} +{$account.9.user_id} +{$account.10.user_id} -{$auth_id_1} -{$auth_id_2} -{$auth_id_3} -{$auth_id_4} -{$auth_id_5} -{$auth_id_6} -{$auth_id_7} -{$auth_id_8} -{$auth_id_9} -{$auth_id_10} +{$account.1.auth_id} +{$account.2.auth_id} +{$account.3.auth_id} +{$account.4.auth_id} +{$account.5.auth_id} +{$account.6.auth_id} +{$account.7.auth_id} +{$account.8.auth_id} +{$account.9.auth_id} +{$account.10.auth_id} -{$user_password_1} -{$user_password_2} -{$user_password_3} -{$user_password_4} -{$user_password_5} -{$user_password_6} -{$user_password_7} -{$user_password_8} -{$user_password_9} -{$user_password_10} +{$account.1.password} +{$account.2.password} +{$account.3.password} +{$account.4.password} +{$account.5.password} +{$account.6.password} +{$account.7.password} +{$account.8.password} +{$account.9.password} +{$account.10.password} -{$display_name_1} -{$display_name_2} -{$display_name_3} -{$display_name_4} -{$display_name_5} -{$display_name_6} -{$display_name_7} -{$display_name_8} -{$display_name_9} -{$display_name_10} +{$account.1.display_name} +{$account.2.display_name} +{$account.3.display_name} +{$account.4.display_name} +{$account.5.display_name} +{$account.6.display_name} +{$account.7.display_name} +{$account.8.display_name} +{$account.9.display_name} +{$account.10.display_name} @@ -2233,6 +2250,18 @@ +{if isset($grandstream_hanging_group_mode) } +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{$grandstream_hanging_group_mode} +{else} 101 101 101 @@ -2243,6 +2272,7 @@ 101 101 101 +{/if} @@ -2264,68 +2294,268 @@ +{if isset($grandstream_handset_1_line_1_enable) } +{$grandstream_handset_1_line_1_enable} +{else} 1 +{/if} +{if isset($grandstream_handset_1_line_2_enable) } +{$grandstream_handset_1_line_2_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_3_enable) } +{$grandstream_handset_1_line_3_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_4_enable) } +{$grandstream_handset_1_line_4_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_5_enable) } +{$grandstream_handset_1_line_5_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_6_enable) } +{$grandstream_handset_1_line_6_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_7_enable) } +{$grandstream_handset_1_line_7_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_8_enable) } +{$grandstream_handset_1_line_8_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_9_enable) } +{$grandstream_handset_1_line_9_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_1_line_10_enable) } +{$grandstream_handset_1_line_10_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_1_enable) } +{$grandstream_handset_2_line_1_enable} +{else} 1 +{/if} +{if isset($grandstream_handset_2_line_2_enable) } +{$grandstream_handset_2_line_2_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_3_enable) } +{$grandstream_handset_2_line_3_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_4_enable) } +{$grandstream_handset_2_line_4_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_5_enable) } +{$grandstream_handset_2_line_5_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_6_enable) } +{$grandstream_handset_2_line_6_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_7_enable) } +{$grandstream_handset_2_line_7_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_8_enable) } +{$grandstream_handset_2_line_8_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_9_enable) } +{$grandstream_handset_2_line_9_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_2_line_10_enable) } +{$grandstream_handset_2_line_10_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_1_enable) } +{$grandstream_handset_3_line_1_enable} +{else} 1 +{/if} +{if isset($grandstream_handset_3_line_2_enable) } +{$grandstream_handset_3_line_2_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_3_enable) } +{$grandstream_handset_3_line_3_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_4_enable) } +{$grandstream_handset_3_line_4_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_5_enable) } +{$grandstream_handset_3_line_5_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_6_enable) } +{$grandstream_handset_3_line_6_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_7_enable) } +{$grandstream_handset_3_line_7_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_8_enable) } +{$grandstream_handset_3_line_8_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_9_enable) } +{$grandstream_handset_3_line_9_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_3_line_10_enable) } +{$grandstream_handset_3_line_10_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_1_enable) } +{$grandstream_handset_4_line_1_enable} +{else} 1 +{/if} +{if isset($grandstream_handset_4_line_2_enable) } +{$grandstream_handset_4_line_2_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_3_enable) } +{$grandstream_handset_4_line_3_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_4_enable) } +{$grandstream_handset_4_line_4_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_5_enable) } +{$grandstream_handset_4_line_5_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_6_enable) } +{$grandstream_handset_4_line_6_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_7_enable) } +{$grandstream_handset_4_line_7_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_8_enable) } +{$grandstream_handset_4_line_8_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_9_enable) } +{$grandstream_handset_4_line_9_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_4_line_10_enable) } +{$grandstream_handset_4_line_10_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_1_enable) } +{$grandstream_handset_5_line_1_enable} +{else} 1 +{/if} +{if isset($grandstream_handset_5_line_2_enable) } +{$grandstream_handset_5_line_2_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_3_enable) } +{$grandstream_handset_5_line_3_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_4_enable) } +{$grandstream_handset_5_line_4_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_5_enable) } +{$grandstream_handset_5_line_5_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_6_enable) } +{$grandstream_handset_5_line_6_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_7_enable) } +{$grandstream_handset_5_line_7_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_8_enable) } +{$grandstream_handset_5_line_8_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_9_enable) } +{$grandstream_handset_5_line_9_enable} +{else} 0 +{/if} +{if isset($grandstream_handset_5_line_10_enable) } +{$grandstream_handset_5_line_10_enable} +{else} 0 +{/if} @@ -2571,8 +2801,10 @@ -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/dp750/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/dp750 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gac2500/{$mac}.xml b/resources/templates/provision/grandstream/gac2500/{$mac}.xml new file mode 100644 index 0000000000..a97f3606f4 --- /dev/null +++ b/resources/templates/provision/grandstream/gac2500/{$mac}.xml @@ -0,0 +1,4650 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + {$account.1.user_id} + + + {$account.1.auth_id} + + + + {$account.1.password} + + + *97 + + + {$account.1.display_name} + + + + 0 + + + + 0 + + + + + + + {$account.1.outbound_proxy_primary} + + + {$account.1.server_address_secondary} + + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + 1 + + + + 2 + + + + {$account.1.register_expires} + + + + 0 + + + + 20 + + + + 5060 + + + + {if isset($subscribe_mwi)} + 1 + {else} + P99>0 + /if} + + + 0 + + + + 30 + + + + 3 + + + + + 180 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + {$tp=0} + {if $account.1.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.1.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + 50 + + + + + + 400 + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + 1 + + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + + 1 + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + 1 + + + + {if isset($grandstream_srtp)} + P183>{$grandstream_srtp} + else} + P183>0 + {/if} + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + + + + + + + + + + + + + 0 + + + {if isset($grandstream_dial_plan) } + P290>{$grandstream_dial_plan} + {else} + P290>{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + + 0 + + + + + + 100 + + + + 0 + + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + {if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} + {else} + content://settings/system/ringtone + {/if} + + + 20 + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($account.2.password)} + 1 + {else} + 0 + {/if} + + {$account.2.display_name} + + + {$account.2.server_address} + + + {$account.2.user_id} + + + {$account.2.auth_id} + + + {$account.2.password} + + + *97 + + {$account.2.display_name} + + + + 0 + + + + 0 + + + + + + + {$account.2.outbound_proxy} + + + {$account.2.outbound_proxy_secondary} + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + + 1 + + + + 0 + + + + {$account.2.register_expires} + + + + 0 + + + + 20 + + + + 5062 + + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + 0 + + + + 30 + + + + 3 + + + + + 1800 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + {$tp=0} + {if $account.2.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.2.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 50 + + + + + 400 + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + + + 1 + + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + 1 + + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + 1 + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + + + + + + + + + + + + 0 + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + 100 + + + + 0 + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + 20 + + + + + + + content://settings/system/ringtone + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($account.3.password)} + 1 + {else} + 0 + {/if} + + + {$account.3.display_name} + + + {$account.3.server_address} + + + {$account.3.user_id} + + + {$account.3.auth_id} + + + {$user_password_3} + + + *97 + + + {$account.3.display_name} + + + + 0 + + + + 0 + + + + + + + {$account.3.outbound_proxy} + + + {$account.3.outbound_proxy_secondary} + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + + 1 + + + + 0 + + + + {$account.3.register_expires} + + + + 0 + + + + 20 + + + + 5064 + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + 0 + + + + 30 + + + + 3 + + + + + 180 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + {$tp=0} + {if $account.3.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.3.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + + 50 + + + + + 400 + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + + + 1 + + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + 1 + + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + 1 + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + + + + + + + + + + + + + 0 + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + 100 + + + + 0 + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + 20 + + + + + + + content://settings/system/ringtone + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($account.4.password)} + 1 + {else} + 0 + {/if} + + + {$account.4.display_name} + + + {$account.4.server_address} + + + {$account.4.user_id} + + + {$account.4.auth_id} + + + {$account.4.password} + + + *97 + + + {$account.4.display_name} + + + + 0 + + + + 0 + + + + + + + {$outbound_proxy_4} + + + {$account.4.outbound_proxy_secondary} + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + + 1 + + + + 0 + + + + {$account.4.register_expires} + + + + 0 + + + + 20 + + + + 5066 + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + 0 + + + + 30 + + + + 3 + + + + + 180 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + {$tp=0} + {if $account.4.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.4.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + + 50 + + + + + 400 + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + + 1 + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + 1 + + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + + 1 + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + + + + + + + + + + + + + 0 + + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + 100 + + + + 0 + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + {if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} + {/if} + + + + 20 + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($account.5.password)} + 1 + {else} + 0 + {/if} + + + {$account.5.display_name} + + + {$account.5.server_address} + + + {$account.5.user_id} + + + {$account.5.auth_id} + + + {$account.5.password} + + + *97 + + + {$account.5.display_name} + + + + 0 + + + + 0 + + + + + + + {$account.5.outbound_proxy} + + + {$account.5.outbound_proxy_secondary} + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + + 1 + + + + 0 + + + + {$account.5.register_expires} + + + + 0 + + + + 20 + + + + 5068 + + + + {if isset($subscribe_mwi)} +1 +{else} +0 +{/if} + + + + 0 + + + + 30 + + + + 3 + + + + + 180 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + + {$tp=0} + {if $account.5.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.5.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 50 + + + + + 400 + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + + + 1 + + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + 1 + + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + 1 + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + + + + + + + + + + + + + 0 + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + 100 + + + + 0 + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + 20 + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($account.6.password)} + 1 + {else} + 0 + {/if} + + + {$account.6.display_name} + + + {$account.6.server_address} + + + {$account.6.user_id} + + + {$account.6.auth_id} + + + {$account.6.password} + + + *97 + + + {$display_name_6} + + + + 0 + + + + 0 + + + + + + + {$account.6.outbound_proxy} + + + {$account.6.outbound_proxy_secondary} + + + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + + + 0 + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} + {else} + 2 + {/if} + + + + + + + + + + + 1 + + + + 2 + + + + {$account.6.register_expires} + + + + 0 + + + + 20 + + + + 5070 + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + 0 + + + + 30 + + + + 3 + + + + + 180 + + + + 90 + + + + 0 + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + {$tp=0} + {if $account.6.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.6.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + 0 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 50 + + + + + 400 + + + + 0 + + + + 0 + + + + + 0 + + + + 0 + + + + + 1 + + + + + + + + + + + + 0 + + + + 1 + + + + 0 + + + + 101 + + + + + 0 + + + + 8 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 9 + + + + 0 + + + 1 + + + 1 + + + + 1 + + + + 0 + + + + 126 + + + 123 + + + 0 + + + 104 + + + 1 + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + 50 + + + + + + + + + + + + + + + + 0 + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + 100 + + + + 0 + + + + 0 + + + + 4 + + + + 60 + + + + -1 + + + + 0 + + + + 1 + + + + + + + + + + + + + + + + 20 + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + + + + + content://settings/system/ringtone + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5004 + + + + 0 + + + + 0 + + + + 20 + + + stun.ipvideotalk.com + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + + + + + 0 + + + + + + + 0 + + + + 2 + + + + 0 + + + + + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 0 + + + + 1 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + f1=350@-13,f2=440@-13,c=0/0; + + + f1=440@-19,f2=480@-19,c=2000/4000; + + + f1=480@-24,f2=620@-24,c=500/500; + + + f1=480@-24,f2=620@-24,c=250/250; + + + f1=350@-11,f2=440@-11,c=100/100-100/100-100/100; + + + f1=440@-13,c=300/10000-300/10000-0/0; + + + 0 + + + f1=480@-32,f2=620@-32,c=500/500; + + + c=2000/4000; + + + + + + + + 0 + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + 2 + + + phone-{$account.1.display_name} + + + GAC2500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 30 + + + 48 + + + 48 + + + + {if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} + {else} + 0 + {/if} + + + + 0 + + + + 0 + + + + 0 + + + + + + + + GAC2500 $version + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 64 + + + + + + + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + 2 + + + + + + + 911 + + + + 0 + + + 0 + + + + 0 + + + + 80 + + + + {$admin_password} + + + + {$user_password} + + + + 0 + + + + + + + + + s1ptest + + + + + + + + + + 0 + + + + 0 + + + + 1 + + + + + 1 + + + + 1 + + + + 1 + + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gac2500/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gac2500 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + + + + + + + + + + + + + + 2 + + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + {$http_auth_username} + + + {$http_auth_password} + + + + + + + + + + 0 + + + + + + 0 + + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + {$http_auth_username} + + + {$http_auth_password} + + + + 0 + + + + 0 + + + + + + + 1 + + + + 3 + + + + 10080 + + + 1 + + + + 1 + + + + + 1 + + + + + + + 0 + + + + 0 + + + + 1 + + + + + + + {$grandstream_syslog_server} + + + + + {if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} + {else} + 0 + {/if} + + + + {if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} + {else} + 0 + {/if} + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {if isset($contact_grandstream)} + 2 + {else} + 0 + {/if} + + + + + 0 + + + + + 0 + + + + {if isset($contact_grandstream)} + 1 + {else} + 0 + {/if} + + + + + + UTF-8 + + + + + {if isset($contact_grandstream)} + {$grandstream_phonebook_xml_server_path}{$mac}/ + {elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} + {else} + + {/if} + + + + + + + + + + {if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} + {else} + 0 + {/if} + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + + + + + + + {$grandstream_ldap_name_filter} + + + + + {$grandstream_ldap_number_filter} + + + + + + + + + {$grandstream_ldap_display_name} + + + + + 50 + + + + + 4 + + + 0 + + + 0 + + + + 0 + + + 0 + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 86400 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + 0 + + + 0 + + + + + + + + + + + + + {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} + {$start_id=23000} + {for $exp=1 to 160} + {$pid=$exp*5-5} + {if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} + {$key_types[$keys.expansion.$exp.device_key_type]} + {$keys.expansion.$exp.device_key_line} + {$keys.expansion.$exp.device_key_label} + {$keys.expansion.$exp.device_key_value} + {else} + -1 + 0 + + + {/if} + + {/for} + {/if} + + + + + + + 1 + + + + 1 + + + + 1 + + + + 1 + + + + + + diff --git a/resources/templates/provision/grandstream/gds3705/{$mac}.xml b/resources/templates/provision/grandstream/gds3705/{$mac}.xml new file mode 100644 index 0000000000..dfcb41432f --- /dev/null +++ b/resources/templates/provision/grandstream/gds3705/{$mac}.xml @@ -0,0 +1,753 @@ + + +000b829a8c97 + + + + + + + + 0 + + 5 + + 300 + + + 0 + + 0 + + 0 + + 0 + + + + + + 1 + + + + 0 + + 0 + + + + + + + + 0 + + 1 + + 0 + + 0 + + 5 + + 0 + + 1 + + 0 + + 0 + + 0 + + 000000 + + 000000 + + 0 + + 0 + + 0 + + 0 + + + + 0 + + 5 + + + + + + door_sch,0@0000@2359, + + + + + + + + schedule1@0,0@0000@0000, + + schedule2@0,0@0000@0000, + + schedule3@0,0@0000@0000, + + schedule4@0,0@0000@0000, + + schedule5@0,0@0000@0000, + + schedule6@0,0@0000@0000, + + schedule7@0,0@0000@0000, + + schedule8@0,0@0000@0000, + + schedule9@0,0@0000@0000, + + schedule10@0,0@0000@0000, + + + + holiday1, + + holiday2, + + holiday3, + + holiday4, + + holiday5, + + holiday6, + + holiday7, + + holiday8, + + holiday9, + + holiday10, + + + +?> + + {if isset($grandstream_timezone) } + {$grandstream_timezone} + {elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} + {else} + 16 + {/if} + + + 0 + + + 1 + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + + 1440 + + + + 0 + + 192 + + 168 + + 1 + + 168 + + 255 + + 255 + + 255 + + 0 + + 192 + + 168 + + 1 + + 1 + + + 0 + + 0 + + 0 + + 0 + + 0 + + 0 + + 0 + + 0 + + 0 + + + 1 + + 0 + + 0 + + 0 + + 0 + + + + + 1 + + 443 + + 5 + + 5 + + 5 + + 1 + + 1 + + 22 + + + {$admin_password} + + + 1 + + {$account.1.display_name} + + {$account.1.server_address} + + {$account.1.server_address_secondary} + + {$account.1.outbound_proxy_primary} + + {$account.1.outbound_proxy_secondary} + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + {$account.1.user_id} + + {$account.1.auth_id} + + {$account.1.password} + + 0 + + {$account.1.register_expires} + + 5060 + + {$tp=0} + {if $account.1.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.1.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + 1 + + 0 + + 1 + + 1 + + 0 + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + 100 + + + + {if isset($account.2.password)} + 1 + {else} + 0 + {/if} + + {$account.2.display_name} + + {$account.2.server_address} + + {$account.2.server_address_secondary} + + {$account.2.outbound_proxy} + + {$account.2.outbound_proxy_secondary} + + 0 + + {$account.2.user_id} + + {$account.2.auth_id} + + {$account.2.password} + + 0 + + + {$account.2.register_expires} + + 5062 + + {$tp=0} + {if $account.2.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.2.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + 1 + + 0 + + 1 + + 1 + + 0 + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + 100 + + + + {if isset($account.3.password)} + 1 + {else} + 0 + {/if} + + {$account.3.display_name} + + {$account.3.server_address} + + {$account.3.server_address_secondary} + + {$account.3.outbound_proxy} + + {$account.3.outbound_proxy_secondary} + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + {$account.3.user_id} + + {$account.3.auth_id} + + {$account.3.password} + + 0 + + + {$account.3.register_expires} + + 5064 + + {$tp=0} + {if $account.3.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.3.sip_transport == 'tls'}{$tp=2}{/if} + + {$tp} + + 1 + + 0 + + 1 + + 1 + + 0 + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + 100 + + + + {if isset($account.4.password)} + 1 + {else} + 0 + {/if} + + {$account.4.display_name} + + {$account.4.server_address} + + {$account.4.server_address_secondary} + + {$account.4.outbound_proxy} + + {$account.4.outbound_proxy_secondary} + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + {$account.4.user_id} + + {$account.4.auth_id} + + {$account.4.password} + + 0 + + + {$account.4.register_expires} + + 5066 + + {$tp=0} + {if $account.4.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.4.sip_transport == 'tls'}{$tp=2}{/if} + + {$tp} + 1 + + 0 + + 1 + + 1 + + 0 + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + 100 + + + + + + 5004 + + 200 + + 1 + + 300 + + 30 + + + + + + + + 1 + + 1 + + 1 + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + 5 + + 5 + + + + + + 0 + + 0 + + 0 + + 1 + + 0 + + 0 + + 0 + + 1 + + + 5 + + + 0@0@0@0@0 + + 0 + + + + 1 + + 0 + + 1 + + 1 + + 1 + + 0 + + 1 + + + + schedule1,0@0000@2359, + + schedule2,0@0000@2359, + + schedule3,0@0000@2359, + + schedule4,0@0000@2359, + + schedule5,0@0000@2359, + + schedule6,0@0000@2359, + + schedule7,0@0000@2359, + + schedule8,0@0000@2359, + + schedule9,0@0000@2359, + + schedule10,0@0000@2359, + + + + profile1@0,0,0,0,0,0, + + profile2@0,0,0,0,0,0, + + profile3@0,0,0,0,0,0, + + profile4@0,0,0,0,0,0, + + profile5@0,0,0,0,0,0, + + profile6@0,0,0,0,0,0, + + profile7@0,0,0,0,0,0, + + profile8@0,0,0,0,0,0, + + profile9@0,0,0,0,0,0, + + profile10@0,0,0,0,0,0, + + + + 0 + + + + + + + + 25 + + + + + + + + + + + + + + 0 + + + +?> + + + + 2 + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + + + + + + + + 1 + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + {$http_auth_username} + + {$http_auth_password} + + + + + + + + 0 + + 10080 + + 0 + + 0 + + 1 + + + + + + + + + + + + + + + + + + + {$grandstream_syslog_server} + + {$grandstream_syslog_level} + {else} + 0 + {/if} + + + + 0 + + 1 + + + + + + + + {"mac":"${MAC}","content":"${WARNING_MSG}"} + + + diff --git a/resources/templates/provision/grandstream/gds3710/{$mac}.xml b/resources/templates/provision/grandstream/gds3710/{$mac}.xml new file mode 100644 index 0000000000..5ef71c0e5b --- /dev/null +++ b/resources/templates/provision/grandstream/gds3710/{$mac}.xml @@ -0,0 +1,822 @@ + + +{$mac|replace:'-':''} + + + + + + + + + + + + 0 + + 1 + + 2 + + 2 + + 0 + + 0 + + 0 + + 5 + + 5 + + 300 + + 4 + + 4 + + 1 + + 0 + + 0 + + 0 + + + 1 + + 0 + + 0 + + + + 0 + + 4 + + 0 + + + + + + 1 + + 0 + + + + + 0 + + + + 0 + + + + + + 0 + + 1 + + 0 + + 0 + + 0 + + 0 + + 0 + + 5 + + + 1 + + 1 + + + 0 + + 000000 + + 000000 + + + 0 + + + 0 + + + 0 + + 0 + + + + + 0 + + + + 5 + + + + + + door_sch,0@0000@2359, + + + 0 + + + + 5 + + + + + + door_sch,0@0000@2359, + + + + + + + + + + + + schedule1@0,0@0000@0000, + + schedule2@0,0@0000@0000, + + schedule3@0,0@0000@0000, + + schedule4@0,0@0000@0000, + + schedule5@0,0@0000@0000, + + schedule6@0,0@0000@0000, + + schedule7@0,0@0000@0000, + + schedule8@0,0@0000@0000, + + schedule9@0,0@0000@0000, + + schedule10@0,0@0000@0000, + + + + + + holiday1, + + holiday2, + + holiday3, + + holiday4, + + holiday5, + + holiday6, + + holiday7, + + holiday8, + + holiday9, + + holiday10, + + + + + +?> + + + + {if isset($grandstream_timezone) } + {$grandstream_timezone} + {elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} + {else} + 16 + {/if} + + + 0 + + + 1 + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + + 1440 + + + + + + 0 + + 192 + + 168 + + 22 + + 181 + + 255 + + 255 + + 255 + + 0 + + 192 + + 168 + + 22 + + 1 + + + 0 + + 192 + + 168 + + 22 + + 20 + + 8 + + 8 + + 8 + + 8 + + + 1 + + 0 + + 0 + + + + + + 1 + + 443 + + 0 + + 554 + + 5 + + 5 + + 5 + + 0 + + 1 + + 0 + + 1 + + 22 + + + + + + {$account.1.display_name} {$account.1.user_id} + + {$account.1.server_address} + + {$account.1.server_address_secondary} + + {$account.1.outbound_proxy_primary} + + {$account.1.outbound_proxy_secondary} + + {if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} + {else} + 0 + {/if} + + {$account.1.user_id} + + {$account.1.user_id} + + 0 + + {$account.1.password} + + + + + + + + {$account.1.register_expires} + + 5060 + + 5004 + + 300 + + 15 + + {$tp=0} + {if $account.1.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.1.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + 1 + + -----BEGIN CERTIFICATE----- +MIIDtjCCAx+gAwIBAgIBIzANBgkqhkiG9w0BAQQFADCBoDELMAkGA1UEBhMCVVMx +EzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC0xvcyBBbmdlbGVzMSMwIQYD +VQQKExpHcmFuZHN0cmVhbSBOZXR3b3JrcywgSW5jLjEPMA0GA1UECxMGTEEgRElW +MQwwCgYDVQQDEwNWUE4xIjAgBgkqhkiG9w0BCQEWE3h4dUBncmFuZHN0cmVhbS5j +b20wHhcNMDYwNzIwMTgxMzM2WhcNMTYwNzE3MTgxMzM2WjBxMQswCQYDVQQGEwJV +UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLTG9zIEFuZ2VsZXMxIzAh +BgNVBAoTGkdyYW5kc3RyZWFtIE5ldHdvcmtzLCBJbmMuMRIwEAYDVQQDEwlIVDUw +MCBBVEEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMvs0BlYm8xfslKkss5C +q1ukSP4H5lOwd1IuYP/1xYdy7gV4KCaWY7PJ/Ads/mdBaa1sUqUUaH1VN+YcSRSz +bWEWBUham+7w69AziC5bkNPrMUvHZBC6fiDKc81XufC9A+o8jJV5wcsTGwmyojA0 +r3AbOk8N1h0xPCth8wlrDbvZAgMBAAGjggEsMIIBKDAJBgNVHRMEAjAAMCwGCWCG +SAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4E +FgQUQ8XoT46ZOHIfExi2CwJq1SDxFIQwgc0GA1UdIwSBxTCBwoAU6pMpD0c2KUYT +1KZB8SSCag1xJK6hgaakgaMwgaAxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxp +Zm9ybmlhMRQwEgYDVQQHEwtMb3MgQW5nZWxlczEjMCEGA1UEChMaR3JhbmRzdHJl +YW0gTmV0d29ya3MsIEluYy4xDzANBgNVBAsTBkxBIERJVjEMMAoGA1UEAxMDVlBO +MSIwIAYJKoZIhvcNAQkBFhN4eHVAZ3JhbmRzdHJlYW0uY29tggEAMA0GCSqGSIb3 +DQEBBAUAA4GBADtmPcbAF0V2G/w7ys28glGW9UoM2h3DyA3Mc0I8nzi9bbWnRVg7 +G+c2tS84LNtZKFckX3ZbVpEPLJI3fInyQgwua/Wlj3aPy+M9MxE2irHZjletaMWo +cLUrrkxZEB6lXwWjCFLdxK/XX31xTsC6zJdN1TQa8ZplRK6DFEJ/vlsX +-----END CERTIFICATE----- + + -----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,8E43F08B71DA880D + +CNQbV4ElX0nYezrjSRJYeBXIjjATgE8xkkwq94NpdAwH7S76/yrkAAwQX8GbILBC +/Dq0x8GaxXyHLpgbgaRk35T4nLsIwFJQblYUhkjwML/ED98c+nVCiwkSA8U/+/0d +EtbCpdcF20NozajQw2cbPkv5m1q3neHHy2f8UsSNe7jvlPouRlFCUuPEE4RsNCQW +Sswx0yMM09xrOHJh6GmeSkhQ56G4M63BI25MogNiaXItY1C8X3CaE2cX0dJGsFnO +G0f9ZayWshOOi1dUtn2hokmjhuFy9iOl+oM9dV+zgSsQbaKOeAFK9aYMSkjQ5Zyv +JykKHaBNpESkc+jNbnTdAvr/rjHq8Pz+9NzxuVqrcwnjCMtaFpNQmbY8Vhw2U+NU +AhgVNFFRQ7RSaJRMa3b5i8SJyrI51BrsC6qWiJDaCm/6fwTYVddOOeMUogT9pDAv +pKxISzAncHiyqqVo+cPpsqUj96gYsqjdvjPCMog9WFQPL4i6P3YXsMdCqCNfnO28 +6N2IZ0Iuas+qI9/1tmbO9Mu49OnYvl4Bmy1KkO9h2RG8gtphpZC5ouW7u6QvCJq1 +cliNR/AwhZd+QRQssGe0VnoIYH4IaSvIdAXOkGj7wykzh7nwawCq3dJETiROWQiP +bsQ8iQmuSmuIT65bYrCd/g102ZzLtV4KJG4ZI4/RKbXV9COwUTRYkzlDgt0NS7Dk +T8UtMlqWmveUoWsGJ0JDhV/kWKUk5UtCw3QCDhJpQ2ku3bf3rcu7nyUwqHO28ihN +E0Fw0O5Kx31JPa+aSBLDMZAG1+SZ/zfxRYQe7VH8p1g= +-----END RSA PRIVATE KEY----- + + 1 + + 0 + + 1 + + 1 + + 1 + + 1 + + 1 + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + 0 + + 0 + + 100 + + 0 + + 1 + + + 99 + + + + + + 0 + + + + + + + + 96 + + 1 + + 1025 + + 4096 + + 30 + + 0 + + 2 + + 80 + + + 96 + + 1 + + 1022 + + 512 + + 25 + + 0 + + 2 + + 80 + + + 96 + + 1 + + 0 + + 256 + + 30 + + 0 + + 2 + + 80 + + + + + + 1 + + 0 + + 1 + + 0 + + + + 0 + + 0 + + + + + + 1 + + 0 + + 10 + + 1 + + 0 + + + + + + 1 + + 4 + + 2 + + + + + + + + 0@0,0,0,0;0@0,0,0,0;0@0,0,0,0;0@0,0,0,0; + + + + + + 0 + + 50 + + 0 + + 1 + + [0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0] + + + 0 + + 1 + + 0 + + 0 + + 1 + + 0 + + 1 + + 0 + + 0 + + 1 + + + 5 + + + 0@0@0@0@0 + + 0 + + + + 1 + + 0 + + 1 + + 1 + + 1 + + 0 + + 1 + + + + + + schedule1,0@0000@2359, + + schedule2,0@0000@2359, + + schedule3,0@0000@2359, + + schedule4,0@0000@2359, + + schedule5,0@0000@2359, + + schedule6,0@0000@2359, + + schedule7,0@0000@2359, + + schedule8,0@0000@2359, + + schedule9,0@0000@2359, + + schedule10,0@0000@2359, + + + + + + profile1@0,0,0,0,0,0, + + profile2@0,0,0,0,0,0, + + profile3@0,0,0,0,0,0, + + profile4@0,0,0,0,0,0, + + profile5@0,0,0,0,0,0, + + profile6@0,0,0,0,0,0, + + profile7@0,0,0,0,0,0, + + profile8@0,0,0,0,0,0, + + profile9@0,0,0,0,0,0, + + profile10@0,0,0,0,0,0, + + + + + + + + + + + + + + 25 + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + 21 + + + + + + / + + + + +?> + + + + 2 + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + + + + + + + + 2 + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + {$http_auth_username} + + {$http_auth_password} + + + + + + + + 10080 + + 1 + + 0 + + 1 + + 0 + + + + + + {$grandstream_syslog_server} + + {if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} + {else} + 0 + {/if} + + + + + + + 0 + + 1 + + + + + + + + {"mac":"${MAC}","content":"${WARNING_MSG}"} + + + + + + + + + + + + + + + + + + + + + + {$admin_password} + + + diff --git a/resources/templates/provision/grandstream/gswave/{$mac}.xml b/resources/templates/provision/grandstream/gswave/{$mac}.xml index bc122b3b5a..1789c3437e 100644 --- a/resources/templates/provision/grandstream/gswave/{$mac}.xml +++ b/resources/templates/provision/grandstream/gswave/{$mac}.xml @@ -16,33 +16,33 @@ -{if isset($user_password_1)} +{if isset($account.1.password)} 1 {else} 0 {/if} -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} *98 -{$display_name_1} +{$account.1.display_name} diff --git a/resources/templates/provision/grandstream/gxp110x/{$mac}.xml b/resources/templates/provision/grandstream/gxp110x/{$mac}.xml index b0ad49c720..0a55cc62d0 100644 --- a/resources/templates/provision/grandstream/gxp110x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp110x/{$mac}.xml @@ -580,8 +580,13 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} - +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + @@ -921,8 +926,10 @@ -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp110x/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp110x {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp116x/{$mac}.xml b/resources/templates/provision/grandstream/gxp116x/{$mac}.xml index 53d1a7256f..e027cef7d8 100644 --- a/resources/templates/provision/grandstream/gxp116x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp116x/{$mac}.xml @@ -18,11 +18,11 @@ -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} @@ -34,19 +34,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -449,7 +449,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -795,8 +800,10 @@ -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp116x/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp116x {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp140x/{$mac}.xml b/resources/templates/provision/grandstream/gxp140x/{$mac}.xml index b537f01a8b..832502d014 100644 --- a/resources/templates/provision/grandstream/gxp140x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp140x/{$mac}.xml @@ -142,7 +142,7 @@ - {$server_address_1} + {$account.1.server_address} @@ -151,16 +151,16 @@ - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.auth_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} *97 @@ -477,7 +477,13 @@ + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + @@ -571,7 +577,7 @@ - {$server_address_2} + {$account.2.server_address} @@ -580,16 +586,16 @@ - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.user_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} *97 @@ -1165,13 +1171,15 @@ 2 - - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp140x/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp140x {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision @@ -1313,7 +1321,7 @@ - + {if isset($contact_grandstream)} {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} @@ -1321,7 +1329,7 @@ {else} {/if} - + diff --git a/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml b/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml index 4c61bc0013..aaf8d68158 100644 --- a/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp140xbk/{$mac}.xml @@ -142,7 +142,7 @@ - {$server_address_1} + {$account.1.server_address} @@ -151,16 +151,16 @@ - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.auth_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} *97 @@ -477,7 +477,13 @@ + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + @@ -571,7 +577,7 @@ - {$server_address_2} + {$account.2.server_address} @@ -580,16 +586,16 @@ - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.auth_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} *97 @@ -1165,13 +1171,15 @@ 2 - - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp140x/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp140x {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision @@ -1313,7 +1321,7 @@ - + {if isset($contact_grandstream)} {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} @@ -1321,7 +1329,7 @@ {else} {/if} - + diff --git a/resources/templates/provision/grandstream/gxp1450/{$mac}.xml b/resources/templates/provision/grandstream/gxp1450/{$mac}.xml index 1d9f08d457..1003d1c5c6 100644 --- a/resources/templates/provision/grandstream/gxp1450/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp1450/{$mac}.xml @@ -212,7 +212,7 @@ -{$server_address_1} +{$account.1.server_address} @@ -644,7 +644,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -766,7 +771,7 @@ -{$server_address_2} +{$account.2.server_address} @@ -778,15 +783,15 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.auth_id} -{$user_password_2} +{$account.2.password} @@ -1550,8 +1555,10 @@ -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp1450/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp1450 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml b/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml index 033c52e9f8..bae9f044b6 100644 --- a/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp1450bk/{$mac}.xml @@ -17,11 +17,11 @@ -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} @@ -33,19 +33,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -453,7 +453,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -571,11 +576,11 @@ -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address} @@ -587,19 +592,19 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.auth_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} @@ -1357,8 +1362,10 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp1450/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp1450 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml index 24113aa9e4..ac1fcd6a5b 100644 --- a/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp16xx/{$mac}.xml @@ -17,38 +17,38 @@ -{if isset($user_password_1)} +{if isset($account.1.password)} 1 {else} 0 {/if} -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} - +{$account.1.server_address_secondary} -{$outbound_proxy_1} +{$account.1.outbound_proxy} -{$user_id_1} +{$account.1.user_id} -{$auth_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} *97 @@ -75,8 +75,8 @@ -{if isset($nat_traversal_1) } -{$nat_traversal_1} +{if isset($account.1.nat_traversal) } +{$account.1.nat_traversal} {else} 0 {/if} @@ -144,10 +144,10 @@ {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -460,7 +460,13 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + @@ -594,7 +600,7 @@ -{if isset($user_password_2)} +{if isset($account.2.password)} 1 {else} 0 @@ -602,37 +608,37 @@ -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address} - +{$account.2.server_address_secondary} -{$outbound_proxy_2} +{$account.2.outbound_proxy} -{$user_id_2} +{$account.2.user_id} -{$auth_id_2} +{$account.2.auth_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} @@ -643,8 +649,8 @@ -{if isset($dns_mode_2) } -{$dns_mode_2} +{if isset($account.2.dns_mode) } +{$account.2.dns_mode} {else} 0 {/if} @@ -660,8 +666,8 @@ -{if isset($nat_traversal_2) } -{$nat_traversal_2} +{if isset($account.2.nat_traversal) } +{$account.2.nat_traversal} {else} 0 {/if} @@ -730,10 +736,10 @@ {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -1160,7 +1166,7 @@ -{if isset($user_password_3)} +{if isset($account.3.password)} 1 {else} 0 @@ -1168,38 +1174,38 @@ -{$display_name_3} +{$account.3.display_name} -{$server_address_3} +{$account.3.server_address} - +{$account.3.server_address_secondary} -{$outbound_proxy_3} +{$account.3.outbound_proxy} -{$user_id_3} +{$account.3.user_id} -{$auth_id_3} +{$account.3.auth_id} -{$user_password_3} +{$account.3.password} -{$display_name_3} - +{$account.3.display_name} + *97 @@ -1209,8 +1215,8 @@ -{if isset($dns_mode_3) } -{$dns_mode_3} +{if isset($account.3.dns_mode) } +{$account.3.dns_mode} {else} 0 {/if} @@ -1226,8 +1232,8 @@ -{if isset($nat_traversal_3) } -{$nat_traversal_3} +{if isset($account.3.nat_traversal) } +{$account.3.nat_traversal} {else} 0 {/if} @@ -1296,10 +1302,10 @@ {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -2045,8 +2051,10 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp16xx/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp16xx {else} {$domain_name}{$project_path}/app/provision {/if} @@ -3048,4 +3056,3 @@ - diff --git a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml index 602e9fe516..5562007b54 100644 --- a/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp17xx/{$mac}.xml @@ -769,11 +769,11 @@ -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} @@ -793,19 +793,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -1310,7 +1310,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -1467,19 +1472,19 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.auth_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} @@ -2111,11 +2116,11 @@ -{$display_name_3} +{$account.3.display_name} -{$server_address_3} +{$account.3.server_address} @@ -2135,19 +2140,19 @@ -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.auth_id} -{$user_password_3} +{$account.3.password} -{$display_name_3} +{$account.3.display_name} @@ -6057,9 +6062,11 @@ - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp17xx/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp17xx {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp20xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp20xx/{$mac}.xml index b19be232bf..5cf99416bd 100644 --- a/resources/templates/provision/grandstream/gxp20xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp20xx/{$mac}.xml @@ -72,8 +72,10 @@ -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp20xx/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp20xx {else} {$domain_name}{$project_path}/app/provision {/if} @@ -326,30 +328,30 @@ 1 -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} -{$outbound_proxy_1} +{$account.1.outbound_proxy} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} 0 @@ -542,25 +544,25 @@ 0 -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address} -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.auth_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} 0 @@ -753,25 +755,25 @@ 1 -{$display_name_3} +{$account.3.display_name} -{$server_address_3} +{$account.3.server_address} -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.auth_id} -{$user_password_3} +{$account.3.password} -{$display_name_3} +{$account.3.display_name} 0 @@ -965,25 +967,25 @@ 1 -{$display_name_4} +{$account.4.display_name} -{$server_address_4} +{$account.4.server_address} -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.auth_id} -{$user_password_4} +{$account.4.password} -{$display_name_4} +{$account.4.display_name} 0 @@ -1176,25 +1178,25 @@ 1 -{$display_name_5} +{$account.5.display_name} -{$server_address_5} +{$account.5.server_address} -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.auth_id} -{$user_password_5} +{$account.5.password} -{$display_name_5} +{$account.5.display_name} 0 @@ -1385,25 +1387,25 @@ 1 -{$display_name_6} +{$account.6.display_name} -{$server_address_6} +{$account.6.server_address} -{$user_id_6} +{$account.6.user_id} -{$user_id_6} +{$account.6.auth_id} -{$user_password_6} +{$account.6.password} -{$display_name_6} +{$account.6.display_name} 0 diff --git a/resources/templates/provision/grandstream/gxp2100/phonebook.xml b/resources/templates/provision/grandstream/gxp2100/phonebook.xml new file mode 100644 index 0000000000..c6b5d9b2cc --- /dev/null +++ b/resources/templates/provision/grandstream/gxp2100/phonebook.xml @@ -0,0 +1,30 @@ +{strip} +{* Phonebook has been setup for business use using the 'work' phone label in the Contacts app. --*} +{* You can add additional contacts by adding new contact blocks and updating the 'contact_type' and 'phone_label'. --*} +{/strip} + + +1 +{foreach $contacts as $row} +{if $row.contact_type == 'user' && $row.phone_label == 'work' && $row.phone_number != ''} + +{if $row.contact_name_family != ''} + {$row.contact_name_family} +{/if} +{if $row.contact_name_given != ''} + {$row.contact_name_given} +{/if} +{if $row.contact_category != ''} + {$row.contact_category} +{/if} + + {$row.phone_number} + 0 + + + 2 + + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/gxp2100/{$mac}.xml b/resources/templates/provision/grandstream/gxp2100/{$mac}.xml new file mode 100644 index 0000000000..1ea753537b --- /dev/null +++ b/resources/templates/provision/grandstream/gxp2100/{$mac}.xml @@ -0,0 +1,4121 @@ + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$server_address} + + + + + + + + + + + + + + + + {$account.1.display_name} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + {$voicemail_number} + + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 3 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 15 + + + + + + + + + + + + + + + + 0 + + + + + ** + + + + + 0 + + + + + + 100 + + + + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + + + 0 + + + + + + + + + + +{if isset($grandstream_dial_plan) } +{$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + + 20 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 5062 + + + + + 0 + + + + + 30 + + + + + 3 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + +{if $account.1.sip_transport == 'udp'}P448 = 0{/if} +{if $account.1.sip_transport == 'tcp'}P448 = 1{/if} +{if $account.1.sip_transport == 'tls'}P448 = 2{/if} +{if $account.1.sip_transport == 'dns srv'}P448 = 1{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 15 + + + + + + + + + + + + + + + + 0 + + + + + ** + + + + + 0 + + + + + 100 + + + + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan)} + {$grandstream_dial_plan} +{else} +{literal} + {x+|*x+|*xx*x+} +{/literal} +{/if} + + + + + 20 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 5064 + + + + + 0 + + + + + 30 + + + + + 3 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 15 + + + + + + + + + + + + + + + + 0 + + + + + ** + + + + + 0 + + + + + 100 + + + + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan)} + {$grandstream_dial_plan} +{else} +{literal} + {x+|*x+|*xx*x+} +{/literal} +{/if} + + + + + 20 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 5066 + + + + + 0 + + + + + 30 + + + + + 3 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 15 + + + + + + + + + + + + + + + + 0 + + + + + ** + + + + + 0 + + + + + 100 + + + + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 101 + + + + + + 0 + + + + 8 + + + + 4 + + + + 18 + + + + 9 + + + + 98 + + + + 2 + + + + + 0 + + + + + 0 + + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + + + 0 + + + + + + + + + +{if isset($grandstream_dial_plan)} + {$grandstream_dial_plan} +{else} +{literal} + {x+|*x+|*xx*x+} +{/literal} +{/if} + + + + + 20 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 0 + + + 160 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 12 + + + + + +{if isset($grandstream_lan_port_vlan)} + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_qos_rtp)} + {$grandstream_qos_rtp} +{else} + 0 +{/if} + + + + + 0 + + + + + +{if isset($grandstream_pc_port_vlan)} + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + + + + + + + + admin + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 2 + + + + +{if isset($grandstream_firmware_path)} + {$grandstream_firmware_path} +{else} + fm.grandstream.com/gs +{/if} + + + + +{if isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + fm.grandstream.com/gs +{/if} + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + 0 + + + + + 1 + + + + + + + + + + 1 + + + + + 10080 + + + + 1 + + + + 1 + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_syslog_server)} + {$grandstream_syslog_server} +{else} + +{/if} + + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 1 + + + + + + + + + + + + + + + + + + auto + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + 3 + + + + + + +{* Bind the phone mac to the phonebook url so we can build unique phonebooks per phone using groups in the contacts app. --*} +{if isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path}{$mac} +{else} + +{/if} + + + + + + 0 +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 389 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + + + + + + + + + 5004 + + + + + 0 + + + + + 20 + + + + + + + + +{if isset($grandstream_stun_server)} + {$grandstream_stun_server} +{else} + +{/if} + + + + + 0 + + + + + 0 + + + + + + + + + + + + 30 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 300 + + + + + 200 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 6 + + + + + 2 + + + + + 7 + + + + + 0 + + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + us.pool.ntp.org +{/if} + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_gxp_time_zone)} + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + 1 + + + + + + 1 + + + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} +{else} + +{/if} + + + + + 15 + + + + + +{if isset($grandstream_temp_unit)} + {$grandstream_temp_unit} +{else} + auto +{/if} + + + + + + 1 + + + + + EUR/USD;GBP/USD;CAD/USD;AUD/USD;CNY/USD;JPY/USD + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($line_key_type_1)} + {$line_key_type_1} + {$line_key_line_1} + {$line_key_label_1} + {$line_key_value_1} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($line_key_type_2)} + {$line_key_type_2} + {$line_key_line_2} + {$line_key_label_2} + {$line_key_value_2} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($line_key_type_3)} + {$line_key_type_3} + {$line_key_line_3} + {$line_key_label_3} + {$line_key_value_3} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($line_key_type_4)} + {$line_key_type_4} + {$line_key_line_4} + {$line_key_label_4} + {$line_key_value_4} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_1)} + {$memory_key_type_1} + {$memory_key_line_1} + {$memory_key_label_1} + {$memory_key_value_1} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_2)} + {$memory_key_type_2} + {$memory_key_line_2} + {$memory_key_label_2} + {$memory_key_value_2} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_3)} + {$memory_key_type_3} + {$memory_key_line_3} + {$memory_key_label_3} + {$memory_key_value_3} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_4)} + {$memory_key_type_4} + {$memory_key_line_4} + {$memory_key_label_4} + {$memory_key_value_4} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_5)} + {$memory_key_type_5} + {$memory_key_line_5} + {$memory_key_label_5} + {$memory_key_value_5} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_6)} + {$memory_key_type_6} + {$memory_key_line_6} + {$memory_key_label_6} + {$memory_key_value_6} +{else} + 0 + 0 + + +{/if} + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($memory_key_type_7)} + {$memory_key_type_7} + {$memory_key_line_7} + {$memory_key_label_7} + {$memory_key_value_7} +{else} + 0 + 0 + + +{/if} + + diff --git a/resources/templates/provision/grandstream/gxp2124/{$mac}.xml b/resources/templates/provision/grandstream/gxp2124/{$mac}.xml index 5cc4c6d7df..74cae80352 100644 --- a/resources/templates/provision/grandstream/gxp2124/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2124/{$mac}.xml @@ -11,32 +11,32 @@ - {$display_name_1} + {$account.1.display_name} - {$server_address_1} + {$account.1.server_address} - {$outbound_proxy_1} + {$account.1.outbound_proxy} - {$outbound_proxy_secondary_1} + {$account.1.outbound_proxy_secondary} - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.auth_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} *97 @@ -353,7 +353,13 @@ + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + @@ -444,32 +450,32 @@ 1 - {$display_name_2} + {$account.2.display_name} - {$server_address_2} + {$account.2.server_address} - {$outbound_proxy_2} + {$account.2.outbound_proxy} - {$outbound_proxy_secondary_2} + {$account.2.outbound_proxy_secondary} - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.auth_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name_2} *97 @@ -876,29 +882,29 @@ 1 - {$display_name_3} + {$account.3.account.3.display_name} - {$server_address_3} + {$account.3.server_address} - {$outbound_proxy_3} + {$account.3.outbound_proxy} - {$outbound_proxy_secondary_3} + {$account.3.outbound_proxy_secondary} - {$user_id_3} + {$account.3.user_id} - {$user_id_3} + {$account.3.auth_id} - {$user_password_3} + {$account.3.password} {$display_name_3} @@ -1307,32 +1313,32 @@ 1 - {$display_name_4} + {$account.4.display_name} - {$server_address_4} + {$account.4.server_address} - {$outbound_proxy_4} + {$account.4.outbound_proxy} - {$outbound_proxy_secondary_4} + {$account.4.outbound_proxy_secondary} - {$user_id_4} + {$account.4.user_id} - {$user_id_4} + {$account.4.auth_id} - {$user_password_4} + {$account.4.password} - {$display_name_4} + {$account.4.display_name} *97 @@ -1904,13 +1910,15 @@ 2 - - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2124/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2124 {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision @@ -2052,7 +2060,7 @@ - + {if isset($contact_grandstream)} {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} diff --git a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml index f5819b05fd..af9b254ed2 100644 --- a/resources/templates/provision/grandstream/gxp2130/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2130/{$mac}.xml @@ -1,6401 +1,8314 @@ - + + {$mac|replace:'-':''} - - - - + + + + - - - - - - - - - - - - -{if isset($user_password_1)} -1 + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_primary} + + + + {$account.1.outbound_proxy_secondary} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} {else} -0 + 0 {/if} - - -{$display_name_1} + + + + 0 - - -{$server_address_1} + + + - - -{$secondary_server_address_1} + + + - - -{$outbound_proxy_1} + + + - - -{$outbound_proxy_secondary_1} - - - - - - - -{$user_id_1} - - - -{$auth_id_1} - - - -{$user_password_1} - - - -{$display_name_1} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode_1) } -{$grandstream_dns_mode_1} + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} {else} -0 + 0 {/if} - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 1 - - - -{if isset($nat_traversal_1) } -{$nat_traversal_1} -{else} -0 -{/if} + + + + 0 - - - + + + + {$account.1.register_expires} - - - - - - -0 + + + + 60 - - - -1 + + + + 0 - - - -0 + + + + 0 - - - -3 + + + + 30 - - - -60 + + + + 30 - - - -0 + + + + 5060 - - - -5060 + + + + 20 - - - -20 + + + + + 50 - - - - -50 + + + + + 400 - - - - -400 + + + + 0 - - - + + + {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 - - - -1 + + + + + 0 - - - -0 + + + + 1 - - - -0 + + + + 0 - - - -1 + + + + 0 - - - + + + + 1 + + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -123 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_1)||$grandstream_account_ring_tone_1==0} -{$grandstream_account_ring_tone_1} -{/if} - - - - -{if isset($grandstream_ring_tone_caller_id_1_1)} -{$grandstream_ring_tone_caller_id_1_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_1_1)||$grandstream_ring_tone_1_1==0} -{$grandstream_ring_tone_1_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_2_1)} -{$grandstream_ring_tone_caller_id_2_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_2_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_2_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_3_1)} -{$grandstream_ring_tone_caller_id_3_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_3_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_3_1} -{/if} - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -1 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -0 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - -20 - - - - - - - - - - -{if isset($user_password_2)} -1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_2} + + + + + 0 - - -{$server_address_2} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_2} + + + + 0 - - -{$outbound_proxy_secondary_2} + + + + 1 - - - + + + + + 2 - - -{$user_id_2} + + + + 2 - - -{$auth_id_2} + + + + 1 - - -{$user_password_2} + + + + 0 - - -{$display_name_2} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_2) } -{$grandstream_dns_modee_2} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + + 0 - - - + + + + 0 - - - -{if isset($nat_traversal_2) } -{$nat_traversal_2} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.2.display_name} - - - - - - -0 + + + {$account.2.server_address} - - - -1 + + + {$account.2.server_address_secondary} - - - -0 + + + {$account.2.outbound_proxy} - - - -3 + + + {$account.2.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.2.user_id} - - - -5062 + + + {$account.2.auth_id} - - - -20 + + + {$account.2.password} - - - - -50 + + + {$account.2.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_2)||$grandstream_account_ring_tone_2==0} -{$grandstream_account_ring_tone_2} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*79 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_3)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_3} + + + + + 0 - - -{$server_address_3} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_3} + + + + 0 - - -{$outbound_proxy_secondary_3} + + + + 1 - - - + + + + + 2 - - -{$user_id_3} + + + + 2 - - -{$auth_id_3} + + + + 1 - - -{$user_password_3} + + + + 0 - - -{$display_name_3} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_3) } -{$grandstream_dns_modee_3} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} - - - + + + ring1 - - - -{if isset($nat_traversal_3) } -{$nat_traversal_3} + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.3.display_name} - - - - - - -0 + + + {$account.3.server_address} - - - -1 + + + {$account.3.server_address_secondary} - - - -0 + + + {$account.3.outbound_proxy} - - - -3 + + + {$account.3.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.3.user_id} - - - -5064 + + + {$account.3.auth_id} - - - -20 + + + {$account.3.password} - - - - -50 + + + {$account.3.display_name} + + + + *97 - - - - -400 + + + + 0 - - - + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_3)||$grandstream_account_ring_tone_3==0} -{$grandstream_account_ring_tone_3} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_4)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_4} + + + + + 0 - - -{$server_address_4} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_4} + + + + 0 - - -{$outbound_proxy_secondary_4} + + + + 2 - - - + + + + 1 - - -{$user_id_4} + + + + 0 - - -{$auth_id_4} + + + + 1 - - -{$user_password_4} + + + + 97 - - -{$display_name_4} + + + + 1 - - -*97 + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_4) } -{$grandstream_dns_modee_4} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} - - - + + + - - - -{if isset($nat_traversal_4) } -{$nat_traversal_4} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.4.display_name} - - - - - - -0 + + + {$account.4.server_address} - - - -1 + + + {$account.4.server_address_secondary} - - - -0 + + + {$account.4.outbound_proxy} - - - -3 + + + {$account.4.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.4.user_id} - - - -5066 + + + {$account.4.auth_id} - - - -20 + + + {$account.4.password} - - - - -50 + + + {$account.4.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -2 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_4)||$grandstream_account_ring_tone_4==0} -{$grandstream_account_ring_tone_4} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_5)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_5} + + + + + 0 - - -{$server_address_5} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_5} + + + + 0 - - -{$outbound_proxy_secondary_5} + + + + 2 - - - + + + + 1 - - -{$user_id_5} + + + + 0 - - -{$auth_id_5} + + + + 1 - - -{$user_password_5} + + + + 97 - - -{$display_name_5} + + + + 1 - - -*97 + + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_5) } -{$grandstream_dns_modee_5} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} - - - + + + - - - -{if isset($nat_traversal_5) } -{$nat_traversal_5} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.5.display_name} - - - - - - -0 + + + {$account.5.server_address} - - - -1 + + + {$account.5.server_address_secondary} - - - -0 + + + {$account.5.outbound_proxy} - - - -3 + + + {$account.5.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.5.user_id} - - - -5068 + + + {$account.5.auth_id} - - - -20 + + + {$account.5.password} - - - - -50 + + + {$account.5.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -2 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_5)||$grandstream_account_ring_tone_5==0} -{$grandstream_account_ring_tone_5} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_6)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_6} + + + + + 0 - - -{$server_address_6} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_6} + + + + 0 - - -{$outbound_proxy_secondary_6} + + + + 2 - - - + + + + 1 - - -{$user_id_6} + + + + 0 - - -{$auth_id_6} + + + + 1 - - -{$user_password_6} + + + + 97 - - -{$display_name_6} + + + + 1 - - -*97 + + + + 2 + + + + + 0 - - - - - - -{if isset($grandstream_dns_modee_6) } -{$grandstream_dns_modee_6} + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} - - - + + + - - - -{if isset($nat_traversal_6) } -{$nat_traversal_6} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 {else} -0 + 0 {/if} - - - - + + + {$account.6.display_name} - - - - - - -0 + + + {$account.6.server_address} - - - -1 + + + {$account.6.server_address_secondary} - - - -0 + + + {$account.6.outbound_proxy} - - - -3 + + + {$account.6.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.6.user_id} - - - -5070 + + + {$account.6.auth_id} - - - -20 + + + {$account.6.password} - - - - -50 + + + {$account.6.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 + + + + - - - {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_6)||$grandstream_account_ring_tone_6==0} -{$grandstream_account_ring_tone_6} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 {/if} - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - + + + + + + 192 - - - - + + 168 - - - + + 1 - - - - - - + + 102 - - + + + 255 - - + + 255 - - + + 0 - - - + + 0 - - + + + 192 - - + + 168 - - + + 2 - - - + + 1 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + + 0 - - + + + 0 - - + + - - - -0 + + - - -0 + + - - + + + - - + + + - - + + + - - - + + + - - - + + + + 0 - - - + + + - - - + + + - - - -0 + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - -26 + + + + 26 - - - -46 + + + + 46 - - - -0 + + + + 0 - - - + + + + 0 + + + + {if isset($grandstream_lan_port_vlan) } -{$grandstream_lan_port_vlan} + {$grandstream_lan_port_vlan} {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - -0 + + + + 0 - - - + + + {if isset($grandstream_pc_port_vlan) } -{$grandstream_pc_port_vlan} + {$grandstream_pc_port_vlan} {else} -1 + 0 {/if} - - - -0 - - - -1 + + + + 0 - - - -30 + + + + 1 - - - -0 + + + + 1 - - - - - - -0 + + + + 30 - - - + + + + 1500 - - - -1194 + + + + 0 - - - -0 + + + + + + + 1 - - - + + + + 1 - - -{$user_password} + + + - - -{$admin_password} + + + + 0 - - - + + + + + + + 0 - - - - - - -0 + + + + 0 - - - + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} - - + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if $admin_password=="none"} + +{elseif isset($admin_password)} + {$admin_password} +{else} + adminadmin +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + {$http_auth_username} - - + + {$http_auth_password} - - - -0 + + + - - - -2 + + + - - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 {else} -{$domain_name}{$project_path}/app/provision + {$domain_name}{$project_path}/app/provision {/if} - - + + + -{if $grandstream_config_server_path=="none"} - -{elseif isset($grandstream_config_server_path)} -{$grandstream_config_server_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} + + + - - - + + + - - - + + + - - - + + + + + + + 0 - - - + + + {$grandstream_syslog_server} - - - - -1 - - - - -0 - - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -10080 - - - -1 - - - -1 - - - - -0 - - - - -0 - - - - - - -{$grandstream_syslog_server} - - - - - + + + {if isset($grandstream_syslog_level)} -{$grandstream_syslog_level} + {$grandstream_syslog_level} {else} -0 + 0 {/if} - - - + + + + + + + {if isset($grandstream_send_sip_log)} -{$grandstream_send_sip_log} + {$grandstream_send_sip_log} {else} -0 + 0 {/if} - - - -1 + + + + 0 - - - - - - - - - - - - - - -Auto + + + + 1 - - -0 + + + + 0 - - - -0 + + + + + + + + + + + + + + + Auto - - - - - - + + + 0 - - - + + + + 0 - - - + + + + + + - - - -0 + + + - - -86400 + + + - - - + + + + 0 - - - + + + 86400 - - -0 + + + - - - + + + - - - + + + 7547 - - - - - - -0 + + + - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 0 - - - + + + - - - -1 + + + - - -0 + + + - - - -80 + + + + 1 - - - -443 + + + + 1 - - -5 + + + + 80 - - - + + + + 443 - - - - - - -0 + + + 1 - - - - - - -0 + + + 5 - - - - - - + + + 20 - - - - - - + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + {if isset($contact_grandstream)} -1 + 1 {else} -0 + 0 {/if} - - - - - - + + + - - - - + + + + + + + + {if isset($contact_grandstream)} -{$grandstream_phonebook_xml_server_path}{$mac}/ + {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} -{$grandstream_phonebook_xml_server_path} + {$grandstream_phonebook_xml_server_path} {else} - + {/if} - - - - + + + {if isset($grandstream_phonebook_download_interval)} -{$grandstream_phonebook_download_interval} + {$grandstream_phonebook_download_interval} {else} -0 + 0 {/if} - - - -1 + + + + 1 - - - -1 + + + + 0 - - - + + + + 0 + + + + {if isset($contact_grandstream)} -2 + 2 {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - - - - -0 + + + + + + + 0 - - -{$grandstream_ldap_server} + + + {$grandstream_ldap_server} - - -389 + + + 389 - - - - -{$grandstream_ldap_base_dn} + + + + + {$grandstream_ldap_base_dn} - - -{$ldap_username} + + + {$grandstream_ldap_username} - - -{$ldap_password} + + + {$grandstream_ldap_password} - - - -{$grandstream_ldap_number_filter} + + + + {$grandstream_ldap_number_filter} - - - -{$grandstream_ldap_name_filter} + + + + {$grandstream_ldap_name_filter} - - - -3 + + + + 3 - - - -{$grandstream_ldap_name_attr} + + + + {$grandstream_ldap_name_attr} - - - -{$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_number_attr} - - -givenName sn title + + + {$grandstream_ldap_display_name} - - - - -50 + + + + + 50 - - - - -30 + + + + + 30 - - - -0 + + + + 0 - - -1 + + + 0 - -1 + + 0 - - -givenName sn title + + + givenName sn title - - - - - - -5004 + + + 0 - - - -200 + + + + + + + 5004 - - - -5204 + + + + 200 - - - -0 + + + + 0 - - - -20 + + + + 20 - - - + + + - - - + + + - - - + + + {if isset($public_mode) } {if $public_mode|strtolower == 'true'} -1 + 1 {elseif $public_mode|strtolower == 'yes'} -1 + 1 {elseif $public_mode == '1'} -1 + 1 {else} -0 + 0 {/if} {else} -0 + 0 {/if} - - - -0 - - - - - - - - - -30 + + + + 0 - - - -0 + + + - - - -0 + + + - - - -0 + + + + 0 - - - -0 + + + 0 - - - -0 + + + + + + + + + + - - - -1 + + + - - - -0 + + + - - - -0 + + + + 4320 - - - -0 + + + 100 - - - -0 + + + 100 - - - -0 + + + + 0 - - - -0 + + + + - - - + + + - - - -{if isset($grandstream_auto_attended_transfer) } -{$grandstream_auto_attended_transfer} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} {else} -1 + 1 {/if} - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -10 - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f1=440,f2=480,c=200/400; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440,c=10/10; - - - - -f1=440,f2=480,c=200/400; - - - - -f1=440,f2=440,c=25/525; - - - - -0 - - - - -f1=480,f2=620,c=50/50; - - - - -f1=480,f2=620,c=25/25; - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -{if isset($grandstream_handset_tx_gain) } -{$grandstream_handset_tx_gain} -{else} -0 -{/if} - - - - - - - - -100 - - - - -60 - - - - -5 - - - - -0 - - - - - - - - - - -0 - - - - -0 - - - - -1 - - - - - - - - - -{if isset($grandstream_wallpaper_url)} -1 -{$grandstream_wallpaper_url} -{else} -0 - -{/if} - - - -#000000 - - - - -0 - - - -0 - - - - -3 - - - - - - - - -0 - - - - - - - -0 - - - - -0 - - - - - - + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + {if isset($ntp_server_primary)} -{$ntp_server_primary} + {$ntp_server_primary} {else} -pool.ntp.org + pool.ntp.org {/if} - - - + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} - - - -1440 + + + + 1440 - - - - -1 + + + + + 1 - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {if isset($grandstream_timezone) } -{$grandstream_timezone} + {$grandstream_timezone} {elseif isset($grandstream_gxp_time_zone) } -{$grandstream_gxp_time_zone} + {$grandstream_gxp_time_zone} {else} -auto + auto {/if} - - - - -0 + + + + + 1 - - - - -PST+8PDT,M3.2.0,M11.1.0 + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - -3 + + + + + + + + + 0 - - - -0 + + + + 0 - - - - + + + + 0 - - - -1 + + + + + + + + 100 - - - -1 + + + + 60 + + + + + 1 + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + 1 + + + + + - - - - {if isset($grandstream_city_code)} -0 -{else} -1 + 0 {/if} - - - -{$grandstream_city_code} - - - - -15 - - - - -{if isset($grandstream_temp_unit)} -{$grandstream_temp_unit} -{else} -auto + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} {/if} - - - - -1 + + + + 15 - - - -CAD/USD;CAD/EUR;CAD/GBP;CAD/AUD;CAD/CNY;CAD/JPY - - - - - - - - - - -XMLApp - - - - - - - - -0 - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($grandstream_bluetooth_power)} -{$grandstream_bluetooth_power} + + + +{if isset ($grandstream_temp_unit)} + {$grandstream_temp_unit} {/if} - - - -{if isset($grandstream_bluetooth_handsfree)} -{$grandstream_bluetooth_handsfree} -{/if} + + + + + + - - - + + + XMLApp + + + - - - - - - - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + 0 - - - - - - - - - - - - - + + + + 0 - - - + + + + + 1 - - + + + + 0 - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 0 - + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - {$fixed_keys=4} {if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} {if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} @@ -6429,20 +8342,10 @@ {/if} {/for} - - - - - - - - - - - + {$start_id=23800} -{for $line=7 to 32} +{for $line=7 to 48} {$pid=($line-6)*4-4} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} @@ -6465,78 +8368,3777 @@ {/if} {/for} + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + - - + + + - - + + + -{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>17]} -{$start_id=2987} -{for $prog=1 to 3} -{$pid=$prog*4-4} -{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} -{$key_types[$keys.programmable.$prog.device_key_type]} -{$keys.programmable.$prog.device_key_line} -{$keys.programmable.$prog.device_key_label} -{$keys.programmable.$prog.device_key_value} -{else} -0 -0 - - -{/if} + + + + -{/for} + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - - + + + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=323} {for $mem=1 to 7} {$pid=$mem*3-3} {if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + {$key_types[$keys.memory.$mem.device_key_type]} + + {$keys.memory.$mem.device_key_line} + + {$keys.memory.$mem.device_key_label} + + {$keys.memory.$mem.device_key_value} {else} -1 @@ -6564,6 +12166,7 @@ {/for} + {$start_id=1440} {for $mem=19 to 24} {$pid=($mem-18)*4-4} @@ -6581,34 +12184,868 @@ {/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + {if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} - - - - - - - - - - - - - - - - - - - - - - - - - - - {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=23000} @@ -6628,5 +13065,3999 @@ {/for} {/if} - + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml index 66475e6f19..af9b254ed2 100644 --- a/resources/templates/provision/grandstream/gxp2135/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2135/{$mac}.xml @@ -1,6401 +1,8314 @@ - + + {$mac|replace:'-':''} - - - - + + + + - - - - -f - - - - - - - -{if isset($user_password_1)} -1 + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_primary} + + + + {$account.1.outbound_proxy_secondary} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} {else} -0 + 0 {/if} - - -{$display_name_1} + + + + 0 - - -{$server_address_1} + + + - - -{$secondary_server_address_1} + + + - - -{$outbound_proxy_1} + + + - - -{$outbound_proxy_secondary_1} - - - - - - - -{$user_id_1} - - - -{$auth_id_1} - - - -{$user_password_1} - - - -{$display_name_1} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode_1) } -{$grandstream_dns_mode_1} + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} {else} -0 + 0 {/if} - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 1 - - - -{if isset($grandstream_nat_traversal_1) } -{$grandstream_nat_traversal_1} -{else} -0 -{/if} + + + + 0 - - - + + + + {$account.1.register_expires} - - - - - - -0 + + + + 60 - - - -1 + + + + 0 - - - -0 + + + + 0 - - - -{$register_expires_1} + + + + 30 - - - -60 + + + + 30 - - - -0 + + + + 5060 - - - -5060 + + + + 20 - - - -20 + + + + + 50 - - - - -50 + + + + + 400 - - - - -400 + + + + 0 - - - + + + {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 - - - -1 + + + + + 0 - - - -0 + + + + 1 - - - -0 + + + + 0 - - - -1 + + + + 0 - - - + + + + 1 + + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -123 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_1)||$grandstream_account_ring_tone_1==0} -{$grandstream_account_ring_tone_1} -{/if} - - - - -{if isset($grandstream_ring_tone_caller_id_1_1)} -{$grandstream_ring_tone_caller_id_1_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_1_1)||$grandstream_ring_tone_1_1==0} -{$grandstream_ring_tone_1_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_2_1)} -{$grandstream_ring_tone_caller_id_2_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_2_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_2_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_3_1)} -{$grandstream_ring_tone_caller_id_3_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_3_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_3_1} -{/if} - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -1 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -0 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - -20 - - - - - - - - - - -{if isset($user_password_2)} -1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_2} + + + + + 0 - - -{$server_address_2} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_2} + + + + 0 - - -{$outbound_proxy_secondary_2} + + + + 1 - - - + + + + + 2 - - -{$user_id_2} + + + + 2 - - -{$auth_id_2} + + + + 1 - - -{$user_password_2} + + + + 0 - - -{$display_name_2} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_2) } -{$grandstream_dns_modee_2} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + + 0 - - - + + + + 0 - - - -{if isset($grandstream_nat_traversal_2) } -{$grandstream_nat_traversal_2} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.2.display_name} - - - - - - -0 + + + {$account.2.server_address} - - - -1 + + + {$account.2.server_address_secondary} - - - -0 + + + {$account.2.outbound_proxy} - - - -{$register_expires_2} + + + {$account.2.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.2.user_id} - - - -5062 + + + {$account.2.auth_id} - - - -20 + + + {$account.2.password} - - - - -50 + + + {$account.2.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_2)||$grandstream_account_ring_tone_2==0} -{$grandstream_account_ring_tone_2} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*79 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_3)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_3} + + + + + 0 - - -{$server_address_3} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_3} + + + + 0 - - -{$outbound_proxy_secondary_3} + + + + 1 - - - + + + + + 2 - - -{$user_id_3} + + + + 2 - - -{$auth_id_3} + + + + 1 - - -{$user_password_3} + + + + 0 - - -{$display_name_3} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_3) } -{$grandstream_dns_modee_3} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} - - - + + + ring1 - - - -{if isset($grandstream_nat_traversal_3) } -{$grandstream_nat_traversal_3} + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.3.display_name} - - - - - - -0 + + + {$account.3.server_address} - - - -1 + + + {$account.3.server_address_secondary} - - - -0 + + + {$account.3.outbound_proxy} - - - -{$register_expires_3} + + + {$account.3.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.3.user_id} - - - -5064 + + + {$account.3.auth_id} - - - -20 + + + {$account.3.password} - - - - -50 + + + {$account.3.display_name} + + + + *97 - - - - -400 + + + + 0 - - - + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_3)||$grandstream_account_ring_tone_3==0} -{$grandstream_account_ring_tone_3} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_4)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_4} + + + + + 0 - - -{$server_address_4} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_4} + + + + 0 - - -{$outbound_proxy_secondary_4} + + + + 2 - - - + + + + 1 - - -{$user_id_4} + + + + 0 - - -{$auth_id_4} + + + + 1 - - -{$user_password_4} + + + + 97 - - -{$display_name_4} + + + + 1 - - -*97 + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_4) } -{$grandstream_dns_modee_4} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} - - - + + + - - - -{if isset($grandstream_nat_traversal_4) } -{$grandstream_nat_traversal_4} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.4.display_name} - - - - - - -0 + + + {$account.4.server_address} - - - -1 + + + {$account.4.server_address_secondary} - - - -0 + + + {$account.4.outbound_proxy} - - - -{$register_expires_4} + + + {$account.4.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.4.user_id} - - - -5066 + + + {$account.4.auth_id} - - - -20 + + + {$account.4.password} - - - - -50 + + + {$account.4.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_4)||$grandstream_account_ring_tone_4==0} -{$grandstream_account_ring_tone_4} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_5)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_5} + + + + + 0 - - -{$server_address_5} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_5} + + + + 0 - - -{$outbound_proxy_secondary_5} + + + + 2 - - - + + + + 1 - - -{$user_id_5} + + + + 0 - - -{$auth_id_5} + + + + 1 - - -{$user_password_5} + + + + 97 - - -{$display_name_5} + + + + 1 - - -*97 + + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_5) } -{$grandstream_dns_modee_5} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} - - - + + + - - - -{if isset($grandstream_nat_traversal_5) } -{$grandstream_nat_traversal_5} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.5.display_name} - - - - - - -0 + + + {$account.5.server_address} - - - -1 + + + {$account.5.server_address_secondary} - - - -0 + + + {$account.5.outbound_proxy} - - - -{$register_expires_5} + + + {$account.5.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.5.user_id} - - - -5068 + + + {$account.5.auth_id} - - - -20 + + + {$account.5.password} - - - - -50 + + + {$account.5.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_5)||$grandstream_account_ring_tone_5==0} -{$grandstream_account_ring_tone_5} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_6)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_6} + + + + + 0 - - -{$server_address_6} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_6} + + + + 0 - - -{$outbound_proxy_secondary_6} + + + + 2 - - - + + + + 1 - - -{$user_id_6} + + + + 0 - - -{$auth_id_6} + + + + 1 - - -{$user_password_6} + + + + 97 - - -{$display_name_6} + + + + 1 - - -*97 + + + + 2 + + + + + 0 - - - - - - -{if isset($grandstream_dns_modee_6) } -{$grandstream_dns_modee_6} + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} - - - + + + - - - -{if isset($grandstream_nat_traversal_6) } -{$grandstream_nat_traversal_6} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 {else} -0 + 0 {/if} - - - - + + + {$account.6.display_name} - - - - - - -0 + + + {$account.6.server_address} - - - -1 + + + {$account.6.server_address_secondary} - - - -0 + + + {$account.6.outbound_proxy} - - - -{$register_expires_6} + + + {$account.6.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.6.user_id} - - - -5070 + + + {$account.6.auth_id} - - - -20 + + + {$account.6.password} - - - - -50 + + + {$account.6.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 + + + + - - - {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_6)||$grandstream_account_ring_tone_6==0} -{$grandstream_account_ring_tone_6} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 {/if} - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - + + + + + + 192 - - - - + + 168 - - - + + 1 - - - - - - + + 102 - - + + + 255 - - + + 255 - - + + 0 - - - + + 0 - - + + + 192 - - + + 168 - - + + 2 - - - + + 1 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + + 0 - - + + + 0 - - + + - - - -0 + + - - -0 + + - - + + + - - + + + - - + + + - - - + + + - - - + + + + 0 - - - + + + - - - + + + - - - -0 + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - -26 + + + + 26 - - - -46 + + + + 46 - - - -0 + + + + 0 - - - + + + + 0 + + + + {if isset($grandstream_lan_port_vlan) } -{$grandstream_lan_port_vlan} + {$grandstream_lan_port_vlan} {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - -0 + + + + 0 - - - + + + {if isset($grandstream_pc_port_vlan) } -{$grandstream_pc_port_vlan} + {$grandstream_pc_port_vlan} {else} -1 + 0 {/if} - - - -0 - - - -1 + + + + 0 - - - -30 + + + + 1 - - - -0 + + + + 1 - - - - - - -0 + + + + 30 - - - + + + + 1500 - - - -1194 + + + + 0 - - - -0 + + + + + + + 1 - - - + + + + 1 - - -{$user_password} + + + - - -{$admin_password} + + + + 0 - - - + + + + + + + 0 - - - - - - -0 + + + + 0 - - - + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} - - + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if $admin_password=="none"} + +{elseif isset($admin_password)} + {$admin_password} +{else} + adminadmin +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + {$http_auth_username} - - + + {$http_auth_password} - - - -0 + + + - - - -2 + + + - - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 {else} -{$domain_name}{$project_path}/app/provision + {$domain_name}{$project_path}/app/provision {/if} - - + + + -{if $grandstream_config_server_path=="none"} - -{elseif isset($grandstream_config_server_path)} -{$grandstream_config_server_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} + + + - - - + + + - - - + + + - - - + + + + + + + 0 - - - + + + {$grandstream_syslog_server} - - - - -1 - - - - -0 - - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -10080 - - - -1 - - - -1 - - - - -0 - - - - -0 - - - - - - -{$grandstream_syslog_server} - - - - - + + + {if isset($grandstream_syslog_level)} -{$grandstream_syslog_level} + {$grandstream_syslog_level} {else} -0 + 0 {/if} - - - + + + + + + + {if isset($grandstream_send_sip_log)} -{$grandstream_send_sip_log} + {$grandstream_send_sip_log} {else} -0 + 0 {/if} - - - -1 + + + + 0 - - - - - - - - - - - - - - -Auto + + + + 1 - - -0 + + + + 0 - - - -0 + + + + + + + + + + + + + + + Auto - - - - - - + + + 0 - - - + + + + 0 - - - + + + + + + - - - -0 + + + - - -86400 + + + - - - + + + + 0 - - - + + + 86400 - - -0 + + + - - - + + + - - - + + + 7547 - - - - - - -0 + + + - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 0 - - - + + + - - - -1 + + + - - -0 + + + - - - -80 + + + + 1 - - - -443 + + + + 1 - - -5 + + + + 80 - - - + + + + 443 - - - - - - -0 + + + 1 - - - - - - -0 + + + 5 - - - - - - + + + 20 - - - - - - + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + {if isset($contact_grandstream)} -1 + 1 {else} -0 + 0 {/if} - - - - - - + + + - - - - + + + + + + + + {if isset($contact_grandstream)} -{$grandstream_phonebook_xml_server_path}{$mac}/ + {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} -{$grandstream_phonebook_xml_server_path} + {$grandstream_phonebook_xml_server_path} {else} - + {/if} - - - - + + + {if isset($grandstream_phonebook_download_interval)} -{$grandstream_phonebook_download_interval} + {$grandstream_phonebook_download_interval} {else} -0 + 0 {/if} - - - -1 + + + + 1 - - - -1 + + + + 0 - - - + + + + 0 + + + + {if isset($contact_grandstream)} -2 + 2 {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - - - - -0 + + + + + + + 0 - - -{$grandstream_ldap_server} + + + {$grandstream_ldap_server} - - -389 + + + 389 - - - - -{$grandstream_ldap_base_dn} + + + + + {$grandstream_ldap_base_dn} - - -{$ldap_username} + + + {$grandstream_ldap_username} - - -{$ldap_password} + + + {$grandstream_ldap_password} - - - -{$grandstream_ldap_number_filter} + + + + {$grandstream_ldap_number_filter} - - - -{$grandstream_ldap_name_filter} + + + + {$grandstream_ldap_name_filter} - - - -3 + + + + 3 - - - -{$grandstream_ldap_name_attr} + + + + {$grandstream_ldap_name_attr} - - - -{$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_number_attr} - - -givenName sn title + + + {$grandstream_ldap_display_name} - - - - -50 + + + + + 50 - - - - -30 + + + + + 30 - - - -0 + + + + 0 - - -1 + + + 0 - -1 + + 0 - - -givenName sn title + + + givenName sn title - - - - - - -5004 + + + 0 - - - -200 + + + + + + + 5004 - - - -5204 + + + + 200 - - - -0 + + + + 0 - - - -20 + + + + 20 - - - + + + - - - + + + - - - + + + {if isset($public_mode) } {if $public_mode|strtolower == 'true'} -1 + 1 {elseif $public_mode|strtolower == 'yes'} -1 + 1 {elseif $public_mode == '1'} -1 + 1 {else} -0 + 0 {/if} {else} -0 + 0 {/if} - - - -0 - - - - - - - - - -30 + + + + 0 - - - -0 + + + - - - -0 + + + - - - -0 + + + + 0 - - - -0 + + + 0 - - - -0 + + + + + + + + + + - - - -1 + + + - - - -0 + + + - - - -0 + + + + 4320 - - - -0 + + + 100 - - - -0 + + + 100 - - - -0 + + + + 0 - - - -0 + + + + - - - + + + - - - -{if isset($grandstream_auto_attended_transfer) } -{$grandstream_auto_attended_transfer} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} {else} -1 + 1 {/if} - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -10 - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f1=440,f2=480,c=200/400; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440,c=10/10; - - - - -f1=440,f2=480,c=200/400; - - - - -f1=440,f2=440,c=25/525; - - - - -0 - - - - -f1=480,f2=620,c=50/50; - - - - -f1=480,f2=620,c=25/25; - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -{if isset($grandstream_handset_tx_gain) } -{$grandstream_handset_tx_gain} -{else} -0 -{/if} - - - - - - - - -100 - - - - -60 - - - - -5 - - - - -0 - - - - - - - - - - -0 - - - - -0 - - - - -1 - - - - - - - - - -{if isset($grandstream_wallpaper_url)} -1 -{$grandstream_wallpaper_url} -{else} -0 - -{/if} - - - -#000000 - - - - -0 - - - -0 - - - - -3 - - - - - - - - -0 - - - - - - - -0 - - - - -0 - - - - - - + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + {if isset($ntp_server_primary)} -{$ntp_server_primary} + {$ntp_server_primary} {else} -pool.ntp.org + pool.ntp.org {/if} - - - + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} - - - -1440 + + + + 1440 - - - - -1 + + + + + 1 - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {if isset($grandstream_timezone) } -{$grandstream_timezone} + {$grandstream_timezone} {elseif isset($grandstream_gxp_time_zone) } -{$grandstream_gxp_time_zone} + {$grandstream_gxp_time_zone} {else} -auto + auto {/if} - - - - -0 + + + + + 1 - - - - -PST+8PDT,M3.2.0,M11.1.0 + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - -3 + + + + + + + + + 0 - - - -0 + + + + 0 - - - - + + + + 0 - - - -1 + + + + + + + + 100 - - - -1 + + + + 60 + + + + + 1 + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + 1 + + + + + - - - - {if isset($grandstream_city_code)} -0 -{else} -1 + 0 {/if} - - - -{$grandstream_city_code} - - - - -15 - - - - -{if isset($grandstream_temp_unit)} -{$grandstream_temp_unit} -{else} -auto + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} {/if} - - - - -1 + + + + 15 - - - -CAD/USD;CAD/EUR;CAD/GBP;CAD/AUD;CAD/CNY;CAD/JPY - - - - - - - - - - -XMLApp - - - - - - - - -0 - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($grandstream_bluetooth_power)} -{$grandstream_bluetooth_power} + + + +{if isset ($grandstream_temp_unit)} + {$grandstream_temp_unit} {/if} - - - -{if isset($grandstream_bluetooth_handsfree)} -{$grandstream_bluetooth_handsfree} -{/if} + + + + + + - - - + + + XMLApp + + + - - - - - - - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + 0 - - - - - - - - - - - - - + + + + 0 - - - + + + + + 1 - - + + + + 0 - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 0 - + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - {$fixed_keys=4} {if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} {if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} @@ -6429,20 +8342,10 @@ {/if} {/for} - - - - - - - - - - - + {$start_id=23800} -{for $line=7 to 32} +{for $line=7 to 48} {$pid=($line-6)*4-4} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} @@ -6465,78 +8368,3777 @@ {/if} {/for} + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + - - + + + - - + + + -{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>17]} -{$start_id=2987} -{for $prog=1 to 3} -{$pid=$prog*4-4} -{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} -{$key_types[$keys.programmable.$prog.device_key_type]} -{$keys.programmable.$prog.device_key_line} -{$keys.programmable.$prog.device_key_label} -{$keys.programmable.$prog.device_key_value} -{else} -0 -0 - - -{/if} + + + + -{/for} + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - - + + + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=323} {for $mem=1 to 7} {$pid=$mem*3-3} {if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + {$key_types[$keys.memory.$mem.device_key_type]} + + {$keys.memory.$mem.device_key_line} + + {$keys.memory.$mem.device_key_label} + + {$keys.memory.$mem.device_key_value} {else} -1 @@ -6564,6 +12166,7 @@ {/for} + {$start_id=1440} {for $mem=19 to 24} {$pid=($mem-18)*4-4} @@ -6581,34 +12184,868 @@ {/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + {if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} - - - - - - - - - - - - - - - - - - - - - - - - - - - {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=23000} @@ -6628,5 +13065,3999 @@ {/for} {/if} - + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml index fbb6884712..af9b254ed2 100644 --- a/resources/templates/provision/grandstream/gxp2140/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2140/{$mac}.xml @@ -1,6401 +1,8314 @@ - + + {$mac|replace:'-':''} - - - - + + + + - - - - - - - - - - - - -{if isset($user_password_1)} -1 + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_primary} + + + + {$account.1.outbound_proxy_secondary} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} {else} -0 + 0 {/if} - - -{$display_name_1} + + + + 0 - - -{$server_address_1} + + + - - -{$secondary_server_address_1} + + + - - -{$outbound_proxy_1} + + + - - -{$outbound_proxy_secondary_1} - - - - - - - -{$user_id_1} - - - -{$auth_id_1} - - - -{$user_password_1} - - - -{$display_name_1} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode_1) } -{$grandstream_dns_mode_1} + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} {else} -0 + 0 {/if} - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 1 - - - -{if isset($nat_traversal_1) } -{$nat_traversal_1} -{else} -0 -{/if} + + + + 0 - - - + + + + {$account.1.register_expires} - - - - - - -0 + + + + 60 - - - -1 + + + + 0 - - - -0 + + + + 0 - - - -3 + + + + 30 - - - -60 + + + + 30 - - - -0 + + + + 5060 - - - -5060 + + + + 20 - - - -20 + + + + + 50 - - - - -50 + + + + + 400 - - - - -400 + + + + 0 - - - + + + {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 - - - -1 + + + + + 0 - - - -0 + + + + 1 - - - -0 + + + + 0 - - - -1 + + + + 0 - - - + + + + 1 + + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -123 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_1)||$grandstream_account_ring_tone_1==0} -{$grandstream_account_ring_tone_1} -{/if} - - - - -{if isset($grandstream_ring_tone_caller_id_1_1)} -{$grandstream_ring_tone_caller_id_1_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_1_1)||$grandstream_ring_tone_1_1==0} -{$grandstream_ring_tone_1_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_2_1)} -{$grandstream_ring_tone_caller_id_2_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_2_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_2_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_3_1)} -{$grandstream_ring_tone_caller_id_3_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_3_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_3_1} -{/if} - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -1 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -0 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - -20 - - - - - - - - - - -{if isset($user_password_2)} -1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_2} + + + + + 0 - - -{$server_address_2} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_2} + + + + 0 - - -{$outbound_proxy_secondary_2} + + + + 1 - - - + + + + + 2 - - -{$user_id_2} + + + + 2 - - -{$auth_id_2} + + + + 1 - - -{$user_password_2} + + + + 0 - - -{$display_name_2} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_2) } -{$grandstream_dns_modee_2} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + + 0 - - - + + + + 0 - - - -{if isset($nat_traversal_2) } -{$nat_traversal_2} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.2.display_name} - - - - - - -0 + + + {$account.2.server_address} - - - -1 + + + {$account.2.server_address_secondary} - - - -0 + + + {$account.2.outbound_proxy} - - - -3 + + + {$account.2.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.2.user_id} - - - -5062 + + + {$account.2.auth_id} - - - -20 + + + {$account.2.password} - - - - -50 + + + {$account.2.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_2)||$grandstream_account_ring_tone_2==0} -{$grandstream_account_ring_tone_2} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*79 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_3)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_3} + + + + + 0 - - -{$server_address_3} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_3} + + + + 0 - - -{$outbound_proxy_secondary_3} + + + + 1 - - - + + + + + 2 - - -{$user_id_3} + + + + 2 - - -{$auth_id_3} + + + + 1 - - -{$user_password_3} + + + + 0 - - -{$display_name_3} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_3) } -{$grandstream_dns_modee_3} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} - - - + + + ring1 - - - -{if isset($nat_traversal_3) } -{$nat_traversal_3} + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.3.display_name} - - - - - - -0 + + + {$account.3.server_address} - - - -1 + + + {$account.3.server_address_secondary} - - - -0 + + + {$account.3.outbound_proxy} - - - -3 + + + {$account.3.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.3.user_id} - - - -5064 + + + {$account.3.auth_id} - - - -20 + + + {$account.3.password} - - - - -50 + + + {$account.3.display_name} + + + + *97 - - - - -400 + + + + 0 - - - + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_3)||$grandstream_account_ring_tone_3==0} -{$grandstream_account_ring_tone_3} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_4)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_4} + + + + + 0 - - -{$server_address_4} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_4} + + + + 0 - - -{$outbound_proxy_secondary_4} + + + + 2 - - - + + + + 1 - - -{$user_id_4} + + + + 0 - - -{$auth_id_4} + + + + 1 - - -{$user_password_4} + + + + 97 - - -{$display_name_4} + + + + 1 - - -*97 + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_4) } -{$grandstream_dns_modee_4} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} - - - + + + - - - -{if isset($nat_traversal_4) } -{$nat_traversal_4} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.4.display_name} - - - - - - -0 + + + {$account.4.server_address} - - - -1 + + + {$account.4.server_address_secondary} - - - -0 + + + {$account.4.outbound_proxy} - - - -3 + + + {$account.4.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.4.user_id} - - - -5066 + + + {$account.4.auth_id} - - - -20 + + + {$account.4.password} - - - - -50 + + + {$account.4.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_4)||$grandstream_account_ring_tone_4==0} -{$grandstream_account_ring_tone_4} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_5)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_5} + + + + + 0 - - -{$server_address_5} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_5} + + + + 0 - - -{$outbound_proxy_secondary_5} + + + + 2 - - - + + + + 1 - - -{$user_id_5} + + + + 0 - - -{$auth_id_5} + + + + 1 - - -{$user_password_5} + + + + 97 - - -{$display_name_5} + + + + 1 - - -*97 + + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_5) } -{$grandstream_dns_modee_5} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} - - - + + + - - - -{if isset($nat_traversal_5) } -{$nat_traversal_5} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.5.display_name} - - - - - - -0 + + + {$account.5.server_address} - - - -1 + + + {$account.5.server_address_secondary} - - - -0 + + + {$account.5.outbound_proxy} - - - -3 + + + {$account.5.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.5.user_id} - - - -5068 + + + {$account.5.auth_id} - - - -20 + + + {$account.5.password} - - - - -50 + + + {$account.5.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_5)||$grandstream_account_ring_tone_5==0} -{$grandstream_account_ring_tone_5} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_6)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_6} + + + + + 0 - - -{$server_address_6} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_6} + + + + 0 - - -{$outbound_proxy_secondary_6} + + + + 2 - - - + + + + 1 - - -{$user_id_6} + + + + 0 - - -{$auth_id_6} + + + + 1 - - -{$user_password_6} + + + + 97 - - -{$display_name_6} + + + + 1 - - -*97 + + + + 2 + + + + + 0 - - - - - - -{if isset($grandstream_dns_modee_6) } -{$grandstream_dns_modee_6} + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} - - - + + + - - - -{if isset($nat_traversal_6) } -{$nat_traversal_6} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 {else} -0 + 0 {/if} - - - - + + + {$account.6.display_name} - - - - - - -0 + + + {$account.6.server_address} - - - -1 + + + {$account.6.server_address_secondary} - - - -0 + + + {$account.6.outbound_proxy} - - - -3 + + + {$account.6.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.6.user_id} - - - -5070 + + + {$account.6.auth_id} - - - -20 + + + {$account.6.password} - - - - -50 + + + {$account.6.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 + + + + - - - {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_6)||$grandstream_account_ring_tone_6==0} -{$grandstream_account_ring_tone_6} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 {/if} - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - + + + + + + 192 - - - - + + 168 - - - + + 1 - - - - - - + + 102 - - + + + 255 - - + + 255 - - + + 0 - - - + + 0 - - + + + 192 - - + + 168 - - + + 2 - - - + + 1 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + + 0 - - + + + 0 - - + + - - - -0 + + - - -0 + + - - + + + - - + + + - - + + + - - - + + + - - - + + + + 0 - - - + + + - - - + + + - - - -0 + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - -26 + + + + 26 - - - -46 + + + + 46 - - - -0 + + + + 0 - - - + + + + 0 + + + + {if isset($grandstream_lan_port_vlan) } -{$grandstream_lan_port_vlan} + {$grandstream_lan_port_vlan} {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - -0 + + + + 0 - - - + + + {if isset($grandstream_pc_port_vlan) } -{$grandstream_pc_port_vlan} + {$grandstream_pc_port_vlan} {else} -1 + 0 {/if} - - - -0 - - - -1 + + + + 0 - - - -30 + + + + 1 - - - -0 + + + + 1 - - - - - - -0 + + + + 30 - - - + + + + 1500 - - - -1194 + + + + 0 - - - -0 + + + + + + + 1 - - - + + + + 1 - - -{$user_password} + + + - - -{$admin_password} + + + + 0 - - - + + + + + + + 0 - - - - - - -0 + + + + 0 - - - + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} - - + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if $admin_password=="none"} + +{elseif isset($admin_password)} + {$admin_password} +{else} + adminadmin +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + {$http_auth_username} - - + + {$http_auth_password} - - - -0 + + + - - - -2 + + + - - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 {else} -{$domain_name}{$project_path}/app/provision + {$domain_name}{$project_path}/app/provision {/if} - - + + + -{if $grandstream_config_server_path=="none"} - -{elseif isset($grandstream_config_server_path)} -{$grandstream_config_server_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} + + + - - - + + + - - - + + + - - - + + + + + + + 0 - - - + + + {$grandstream_syslog_server} - - - - -1 - - - - -0 - - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -10080 - - - -1 - - - -1 - - - - -0 - - - - -0 - - - - - - -{$grandstream_syslog_server} - - - - - + + + {if isset($grandstream_syslog_level)} -{$grandstream_syslog_level} + {$grandstream_syslog_level} {else} -0 + 0 {/if} - - - + + + + + + + {if isset($grandstream_send_sip_log)} -{$grandstream_send_sip_log} + {$grandstream_send_sip_log} {else} -0 + 0 {/if} - - - -1 + + + + 0 - - - - - - - - - - - - - - -Auto + + + + 1 - - -0 + + + + 0 - - - -0 + + + + + + + + + + + + + + + Auto - - - - - - + + + 0 - - - + + + + 0 - - - + + + + + + - - - -0 + + + - - -86400 + + + - - - + + + + 0 - - - + + + 86400 - - -0 + + + - - - + + + - - - + + + 7547 - - - - - - -0 + + + - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 0 - - - + + + - - - -1 + + + - - -0 + + + - - - -80 + + + + 1 - - - -443 + + + + 1 - - -5 + + + + 80 - - - + + + + 443 - - - - - - -0 + + + 1 - - - - - - -0 + + + 5 - - - - - - + + + 20 - - - - - - + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + {if isset($contact_grandstream)} -1 + 1 {else} -0 + 0 {/if} - - - - - - + + + - - - - + + + + + + + + {if isset($contact_grandstream)} -{$grandstream_phonebook_xml_server_path}{$mac}/ + {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} -{$grandstream_phonebook_xml_server_path} + {$grandstream_phonebook_xml_server_path} {else} - + {/if} - - - - + + + {if isset($grandstream_phonebook_download_interval)} -{$grandstream_phonebook_download_interval} + {$grandstream_phonebook_download_interval} {else} -0 + 0 {/if} - - - -1 + + + + 1 - - - -1 + + + + 0 - - - + + + + 0 + + + + {if isset($contact_grandstream)} -2 + 2 {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - - - - -0 + + + + + + + 0 - - -{$grandstream_ldap_server} + + + {$grandstream_ldap_server} - - -389 + + + 389 - - - - -{$grandstream_ldap_base_dn} + + + + + {$grandstream_ldap_base_dn} - - -{$ldap_username} + + + {$grandstream_ldap_username} - - -{$ldap_password} + + + {$grandstream_ldap_password} - - - -{$grandstream_ldap_number_filter} + + + + {$grandstream_ldap_number_filter} - - - -{$grandstream_ldap_name_filter} + + + + {$grandstream_ldap_name_filter} - - - -3 + + + + 3 - - - -{$grandstream_ldap_name_attr} + + + + {$grandstream_ldap_name_attr} - - - -{$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_number_attr} - - -givenName sn title + + + {$grandstream_ldap_display_name} - - - - -50 + + + + + 50 - - - - -30 + + + + + 30 - - - -0 + + + + 0 - - -1 + + + 0 - -1 + + 0 - - -givenName sn title + + + givenName sn title - - - - - - -5004 + + + 0 - - - -200 + + + + + + + 5004 - - - -5204 + + + + 200 - - - -0 + + + + 0 - - - -20 + + + + 20 - - - + + + - - - + + + - - - + + + {if isset($public_mode) } {if $public_mode|strtolower == 'true'} -1 + 1 {elseif $public_mode|strtolower == 'yes'} -1 + 1 {elseif $public_mode == '1'} -1 + 1 {else} -0 + 0 {/if} {else} -0 + 0 {/if} - - - -0 - - - - - - - - - -30 + + + + 0 - - - -0 + + + - - - -0 + + + - - - -0 + + + + 0 - - - -0 + + + 0 - - - -0 + + + + + + + + + + - - - -1 + + + - - - -0 + + + - - - -0 + + + + 4320 - - - -0 + + + 100 - - - -0 + + + 100 - - - -0 + + + + 0 - - - -0 + + + + - - - + + + - - - -{if isset($grandstream_auto_attended_transfer) } -{$grandstream_auto_attended_transfer} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} {else} -1 + 1 {/if} - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -10 - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f1=440,f2=480,c=200/400; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440,c=10/10; - - - - -f1=440,f2=480,c=200/400; - - - - -f1=440,f2=440,c=25/525; - - - - -0 - - - - -f1=480,f2=620,c=50/50; - - - - -f1=480,f2=620,c=25/25; - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -{if isset($grandstream_handset_tx_gain) } -{$grandstream_handset_tx_gain} -{else} -0 -{/if} - - - - - - - - -100 - - - - -60 - - - - -5 - - - - -0 - - - - - - - - - - -0 - - - - -0 - - - - -1 - - - - - - - - - -{if isset($grandstream_wallpaper_url)} -1 -{$grandstream_wallpaper_url} -{else} -0 - -{/if} - - - -#000000 - - - - -0 - - - -0 - - - - -3 - - - - - - - - -0 - - - - - - - -0 - - - - -0 - - - - - - + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + {if isset($ntp_server_primary)} -{$ntp_server_primary} + {$ntp_server_primary} {else} -pool.ntp.org + pool.ntp.org {/if} - - - + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} - - - -1440 + + + + 1440 - - - - -1 + + + + + 1 - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {if isset($grandstream_timezone) } -{$grandstream_timezone} + {$grandstream_timezone} {elseif isset($grandstream_gxp_time_zone) } -{$grandstream_gxp_time_zone} + {$grandstream_gxp_time_zone} {else} -auto + auto {/if} - - - - -0 + + + + + 1 - - - - -PST+8PDT,M3.2.0,M11.1.0 + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - -3 + + + + + + + + + 0 - - - -0 + + + + 0 - - - - + + + + 0 - - - -1 + + + + + + + + 100 - - - -1 + + + + 60 + + + + + 1 + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + 1 + + + + + - - - - {if isset($grandstream_city_code)} -0 -{else} -1 + 0 {/if} - - - -{$grandstream_city_code} - - - - -15 - - - - -{if isset($grandstream_temp_unit)} -{$grandstream_temp_unit} -{else} -auto + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} {/if} - - - - -1 + + + + 15 - - - -CAD/USD;CAD/EUR;CAD/GBP;CAD/AUD;CAD/CNY;CAD/JPY - - - - - - - - - - -XMLApp - - - - - - - - -0 - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($grandstream_bluetooth_power)} -{$grandstream_bluetooth_power} + + + +{if isset ($grandstream_temp_unit)} + {$grandstream_temp_unit} {/if} - - - -{if isset($grandstream_bluetooth_handsfree)} -{$grandstream_bluetooth_handsfree} -{/if} + + + + + + - - - + + + XMLApp + + + - - - - - - - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + 0 - - - - - - - - - - - - - + + + + 0 - - - + + + + + 1 - - + + + + 0 - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 0 - + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - {$fixed_keys=4} {if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} {if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} @@ -6429,20 +8342,10 @@ {/if} {/for} - - - - - - - - - - - + {$start_id=23800} -{for $line=7 to 32} +{for $line=7 to 48} {$pid=($line-6)*4-4} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} @@ -6465,78 +8368,3777 @@ {/if} {/for} + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + - - + + + - - + + + -{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>17]} -{$start_id=2987} -{for $prog=1 to 3} -{$pid=$prog*4-4} -{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} -{$key_types[$keys.programmable.$prog.device_key_type]} -{$keys.programmable.$prog.device_key_line} -{$keys.programmable.$prog.device_key_label} -{$keys.programmable.$prog.device_key_value} -{else} -0 -0 - - -{/if} + + + + -{/for} + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - - + + + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=323} {for $mem=1 to 7} {$pid=$mem*3-3} {if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + {$key_types[$keys.memory.$mem.device_key_type]} + + {$keys.memory.$mem.device_key_line} + + {$keys.memory.$mem.device_key_label} + + {$keys.memory.$mem.device_key_value} {else} -1 @@ -6564,6 +12166,7 @@ {/for} + {$start_id=1440} {for $mem=19 to 24} {$pid=($mem-18)*4-4} @@ -6581,34 +12184,868 @@ {/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + {if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} - - - - - - - - - - - - - - - - - - - - - - - - - - - {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=23000} @@ -6628,5 +13065,3999 @@ {/for} {/if} - + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml index cfab6db5b8..af9b254ed2 100644 --- a/resources/templates/provision/grandstream/gxp2160/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2160/{$mac}.xml @@ -1,6401 +1,8314 @@ - + + {$mac|replace:'-':''} - - - - + + + + - - - - - - - - - - - - -{if isset($user_password_1)} -1 + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_primary} + + + + {$account.1.outbound_proxy_secondary} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} {else} -0 + 0 {/if} - - -{$display_name_1} + + + + 0 - - -{$server_address_1} + + + - - -{$secondary_server_address_1} + + + - - -{$outbound_proxy_1} + + + - - -{$outbound_proxy_secondary_1} - - - - - - - -{$user_id_1} - - - -{$auth_id_1} - - - -{$user_password_1} - - - -{$display_name_1} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode_1) } -{$grandstream_dns_mode_1} + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} {else} -0 + 0 {/if} - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 1 - - - -{if isset($nat_traversal_1) } -{$nat_traversal_1} -{else} -0 -{/if} + + + + 0 - - - + + + + {$account.1.register_expires} - - - - - - -0 + + + + 60 - - - -1 + + + + 0 - - - -0 + + + + 0 - - - -3 + + + + 30 - - - -60 + + + + 30 - - - -0 + + + + 5060 - - - -5060 + + + + 20 - - - -20 + + + + + 50 - - - - -50 + + + + + 400 - - - - -400 + + + + 0 - - - + + + {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 - - - -1 + + + + + 0 - - - -0 + + + + 1 - - - -0 + + + + 0 - - - -1 + + + + 0 - - - + + + + 1 + + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -123 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_1)||$grandstream_account_ring_tone_1==0} -{$grandstream_account_ring_tone_1} -{/if} - - - - -{if isset($grandstream_ring_tone_caller_id_1_1)} -{$grandstream_ring_tone_caller_id_1_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_1_1)||$grandstream_ring_tone_1_1==0} -{$grandstream_ring_tone_1_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_2_1)} -{$grandstream_ring_tone_caller_id_2_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_2_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_2_1} -{/if} - - - -{if isset($grandstream_ring_tone_caller_id_3_1)} -{$grandstream_ring_tone_caller_id_3_1} -{/if} - - - - - -{if isset($grandstream_ring_tone_3_1)||$grandstream_ring_tone_2_1==0} -{$grandstream_ring_tone_3_1} -{/if} - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -1 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -0 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - -20 - - - - - - - - - - -{if isset($user_password_2)} -1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_2} + + + + + 0 - - -{$server_address_2} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_2} + + + + 0 - - -{$outbound_proxy_secondary_2} + + + + 1 - - - + + + + + 2 - - -{$user_id_2} + + + + 2 - - -{$auth_id_2} + + + + 1 - - -{$user_password_2} + + + + 0 - - -{$display_name_2} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_2) } -{$grandstream_dns_modee_2} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + + 0 - - - + + + + 0 - - - -{if isset($nat_traversal_2) } -{$nat_traversal_2} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.2.display_name} - - - - - - -0 + + + {$account.2.server_address} - - - -1 + + + {$account.2.server_address_secondary} - - - -0 + + + {$account.2.outbound_proxy} - - - -3 + + + {$account.2.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.2.user_id} - - - -5062 + + + {$account.2.auth_id} - - - -20 + + + {$account.2.password} - - - - -50 + + + {$account.2.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_2)||$grandstream_account_ring_tone_2==0} -{$grandstream_account_ring_tone_2} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*79 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_3)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_3} + + + + + 0 - - -{$server_address_3} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_3} + + + + 0 - - -{$outbound_proxy_secondary_3} + + + + 1 - - - + + + + + 2 - - -{$user_id_3} + + + + 2 - - -{$auth_id_3} + + + + 1 - - -{$user_password_3} + + + + 0 - - -{$display_name_3} + + + + 1 - - -*97 + + + + 97 - - - - - - -{if isset($grandstream_dns_modee_3) } -{$grandstream_dns_modee_3} + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} - - - + + + ring1 - - - -{if isset($nat_traversal_3) } -{$nat_traversal_3} + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.3.display_name} - - - - - - -0 + + + {$account.3.server_address} - - - -1 + + + {$account.3.server_address_secondary} - - - -0 + + + {$account.3.outbound_proxy} - - - -3 + + + {$account.3.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.3.user_id} - - - -5064 + + + {$account.3.auth_id} - - - -20 + + + {$account.3.password} - - - - -50 + + + {$account.3.display_name} + + + + *97 - - - - -400 + + + + 0 - - - + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_3)||$grandstream_account_ring_tone_3==0} -{$grandstream_account_ring_tone_3} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_4)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_4} + + + + + 0 - - -{$server_address_4} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_4} + + + + 0 - - -{$outbound_proxy_secondary_4} + + + + 2 - - - + + + + 1 - - -{$user_id_4} + + + + 0 - - -{$auth_id_4} + + + + 1 - - -{$user_password_4} + + + + 97 - - -{$display_name_4} + + + + 1 - - -*97 + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_4) } -{$grandstream_dns_modee_4} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} - - - + + + - - - -{if isset($nat_traversal_4) } -{$nat_traversal_4} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.4.display_name} - - - - - - -0 + + + {$account.4.server_address} - - - -1 + + + {$account.4.server_address_secondary} - - - -0 + + + {$account.4.outbound_proxy} - - - -3 + + + {$account.4.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.4.user_id} - - - -5066 + + + {$account.4.auth_id} - - - -20 + + + {$account.4.password} - - - - -50 + + + {$account.4.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_4)||$grandstream_account_ring_tone_4==0} -{$grandstream_account_ring_tone_4} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_5)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_5} + + + + + 0 - - -{$server_address_5} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_5} + + + + 0 - - -{$outbound_proxy_secondary_5} + + + + 2 - - - + + + + 1 - - -{$user_id_5} + + + + 0 - - -{$auth_id_5} + + + + 1 - - -{$user_password_5} + + + + 97 - - -{$display_name_5} + + + + 1 - - -*97 + + + + + 2 - - - - - - -{if isset($grandstream_dns_modee_5) } -{$grandstream_dns_modee_5} + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} - - - + + + - - - -{if isset($nat_traversal_5) } -{$nat_traversal_5} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 {else} -0 + 0 {/if} - - - + + + {$account.5.display_name} - - - - - - -0 + + + {$account.5.server_address} - - - -1 + + + {$account.5.server_address_secondary} - - - -0 + + + {$account.5.outbound_proxy} - - - -3 + + + {$account.5.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.5.user_id} - - - -5068 + + + {$account.5.auth_id} - - - -20 + + + {$account.5.password} - - - - -50 + + + {$account.5.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 - - - + + + {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_5)||$grandstream_account_ring_tone_5==0} -{$grandstream_account_ring_tone_5} -{/if} - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_6)} -1 + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} {else} -0 + 0 {/if} - - -{$display_name_6} + + + + + 0 - - -{$server_address_6} + + + + + 0 - - - + + + + 0 - - -{$outbound_proxy_6} + + + + 0 - - -{$outbound_proxy_secondary_6} + + + + 2 - - - + + + + 1 - - -{$user_id_6} + + + + 0 - - -{$auth_id_6} + + + + 1 - - -{$user_password_6} + + + + 97 - - -{$display_name_6} + + + + 1 - - -*97 + + + + 2 + + + + + 0 - - - - - - -{if isset($grandstream_dns_modee_6) } -{$grandstream_dns_modee_6} + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} {else} -0 + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} {/if} - - - -0 + + + mpk - - - + + + + 0 - - - + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} - - - + + + - - - -{if isset($nat_traversal_6) } -{$nat_traversal_6} + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 {else} -0 + 0 {/if} - - - - + + + {$account.6.display_name} - - - - - - -0 + + + {$account.6.server_address} - - - -1 + + + {$account.6.server_address_secondary} - - - -0 + + + {$account.6.outbound_proxy} - - - -3 + + + {$account.6.outbound_proxy_secondary} - - - -60 + + + - - - -0 + + + {$account.6.user_id} - - - -5070 + + + {$account.6.auth_id} - - - -20 + + + {$account.6.password} - - - - -50 + + + {$account.6.display_name} - - - - -400 + + + *97 - - - + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + {$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} -{$tp} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} - - - - -0 + + + + + 0 - - - -1 + + + + 1 - - - -0 + + + + 0 - - - -0 + + + + 0 - - - -1 + + + + 1 + + + + - - - {if isset($subscribe_mwi)} -1 + 1 {else} -0 + 0 {/if} - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{ x+ | *x+ | *xx | *xxx | *xxxx | *xxxxx | *xxxxxx | **xx | **xxx | **xxxx | **xxxxx | **xxxxxx | **xxxxxxx | **xxxxxxxx | *xx*x+ | \+x+ | \p\a\r\k\+*x+ } - - - - -0 - - - - -{if isset($grandstream_account_ring_tone_6)||$grandstream_account_ring_tone_6==0} -{$grandstream_account_ring_tone_6} + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 {/if} - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - -4 - - - - -1 - - - - -0 - - - - - - - -1 - - - -*78 - - - -*79 - - - -*72 - - - -*73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - + + + + + + 192 - - - - + + 168 - - - + + 1 - - - - - - + + 102 - - + + + 255 - - + + 255 - - + + 0 - - - + + 0 - - + + + 192 - - + + 168 - - + + 2 - - - + + 1 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + 0 - - + + 0 - - + + 0 - - - + + 0 - - + + + + 0 - - + + + 0 - - + + - - - -0 + + - - -0 + + - - + + + - - + + + - - + + + - - - + + + - - - + + + + 0 - - - + + + - - - + + + - - - -0 + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - -26 + + + + 26 - - - -46 + + + + 46 - - - -0 + + + + 0 - - - + + + + 0 + + + + {if isset($grandstream_lan_port_vlan) } -{$grandstream_lan_port_vlan} + {$grandstream_lan_port_vlan} {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - -0 + + + + 0 - - - + + + {if isset($grandstream_pc_port_vlan) } -{$grandstream_pc_port_vlan} + {$grandstream_pc_port_vlan} {else} -1 + 0 {/if} - - - -0 - - - -1 + + + + 0 - - - -30 + + + + 1 - - - -0 + + + + 1 - - - - - - -0 + + + + 30 - - - + + + + 1500 - - - -1194 + + + + 0 - - - -0 + + + + + + + 1 - - - + + + + 1 - - -{$user_password} + + + - - -{$admin_password} + + + + 0 - - - + + + + + + + 0 - - - - - - -0 + + + + 0 - - - + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} - - + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if $admin_password=="none"} + +{elseif isset($admin_password)} + {$admin_password} +{else} + adminadmin +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + {$http_auth_username} - - + + {$http_auth_password} - - - -0 + + + - - - -2 + + + - - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 {else} -{$domain_name}{$project_path}/app/provision + {$domain_name}{$project_path}/app/provision {/if} - - + + + -{if $grandstream_config_server_path=="none"} - -{elseif isset($grandstream_config_server_path)} -{$grandstream_config_server_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} + + + - - - + + + - - - + + + - - - + + + + + + + 0 - - - + + + {$grandstream_syslog_server} - - - - -1 - - - - -0 - - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -10080 - - - -1 - - - -1 - - - - -0 - - - - -0 - - - - - - -{$grandstream_syslog_server} - - - - - + + + {if isset($grandstream_syslog_level)} -{$grandstream_syslog_level} + {$grandstream_syslog_level} {else} -0 + 0 {/if} - - - + + + + + + + {if isset($grandstream_send_sip_log)} -{$grandstream_send_sip_log} + {$grandstream_send_sip_log} {else} -0 + 0 {/if} - - - -1 + + + + 0 - - - - - - - - - - - - - - -Auto + + + + 1 - - -0 + + + + 0 - - - -0 + + + + + + + + + + + + + + + Auto - - - - - - + + + 0 - - - + + + + 0 - - - + + + + + + - - - -0 + + + - - -86400 + + + - - - + + + + 0 - - - + + + 86400 - - -0 + + + - - - + + + - - - + + + 7547 - - - - - - -0 + + + - - - -0 + + + - - - + + + + 0 - - - + + + + + + + 0 - - - + + + + 0 - - - + + + - - - -1 + + + - - -0 + + + - - - -80 + + + + 1 - - - -443 + + + + 1 - - -5 + + + + 80 - - - + + + + 443 - - - - - - -0 + + + 1 - - - - - - -0 + + + 5 - - - - - - + + + 20 - - - - - - + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + {if isset($contact_grandstream)} -1 + 1 {else} -0 + 0 {/if} - - - - - - + + + - - - - + + + + + + + + {if isset($contact_grandstream)} -{$grandstream_phonebook_xml_server_path}{$mac}/ + {$grandstream_phonebook_xml_server_path}{$mac}/ {elseif isset($grandstream_phonebook_xml_server_path)} -{$grandstream_phonebook_xml_server_path} + {$grandstream_phonebook_xml_server_path} {else} - + {/if} - - - - + + + {if isset($grandstream_phonebook_download_interval)} -{$grandstream_phonebook_download_interval} + {$grandstream_phonebook_download_interval} {else} -0 + 0 {/if} - - - -1 + + + + 1 - - - -1 + + + + 0 - - - + + + + 0 + + + + {if isset($contact_grandstream)} -2 + 2 {else} -0 + 0 {/if} - - - -0 + + + + 0 - - - - - - -0 + + + + + + + 0 - - -{$grandstream_ldap_server} + + + {$grandstream_ldap_server} - - -389 + + + 389 - - - - -{$grandstream_ldap_base_dn} + + + + + {$grandstream_ldap_base_dn} - - -{$ldap_username} + + + {$grandstream_ldap_username} - - -{$ldap_password} + + + {$grandstream_ldap_password} - - - -{$grandstream_ldap_number_filter} + + + + {$grandstream_ldap_number_filter} - - - -{$grandstream_ldap_name_filter} + + + + {$grandstream_ldap_name_filter} - - - -3 + + + + 3 - - - -{$grandstream_ldap_name_attr} + + + + {$grandstream_ldap_name_attr} - - - -{$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_number_attr} - - -givenName sn title + + + {$grandstream_ldap_display_name} - - - - -50 + + + + + 50 - - - - -30 + + + + + 30 - - - -0 + + + + 0 - - -1 + + + 0 - -1 + + 0 - - -givenName sn title + + + givenName sn title - - - - - - -5004 + + + 0 - - - -200 + + + + + + + 5004 - - - -5204 + + + + 200 - - - -0 + + + + 0 - - - -20 + + + + 20 - - - + + + - - - + + + - - - + + + {if isset($public_mode) } {if $public_mode|strtolower == 'true'} -1 + 1 {elseif $public_mode|strtolower == 'yes'} -1 + 1 {elseif $public_mode == '1'} -1 + 1 {else} -0 + 0 {/if} {else} -0 + 0 {/if} - - - -0 - - - - - - - - - -30 + + + + 0 - - - -0 + + + - - - -0 + + + - - - -0 + + + + 0 - - - -0 + + + 0 - - - -0 + + + + + + + + + + - - - -1 + + + - - - -0 + + + - - - -0 + + + + 4320 - - - -0 + + + 100 - - - -0 + + + 100 - - - -0 + + + + 0 - - - -0 + + + + - - - + + + - - - -{if isset($grandstream_auto_attended_transfer) } -{$grandstream_auto_attended_transfer} + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} {else} -1 + 1 {/if} - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - -0 - - - - -10 - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -f1=440,f2=480,c=200/400; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440,c=10/10; - - - - -f1=440,f2=480,c=200/400; - - - - -f1=440,f2=440,c=25/525; - - - - -0 - - - - -f1=480,f2=620,c=50/50; - - - - -f1=480,f2=620,c=25/25; - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -{if isset($grandstream_handset_tx_gain) } -{$grandstream_handset_tx_gain} -{else} -0 -{/if} - - - - - - - - -100 - - - - -60 - - - - -5 - - - - -0 - - - - - - - - - - -0 - - - - -0 - - - - -1 - - - - - - - - - -{if isset($grandstream_wallpaper_url)} -1 -{$grandstream_wallpaper_url} -{else} -0 - -{/if} - - - -#000000 - - - - -0 - - - -0 - - - - -3 - - - - - - - - -0 - - - - - - - -0 - - - - -0 - - - - - - + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + {if isset($ntp_server_primary)} -{$ntp_server_primary} + {$ntp_server_primary} {else} -pool.ntp.org + pool.ntp.org {/if} - - - + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} - - - -1440 + + + + 1440 - - - - -1 + + + + + 1 - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + {if isset($grandstream_timezone) } -{$grandstream_timezone} + {$grandstream_timezone} {elseif isset($grandstream_gxp_time_zone) } -{$grandstream_gxp_time_zone} + {$grandstream_gxp_time_zone} {else} -auto + auto {/if} - - - - -0 + + + + + 1 - - - - -PST+8PDT,M3.2.0,M11.1.0 + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - -3 + + + + + + + + + 0 - - - -0 + + + + 0 - - - - + + + + 0 - - - -1 + + + + + + + + 100 - - - -1 + + + + 60 + + + + + 1 + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + 1 + + + + + - - - - {if isset($grandstream_city_code)} -0 -{else} -1 + 0 {/if} - - - -{$grandstream_city_code} - - - - -15 - - - - -{if isset ($grandstream_temp_unit)} -{$grandstream_temp_unit} -{else} -auto + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} {/if} - - - - -1 + + + + 15 - - - -CAD/USD;CAD/EUR;CAD/GBP;CAD/AUD;CAD/CNY;CAD/JPY - - - - - - - - - - -XMLApp - - - - - - - - -0 - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($grandstream_bluetooth_power)} -{$grandstream_bluetooth_power} + + + +{if isset ($grandstream_temp_unit)} + {$grandstream_temp_unit} {/if} - - - -{if isset($grandstream_bluetooth_handsfree)} -{$grandstream_bluetooth_handsfree} -{/if} + + + + + + - - - + + + XMLApp + + + - - - - - - - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + 0 - - - - - - - - - - - - - + + + + 0 - - - + + + + + 1 - - + + + + 0 - - + + + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 0 - + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - {$fixed_keys=4} {if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} {if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} @@ -6429,20 +8342,10 @@ {/if} {/for} - - - - - - - - - - - + {$start_id=23800} -{for $line=7 to 32} +{for $line=7 to 48} {$pid=($line-6)*4-4} {if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} {if $line <= $fixed_keys} @@ -6465,78 +8368,3777 @@ {/if} {/for} + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + - - + + + - - + + + -{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>17]} -{$start_id=2987} -{for $prog=1 to 3} -{$pid=$prog*4-4} -{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} -{$key_types[$keys.programmable.$prog.device_key_type]} -{$keys.programmable.$prog.device_key_line} -{$keys.programmable.$prog.device_key_label} -{$keys.programmable.$prog.device_key_value} -{else} -0 -0 - - -{/if} + + + + -{/for} + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - - + + + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=323} {for $mem=1 to 7} {$pid=$mem*3-3} {if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + {$key_types[$keys.memory.$mem.device_key_type]} + + {$keys.memory.$mem.device_key_line} + + {$keys.memory.$mem.device_key_label} + + {$keys.memory.$mem.device_key_value} {else} -1 @@ -6564,6 +12166,7 @@ {/for} + {$start_id=1440} {for $mem=19 to 24} {$pid=($mem-18)*4-4} @@ -6581,34 +12184,868 @@ {/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + {if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} - - - - - - - - - - - - - - - - - - - - - - - - - - - {assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} {$start_id=23000} @@ -6628,5 +13065,3999 @@ {/for} {/if} - + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml index 56983d5047..cb8e5eebc1 100644 --- a/resources/templates/provision/grandstream/gxp2170/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2170/{$mac}.xml @@ -1,7660 +1,17063 @@ - - - -{$mac|replace:'-':''} - - - - - - - - - - - - - - - - - - -1 - - - -{$display_name_1} - - - -{$server_address_1} - - - -{$secondary_server_address_1} - - - -{$outbound_proxy_1} - - - - - - - - - - - -{$user_id_1} - - - -{$auth_id_1} - - - -{$user_password_1} - - - -{$display_name_1} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_1} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5060 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -0 - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - -ring1 - - - - - -1 - - - -ring2 - - - - - -2 - - - -ring - - - - - -3 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -30 - - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -20 - - - - - - - - - - -{if isset($user_password_2)} -1 -{else} -0 -{/if} - - - -{$display_name_2} - - - -{$server_address_2} - - - - - - - -{$outbound_proxy_2} - - - - - - - - - - - -{$user_id_2} - - - -{$auth_id_2} - - - -{$user_password_2} - - - -{$display_name_2} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_2} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5062 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -0 - - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -2 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -123 - - - - -101 - - - - -0 - - - - -1 - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -30 - - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_3)} -1 -{else} -0 -{/if} - - - -{$display_name_3} - - - -{$server_address_3} - - - - - - - -{$outbound_proxy_3} - - - - - - - - - - - -{$user_id_3} - - - -{$auth_id_3} - - - -{$user_password_3} - - - -{$display_name_3} - - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_3} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5064 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -30 - - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_4)} -1 -{else} -0 -{/if} - - - -{$display_name_4} - - - -{$server_address_4} - - - - - - - -{$outbound_proxy_4} - - - - - - - - - - - -{$user_id_4} - - - -{$auth_id_4} - - - -{$user_password_4} - - - -{$display_name_4} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_4} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5066 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -30 - - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_5)} -1 -{else} -0 -{/if} - - - -{$display_name_5} - - - -{$server_address_5} - - - - - - - -{$outbound_proxy_5} - - - - - - - - - - - -{$user_id_5} - - - -{$auth_id_5} - - - -{$user_password_5} - - - -{$display_name_5} - - - -*97 - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_5} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5068 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -30 - - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($user_password_6)} -1 -{else} -0 -{/if} - - - -{$display_name_6} - - - -{$server_address_6} - - - - - - - -{$outbound_proxy_6} - - - - - - - - - - - -{$user_id_6} - - - -{$auth_id_6} - - - -{$user_password_6} - - - -{$display_name_6} - - - -*97 - - - - - - - - -{if isset($grandstream_dns_mode)} -{$grandstream_dns_mode} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - -{if isset($grandstream_nat_traversal)} -{$grandstream_nat_traversal} -{else} -0 -{/if} - - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -{$register_expires_6} - - - - -60 - - - - -0 - - - - -0 - - - - -30 - - - - -30 - - - - -5070 - - - - -20 - - - - - -50 - - - - - -400 - - - - -{$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} -{$tp} - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - -1 - - - - -{if isset($subscribe_mwi)} -1 -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - -0 - - - - - -0 - - - - - -0 - - - - - - - - - -0 - - - - - -0 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - -1 - - - - - - - -15 - - - - - - - - -0 - - - - - - - - - - - - -0 - - - - -** - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -100 - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - -1 - - - - -180 - - - - -90 - - - - -0 - - - - - -0 - - - - - -0 - - - - -0 - - - - -1 - - - - - -0 - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -1 - - - - -0 - - - - - - - -0 - - - - -1 - - - - -0 - - - - -123 - - - - -101 - - - - - - -0 - - - - -8 - - - - -4 - - - - -18 - - - - -9 - - - - -98 - - - - -2 - - - - -125 - - - - -0 - - - - -1 - - - - - -0 - - - - - -{if isset($grandstream_srtp)} -{$grandstream_srtp} -{else} -0 -{/if} - - - - - -0 - - - - - -0 - - - - -0 - - - - -0 - - - - -2 - - - - -1 - - - - -0 - - - - -1 - - - - -97 - - - - -1 - - - - -2 - - - - - -0 - - - - -250 - - - - - - - -0 - - - - - - - - -{$grandstream_dial_plan} - - - - -0 - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - -60 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -30 - - - -4 - - - - -1 - - - - -0 - - - - -1 - - - - - - - - - -0 - - - - -0 - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -192 - - -168 - - -0 - - -160 - - - -255 - - -255 - - -0 - - -0 - - - -0 - - -0 - - -0 - - -0 - - - -0 - - -0 - - -0 - - -0 - - - -0 - - -0 - - -0 - - -0 - - - -0 - - -0 - - -0 - - -0 - - - - -0 - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -26 - - - - -46 - - - - -0 - - - - -{if isset($grandstream_lan_port_vlan) } -{$grandstream_lan_port_vlan} -{else} -0 -{/if} - - - - -0 - - - - -0 - - - - -{if isset($grandstream_pc_port_vlan) } -{$grandstream_pc_port_vlan} -{else} -0 -{/if} - - - - -0 - - - - -1 - - - - -1 - - - - -30 - - - - -1500 - - - - - - - - -0 - - - - -0 - - - - - - - - -{if isset($grandstream_bluetooth_power)} -{$grandstream_bluetooth_power} -{else} -0 -{/if} - - - - -{if isset($grandstream_bluetooth_handsfree)} -{$grandstream_bluetooth_handsfree} -{else} -0 -{/if} - - - - - - - - - - - -0 - - - - - - - - -1194 - - - - -0 - - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - -{$user_password} - - - -{$admin_password} - - - - - - - - - - - -0 - - - - -0 - - - - - -1 - - - - -0 - - - - - -0 - - - - -1 - - - - - - - - - -1 - - - - -60 - - - -1 - - - -1 - - - - -0 - - - - - -2 - - - -{if $grandstream_config_server_path=="none"} - -{elseif isset($grandstream_config_server_path)} -{$grandstream_config_server_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} - - - -{$http_auth_username} - - - -{$http_auth_password} - - - - - - - - - - - - - - - - -0 - - - - - -2 - - - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} -{else} -{$domain_name}{$project_path}/app/provision -{/if} - - - - - - - - - - - - - - - - - - - - - - - -0 - - - -{$grandstream_syslog_server} - - - - -{if isset($grandstream_syslog_level)} -{$grandstream_syslog_level} -{else} -0 -{/if} - - - - - - - - -{if isset($grandstream_send_sip_log)} -{$grandstream_send_sip_log} -{else} -0 -{/if} - - - - -0 - - - - -1 - - - - -0 - - - - - - - - - - - - - - - -Auto - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - -0 - - - -86400 - - - - - - - - - - - -7547 - - - - - - - - - - - - - - - -0 - - - - - - - - - - - - - - - - -1 - - - - -80 - - - - -443 - - - -0 - - - -5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - -0 - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - -{if isset($contact_grandstream)} -1 -{else} -0 -{/if} - - - - - - - - - - - - - -{if isset($contact_grandstream)} -{$grandstream_phonebook_xml_server_path}{$mac}/ -{elseif isset($grandstream_phonebook_xml_server_path)} -{$grandstream_phonebook_xml_server_path} -{else} - -{/if} - - - - -{if isset($grandstream_phonebook_download_interval)} -{$grandstream_phonebook_download_interval} -{else} -0 -{/if} - - - - -1 - - - - -0 - - - - -{if isset($contact_grandstream)} -2 -{else} -0 -{/if} - - - - -0 - - - - - - - -0 - - - -{$grandstream_ldap_server} - - - -389 - - - - - -{$grandstream_ldap_base_dn} - - - -{$grandstream_ldap_username} - - - -{$grandstream_ldap_password} - - - - -{$grandstream_ldap_number_filter} - - - - -{$grandstream_ldap_name_filter} - - - - -3 - - - - -{$grandstream_ldap_name_attr} - - - - -{$grandstream_ldap_number_attr} - - - -{$grandstream_ldap_display_name} - - - - - -50 - - - - - -30 - - - - -0 - - - -0 - - -0 - - - -givenName sn title - - - - - - - -5004 - - - - -200 - - - - -5204 - - - - -0 - - - - -20 - - - - - - - - - - - - -{if isset($public_mode) } - {if $public_mode|strtolower == 'true'} - 1 - {elseif $public_mode|strtolower == 'yes'} - 1 - {elseif $public_mode == '1'} - 1 - {else} - 0 - {/if} -{else} -0 -{/if} - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - --1 - - - - - -0 - - - - - - - - - - - - - - - - - - - - -0 - - - - -1 - - - - -1 - - - - - - - -0 - - - - -30 - - - - -0 - - - - -5 - - - - -0 - - - - -10 - - - - -20 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - -{if isset($grandstream_auto_attended_transfer) } -{$grandstream_auto_attended_transfer} -{else} -1 -{/if} - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - -0 - - - - -0 - - - - -10 - - - - -0 - - - - - - - - - - - - - - -0 - - - - -1 - - - - -0 - - - - -0 - - - - - - - - - - - -0 - - - - - - -0 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - -0 - - - - - - -{if isset($ntp_server_primary)} -{$ntp_server_primary} -{else} -pool.ntp.org -{/if} - - - -{if isset($ntp_server_secondary)} -{$ntp_server_secondary} -{else} - -{/if} - - - - -1440 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{if isset($grandstream_timezone) } -{$grandstream_timezone} -{elseif isset($grandstream_gxp_time_zone) } -{$grandstream_gxp_time_zone} -{else} -auto -{/if} - - - - - -1 - - - - -MTZ+6MDT+5,M4.1.0,M11.1.0 - - - - - - - - - -3 - - - - -0 - - - - -0 - - - - - - - - -100 - - - - -60 - - - - -1 - - - - -0 - - - - - - - - - - -{if isset($grandstream_wallpaper_url)} -1 -{$grandstream_wallpaper_url} -{else} -0 - -{/if} - - - -#000000 - - - - -{if isset($grandstream_screensaver)} -{$grandstream_screensaver} -{else} -1 -{/if} - - - - -{if isset($grandstream_screensaver_source)} -{$grandstream_screensaver_source} -{else} -0 -{/if} - - - - -{if isset($grandstream_screensaver_show_date_time)} -{$grandstream_screensaver_show_date_time} -{else} -1 -{/if} - - - - -{if isset($grandstream_screensaver_timeout)} -{$grandstream_screensaver_timeout} -{else} -5 -{/if} - - - -{if isset($grandstream_screensaver_server_path)} -{$grandstream_screensaver_server_path} -{else} - -{/if} - - - - -{if isset($grandstream_screensaver_xml_download_interval)} -{$grandstream_screensaver_xml_download_interval} -{else} -0 -{/if} - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - -f1=440,f2=480,c=200/400; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440; - - - - -f1=350,f2=440,c=10/10; - - - - -f1=440,f2=480,c=200/400; - - - - -f1=440,f2=440,c=25/525; - - - - -0 - - - - -f1=480,f2=620,c=50/50; - - - - -f1=480,f2=620,c=25/25; - - - - - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - -1 - - - - -1 - - - - - -{if isset($grandstream_city_code)} -0 -{else} -1 -{/if} - - - - -{$grandstream_city_code} - - - - -15 - - - - -{if isset ($grandstream_temp_unit)} -{$grandstream_temp_unit} -{else} -auto -{/if} - - - - - -1 - - - - -EUR/USD;GBP/USD;CAD/USD;AUD/USD;CNY/USD;JPY/USD - - - - - - - - - - -XMLApp - - - - - - - - -0 - - - - - - - - - - - -0 - - - - -0 - - - - - -1 - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - -{$fixed_keys=4} -{if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} -{if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} -{if $template == "grandstream/gxp2160"}{$fixed_keys=6}{/if} -{if $template == "grandstream/gxp2170"}{$fixed_keys=12}{/if} -{if $template == "grandstream/gxp2135"}{$fixed_keys=8}{/if} - -{$start_id=1363} -{assign var=key_types value=["none"=>-1,"line"=>0,"shared line"=>1,"speed dial"=>10, "blf"=>11, "presence watcher"=>12, "eventlist blf"=>13,"speed dial active"=>14,"dial dtmf"=>15,"voicemail"=>16,"call return"=>17,"transfer"=>18,"call park"=>19,"intercom"=>20,"ldap search"=>21,"multicast paging"=>23,"record"=>24,"call log"=>25,"monitored call park"=>26,"menu"=>27]} - -{for $line=1 to 6} -{$pid=$line*2-2} -{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} -{if $line <= $fixed_keys} -{$key_types[$keys.line.$line.device_key_type]} -{else} -{$key_types[$keys.line.$line.device_key_type]-10} -{/if} -{$keys.line.$line.device_key_line} -{$keys.line.$line.device_key_label} -{$keys.line.$line.device_key_value} -{else} -{if $line <= $fixed_keys} -0 -{$line-1} - - -{else} --1 -{/if} -{/if} - -{/for} - - -{$start_id=23800} -{for $line=7 to 48} -{$pid=($line-6)*4-4} -{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} -{if $line <= $fixed_keys} -{$key_types[$keys.line.$line.device_key_type]} -{else} -{$key_types[$keys.line.$line.device_key_type]-10} -{/if} -{$keys.line.$line.device_key_line} -{$keys.line.$line.device_key_label} -{$keys.line.$line.device_key_value} -{else} -{if $line <= $fixed_keys} --1 -0 - - -{else} --1 -{/if} -{/if} - -{/for} - - - - - - - - - -{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} -{$start_id=323} -{for $mem=1 to 7} -{$pid=$mem*3-3} -{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} - - - - - - - - -{$key_types[$keys.memory.$mem.device_key_type]} - - - -{$keys.memory.$mem.device_key_line} - - -{$keys.memory.$mem.device_key_label} - - -{$keys.memory.$mem.device_key_value} -{else} --1 -0 - - -{/if} - -{/for} - -{$start_id=353} -{for $mem=8 to 18} -{$pid=($mem-7)*4-4} -{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} -{$key_types[$keys.memory.$mem.device_key_type]} -{$keys.memory.$mem.device_key_line} -{$keys.memory.$mem.device_key_label} -{$keys.memory.$mem.device_key_value} -{else} --1 -0 - - -{/if} - -{/for} - - -{$start_id=1440} -{for $mem=19 to 24} -{$pid=($mem-18)*4-4} -{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} -{$key_types[$keys.memory.$mem.device_key_type]} -{$keys.memory.$mem.device_key_line} -{$keys.memory.$mem.device_key_label} -{$keys.memory.$mem.device_key_value} -{else} --1 -0 - - -{/if} - -{/for} - - - - - - - - - - -0 - - - - - -1 - - - - - -0 - - - - -0 - - - - - - - - -BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target - - - -BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target - - - -Answer,Reject,Forward,ReConf - - - -BTOnOff,EndCall,ReConf,ConfRoom,ConfCall - - - - - BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark - - - -BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add - - - -ReConf,Resume,HoldTrnf,ConfCall,Add - - - -EndCall,ReConf,ConfRoom - - - -BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target - - - -BTOnOff,Cancel,Dial,Backspace,Target - - - - - - - - - - - - - -{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} -{$start_id=2987} -{for $prog=1 to 3} -{$pid=$prog*4-4} -{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} -{$key_types[$keys.programmable.$prog.device_key_type]} -{$keys.programmable.$prog.device_key_line} -{$keys.programmable.$prog.device_key_label} -{$keys.programmable.$prog.device_key_value} -{else} -0 -0 - - -{/if} - -{/for} - - - - - - - - - - - - -0 - - - - -0 - - - - - - - - - - - - - - - - - - - - - - - - - - -{if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} - -{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} -{$start_id=23000} -{for $exp=1 to 160} -{$pid=$exp*5-5} -{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} -{$key_types[$keys.expansion.$exp.device_key_type]} -{$keys.expansion.$exp.device_key_line} -{$keys.expansion.$exp.device_key_label} -{$keys.expansion.$exp.device_key_value} -{else} --1 -0 - - -{/if} - -{/for} -{/if} - - - - + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + 1 + + + + {$account.1.display_name} + + + + {$account.1.server_address} + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_primary} + + + + {$account.1.outbound_proxy_secondary} + + + + + + + + {$account.1.user_id} + + + + {$account.1.auth_id} + + + + {$account.1.password} + + + + {$account.1.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + +{if isset($grandstream_account_ring_tone_1)} + {$grandstream_account_ring_tone_1} +{/if} + + + + ring1 + + + + + + 5 + + + + ring2 + + + + + + 2 + + + + ring3 + + + + + + 3 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + + + + + + + + + + +{if isset($account.2.password)} + 1 +{else} + 0 +{/if} + + + + {$account.2.display_name} + + + + {$account.2.server_address} + + + + {$account.2.server_address_secondary} + + + + {$account.2.outbound_proxy} + + + + {$account.2.outbound_proxy_secondary} + + + + + + + + {$account.2.user_id} + + + + {$account.2.auth_id} + + + + {$account.2.password} + + + + {$account.2.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.2.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5060 + + + + + 20 + + + + + + 100 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 2 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 123 + + + + + 101 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_2)} + {$grandstream_account_ring_tone_2} +{/if} + + + + ring1 + + + + + + 0 + + + + ring2 + + + + + + 0 + + + + ring3 + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.3.password)} + 1 +{else} + 0 +{/if} + + + + {$account.3.display_name} + + + + {$account.3.server_address} + + + + {$account.3.server_address_secondary} + + + + {$account.3.outbound_proxy} + + + + {$account.3.outbound_proxy_secondary} + + + + + + + + {$account.3.user_id} + + + + {$account.3.auth_id} + + + + {$account.3.password} + + + + {$account.3.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + + {if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 60 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5064 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_3)} + {$grandstream_account_ring_tone_3} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.4.password)} + 1 +{else} + 0 +{/if} + + + + {$account.4.display_name} + + + + {$account.4.server_address} + + + + {$account.4.server_address_secondary} + + + + {$account.4.outbound_proxy} + + + + {$account.4.outbound_proxy_secondary} + + + + + + + + {$account.4.user_id} + + + + {$account.4.auth_id} + + + + {$account.4.password} + + + + {$account.4.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.4.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5066 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + + 0 + + + + +{$tp=0} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_4)} + {$grandstream_account_ring_tone_4} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.5.password)} + 1 +{else} + 0 +{/if} + + + + {$account.5.display_name} + + + + {$account.5.server_address} + + + + {$account.5.server_address_secondary} + + + + {$account.5.outbound_proxy} + + + + {$account.5.outbound_proxy_secondary} + + + + + + + + {$account.5.user_id} + + + + {$account.5.auth_id} + + + + {$account.5.password} + + + + {$account.5.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} + {$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.5.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5068 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_5)} + {$grandstream_account_ring_tone_5} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($account.6.password)} + 1 +{else} + 0 +{/if} + + + + {$account.6.display_name} + + + + {$account.6.server_address} + + + + {$account.6.server_address_secondary} + + + + {$account.6.outbound_proxy} + + + + {$account.6.outbound_proxy_secondary} + + + + + + + + {$account.6.user_id} + + + + {$account.6.auth_id} + + + + {$account.6.password} + + + + {$account.6.display_name} + + + + *97 + + + + + 0 + + + + + + + +{if isset($grandstream_dns_mode)} + {$grandstream_dns_mode} +{else} + 0 +{/if} + + + + + 0 + + + + + + + + + + + + + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} + 0 +{/if} + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + {$account.6.register_expires} + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 30 + + + + + 30 + + + + + 5070 + + + + + 20 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + +{$tp=0} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + +{if isset($subscribe_mwi)} + 1 +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + 0 + + + + + + 0 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + 1 + + + + + + + + 15 + + + + + + + + + 0 + + + + + + + + + + + + + 0 + + + + + ** + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 123 + + + + + 101 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 9 + + + + + 98 + + + + + 2 + + + + + 123 + + + + + 0 + + + + + 1 + + + + + + 0 + + + + + +{if isset($grandstream_srtp)} + {$grandstream_srtp} +{else} + 0 +{/if} + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 2 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 1 + + + + + 2 + + + + + + 0 + + + + + 250 + + + + + + + + 0 + + + + + + + + +{if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} +{else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} + + + + mpk + + + + + 0 + + + + +{if isset($grandstream_account_ring_tone_6)} + {$grandstream_account_ring_tone_6} +{/if} + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + + + + + + 5 + + + + + 60 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 30 + + + + 4 + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + phone-{$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 192 + + + 168 + + + 1 + + + 102 + + + + 255 + + + 255 + + + 0 + + + 0 + + + + 192 + + + 168 + + + 2 + + + 1 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 26 + + + + + 46 + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_lan_port_vlan) } + {$grandstream_lan_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 0 + + + + +{if isset($grandstream_pc_port_vlan) } + {$grandstream_pc_port_vlan} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 30 + + + + + 1500 + + + + + 0 + + + + + + + + 1 + + + + + 1 + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_bluetooth_power)} + {$grandstream_bluetooth_power} +{/if} + + + + +{if isset($grandstream_bluetooth_handsfree)} + {$grandstream_bluetooth_handsfree} +{/if} + + + + + + + + + + + + 0 + + + + + + + + + 1194 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 161 + + + + + + + + 162 + + + + 5 + + + + 1 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + {$user_password} + + + +{if $admin_password=="none"} + +{elseif isset($admin_password)} + {$admin_password} +{else} + adminadmin +{/if} + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + + 0 + + + + + 1 + + + + + + + + + + 0 + + + + + 10080 + + + + + 0 + + + + 1 + + + + 0 + + + + 1 + + + + + 0 + + + + + 1 + + + + + + 2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 2 + + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} +{elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 +{else} + {$domain_name}{$project_path}/app/provision +{/if} + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + {$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} +{else} + 0 +{/if} + + + + + + + + +{if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} +{else} + 0 +{/if} + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + + + + + + + + + + Auto + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + 86400 + + + + + + + + + + + + 7547 + + + + + + + + + + + + + 0 + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + 1 + + + + + 1 + + + + + 80 + + + + + 443 + + + + 1 + + + + 5 + + + + 20 + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + +{if isset($contact_grandstream)} + 1 +{else} + 0 +{/if} + + + + + + + + + + + + + + +{if isset($contact_grandstream)} + {$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} + {$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_phonebook_download_interval)} + {$grandstream_phonebook_download_interval} +{else} + 0 +{/if} + + + + + 1 + + + + + 0 + + + + + 0 + + + + +{if isset($contact_grandstream)} + 2 +{else} + 0 +{/if} + + + + + 0 + + + + + + + + 0 + + + + {$grandstream_ldap_server} + + + + 389 + + + + + + {$grandstream_ldap_base_dn} + + + + {$grandstream_ldap_username} + + + + {$grandstream_ldap_password} + + + + + {$grandstream_ldap_number_filter} + + + + + {$grandstream_ldap_name_filter} + + + + + 3 + + + + + {$grandstream_ldap_name_attr} + + + + + {$grandstream_ldap_number_attr} + + + + {$grandstream_ldap_display_name} + + + + + + 50 + + + + + + 30 + + + + + 0 + + + + 0 + + + 0 + + + + givenName sn title + + + + 0 + + + + + + + + 5004 + + + + + 200 + + + + + 0 + + + + + 20 + + + + + + + + + + + + +{if isset($public_mode) } +{if $public_mode|strtolower == 'true'} + 1 +{elseif $public_mode|strtolower == 'yes'} + 1 +{elseif $public_mode == '1'} + 1 +{else} + 0 +{/if} +{else} + 0 +{/if} + + + + + + 0 + + + + + + + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 4320 + + + + 100 + + + + 100 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + 5222 + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + -1 + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + CallHistory,LocalPhonebook,RemotePhonebook,FeatureCode + + + + + 1 + + + + + + + + 0 + + + + + 30 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + 10 + + + + + 20 + + + + + 0 + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + +{if isset($grandstream_call_waiting)} +{if $grandstream_call_waiting == "1"} 0{/if} +{if $grandstream_call_waiting == "2"} 1{/if} +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + +{if isset($grandstream_auto_attended_transfer)} + {$grandstream_auto_attended_transfer} +{else} + 1 +{/if} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + +{if isset($ntp_server_primary)} + {$ntp_server_primary} +{else} + pool.ntp.org +{/if} + + + +{if isset($ntp_server_secondary)} + {$ntp_server_secondary} +{else} + 2.us.pool.ntp.org +{/if} + + + + + 1440 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } + {$grandstream_timezone} +{elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} +{else} + auto +{/if} + + + + + + 1 + + + + + MTZ+6MDT+5,M4.1.0,M11.1.0 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 100 + + + + + 60 + + + + + 1 + + + + + 0 + + + + + + 0 + + + +{if isset($grandstream_wallpaper_url)} + 1 + {$grandstream_wallpaper_url} +{else} + 0 + +{/if} + + + + #000000 + + + + +{if isset($grandstream_screensaver)} + {$grandstream_screensaver} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_source)} + {$grandstream_screensaver_source} +{else} + 0 +{/if} + + + + + +{if isset($grandstream_screensaver_show_date_time)} + {$grandstream_screensaver_show_date_time} +{else} + 1 +{/if} + + + + +{if isset($grandstream_screensaver_timeout)} + {$grandstream_screensaver_timeout} +{else} + 3 +{/if} + + + +{if isset($grandstream_screensaver_server_path)} + {$grandstream_screensaver_server_path} +{else} + +{/if} + + + + +{if isset($grandstream_screensaver_xml_download_interval)} + {$grandstream_screensaver_xml_download_interval} +{else} + 0 +{/if} + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + f1=440,f2=480,c=200/400; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440; + + + + + f1=350,f2=440,c=10/10; + + + + + f1=440,f2=480,c=200/400; + + + + + f1=440,f2=440,c=25/525; + + + + + 0 + + + + + f1=480,f2=620,c=50/50; + + + + + f1=480,f2=620,c=25/25; + + + + + 5 + + + + + 5 + + + + + 0 + + + + +{if isset($grandstream_default_ringtone)} + {$grandstream_default_ringtone} +{/if} + + + + + + + + + + + 1 + + + + + 1 + + + + + + +{if isset($grandstream_city_code)} + 0 +{/if} + + + +{if isset($grandstream_city_code)} + {$grandstream_city_code} +{/if} + + + + + 15 + + + + +{if isset ($grandstream_temp_unit)} + {$grandstream_temp_unit} +{/if} + + + + + + + + + + + XMLApp + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{$fixed_keys=4} +{if $template == "grandstream/gxp2130"}{$fixed_keys=3}{/if} +{if $template == "grandstream/gxp2140"}{$fixed_keys=4}{/if} +{if $template == "grandstream/gxp2160"}{$fixed_keys=6}{/if} +{if $template == "grandstream/gxp2170"}{$fixed_keys=12}{/if} +{if $template == "grandstream/gxp2135"}{$fixed_keys=8}{/if} + +{$start_id=1363} +{assign var=key_types value=["none"=>-1,"line"=>0,"shared line"=>1,"speed dial"=>10, "blf"=>11, "presence watcher"=>12, "eventlist blf"=>13,"speed dial active"=>14,"dial dtmf"=>15,"voicemail"=>16,"call return"=>17,"transfer"=>18,"call park"=>19,"intercom"=>20,"ldap search"=>21,"multicast paging"=>23,"record"=>24,"call log"=>25,"monitored call park"=>26,"menu"=>27]} + +{for $line=1 to 6} +{$pid=$line*2-2} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]-10} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +0 +{$line-1} + + +{else} +-1 +{/if} +{/if} + +{/for} + + +{$start_id=23800} +{for $line=7 to 48} +{$pid=($line-6)*4-4} +{if isset($keys.line.$line.device_key_category) && isset($keys.line.$line.device_key_type) && isset($key_types[$keys.line.$line.device_key_type])} +{if $line <= $fixed_keys} +{$key_types[$keys.line.$line.device_key_type]} +{else} +{$key_types[$keys.line.$line.device_key_type]-10} +{/if} +{$keys.line.$line.device_key_line} +{$keys.line.$line.device_key_label} +{$keys.line.$line.device_key_value} +{else} +{if $line <= $fixed_keys} +-1 +0 + + +{else} +-1 +{/if} +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"conference"=>12,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=323} +{for $mem=1 to 7} +{$pid=$mem*3-3} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.memory.$mem.device_key_type|in_array:$key_types} + + + + + + + +{$key_types[$keys.memory.$mem.device_key_type]} + + +{$keys.memory.$mem.device_key_line} + + +{$keys.memory.$mem.device_key_label} + + +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + +{$start_id=353} +{for $mem=8 to 18} +{$pid=($mem-7)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + +{$start_id=1440} +{for $mem=19 to 24} +{$pid=($mem-18)*4-4} +{if isset($keys.memory.$mem.device_key_category) && isset($keys.memory.$mem.device_key_type) && $keys.line.$line.device_key_type|in_array:$key_types} +{$key_types[$keys.memory.$mem.device_key_type]} +{$keys.memory.$mem.device_key_line} +{$keys.memory.$mem.device_key_label} +{$keys.memory.$mem.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + 0 + + + + + 0 + + + + + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,Redial,Dial,Backspace,PickUp,Target + + + + BTPhonebook,DirectIP,Onhook,Cancel,Dial,Backspace,Target + + + + Answer,Reject,Forward,ReConf + + + + BTOnOff,EndCall,ReConf,ConfRoom,ConfCall + + + + + BTPhonebook,BTOnOff,EndCall,ReConf,ConfRoom,ConfCall,Cancel,NewCall,Swap,Transfer,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,UCallPark,PrivateHold,CallPark + + + + BTOnOff,EndCall,Kick,NewCall,Trnf>VM,DialDTMF,BSCCenter,URecord,Record,ConfRoom,Add + + + + ReConf,Resume,HoldTrnf,ConfCall,Add + + + + EndCall,ReConf,ConfRoom + + + + BTOnOff,Cancel,BlindTrnf,AttTrnf,Backspace,Target + + + + BTOnOff,Cancel,Dial,Backspace,Target + + + + + + + + + + + +{assign var=key_types value=["speed dial"=>10, "speed dial active"=>14,"voicemail"=>16,"call return"=>17,"intercom"=>20,"ldap search"=>21,"menu"=>27]} +{$start_id=2987} +{for $prog=1 to 3} +{$pid=$prog*4-4} +{if isset($keys.programmable.$prog.device_key_category) && isset($keys.programmable.$prog.device_key_type) && $keys.programmable.$prog.device_key_type|in_array:$key_types} +{$key_types[$keys.programmable.$prog.device_key_type]} +{$keys.programmable.$prog.device_key_line} +{$keys.programmable.$prog.device_key_label} +{$keys.programmable.$prog.device_key_value} +{else} +0 +0 + + +{/if} + +{/for} + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + +{if $template == "grandstream/gxp2140"||$template == "grandstream/gxp2170"} + +{assign var=key_types value=["none"=>-1,"speed dial"=>0, "blf"=>1, "presence watcher"=>2, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"voicemail"=>6,"call return"=>7,"transfer"=>8,"call park"=>9,"intercom"=>10,"ldap search"=>11,"multicast paging"=>13,"record"=>14,"call log"=>15,"monitored call park"=>16,"menu"=>17]} +{$start_id=23000} +{for $exp=1 to 160} +{$pid=$exp*5-5} +{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types} +{$key_types[$keys.expansion.$exp.device_key_type]} +{$keys.expansion.$exp.device_key_line} +{$keys.expansion.$exp.device_key_label} +{$keys.expansion.$exp.device_key_value} +{else} +-1 +0 + + +{/if} + +{/for} +{/if} + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + -1 + + + + 0 + + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml b/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml index eb8a5aca76..49bbdff5c5 100644 --- a/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp21xx/{$mac}.xml @@ -8,21 +8,21 @@ 1 - {$display_name_1} + {$account.1.display_name} - {$server_address_1} + {$account.1.server_address} - {$user_id_1} + {$account.1.user_id} - {$auth_id_1} + {$account.1.auth_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} *97 @@ -60,10 +60,10 @@ 400 - {if $sip_transport_1 == 'udp'}0{/if} - {if $sip_transport_1 == 'tcp'}1{/if} - {if $sip_transport_1 == 'tls'}2{/if} - {if $sip_transport_1 == 'dns srv'}1{/if} + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} 1 @@ -297,7 +297,13 @@ + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + @@ -388,10 +394,10 @@ 1 - {$display_name_2} + {$account.2.display_name} - {$server_address_2} + {$account.2.server_address} @@ -400,16 +406,16 @@ - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.user_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} *97 @@ -476,10 +482,10 @@ - {if $sip_transport_2 == 'udp'}0{/if} - {if $sip_transport_2 == 'tcp'}1{/if} - {if $sip_transport_2 == 'tls'}2{/if} - {if $sip_transport_2 == 'dns srv'}1{/if} + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} @@ -819,10 +825,10 @@ 1 - {$display_name_3} + {$account.3.display_name} - {$server_address_3} + {$account.3.server_address} @@ -831,16 +837,16 @@ - {$user_id_3} + {$account.3.user_id} - {$user_id_3} + {$account.3.user_id} - {$user_password_3} + {$account.3.password} - {$display_name_3} + {$account.3.display_name} *97 @@ -907,10 +913,10 @@ - {if $sip_transport_3 == 'udp'}0{/if} - {if $sip_transport_3 == 'tcp'}1{/if} - {if $sip_transport_3 == 'tls'}2{/if} - {if $sip_transport_3 == 'dns srv'}1{/if} + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}1{/if} @@ -1249,10 +1255,10 @@ 1 - {$display_name_4} + {$account.4.display_name} - {$server_address_4} + {$account.4.server_address} @@ -1261,16 +1267,16 @@ - {$user_id_4} + {$account.4.user_id} - {$user_id_4} + {$account.4.user_id} - {$user_password_4} + {$account.4.password} - {$display_name_4} + {$account.4.display_name} *97 @@ -1337,10 +1343,10 @@ - {if $sip_transport_4 == 'udp'}0{/if} - {if $sip_transport_4 == 'tcp'}1{/if} - {if $sip_transport_4 == 'tls'}2{/if} - {if $sip_transport_4 == 'dns srv'}1{/if} + {if $account.4.sip_transport == 'udp'}0{/if} + {if $account.4.sip_transport == 'tcp'}1{/if} + {if $account.4.sip_transport == 'tls'}2{/if} + {if $account.4.sip_transport == 'dns srv'}1{/if} @@ -1674,10 +1680,10 @@ 1 - {$display_name_5} + {$account.5.display_name} - {$server_address_5} + {$account.5.server_address} @@ -1686,16 +1692,16 @@ - {$user_id_5} + {$account.5.user_id} - {$user_id_5} + {$account.5.user_id} - {$user_password_5} + {$account.5.password} - {$display_name_5} + {$account.5.display_name} *97 @@ -1763,10 +1769,10 @@ - {if $sip_transport_5 == 'udp'}0{/if} - {if $sip_transport_5 == 'tcp'}1{/if} - {if $sip_transport_5 == 'tls'}2{/if} - {if $sip_transport_5 == 'dns srv'}1{/if} + {if $account.5.sip_transport == 'udp'}0{/if} + {if $account.5.sip_transport == 'tcp'}1{/if} + {if $account.5.sip_transport == 'tls'}2{/if} + {if $account.5.sip_transport == 'dns srv'}1{/if} @@ -2103,10 +2109,10 @@ 1 - {$display_name_6} + {$account.6.display_name} - {$server_address_6} + {$account.6.server_address} @@ -2115,16 +2121,16 @@ - {$user_id_6} + {$account.6.user_id} - {$user_id_6} + {$account.6.user_id} - {$user_password_6} + {$account.6.password} - {$display_name_6} + {$account.6.display_name} *97 @@ -2192,10 +2198,10 @@ - {if $sip_transport_6 == 'udp'}0{/if} - {if $sip_transport_6 == 'tcp'}1{/if} - {if $sip_transport_6 == 'tls'}2{/if} - {if $sip_transport_6 == 'dns srv'}1{/if} + {if $account.6.sip_transport == 'udp'}0{/if} + {if $account.6.sip_transport == 'tcp'}1{/if} + {if $account.6.sip_transport == 'tls'}2{/if} + {if $account.6.sip_transport == 'dns srv'}1{/if} @@ -2695,7 +2701,13 @@ + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp21xx/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp21xx + {else} {$domain_name}{$project_path}/app/provision + {/if} {$domain_name}{$project_path}/app/provision diff --git a/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml b/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml index 208f231fce..e95eecf5e1 100644 --- a/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp21xxbk/{$mac}.xml @@ -34,9 +34,10 @@ - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp21xx/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp21xx {else} {$domain_name}{$project_path}/app/provision {/if} @@ -104,10 +105,10 @@ 1 -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} @@ -116,16 +117,16 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} *97 @@ -486,7 +487,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -606,11 +612,11 @@ -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address} @@ -622,19 +628,19 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} @@ -1157,11 +1163,11 @@ -{$display_name_3} +{$account.3.display_name} -{$server_address_3} +{$account.3.server_address} @@ -1173,19 +1179,19 @@ -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} -{$display_name_3} +{$account.3.display_name} @@ -1706,11 +1712,11 @@ -{$display_name_4} +{$account.4.display_name} -{$server_address_4} +{$account.4.server_address} @@ -1722,19 +1728,19 @@ -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_4} +{$account.4.password} -{$display_name_4} +{$account.4.display_name} @@ -2252,11 +2258,11 @@ -{$display_name_5} +{$account.5.display_name} -{$server_address_5} +{$account.5.server_address} @@ -2268,19 +2274,19 @@ -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.user_id} -{$user_password_5} +{$account.5.password} -{$display_name_5} +{$account.5.display_name} @@ -2800,11 +2806,11 @@ -{$display_name_6} +{$account.6.display_name} -{$server_address_6} +{$account.6.server_address} @@ -2816,19 +2822,19 @@ -{$user_id_6} +{$account.6.user_id} -{$user_id_6} +{$account.6.user_id} -{$user_password_6} +{$account.6.password} -{$display_name_6} +{$account.6.display_name} diff --git a/resources/templates/provision/grandstream/gxp2200/{$mac}.xml b/resources/templates/provision/grandstream/gxp2200/{$mac}.xml index ac29bc6e1e..f6f1eb098f 100644 --- a/resources/templates/provision/grandstream/gxp2200/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp2200/{$mac}.xml @@ -236,24 +236,24 @@ -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} @@ -674,22 +674,22 @@ -{$server_address_2} +{$account.2.server_address} -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} *97 -{$display_name_2} +{$account.2.display_name} @@ -1097,22 +1097,22 @@ -{$server_address_3} +{$account.3.server_address} -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} *97 = -{$display_name_3} +{$account.3.display_name} @@ -1524,22 +1524,22 @@ VNumber: 0, 1, 2. --> -{$server_address_4} +{$account.4.server_address} -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_4} +{$account.4.password} *97 -{$display_name_4} +{$account.4.display_name} @@ -1953,22 +1953,22 @@ VNumber: 0, 1, 2. --> -{$server_address_5} +{$account.5.server_address} -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.user_id} -{$user_password_5} +{$account.5.password} *97 -{$display_name_5} +{$account.5.display_name} @@ -2379,22 +2379,22 @@ Account 5 Codec Settings -{$server_address_6} +{$account.6.server_address} -{$user_id_6} +{$account.6.user_id} -{$user_id_6} +{$account.6.user_id} -{$user_password_6} +{$account.6.password} *97 -{$display_name_6} +{$account.6.display_name} @@ -3213,9 +3213,11 @@ Account 5 Codec Settings 2 - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp2200/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp2200 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxp3240/{$mac}.xml b/resources/templates/provision/grandstream/gxp3240/{$mac}.xml index 9b543b57ff..672610a522 100644 --- a/resources/templates/provision/grandstream/gxp3240/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxp3240/{$mac}.xml @@ -236,24 +236,24 @@ -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} @@ -674,22 +674,22 @@ -{$server_address_2} +{$account.2.server_address} -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} *97 -{$display_name_2} +{$account.2.display_name} @@ -1097,22 +1097,22 @@ -{$server_address_3} +{$account.3.server_address} -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} *97 = -{$display_name_3} +{$account.3.display_name} @@ -3213,9 +3213,10 @@ Account 5 Codec Settings 2 - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxp3240/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxp3240 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxv300x/{$mac}.xml b/resources/templates/provision/grandstream/gxv300x/{$mac}.xml index b918c56b80..8ad0e33fb2 100644 --- a/resources/templates/provision/grandstream/gxv300x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv300x/{$mac}.xml @@ -65,13 +65,14 @@ 1 - - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxv300x/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxv300x {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision @@ -195,17 +196,17 @@ - {$server_address_1} + {$account.1.server_address} - {$outbound_proxy_primary_1} + {$account.1.outbound_proxy_primary} - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.user_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} 0 @@ -242,8 +243,8 @@ 0 - - {$grandstream_dial_plan} + + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} 20 @@ -333,17 +334,17 @@ 0 - {$server_address_2} + {$account.2.server_address} - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.user_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} 0 @@ -381,8 +382,8 @@ 0 - - {x+|*x+} + + {literal}{x+|*x+}{/literal} 20 @@ -472,17 +473,17 @@ - {$server_address_3} + {$account.3.server_address} - {$user_id_3} + {$account.3.user_id} - {$user_id_3} + {$account.3.user_id} - {$user_password_3} + {$account.3.password} - {$display_name_3} + {$account.3.display_name} 0 @@ -520,8 +521,8 @@ 0 - - {x+|*x+} + + {literal}{x+|*x+}{/literal} 20 diff --git a/resources/templates/provision/grandstream/gxv3140/{$mac}.xml b/resources/templates/provision/grandstream/gxv3140/{$mac}.xml index 46098c7e5f..942bd96035 100644 --- a/resources/templates/provision/grandstream/gxv3140/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3140/{$mac}.xml @@ -77,23 +77,23 @@ -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} 0 @@ -1372,9 +1372,10 @@ {$http_auth_password} - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxv3140/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxv3140 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxv3175/{$mac}.xml b/resources/templates/provision/grandstream/gxv3175/{$mac}.xml index 993bf4f8b0..63f4eeee23 100644 --- a/resources/templates/provision/grandstream/gxv3175/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3175/{$mac}.xml @@ -22,26 +22,26 @@ 1 -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} 0 @@ -247,8 +247,8 @@ - -{$grandstream_dial_plan} + +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} 0 @@ -547,8 +547,8 @@ - -{ x+ | *x+ | *xx*x+ } + +{literal}{ x+ | *x+ | *xx*x+ }{/literal} 0 @@ -847,8 +847,8 @@ - -{ x+ | *x+ | *xx*x+ } + +{literal}{ x+ | *x+ | *xx*x+ }{/literal} 0 @@ -1255,12 +1255,13 @@ 2 - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxv3175/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxv3175 {else} {$domain_name}{$project_path}/app/provision -{/if} +{/if} {$domain_name}{$project_path}/app/provision diff --git a/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml b/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml index 6481ce5c10..0999223f8b 100644 --- a/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3175v2/{$mac}.xml @@ -46,19 +46,19 @@ 1 - {$display_name_1} + {$account.1.display_name} - {$server_address_1} + {$account.1.server_address} - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.user_id} - {$user_password_1} + {$account.1.password} *97 - {$display_name_1} + {$account.1.display_name} 0 @@ -207,8 +207,8 @@ 0 - - {$grandstream_dial_plan} + + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} 0 @@ -417,9 +417,9 @@ 0 - + - { x+ | *x+ | *xx*x+ } + {literal}{ x+ | *x+ | *xx*x+ }{/literal} 0 @@ -736,7 +736,7 @@ 1 0 - + @@ -749,17 +749,19 @@ {$http_auth_password} - - + + 2 + - - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxv3175v2/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxv3175v2 {else} {$domain_name}{$project_path}/app/provision {/if} - + {$domain_name}{$project_path}/app/provision diff --git a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml index 8a26fc6767..4ab496378a 100644 --- a/resources/templates/provision/grandstream/gxv3240/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3240/{$mac}.xml @@ -17,32 +17,32 @@ -{if isset($user_password_1)} +{if isset($account.1.password)} 1 {else} 0 {/if} -{$display_name_1} +{$account.1.display_name} -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} @@ -184,10 +184,10 @@ {$tp=0} -{if $sip_transport_1 == 'udp'}{$tp=0}{/if} -{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_1 == 'tls'}{$tp=2}{/if} -{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} +{if $account.1.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.1.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -710,32 +710,32 @@ -{if isset($user_password_2)} +{if isset($account.2.password)} 1 {else} 0 {/if} -{$display_name_2} +{$account.2.display_name} -{$server_address_2} +{$account.2.server_address} -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} *97 -{$display_name_2} +{$account.2.display_name} @@ -868,10 +868,10 @@ {$tp=0} -{if $sip_transport_2 == 'udp'}{$tp=0}{/if} -{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_2 == 'tls'}{$tp=2}{/if} -{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} +{if $account.2.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.2.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.2.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.2.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -1348,32 +1348,32 @@ -{if isset($user_password_3)} +{if isset($account.3.password)} 1 {else} 0 {/if} -{$display_name_3} +{$account.3.display_name} -{$server_address_3} +{$account.3.server_address} -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} *97 -{$display_name_3} +{$account.3.display_name} @@ -1506,10 +1506,10 @@ {$tp=0} -{if $sip_transport_3 == 'udp'}{$tp=0}{/if} -{if $sip_transport_3 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_3 == 'tls'}{$tp=2}{/if} -{if $sip_transport_3 == 'dns srv'}{$tp=1}{/if} +{if $account.3.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.3.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.3.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.3.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -1541,7 +1541,7 @@ 0 - + 0 @@ -1986,32 +1986,32 @@ -{if isset($user_password_4)} +{if isset($account.4.password)} 1 {else} 0 {/if} -{$display_name_4} +{$account.4.display_name} -{$server_address_4} +{$account.4.server_address} -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_4} +{$account.4.password} *97 -{$display_name_4} +{$account.4.display_name} @@ -2145,10 +2145,10 @@ {$tp=0} -{if $sip_transport_4 == 'udp'}{$tp=0}{/if} -{if $sip_transport_4 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_4 == 'tls'}{$tp=2}{/if} -{if $sip_transport_4 == 'dns srv'}{$tp=1}{/if} +{if $account.4.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.4.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.4.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.4.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -2628,32 +2628,32 @@ -{if isset($user_password_5)} +{if isset($account.5.password)} 1 {else} 0 {/if} -{$display_name_5} +{$account.5.display_name} -{$server_address_5} +{$account.5.server_address} -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.user_id} -{$user_password_5} +{$account.5.password} *97 -{$display_name_5} +{$account.5.display_name} @@ -2785,10 +2785,10 @@ {$tp=0} -{if $sip_transport_5 == 'udp'}{$tp=0}{/if} -{if $sip_transport_5 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_5 == 'tls'}{$tp=2}{/if} -{if $sip_transport_5 == 'dns srv'}{$tp=1}{/if} +{if $account.5.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.5.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.5.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.5.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -3268,32 +3268,32 @@ -{if isset($user_password_6)} +{if isset($account.6.password)} 1 {else} 0 {/if} -{$display_name_6} +{$account.6.display_name} -{$server_address_6} +{$account.6.server_address} -{$user_id_6} +{$account.6.user_id} -{$user_id_6} +{$account.6.user_id} -{$user_password_6} +{$account.6.password} *97 -{$display_name_6} +{$account.6.display_name} @@ -3426,10 +3426,10 @@ {$tp=0} -{if $sip_transport_6 == 'udp'}{$tp=0}{/if} -{if $sip_transport_6 == 'tcp'}{$tp=1}{/if} -{if $sip_transport_6 == 'tls'}{$tp=2}{/if} -{if $sip_transport_6 == 'dns srv'}{$tp=1}{/if} +{if $account.6.sip_transport == 'udp'}{$tp=0}{/if} +{if $account.6.sip_transport == 'tcp'}{$tp=1}{/if} +{if $account.6.sip_transport == 'tls'}{$tp=2}{/if} +{if $account.6.sip_transport == 'dns srv'}{$tp=1}{/if} {$tp} @@ -4758,8 +4758,10 @@ 1 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxv3240/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxv3240 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxv3275/{$mac}.xml b/resources/templates/provision/grandstream/gxv3275/{$mac}.xml index 26dcbaa350..7467fcc773 100644 --- a/resources/templates/provision/grandstream/gxv3275/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3275/{$mac}.xml @@ -236,24 +236,24 @@ -{$server_address_1} +{$account.1.server_address} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} *97 -{$display_name_1} +{$account.1.display_name} @@ -674,22 +674,22 @@ -{$server_address_2} +{$account.2.server_address} -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} *97 -{$display_name_2} +{$account.2.display_name} @@ -1097,22 +1097,22 @@ -{$server_address_3} +{$account.3.server_address} -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} *97 = -{$display_name_3} +{$account.3.display_name} @@ -1524,22 +1524,22 @@ VNumber: 0, 1, 2. --> -{$server_address_4} +{$account.4.server_address} -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_4} +{$account.4.password} *97 -{$display_name_4} +{$account.4.display_name} @@ -1953,22 +1953,22 @@ VNumber: 0, 1, 2. --> -{$server_address_5} +{$account.5.server_address} -{$user_id_5} +{$account.5.user_id} -{$user_id_5} +{$account.5.user_id} -{$user_password_5} +{$account.5.password} *97 -{$display_name_5} +{$account.5.display_name} @@ -2379,22 +2379,22 @@ Account 5 Codec Settings -{$server_address_6} +{$account.6.server_address} -{$user_id_6} +{$account.6.user_id} -{$user_id_6} +{$account.6.user_id} -{$user_password_6} +{$account.6.password} *97 -{$display_name_6} +{$account.6.display_name} @@ -3213,13 +3213,15 @@ Account 5 Codec Settings 2 -{domain_name}/firmware/gs +{$domain_name}/firmware/gs {$domain_name}{$project_path}/app/provision -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxv3275/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxv3275 {else} {$domain_name}{$project_path}/app/provision {/if} diff --git a/resources/templates/provision/grandstream/gxv3370/{$mac}.xml b/resources/templates/provision/grandstream/gxv3370/{$mac}.xml new file mode 100644 index 0000000000..f780a48a22 --- /dev/null +++ b/resources/templates/provision/grandstream/gxv3370/{$mac}.xml @@ -0,0 +1,1272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yes + + + {$account.1.display_name} + + + {$account.1.server_address} + + + {$account.1.user_id} + + + {$account.1.auth_id} + + + {$account.1.password} + + *97 + + {$account.1.display_name} + + + Disabled + + + {$account.1.outbound_proxy_primary} + + {$account.1.outbound_proxy_secondary} + + + ARecord + + + Default + + + Auto + + + + + Yes + + + Instance + + {$account.1.register_expires} + + 0 + + 20 + + + Yes + + No + + 30 + + 3 + + + No + + + Default + + + Default + + + {$account.1.sip_transport} + + 5060 + + + sip + + + No + + + Yes + + + 0_5sec + + + 4sec + + 0 + + + InRoute + + + No + + + 180 + + 90 + + + Omit + + + UAC + + + No + + + No + + + No + + + No + + + + PCMU + PCMA + G_726_32 + G_722 + G_729AOrB + iLBC + OPUS + + + Callee + + + No + + + 30ms + + + 1 + + + 126 + + 123 + + + No + Yes + No + + 101 + + + Adaptive + + + No + + + 121 + + + 124 + + + No + + 2 + + + Yes + + + No + + + 0 + + + 120 + + + + Non-Interleaved + + + 720P + + + No + + + BP&MP&HP + + + + + 2048 + + + MediaLevel + + + 99 + + + Yes + + + 1080P + + + BP&MP&HP + + + + + 1024 + + + 15 + + + UDP + + + Disabled + + + AES128And256Bit + + + Yes + + + + + No + + + Disable + + + + Yes + + + Prompt + + + EnableIntercom/Paging + + + Yes + + + No + + + Yes + + + No + + + No + + + All + + + No + + + No + + + Yes + + + + + + + 4 + + + 60 + + + No + + + Yes + + + + + + 0 + + {$grandstream_dial_plan} + + + + Auto + + content://settings/system/ringtone + + + No + + + + content://settings/system/ringtone + + + + content://settings/system/ringtone + + + + content://settings/system/ringtone + + + + + No + + + No + + + No + + + Disabled + + + No + + + No + + + No + + + No + + + + + -1 + + + 100 + + + + 50040 + + + No + + + Yes + + + Yes + + + 20 + + stun.ipvideotalk.com + + + + + + + + + + Yes + + + No + + + Yes + + + Yes + + + Yes + + + Yes + + Yes + + + BlindTransfer + + + Yes + + + No + + + Disable + + + No + + + + + + 30 + + + No + + + No + + + 2 + + [()- ] + + + No + + + Local + + + + No + + f1=350@-13,f2=440@-13,c=0/0; + + + + f1=440,f2=480,c=2000/4000; + + f1=480,f2=620,c=500/500; + + f1=480,f2=620,c=250/250; + + f1=350,f2=440,c=100/100-100/100-100/100; + + f1=440,c=300/2000-300/2000-0/0; + + + Low + + c=2000/4000; + + + + 15 + + + EqualProportionalCutting + + + Yes + + + + Disable + + + No + + + PCMU + + + No + + + H264 + + + VGA + + + + + 256 + + + 15 + + + Baseline + + + 99 + + + + + + + + + + + + + + + + + + + + + + + + + + BothAndPreferIPv4 + + + DHCP + + + Disable + + + + + + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + + + + + + + 0 + + + 0 + + + AutoConfigured + + + + 64 + + + + + + + Disable + + + + + + + + No + + + + + + + None + + 0 + + + + 0 + + + + 1194 + + + UDP + + + + + + + + + Blowfish + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + Yes + + 30 + + + No + + 26 + + 46 + + 34 + + + + Grandstream GXV3370 $version + + + Enabled + + 0 + + 0 + + + + + + pool.ntp.org + + + Yes + + + Yes + + + AST4ADT + + + 24Hour + + + Normal + + + en + + + + No + + + HTTP + + + 80 + + + No + + + Allow + + admin1 + + user + + + + + + + + + + + + No + + + No + + + No + + + No + + + No + + + No + + + Bright + + + 0 + + + 0 + + + 0 + + + 0 + + + Normal + + + No + + + -6 + + + -6 + + + + No + + + + + + + + + No + + 86400 + + + + + + + + + + + + + + HTTP + + + + + + + + + + + + + HTTP + + + + + + + + + + + + + No + + + + + TFTP + + + + + + + + + 0 + + + + + No + + 22 + 23 + + + + 1 + + + 10080 + + + AlwaysCheck + + + No + + + No + + + Yes + + + Yes + + + No + + + + Yes + + + + + UDP + + log.ipvideotalk.com + + + None + + + + + + NameUserIDKeymode + + + No + + + No + No + No + No + No + No + No + No + No + No + No + No + No + No + No + No + + + + + + + + + + + + + + + + + + + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + ** + + + + LastName + + + Default + + + 911 + + + + No + + + Yes + + + Disabled + + + UTF + + + + + + + + + 0 + + + + LDAP + + + + 389 + + + + + + + + + + + + + + + + + + + + + + + + 50 + + 4 + + + No + + + No + + + 0 + + + + No + + + No + + + + + No + + + + No + + + + No + + + + + No + + + + No + + + Yes + + + + + 15 + + + + + + + + SpeedDial + + + Account1 + + + + + + + + SpeedDial + Account1 + + + + + \ No newline at end of file diff --git a/resources/templates/provision/grandstream/gxv3504/{$mac}.xml b/resources/templates/provision/grandstream/gxv3504/{$mac}.xml index 322f465a58..a2f33b0ed5 100644 --- a/resources/templates/provision/grandstream/gxv3504/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxv3504/{$mac}.xml @@ -137,36 +137,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1016 1016 @@ -475,19 +475,19 @@ -{$server_address_1} +{$account.1.server_address} -{$user_password_1} +{$account.1.password} -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} @@ -567,19 +567,15 @@ 2 -{domain_name}/firmware/gs - - -{$domain_name}{$project_path}/app/provision - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxv3504/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxv3504 {else} {$domain_name}{$project_path}/app/provision {/if} - {$domain_name}{$project_path}/app/provision @@ -1358,7 +1354,3 @@ - - - - diff --git a/resources/templates/provision/grandstream/gxw4004/{$mac}.xml b/resources/templates/provision/grandstream/gxw4004/{$mac}.xml index 8b053e6bde..004f099220 100644 --- a/resources/templates/provision/grandstream/gxw4004/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw4004/{$mac}.xml @@ -12,6 +12,14 @@ 1 + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxw4004/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxw4004 + {else} + {$domain_name}{$project_path}/app/provision + {/if} {$domain_name}{$project_path}/app/provision @@ -19,7 +27,7 @@ 1 - {$server_address_1} + {$account.1.server_address} 1 @@ -35,10 +43,10 @@ - {$user_id_1} - {$user_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.user_id} + {$account.1.user_id} + {$account.1.password} + {$account.1.display_name} 0 0 @@ -47,10 +55,10 @@ - {$user_id_2} - {$user_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.user_id} + {$account.2.user_id} + {$account.2.password} + {$account.2.display_name} 0 0 @@ -59,10 +67,10 @@ - {$user_id_3} - {$user_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.user_id} + {$account.3.user_id} + {$account.3.password} + {$account.3.display_name} 0 0 @@ -71,10 +79,10 @@ - {$user_id_4} - {$user_id_4} - {$user_password_4} - {$display_name_4} + {$account.4.user_id} + {$account.4.user_id} + {$account.4.password} + {$account.4.display_name} 0 0 diff --git a/resources/templates/provision/grandstream/gxw4008/{$mac}.xml b/resources/templates/provision/grandstream/gxw4008/{$mac}.xml index aa61d4a0ab..e432d8feb8 100644 --- a/resources/templates/provision/grandstream/gxw4008/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw4008/{$mac}.xml @@ -12,6 +12,14 @@ 1 + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxw4008/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxw4008 + {else} + {$domain_name}{$project_path}/app/provision + {/if} {$domain_name}{$project_path}/app/provision @@ -19,7 +27,7 @@ 1 - {$server_address_1} + {$account.1.server_address} 1 @@ -35,10 +43,10 @@ - {$user_id_1} - {$user_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.user_id} + {$account.1.user_id} + {$account.1.password} + {$account.1.display_name} 0 0 @@ -47,10 +55,10 @@ - {$user_id_2} - {$user_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.user_id} + {$account.2.user_id} + {$account.2.password} + {$account.2.display_name} 0 0 @@ -59,10 +67,10 @@ - {$user_id_3} - {$user_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.user_id} + {$account.3.user_id} + {$account.3.password} + {$account.3.display_name} 0 0 @@ -71,10 +79,10 @@ - {$user_id_4} - {$user_id_4} - {$user_password_4} - {$display_name_4} + {$account.4.user_id} + {$account.4.user_id} + {$account.4.password} + {$account.4.display_name} 0 0 @@ -86,10 +94,10 @@ - {$user_id_5} - {$user_id_5} - {$user_password_5} - {$display_name_5} + {$account.5.user_id} + {$account.5.user_id} + {$account.5.password} + {$account.5.display_name} 0 0 @@ -98,10 +106,10 @@ - {$user_id_6} - {$user_id_6} - {$user_password_6} - {$display_name_6} + {$account.6.user_id} + {$account.6.user_id} + {$account.6.password} + {$account.6.display_name} 0 0 @@ -110,10 +118,10 @@ - {$user_id_7} - {$user_id_7} - {$user_password_7} - {$display_name_7} + {$account.7.user_id} + {$account.7.user_id} + {$account.7.password} + {$account.7.display_name} 0 0 @@ -122,10 +130,10 @@ - {$user_id_8} - {$user_id_8} - {$user_password_8} - {$display_name_8} + {$account.8.user_id} + {$account.8.user_id} + {$account.8.password} + {$account.8.display_name} 0 0 diff --git a/resources/templates/provision/grandstream/gxw40xx/{$mac}.xml b/resources/templates/provision/grandstream/gxw40xx/{$mac}.xml index c42e205cab..91fe915d17 100644 --- a/resources/templates/provision/grandstream/gxw40xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw40xx/{$mac}.xml @@ -49,8 +49,11 @@ 2 - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxw40xx/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxw40xx {else} {$domain_name}{$project_path}/app/provision {/if} @@ -282,7 +285,7 @@ 1 - {$server_address_1} + {$account.1.server_address} @@ -525,7 +528,13 @@ 1 - { x+ | *x+ } + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + @@ -808,7 +817,7 @@ 1 - {$server_address_2} + {$account.2.server_address} @@ -1858,14 +1867,14 @@ - {$user_id_1} + {$account.1.user_id} - {$user_id_1} + {$account.1.user_id} - {$user_password_1} + {$account.1.password} - {$display_name_1} + {$account.1.display_name} 0 @@ -1882,13 +1891,13 @@ - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.user_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} 0 @@ -1905,14 +1914,14 @@ - {$user_id_3} + {$account.3.user_id} - {$user_id_3} + {$account.3.user_id} - {$user_password_3} + {$account.3.password} - {$display_name_3} + {$account.3.display_name} 0 @@ -1930,13 +1939,13 @@ - {$user_id_4} + {$account.4.user_id} - {$user_id_4} + {$account.4.user_id} - {$user_password_4} + {$account.4.password} - {$display_name_4} + {$account.4.display_name} 0 @@ -1954,14 +1963,14 @@ - {$user_id_5} + {$account.5.user_id} - {$user_id_5} + {$account.5.user_id} - {$user_password_5} + {$account.5.password} - {$display_name_5} + {$account.5.display_name} 0 @@ -1978,14 +1987,14 @@ - {$user_id_6} + {$account.6.user_id} - {$user_id_6} + {$account.6.user_id} - {$user_password_6} + {$account.6.password} - {$display_name_6} + {$account.6.display_name} 0 @@ -2002,14 +2011,14 @@ - {$user_id_7} + {$account.7.user_id} - {$user_id_7} + {$account.7.user_id} - {$user_password_7} + {$account.7.password} - {$display_name_7} + {$account.7.display_name} 0 @@ -2026,14 +2035,14 @@ - {$user_id_8} + {$account.8.user_id} - {$user_id_8} + {$account.8.user_id} - {$user_password_8} + {$account.8.password} - {$display_name_8} + {$account.8.display_name} 0 @@ -2052,14 +2061,14 @@ - {$user_id_9} + {$account.9.user_id} - {$user_id_9} + {$account.9.user_id} - {$user_password_9} + {$account.9.password} - {$display_name_9} + {$account.9.display_name} 0 @@ -2077,14 +2086,14 @@ - {$user_id_10} + {$account.10.user_id} - {$user_id_10} + {$account.10.user_id} - {$user_password_10} + {$account.10.password} - {$display_name_10} + {$account.10.display_name} 0 @@ -2102,14 +2111,14 @@ - {$user_id_11} + {$account.11.user_id} - {$user_id_11} + {$account.11.user_id} - {$user_password_11} + {$account.11.password} - {$display_name_11} + {$account.11.display_name} 0 @@ -2127,14 +2136,14 @@ - {$user_id_12} + {$account.12.user_id} - {$user_id_12} + {$account.12.user_id} - {$user_password_12} + {$account.12.password} - {$display_name_12} + {$account.12.display_name} 0 @@ -2152,14 +2161,14 @@ - {$user_id_13} + {$account.13.user_id} - {$user_id_13} + {$account.13.user_id} - {$user_password_13} + {$account.13.password} - {$display_name_13} + {$account.13.display_name} 0 @@ -2177,14 +2186,14 @@ - {$user_id_14} + {$account.14.user_id} - {$user_id_14} + {$account.14.user_id} - {$user_password_14} + {$account.14.password} - {$display_name_14} + {$account.14.display_name} 0 @@ -2202,14 +2211,14 @@ - {$user_id_15} + {$account.15.user_id} - {$user_id_15} + {$account.15.user_id} - {$user_password_15} + {$account.15.password} - {$display_name_15} + {$account.15.display_name} 0 @@ -2227,14 +2236,14 @@ - {$user_id_16} + {$account.16.user_id} - {$user_id_16} + {$account.16.user_id} - {$user_password_16} + {$account.16.password} - {$display_name_16} + {$account.16.display_name} 0 @@ -2252,14 +2261,14 @@ - {$user_id_17} + {$account.17.user_id} - {$user_id_17} + {$account.17.user_id} - {$user_password_17} + {$account.17.password} - {$display_name_17} + {$account.17.display_name} 0 @@ -2277,14 +2286,14 @@ - {$user_id_18} + {$account.18.user_id} - {$user_id_18} + {$account.18.user_id} - {$user_password_18} + {$account.18.user_password} - {$display_name_18} + {$account.18.display_name} 0 @@ -2302,14 +2311,14 @@ - {$user_id_19} + {$account.19.user_id} - {$user_id_19} + {$account.19.user_id} - {$user_password_19} + {$account.19.password} - {$display_name_19} + {$account.19.display_name} 0 @@ -2327,14 +2336,14 @@ - {$user_id_20} + {$account.20.user_id} - {$user_id_20} + {$account.20.user_id} - {$user_password_20} + {$account.20.password} - {$display_name_20} + {$account.20.display_name} 0 @@ -2352,14 +2361,14 @@ - {$user_id_21} + {$account.21.user_id} - {$user_id_21} + {$account.21.user_id} - {$user_password_21} + {$account.21.password} - {$display_name_21} + {$account.21.display_name} 0 @@ -2377,14 +2386,14 @@ - {$user_id_22} + {$account.22.user_id} - {$user_id_22} + {$account.22.user_id} - {$user_password_22} + {$account.22.password} - {$display_name_22} + {$account.22.display_name} 0 @@ -2402,14 +2411,14 @@ - {$user_id_23} + {$account.23.user_id} - {$user_id_23} + {$account.23.user_id} - {$user_password_23} + {$account.23.password} - {$display_name_23} + {$account.23.display_name} 0 @@ -2427,14 +2436,14 @@ - {$user_id_24} + {$account.24.user_id} - {$user_id_24} + {$account.24.user_id} - {$user_password_24} + {$account.24.password} - {$display_name_24} + {$account.24.display_name} 0 diff --git a/resources/templates/provision/grandstream/gxw410x/{$mac}.xml b/resources/templates/provision/grandstream/gxw410x/{$mac}.xml index 4905d0ad57..2f3fbff187 100644 --- a/resources/templates/provision/grandstream/gxw410x/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw410x/{$mac}.xml @@ -30,8 +30,11 @@ 1 - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxw410x/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxw410x {else} {$domain_name}{$project_path}/app/provision {/if} @@ -82,7 +85,7 @@ - {$server_address_1} + {$account.1.server_address} @@ -155,7 +158,7 @@ - {$server_address_2} + {$account.2.server_address} @@ -227,7 +230,7 @@ - {$server_address_3} + {$account.3.server_address} @@ -423,30 +426,30 @@ - {$user_id_1} - {$user_id_1} - {$user_password_1} + {$account.1.user_id} + {$account.1.user_id} + {$account.1.password} 3000 - {$user_id_2} - {$user_id_2} - {$user_password_2} + {$account.2.user_id} + {$account.2.user_id} + {$account.2.password} 3000 - {$user_id_3} - {$user_id_3} - {$user_password_3} + {$account.3.user_id} + {$account.3.user_id} + {$account.3.password} 3000 - {$user_id_4} - {$user_id_4} - {$user_password_4} + {$account.4.user_id} + {$account.4.user_id} + {$account.4.password} 3000 @@ -553,7 +556,13 @@ - {x+) + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + diff --git a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml index c20e7422fd..f631468c81 100644 --- a/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml +++ b/resources/templates/provision/grandstream/gxw42xx/{$mac}.xml @@ -168,8 +168,11 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/gxw40xx/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/gxw40xx {else} {$domain_name}{$project_path}/app/provision {/if} @@ -519,7 +522,7 @@ -{$server_address_1} +{$account.1.server_address} @@ -994,7 +997,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -2536,7 +2544,7 @@ -{$server_address_4} +{$account.4.server_address} @@ -3217,10 +3225,10 @@ -{$user_id_1} -{$user_id_1} -{$user_password_1} -{$display_name_1} +{$account.1.user_id} +{$account.1.user_id} +{$account.1.password} +{$account.1.display_name} 0 1 @@ -3232,10 +3240,10 @@ 5060 -{$user_id_2} -{$user_id_2} -{$user_password_2} -{$display_name_2} +{$account.2.user_id} +{$account.2.user_id} +{$account.2.password} +{$account.2.display_name} 0 1 @@ -3247,10 +3255,10 @@ 5060 -{$user_id_3} -{$user_id_3} -{$user_password_3} -{$display_name_3} +{$account.3.user_id} +{$account.3.user_id} +{$account.3.password} +{$account.3.display_name} 0 1 @@ -3262,10 +3270,10 @@ 5060 -{$user_id_4} -{$user_id_4} -{$user_password_4} -{$display_name_4} +{$account.4.user_id} +{$account.4.user_id} +{$account.4.password} +{$account.4.display_name} 1 @@ -3277,10 +3285,10 @@ 5060 -{$user_id_5} -{$user_id_5} -{$user_password_5} -{$display_name_5} +{$account.5.user_id} +{$account.5.user_id} +{$account.5.password} +{$account.5.display_name} 0 1 @@ -3292,10 +3300,10 @@ 5060 -{$user_id_6} -{$user_id_6} -{$user_password_6} -{$display_name_6} +{$account.6.user_id} +{$account.6.user_id} +{$account.6.password} +{$account.6.display_name} 0 1 @@ -3307,10 +3315,10 @@ 5060 -{$user_id_7} -{$user_id_7} -{$user_password_7} -{$display_name_7} +{$account.7.user_id} +{$account.7.user_id} +{$account.7.password} +{$account.7.display_name} 0 1 @@ -3322,10 +3330,10 @@ 5060 -{$user_id_8} -{$user_id_8} -{$user_password_8} -{$display_name_8} +{$account.8.user_id} +{$account.8.user_id} +{$account.8.password} +{$account.8.display_name} 0 1 @@ -3337,10 +3345,10 @@ 5060 -{$user_id_9} -{$user_id_9} -{$user_password_9} -{$display_name_9} +{$account.9.user_id} +{$account.9.user_id} +{$account.9.password} +{$account.9.display_name} 0 1 @@ -3352,10 +3360,10 @@ 5060 -{$user_id_10} -{$user_id_10} -{$user_password_10} -{$display_name_10} +{$account.10.user_id} +{$account.10.user_id} +{$account.10.password} +{$account.10.display_name} 0 1 @@ -3367,10 +3375,10 @@ 5060 -{$user_id_11} -{$user_id_11} -{$user_password_11} -{$display_name_11} +{$account.11.user_id} +{$account.11.user_id} +{$account.11.password} +{$account.11.display_name} 0 1 @@ -3382,10 +3390,10 @@ 5060 -{$user_id_12} -{$user_id_12} -{$user_password_12} -{$display_name_12} +{$account.12.user_id} +{$account.12.user_id} +{$account.12.password} +{$account.12.display_name} 0 1 @@ -3397,10 +3405,10 @@ 5060 -{$user_id_13} -{$user_id_13} -{$user_password_13} -{$display_name_13} +{$account.13.user_id} +{$account.13.user_id} +{$account.13.password} +{$account.13.display_name} 0 1 @@ -3412,10 +3420,10 @@ 5060 -{$user_id_14} -{$user_id_14} -{$user_password_14} -{$display_name_14} +{$account.14.user_id} +{$account.14.user_id} +{$account.14.password} +{$account.14.display_name} 0 1 @@ -3427,10 +3435,10 @@ 5060 -{$user_id_15} -{$user_id_15} -{$user_password_15} -{$display_name_15} +{$account.15.user_id} +{$account.15.user_id} +{$account.15.password} +{$account.15.display_name} 0 1 @@ -3442,10 +3450,10 @@ 5060 -{$user_id_16} -{$user_id_16} -{$user_password_16} -{$display_name_16} +{$account.16.user_id} +{$account.16.user_id} +{$account.16.password} +{$account.16.display_name} 0 1 @@ -3457,10 +3465,10 @@ 5060 -{$user_id_17} -{$user_id_17} -{$user_password_17} -{$display_name_17} +{$account.17.user_id} +{$account.17.user_id} +{$account.17.password} +{$account.17.display_name} 0 1 @@ -3472,10 +3480,10 @@ 5060 -{$user_id_18} -{$user_id_18} -{$user_password_18} -{$display_name_18} +{$account.18.user_id} +{$account.18.user_id} +{$account.18.password} +{$account.18.display_name} 0 1 @@ -3487,10 +3495,10 @@ 5060 -{$user_id_19} -{$user_id_19} -{$user_password_19} -{$display_name_19} +{$account.19.user_id} +{$account.19.user_id} +{$account.19.password} +{$account.19.display_name} 0 1 @@ -3502,10 +3510,10 @@ 5060 -{$user_id_20} -{$user_id_20} -{$user_password_20} -{$display_name_20} +{$account.20.user_id} +{$account.20.user_id} +{$account.20.password} +{$account.20.display_name} 0 1 @@ -3517,10 +3525,10 @@ 5060 -{$user_id_21} -{$user_id_21} -{$user_password_21} -{$display_name_21} +{$account.21.user_id} +{$account.21.user_id} +{$account.21.password} +{$account.21.display_name} 0 1 @@ -3532,10 +3540,10 @@ 5060 -{$user_id_22} -{$user_id_22} -{$user_password_22} -{$display_name_22} +{$account.22.user_id} +{$account.22.user_id} +{$account.22.password} +{$account.22.display_name} 0 1 @@ -3547,10 +3555,10 @@ 5060 -{$user_id_23} -{$user_id_23} -{$user_password_23} -{$display_name_23} +{$account.23.user_id} +{$account.23.user_id} +{$account.23.password} +{$account.23.display_name} 0 1 @@ -3562,10 +3570,10 @@ 5060 -{$user_id_24} -{$user_id_24} -{$user_password_24} -{$display_name_24} +{$account.24.user_id} +{$account.24.user_id} +{$account.24.password} +{$account.24.display_name} 0 1 @@ -3577,10 +3585,10 @@ 5060 -{$user_id_25} -{$user_id_25} -{$user_password_25} -{$display_name_25} +{$account.25.user_id} +{$account.25.user_id} +{$account.25.password} +{$account.25.display_name} 0 1 @@ -3593,10 +3601,10 @@ -{$user_id_26} -{$user_id_26} -{$user_password_26} -{$display_name_26} +{$account.26.user_id} +{$account.26.user_id} +{$account.26.password} +{$account.26.display_name} 0 1 @@ -3608,10 +3616,10 @@ 5060 -{$user_id_27} -{$user_id_27} -{$user_password_27} -{$display_name_27} +{$account.27.user_id} +{$account.27.user_id} +{$account.27.password} +{$account.27.display_name} 0 1 @@ -3623,10 +3631,10 @@ 5060 -{$user_id_28} -{$user_id_28} -{$user_password_28} -{$display_name_28} +{$account.28.user_id} +{$account.28.user_id} +{$account.28.password} +{$account.28.display_name} 0 1 @@ -3638,10 +3646,10 @@ 5060 -{$user_id_29} -{$user_id_29} -{$user_password_29} -{$display_name_29} +{$account.29.user_id} +{$account.29.user_id} +{$account.29.password} +{$account.29.display_name} 0 1 @@ -3653,10 +3661,10 @@ 5060 -{$user_id_30} -{$user_id_30} -{$user_password_30} -{$display_name_30} +{$account.30.user_id} +{$account.30.user_id} +{$account.30.password} +{$account.30.display_name} 0 1 @@ -3668,10 +3676,10 @@ 5060 -{$user_id_31} -{$user_id_31} -{$user_password_31} -{$display_name_31} +{$account.31.user_id} +{$account.31.user_id} +{$account.31.password} +{$account.31.display_name} 0 1 @@ -3683,10 +3691,10 @@ 5060 -{$user_id_32} -{$user_id_32} -{$user_password_32} -{$display_name_32} +{$account.32.user_id} +{$account.32.user_id} +{$account.32.password} +{$account.32.display_name} 0 1 @@ -3698,10 +3706,10 @@ 5060 -{$user_id_33} -{$user_id_33} -{$user_password_33} -{$display_name_33} +{$account.33.user_id} +{$account.33.user_id} +{$account.33.password} +{$account.33.display_name} 0 1 @@ -3713,10 +3721,10 @@ 5060 -{$user_id_34} -{$user_id_34} -{$user_password_34} -{$display_name_34} +{$account.34.user_id} +{$account.34.user_id} +{$account.34.password} +{$account.34.display_name} 0 1 @@ -3728,10 +3736,10 @@ 5060 -{$user_id_35} -{$user_id_35} -{$user_password_35} -{$display_name_35} +{$account.34.user_id} +{$account.34.user_id} +{$account.34.password} +{$account.34.display_name} 0 1 @@ -3743,10 +3751,10 @@ 5060 -{$user_id_36} -{$user_id_36} -{$user_password_36} -{$display_name_36} +{$account.36.user_id} +{$account.36.user_id} +{$account.36.password} +{$account.36.display_name} 0 1 @@ -3758,10 +3766,10 @@ 5060 -{$user_id_37} -{$user_id_37} -{$user_password_37} -{$display_name_37} +{$account.37.user_id} +{$account.37.user_id} +{$account.37.password} +{$account.37.display_name} 0 1 @@ -3773,10 +3781,10 @@ 5060 -{$user_id_38} -{$user_id_38} -{$user_password_38} -{$display_name_38} +{$account.38.user_id} +{$account.38.user_id} +{$account.38.password} +{$account.38.display_name} 0 1 @@ -3788,10 +3796,10 @@ 5060 -{$user_id_39} -{$user_id_39} -{$user_password_39} -{$display_name_39} +{$account.39.user_id} +{$account.39.user_id} +{$account.39.password} +{$account.39.display_name} 0 1 @@ -3803,10 +3811,10 @@ 5060 -{$user_id_40} -{$user_id_40} -{$user_password_40} -{$display_name_40} +{$account.40.user_id} +{$account.40.user_id} +{$account.40.password} +{$account.40.display_name} 0 1 @@ -3818,10 +3826,10 @@ 5060 -{$user_id_41} -{$user_id_41} -{$user_password_41} -{$display_name_41} +{$account.41.user_id} +{$account.41.user_id} +{$account.41.password} +{$account.41.display_name} 0 1 @@ -3833,10 +3841,10 @@ 5060 -{$user_id_42} -{$user_id_42} -{$user_password_42} -{$display_name_42} +{$account.42.user_id} +{$account.42.user_id} +{$account.42.password} +{$account.42.display_name} 0 1 @@ -3848,10 +3856,10 @@ 5060 -{$user_id_43} -{$user_id_43} -{$user_password_43} -{$display_name_43} +{$account.43.user_id} +{$account.43.user_id} +{$account.43.password} +{$account.43.display_name} 0 1 @@ -3863,10 +3871,10 @@ 5060 -{$user_id_44} -{$user_id_44} -{$user_password_44} -{$display_name_44} +{$account.44.user_id} +{$account.44.user_id} +{$account.44.password} +{$account.44.display_name} 0 1 @@ -3878,10 +3886,10 @@ 5060 -{$user_id_45} -{$user_id_45} -{$user_password_45} -{$display_name_45} +{$account.45.user_id} +{$account.45.user_id} +{$account.45.password} +{$account.45.display_name} 0 1 @@ -3893,10 +3901,10 @@ 5060 -{$user_id_46} -{$user_id_46} -{$user_password_46} -{$display_name_46} +{$account.46.user_id} +{$account.46.user_id} +{$account.46.password} +{$account.46.display_name} 0 1 @@ -3908,10 +3916,10 @@ 5060 -{$user_id_47} -{$user_id_47} -{$user_password_47} -{$display_name_47} +{$account.47.user_id} +{$account.47.user_id} +{$account.47.password} +{$account.47.display_name} 0 1 @@ -3923,10 +3931,10 @@ 5060 -{$user_id_48} -{$user_id_48} -{$user_password_48} -{$display_name_48} +{$account.48.user_id} +{$account.48.user_id} +{$account.48.password} +{$account.48.display_name} 0 1 diff --git a/resources/templates/provision/grandstream/ht502/{$mac}.xml b/resources/templates/provision/grandstream/ht502/{$mac}.xml index a36e13d687..832a44f676 100644 --- a/resources/templates/provision/grandstream/ht502/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht502/{$mac}.xml @@ -39,11 +39,14 @@ 2 - {if isset($grandstream_firmware_path)} - {$grandstream_firmware_path} - {else} - {$domain_name}{$project_path}/app/provision - {/if} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/ht502/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/ht502 + {else} + {$domain_name}{$project_path}/app/provision + {/if} {$domain_name}{$project_path}/app/provision @@ -173,7 +176,7 @@ 1 - {$server_address_1} + {$account.1.server_address} @@ -319,7 +322,13 @@ 1 + + {if isset($grandstream_dial_plan) } {$grandstream_dial_plan} + {else} + {literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} + {/if} + 0 @@ -514,7 +523,7 @@ 1 - {$server_address_2} + {$account.2.server_address} @@ -526,13 +535,13 @@ 0 - {$user_id_2} + {$account.2.user_id} - {$user_id_2} + {$account.2.user_id} - {$user_password_2} + {$account.2.password} - {$display_name_2} + {$account.2.display_name} 0 diff --git a/resources/templates/provision/grandstream/ht503/{$mac}.xml b/resources/templates/provision/grandstream/ht503/{$mac}.xml index 5c2fd06630..d0989c927d 100644 --- a/resources/templates/provision/grandstream/ht503/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht503/{$mac}.xml @@ -136,8 +136,11 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/ht503/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/ht503 {else} {$domain_name}{$project_path}/app/provision {/if} @@ -399,19 +402,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -680,7 +683,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -1033,7 +1041,7 @@ -{$server_address_1 +{$server_address_1} @@ -1060,19 +1068,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{Display_name_1} +{$account.1.display_name} diff --git a/resources/templates/provision/grandstream/ht701/{$mac}.xml b/resources/templates/provision/grandstream/ht701/{$mac}.xml index 88ce52dabe..38ab5b94cc 100644 --- a/resources/templates/provision/grandstream/ht701/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht701/{$mac}.xml @@ -61,9 +61,10 @@ - -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/ht701/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/ht701 {else} {$domain_name}{$project_path}/app/provision {/if} @@ -275,7 +276,7 @@ -{$server_address_1} +{$account.1.server_address} @@ -311,19 +312,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.auth_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -609,7 +610,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -956,7 +962,7 @@ -{$server_address_2} +{$account.2.server_address} @@ -983,19 +989,19 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} diff --git a/resources/templates/provision/grandstream/ht702/{$mac}.xml b/resources/templates/provision/grandstream/ht702/{$mac}.xml index e65bcc0dcb..910b6af9c5 100644 --- a/resources/templates/provision/grandstream/ht702/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht702/{$mac}.xml @@ -70,8 +70,12 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} + + +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/ht702/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/ht702 {else} {$domain_name}{$project_path}/app/provision {/if} @@ -303,19 +307,19 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} @@ -598,7 +602,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -948,7 +957,7 @@ -{$server_address_2} +{$account.2.server_address} @@ -975,19 +984,19 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} diff --git a/resources/templates/provision/grandstream/ht704/{$mac}.xml b/resources/templates/provision/grandstream/ht704/{$mac}.xml index 14b34d0287..9db23a49f6 100644 --- a/resources/templates/provision/grandstream/ht704/{$mac}.xml +++ b/resources/templates/provision/grandstream/ht704/{$mac}.xml @@ -68,8 +68,10 @@ 2 -{if isset($grandstream_firmware_path)} -{$grandstream_firmware_path} +{if isset($grandstream_firmware_path) && isset($firmware_version)} +{$grandstream_firmware_path}/ht704/{$firmware_version} +{elseif isset($grandstream_firmware_path)} +{$grandstream_firmware_path}/ht704 {else} {$domain_name}{$project_path}/app/provision {/if} @@ -329,7 +331,7 @@ -{$server_address_1} +{$account.1.server_address} @@ -360,8 +362,8 @@ -{if isset($grandstream_nat_traversal_1)} -{$grandstream_nat_traversal_1} +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} {else} 0 {/if} @@ -654,7 +656,12 @@ + +{if isset($grandstream_dial_plan) } {$grandstream_dial_plan} +{else} +{literal}{x+|*x+|*++|\p\a\r\k\+*x+| \f\l\o\w\+*x+}{/literal} +{/if} @@ -997,7 +1004,7 @@ -{$server_address_2} +{$account.2.server_address} @@ -1647,16 +1654,16 @@ -{$user_id_1} +{$account.1.user_id} -{$user_id_1} +{$account.1.user_id} -{$user_password_1} +{$account.1.password} -{$display_name_1} +{$account.1.display_name} 0 @@ -1672,16 +1679,16 @@ -{$user_id_2} +{$account.2.user_id} -{$user_id_2} +{$account.2.user_id} -{$user_password_2} +{$account.2.password} -{$display_name_2} +{$account.2.display_name} 0 @@ -1697,16 +1704,16 @@ -{$user_id_3} +{$account.3.user_id} -{$user_id_3} +{$account.3.user_id} -{$user_password_3} +{$account.3.password} -{$display_name_3} +{$account.3.display_name} 0 @@ -1722,16 +1729,16 @@ -{$user_id_4} +{$account.4.user_id} -{$user_id_4} +{$account.4.user_id} -{$user_password_3} +{$account.4.password} -{$display_name_4} +{$account.4.display_name} 1 diff --git a/resources/templates/provision/grandstream/ht802/{mac}.xml b/resources/templates/provision/grandstream/ht802/{mac}.xml new file mode 100644 index 0000000000..d13752ce35 --- /dev/null +++ b/resources/templates/provision/grandstream/ht802/{mac}.xml @@ -0,0 +1,71 @@ + + + + {$admin_password} + 1 + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/ht802/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/ht802 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + {$domain_name}{$project_path}/app/provision + + {if isset($grandstream_qos_sip)} + {$grandstream_qos_sip} + {else} + 0 + {/if} + + {if isset($grandstream_qos_rtp)} + {$grandstream_qos_rtp} + {else} + 0 + {/if} + + + {$account.1.server_address} + {$account.1.outbound_proxy} + {$account.1.user_id} + {$account.1.user_id} + {$account.1.password} + {$account.1.display_name} + 2 + 20 + 1 + 3 + 90 + 1 + 0 + 0 + 1 + 0 + + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}1{/if} + + + + {$account.2.server_address} + {$account.2.outbound_proxy} + {$account.2.user_id} + {$account.2.user_id} + {$account.2.password} + {$account.2.display_name} + 1 + 0 + 0 + 3 + 1 + 0 + + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}1{/if} + + + diff --git a/resources/templates/provision/grandstream/ht818/{$mac}.xml b/resources/templates/provision/grandstream/ht818/{$mac}.xml new file mode 100644 index 0000000000..408c539fd5 --- /dev/null +++ b/resources/templates/provision/grandstream/ht818/{$mac}.xml @@ -0,0 +1,2272 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + + + + {$admin_password} + + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + 20 + + + + + 0 + + + + + 3 + + + + + 0 + + + + + + + + 0 + + + + + 2 + + + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxw4004/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxw4004 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + + {$domain_name}{$project_path}/app/provision + + + + + + + {$http_auth_username} + + + + {$http_auth_password} + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 10080 + + + + + 1 + + + + + 22 + + + + + 1 + + + + + 1 + + + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + s1pphone + + + + + + + + + 1 + + + + + + + + + + + + + + + + 0 + + + + 300 + + + + + + + + + + + + + + + + + + + 0 + + + + + 3 + + + + + 162 + + + + + + + + + + 162 + + + + + Version 2c + + + + 5 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + 0 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + c=2000/4000; + + + + + + + f1=350@-13,f2=440@-13,c=0/0; + + + + f1=440@-19,f2=480@-19,c=2000/4000; + + + + f1=480@-24,f2=620@-24,c=500/500; + + + + f1=480@-24,f2=620@-24,c=250/250; + + + + f1=350@-11,f2=440@-11,c=100/100-100/100-100/100; + + + + f1=440@-13,c=300/300-300/10000; + + + + + + + + f1=425@-15,c=600/600; + + + + + + + + + + 2 + + + + + 0 + + + + + 1 + + + + + + + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + + + 1 + + + + + 3561 + + + + {$grandstream_syslog_server} + + + + + + {if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} + {else} + 0 + {/if} + + + + + {if isset($grandstream_send_sip_log)} + {$grandstream_send_sip_log} + {else} + 0 + {/if} + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + 1 + + + + {$account.1.server_address} + + + + + {$account.1.server_address_secondary} + + + + + 1 + + + + {$account.1.server_address_secondary} + + + + {$account.1.outbound_proxy_secondary} + + + + + 1 + + + + + 0 + + + + + {$tp=0} +{ if $account.1.sip_transport == 'udp'}{$tp=0}{/if} + {if $account.1.sip_transport == 'tcp'}{$tp=1}{/if} + {if $account.1.sip_transport == 'tls'}{$tp=2}{/if} + {if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp} + + + + + + 1 + + + + + 0 + + + + + + {if isset($grandstream_nat_traversal)} +< P52>{$grandstream_nat_traversal} +{ else} +< P52>0 +{ /if} + + + + + + {if isset($grandstream_dns_mode)} +< P103>{$grandstream_dns_mode} +{ else} +< P103>0 + {/if} + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + {$account.1.register_expires} + + + + + + 0 + + + + + 20 + + + + + 1200 + + + + + 1 + + + + + 30 + + + + + 3 + + + + 24 + + 46 (Profile1) + + + + + 5060 + + + + + 5004 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + 50 + + + + + + 400 + + + + + 0 + + + + 101 + + + + + + + 101 + + + + + 102 + + + + + 100 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + 0 + + + + + + + + + 0 + + + + + {$grandstream_call_waiting} + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 60 + + + + + 20 + + + + + 4 + + + + + 0 + + + + + + + + + 1 + + + + + 0 + + + + {if isset($grandstream_dial_plan) } + {$grandstream_dial_plan} + {else} + {literal}{ x+ | *x+ | *xx*x+ }{/literal} + {/if} + + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + + 0 + + + + + 0 + + + + + + + 100 + + + + + 1 + + + + + 180 + + + + + 90 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + + + + + 0 + + + + + + + 0 + + + + + 8 + + + + + 4 + + + + + 18 + + + + + 2 + + + + + 97 + + + + + 123 + + + + + 2 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 97 + + + + + 120 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + + + + {if isset($grandstream_srtp)} + {$grandstream_srtp} + {else} + 0 + {/if} + + + + + + + 1 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + 0 + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + 200 + + + + + 0 + + + + + + 1 + + + + + + 300 + + + + + 1100 + + + + + 400 + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 20 + + + + + 0 + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + c=2000/4000; + + + + + + + + 0 + + + + + + + + + + + + + + + {$account.1.user_id} + + + {$account.1.user_id} + + + + {$account.1.password} + + + {$account.1.display_name} + + + + 0 + + + + 0 + + + + + + 1 + + + + + + + + + + + + {$account.2.user_id} + + + {$account.2.user_id} + + + {$account.2.password} + + + {$account.2.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.2.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.3.user_id} + + + {$account.3.user_id} + + + + {$account.3.password} + + + {$account.3.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.3.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.4.user_id} + + + {$account.4.user_id} + + + + {$account.4.password} + + + {$account.4.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.4.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.5.user_id} + + + {$account.5.user_id} + + + {$account.5.password} + + + {$account.5.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.5.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.6.user_id} + + + {$account.6.user_id} + + + {$account.6.password} + + + {$account.6.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.6.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.7.user_id} + + + {$account.7.user_id} + + + {$account.7.password} + + + {$account.7.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.7.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + {$account.4.user_id} + + + {$account.4.user_id} + + + {$account.4.password} + + + {$account.4.display_name} + + + + 0 + + + + 0 + + + + + + {if isset($account.8.password)} + 1 + {else} + 0 + {/if} + + + + + + + + + + + + + + + + + + + 10 + + + + + 5 + + + + + 15 + + + + + 1 + + + + + 80 + + + + + 443 + + + + + 0 + + + + + 22 + + + + + + + 0 + + + + + + + + + + + + + 2 + + + + + 0 + + + + + phone-{$account.1.display_name} + + + + HT802 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + 0 + + + + 0 + + + + + 0 + + + + + + 192.168.100.100 + + + + 255.255.255.0 + + + + 192.168.100.1 + + + + 0.0.0.0 + + + + 0.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if isset($grandstream_timezone) } + {$grandstream_timezone} + {elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} + {else} + customize + {/if} + + + + MTZ+6MDT+5,M3.2.0,M11.1.0 + + + + + 1 + + + + + 0 + + + + + + + + + 0 + + + + + + 1024 + + + + + + 3600 + + + + + + 300 + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + 100 + + + + + 199 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/htx86/{$mac}.xml b/resources/templates/provision/grandstream/htx86/{$mac}.xml new file mode 100644 index 0000000000..35e64e54f0 --- /dev/null +++ b/resources/templates/provision/grandstream/htx86/{$mac}.xml @@ -0,0 +1,765 @@ + + + +{$mac|replace:'-':''} + + + + + + + + + + + + {$admin_password} + + + {$account.1.server_address} + + + {$account.1.outbound_proxy_primary} + + + {$account.1.user_id} + + + {$account.1.auth_id} + + + {$account.1.password} + + + 1 + + + $grandstream_stun_server + + + + + + + 2 + + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/gxp2170/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path}/gxp2170 + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {/if} + + + + + + + + + + + + + + + + + 1 + + + 10080 + + + + + + + 0 + + + + + + + 1 + + + {$tp=0} + {if $account.1.sip_transport == 'dns srv'}{$tp=1}{/if} + {$tp=0} + + + + + + + 0 + + + + + + + + + 1 + + + 5060 + + + 5004 + + + + + + 0 + + + 8 + + + 4 + + + 18 + + + 2 + + + 0 + + + 98 + + + + 9 + + + 0 + + + 97 + + + 0 + + + 0 + + + 2 + + + 48 + + + 0 + + + 0 + + + + 0 + + + + 0 + + + + + + + 1 + + + 3600 + + + 1 + + + 20 + + + 20 + + + + + + + + 2 + + + 101 + + + 0 + + + + + + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + + + + + {$account.1.display_name} + + + + + + + 0 + + + 0 + + + 1 + + + + + + 4 + + + + 1 + + + + *97 + + + + {if isset($subscribe_mwi)} + 1 + {else} + 0 + {/if} + + + + + + 0 + + + + 0 + + + {$grandstream_call_waiting} + + + 0 + + + + + + + + + + 8 + + + 0 + + + 0 + + + + 60 + + + + + + + + {$grandstream_syslog_server} + + + + {if isset($grandstream_syslog_level)} + {$grandstream_syslog_level} + {else} + 0 + {/if} + + + + + + + + 0 + + + 0 + + + 0 + + + + + + + 0 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + 2 + + + 0 + + + 0 + + + 180 + + + 90 + + + 0 + + + 0 + + + 0 + + + 0 + + + 1 + + + 0 + + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + 20 + + 200 + + 400 + + + + + + 350 + + 440 + + 0 + + 0 + + + + 350 + + 440 + + 10 + + 10 + + + + 350 + + 440 + + 10 + + 10 + + + + 350 + + 440 + + 10 + + 10 + + + + 440 + + 480 + + 200 + + 400 + + + + 480 + + 620 + + 50 + + 50 + + + + 480 + + 620 + + 25 + + 25 + + + + 1400 + + 2600 + + 10 + + 10 + + + 0 + + + 0 + + + + 0 + + + + + + + + + + + 80 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4,1,7,2,0;10,-1,7,2,0;60 + + + + 0 + + + + + + + + + + 0 + + + 0 + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/templates/provision/grandstream/wp820/phonebook.xml b/resources/templates/provision/grandstream/wp820/phonebook.xml new file mode 100644 index 0000000000..62c745db9f --- /dev/null +++ b/resources/templates/provision/grandstream/wp820/phonebook.xml @@ -0,0 +1,49 @@ + + +1 +{foreach $contacts as $contact} +{if $contact.contact_type == "group"} + +{$contact.id} +{$contact.group_description|truncate:10} + +{/if} +{/foreach} +{$i=0} +{foreach $contacts as $contact} +{if $contact.contact_name_given != "" && $contact.contact_type == "contact"} + +{$contact.contact_name_given} +{$contact.contact_name_family} +{if $contact.contact_role != "" } +{$contact.contact_role} +{/if} +{if $contact.contact_category != "" } +{$contact.contact_category} +{/if} + +{$contact.contact_work} +1 + +{if $contact.contact_home != "" } + +{$contact.contact_home} +1 + +{/if} +{if $contact.contact_cell != "" } + +{$contact.contact_cell} +1 + +{/if} +{if $contact.contact_organization != "" } +{$contact.contact_organization} +{/if} +{foreach $contact.groups as $group} +{$group} +{/foreach} + +{/if} +{/foreach} + diff --git a/resources/templates/provision/grandstream/wp820/{mac}.xml b/resources/templates/provision/grandstream/wp820/{mac}.xml new file mode 100644 index 0000000000..be17e37c86 --- /dev/null +++ b/resources/templates/provision/grandstream/wp820/{mac}.xml @@ -0,0 +1,2514 @@ + + + + {$mac|replace:'-':''} + + + + + + + + + + + + + + + + + + + + +1 + + + +{$display_name_1} + + + +{$server_address_1} + + + +{$secondary_server_address_1} + + + +{$user_id_1} + + + +{$auth_id_1} + + + +{$user_password_1} + + + +{$display_name_1} + + + + +0 + + + +*97 + + + + + +{$outbound_proxy_1} + + + + + + + + +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} +0 +{/if} + + + + +0 + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} +0 +{/if} + + + + + + + + + + + + + +1 + + + + +2 + + + + +{if isset($register_expires_1)} +{$register_expires_1} +{else} +60 +{/if} + + + + +0 + + + + +20 + + + + + +0 + + + + +0 + + + + +30 + + + + +3 + + + + +{if isset($subscribe_mwi)} +1 +{else} +0 +{/if} + + + + + +0 + + + + + +0 + + + + +{$tp=0} +{if $sip_transport_1 == 'udp'}{$tp=0}{/if} +{if $sip_transport_1 == 'tcp'}{$tp=1}{/if} +{if $sip_transport_1 == 'tls'}{$tp=2}{/if} +{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if} +{$tp} + + + + +5060 + + + + +0 + + + + +0 + + + + +1 + + + + + +50 + + + + + +400 + + + + +0 + + + + +0 + + + + +0 + + + + + +1 + + + + +180 + + + + +90 + + + + +0 + + + + +1 + + + + +0 + + + + + +0 + + + + +0 + + + + + +0 + + + + + + + + + + + + +0 + + + + +8 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +1 + + + + +0 + + + + +1 + + + + +123 + + + + +0 + + + + +1 + + + + +0 + + + + +101 + + + + +1 + + + + +0 + + + + +121 + + + + +124 + + + + +0 + + + + +2 + + + + + + +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} +0 +{/if} + + + + + +0 + + + + +1 + + + + + + + + +0 + + + + +0 + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + + + + + + + + + +4 + + + + +60 + + + + +0 + + + + +1 + + + + + + + + + + + + + + + + +{$grandstream_dial_plan} + + + + + + +0 + + + + +0 + + + + + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + + +0 + + + + +0 + + + + + + + + + + +0 + + + + + + + + +100 + + + + + + + + + + + + +{if isset($user_password_2)} +1 +{else} +0 +{/if} + + + +{$display_name_2} + + + +{$server_address_2} + + + + + + + +{$user_id_2} + + + +{$auth_id_2} + + + +{$user_password_2} + + + +{$display_name_2} + + + + +0 + + + +*97 + + + + + +{$outbound_proxy_2} + + + + + + + + +{if isset($grandstream_dns_mode)} +{$grandstream_dns_mode} +{else} +0 +{/if} + + + + +0 + + + + +{if isset($grandstream_nat_traversal)} +{$grandstream_nat_traversal} +{else} +0 +{/if} + + + + + + + + + + + + + +1 + + + + +0 + + + + +{if isset($register_expires_2)} +{$register_expires_12} +{else} +60 +{/if} + + + + +0 + + + + +20 + + + + + +0 + + + + +0 + + + + +30 + + + + +3 + + + + +{if isset($subscribe_mwi)} +1 +{else} +0 +{/if} + + + + + +0 + + + + + +0 + + + + +{$tp=0} +{if $sip_transport_2 == 'udp'}{$tp=0}{/if} +{if $sip_transport_2 == 'tcp'}{$tp=1}{/if} +{if $sip_transport_2 == 'tls'}{$tp=2}{/if} +{if $sip_transport_2 == 'dns srv'}{$tp=1}{/if} +{$tp} + + + + +5060 + + + + +1 + + + + +0 + + + + +1 + + + + + +50 + + + + + +400 + + + + +0 + + + + +0 + + + + +0 + + + + + +1 + + + + +180 + + + + +90 + + + + +0 + + + + +1 + + + + +0 + + + + + +0 + + + + +0 + + + + + +0 + + + + + + + + + + + + +0 + + + + +8 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +9 + + + + +1 + + + + +0 + + + + +1 + + + + +123 + + + + +0 + + + + +1 + + + + +0 + + + + +101 + + + + +1 + + + + +0 + + + + +121 + + + + +124 + + + + +0 + + + + +2 + + + + + + +{if isset($grandstream_srtp)} +{$grandstream_srtp} +{else} +0 +{/if} + + + + + +0 + + + + +0 + + + + + + + + +0 + + + + +0 + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +1 + + + + +0 + + + + + + + + + + + + +4 + + + + +60 + + + + +0 + + + + +1 + + + + + + + + + + + + + + + + +{$grandstream_dial_plan} + + + + + + +0 + + + + +0 + + + + + +0 + + + + + + + + + +0 + + + + + + + + + +0 + + + + + + + + + +0 + + + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + + +0 + + + + +0 + + + + + + + + + + +0 + + + + + +100 + + + + + + + + + + +50040 + + + + +0 + + + + +0 + + + + +20 + + + +stun.ipvideotalk.com + + + + + + + + + + + +0 + + + +0 + + + + + + + + + + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + +1 + + + + +0 + + + +0 + + + + +1 + + + + +0 + + + + + + + + + + + + +30 + + + + +0 + + + + +0 + + + +2 + + + +[()-] + + + + +1 + + + + + + +0 + + + +f + + + + + + + +f + + + +f + + + +f + + + +f + + + +f + + + + +0 + + + + + + + + + + + + + +0 + + + + +30 + + + + +0 + + + + +0 + + + + +8 + + + +channel(*) + + + +224.0.1.116:5001 + + + + +1 + + + + +24 + + + + +25 + + + + +1100000000000000000000011 + + + + +1100000000000000000000011 + + + + +1111111111111111111111111 + + + + +1111111111111111111111111 + + + + + + + + + + + + + +1 + + + + +0 + + + + +30 + + + + +0 + + + + +0 + + + +channel(*) + + + + +26 + + + + +49 + + + + +50 + + + + + + + + + +1100000000000000000000011 + + + + +1100000000000000000000011 + + + + +1111111111111111111111111 + + + + +1111111111111111111111111 + + + + + + + + + + + + +0 + + + + +0 + + + + +0 + + + + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + + + + + + + + + + + + + + + + + + + + + + + + + +phone-{$user_id_1} + + + +Grandstream WP800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($ntp_server_primary)} +{$ntp_server_primary} +{else} +pool.ntp.org +{/if} + + + + + +1 + + + + + +1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($grandstream_timezone) } +{$grandstream_timezone} +{else} + +{/if} + + + + +0 + + + + +2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +en_US + + + + + + +1 + + + + +0 + + + + +80 + + + + +0 + + + + + + +{$admin_password} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + +0 + + + +86400 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 + + + +{if isset($grandstream_firmware_path)} +{$grandstream_firmware_path} +{else} +{$domain_name}{$project_path}/app/provision +{/if} + + + + + + + + + + + + + + + + + + + + + + + +2 + + + +{if $grandstream_config_server_path=="none"} + +{elseif isset($grandstream_config_server_path)} +{$grandstream_config_server_path} +{else} +{$domain_name}{$project_path}/app/provision +{/if} + + + +{$http_auth_username} + + + +{$http_auth_password} + + + + +0 + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + +1 + + + +1440 + + + +1 + + + + +1 + + + + + + + +0 + + + +1 + + + + + + +1 + + + + + +0 + + + +1 + + + + + + + +0 + + + + +0 + + + + + +1 + + + + + + + +0 + + + + +{$grandstream_syslog_server} + + + + +{if isset($grandstream_syslog_level)} +{$grandstream_syslog_level} +{else} +0 +{/if} + + + + + + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{if isset($contact_grandstream)} +1 +{else} +0 +{/if} + + + + + + +{if isset($contact_grandstream)} +{$grandstream_phonebook_xml_server_path}{$mac}/ +{elseif isset($grandstream_phonebook_xml_server_path)} +{$grandstream_phonebook_xml_server_path} +{else} + +{/if} + + + + + + + + + + + + +{if isset($grandstream_phonebook_download_interval)} +{$grandstream_phonebook_download_interval} +{else} +0 +{/if} + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/templates/provision/htek/uc903/{$mac}.cfg b/resources/templates/provision/htek/uc903/{$mac}.cfg index d5405c5410..f757d49868 100644 --- a/resources/templates/provision/htek/uc903/{$mac}.cfg +++ b/resources/templates/provision/htek/uc903/{$mac}.cfg @@ -3,19 +3,25 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} - {$htek_transport} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} + + + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$htek_dns_mode} 0 1 @@ -132,19 +138,25 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} - {$htek_transport} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} + + + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +273,25 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} - {$htek_transport} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} + + + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$htek_dns_mode} 0 1 @@ -1005,7 +1023,7 @@ 3 http://h-tek.com/fm - http://{$domain_name}/app/provision + https://{$domain_name}/app/provision 66 1 1 @@ -2338,7 +2356,7 @@ 0 - 0 + 2 0 0 1 @@ -2393,8 +2411,8 @@ 0 8 0 - 0 - 0 + 1 + 1 1 0 diff --git a/resources/templates/provision/htek/uc923/{$mac}.cfg b/resources/templates/provision/htek/uc923/{$mac}.cfg index d5405c5410..f757d49868 100644 --- a/resources/templates/provision/htek/uc923/{$mac}.cfg +++ b/resources/templates/provision/htek/uc923/{$mac}.cfg @@ -3,19 +3,25 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} - {$htek_transport} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} + + + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$htek_dns_mode} 0 1 @@ -132,19 +138,25 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} - {$htek_transport} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} + + + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +273,25 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} - {$htek_transport} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} + + + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$htek_dns_mode} 0 1 @@ -1005,7 +1023,7 @@ 3 http://h-tek.com/fm - http://{$domain_name}/app/provision + https://{$domain_name}/app/provision 66 1 1 @@ -2338,7 +2356,7 @@ 0 - 0 + 2 0 0 1 @@ -2393,8 +2411,8 @@ 0 8 0 - 0 - 0 + 1 + 1 1 0 diff --git a/resources/templates/provision/htek/uc924/{$mac}.cfg b/resources/templates/provision/htek/uc924/{$mac}.cfg index d5405c5410..b0992b2b8e 100644 --- a/resources/templates/provision/htek/uc924/{$mac}.cfg +++ b/resources/templates/provision/htek/uc924/{$mac}.cfg @@ -3,19 +3,25 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} - {$htek_transport} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} + + + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$htek_dns_mode} 0 1 @@ -132,19 +138,25 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} - {$htek_transport} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} + + + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name_2} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +273,25 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} - {$htek_transport} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} + + + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$htek_dns_mode} 0 1 @@ -1005,7 +1023,7 @@ 3 http://h-tek.com/fm - http://{$domain_name}/app/provision + https://{$domain_name}/app/provision 66 1 1 @@ -2338,7 +2356,7 @@ 0 - 0 + 2 0 0 1 @@ -2393,8 +2411,8 @@ 0 8 0 - 0 - 0 + 1 + 1 1 0 diff --git a/resources/templates/provision/htek/uc926/{$mac}.cfg b/resources/templates/provision/htek/uc926/{$mac}.cfg index d5405c5410..4c5b38d8d9 100644 --- a/resources/templates/provision/htek/uc926/{$mac}.cfg +++ b/resources/templates/provision/htek/uc926/{$mac}.cfg @@ -3,19 +3,25 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} - {$htek_transport} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} + + + {if $account.1.sip_transport == 'udp'}0{/if} + {if $account.1.sip_transport == 'tcp'}1{/if} + {if $account.1.sip_transport == 'tls'}2{/if} + {if $account.1.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$htek_dns_mode} 0 1 @@ -132,19 +138,25 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} - {$htek_transport} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} + + + {if $account.2.sip_transport == 'udp'}0{/if} + {if $account.2.sip_transport == 'tcp'}1{/if} + {if $account.2.sip_transport == 'tls'}2{/if} + {if $account.2.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id_2} + {$account.2.auth_id_2} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +273,25 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} - {$htek_transport} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} + + + {if $account.3.sip_transport == 'udp'}0{/if} + {if $account.3.sip_transport == 'tcp'}1{/if} + {if $account.3.sip_transport == 'tls'}2{/if} + {if $account.3.sip_transport == 'dns srv'}3{/if} + 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$htek_dns_mode} 0 1 @@ -1005,7 +1023,7 @@ 3 http://h-tek.com/fm - http://{$domain_name}/app/provision + https://{$domain_name}/app/provision 66 1 1 @@ -2338,7 +2356,7 @@ 0 - 0 + 2 0 0 1 @@ -2393,8 +2411,8 @@ 0 8 0 - 0 - 0 + 1 + 1 1 0 diff --git a/resources/templates/provision/linksys/spa2102/{$mac}.xml b/resources/templates/provision/linksys/spa2102/{$mac}.xml index df809db138..c391201f24 100644 --- a/resources/templates/provision/linksys/spa2102/{$mac}.xml +++ b/resources/templates/provision/linksys/spa2102/{$mac}.xml @@ -15,25 +15,25 @@ yes -{$server_address_1} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.server_address} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No G729a -{$register_expires_1} +{$account.1.register_expires} (1xxx[2-9]xxxxxxS0|[*#x]x.) yes -{$server_address_2} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.server_address} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No G729a -{$register_expires_2} +{$account.2.register_expires} (1xxx[2-9]xxxxxxS0|[*#x]x.) diff --git a/resources/templates/provision/linksys/spa3102/{$mac}.xml b/resources/templates/provision/linksys/spa3102/{$mac}.xml index ebad638fdd..9791658083 100644 --- a/resources/templates/provision/linksys/spa3102/{$mac}.xml +++ b/resources/templates/provision/linksys/spa3102/{$mac}.xml @@ -65,8 +65,8 @@ {$spa_time_zone} - {$server_address_1} - {$sip_port_1} + {$account.1.server_address} + {$account.1.sip_port} no yes - {$user_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.user_id} + {$account.1.password} + {$account.1.display_name} no yes diff --git a/resources/templates/provision/linksys/spa921/{$mac}.xml b/resources/templates/provision/linksys/spa921/{$mac}.xml index 73ae7f0346..96ad90c5e2 100644 --- a/resources/templates/provision/linksys/spa921/{$mac}.xml +++ b/resources/templates/provision/linksys/spa921/{$mac}.xml @@ -14,16 +14,16 @@ {$spa_time_zone} start=9/27/0/2;end=4/4/0/3;save=0 No -{$server_address_1} -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.server_address} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No G711u -{$server_address_2} -{$display_name_2} -{$user_id_2} -{$user_password_2} +{$account.2.server_address} +{$account.2.display_name} +{$account.2.user_id} +{$account.2.password} No G711u diff --git a/resources/templates/provision/linksys/spa941/{$mac}.xml b/resources/templates/provision/linksys/spa941/{$mac}.xml index ef43866d2f..1acbc2fc2d 100644 --- a/resources/templates/provision/linksys/spa941/{$mac}.xml +++ b/resources/templates/provision/linksys/spa941/{$mac}.xml @@ -109,9 +109,9 @@ G723 encaprtp No -{$cisco_handle_via_rport} +{$spa_handle_via_rport} No -{$cisco_insert_via_rport} +{$spa_insert_via_rport} No No No @@ -368,7 +368,7 @@ No Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 Yes @@ -411,21 +411,21 @@ No -{$server_address_1} +{$account.1.server_address} No Yes Yes No -{$register_expires_1} +{$account.1.register_expires} No No No 3600 Normal -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -449,7 +449,7 @@ Yes Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 Yes @@ -498,7 +498,7 @@ Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No No No @@ -530,7 +530,7 @@ Yes Yes -{if $shared_line_3 == "shared"}shared{else}private{/if} +{if $account.3.shared_line == "shared"}shared{else}private{/if} 3600 Yes @@ -611,7 +611,7 @@ Yes Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 Yes diff --git a/resources/templates/provision/linksys/spa942/{$mac}.xml b/resources/templates/provision/linksys/spa942/{$mac}.xml index ef43866d2f..6879642915 100644 --- a/resources/templates/provision/linksys/spa942/{$mac}.xml +++ b/resources/templates/provision/linksys/spa942/{$mac}.xml @@ -368,7 +368,7 @@ No Yes -{if $shared_line_1 == "shared"}shared{else}private{/if} +{if $account.1.shared_line == "shared"}shared{else}private{/if} 3600 Yes @@ -411,7 +411,7 @@ No -{$server_address_1} +{$account.1.server_address} No Yes @@ -423,9 +423,9 @@ No 3600 Normal -{$display_name_1} -{$user_id_1} -{$user_password_1} +{$account.1.display_name} +{$account.1.user_id} +{$account.1.password} No @@ -449,7 +449,7 @@ Yes Yes -{if $shared_line_2 == "shared"}shared{else}private{/if} +{if $account.2.shared_line == "shared"}shared{else}private{/if} 3600 Yes @@ -498,7 +498,7 @@ Yes Yes No -{$register_expires_2} +{$account.2.register_expires} No No No @@ -579,7 +579,7 @@ Yes Yes No -{$register_expires_3} +{$account.3.register_expires} No No No @@ -611,7 +611,7 @@ Yes Yes -{if $shared_line_4 == "shared"}shared{else}private{/if} +{if $account.4.shared_line == "shared"}shared{else}private{/if} 3600 Yes diff --git a/resources/templates/provision/mitel/5324/MN_{$mac}.cfg b/resources/templates/provision/mitel/5324/MN_{$mac}.cfg index 170dfa1acd..23537bcda2 100644 --- a/resources/templates/provision/mitel/5324/MN_{$mac}.cfg +++ b/resources/templates/provision/mitel/5324/MN_{$mac}.cfg @@ -268,14 +268,14 @@ 0 {foreach $keys["line"] as $row} -{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if} -{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if} -{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if} -{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if} -{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if} -{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if} -{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if} -{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if} +{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $account.1.user_id}{/if} +{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $account.2.user_id}{/if} +{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $account.3.user_id}{/if} +{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $account.4.user_id}{/if} +{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $account.5.user_id}{/if} +{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $account.6.user_id}{/if} +{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $account.7.user_id}{/if} +{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $account.8.user_id}{/if} {if $row.device_key_type == "6"} {else} @@ -353,4 +353,4 @@ 0.0.0.0 --> 7.2 - \ No newline at end of file + diff --git a/resources/templates/provision/mitel/5330/MN_{$mac}.cfg b/resources/templates/provision/mitel/5330/MN_{$mac}.cfg index 8eeefce6ea..ab4108f7b6 100644 --- a/resources/templates/provision/mitel/5330/MN_{$mac}.cfg +++ b/resources/templates/provision/mitel/5330/MN_{$mac}.cfg @@ -268,14 +268,14 @@ 0 {foreach $keys["line"] as $row} -{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if} -{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if} -{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if} -{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if} -{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if} -{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if} -{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if} -{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if} +{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $account.1.user_id}{/if} +{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $account.2.user_id}{/if} +{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $account.3.user_id}{/if} +{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $account.4.user_id}{/if} +{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $account.5.user_id}{/if} +{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $account.6.user_id}{/if} +{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $account.7.user_id}{/if} +{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $account.8.user_id}{/if} {if $row.device_key_type == "6"} {else} @@ -353,4 +353,4 @@ 0.0.0.0 --> 7.2 - \ No newline at end of file + diff --git a/resources/templates/provision/mitel/5340/MN_{$mac}.cfg b/resources/templates/provision/mitel/5340/MN_{$mac}.cfg index 170dfa1acd..23537bcda2 100644 --- a/resources/templates/provision/mitel/5340/MN_{$mac}.cfg +++ b/resources/templates/provision/mitel/5340/MN_{$mac}.cfg @@ -268,14 +268,14 @@ 0 {foreach $keys["line"] as $row} -{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if} -{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if} -{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if} -{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if} -{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if} -{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if} -{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if} -{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if} +{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $account.1.user_id}{/if} +{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $account.2.user_id}{/if} +{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $account.3.user_id}{/if} +{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $account.4.user_id}{/if} +{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $account.5.user_id}{/if} +{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $account.6.user_id}{/if} +{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $account.7.user_id}{/if} +{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $account.8.user_id}{/if} {if $row.device_key_type == "6"} {else} @@ -353,4 +353,4 @@ 0.0.0.0 --> 7.2 - \ No newline at end of file + diff --git a/resources/templates/provision/panasonic/tgp500/{$mac}.cfg b/resources/templates/provision/panasonic/tgp500/{$mac}.cfg index bff652d515..93e9e9eca4 100644 --- a/resources/templates/provision/panasonic/tgp500/{$mac}.cfg +++ b/resources/templates/provision/panasonic/tgp500/{$mac}.cfg @@ -231,18 +231,18 @@ PRIVACY_MODE_1="Y" ## SIP Settings SIP_USER_AGENT="Panasonic_{literal}{MODEL}/{/{fwver} ({mac}{/literal})" -SIP_AUTHID_1="{$user_id_1}" +SIP_AUTHID_1="{$account.1.auth_id}" -SIP_PASS_1="{$user_password_1}" +SIP_PASS_1="{$account.1.password}" SIP_SRC_PORT_1="5060" -SIP_PRXY_ADDR_1="{$server_address_1}" +SIP_PRXY_ADDR_1="{$account.1.server_address}" SIP_PRXY_PORT_1="5060" -SIP_RGSTR_ADDR_1="{$server_address_1}" +SIP_RGSTR_ADDR_1="{$account.1.server_address}" SIP_RGSTR_PORT_1="5060" -SIP_SVCDOMAIN_1="{$server_address_1}" +SIP_SVCDOMAIN_1="{$account.1.server_address}" REG_EXPIRE_TIME_1="3600" REG_INTERVAL_RATE_1="90" SIP_SESSION_TIME_1="0" @@ -263,7 +263,7 @@ SIP_TCP_SRV_PREFIX_1="_sip._tcp." SIP_100REL_ENABLE_1="N" SIP_18X_RTX_INTVL_1="0" -SIP_PRSNC_ADDR_1="{$server_address_1}" +SIP_PRSNC_ADDR_1="{$account.1.server_address}" SIP_PRSNC_PORT_1="5060" SIP_2NDPRSNC_ADDR_1="" SIP_2NDPRSNC_PORT_1="5060" @@ -292,11 +292,11 @@ SIP_DETECT_SSAF_1="N" SIP_RCV_DET_HEADER_1="N" SIP_CONTACT_ON_ACK_1="N" -PHONE_NUMBER_1="{$user_id_1}" +PHONE_NUMBER_1="{$account.1.user_id}" LINE_ID_1="{$user_id_1}" -DISPLAY_NAME_1="{$display_name_1}" +DISPLAY_NAME_1="{$account.1.display_name}" INTERNATIONAL_ACCESS_CODE="" #----------------------------------------------------------# @@ -368,18 +368,18 @@ PRIVACY_MODE_2="Y" ## SIP Settings -SIP_AUTHID_2="{$user_id_2}" +SIP_AUTHID_2="{$account.2.auth_id}" -SIP_PASS_2="{$user_password_2}" +SIP_PASS_2="{$account.2.password}" SIP_SRC_PORT_2="5070" -SIP_PRXY_ADDR_2="{$server_address_2}" +SIP_PRXY_ADDR_2="{$account.2.server_address}" SIP_PRXY_PORT_2="5060" -SIP_RGSTR_ADDR_2="{$server_address_2}" +SIP_RGSTR_ADDR_2="{$account.2.server_address}" SIP_RGSTR_PORT_2="5060" -SIP_SVCDOMAIN_2="{$server_address_2}" +SIP_SVCDOMAIN_2="{$account.2.server_address}" REG_EXPIRE_TIME_2="3600" REG_INTERVAL_RATE_2="90" SIP_SESSION_TIME_2="0" @@ -403,7 +403,7 @@ SIP_REQURI_PORT_2="Y" SIP_ADD_RPORT_2="N" SIP_SESSION_METHOD_2="0" -SIP_PRSNC_ADDR_2="{$server_address_2}" +SIP_PRSNC_ADDR_2="{$account.2.server_address}" SIP_PRSNC_PORT_2="5060" SIP_2NDPRSNC_ADDR_2="" SIP_2NDPRSNC_PORT_2="5060" @@ -429,11 +429,11 @@ SIP_DETECT_SSAF_2="N" SIP_RCV_DET_HEADER_2="N" SIP_CONTACT_ON_ACK_2="N" -PHONE_NUMBER_2="{$user_id_2}" +PHONE_NUMBER_2="{$account.2.user_id}" -LINE_ID_2="{$user_id_2}" +LINE_ID_2="{$account.2.user_id}" -DISPLAY_NAME_2="{$display_name_2}" +DISPLAY_NAME_2="{$account.2.display_name}" #----------------------------------------------------------# # Settings for line 3 to 8 follows... # diff --git a/resources/templates/provision/panasonic/tgp550/{$mac}.cfg b/resources/templates/provision/panasonic/tgp550/{$mac}.cfg index 3d6d7a0324..5324755154 100644 --- a/resources/templates/provision/panasonic/tgp550/{$mac}.cfg +++ b/resources/templates/provision/panasonic/tgp550/{$mac}.cfg @@ -231,18 +231,18 @@ PRIVACY_MODE_1="Y" ## SIP Settings SIP_USER_AGENT="Panasonic_{literal}{MODEL}/{fwver} ({mac}){/literal}" -SIP_AUTHID_1="{$user_id_1}" +SIP_AUTHID_1="{$account.1.auth_id}" -SIP_PASS_1="{$user_password_1}" +SIP_PASS_1="{$account.1.password}" SIP_SRC_PORT_1="5060" -SIP_PRXY_ADDR_1="{$server_address_1}" +SIP_PRXY_ADDR_1="{$account.1.server_address}" SIP_PRXY_PORT_1="5060" -SIP_RGSTR_ADDR_1="{$server_address_1}" +SIP_RGSTR_ADDR_1="{$account.1.server_address}" SIP_RGSTR_PORT_1="5060" -SIP_SVCDOMAIN_1="{$server_address_1}" +SIP_SVCDOMAIN_1="{$account.1.server_address}" REG_EXPIRE_TIME_1="3600" REG_INTERVAL_RATE_1="90" SIP_SESSION_TIME_1="0" @@ -263,7 +263,7 @@ SIP_TCP_SRV_PREFIX_1="_sip._tcp." SIP_100REL_ENABLE_1="N" SIP_18X_RTX_INTVL_1="0" -SIP_PRSNC_ADDR_1="{$server_address_1}" +SIP_PRSNC_ADDR_1="{$account.1.server_address}" SIP_PRSNC_PORT_1="5060" SIP_2NDPRSNC_ADDR_1="" SIP_2NDPRSNC_PORT_1="5060" @@ -296,7 +296,7 @@ PHONE_NUMBER_1="{$user_id_1}" LINE_ID_1="{$user_id_1}" -DISPLAY_NAME_1="{$display_name_1}" +DISPLAY_NAME_1="{$account.1.display_name}" INTERNATIONAL_ACCESS_CODE="" #----------------------------------------------------------# @@ -368,18 +368,18 @@ PRIVACY_MODE_2="Y" ## SIP Settings -SIP_AUTHID_2="{$user_id_2}" +SIP_AUTHID_2="{$account.2.auth_id}" -SIP_PASS_2="{$user_password_2}" +SIP_PASS_2="{$account.2.password}" SIP_SRC_PORT_2="5070" -SIP_PRXY_ADDR_2="{$server_address_2}" +SIP_PRXY_ADDR_2="{$account.2.server_address}" SIP_PRXY_PORT_2="5060" -SIP_RGSTR_ADDR_2="{$server_address_2}" +SIP_RGSTR_ADDR_2="{$account.2.server_address}" SIP_RGSTR_PORT_2="5060" -SIP_SVCDOMAIN_2="{$server_address_2}" +SIP_SVCDOMAIN_2="{$account.2.server_address}" REG_EXPIRE_TIME_2="3600" REG_INTERVAL_RATE_2="90" SIP_SESSION_TIME_2="0" @@ -403,7 +403,7 @@ SIP_REQURI_PORT_2="Y" SIP_ADD_RPORT_2="N" SIP_SESSION_METHOD_2="0" -SIP_PRSNC_ADDR_2="{$server_address_2}" +SIP_PRSNC_ADDR_2="{$account.2.server_address}" SIP_PRSNC_PORT_2="5060" SIP_2NDPRSNC_ADDR_2="" SIP_2NDPRSNC_PORT_2="5060" @@ -429,11 +429,11 @@ SIP_DETECT_SSAF_2="N" SIP_RCV_DET_HEADER_2="N" SIP_CONTACT_ON_ACK_2="N" -PHONE_NUMBER_2="{$user_id_2}" +PHONE_NUMBER_2="{$account.2.user_id}" -LINE_ID_2="{$user_id_2}" +LINE_ID_2="{$account.2.user_id}" -DISPLAY_NAME_2="{$display_name_2}" +DISPLAY_NAME_2="{$account.2.display_name}" #----------------------------------------------------------# # Settings for line 3 to 8 follows... # diff --git a/resources/templates/provision/panasonic/ut113/{$mac}.xml b/resources/templates/provision/panasonic/ut113/{$mac}.xml index b2271a1bc2..19403898ab 100644 --- a/resources/templates/provision/panasonic/ut113/{$mac}.xml +++ b/resources/templates/provision/panasonic/ut113/{$mac}.xml @@ -61,14 +61,14 @@ - + - - - + + + - + @@ -144,14 +144,14 @@ - + - - - + + + - + @@ -321,7 +321,7 @@ - + diff --git a/resources/templates/provision/panasonic/ut123/{$mac}.xml b/resources/templates/provision/panasonic/ut123/{$mac}.xml index c1e949b8e4..06f59d618f 100644 --- a/resources/templates/provision/panasonic/ut123/{$mac}.xml +++ b/resources/templates/provision/panasonic/ut123/{$mac}.xml @@ -61,14 +61,14 @@ - + - - - + + + - + @@ -144,14 +144,14 @@ - + - - - + + + - + diff --git a/resources/templates/provision/panasonic/ut133/{$mac}.xml b/resources/templates/provision/panasonic/ut133/{$mac}.xml index 01528c1388..0968683e1f 100644 --- a/resources/templates/provision/panasonic/ut133/{$mac}.xml +++ b/resources/templates/provision/panasonic/ut133/{$mac}.xml @@ -7,12 +7,12 @@ - + - + - + @@ -40,7 +40,7 @@ - + @@ -635,7 +635,7 @@ - + diff --git a/resources/templates/provision/panasonic/ut136/{$mac}.xml b/resources/templates/provision/panasonic/ut136/{$mac}.xml index 029e044a73..4b3e8c471c 100644 --- a/resources/templates/provision/panasonic/ut136/{$mac}.xml +++ b/resources/templates/provision/panasonic/ut136/{$mac}.xml @@ -7,12 +7,12 @@ - + - + - + @@ -40,7 +40,7 @@ - + @@ -292,14 +292,14 @@ - + - - + + - + @@ -635,7 +635,7 @@ - + diff --git a/resources/templates/provision/panasonic/ut670/{$mac}.cfg b/resources/templates/provision/panasonic/ut670/{$mac}.cfg index 352e59985d..f56a3e54ac 100644 --- a/resources/templates/provision/panasonic/ut670/{$mac}.cfg +++ b/resources/templates/provision/panasonic/ut670/{$mac}.cfg @@ -22,7 +22,7 @@ FIRM_FILE_PATH="" ## Provisioning Settings OPTION66_ENABLE="Y" PROVISION_ENABLE="Y" -CFG_STANDARD_FILE_PATH="tftp://{$server_address_1}/{literal}{mac}{/literal}.cfg" +CFG_STANDARD_FILE_PATH="tftp://{$account.1.server_address}/{literal}{mac}{/literal}.cfg" CFG_PRODUCT_FILE_PATH="" CFG_MASTER_FILE_PATH="" # CFG_FILE_KEY1="" # Not to overwrite factory default key @@ -402,18 +402,18 @@ HOLD_SOUND_PATH_6="0" ## SIP Settings SIP_USER_AGENT="Panasonic_{literal}{MODEL}/{/{fwver} ({mac}{/literal})" -PHONE_NUMBER_1="{$user_id_1}" -PHONE_NUMBER_2="{$user_id_2}" -PHONE_NUMBER_3="{$user_id_3}" -PHONE_NUMBER_4="{$user_id_4}" -PHONE_NUMBER_5="{$user_id_5}" -PHONE_NUMBER_6="{$user_id_6}" -SIP_URI_1="{$user_id_1}" -SIP_URI_2="{$user_id_2}" -SIP_URI_3="{$user_id_3}" -SIP_URI_4="{$user_id_4}" -SIP_URI_5="{$user_id_5}" -SIP_URI_6="{$user_id_6}" +PHONE_NUMBER_1="{$account.1.user_id}" +PHONE_NUMBER_2="{$account.2.user_id}" +PHONE_NUMBER_3="{$account.3.user_id}" +PHONE_NUMBER_4="{$account.4.user_id}" +PHONE_NUMBER_5="{$account.5.user_id}" +PHONE_NUMBER_6="{$account.6.user_id}" +SIP_URI_1="{$account.1.user_id}" +SIP_URI_2="{$account.2.user_id}" +SIP_URI_3="{$account.3.user_id}" +SIP_URI_4="{$account.4.user_id}" +SIP_URI_5="{$account.5.user_id}" +SIP_URI_6="{$account.6.user_id}" LINE_ENABLE_1="Enabled" LINE_ENABLE_2="Enabled" LINE_ENABLE_3="Enabled" @@ -426,54 +426,54 @@ PROFILE_ENABLE_3="Enabled" PROFILE_ENABLE_4="Enabled" PROFILE_ENABLE_5="Enabled" PROFILE_ENABLE_6="Enabled" -SIP_AUTHID_1="{$user_id_1}" -SIP_AUTHID_2="{$user_id_2}" -SIP_AUTHID_3="{$user_id_3}" -SIP_AUTHID_4="{$user_id_4}" -SIP_AUTHID_5="{$user_id_5}" -SIP_AUTHID_6="{$user_id_6}" -SIP_PASS_1="{$user_password_1}" -SIP_PASS_2="{$user_password_2}" -SIP_PASS_3="{$user_password_3}" -SIP_PASS_4="{$user_password_4}" -SIP_PASS_5="{$user_password_5}" -SIP_PASS_6="{$user_password_6}" +SIP_AUTHID_1="{$account.1.user_id}" +SIP_AUTHID_2="{$account.2.user_id}" +SIP_AUTHID_3="{$account.3.user_id}" +SIP_AUTHID_4="{$account.4.user_id}" +SIP_AUTHID_5="{$account.5.user_id}" +SIP_AUTHID_6="{$account.6.user_id}" +SIP_PASS_1="{$account.1.password}" +SIP_PASS_2="{$account.2.password}" +SIP_PASS_3="{$account.3.password}" +SIP_PASS_4="{$account.4.password}" +SIP_PASS_5="{$account.5.password}" +SIP_PASS_6="{$account.6.password}" SIP_SRC_PORT_1="5060" SIP_SRC_PORT_2="5061" SIP_SRC_PORT_3="5062" SIP_SRC_PORT_4="5063" SIP_SRC_PORT_5="5064" SIP_SRC_PORT_6="5065" -SIP_PRXY_ADDR_1="{$server_address_1}" -SIP_PRXY_ADDR_2="{$server_address_2}" -SIP_PRXY_ADDR_3="{$server_address_3}" -SIP_PRXY_ADDR_4="{$server_address_4}" -SIP_PRXY_ADDR_5="{$server_address_5}" -SIP_PRXY_ADDR_6="{$server_address_6}" +SIP_PRXY_ADDR_1="{$account.1.server_address}" +SIP_PRXY_ADDR_2="{$account.2.server_address}" +SIP_PRXY_ADDR_3="{$account.3.server_address}" +SIP_PRXY_ADDR_4="{$account.4.server_address}" +SIP_PRXY_ADDR_5="{$account.5.server_address}" +SIP_PRXY_ADDR_6="{$account.6.server_address}" SIP_PRXY_PORT_1="5060" SIP_PRXY_PORT_2="5060" SIP_PRXY_PORT_3="5060" SIP_PRXY_PORT_4="5060" SIP_PRXY_PORT_5="5060" SIP_PRXY_PORT_6="5060" -SIP_RGSTR_ADDR_1="{$server_address_1}" -SIP_RGSTR_ADDR_2="{$server_address_2}" -SIP_RGSTR_ADDR_3="{$server_address_3}" -SIP_RGSTR_ADDR_4="{$server_address_4}" -SIP_RGSTR_ADDR_5="{$server_address_5}" -SIP_RGSTR_ADDR_6="{$server_address_6}" +SIP_RGSTR_ADDR_1="{$account.1.server_address}" +SIP_RGSTR_ADDR_2="{$account.2.server_address}" +SIP_RGSTR_ADDR_3="{$account.3.server_address}" +SIP_RGSTR_ADDR_4="{$account.4.server_address}" +SIP_RGSTR_ADDR_5="{$account.5.server_address}" +SIP_RGSTR_ADDR_6="{$account.6.server_address}" SIP_RGSTR_PORT_1="5060" SIP_RGSTR_PORT_2="5060" SIP_RGSTR_PORT_3="5060" SIP_RGSTR_PORT_4="5060" SIP_RGSTR_PORT_5="5060" SIP_RGSTR_PORT_6="5060" -SIP_SVCDOMAIN_1="{$server_address_1}" -SIP_SVCDOMAIN_2="{$server_address_2}" -SIP_SVCDOMAIN_3="{$server_address_3}" -SIP_SVCDOMAIN_4="{$server_address_4}" -SIP_SVCDOMAIN_5="{$server_address_5}" -SIP_SVCDOMAIN_6="{$server_address_6}" +SIP_SVCDOMAIN_1="{$account.1.server_address}" +SIP_SVCDOMAIN_2="{$account.2.server_address}" +SIP_SVCDOMAIN_3="{$account.3.server_address}" +SIP_SVCDOMAIN_4="{$account.4.server_address}" +SIP_SVCDOMAIN_5="{$account.5.server_address}" +SIP_SVCDOMAIN_6="{$account.6.server_address}" REG_EXPIRE_TIME_1="3600" REG_EXPIRE_TIME_2="3600" REG_EXPIRE_TIME_3="3600" @@ -714,12 +714,12 @@ SIP_PRIVACY_3="N" SIP_PRIVACY_4="N" SIP_PRIVACY_5="N" SIP_PRIVACY_6="N" -SIP_PRSNC_ADDR_1="{$server_address_1}" -SIP_PRSNC_ADDR_2="{$server_address_2}" -SIP_PRSNC_ADDR_3="{$server_address_3}" -SIP_PRSNC_ADDR_4="{$server_address_4}" -SIP_PRSNC_ADDR_5="{$server_address_5}" -SIP_PRSNC_ADDR_6="{$server_address_6}" +SIP_PRSNC_ADDR_1="{$account.1.server_address}" +SIP_PRSNC_ADDR_2="{$account.2.server_address}" +SIP_PRSNC_ADDR_3="{$account.3.server_address}" +SIP_PRSNC_ADDR_4="{$account.4.server_address}" +SIP_PRSNC_ADDR_5="{$account.5.server_address}" +SIP_PRSNC_ADDR_6="{$account.6.server_address}" SIP_PRSNC_PORT_1="5060" SIP_PRSNC_PORT_2="5060" SIP_PRSNC_PORT_3="5060" diff --git a/resources/templates/provision/polycom/3.x/{$mac}.cfg b/resources/templates/provision/polycom/3.x/{$mac}.cfg index 60f88430fd..c115a6a1f2 100644 --- a/resources/templates/provision/polycom/3.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/3.x/{$mac}.cfg @@ -1,7 +1,7 @@ {$row.phone_extension} {/if} - {$x} 7 0 @@ -26,4 +25,4 @@ {assign var=x value=$x+1} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/polycom/4.x/{$mac}.cfg b/resources/templates/provision/polycom/4.x/{$mac}.cfg index 9a2e31687c..e5c16b6f19 100644 --- a/resources/templates/provision/polycom/4.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/4.x/{$mac}.cfg @@ -3,12 +3,15 @@ {$row.phone_extension} {/if} - {$x} 7 0 @@ -26,4 +25,4 @@ {assign var=x value=$x+1} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/polycom/5.x/{$mac}.cfg b/resources/templates/provision/polycom/5.x/{$mac}.cfg index d5363856b9..98352619c2 100755 --- a/resources/templates/provision/polycom/5.x/{$mac}.cfg +++ b/resources/templates/provision/polycom/5.x/{$mac}.cfg @@ -1,14 +1,16 @@ + diff --git a/resources/templates/provision/sangoma/s300/{$mac}.xml b/resources/templates/provision/sangoma/s300/{$mac}.xml index 23ae261d5a..0c8273e9bc 100644 --- a/resources/templates/provision/sangoma/s300/{$mac}.xml +++ b/resources/templates/provision/sangoma/s300/{$mac}.xml @@ -3,19 +3,19 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$sangoma_dns_mode} 0 1 @@ -132,19 +132,19 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +261,19 @@ 0 1 - {$server_address_3} + {$server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$sangoma_dns_mode} 0 1 @@ -390,19 +390,19 @@ 0 1 - {$server_address_4} + {$account.4.server_address} 0 - {$outbound_proxy_primary_4} - {$outbound_proxy_secondary_4} + {$account.4.outbound_proxy_primary} + {$account.4.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_4} - {$user_id_4} - {$auth_id_4} - {$user_password_4} - {$display_name_4} + {$account.4.display_name} + {$uaccount.4.ser_id} + {$account.4.auth_id} + {$account.4.password} + {$account.4.display_name} {$sangoma_dns_mode} 0 1 @@ -519,19 +519,19 @@ 0 1 - {$server_address_5} + {$server_address} 0 - {$outbound_proxy_primary_5} - {$outbound_proxy_secondary_5} + {$account.5.outbound_proxy_primary} + {$account.5.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_5} - {$user_id_5} - {$auth_id_5} - {$user_password_5} - {$display_name_5} + {$account.5.display_name} + {$account.5.user_id} + {$account.5.auth_id} + {$account.5.password} + {$account.5.display_name} {$sangoma_dns_mode} 0 1 @@ -648,19 +648,19 @@ 0 1 - {$server_address_6} + {$account.6.server_address} 0 - {$outbound_proxy_primary_6} - {$outbound_proxy_secondary_6} + {$account.6.outbound_proxy_primary} + {$account.6.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_6} - {$user_id_6} - {$auth_id_6} - {$user_password_6} - {$display_name_6} + {$account.6.display_name} + {$account.6.user_id} + {$account.6.auth_id} + {$account.6.password} + {$account.6.display_name} {$sangoma_dns_mode} 0 1 diff --git a/resources/templates/provision/sangoma/s500/{$mac}.xml b/resources/templates/provision/sangoma/s500/{$mac}.xml index c519b0282c..99eb3986fc 100644 --- a/resources/templates/provision/sangoma/s500/{$mac}.xml +++ b/resources/templates/provision/sangoma/s500/{$mac}.xml @@ -3,19 +3,19 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$sangoma_dns_mode} 0 1 @@ -132,19 +132,19 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.user_password} + {$account.2.display_name} 0 0 1 @@ -261,19 +261,19 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$sangoma_dns_mode} 0 1 @@ -390,19 +390,19 @@ 0 1 - {$server_address_4} + {$account.4.server_address} 0 - {$outbound_proxy_primary_4} - {$outbound_proxy_secondary_4} + {$account.4.outbound_proxy_primary} + {$account.4.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_4} - {$user_id_4} - {$auth_id_4} - {$user_password_4} - {$display_name_4} + {$account.4.display_name} + {$account.4.user_id} + {$account.4.auth_id} + {$account.4.password} + {$account.4.display_name} {$sangoma_dns_mode} 0 1 @@ -519,19 +519,19 @@ 0 1 - {$server_address_5} + {$account.5.server_address} 0 - {$outbound_proxy_primary_5} - {$outbound_proxy_secondary_5} + {$account.5.outbound_proxy_primary} + {$account.5.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_5} - {$user_id_5} - {$auth_id_5} - {$user_password_5} - {$display_name_5} + {$account.5.display_name} + {$account.5.user_id} + {$account.5.auth_id} + {$account.5.password} + {$account.5.display_name} {$sangoma_dns_mode} 0 1 @@ -648,19 +648,19 @@ 0 1 - {$server_address_6} + {$account.6.server_address} 0 - {$outbound_proxy_primary_6} - {$outbound_proxy_secondary_6} + {$account.6.outbound_proxy_primary} + {$account.6.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_6} - {$user_id_6} - {$auth_id_6} - {$user_password_6} - {$display_name_6} + {$account.6.display_name} + {$account.6.user_id} + {$account.6.auth_id} + {$account.6.password} + {$account.6.display_name} {$sangoma_dns_mode} 0 1 diff --git a/resources/templates/provision/sangoma/s700/{$mac}.xml b/resources/templates/provision/sangoma/s700/{$mac}.xml index e359f5c5fc..64cb023765 100644 --- a/resources/templates/provision/sangoma/s700/{$mac}.xml +++ b/resources/templates/provision/sangoma/s700/{$mac}.xml @@ -3,19 +3,19 @@ 1 - {$server_address_1} + {$account.1.server_address} 0 - {$outbound_proxy_primary_1} - {$outbound_proxy_secondary_1} + {$account.1.outbound_proxy_primary} + {$account.1.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_1} - {$user_id_1} - {$auth_id_1} - {$user_password_1} - {$display_name_1} + {$account.1.display_name} + {$account.1.user_id} + {$account.1.auth_id} + {$account.1.password} + {$account.1.display_name} {$sangoma_dns_mode} 0 1 @@ -132,19 +132,19 @@ 0 1 - {$server_address_2} + {$account.2.server_address} 0 - {$outbound_proxy_primary_2} - {$outbound_proxy_secondary_2} + {$account.2.outbound_proxy_primary} + {$account.2.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_2} - {$user_id_2} - {$auth_id_2} - {$user_password_2} - {$display_name_2} + {$account.2.display_name} + {$account.2.user_id} + {$account.2.auth_id} + {$account.2.password} + {$account.2.display_name} 0 0 1 @@ -261,19 +261,19 @@ 0 1 - {$server_address_3} + {$account.3.server_address} 0 - {$outbound_proxy_primary_3} - {$outbound_proxy_secondary_3} + {$account.3.outbound_proxy_primary} + {$account.3.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_3} - {$user_id_3} - {$auth_id_3} - {$user_password_3} - {$display_name_3} + {$account.3.display_name} + {$account.3.user_id} + {$account.3.auth_id} + {$account.3.password} + {$account.3.display_name} {$sangoma_dns_mode} 0 1 @@ -390,19 +390,19 @@ 0 1 - {$server_address_4} + {$account.4.server_address} 0 - {$outbound_proxy_primary_4} - {$outbound_proxy_secondary_4} + {$account.4.outbound_proxy_primary} + {$account.4.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_4} - {$user_id_4} - {$auth_id_4} - {$user_password_4} - {$display_name_4} + {$account.4.display_name} + {$account.4.user_id} + {$account.4.auth_id} + {$account.4.password} + {$account.4.display_name} {$sangoma_dns_mode} 0 1 @@ -519,19 +519,19 @@ 0 1 - {$server_address_5} + {$account.5.server_address} 0 - {$outbound_proxy_primary_5} - {$outbound_proxy_secondary_5} + {$account.5.outbound_proxy_primary} + {$account.5.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_5} - {$user_id_5} - {$auth_id_5} - {$user_password_5} - {$display_name_5} + {$account.5.display_name} + {$account.5.user_id} + {$account.5.auth_id} + {$account.5.password} + {$account.5.display_name} {$sangoma_dns_mode} 0 1 @@ -648,19 +648,19 @@ 0 1 - {$server_address_6} + {$account.6.server_address} 0 - {$outbound_proxy_primary_6} - {$outbound_proxy_secondary_6} + {$account.6.outbound_proxy_primary} + {$account.6.outbound_proxy_secondary} {$sangoma_transport} 2 - {$display_name_6} - {$user_id_6} - {$auth_id_6} - {$user_password_6} - {$display_name_6} + {$account.6.display_name} + {$account.6.user_id} + {$account.6.auth_id} + {$account.6.password} + {$account.6.display_name} {$sangoma_dns_mode} 0 1 diff --git a/resources/templates/provision/snom/300/{$mac}.xml b/resources/templates/provision/snom/300/{$mac}.xml index 35bd82bc8f..ff53f92350 100644 --- a/resources/templates/provision/snom/300/{$mac}.xml +++ b/resources/templates/provision/snom/300/{$mac}.xml @@ -46,19 +46,19 @@ off off off -{$display_name_1} +{$user.1.display_name} -{$user_id_1} +{$user.1.user_id} -{$server_address_1} +{$user.1.server_address} -{$outbound_proxy_1} +{$user.1.outbound_proxy} @@ -66,7 +66,7 @@ -{$user_password_1} +{$user.1.password} ***** ***** ***** @@ -75,28 +75,28 @@ off -{$display_name_2} -{$user_id_2} -{$server_address_2} -{$user_password_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.server_address} +{$user.2.password} *97 off -{$display_name_3} -{$user_id_3} -{$server_address_3} -{$user_password_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.server_address} +{$user.3.password} *97 off -{$display_name_4} -{$user_id_4} -{$server_address_4} -{$user_password_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.server_address} +{$user.4.password} *97 off -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$server_address_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.password} +{$user.5.server_address} *97 off off @@ -164,4 +164,4 @@ - \ No newline at end of file + diff --git a/resources/templates/provision/snom/320/{$mac}.xml b/resources/templates/provision/snom/320/{$mac}.xml index 135fcb8e2e..379ed05fc7 100644 --- a/resources/templates/provision/snom/320/{$mac}.xml +++ b/resources/templates/provision/snom/320/{$mac}.xml @@ -52,35 +52,35 @@ on off on -{$display_name_1} -{$user_id_1} -{$server_address_1} -{$server_address_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.server_address} +{$user.1.server_address} -{$user_password_1} +{$user.1.password} *97 -{$display_name_2} -{$user_id_2} -{$user_password_2} -{$server_address_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.password} +{$user.2.server_address} off *97 -{$display_name_3} -{$user_id_3} -{$user_password_3} -{$server_address_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.password} +{$user.3.server_address} off *97 -{$display_name_4} -{$user_id_4} -{$user_password_4} -{$server_address_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.password} +{$user.4.server_address} off *97 -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$domain_name_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.password} +{$user.5.domain_name} off *97 on @@ -100,30 +100,30 @@ g722,pcmu,pcma,gsm,g726-32,aal2-g726-32,g723,g729,telephone-event -{foreach $keys as $row} -{if $row.device_key_line == ""} - {if $row.device_key_category == "line"} - {$row.device_key_type} {$row.device_key_value} {$row.device_key_extension} - {else} - line - {/if} -{else} - {if $row.device_key_category == "line"} - {$row.device_key_type} {$row.device_key_value} {$row.device_key_extension} - {else} - line - {/if} -{/if} -{/foreach} +{foreach $keys as $row} +{if $row.device_key_line == ""} + {if $row.device_key_category == "line"} + {$row.device_key_type} {$row.device_key_value} {$row.device_key_extension} + {else} + line + {/if} +{else} + {if $row.device_key_category == "line"} + {$row.device_key_type} {$row.device_key_value} {$row.device_key_extension} + {else} + line + {/if} +{/if} +{/foreach} -{foreach $extensions as $row} - - {$row.extension} - sip - {$row.directory_full_name} ({$row.extension}) - -{/foreach} +{foreach $extensions as $row} + + {$row.extension} + sip + {$row.directory_full_name} ({$row.extension}) + +{/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/snom/360/{$mac}.xml b/resources/templates/provision/snom/360/{$mac}.xml index 072652c0ed..7117bd4b0e 100644 --- a/resources/templates/provision/snom/360/{$mac}.xml +++ b/resources/templates/provision/snom/360/{$mac}.xml @@ -18,38 +18,38 @@ on on on -{$display_name_1} -{$user_id_1} -{$user_password_1} -{$server_address_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.password} +{$user.1.server_address} Default off *97 -{$display_name_2} -{$user_id_2} -{$user_password_2} -{$server_address_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.password} +{$user.2.server_address} Default off *97 -{$display_name_3} -{$user_id_3} -{$user_password_3} -{$server_address_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.password} +{$user.3.server_address} Default off *97 -{$display_name_4} -{$user_id_4} -{$user_password_4} -{$server_address_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.password} +{$user.4.server_address} Default off *97 -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$server_address_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.password} +{$user.5.server_address} Default off *97 diff --git a/resources/templates/provision/snom/3xx/{$mac}.xml b/resources/templates/provision/snom/3xx/{$mac}.xml index 0e22bce81a..4aedcd388b 100644 --- a/resources/templates/provision/snom/3xx/{$mac}.xml +++ b/resources/templates/provision/snom/3xx/{$mac}.xml @@ -33,38 +33,38 @@ on on on -{$display_name_1} -{$user_id_1} -{$user_password_1} -{$server_address_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.user_password} +{$user.1.server_address} Default off *97 -{$display_name_2} -{$user_id_2} -{$user_password_2} -{$server_address_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.user_password} +{$user.2.server_address} Default off *97 -{$display_name_3} -{$user_id_3} -{$user_password_3} -{$server_address_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.user_password} +{$user.3.server_address} Default off *97 -{$display_name_4} -{$user_id_4} -{$user_password_4} -{$server_address_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.user_password} +{$user.4.server_address} Default off *97 -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$server_address_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.user_password} +{$user.5.server_address} Default off *97 diff --git a/resources/templates/provision/snom/720/{$mac}.xml b/resources/templates/provision/snom/720/{$mac}.xml index 466bdb66dd..e61d19dec9 100644 --- a/resources/templates/provision/snom/720/{$mac}.xml +++ b/resources/templates/provision/snom/720/{$mac}.xml @@ -877,8 +877,8 @@ -{$outbound_proxy_1} -{$outbound_proxy_2} +{$user.1.outbound_proxy} +{$user.2.outbound_proxy} diff --git a/resources/templates/provision/snom/7xx/{$mac}.xml b/resources/templates/provision/snom/7xx/{$mac}.xml index 2d4daa40b6..4236d26815 100644 --- a/resources/templates/provision/snom/7xx/{$mac}.xml +++ b/resources/templates/provision/snom/7xx/{$mac}.xml @@ -3,10 +3,10 @@ English auto_update -http://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} +https://{$domain_name}{$project_path}/app/provision/index.php?mac={$mac} on {$snom_time_zone} -http://{$domain_name}{$project_path}/app/provision/firmware.xml +https://{$domain_name}{$project_path}/app/provision/firmware.xml {if isset($admin_password) } {$admin_name} {$admin_password} @@ -33,43 +33,43 @@ on on on -{$display_name_1} -{$user_id_1} -{$user_password_1} -{$server_address_1}:{$sip_port_1} -{$register_expires_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.password} +{$user.1.server_address}:{$user.1.sip_port} +{$user.1.register_expires} Default off *97 -{$display_name_2} -{$user_id_2} -{$user_password_2} -{$server_address_2}:{$sip_port_2} -{$register_expires_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.password} +{$user.2.server_address}:{$sip_port} +{$user.2.register_expires} Default off *97 -{$display_name_3} -{$user_id_3} -{$user_password_3} -{$server_address_3}:{$sip_port_3} -{$register_expires_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.password} +{$user.3.server_address}:{$user.3.sip_port} +{$user.3.register_expires} Default off *97 -{$display_name_4} -{$user_id_4} -{$user_password_4} -{$server_address_4}:{$sip_port_4} -{$register_expires_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.password} +{$user.4.server_address}:{$user.4.sip_port} +{$user.4.register_expires} Default off *97 -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$server_address_5}:{$sip_port_5} -{$register_expires_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.password} +{$user.5.server_address}:{$user.5.sip_port} +{$user.5.register_expires} Default off *97 @@ -96,6 +96,28 @@ {/if} {/foreach} - + + + + + +{assign var=x value=1} +{foreach $contacts as $row} + + {if $row.contact_name_given != ""} + {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_organization} + {/if} + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {$number.phone_number} + {else} + {$number.phone_extension} + {/if} + {/foreach} + + {assign var=x value=$x+1} +{/foreach} diff --git a/resources/templates/provision/snom/820/{$mac}.xml b/resources/templates/provision/snom/820/{$mac}.xml index 3cfdb2175c..aed4c06f80 100644 --- a/resources/templates/provision/snom/820/{$mac}.xml +++ b/resources/templates/provision/snom/820/{$mac}.xml @@ -31,11 +31,11 @@ Ringer9 off on -{$display_name_1} -{$user_id_1} -{$server_address_1} -{$outbound_proxy_1} -{$user_password_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.server_address} +{$user.1.outbound_proxy} +{$user.1.password} Ringer9 4000 off diff --git a/resources/templates/provision/snom/8xx/{$mac}.xml b/resources/templates/provision/snom/8xx/{$mac}.xml index 0e22bce81a..4e407ac5a3 100644 --- a/resources/templates/provision/snom/8xx/{$mac}.xml +++ b/resources/templates/provision/snom/8xx/{$mac}.xml @@ -33,38 +33,38 @@ on on on -{$display_name_1} -{$user_id_1} -{$user_password_1} -{$server_address_1} +{$user.1.display_name} +{$user.1.user_id} +{$user.1.password} +{$user.1.server_address} Default off *97 -{$display_name_2} -{$user_id_2} -{$user_password_2} -{$server_address_2} +{$user.2.display_name} +{$user.2.user_id} +{$user.2.password} +{$user.2.server_address} Default off *97 -{$display_name_3} -{$user_id_3} -{$user_password_3} -{$server_address_3} +{$user.3.display_name} +{$user.3.user_id} +{$user.3.password} +{$user.3.server_address} Default off *97 -{$display_name_4} -{$user_id_4} -{$user_password_4} -{$server_address_4} +{$user.4.display_name} +{$user.4.user_id} +{$user.4.password} +{$user.4.server_address} Default off *97 -{$display_name_5} -{$user_id_5} -{$user_password_5} -{$server_address_5} +{$user.5.display_name} +{$user.5.user_id} +{$user.5.password} +{$user.5.server_address} Default off *97 diff --git a/resources/templates/provision/snom/m3/{$mac}.cfg b/resources/templates/provision/snom/m3/{$mac}.cfg index 6c1767eef0..3cbfdd57b1 100644 --- a/resources/templates/provision/snom/m3/{$mac}.cfg +++ b/resources/templates/provision/snom/m3/{$mac}.cfg @@ -173,7 +173,7 @@ %SUBSCR_7_SIP_UA_DATA_SIP_NAME%:"{$user_id_8}" // insert SIP username here %SUBSCR_7_UA_DATA_DISP_NAME%:"{$display_name_8}" // insert your name for display %SUBSCR_7_UA_DATA_AUTH_NAME%:"{$user_id_8}" -%SUBSCR_7_UA_DATA_AUTH_PASS%:"{$user_password-*}" // insert SIP password here +%SUBSCR_7_UA_DATA_AUTH_PASS%:"{$user_password_8}" // insert SIP password here //%SUBSCR_7_SIP_UA_DATA_VOICE_MAILBOX_NUMBER%:"8000" // insert Mailbox number %SUBSCR_7_SIP_UA_DATA_SIP_NAME_ALIAS%:"{$user_id_8}" //Extension //%SUBSCR_7_SIP_UA_DATA_VOICE_MAILBOX_NAME%:"" diff --git a/resources/templates/provision/vtech/vcs754/{$mac}.cfg b/resources/templates/provision/vtech/vcs754/{$mac}.cfg index 3b8b5e6805..fb3934c3f1 100644 --- a/resources/templates/provision/vtech/vcs754/{$mac}.cfg +++ b/resources/templates/provision/vtech/vcs754/{$mac}.cfg @@ -60,11 +60,11 @@ sip_account.1.sip_account_enable = 1 {else} sip_account.1.sip_account_enable = 0 {/if} -sip_account.1.label = {$display_name_1} -sip_account.1.display_name = {$display_name_1} -sip_account.1.user_id = {$auth_id_1} -sip_account.1.authentication_name = {$auth_id_1} -sip_account.1.authentication_access_password = {$user_password_1} +sip_account.1.label = {$account.1.display_name} +sip_account.1.display_name = {$account.1.display_name} +sip_account.1.user_id = {$account.1.user_id} +sip_account.1.authentication_name = {$account.1.auth_id} +sip_account.1.authentication_access_password = {$account.1.password} sip_account.1.dial_plan = x+P sip_account.1.inter_digit_timeout = 3 sip_account.1.maximum_call_number = 6 @@ -78,12 +78,12 @@ sip_account.1.mwi_uri = sip_account.1.mwi_subscription_expires = 3600 sip_account.1.stutter_dial_tone_enable = 1 sip_account.1.voice_encryption_enable = 0 -sip_account.1.primary_sip_server_port = {$sip_port_1} -sip_account.1.primary_sip_server_address = {$server_address_1} +sip_account.1.primary_sip_server_port = {$account.1.sip_port} +sip_account.1.primary_sip_server_address = {$account.1.server_address} sip_account.1.primary_outbound_proxy_server_port = 5060 -sip_account.1.primary_outbound_proxy_server_address = {$outbound_proxy_1} +sip_account.1.primary_outbound_proxy_server_address = {$account.1.outbound_proxy} sip_account.1.primary_registration_server_port = 5060 -sip_account.1.primary_registration_server_address = {$server_address_1} +sip_account.1.primary_registration_server_address = {$account.1.server_address} sip_account.1.primary_registration_expires = 3600 sip_account.1.access_code_page = sip_account.1.access_code_park_call = @@ -139,11 +139,11 @@ sip_account.2.sip_account_enable = 1 {else} sip_account.2.sip_account_enable = 0 {/if} -sip_account.2.label = {$display_name_2} -sip_account.2.display_name = {$display_name_2} -sip_account.2.user_id = {$user_id_2} -sip_account.2.authentication_name = {$auth_id_2} -sip_account.2.authentication_access_password = {$user_password_2} +sip_account.2.label = {$account.2.display_name} +sip_account.2.display_name = {$account.2.display_name} +sip_account.2.user_id = {$account.2.user_id} +sip_account.2.authentication_name = {$account.2.auth_id} +sip_account.2.authentication_access_password = {$account.2.password} sip_account.2.dial_plan = x+P sip_account.2.inter_digit_timeout = 3 sip_account.2.maximum_call_number = 6 @@ -157,12 +157,12 @@ sip_account.2.mwi_uri = sip_account.2.mwi_subscription_expires = 3600 sip_account.2.stutter_dial_tone_enable = 1 sip_account.2.voice_encryption_enable = 0 -sip_account.2.primary_sip_server_port = {$sip_port_2} -sip_account.2.primary_sip_server_address = {$server_address_2} +sip_account.2.primary_sip_server_port = {$account.2.sip_port} +sip_account.2.primary_sip_server_address = {$account.2.server_address} sip_account.2.primary_outbound_proxy_server_port = 5060 -sip_account.2.primary_outbound_proxy_server_address = {$outbound_proxy_2} +sip_account.2.primary_outbound_proxy_server_address = {$account.2.outbound_proxy} sip_account.2.primary_registration_server_port = 5060 -sip_account.2.primary_registration_server_address = {$server_address_2} +sip_account.2.primary_registration_server_address = {$account.2.server_address} sip_account.2.primary_registration_expires = 3600 sip_account.2.access_code_page = sip_account.2.access_code_park_call = @@ -218,11 +218,11 @@ sip_account.3.sip_account_enable = 1 {else} sip_account.3.sip_account_enable = 0 {/if} -sip_account.3.label = {$display_name_3} -sip_account.3.display_name = {$display_name_3} -sip_account.3.user_id = {$user_id_3} -sip_account.3.authentication_name = {$auth_id_3} -sip_account.3.authentication_access_password = {$user_password_3} +sip_account.3.label = {$account.3.display_name} +sip_account.3.display_name = {$account.3.display_name} +sip_account.3.user_id = {$account.3.user_id} +sip_account.3.authentication_name = {$account.3.auth_id} +sip_account.3.authentication_access_password = {$account.3.password} sip_account.3.dial_plan = x+P sip_account.3.inter_digit_timeout = 3 sip_account.3.maximum_call_number = 6 @@ -236,12 +236,12 @@ sip_account.3.mwi_uri = sip_account.3.mwi_subscription_expires = 3600 sip_account.3.stutter_dial_tone_enable = 1 sip_account.3.voice_encryption_enable = 0 -sip_account.3.primary_sip_server_port = {$sip_port_3} -sip_account.3.primary_sip_server_address = {$server_address_3} +sip_account.3.primary_sip_server_port = {$account.3.sip_port} +sip_account.3.primary_sip_server_address = {$account.3.server_address} sip_account.3.primary_outbound_proxy_server_port = 5060 -sip_account.3.primary_outbound_proxy_server_address = {$outbound_proxy_3} +sip_account.3.primary_outbound_proxy_server_address = {$account.3.outbound_proxy} sip_account.3.primary_registration_server_port = 5060 -sip_account.3.primary_registration_server_address = {$server_address_3} +sip_account.3.primary_registration_server_address = {$account.3.server_address} sip_account.3.primary_registration_expires = 3600 sip_account.3.access_code_page = sip_account.3.access_code_park_call = diff --git a/resources/templates/provision/yealink/cp860/directory.xml b/resources/templates/provision/yealink/cp860/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/cp860/directory.xml +++ b/resources/templates/provision/yealink/cp860/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/cp860/y000000000037.cfg b/resources/templates/provision/yealink/cp860/y000000000037.cfg index 05380df019..e712391b4a 100644 --- a/resources/templates/provision/yealink/cp860/y000000000037.cfg +++ b/resources/templates/provision/yealink/cp860/y000000000037.cfg @@ -345,6 +345,8 @@ sip.use_out_bound_in_dialog = #Configure the registration random time (in seconds). It ranges from 0 (default) to 60. sip.reg_surge_prevention = +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -437,7 +439,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -452,7 +454,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -563,7 +565,13 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1420,7 +1428,7 @@ distinctive_ring_tones.alert_info.1.ringer = #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/cp860/{$mac}.cfg b/resources/templates/provision/yealink/cp860/{$mac}.cfg index 7ce700c7bb..4a270c8783 100644 --- a/resources/templates/provision/yealink/cp860/{$mac}.cfg +++ b/resources/templates/provision/yealink/cp860/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = 5060 -account.1.sip_listen_port = 5060 +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} +account.1.sip_listen_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} @@ -59,21 +63,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -206,8 +206,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -231,12 +231,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -251,12 +251,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -324,7 +324,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -490,31 +490,35 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -530,17 +534,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +677,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +795,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -1001,31 +1005,35 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -1041,17 +1049,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1184,8 +1192,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1302,7 +1310,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1487,7 +1495,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} @@ -1496,31 +1506,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1535,17 +1549,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1678,8 +1692,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1796,7 +1810,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1981,6 +1995,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1988,31 +2003,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2027,17 +2046,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2170,8 +2189,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2288,7 +2307,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2473,6 +2492,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2480,31 +2500,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2519,17 +2543,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2661,8 +2685,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2779,7 +2803,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2964,7 +2988,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/cp920/directory.xml b/resources/templates/provision/yealink/cp920/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/cp920/directory.xml +++ b/resources/templates/provision/yealink/cp920/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/cp920/y000000000000.cfg b/resources/templates/provision/yealink/cp920/y000000000000.cfg index 39cb0e8fba..0c512f3efd 100644 --- a/resources/templates/provision/yealink/cp920/y000000000000.cfg +++ b/resources/templates/provision/yealink/cp920/y000000000000.cfg @@ -345,6 +345,7 @@ sip.use_out_bound_in_dialog = #Configure the registration random time (in seconds). It ranges from 0 (default) to 60. sip.reg_surge_prevention = +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} ################################################################ # NAT&ICE ## @@ -437,7 +438,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -452,7 +453,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -563,7 +564,13 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1420,7 +1427,7 @@ distinctive_ring_tones.alert_info.1.ringer = #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/cp920/{$mac}.cfg b/resources/templates/provision/yealink/cp920/{$mac}.cfg index 7ce700c7bb..4a270c8783 100644 --- a/resources/templates/provision/yealink/cp920/{$mac}.cfg +++ b/resources/templates/provision/yealink/cp920/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = 5060 -account.1.sip_listen_port = 5060 +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} +account.1.sip_listen_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} @@ -59,21 +63,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -206,8 +206,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -231,12 +231,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -251,12 +251,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -324,7 +324,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -490,31 +490,35 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -530,17 +534,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +677,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +795,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -1001,31 +1005,35 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -1041,17 +1049,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1184,8 +1192,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1302,7 +1310,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1487,7 +1495,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} @@ -1496,31 +1506,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1535,17 +1549,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1678,8 +1692,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1796,7 +1810,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1981,6 +1995,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1988,31 +2003,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2027,17 +2046,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2170,8 +2189,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2288,7 +2307,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2473,6 +2492,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2480,31 +2500,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2519,17 +2543,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2661,8 +2685,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2779,7 +2803,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2964,7 +2988,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/cp960/directory.xml b/resources/templates/provision/yealink/cp960/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/cp960/directory.xml +++ b/resources/templates/provision/yealink/cp960/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/cp960/y000000000000.cfg b/resources/templates/provision/yealink/cp960/y000000000000.cfg index 82726425ce..8d6245d24b 100644 --- a/resources/templates/provision/yealink/cp960/y000000000000.cfg +++ b/resources/templates/provision/yealink/cp960/y000000000000.cfg @@ -345,6 +345,7 @@ sip.use_out_bound_in_dialog = #Configure the registration random time (in seconds). It ranges from 0 (default) to 60. sip.reg_surge_prevention = +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} ################################################################ # NAT&ICE ## @@ -437,7 +438,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -452,7 +453,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -563,7 +564,13 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1420,7 +1427,7 @@ distinctive_ring_tones.alert_info.1.ringer = #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/cp960/{$mac}.cfg b/resources/templates/provision/yealink/cp960/{$mac}.cfg index 7ce700c7bb..b0eb1aa284 100644 --- a/resources/templates/provision/yealink/cp960/{$mac}.cfg +++ b/resources/templates/provision/yealink/cp960/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = 5060 -account.1.sip_listen_port = 5060 +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} +account.1.sip_listen_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} @@ -59,21 +63,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -206,8 +206,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -231,12 +231,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -251,12 +251,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -324,7 +324,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -490,31 +490,35 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -530,17 +534,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +677,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +795,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -1001,31 +1005,35 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### @@ -1041,17 +1049,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1184,8 +1192,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1302,7 +1310,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1487,7 +1495,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} @@ -1496,31 +1506,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} - -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1535,17 +1548,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1678,8 +1691,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1796,7 +1809,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1981,6 +1994,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1988,31 +2002,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2027,17 +2045,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2170,8 +2188,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2288,7 +2306,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2473,6 +2491,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2480,31 +2499,35 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2519,17 +2542,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2661,8 +2684,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2779,7 +2802,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2964,7 +2987,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t19p/directory.xml b/resources/templates/provision/yealink/t19p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t19p/directory.xml +++ b/resources/templates/provision/yealink/t19p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t19p/y000000000053.cfg b/resources/templates/provision/yealink/t19p/y000000000053.cfg index 447f448896..6cec1c8813 100644 --- a/resources/templates/provision/yealink/t19p/y000000000053.cfg +++ b/resources/templates/provision/yealink/t19p/y000000000053.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1293,3 +1316,9 @@ screen_saver.pic.url = {$yealink_t20p_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/t19p/{$mac}.cfg b/resources/templates/provision/yealink/t19p/{$mac}.cfg index 5930b93517..6c210d827b 100644 --- a/resources/templates/provision/yealink/t19p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t19p/{$mac}.cfg @@ -8,62 +8,66 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy} #Specify the server port, the default value is 5060. account.1.outbound_port = #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} #Configure the address of the backup outbound proxy server. @@ -104,7 +108,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -146,8 +150,8 @@ account.1.srtp_encryption = {$yealink_srtp_encryption} account.1.ptime = #Assign account 1 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -218,7 +222,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -256,7 +260,7 @@ account.1.advanced.timer_t1 = account.1.advanced.timer_t2 = account.1.advanced.timer_t4 = -#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.1.ringtone.ring_type = @@ -272,12 +276,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -292,12 +296,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -340,54 +344,56 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} - - +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -427,7 +433,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -469,8 +475,8 @@ account.2.srtp_encryption = account.2.ptime = #Assign account 2 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -541,7 +547,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -579,7 +585,7 @@ account.2.advanced.timer_t1 = account.2.advanced.timer_t2 = account.2.advanced.timer_t4 = -#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.2.ringtone.ring_type = @@ -663,52 +669,56 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -748,7 +758,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -790,8 +800,8 @@ account.3.srtp_encryption = account.3.ptime = #Assign account 3 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -862,7 +872,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -900,7 +910,7 @@ account.3.advanced.timer_t1 = account.3.advanced.timer_t2 = account.3.advanced.timer_t4 = -#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.3.ringtone.ring_type = @@ -984,52 +994,57 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} + +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1069,7 +1084,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1111,8 +1126,8 @@ account.4.srtp_encryption = account.4.ptime = #Assign account 4 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1183,7 +1198,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1221,7 +1236,7 @@ account.4.advanced.timer_t1 = account.4.advanced.timer_t2 = account.4.advanced.timer_t4 = -#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.4.ringtone.ring_type = @@ -1308,52 +1323,56 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1393,7 +1412,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1435,8 +1454,8 @@ account.5.srtp_encryption = account.5.ptime = #Assign account 5 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -1505,7 +1524,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1543,7 +1562,7 @@ account.5.advanced.timer_t1 = account.5.advanced.timer_t2 = account.5.advanced.timer_t4 = -#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.5.ringtone.ring_type = @@ -1627,52 +1646,56 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1712,7 +1735,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1727,7 +1750,7 @@ account.6.subscribe_register = account.6.subscribe_mwi = 0 #Configure MWI subscribe expiry time (in seconds). It ranges from 0 to 84600, the default value is 3600. -account.6.subscribe_mwi_expires = +account.6.subscribe_mwi_expires = 3600 #Configure the type of SIP header(s) to carry the caller ID; 0-FROM (default), 1-PAI 2-PAI-FROM, 3-PRID-PAI-FROM, 4-PAI-RPID-FROM, 5-RPID-FROM; account.6.cid_source = {$yealink_cid_source} @@ -1754,8 +1777,8 @@ account.6.srtp_encryption = account.6.ptime = #Assign account 6 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -1806,7 +1829,7 @@ account.6.blf_list_barge_in_code = account.6.blf.subscribe_period = #Configure the ACD subscribe period (in seconds). It ranges from 120 to 3600 (default). -account.6.subscribe_acd_expires = +account.6.subscribe_acd_expires = 3600 #Configure the SIP server type; 0-Default (default), 2-BroadSoft, 4-Cosmocom; account.6.sip_server_type = @@ -1824,7 +1847,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = @@ -1862,7 +1885,7 @@ account.6.advanced.timer_t1 = account.6.advanced.timer_t2 = account.6.advanced.timer_t4 = -#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.6.ringtone.ring_type = @@ -1980,7 +2003,6 @@ forward.international.enable = #The default value equals to the value of x. For example, the default value of the parameter "linekey.1.line" is 1. #linekey.x.lable--Define the label for each line key. - {foreach $keys['line'] as $row} #Configure Line Key {$row.device_key_id} diff --git a/resources/templates/provision/yealink/t20p/directory.xml b/resources/templates/provision/yealink/t20p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t20p/directory.xml +++ b/resources/templates/provision/yealink/t20p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t20p/y000000000007.cfg b/resources/templates/provision/yealink/t20p/y000000000007.cfg index 1e4bee9287..eb749169a6 100644 --- a/resources/templates/provision/yealink/t20p/y000000000007.cfg +++ b/resources/templates/provision/yealink/t20p/y000000000007.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -944,7 +967,7 @@ remote_phonebook.data.1.name = Users {if isset($yealink_remote_phonebook_1_url) } remote_phonebook.data.1.url = {$yealink_remote_phonebook_1_url} {else} -remote_phonebook.data.1.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users +remote_phonebook.data.1.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users {/if} {if isset($yealink_remote_phonebook_2_name) } @@ -955,7 +978,7 @@ remote_phonebook.data.2.name = Groups {if isset($yealink_remote_phonebook_2_url) } remote_phonebook.data.2.url = {$yealink_remote_phonebook_2_url} {else} -remote_phonebook.data.2.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups +remote_phonebook.data.2.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups {/if} {if isset($yealink_remote_phonebook_3_name) } @@ -966,7 +989,7 @@ remote_phonebook.data.3.name = Extensions {if isset($yealink_remote_phonebook_3_url) } remote_phonebook.data.3.url = {$yealink_remote_phonebook_3_url} {else} -remote_phonebook.data.3.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions +remote_phonebook.data.3.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions {/if} remote_phonebook.data.4.name = {$yealink_remote_phonebook_4_name} @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1268,7 +1291,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml +directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml ####################################################################################### ## Configure the access URL of the Wallpaper ## @@ -1293,3 +1316,9 @@ screen_saver.pic.url = {$yealink_t20p_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/t20p/{$mac}.cfg b/resources/templates/provision/yealink/t20p/{$mac}.cfg index 5930b93517..82a331933b 100644 --- a/resources/templates/provision/yealink/t20p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t20p/{$mac}.cfg @@ -8,62 +8,66 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy} #Specify the server port, the default value is 5060. account.1.outbound_port = #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} #Configure the address of the backup outbound proxy server. @@ -104,7 +108,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -146,8 +150,8 @@ account.1.srtp_encryption = {$yealink_srtp_encryption} account.1.ptime = #Assign account 1 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -218,7 +222,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -272,12 +276,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -292,12 +296,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -340,52 +344,56 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} @@ -427,7 +435,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -469,8 +477,8 @@ account.2.srtp_encryption = account.2.ptime = #Assign account 2 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -541,7 +549,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -663,52 +671,56 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -748,7 +760,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -790,8 +802,8 @@ account.3.srtp_encryption = account.3.ptime = #Assign account 3 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -862,7 +874,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -984,52 +996,56 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1069,7 +1085,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1111,8 +1127,8 @@ account.4.srtp_encryption = account.4.ptime = #Assign account 4 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1183,7 +1199,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1308,52 +1324,56 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1393,7 +1413,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1435,8 +1455,8 @@ account.5.srtp_encryption = account.5.ptime = #Assign account 5 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -1505,7 +1525,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1627,52 +1647,56 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1712,7 +1736,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1754,8 +1778,8 @@ account.6.srtp_encryption = account.6.ptime = #Assign account 6 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -1824,7 +1848,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = diff --git a/resources/templates/provision/yealink/t21p/directory.xml b/resources/templates/provision/yealink/t21p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t21p/directory.xml +++ b/resources/templates/provision/yealink/t21p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t21p/y000000000052.cfg b/resources/templates/provision/yealink/t21p/y000000000052.cfg index e647f7c2bd..0803d4f5f2 100644 --- a/resources/templates/provision/yealink/t21p/y000000000052.cfg +++ b/resources/templates/provision/yealink/t21p/y000000000052.cfg @@ -308,6 +308,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ####################################################################################### ## Echo Cancellation ## ####################################################################################### @@ -378,7 +380,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -393,7 +395,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -504,7 +506,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -540,7 +547,7 @@ remote_phonebook.data.1.name = Users {if isset($yealink_remote_phonebook_1_url) } remote_phonebook.data.1.url = {$yealink_remote_phonebook_1_url} {else} -remote_phonebook.data.1.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users +remote_phonebook.data.1.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users {/if} {if isset($yealink_remote_phonebook_2_name) } @@ -551,7 +558,7 @@ remote_phonebook.data.2.name = Groups {if isset($yealink_remote_phonebook_2_url) } remote_phonebook.data.2.url = {$yealink_remote_phonebook_2_url} {else} -remote_phonebook.data.2.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups +remote_phonebook.data.2.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups {/if} {if isset($yealink_remote_phonebook_3_name) } @@ -562,7 +569,7 @@ remote_phonebook.data.3.name = Extensions {if isset($yealink_remote_phonebook_3_url) } remote_phonebook.data.3.url = {$yealink_remote_phonebook_3_url} {else} -remote_phonebook.data.3.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions +remote_phonebook.data.3.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions {/if} remote_phonebook.data.4.name = {$yealink_remote_phonebook_4_name} @@ -910,6 +917,24 @@ 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; phone_setting.blf_list_sequence_type = +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Key Lock ## ####################################################################################### @@ -1399,7 +1424,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = @@ -1587,7 +1612,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml +directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml ####################################################################################### ## Configure the access URL of firmware ## diff --git a/resources/templates/provision/yealink/t21p/{$mac}.cfg b/resources/templates/provision/yealink/t21p/{$mac}.cfg index c9563dd81a..7d321b52c4 100644 --- a/resources/templates/provision/yealink/t21p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t21p/{$mac}.cfg @@ -8,44 +8,48 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} + +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} +{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = 5060 -account.1.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} - ####################################################################################### ## Failback ## ####################################################################################### @@ -59,21 +63,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -206,8 +206,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -231,12 +231,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -251,12 +251,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -324,7 +324,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -402,7 +402,7 @@ account.1.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.1.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.1.compact_header_enable = ####################################################################################### @@ -490,31 +490,34 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} - -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -529,17 +532,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -672,8 +675,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -790,7 +793,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -868,7 +871,7 @@ account.2.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.2.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.2.compact_header_enable = ####################################################################################### @@ -1000,31 +1003,34 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} - -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1039,17 +1045,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1182,8 +1188,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1300,7 +1306,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1378,7 +1384,7 @@ account.3.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.3.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.3.compact_header_enable = ####################################################################################### @@ -1485,39 +1491,42 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} -{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} +{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### ## Account 4 Basic Settings ## ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} - -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1532,17 +1541,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1675,8 +1684,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1793,7 +1802,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1871,7 +1880,7 @@ account.4.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.4.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.4.compact_header_enable = ####################################################################################### @@ -1978,6 +1987,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1985,31 +1995,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} - -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2024,17 +2037,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2167,8 +2180,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2285,7 +2298,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2363,7 +2376,7 @@ account.5.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.5.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.5.compact_header_enable = ####################################################################################### @@ -2470,6 +2483,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2477,31 +2491,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} - -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2516,17 +2533,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2658,8 +2675,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2776,7 +2793,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2854,7 +2871,7 @@ account.6.100rel_enable = {$yealink_retransmission} #Enable or disable the "user=phone"; 0-Disabled (default), 1-Enabled; account.6.enable_user_equal_phone = -#Enbale or diable the simplified header field feature; 0-Disabled, 1-Enabled (default); +#Enable or disable the simplified header field feature; 0-Disabled, 1-Enabled (default); account.6.compact_header_enable = ####################################################################################### @@ -2961,7 +2978,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### @@ -2972,7 +2991,6 @@ network.internet_port.gateway = #The default value equals to the value of x. For example, the default value of the parameter "linekey.1.line" is 1. #linekey.x.lable--Define the label for each line key. Meet-Me Conference "1" or BLF "16" require pick_value. - {foreach $keys['line'] as $row} #Configure Line Key {$row.device_key_id} @@ -2987,7 +3005,6 @@ linekey.{$row.device_key_id}.type = {$row.device_key_type} linekey.{$row.device_key_id}.xml_phonebook = linekey.{$row.device_key_id}.label = {$row.device_key_label} - {/foreach} @@ -3019,7 +3036,6 @@ memorykey.{$row.device_key_id}.label = {$row.device_key_label} memorykey.{$row.device_key_id}.xml_phonebook = memorykey.{$row.device_key_id}.sub_type = - {/foreach} @@ -3034,22 +3050,17 @@ memorykey.{$row.device_key_id}.sub_type = #expansion_module.x.key.y.label = #expansion_module.X.key.Y.xml_phonebook = -{$rownum = 1} - -{foreach $keys["expansion"] as $row} - -{if $rownum <= 40} -#Expansion module 1 key {$row.device_key_id} +{foreach $keys["expansion-1"] as $row} 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 = -{/if} {/foreach} + ########################################################################################## ## Expansion Module 2 ## ########################################################################################## @@ -3062,4 +3073,14 @@ 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 = + +{foreach $keys["expansion-2"] as $row} +expansion_module.2.key.{$row.device_key_id}.type = {$row.device_key_type} +expansion_module.2.key.{$row.device_key_id}.line = {$row.device_key_line} +expansion_module.2.key.{$row.device_key_id}.value = {$row.device_key_value} +expansion_module.2.key.{$row.device_key_id}.extension = {$row.device_key_extension} +expansion_module.2.key.{$row.device_key_id}.label = {$row.device_key_label} +expansion_module.2.key.{$row.device_key_id}.xml_phonebook = + +{/foreach} diff --git a/resources/templates/provision/yealink/t22p/directory.xml b/resources/templates/provision/yealink/t22p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t22p/directory.xml +++ b/resources/templates/provision/yealink/t22p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t22p/y000000000005.cfg b/resources/templates/provision/yealink/t22p/y000000000005.cfg index b1efd75574..245b4662c7 100644 --- a/resources/templates/provision/yealink/t22p/y000000000005.cfg +++ b/resources/templates/provision/yealink/t22p/y000000000005.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1292,3 +1315,9 @@ screen_saver.pic.url = {$yealink_t22p_screen_saver} #Configure the access URL for downloading the files for var. #Require reboot web_item_level.url = + +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} diff --git a/resources/templates/provision/yealink/t22p/{$mac}.cfg b/resources/templates/provision/yealink/t22p/{$mac}.cfg index 1d4996c01f..6c210d827b 100644 --- a/resources/templates/provision/yealink/t22p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t22p/{$mac}.cfg @@ -8,65 +8,68 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy} #Specify the server port, the default value is 5060. account.1.outbound_port = #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} - #Configure the address of the backup outbound proxy server. account.1.backup_outbound_host = @@ -105,7 +108,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -147,8 +150,8 @@ account.1.srtp_encryption = {$yealink_srtp_encryption} account.1.ptime = #Assign account 1 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -219,7 +222,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -273,12 +276,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -293,12 +296,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -341,52 +344,56 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -426,7 +433,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -468,8 +475,8 @@ account.2.srtp_encryption = account.2.ptime = #Assign account 2 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -540,7 +547,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -662,52 +669,56 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -747,7 +758,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -789,8 +800,8 @@ account.3.srtp_encryption = account.3.ptime = #Assign account 3 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -861,7 +872,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -983,52 +994,56 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. @@ -1069,7 +1084,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1111,8 +1126,8 @@ account.4.srtp_encryption = account.4.ptime = #Assign account 4 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1183,7 +1198,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1308,52 +1323,56 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1393,7 +1412,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1435,8 +1454,8 @@ account.5.srtp_encryption = account.5.ptime = #Assign account 5 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -1505,7 +1524,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1627,52 +1646,56 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1712,7 +1735,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1754,8 +1777,8 @@ account.6.srtp_encryption = account.6.ptime = #Assign account 6 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -1824,7 +1847,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = diff --git a/resources/templates/provision/yealink/t23g/directory.xml b/resources/templates/provision/yealink/t23g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t23g/directory.xml +++ b/resources/templates/provision/yealink/t23g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t23g/y000000000044.cfg b/resources/templates/provision/yealink/t23g/y000000000044.cfg index 867001e63e..052fb15a69 100644 --- a/resources/templates/provision/yealink/t23g/y000000000044.cfg +++ b/resources/templates/provision/yealink/t23g/y000000000044.cfg @@ -325,6 +325,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -418,7 +420,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -433,7 +435,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -544,7 +546,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1027,6 +1034,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1439,7 +1464,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t23g/{$mac}.cfg b/resources/templates/provision/yealink/t23g/{$mac}.cfg index 168345a432..38cff43332 100644 --- a/resources/templates/provision/yealink/t23g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t23g/{$mac}.cfg @@ -8,40 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} -#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} + +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -57,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -204,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -229,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -249,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -322,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -488,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -529,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -672,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -790,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -970,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1011,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1154,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1272,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1442,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1483,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1626,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1744,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1914,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1955,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2098,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2216,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2386,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2427,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2569,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2687,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = diff --git a/resources/templates/provision/yealink/t23p/directory.xml b/resources/templates/provision/yealink/t23p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t23p/directory.xml +++ b/resources/templates/provision/yealink/t23p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t23p/y000000000044.cfg b/resources/templates/provision/yealink/t23p/y000000000044.cfg index d21430ac4e..37ac2f2135 100644 --- a/resources/templates/provision/yealink/t23p/y000000000044.cfg +++ b/resources/templates/provision/yealink/t23p/y000000000044.cfg @@ -29,7 +29,7 @@ network.pppoe.password = ####################################################################################### -## Network ## +## Network Advanced ## ####################################################################################### ##0-ipv4, 1-ipv6, 2-ipv4&ipv6 static.network.ip_address_mode = {$yealink_ip_address_mode} @@ -55,7 +55,6 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} - ####################################################################################### ## VLAN ## ####################################################################################### @@ -326,6 +325,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +420,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +435,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +546,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -884,7 +890,7 @@ features.pickup.blf_audio_enable = ####################################################################################### ## Phone Setting ## ####################################################################################### -#Enable or disable the photo display on handset 0 = disable, 1 = enable +#Enable or disable the photo display on handset 0 = disable, 1= enable phone_setting.contact_photo_display.enable = 0 #Enable or disable the called party information display 0 = disable 1 = enable @@ -1028,6 +1034,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1262,7 +1286,7 @@ linekey.27.type = linekey.27.xml_phonebook = linekey.27.label = ####################################################################################### -## Programmable key ## +## Programable key ## ####################################################################################### #X ranges from 1 to 13. #programablekey.x.type--Customize the programmable key type. @@ -1440,7 +1464,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = @@ -1635,4 +1659,3 @@ directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_usern ####################################################################################### #Before using this parameter, you should store the desired firmware (x.71.x.x.rom) to the provisioning server. firmware.url = {$yealink_firmware_url}/{$yealink_firmware_t23p} - diff --git a/resources/templates/provision/yealink/t23p/{$mac}.cfg b/resources/templates/provision/yealink/t23p/{$mac}.cfg index 3349670653..52bdd8a879 100644 --- a/resources/templates/provision/yealink/t23p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t23p/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +205,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +230,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +250,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +323,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +489,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +534,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +677,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +795,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +975,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1020,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1163,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1281,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1451,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1496,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1639,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1757,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1927,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1972,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2115,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2233,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2403,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2448,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2590,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2708,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2906,7 +2926,6 @@ memorykey.{$row.device_key_id}.sub_type = {/foreach} - ########################################################################################## ## Expansion Module 1 ## ########################################################################################## diff --git a/resources/templates/provision/yealink/t26p/directory.xml b/resources/templates/provision/yealink/t26p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t26p/directory.xml +++ b/resources/templates/provision/yealink/t26p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t26p/y000000000004.cfg b/resources/templates/provision/yealink/t26p/y000000000004.cfg index 978a34aa19..acf83e92c4 100644 --- a/resources/templates/provision/yealink/t26p/y000000000004.cfg +++ b/resources/templates/provision/yealink/t26p/y000000000004.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -944,7 +967,7 @@ remote_phonebook.data.1.name = Users {if isset($yealink_remote_phonebook_1_url) } remote_phonebook.data.1.url = {$yealink_remote_phonebook_1_url} {else} -remote_phonebook.data.1.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users +remote_phonebook.data.1.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users {/if} {if isset($yealink_remote_phonebook_2_name) } @@ -955,7 +978,7 @@ remote_phonebook.data.2.name = Groups {if isset($yealink_remote_phonebook_2_url) } remote_phonebook.data.2.url = {$yealink_remote_phonebook_2_url} {else} -remote_phonebook.data.2.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups +remote_phonebook.data.2.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups {/if} {if isset($yealink_remote_phonebook_3_name) } @@ -966,7 +989,7 @@ remote_phonebook.data.3.name = Extensions {if isset($yealink_remote_phonebook_3_url) } remote_phonebook.data.3.url = {$yealink_remote_phonebook_3_url} {else} -remote_phonebook.data.3.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions +remote_phonebook.data.3.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions {/if} remote_phonebook.data.4.name = {$yealink_remote_phonebook_4_name} @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1268,7 +1291,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml +directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml ####################################################################################### ## Configure the access URL of the Wallpaper ## @@ -1293,3 +1316,9 @@ screen_saver.pic.url = {$yealink_t26p_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/t26p/{$mac}.cfg b/resources/templates/provision/yealink/t26p/{$mac}.cfg index 60a06ded46..049f318f04 100644 --- a/resources/templates/provision/yealink/t26p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t26p/{$mac}.cfg @@ -8,62 +8,66 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy} #Specify the server port, the default value is 5060. account.1.outbound_port = #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} #Configure the address of the backup outbound proxy server. @@ -104,7 +108,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -146,8 +150,8 @@ account.1.srtp_encryption = {$yealink_srtp_encryption} account.1.ptime = #Assign account 1 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -218,7 +222,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -256,7 +260,7 @@ account.1.advanced.timer_t1 = account.1.advanced.timer_t2 = account.1.advanced.timer_t4 = -#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.1.ringtone.ring_type = @@ -272,12 +276,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -292,12 +296,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -340,53 +344,56 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} - -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -426,7 +433,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -468,8 +475,8 @@ account.2.srtp_encryption = account.2.ptime = #Assign account 2 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -540,7 +547,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -578,7 +585,7 @@ account.2.advanced.timer_t1 = account.2.advanced.timer_t2 = account.2.advanced.timer_t4 = -#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.2.ringtone.ring_type = @@ -662,52 +669,57 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} + +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -747,7 +759,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -789,8 +801,8 @@ account.3.srtp_encryption = account.3.ptime = #Assign account 3 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -861,7 +873,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -899,7 +911,7 @@ account.3.advanced.timer_t1 = account.3.advanced.timer_t2 = account.3.advanced.timer_t4 = -#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.3.ringtone.ring_type = @@ -983,52 +995,56 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1068,7 +1084,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1110,8 +1126,8 @@ account.4.srtp_encryption = account.4.ptime = #Assign account 4 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1182,7 +1198,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1220,7 +1236,7 @@ account.4.advanced.timer_t1 = account.4.advanced.timer_t2 = account.4.advanced.timer_t4 = -#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.4.ringtone.ring_type = @@ -1307,52 +1323,56 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1392,7 +1412,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1434,8 +1454,8 @@ account.5.srtp_encryption = account.5.ptime = #Assign account 5 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -1504,7 +1524,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1542,7 +1562,7 @@ account.5.advanced.timer_t1 = account.5.advanced.timer_t2 = account.5.advanced.timer_t4 = -#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.5.ringtone.ring_type = @@ -1626,52 +1646,56 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1711,7 +1735,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1753,8 +1777,8 @@ account.6.srtp_encryption = account.6.ptime = #Assign account 6 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -1823,7 +1847,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = @@ -1861,7 +1885,7 @@ account.6.advanced.timer_t1 = account.6.advanced.timer_t2 = account.6.advanced.timer_t4 = -#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,����Ring8.wav. +#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.6.ringtone.ring_type = diff --git a/resources/templates/provision/yealink/t27g/directory.xml b/resources/templates/provision/yealink/t27g/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t27g/directory.xml +++ b/resources/templates/provision/yealink/t27g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t27g/y000000000069.cfg b/resources/templates/provision/yealink/t27g/y000000000069.cfg index e5a4e3cb17..fea6f0c601 100644 --- a/resources/templates/provision/yealink/t27g/y000000000069.cfg +++ b/resources/templates/provision/yealink/t27g/y000000000069.cfg @@ -325,6 +325,7 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} ################################################################ # NAT&ICE ## @@ -418,7 +419,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -433,7 +434,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -544,7 +545,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1027,6 +1033,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1440,7 +1464,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = @@ -1628,7 +1652,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml +directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml ####################################################################################### ## Configure the access URL of firmware ## diff --git a/resources/templates/provision/yealink/t27g/{$mac}.cfg b/resources/templates/provision/yealink/t27g/{$mac}.cfg index 375975922d..c61b241e7e 100644 --- a/resources/templates/provision/yealink/t27g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t27g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2907,7 +2941,6 @@ memorykey.{$row.device_key_id}.sub_type = {/foreach} - ########################################################################################## ## Expansion Module 1 ## ########################################################################################## diff --git a/resources/templates/provision/yealink/t27p/directory.xml b/resources/templates/provision/yealink/t27p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t27p/directory.xml +++ b/resources/templates/provision/yealink/t27p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t27p/y000000000045.cfg b/resources/templates/provision/yealink/t27p/y000000000045.cfg index 6f1c300b22..b17bb78b54 100644 --- a/resources/templates/provision/yealink/t27p/y000000000045.cfg +++ b/resources/templates/provision/yealink/t27p/y000000000045.cfg @@ -29,7 +29,7 @@ network.pppoe.password = ####################################################################################### -## Network ## +## Network Advanced ## ####################################################################################### ##0-ipv4, 1-ipv6, 2-ipv4&ipv6 static.network.ip_address_mode = {$yealink_ip_address_mode} @@ -55,7 +55,6 @@ network.pc_port.speed_duplex = network.pc_port.dhcp_server = 1 {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} - ####################################################################################### ## VLAN ## ####################################################################################### @@ -326,6 +325,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +420,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +435,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +546,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -884,7 +890,7 @@ features.pickup.blf_audio_enable = ####################################################################################### ## Phone Setting ## ####################################################################################### -#Enable or disable the photo display on handset 0 = disable, 1 = enable +#Enable or disable the photo display on handset 0 = disable, 1= enable phone_setting.contact_photo_display.enable = 0 #Enable or disable the called party information display 0 = disable 1 = enable @@ -1028,6 +1034,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1262,7 +1286,7 @@ linekey.27.type = linekey.27.xml_phonebook = linekey.27.label = ####################################################################################### -## Programmable key ## +## Programable key ## ####################################################################################### #X ranges from 1 to 13. #programablekey.x.type--Customize the programmable key type. @@ -1289,6 +1313,7 @@ programablekey.1.pickup_value ={$row.device_key_extension} programablekey.1.history_type = {/foreach} + ########################################################################################## ## Expansion Key ## ########################################################################################## @@ -1440,7 +1465,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = @@ -1635,4 +1660,3 @@ directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_usern ####################################################################################### #Before using this parameter, you should store the desired firmware (x.71.x.x.rom) to the provisioning server. firmware.url = {$yealink_firmware_url}/{$yealink_firmware_t27p} - diff --git a/resources/templates/provision/yealink/t27p/{$mac}.cfg b/resources/templates/provision/yealink/t27p/{$mac}.cfg index aa13ae4b26..7a8e6b09d2 100644 --- a/resources/templates/provision/yealink/t27p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t27p/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = diff --git a/resources/templates/provision/yealink/t28p/directory.xml b/resources/templates/provision/yealink/t28p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t28p/directory.xml +++ b/resources/templates/provision/yealink/t28p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t28p/y000000000000.cfg b/resources/templates/provision/yealink/t28p/y000000000000.cfg index b073691f01..5333649b74 100644 --- a/resources/templates/provision/yealink/t28p/y000000000000.cfg +++ b/resources/templates/provision/yealink/t28p/y000000000000.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -1040,7 +1045,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1293,3 +1298,8 @@ screen_saver.pic.url = {$yealink_t28p_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} diff --git a/resources/templates/provision/yealink/t28p/{$mac}.cfg b/resources/templates/provision/yealink/t28p/{$mac}.cfg index e96938c454..049f318f04 100644 --- a/resources/templates/provision/yealink/t28p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t28p/{$mac}.cfg @@ -8,65 +8,68 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy} #Specify the server port, the default value is 5060. account.1.outbound_port = #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} - #Configure the address of the backup outbound proxy server. account.1.backup_outbound_host = @@ -105,7 +108,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -147,8 +150,8 @@ account.1.srtp_encryption = {$yealink_srtp_encryption} account.1.ptime = #Assign account 1 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -219,7 +222,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -257,7 +260,7 @@ account.1.advanced.timer_t1 = account.1.advanced.timer_t2 = account.1.advanced.timer_t4 = -#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.1.ringtone.ring_type = @@ -273,12 +276,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -293,12 +296,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -341,52 +344,56 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -426,7 +433,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -468,8 +475,8 @@ account.2.srtp_encryption = account.2.ptime = #Assign account 2 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -540,7 +547,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -578,7 +585,7 @@ account.2.advanced.timer_t1 = account.2.advanced.timer_t2 = account.2.advanced.timer_t4 = -#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 2. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.2.ringtone.ring_type = @@ -662,52 +669,56 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. @@ -748,7 +759,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -790,8 +801,8 @@ account.3.srtp_encryption = account.3.ptime = #Assign account 3 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -862,7 +873,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -900,7 +911,7 @@ account.3.advanced.timer_t1 = account.3.advanced.timer_t2 = account.3.advanced.timer_t4 = -#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.3.ringtone.ring_type = @@ -984,52 +995,56 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1069,7 +1084,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1111,8 +1126,8 @@ account.4.srtp_encryption = account.4.ptime = #Assign account 4 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1183,7 +1198,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1221,7 +1236,7 @@ account.4.advanced.timer_t1 = account.4.advanced.timer_t2 = account.4.advanced.timer_t4 = -#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 4. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.4.ringtone.ring_type = @@ -1308,52 +1323,56 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1393,7 +1412,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1435,8 +1454,8 @@ account.5.srtp_encryption = account.5.ptime = #Assign account 5 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -1505,7 +1524,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1543,7 +1562,7 @@ account.5.advanced.timer_t1 = account.5.advanced.timer_t2 = account.5.advanced.timer_t4 = -#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 5. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.5.ringtone.ring_type = @@ -1627,52 +1646,56 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1712,7 +1735,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1754,8 +1777,8 @@ account.6.srtp_encryption = account.6.ptime = #Assign account 6 as shared line; 0-Disabled (default), 1-BSFT shared line, 2-Draft bridge line appearance; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -1824,7 +1847,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = @@ -1862,7 +1885,7 @@ account.6.advanced.timer_t1 = account.6.advanced.timer_t2 = account.6.advanced.timer_t4 = -#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav,¡­¡­Ring8.wav. +#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav, Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.6.ringtone.ring_type = diff --git a/resources/templates/provision/yealink/t29g/directory.xml b/resources/templates/provision/yealink/t29g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t29g/directory.xml +++ b/resources/templates/provision/yealink/t29g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t29g/y000000000046.cfg b/resources/templates/provision/yealink/t29g/y000000000046.cfg index f0c618f792..7513404303 100644 --- a/resources/templates/provision/yealink/t29g/y000000000046.cfg +++ b/resources/templates/provision/yealink/t29g/y000000000046.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1028,6 +1035,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1440,7 +1465,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t29g/{$mac}.cfg b/resources/templates/provision/yealink/t29g/{$mac}.cfg index aa13ae4b26..7a8e6b09d2 100644 --- a/resources/templates/provision/yealink/t29g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t29g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = diff --git a/resources/templates/provision/yealink/t32g/directory.xml b/resources/templates/provision/yealink/t32g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t32g/directory.xml +++ b/resources/templates/provision/yealink/t32g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t32g/y000000000032.cfg b/resources/templates/provision/yealink/t32g/y000000000032.cfg index 643a92aa34..b1a5531ae5 100644 --- a/resources/templates/provision/yealink/t32g/y000000000032.cfg +++ b/resources/templates/provision/yealink/t32g/y000000000032.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1290,3 +1313,9 @@ screen_saver.pic.url = {$yealink_t32g_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/t32g/{$mac}.cfg b/resources/templates/provision/yealink/t32g/{$mac}.cfg index df37c9efd9..6aea469e21 100644 --- a/resources/templates/provision/yealink/t32g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t32g/{$mac}.cfg @@ -1,4 +1,5 @@ #!version:1.0.0.1 +#{$microtime} ##File header "#!version:1.0.0.1" can not be edited or deleted.## @@ -7,59 +8,63 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_primary_1} +account.1.outbound_host = {$account.1.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.1.outbound_port = {$sip_port_1} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} #Configure the address of the backup outbound proxy server. -account.1.backup_outbound_host = {$outbound_proxy_secondary_1} +account.1.backup_outbound_host = {$account.1.outbound_proxy_secondary} #Specify the port of the backup outbound proxy server, the default value is 5060. {if isset($outbound_proxy_1_port)} -account.1.backup_outbound_port = $outbound_proxy_secondary_1 +account.1.backup_outbound_port = $account.1.outbound_proxy_secondary {else} -account.1.backup_outbound_port = 5060 +account.1.backup_outbound_port = {$account.1.sip_port} {/if} #Configure the voice mail number of account 1. @@ -75,9 +80,9 @@ account.1.srv_ttl_timer_enable = #Configure the type of DNS-SRV query; 0-UDP, TCP and TLS (default), 1-UDP, 2-TCP, 3-TLS; #Require reboot; -{if $sip_transport_1 == 'udp'}account.1.dns_srv_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.dns_srv_type = 2{/if} -{if $sip_transport_1 == 'tls'}account.1.dns_srv_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.dns_srv_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.dns_srv_type = 2{/if} +{if $account.1.sip_transport == 'tls'}account.1.dns_srv_type = 3{/if} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -98,7 +103,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -208,7 +213,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -246,7 +251,7 @@ account.1.advanced.timer_t1 = account.1.advanced.timer_t2 = account.1.advanced.timer_t4 = -#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - �Ring8.wav. +#Assign a ringtone for account 1. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - ­Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.1.ringtone.ring_type = @@ -262,12 +267,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -282,12 +287,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -330,48 +335,52 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.2.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -411,7 +420,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -521,7 +530,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -643,48 +652,52 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.3.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -724,7 +737,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -834,7 +847,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -872,7 +885,7 @@ account.3.advanced.timer_t1 = account.3.advanced.timer_t2 = account.3.advanced.timer_t4 = -#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - �Ring8.wav. +#Assign a ringtone for account 3. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - ­Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.3.ringtone.ring_type = @@ -956,48 +969,52 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.4.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1037,7 +1054,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1147,7 +1164,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1272,48 +1289,52 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.5.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1353,7 +1374,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1461,7 +1482,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1583,48 +1604,52 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.6.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1664,7 +1689,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1772,7 +1797,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = @@ -1810,7 +1835,7 @@ account.6.advanced.timer_t1 = account.6.advanced.timer_t2 = account.6.advanced.timer_t4 = -#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - �Ring8.wav. +#Assign a ringtone for account 6. The system ring tones are: common.wav (default), Ring1.wav, Ring2.wav - ­Ring8.wav. #If you configure the custom ring tone (Family.wav) for the account, the value format is: Family.wav #If you configure the system ring tone (Ring2.wav) for the account, the value format is: Ring2.wav account.6.ringtone.ring_type = @@ -1967,7 +1992,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} memorykey.{$row.device_key_id}.type = {$row.device_key_type} memorykey.{$row.device_key_id}.line = {$row.device_key_line} memorykey.{$row.device_key_id}.value = {$row.device_key_value} -{if $row.device_key_category == "blf"} +{if $row.device_key_type == "blf"} memorykey.{$row.device_key_id}.pickup_value = {$row.device_key_extension} {/if} memorykey.{$row.device_key_id}.label = {$row.device_key_label} diff --git a/resources/templates/provision/yealink/t38g/directory.xml b/resources/templates/provision/yealink/t38g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t38g/directory.xml +++ b/resources/templates/provision/yealink/t38g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t38g/y000000000038.cfg b/resources/templates/provision/yealink/t38g/y000000000038.cfg index 54e2e75d45..48e238756f 100644 --- a/resources/templates/provision/yealink/t38g/y000000000038.cfg +++ b/resources/templates/provision/yealink/t38g/y000000000038.cfg @@ -287,7 +287,7 @@ redirect.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -295,7 +295,7 @@ transfer.blind_tran_on_hook_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} #Enable or disable the conference initiator to transfer the call when hanging up; #0-Disabled(default),1-Enabled; @@ -591,7 +591,7 @@ programablekey.1.history_type = {/foreach} ########################################################################################## -## Expansion Key £¨For T38G only£© ## +## Expansion Key £¨For T38G only£© ## ########################################################################################## #X ranges from 1 to 6, Y ranges from 1 to 39. #expansion_module.x.key.y.type = 37 (Switch by default) @@ -864,6 +864,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule. X ranges from 1 to 20. #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -928,6 +933,24 @@ bw.behave_bw_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Remote phonebook ## ####################################################################################### @@ -1040,7 +1063,7 @@ features.dnd.emergency_authorized_number = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1121,12 +1144,12 @@ features.pickup.blf_audio_enable = #0-Disabled (default), 1-Enabled; features.blf_and_callpark_idle_led_enable = 1 -#Enable or disable to enter the password when long pressing the OK key to reset to factory; 0-Disabled (default), 1-Enabled; -#features.factory_pwd_enable = 1 - #Configure the time (in seconds) the phone automatically dial out the dialed digits. It ranges from 1 to 14, the default value is 4. phone_setting.inter_digit_time = {$yealink_inter_digit_time} +#Enable or disable to enter the password when long pressing the OK key to reset to factory; 0-Disabled (default), 1-Enabled; +#features.factory_pwd_enable = 1 + #Configure the flash hook time (in milliseconds). It ranges from 0 to 799, the default value is 1. phone_setting.flash_hook_timer = @@ -1293,3 +1316,9 @@ screen_saver.pic.url = {$yealink_t38g_screen_saver} #Require reboot web_item_level.url = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/t38g/{$mac}.cfg b/resources/templates/provision/yealink/t38g/{$mac}.cfg index e65b71538d..6aea469e21 100644 --- a/resources/templates/provision/yealink/t38g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t38g/{$mac}.cfg @@ -8,55 +8,64 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; -account.1.outbound_proxy_enable = +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.1.outbound_port = +account.1.outbound_port = {$account.1.sip_port} +{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} #Configure the address of the backup outbound proxy server. -account.1.backup_outbound_host = +account.1.backup_outbound_host = {$account.1.outbound_proxy_secondary} #Specify the port of the backup outbound proxy server, the default value is 5060. -account.1.backup_outbound_port = +{if isset($outbound_proxy_1_port)} +account.1.backup_outbound_port = $account.1.outbound_proxy_secondary +{else} +account.1.backup_outbound_port = {$account.1.sip_port} +{/if} #Configure the voice mail number of account 1. voice_mail.number.1 = {$voicemail_number} @@ -70,7 +79,11 @@ account.1.srv_ttl_timer_enable = #Configure the type of DNS-SRV query; 0-UDP, TCP and TLS (default), 1-UDP, 2-TCP, 3-TLS; #Require reboot; -account.1.dns_srv_type = + +{if $account.1.sip_transport == 'udp'}account.1.dns_srv_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.dns_srv_type = 2{/if} +{if $account.1.sip_transport == 'tls'}account.1.dns_srv_type = 3{/if} + #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; account.1.anonymous_call = @@ -90,7 +103,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -200,7 +213,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -254,12 +267,12 @@ account.1.picture_info_enable = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -274,12 +287,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = @@ -322,48 +335,52 @@ account.1.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 2; 0-Disabled (default), 1-Enabled; -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 2. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 2. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.2.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = {$outbound_proxy_2} +account.2.outbound_host = {$account.2.outbound_proxy} #Specify the server port, the default value is 5060. -account.2.outbound_port = +account.2.outbound_port = {$account.2.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -403,7 +420,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.2.100rel_enable = {$yealink_retransmission} @@ -513,7 +530,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -635,48 +652,52 @@ account.2.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 3; 0-Disabled (default), 1-Enabled; -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 3. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 3. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.3.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy} #Specify the server port, the default value is 5060. -account.3.outbound_port = +account.3.outbound_port = {$account.3.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -716,7 +737,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.3.100rel_enable = {$yealink_retransmission} @@ -826,7 +847,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -948,48 +969,52 @@ account.3.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 4; 0-Disabled (default), 1-Enabled; -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 4. -account.4.label = {$display_name_4} +account.4.label = {$account.4.display_name} #Configure the display name of account 4. -account.4.display_name = {$display_name_4} +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$user_id_4} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 #Configure the SIP server address. -account.4.sip_server_host = {$server_address_4} +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.4.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = {$outbound_proxy_4} +account.4.outbound_host = {$account.4.outbound_proxy} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.4.backup_outbound_host = @@ -1029,7 +1054,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.4.100rel_enable = {$yealink_retransmission} @@ -1139,7 +1164,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1264,48 +1289,52 @@ account.4.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 5; 0-Disabled (default), 1-Enabled; -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 5. -account.5.label = {$display_name_5} +account.5.label = {$account.5.display_name} #Configure the display name of account 5. -account.5.display_name = {$display_name_5} +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = {$user_id_5} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 #Configure the SIP server address. -account.5.sip_server_host = {$server_address_5} +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.5.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = {$outbound_proxy_5} +account.5.outbound_host = {$account.5.outbound_proxy} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1345,7 +1374,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.5.100rel_enable = {$yealink_retransmission} @@ -1453,7 +1482,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1575,48 +1604,52 @@ account.5.codec.13.rtpmap = 97 ####################################################################################### #Enable or disable the account 6; 0-Disabled (default), 1-Enabled; -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 6. -account.6.label = {$display_name_6} +account.6.label = {$account.6.display_name} #Configure the display name of account 6. -account.6.display_name = {$display_name_6} +account.6.display_name = {$account.6.display_name} #Configure the username and password for register authentication. -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_id_6} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.user_id} #Configure the register user name. -account.6.user_name = {$user_id_6} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1 #Configure the SIP server address. -account.6.sip_server_host = {$server_address_6} +account.6.sip_server_host = {$account.6.server_address} #Specify the port for the SIP server. The default value is 5060. -account.6.sip_server_port = {$sip_port_6} +account.6.sip_server_port = {$account.6.sip_port} #Enable or disable the use of the outbound proxy server; 0-Disabled (default), 1-Enabled; account.6.outbound_proxy_enable = #Specify the IP address or domain name of the outbound proxy server. -account.6.outbound_host = {$outbound_proxy_6} +account.6.outbound_host = {$account.6.outbound_proxy} #Specify the server port, the default value is 5060. -account.6.outbound_port = +account.6.outbound_port = {$account.6.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} #Configure the address of the backup outbound proxy server. account.6.backup_outbound_host = @@ -1656,7 +1689,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled (default), 1-Enabled; account.6.100rel_enable = {$yealink_retransmission} @@ -1764,7 +1797,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = diff --git a/resources/templates/provision/yealink/t40g/directory.xml b/resources/templates/provision/yealink/t40g/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t40g/directory.xml +++ b/resources/templates/provision/yealink/t40g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t40g/y000000000076.cfg b/resources/templates/provision/yealink/t40g/y000000000076.cfg index 38d8516f9f..3a68fa16ae 100644 --- a/resources/templates/provision/yealink/t40g/y000000000076.cfg +++ b/resources/templates/provision/yealink/t40g/y000000000076.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1028,6 +1035,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1440,7 +1465,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t40g/{$mac}.cfg b/resources/templates/provision/yealink/t40g/{$mac}.cfg index bf34dffaaf..860d7aa02f 100644 --- a/resources/templates/provision/yealink/t40g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t40g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} + +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} + account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -788,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -998,30 +1019,37 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} + +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} + account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1064,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1207,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1297,7 +1325,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1510,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1518,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} + +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} + account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1563,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1706,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1824,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +2009,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +2017,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} + +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} + account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2062,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2205,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2323,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2508,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2516,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} + +account.6.outbound_port = {$account.6.sip_port} +{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} + account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2561,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2703,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2821,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +3006,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t40p/directory.xml b/resources/templates/provision/yealink/t40p/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t40p/directory.xml +++ b/resources/templates/provision/yealink/t40p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t40p/y000000000054.cfg b/resources/templates/provision/yealink/t40p/y000000000054.cfg index 237bb4178d..66df720baa 100644 --- a/resources/templates/provision/yealink/t40p/y000000000054.cfg +++ b/resources/templates/provision/yealink/t40p/y000000000054.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1440,7 +1447,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t40p/{$mac}.cfg b/resources/templates/provision/yealink/t40p/{$mac}.cfg index bf34dffaaf..cd63d15711 100644 --- a/resources/templates/provision/yealink/t40p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t40p/{$mac}.cfg @@ -8,41 +8,46 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} + +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +63,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +206,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +231,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +251,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +324,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +490,34 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +532,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +675,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -788,7 +793,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -998,30 +1003,34 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1045,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1188,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1297,7 +1306,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1491,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1499,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1541,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1684,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1802,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +1987,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +1995,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2037,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2180,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2298,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2483,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2491,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2533,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2675,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2793,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +2978,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### @@ -2966,6 +2992,7 @@ network.internet_port.gateway = #linekey.x.lable--Define the label for each line key. Meet-Me Conference "1" or BLF "16" require pick_value. {foreach $keys['line'] as $row} + #Configure Line Key {$row.device_key_id} linekey.{$row.device_key_id}.line = {$row.device_key_line} linekey.{$row.device_key_id}.value = {$row.device_key_value} @@ -2999,6 +3026,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} #memorykey.x.sub_type = {foreach $keys["memory"] as $row} + #Expansion Memory Key {$row.device_key_id} memorykey.{$row.device_key_id}.type = {$row.device_key_type} memorykey.{$row.device_key_id}.line = {$row.device_key_line} diff --git a/resources/templates/provision/yealink/t41p/directory.xml b/resources/templates/provision/yealink/t41p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t41p/directory.xml +++ b/resources/templates/provision/yealink/t41p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t41p/y000000000036.cfg b/resources/templates/provision/yealink/t41p/y000000000036.cfg index 035082e1ed..d51953215b 100644 --- a/resources/templates/provision/yealink/t41p/y000000000036.cfg +++ b/resources/templates/provision/yealink/t41p/y000000000036.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -884,7 +891,7 @@ features.pickup.blf_audio_enable = ####################################################################################### ## Phone Setting ## ####################################################################################### -#Enable or disable the photo display on handset 0 = disable, 1 = enable +#Enable or disable the photo display on handset 0 = disable, 1= enable phone_setting.contact_photo_display.enable = 0 #Enable or disable the called party information display 0 = disable 1 = enable @@ -1028,6 +1035,24 @@ bw.calllog_and_dir = #Enable or disable the feature key synchronization; 0-Disabled (default), 1-Enabled; bw.feature_key_sync = {$yealink_feature_key_sync} +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Security ## ####################################################################################### @@ -1440,7 +1465,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t41p/{$mac}.cfg b/resources/templates/provision/yealink/t41p/{$mac}.cfg index 71f0577766..58a78006bf 100644 --- a/resources/templates/provision/yealink/t41p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t41p/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +205,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +230,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +250,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +323,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +489,34 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +531,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +674,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -788,7 +792,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -998,30 +1002,34 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1044,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1187,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1297,7 +1305,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1490,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1498,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1540,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1683,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1801,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +1986,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +1994,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2036,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2179,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2297,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2482,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2490,34 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2532,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2674,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2792,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +2977,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t41s/directory.xml b/resources/templates/provision/yealink/t41s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t41s/directory.xml +++ b/resources/templates/provision/yealink/t41s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t41s/y000000000068.cfg b/resources/templates/provision/yealink/t41s/y000000000068.cfg index 424265d359..2040dc03ed 100644 --- a/resources/templates/provision/yealink/t41s/y000000000068.cfg +++ b/resources/templates/provision/yealink/t41s/y000000000068.cfg @@ -385,15 +385,15 @@ static.auto_provision.encryption.config = ####################################################################################### -## Trnasfer ## +## Transfer ## ####################################################################################### -features.transfer_type= -dialplan.transfer.mode = -transfer.on_hook_trans_enable = -transfer.tran_others_after_conf_enable = -transfer.blind_tran_on_hook_enable = -transfer.semi_attend_tran_enable = -phone_setting.call_appearance.transfer_via_new_linekey= +features.transfer_type= {$yealink_transfer_type} +dialplan.transfer.mode = {$yealink_transfer_mode} +transfer.on_hook_trans_enable = {$yealink_transfer_onhook} +transfer.tran_others_after_conf_enable = {$yealink_transfer_after_conf} +transfer.blind_tran_on_hook_enable = {$yealink_transfer_blind_on_hook} +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} +phone_setting.call_appearance.transfer_via_new_linekey= {$yealink_transfer_via_new_linekey} ####################################################################################### @@ -451,7 +451,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -595,6 +595,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -869,7 +871,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} features.block_linekey_in_menu.enable = features.shorten_linekey_label.enable = features.flash_url_dsskey_led.enable = -features.config_dsskey_length = +features.config_dsskey_length = {$yealink_dsskey_length} phone_setting.page_tip = features.keep_switch_page_key.enable= @@ -1117,7 +1119,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1325,7 +1327,13 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= + +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = diff --git a/resources/templates/provision/yealink/t41s/{$mac}.cfg b/resources/templates/provision/yealink/t41s/{$mac}.cfg index bf34dffaaf..55df5a4ba5 100644 --- a/resources/templates/provision/yealink/t41s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t41s/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_4_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_5_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_2_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -288,6 +302,10 @@ account.1.codec.12.payload_type = GSM account.1.codec.12.priority = 0 account.1.codec.12.rtpmap = 3 +account.1.codec.13.enable = 1 +account.1.codec.13.payload_type = opus +account.1.codec.13.priority = {$yealink_codec_1_priority} +account.1.codec.13.rtpmap = 101 ####################################################################################### ## Audio Advanced ## @@ -323,7 +341,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +507,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} + +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} + account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +552,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +695,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -753,6 +778,10 @@ account.2.codec.12.payload_type = GSM account.2.codec.12.priority = 0 account.2.codec.12.rtpmap = 3 +account.2.codec.13.enable = 1 +account.2.codec.13.payload_type = opus +account.2.codec.13.priority = 1 +account.2.codec.13.rtpmap = 101 ####################################################################################### ## Audio Advanced ## @@ -788,7 +817,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -998,30 +1027,37 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} + +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} + account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1072,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1215,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1262,6 +1298,11 @@ account.3.codec.12.payload_type = GSM account.3.codec.12.priority = 0 account.3.codec.12.rtpmap = 3 +account.3.codec.13.enable = 1 +account.3.codec.13.payload_type = opus +account.3.codec.13.priority = 1 +account.3.codec.13.rtpmap = 101 + ####################################################################################### ## Audio Advanced ## @@ -1297,7 +1338,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1523,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1531,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} + +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} + account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1576,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1719,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1837,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +2022,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +2030,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} + +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} + account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2075,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2218,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2336,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2521,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2529,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} + +account.6.outbound_port = {$account.6.sip_port} +{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} + account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2574,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2716,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2834,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +3019,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t42g/directory.xml b/resources/templates/provision/yealink/t42g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t42g/directory.xml +++ b/resources/templates/provision/yealink/t42g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg index c1733fb36f..fa8d36ee09 100644 --- a/resources/templates/provision/yealink/t42g/y000000000029.cfg +++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,11 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1440,7 +1446,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t42g/{$mac}.cfg b/resources/templates/provision/yealink/t42g/{$mac}.cfg index aa13ae4b26..7a8e6b09d2 100644 --- a/resources/templates/provision/yealink/t42g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t42g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = diff --git a/resources/templates/provision/yealink/t42s/directory.xml b/resources/templates/provision/yealink/t42s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t42s/directory.xml +++ b/resources/templates/provision/yealink/t42s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t42s/y000000000067.cfg b/resources/templates/provision/yealink/t42s/y000000000067.cfg index 58ae396fc1..28a9cd77d3 100644 --- a/resources/templates/provision/yealink/t42s/y000000000067.cfg +++ b/resources/templates/provision/yealink/t42s/y000000000067.cfg @@ -385,15 +385,15 @@ static.auto_provision.encryption.config = ####################################################################################### -## Trnasfer ## +## Transfer ## ####################################################################################### -features.transfer_type= -dialplan.transfer.mode = -transfer.on_hook_trans_enable = -transfer.tran_others_after_conf_enable = -transfer.blind_tran_on_hook_enable = -transfer.semi_attend_tran_enable = -phone_setting.call_appearance.transfer_via_new_linekey= +features.transfer_type= {$yealink_transfer_type} +dialplan.transfer.mode = {$yealink_transfer_mode} +transfer.on_hook_trans_enable = {$yealink_transfer_onhook} +transfer.tran_others_after_conf_enable = {$yealink_transfer_after_conf} +transfer.blind_tran_on_hook_enable = {$yealink_transfer_blind_on_hook} +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} +phone_setting.call_appearance.transfer_via_new_linekey= {$yealink_transfer_via_new_linekey} ####################################################################################### @@ -451,7 +451,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -595,6 +595,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -868,7 +870,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} features.block_linekey_in_menu.enable = features.shorten_linekey_label.enable = features.flash_url_dsskey_led.enable = -features.config_dsskey_length = +features.config_dsskey_length = {$yealink_dsskey_length} phone_setting.page_tip = features.keep_switch_page_key.enable= @@ -1116,7 +1118,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1324,7 +1326,11 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = diff --git a/resources/templates/provision/yealink/t42s/{$mac}.cfg b/resources/templates/provision/yealink/t42s/{$mac}.cfg index 71f0577766..a869234a08 100644 --- a/resources/templates/provision/yealink/t42s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t42s/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,32 +244,32 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_4_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_5_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 account.1.codec.3.payload_type = G723_53 -account.1.codec.3.priority =0 +account.1.codec.3.priority = {$yealink_codec_6_priority} account.1.codec.3.rtpmap = 4 account.1.codec.4.enable = 0 account.1.codec.4.payload_type = G723_63 -account.1.codec.4.priority = 0 +account.1.codec.4.priority = {$yealink_codec_7_priority} account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_2_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -288,6 +302,10 @@ account.1.codec.12.payload_type = GSM account.1.codec.12.priority = 0 account.1.codec.12.rtpmap = 3 +account.1.codec.13.enable = 1 +account.1.codec.13.payload_type = opus +account.1.codec.13.priority = {$yealink_codec_1_priority} +account.1.codec.13.rtpmap = 101 ####################################################################################### ## Audio Advanced ## @@ -323,7 +341,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +507,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} + +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} + account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +552,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +695,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -753,6 +778,10 @@ account.2.codec.12.payload_type = GSM account.2.codec.12.priority = 0 account.2.codec.12.rtpmap = 3 +account.2.codec.13.enable = 1 +account.2.codec.13.payload_type = opus +account.2.codec.13.priority = 1 +account.2.codec.13.rtpmap = 101 ####################################################################################### ## Audio Advanced ## @@ -788,7 +817,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -998,30 +1027,37 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} + +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} + account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1072,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1215,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1262,6 +1298,11 @@ account.3.codec.12.payload_type = GSM account.3.codec.12.priority = 0 account.3.codec.12.rtpmap = 3 +account.3.codec.13.enable = 1 +account.3.codec.13.payload_type = opus +account.3.codec.13.priority = 1 +account.3.codec.13.rtpmap = 101 + ####################################################################################### ## Audio Advanced ## @@ -1297,7 +1338,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1523,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1531,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} + +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} + account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1576,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1719,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1837,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +2022,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +2030,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} + +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} + account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2075,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2218,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2336,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2521,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2529,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} + +account.6.outbound_port = {$account.6.sip_port} +{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} + account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2574,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2716,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2834,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +3019,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t46g/directory.xml b/resources/templates/provision/yealink/t46g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t46g/directory.xml +++ b/resources/templates/provision/yealink/t46g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t46g/y000000000028.cfg b/resources/templates/provision/yealink/t46g/y000000000028.cfg index 7dafe1c4ee..c91e958d81 100755 --- a/resources/templates/provision/yealink/t46g/y000000000028.cfg +++ b/resources/templates/provision/yealink/t46g/y000000000028.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,11 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1261,6 +1267,24 @@ linekey.27.extension = linekey.27.type = linekey.27.xml_phonebook = linekey.27.label = +####################################################################################### +## Dsskey ## +####################################################################################### +features.block_linekey_in_menu.enable = +features.shorten_linekey_label.enable = +features.flash_url_dsskey_led.enable = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.page_tip = +features.keep_switch_page_key.enable= + +##phone_setting.idle_dsskey_and_title.transparency(Only support T54S/T52S/T48G/T48S) +phone_setting.idle_dsskey_and_title.transparency= + +##V83 Add +phone_setting.keytype_sequence = +phone_setting.dsskey_label.display_method = +local.dsskey_type_config.mode = + ####################################################################################### ## Programmable key ## ####################################################################################### @@ -1440,7 +1464,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t46g/{$mac}.cfg b/resources/templates/provision/yealink/t46g/{$mac}.cfg index aa13ae4b26..39db9b16b1 100755 --- a/resources/templates/provision/yealink/t46g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t46g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2848,6 +2882,15 @@ account.6.xsi.host = account.6.xsi.server_type = account.6.xsi.port = +####################################################################################### +## BSFT UC ## +####################################################################################### +###Only T46G/T48G/T49G Models support these parameter +features.uc_enable = +features.uc_password = +features.uc_username = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.dsskey_directory_auto.enable = ####################################################################################### ## NETWORK ## diff --git a/resources/templates/provision/yealink/t46s/directory.xml b/resources/templates/provision/yealink/t46s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t46s/directory.xml +++ b/resources/templates/provision/yealink/t46s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t46s/y000000000066.cfg b/resources/templates/provision/yealink/t46s/y000000000066.cfg index d7c2e01ef4..8d0cce7c11 100644 --- a/resources/templates/provision/yealink/t46s/y000000000066.cfg +++ b/resources/templates/provision/yealink/t46s/y000000000066.cfg @@ -385,14 +385,14 @@ static.auto_provision.encryption.config = ####################################################################################### -## Trnasfer ## +## Transfer ## ####################################################################################### features.transfer_type= dialplan.transfer.mode = transfer.on_hook_trans_enable = transfer.tran_others_after_conf_enable = transfer.blind_tran_on_hook_enable = -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} phone_setting.call_appearance.transfer_via_new_linekey= @@ -451,7 +451,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -595,6 +595,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -869,7 +871,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} features.block_linekey_in_menu.enable = features.shorten_linekey_label.enable = features.flash_url_dsskey_led.enable = -features.config_dsskey_length = +features.config_dsskey_length = {$yealink_dsskey_length} phone_setting.page_tip = features.keep_switch_page_key.enable= @@ -1117,7 +1119,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1325,7 +1327,11 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = @@ -1377,7 +1383,7 @@ wui_lang.delete= gui_input_method.delete= gui_lang.url= gui_lang.delete= -static.lang.gui = {$yealink_language_gui} +lang.gui = {$yealink_language_gui} static.lang.wui= diff --git a/resources/templates/provision/yealink/t46s/{$mac}.cfg b/resources/templates/provision/yealink/t46s/{$mac}.cfg index d8fec32800..d4e8379445 100644 --- a/resources/templates/provision/yealink/t46s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t46s/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 3 +account.1.codec.1.priority = {$yealink_codec_3_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 5 +account.1.codec.2.priority = {$yealink_codec_5_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 4 +account.1.codec.5.priority = {$yealink_codec_4_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 2 +account.1.codec.6.priority = {$yealink_codec_2_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -290,10 +304,9 @@ account.1.codec.12.rtpmap = 3 account.1.codec.13.enable = 1 account.1.codec.13.payload_type = opus -account.1.codec.13.priority = 1 +account.1.codec.13.priority = {$yealink_codec_1_priority} account.1.codec.13.rtpmap = 101 - ####################################################################################### ## Audio Advanced ## ####################################################################################### @@ -328,7 +341,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -494,33 +507,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_1} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -535,17 +552,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -678,8 +695,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -800,7 +817,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -980,33 +997,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_1} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1021,17 +1042,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1164,8 +1185,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1287,7 +1308,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1457,33 +1478,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_1} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1498,17 +1523,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1641,8 +1666,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1759,7 +1784,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1929,33 +1954,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_1} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1970,17 +1999,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2113,8 +2142,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2231,7 +2260,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2401,33 +2430,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_1} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2442,17 +2475,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2584,8 +2617,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2702,7 +2735,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = diff --git a/resources/templates/provision/yealink/t48g/directory.xml b/resources/templates/provision/yealink/t48g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t48g/directory.xml +++ b/resources/templates/provision/yealink/t48g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 54acb4f6e2..2dc1199f67 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -326,6 +326,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -419,7 +421,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -434,7 +436,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -545,7 +547,11 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1440,7 +1446,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t48g/{$mac}.cfg b/resources/templates/provision/yealink/t48g/{$mac}.cfg index aa13ae4b26..39db9b16b1 100644 --- a/resources/templates/provision/yealink/t48g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t48g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,33 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} -account.2.outbound_port = {$sip_port_2} +account.2.outbound_port = {$account.2.sip_port} {if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -530,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -673,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -791,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -971,33 +989,37 @@ local_time.time_zone_name = {$yealink_time_zone_name} ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} -account.3.outbound_port = {$sip_port_3} +account.3.outbound_port = {$account.3.sip_port} {if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1012,17 +1034,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1155,8 +1177,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1273,7 +1295,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1443,33 +1465,37 @@ account.3.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} -account.4.outbound_port = {$sip_port_4} +account.4.outbound_port = {$account.4.sip_port} {if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1484,17 +1510,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1627,8 +1653,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1745,7 +1771,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1915,33 +1941,37 @@ account.4.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} -account.5.outbound_port = {$sip_port_5} +account.5.outbound_port = {$account.5.sip_port} {if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1956,17 +1986,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2099,8 +2129,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2217,7 +2247,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2387,33 +2417,37 @@ account.5.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} -account.6.outbound_port = {$sip_port_6} +account.6.outbound_port = {$account.6.sip_port} {if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2428,17 +2462,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2570,8 +2604,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2688,7 +2722,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2848,6 +2882,15 @@ account.6.xsi.host = account.6.xsi.server_type = account.6.xsi.port = +####################################################################################### +## BSFT UC ## +####################################################################################### +###Only T46G/T48G/T49G Models support these parameter +features.uc_enable = +features.uc_password = +features.uc_username = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.dsskey_directory_auto.enable = ####################################################################################### ## NETWORK ## diff --git a/resources/templates/provision/yealink/t48s/directory.xml b/resources/templates/provision/yealink/t48s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t48s/directory.xml +++ b/resources/templates/provision/yealink/t48s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t48s/y000000000065.cfg b/resources/templates/provision/yealink/t48s/y000000000065.cfg index b5edb4325d..3981174c35 100644 --- a/resources/templates/provision/yealink/t48s/y000000000065.cfg +++ b/resources/templates/provision/yealink/t48s/y000000000065.cfg @@ -5,7 +5,10 @@ ####################################################################################### ## Network CDP ## ####################################################################################### -static.network.cdp.enable = +#Enable or disable CDP; 0-Disabled, 1-Enabled (default); +static.network.cdp.enable = {$yealink_cdp_enable} + +#The interval (in seconds) for the IP phone to send CDP requests. Integer from 1 to 3600 static.network.cdp.packet_interval = @@ -50,13 +53,49 @@ static.wifi.1.eap_password = static.wifi.show_scan_prompt = +####################################################################################### +## NETWORK ## +####################################################################################### +##0-ipv4, 1-ipv6, 2-ipv4&ipv6 +static.network.ip_address_mode = {$yealink_ip_address_mode} + +#Enable or disable LLDP; 0-Disabled, 1-Enabled (default); +#Require reboot; +static.network.lldp.enable = {$yealink_lldp_enable} + +#Configure the interval(in seconds) the phone broadcasts the LLDP request. It ranges from 1 to 3600, the default value is 60. +static.network.lldp.packet_interval = + +network.ipv6_prefix = 64 +network.ipv6_internet_port.type = +network.ipv6_internet_port.ip = +network.ipv6_internet_port.gateway = +network.ipv6_primary_dns = +network.ipv6_secondary_dns = +network.ipv6_icmp_v6.enable = + +#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; +#Require reboot; +network.internet_port.type = + +#Configure the static IP address, subnet mask, gateway and DNS server; +#Require Reboot; +network.internet_port.ip = +network.internet_port.mask = +network.internet_port.gateway = +{if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + +{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + ####################################################################################### ## Network Internet ## ####################################################################################### static.network.ip_address_mode = static.network.span_to_pc_port = static.network.vlan.pc_port_mode = -static.network.static_dns_enable = + +{if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} + static.network.pc_port.enable = static.network.primary_dns = {$dns_server_primary} static.network.secondary_dns = {$dns_server_secondary} @@ -82,6 +121,8 @@ static.wui.https_enable = static.network.port.https = static.network.port.http = +#Configure the duplex mode and the speed of the WAN port. +#0-Auto negotiate (default), 1-Full duplex 10Mbps, 2-Full duplex 100Mbps, 3-Half duplex 10Mbps, 4-Half duplex 100Mbps; static.network.pc_port.speed_duplex = static.network.internet_port.speed_duplex = @@ -89,7 +130,7 @@ static.network.internet_port.speed_duplex = ####################################################################################### ## Network LLDP ## ####################################################################################### -static.network.lldp.enable = +static.network.lldp.enable = {$yealink_lldp_enable} static.network.lldp.packet_interval = @@ -385,14 +426,14 @@ static.auto_provision.encryption.config = ####################################################################################### -## Trnasfer ## +## Transfer ## ####################################################################################### features.transfer_type= dialplan.transfer.mode = transfer.on_hook_trans_enable = transfer.tran_others_after_conf_enable = transfer.blind_tran_on_hook_enable = -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} phone_setting.call_appearance.transfer_via_new_linekey= @@ -451,7 +492,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -595,6 +636,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -877,7 +920,7 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} features.block_linekey_in_menu.enable = features.shorten_linekey_label.enable = features.flash_url_dsskey_led.enable = -features.config_dsskey_length = +features.config_dsskey_length = {$yealink_dsskey_length} phone_setting.page_tip = features.keep_switch_page_key.enable= @@ -1125,7 +1168,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1333,7 +1376,11 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = @@ -1678,4 +1725,3 @@ directory_setting.gb_pab_directory.enable = directory_setting.gb_pab_directory.priority = search_in_dialing.gb_pab_directory.priority = search_in_dialing.gb_pab_directory.enable = - diff --git a/resources/templates/provision/yealink/t48s/{$mac}.cfg b/resources/templates/provision/yealink/t48s/{$mac}.cfg index 16035fa89b..cfe673deab 100644 --- a/resources/templates/provision/yealink/t48s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t48s/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 3 +account.1.codec.1.priority = {$yealink_codec_3_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 5 +account.1.codec.2.priority = {$yealink_codec_5_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 4 +account.1.codec.5.priority = {$yealink_codec_4_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 2 +account.1.codec.6.priority = {$yealink_codec_2_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -290,7 +304,7 @@ account.1.codec.12.rtpmap = 3 account.1.codec.13.enable = 1 account.1.codec.13.payload_type = opus -account.1.codec.13.priority = 1 +account.1.codec.13.priority = {$yealink_codec_1_priority} account.1.codec.13.rtpmap = 101 ####################################################################################### @@ -327,7 +341,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -493,30 +507,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} + +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} + account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -531,17 +552,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -674,8 +695,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -796,7 +817,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -967,69 +988,42 @@ local_time.time_zone = {$yealink_time_zone} local_time.time_zone_name = {$yealink_time_zone_name} -####################################################################################### -## NETWORK ## -####################################################################################### -##0-ipv4, 1-ipv6, 2-ipv4&ipv6 -network.ip_address_mode = 2 - -network.ipv6_prefix = 64 -network.ipv6_internet_port.type = -network.ipv6_internet_port.ip = -network.ipv6_internet_port.gateway = -network.ipv6_primary_dns = -network.ipv6_secondary_dns = -network.ipv6_icmp_v6.enable = - -#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; -#Require reboot; -network.internet_port.type = - -#Configure the static IP address, subnet mask, gateway and DNS server; -#Require Reboot; -network.internet_port.ip = -network.internet_port.mask = -network.internet_port.gateway = -{if isset($dns_server_primary)} -network.primary_dns = {$dns_server_primary} -{/if} -{if isset($dns_server_secondary)} -network.secondary_dns = {$dns_server_secondary} -{/if} -{if isset($dns_server_primary)} -network.static_dns_enable = 1 -{else}network.static_dns_enable = 0 -{/if} - ####################################################################################### ## Account 3 Basic Settings ## ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} + +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} + account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1044,17 +1038,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1187,8 +1181,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1310,7 +1304,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1471,61 +1465,42 @@ account.3.xsi.server_type = account.3.xsi.port = -####################################################################################### -## NETWORK ## -####################################################################################### -##0-ipv4, 1-ipv6, 2-ipv4&ipv6 -network.ip_address_mode = 2 - -network.ipv6_prefix = 64 -network.ipv6_internet_port.type = -network.ipv6_internet_port.ip = -network.ipv6_internet_port.gateway = -network.ipv6_primary_dns = -network.ipv6_secondary_dns = -network.ipv6_icmp_v6.enable = - -#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; -#Require reboot; -network.internet_port.type = - -#Configure the static IP address, subnet mask, gateway and DNS server; -#Require Reboot; -network.internet_port.ip = -network.internet_port.mask = -network.internet_port.gateway = -{if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} -{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} - ####################################################################################### ## Account 4 Basic Settings ## ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} + +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} + account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1540,17 +1515,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1683,8 +1658,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1801,7 +1776,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1962,61 +1937,42 @@ account.4.xsi.server_type = account.4.xsi.port = -####################################################################################### -## NETWORK ## -####################################################################################### -##0-ipv4, 1-ipv6, 2-ipv4&ipv6 -network.ip_address_mode = 2 - -network.ipv6_prefix = 64 -network.ipv6_internet_port.type = -network.ipv6_internet_port.ip = -network.ipv6_internet_port.gateway = -network.ipv6_primary_dns = -network.ipv6_secondary_dns = -network.ipv6_icmp_v6.enable = - -#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; -#Require reboot; -network.internet_port.type = - -#Configure the static IP address, subnet mask, gateway and DNS server; -#Require Reboot; -network.internet_port.ip = -network.internet_port.mask = -network.internet_port.gateway = -{if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} -{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} - ####################################################################################### ## Account 5 Basic Settings ## ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} + +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} + account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2031,17 +1987,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2174,8 +2130,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2292,7 +2248,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2453,61 +2409,42 @@ account.5.xsi.server_type = account.5.xsi.port = -####################################################################################### -## NETWORK ## -####################################################################################### -##0-ipv4, 1-ipv6, 2-ipv4&ipv6 -network.ip_address_mode = 2 - -network.ipv6_prefix = 64 -network.ipv6_internet_port.type = -network.ipv6_internet_port.ip = -network.ipv6_internet_port.gateway = -network.ipv6_primary_dns = -network.ipv6_secondary_dns = -network.ipv6_icmp_v6.enable = - -#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; -#Require reboot; -network.internet_port.type = - -#Configure the static IP address, subnet mask, gateway and DNS server; -#Require Reboot; -network.internet_port.ip = -network.internet_port.mask = -network.internet_port.gateway = -{if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} -{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} - ####################################################################################### ## Account 6 Basic Settings ## ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} + +account.6.outbound_port = {$account.6.sip_port} +{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} + account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2522,17 +2459,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2664,8 +2601,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2782,7 +2719,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2943,33 +2880,6 @@ account.6.xsi.server_type = account.6.xsi.port = -####################################################################################### -## NETWORK ## -####################################################################################### -##0-ipv4, 1-ipv6, 2-ipv4&ipv6 -network.ip_address_mode = 2 - -network.ipv6_prefix = 64 -network.ipv6_internet_port.type = -network.ipv6_internet_port.ip = -network.ipv6_internet_port.gateway = -network.ipv6_primary_dns = -network.ipv6_secondary_dns = -network.ipv6_icmp_v6.enable = - -#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address; -#Require reboot; -network.internet_port.type = - -#Configure the static IP address, subnet mask, gateway and DNS server; -#Require Reboot; -network.internet_port.ip = -network.internet_port.mask = -network.internet_port.gateway = -{if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} -{if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} -{if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} - ####################################################################################### ## Line Key ## ####################################################################################### diff --git a/resources/templates/provision/yealink/t49g/directory.xml b/resources/templates/provision/yealink/t49g/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/t49g/directory.xml +++ b/resources/templates/provision/yealink/t49g/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/t49g/y000000000051.cfg b/resources/templates/provision/yealink/t49g/y000000000051.cfg index d1d823b40f..b8b3f9ff3f 100644 --- a/resources/templates/provision/yealink/t49g/y000000000051.cfg +++ b/resources/templates/provision/yealink/t49g/y000000000051.cfg @@ -308,6 +308,8 @@ sip.reg_surge_prevention = #Configures the local SIP port. Integer from 1024 to 65535 {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ####################################################################################### ## Echo Cancellation ## ####################################################################################### @@ -378,7 +380,7 @@ wui.http_enable = ####################################################################################### #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled,1-Enabled(default); @@ -393,7 +395,7 @@ transfer.tran_others_after_conf_enable = transfer.on_hook_trans_enable = #Define the way of DSS key when configuring as a transfer key; 0-Display Number, 1-Attended Transfer, 2-Blind Transfer (default); -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ####################################################################################### ## Web Language ## @@ -504,7 +506,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = # X ranges from 1 to 100. -dialplan.dialnow.rule.X = +#dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} dialplan.dialnow.line_id.X = # X ranges from 1 to 100. @@ -1399,7 +1406,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} #Enable or disable the call waiting feature; 0-Disabled, 1-Enabled (default); call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t49g/{$mac}.cfg b/resources/templates/provision/yealink/t49g/{$mac}.cfg index 71f0577766..7940744deb 100644 --- a/resources/templates/provision/yealink/t49g/{$mac}.cfg +++ b/resources/templates/provision/yealink/t49g/{$mac}.cfg @@ -8,41 +8,45 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} {if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -58,21 +62,31 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} + +#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS-NAPTR; +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} + +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -205,8 +219,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -230,12 +244,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 2 +account.1.codec.1.priority = {$yealink_codec_2_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 3 +account.1.codec.2.priority = {$yealink_codec_4_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -250,12 +264,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 1 +account.1.codec.6.priority = {$yealink_codec_1_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -323,7 +337,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -489,30 +503,37 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} + +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} + account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -527,17 +548,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -670,8 +691,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -788,7 +809,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -948,6 +969,15 @@ account.2.xsi.host = account.2.xsi.server_type = account.2.xsi.port = +####################################################################################### +## BSFT UC ## +####################################################################################### +###Only T46G/T48G/T49G Models support these parameter +features.uc_enable = +features.uc_password = +features.uc_username = +features.config_dsskey_length = {$yealink_dsskey_length} +phone_setting.dsskey_directory_auto.enable = ####################################################################################### ## Time ## @@ -998,30 +1028,37 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} + +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} + account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1036,17 +1073,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1179,8 +1216,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1297,7 +1334,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1482,6 +1519,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1489,30 +1527,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} + +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} + account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1527,17 +1572,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.4.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1670,8 +1715,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1788,7 +1833,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1973,6 +2018,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1980,30 +2026,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} + +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} + account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2018,17 +2071,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2161,8 +2214,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2279,7 +2332,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2464,6 +2517,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2471,30 +2525,37 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} + +account.6.outbound_port = {$account.6.sip_port} +{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if} + account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2509,17 +2570,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2651,8 +2712,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_6) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2769,7 +2830,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2954,7 +3015,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/t52s/directory.xml b/resources/templates/provision/yealink/t52s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t52s/directory.xml +++ b/resources/templates/provision/yealink/t52s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t52s/y000000000074.cfg b/resources/templates/provision/yealink/t52s/y000000000074.cfg index 54c2be541d..889a7fa737 100644 --- a/resources/templates/provision/yealink/t52s/y000000000074.cfg +++ b/resources/templates/provision/yealink/t52s/y000000000074.cfg @@ -456,7 +456,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -588,6 +588,7 @@ sip.timer_t2= sip.timer_t4= sip.listen_mode= {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + sip.listen_port= sip.tls_listen_port= sip.tcp_port_random_mode= @@ -598,6 +599,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -678,6 +681,7 @@ phone_setting.vq_rtcpxr.session_report.enable= {$yealink_rtcpxr_report_enable} ## Contact ## ####################################################################################### static.directory_setting.url= https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml + super_search.url= local_contact.data.url= @@ -1113,7 +1117,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1321,7 +1325,13 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= + +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = diff --git a/resources/templates/provision/yealink/t52s/{$mac}.cfg b/resources/templates/provision/yealink/t52s/{$mac}.cfg index efdacf4c00..7398014fd9 100644 --- a/resources/templates/provision/yealink/t52s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t52s/{$mac}.cfg @@ -140,12 +140,12 @@ account.1.codec.ilbc_15_2kbps.priority= account.1.codec.ilbc_15_2kbps.enable= account.1.codec.ilbc_13_33kbps.priority= account.1.codec.ilbc_13_33kbps.enable = -account.1.codec.pcma.enable= -account.1.codec.pcma.priority= -account.1.codec.pcmu.enable= -account.1.codec.pcmu.priority= -account.1.codec.opus.priority = -account.1.codec.opus.enable= +account.1.codec.pcma.enable= 1 +account.1.codec.pcma.priority= {$yealink_codec_5_priority} +account.1.codec.pcmu.enable= 1 +account.1.codec.pcmu.priority= {$yealink_codec_4_priority} +account.1.codec.opus.priority = {$yealink_codec_1_priority} +account.1.codec.opus.enable= 1 account.1.codec.opus.para= account.1.codec.g726_40.enable= account.1.codec.g726_40.priority= @@ -159,10 +159,10 @@ account.1.codec.g723_63.priority= account.1.codec.g723_63.enable= account.1.codec.g723_53.priority= account.1.codec.g723_53.enable= -account.1.codec.g729.priority= -account.1.codec.g729.enable= -account.1.codec.g722.priority= -account.1.codec.g722.enable= +account.1.codec.g729.priority= {$yealink_codec_3_priority} +account.1.codec.g729.enable= 1 +account.1.codec.g722.priority= {$yealink_codec_2_priority} +account.1.codec.g722.enable= 1 account.2.codec.ilbc_15_2kbps.priority= account.2.codec.ilbc_15_2kbps.enable= @@ -195,57 +195,61 @@ account.2.codec.g722.enable= ################################################################ # Account Register ## ################################################################ -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} -account.1.sip_server.1.address= {$server_address_1} -account.1.sip_server.1.port= {$sip_port_1} +account.1.sip_server.1.address= {$account.1.server_address} +account.1.sip_server.1.port= {$account.1.sip_port} -{if $sip_transport_1 == 'udp'}account.1.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} -account.1.sip_server.1.expires= {$register_expires_1} +account.1.sip_server.1.expires= {$account.1.register_expires} account.1.sip_server.1.retry_counts= 3 -account.1.sip_server.2.address= {$server_address_2} -account.1.sip_server.2.port= {$sip_port_2} +account.1.sip_server.2.address= {$account.1.server.2.address} +account.1.sip_server.2.port= {$account.1.sip_port} -{if $sip_transport_1 == 'udp'}account.1.sip_server.2.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.2.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} -account.1.sip_server.2.expires= {$register_expires_2} +account.1.sip_server.2.expires= {$account.1.register_expires} account.1.sip_server.2.retry_counts= 3 -account.1.outbound_proxy_enable= {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy_enable= {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} -account.1.outbound_proxy.1.address= {$outbound_proxy_primary_1} +account.1.outbound_proxy.1.address= {$account.1.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} -account.1.outbound_proxy.2.address= {$outbound_proxy_secondary_1} +account.1.outbound_proxy.2.address= {$account.1.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_fallback_interval)} @@ -257,57 +261,60 @@ account.1.outbound_proxy_fallback_interval = 120 account.1.nat.nat_traversal= -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} -account.2.sip_server.1.address= {$server_address_2} -account.2.sip_server.1.port= {$sip_port_2} +account.2.sip_server.1.address= {$account.2.server_address} +account.2.sip_server.1.port= {$account.2.sip_port} -{if $sip_transport_1 == 'udp'}account.2.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.2.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.1.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.1.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} -account.2.sip_server.1.expires= {$register_expires_1} +account.2.sip_server.1.expires= {$account.2.register_expires} account.2.sip_server.1.retry_counts= 3 -account.2.sip_server.2.address= {$server_address_2} -account.2.sip_server.2.port= {$sip_port_2} +account.2.sip_server.2.address= {$account.2.server.2.address} +account.2.sip_server.2.port= {$account.2.sip_port} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.2.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.2.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} -{if $sip_transport_2 == 'udp'}account.2.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} - -account.2.sip_server.2.expires= {$register_expires_2} +account.2.sip_server.2.expires= {$account.2.register_expires} account.2.sip_server.2.retry_counts= 3 -account.2.outbound_proxy_enable= {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy_enable= {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} -account.2.outbound_proxy.1.address= {$outbound_proxy_primary_2} +account.2.outbound_proxy.1.address= {$account.2.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.2.outbound_proxy.1.port = {$outbound_proxy_2_port} {else} -account.2.outbound_proxy.1.port = 5060 +account.2.outbound_proxy.1.port = {$account.2.sip_port} {/if} -account.2.outbound_proxy.2.address= {$outbound_proxy_secondary_2} +account.2.outbound_proxy.2.address= {$account.2.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.2.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.2.outbound_proxy.2.port = 5060 +account.2.outbound_proxy.2.port = {$account.2.sip_port} {/if} {if isset($outbound_proxy_fallback_interval)} @@ -335,7 +342,7 @@ account.1.nat.udp_update_enable= 3 account.1.nat.udp_update_time= 30 account.1.nat.rport= {$yealink_rport} -account.1.dtmf.type= +account.1.dtmf.type= {$yealink_dtmf_type} account.1.dtmf.info_type= account.1.dtmf.dtmf_payload= account.1.100rel_enable= {$yealink_retransmission} @@ -361,7 +368,7 @@ account.2.nat.udp_update_enable= 3 account.2.nat.udp_update_time= 30 account.2.nat.rport= {$yealink_rport} -account.2.dtmf.type= +account.2.dtmf.type= {$yealink_dtmf_type} account.2.dtmf.info_type= account.2.dtmf.dtmf_payload= account.2.100rel_enable= {$yealink_retransmission} diff --git a/resources/templates/provision/yealink/t54s/directory.xml b/resources/templates/provision/yealink/t54s/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t54s/directory.xml +++ b/resources/templates/provision/yealink/t54s/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t54s/y000000000070.cfg b/resources/templates/provision/yealink/t54s/y000000000070.cfg index 8679f44465..bc4630695d 100644 --- a/resources/templates/provision/yealink/t54s/y000000000070.cfg +++ b/resources/templates/provision/yealink/t54s/y000000000070.cfg @@ -456,7 +456,7 @@ transfer.multi_call_trans_enable = features.keep_mute.enable= linekey.1.shortlabel= features.config_dsskey_length.shorten = -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} features.auto_linekeys.enable= phone_setting.call_appearance.calls_per_linekey= features.linekey_call_with_default_account= @@ -588,6 +588,7 @@ sip.timer_t2= sip.timer_t4= sip.listen_mode= {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + sip.listen_port= sip.tls_listen_port= sip.tcp_port_random_mode= @@ -598,6 +599,8 @@ sip.disp_incall_to_info= features.call_invite_format= phone_setting.early_media.rtp_sniffer.timeout= +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ################################################################ # NAT&ICE ## @@ -678,6 +681,7 @@ phone_setting.vq_rtcpxr.session_report.enable= {$yealink_rtcpxr_report_enable} ## Contact ## ####################################################################################### static.directory_setting.url= https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=favorite_setting.xml + super_search.url= local_contact.data.url= @@ -1112,7 +1116,7 @@ features.reboot_in_talk_enable = features.fwd_diversion_enable= call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone= +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.off_code= call_waiting.on_code= @@ -1320,7 +1324,13 @@ phone_setting.dialnow_delay= dialplan_dialnow.url= dialnow.item.1= dialplan.dialnow.line_id.1= -dialplan.dialnow.rule.1= + +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} + dialplan.block_out.line_id.1= dialplan.block_out.number.1= dialplan.area_code.line_id = diff --git a/resources/templates/provision/yealink/t54s/{$mac}.cfg b/resources/templates/provision/yealink/t54s/{$mac}.cfg index efdacf4c00..c1c9ddb6e3 100644 --- a/resources/templates/provision/yealink/t54s/{$mac}.cfg +++ b/resources/templates/provision/yealink/t54s/{$mac}.cfg @@ -140,12 +140,12 @@ account.1.codec.ilbc_15_2kbps.priority= account.1.codec.ilbc_15_2kbps.enable= account.1.codec.ilbc_13_33kbps.priority= account.1.codec.ilbc_13_33kbps.enable = -account.1.codec.pcma.enable= -account.1.codec.pcma.priority= -account.1.codec.pcmu.enable= -account.1.codec.pcmu.priority= -account.1.codec.opus.priority = -account.1.codec.opus.enable= +account.1.codec.pcma.enable= 1 +account.1.codec.pcma.priority= {$yealink_codec_5_priority} +account.1.codec.pcmu.enable= 1 +account.1.codec.pcmu.priority= {$yealink_codec_4_priority} +account.1.codec.opus.priority = {$yealink_codec_1_priority} +account.1.codec.opus.enable= 1 account.1.codec.opus.para= account.1.codec.g726_40.enable= account.1.codec.g726_40.priority= @@ -159,10 +159,10 @@ account.1.codec.g723_63.priority= account.1.codec.g723_63.enable= account.1.codec.g723_53.priority= account.1.codec.g723_53.enable= -account.1.codec.g729.priority= -account.1.codec.g729.enable= -account.1.codec.g722.priority= -account.1.codec.g722.enable= +account.1.codec.g729.priority= {$yealink_codec_3_priority} +account.1.codec.g729.enable= 1 +account.1.codec.g722.priority= {$yealink_codec_2_priority} +account.1.codec.g722.enable= 1 account.2.codec.ilbc_15_2kbps.priority= account.2.codec.ilbc_15_2kbps.enable= @@ -195,57 +195,61 @@ account.2.codec.g722.enable= ################################################################ # Account Register ## ################################################################ -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} -account.1.sip_server.1.address= {$server_address_1} -account.1.sip_server.1.port= {$sip_port_1} +account.1.sip_server.1.address= {$account.1.server_address} +account.1.sip_server.1.port= {$account.1.sip_port} -{if $sip_transport_1 == 'udp'}account.1.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} -account.1.sip_server.1.expires= {$register_expires_1} +account.1.sip_server.1.expires= {$account.1.register_expires} account.1.sip_server.1.retry_counts= 3 -account.1.sip_server.2.address= {$server_address_2} -account.1.sip_server.2.port= {$sip_port_2} +account.1.sip_server.2.address= {$account.1.server.2.address} +account.1.sip_server.2.port= {$account.1.sip_port} -{if $sip_transport_1 == 'udp'}account.1.sip_server.2.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.2.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} -account.1.sip_server.2.expires= {$register_expires_2} +account.1.sip_server.2.expires= {$account.1.register_expires} account.1.sip_server.2.retry_counts= 3 -account.1.outbound_proxy_enable= {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy_enable= {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} -account.1.outbound_proxy.1.address= {$outbound_proxy_primary_1} +account.1.outbound_proxy.1.address= {$account.1.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} -account.1.outbound_proxy.2.address= {$outbound_proxy_secondary_1} +account.1.outbound_proxy.2.address= {$account.1.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_fallback_interval)} @@ -257,57 +261,61 @@ account.1.outbound_proxy_fallback_interval = 120 account.1.nat.nat_traversal= -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} -account.2.sip_server.1.address= {$server_address_2} -account.2.sip_server.1.port= {$sip_port_2} +account.2.sip_server.1.address= {$account.2.server_address} +account.2.sip_server.1.port= {$account.2.sip_port} -{if $sip_transport_1 == 'udp'}account.2.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.2.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.1.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.1.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} -account.2.sip_server.1.expires= {$register_expires_1} +account.2.sip_server.1.expires= {$account.2.register_expires} account.2.sip_server.1.retry_counts= 3 -account.2.sip_server.2.address= {$server_address_2} -account.2.sip_server.2.port= {$sip_port_2} +account.2.sip_server.2.address= {$account.2.server.2.address} +account.2.sip_server.2.port= {$account.2.sip_port} -{if $sip_transport_2 == 'udp'}account.2.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.2.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.2.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} -account.2.sip_server.2.expires= {$register_expires_2} +account.2.sip_server.2.expires= {$account.2.register_expires} account.2.sip_server.2.retry_counts= 3 -account.2.outbound_proxy_enable= {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy_enable= {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} -account.2.outbound_proxy.1.address= {$outbound_proxy_primary_2} +account.2.outbound_proxy.1.address= {$account.2.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.2.outbound_proxy.1.port = {$outbound_proxy_2_port} {else} -account.2.outbound_proxy.1.port = 5060 +account.2.outbound_proxy.1.port = {$account.2.sip_port} {/if} -account.2.outbound_proxy.2.address= {$outbound_proxy_secondary_2} +account.2.outbound_proxy.2.address= {$account.2.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.2.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.2.outbound_proxy.2.port = 5060 +account.2.outbound_proxy.2.port = {$account.2.sip_port} {/if} {if isset($outbound_proxy_fallback_interval)} @@ -335,7 +343,7 @@ account.1.nat.udp_update_enable= 3 account.1.nat.udp_update_time= 30 account.1.nat.rport= {$yealink_rport} -account.1.dtmf.type= +account.1.dtmf.type= {$yealink_dtmf_type} account.1.dtmf.info_type= account.1.dtmf.dtmf_payload= account.1.100rel_enable= {$yealink_retransmission} @@ -361,7 +369,7 @@ account.2.nat.udp_update_enable= 3 account.2.nat.udp_update_time= 30 account.2.nat.rport= {$yealink_rport} -account.2.dtmf.type= +account.2.dtmf.type= {$yealink_dtmf_type} account.2.dtmf.info_type= account.2.dtmf.dtmf_payload= account.2.100rel_enable= {$yealink_retransmission} diff --git a/resources/templates/provision/yealink/t56a/directory.xml b/resources/templates/provision/yealink/t56a/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t56a/directory.xml +++ b/resources/templates/provision/yealink/t56a/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t56a/y000000000056.cfg b/resources/templates/provision/yealink/t56a/y000000000056.cfg index 55aab60f5a..44b5bcfd7a 100644 --- a/resources/templates/provision/yealink/t56a/y000000000056.cfg +++ b/resources/templates/provision/yealink/t56a/y000000000056.cfg @@ -337,12 +337,16 @@ sip.disp_incall_to_info = sip.limit_server_name = sip.limit_server_reason = {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + #sip.tls_listen_port = {if isset($yealink_sip_listen_port)}sip.tls_listen_port = {$yealink_sip_listen_port}{else}sip.tls_listen_port = 5061{/if} + sip.trust_ctrl = {$yealink_trust_ctrl} sip.nat_stun.enable = {if isset($stun_server)}1{else}0{/if} + sip.nat_stun.server = {$stun_server} sip.nat_stun.port = {if isset($stun_port)}{$stun_port}{else}3478{/if} + sip.timer_t1 = sip.timer_t2 = sip.timer_t4 = @@ -359,6 +363,7 @@ sip.escape_characters.enable = ##1-said at the same time to monitor TCP and UDP ##2-said to monitor TCP and UDP at the same time, and from the BLF - the LIST to subscribe to the contact with a transport = TCP parameters sip.listen_mode = {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + ##The default value is 0-Disable, 1-Enable.It takes effect after a reboot. ##0-registered according to the uri of the tectonic refer - by domain ##1-according to refer the from header fields to construct refer - by domain @@ -372,6 +377,8 @@ sip.reserve_characters = ##2-the out-contracting ports fixed contact, via carry fix sip.tcp_port_random_mode = +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ####################################################################################### ## Echo Cancellation ## @@ -449,7 +456,7 @@ transfer.on_hook_trans_enable = {$yealink_transfer_onhook} ##key and the DSS key is configured as a speed dial, transfer or BLF/BLF list key. ##0-New Call,1-Attended Transfer,2-Blind Transfer. ##The default value is 2. -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ##It enables or disables the phone to enter Transfer to menu during multiple calls when pressing the transfer soft key or TRAN key. ##0-Disabled,1-Enabled. @@ -515,7 +522,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = ###X ranges from 1 to 100 -###dialplan.dialnow.rule.X = +###dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} ###dialplan.dialnow.line_id.X = dialplan.dialnow.rule.1 = @@ -1297,7 +1309,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} ## Call Waiting ## ####################################################################################### call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t56a/{$mac}.cfg b/resources/templates/provision/yealink/t56a/{$mac}.cfg index 6793d7cfdd..de9a18df35 100644 --- a/resources/templates/provision/yealink/t56a/{$mac}.cfg +++ b/resources/templates/provision/yealink/t56a/{$mac}.cfg @@ -4,50 +4,54 @@ ##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.## ####################################################################################### -## Account1 Basic Settings ## +## Account 1 Basic Settings ## ####################################################################################### -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.user_name = {$user_id_1} -account.1.password = {$user_password_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.password = {$account.1.password} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 -{/if} +account.1.outbound_proxy.1.port = {$account.1.sip_port} +{/if} account.1.dial_tone = -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} account.1.outbound_proxy_fallback_interval = 120 ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.1.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.1.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.1.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} ####################################################################################### ## Failback ## @@ -56,25 +60,22 @@ account.1.outbound_proxy_fallback_interval = 120 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = {$server_address_1} -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 + +{if isset($account.1.server.1.address)} +account.1.sip_server.1.address = {$account.1.server.1.address} {else} -account.1.sip_server.1.port = {$sip_port_1} +account.1.sip_server.1.address = {$account.1.server_address} {/if} -account.1.sip_server.1.expires = {$register_expires_1} + +account.1.sip_server.1.port = {$account.1.sip_port} +account.1.sip_server.1.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 - -account.1.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.1.sip_server.2.port = 0 -{else} -account.1.sip_server.2.port = {$sip_port_2} -{/if} -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -108,6 +109,7 @@ account.1.reg_fail_retry_interval = ##It enables or disables the NAT traversal for account X.0-Disabled,1-Enabled ##The default value is 0. account.1.nat.nat_traversal = {if isset($stun_server)}1{else}0{/if} + ##It configures the type of keep-alive packets sent by the phone to the NAT static to keep the communication port open so that NAT can continue to function for account X. ##0-Dsiabled,1-Default: the phone sends UDP packets to the server,2-Option: the phone sends SIP OPTION packets to the server,3-Notify: the phone sends SIP NOTIFY packets to the server. ##The default value is 1. @@ -203,7 +205,7 @@ account.1.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.1.shared_line = {$shared_line_1} +account.1.shared_line = {$account.1.shared_line} ##It configures the BLA number for account X. ##The default value is blank. @@ -240,11 +242,11 @@ account.1.callpark_enable = ## Audio Codec ## ####################################################################################### -account.1.codec.g722.enable = -account.1.codec.g722.priority = +account.1.codec.g722.enable = 1 +account.1.codec.g722.priority = {$yealink_codec_2_priority} -account.1.codec.g729.enable = -account.1.codec.g729.priority = +account.1.codec.g729.enable = 1 +account.1.codec.g729.priority = {$yealink_codec_3_priority} account.1.codec.g723_53.enable = account.1.codec.g723_53.priority = @@ -272,20 +274,20 @@ account.1.codec.ilbc.enable = account.1.codec.ilbc.priority = account.1.codec.ilbc.rtpmap = -account.1.codec.opus.enable = -account.1.codec.opus.priority = +account.1.codec.opus.enable = 1 +account.1.codec.opus.priority = {$yealink_codec_1_priority} account.1.codec.opus.rtpmap = account.1.codec.opus.samplerate = -account.1.codec.pcmu.enable = -account.1.codec.pcmu.priority = +account.1.codec.pcmu.enable = 1 +account.1.codec.pcmu.priority = {$yealink_codec_4_priority} -account.1.codec.pcma.enable = -account.1.codec.pcma.priority = +account.1.codec.pcma.enable = 1 +account.1.codec.pcma.priority = {$yealink_codec_5_priority} -account.1.codec.g722_1_24kpbs.enable = +account.1.codec.g722_1_24kpbs.enable = account.1.codec.g722_1_24kpbs.para = -account.1.codec.g722_1_24kpbs.priority = +account.1.codec.g722_1_24kpbs.priority = account.1.codec.g722_1_24kpbs.rtpmap = account.1.codec.g722_1_24kpbs.samplerate = @@ -354,7 +356,7 @@ account.1.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} account.1.dtmf.info_type = account.1.dtmf.dtmf_payload = @@ -490,42 +492,48 @@ account.1.xsi.port = ####################################################################################### -## Account2 Basic Settings ## +## Account 2 Basic Settings ## ####################################################################################### -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.1.port = 5060 +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} + +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} + +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.1.port = {$account.2.sip_port} account.2.dial_tone = -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy.2.port = 5060 +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy.2.port = {$account.2.sip_port} account.2.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.2.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.2.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.1.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.1.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.2.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.2.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.2.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -535,25 +543,22 @@ account.2.outbound_proxy_fallback_interval = account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = {$server_address_2} -{if $sip_transport_1 == 'dns srv'} -account.2.sip_server.1.port = 0 + +{if isset($account.2.server.1.address)} +account.2.sip_server.1.address = {$account.2.server.1.address} {else} -account.2.sip_server.1.port = {$sip_port_1} -{/if} -account.2.sip_server.1.expires = {$register_expires_1} +account.2.sip_server.1.address = {$account.2.server_address} +{/if} + +account.2.sip_server.1.port = {$account.2.sip_port} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 - -account.2.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.2.sip_server.2.port = 0 -{else} -account.2.sip_server.2.port = {$sip_port_2} -{/if} -account.2.sip_server.2.expires = {$register_expires_2} +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -672,7 +677,7 @@ account.2.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.2.shared_line = {$shared_line_2} +account.2.shared_line = {$account.2.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.2.bla_number = @@ -818,7 +823,7 @@ account.2.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} account.2.dtmf.info_type = account.2.dtmf.dtmf_payload = @@ -949,43 +954,49 @@ account.2.xsi.port = ####################################################################################### -## Account3 Basic Settings ## +## Account 3 Basic Settings ## ####################################################################################### -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.1.port = 5060 +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} + +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} + +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.1.port = {$account.3.sip_port} account.3.dial_tone = -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy.2.port = 5060 +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy.2.port = {$account.3.sip_port} account.3.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.3.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.3.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.3.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.3.sip_server.1.transport_type = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.sip_server.1.transport_type = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.sip_server.1.transport_type = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.sip_server.1.transport_type = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.3.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.3.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.3.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.3.sip_server.2.transport_type = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.sip_server.2.transport_type = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.sip_server.2.transport_type = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.sip_server.2.transport_type = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -995,25 +1006,22 @@ account.3.outbound_proxy_fallback_interval = account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = {$server_address_3} -{if $sip_transport_1 == 'dns srv'} -account.3.sip_server.1.port = 0 + +{if isset($account.3.server.1.address)} +account.3.sip_server.1.address = {$account.3.server.1.address} {else} -account.3.sip_server.1.port = {$sip_port_1} -{/if} -account.3.sip_server.1.expires = {$register_expires_1} +account.3.sip_server.1.address = {$account.3.server_address} +{/if} + +account.3.sip_server.1.port = {$account.3.sip_port} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 - -account.3.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.3.sip_server.2.port = 0 -{else} -account.3.sip_server.2.port = {$sip_port_2} -{/if} -account.3.sip_server.2.expires = {$register_expires_2} +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1132,7 +1140,7 @@ account.3.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.3.shared_line = {$shared_line_3} +account.3.shared_line = {$account.3.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.3.bla_number = @@ -1278,7 +1286,7 @@ account.3.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} account.3.dtmf.info_type = account.3.dtmf.dtmf_payload = @@ -1409,42 +1417,46 @@ account.3.xsi.port = ####################################################################################### -## Account4 Basic Settings ## +## Account 4 Basic Settings ## ####################################################################################### -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.1.port = 5060 +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.1.port = {$account.4.sip_port} account.4.dial_tone = -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy.2.port = 5060 +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy.2.port = {$account.4.sip_port} account.4.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.4.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.4.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.4.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.4.sip_server.1.transport_type = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.sip_server.1.transport_type = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.sip_server.1.transport_type = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.sip_server.1.transport_type = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.4.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.4.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.4.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.4.sip_server.2.transport_type = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.sip_server.2.transport_type = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.sip_server.2.transport_type = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.sip_server.2.transport_type = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -1454,25 +1466,22 @@ account.4.outbound_proxy_fallback_interval = account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = {$server_address_4} -{if $sip_transport_1 == 'dns srv'} -account.4.sip_server.1.port = 0 + +{if isset($account.4.server.1.address)} +account.4.sip_server.1.address = {$account.4.server.1.address} {else} -account.4.sip_server.1.port = {$sip_port_1} -{/if} -account.4.sip_server.1.expires = {$register_expires_1} +account.4.sip_server.1.address = {$account.4.server_address} +{/if} + +account.4.sip_server.1.port = {$account.4.sip_port} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 - -account.4.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.4.sip_server.2.port = 0 -{else} -account.4.sip_server.2.port = {$sip_port_2} -{/if} -account.4.sip_server.2.expires = {$register_expires_2} +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1596,7 +1605,7 @@ account.4.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.4.shared_line = {$shared_line_4} +account.4.shared_line = {$account.4.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.4.bla_number = @@ -1742,7 +1751,7 @@ account.4.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} account.4.dtmf.info_type = account.4.dtmf.dtmf_payload = @@ -1874,42 +1883,46 @@ account.4.xsi.port = ####################################################################################### -## Account5 Basic Settings ## +## Account 5 Basic Settings ## ####################################################################################### -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.1.port = 5060 +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.1.port = {$account.5.sip_port} account.5.dial_tone = -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy.2.port = 5060 +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy.2.port = {$account.5.sip_port} account.5.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.5.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.5.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.5.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.5.sip_server.1.transport_type = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.sip_server.1.transport_type = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.sip_server.1.transport_type = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.sip_server.1.transport_type = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.5.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.5.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.5.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.5.sip_server.2.transport_type = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.sip_server.2.transport_type = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.sip_server.2.transport_type = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.sip_server.2.transport_type = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -1919,25 +1932,22 @@ account.5.outbound_proxy_fallback_interval = account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = {$server_address_5} -{if $sip_transport_1 == 'dns srv'} -account.5.sip_server.1.port = 0 + +{if isset($account.5.server.1.address)} +account.5.sip_server.1.address = {$account.5.server.1.address} {else} -account.5.sip_server.1.port = {$sip_port_1} -{/if} -account.5.sip_server.1.expires = {$register_expires_1} +account.5.sip_server.1.address = {$account.5.server_address} +{/if} + +account.5.sip_server.1.port = {$account.5.sip_port} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 - -account.5.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.5.sip_server.2.port = 0 -{else} -account.5.sip_server.2.port = {$sip_port_2} -{/if} -account.5.sip_server.2.expires = {$register_expires_2} +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2061,7 +2071,7 @@ account.5.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.5.shared_line = {$shared_line_5} +account.5.shared_line = {$account.5.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.5.bla_number = @@ -2209,7 +2219,7 @@ account.5.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} account.5.dtmf.info_type = account.5.dtmf.dtmf_payload = @@ -2342,43 +2352,47 @@ account.5.xsi.port = ####################################################################################### -## Account6 Basic Settings ## +## Account 6 Basic Settings ## ####################################################################################### -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.1.port = 5060 +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.1.port = {$account.6.sip_port} account.6.dial_tone = -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy.2.port = 5060 +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy.2.port = {$account.6.sip_port} account.6.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.6.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.6.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.6.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.6.sip_server.1.transport_type = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.sip_server.1.transport_type = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.sip_server.1.transport_type = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.sip_server.1.transport_type = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.6.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.6.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.6.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.6.sip_server.2.transport_type = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.sip_server.2.transport_type = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.sip_server.2.transport_type = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.sip_server.2.transport_type = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -2388,25 +2402,22 @@ account.6.outbound_proxy_fallback_interval = account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = {$server_address_6} -{if $sip_transport_1 == 'dns srv'} -account.6.sip_server.1.port = 0 + +{if isset($account.6.server.1.address)} +account.6.sip_server.1.address = {$account.6.server.1.address} {else} -account.6.sip_server.1.port = {$sip_port_1} -{/if} -account.6.sip_server.1.expires = {$register_expires_1} +account.6.sip_server.1.address = {$account.6.server_address} +{/if} + +account.6.sip_server.1.port = {$account.6.sip_port} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 - -account.6.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.6.sip_server.2.port = 0 -{else} -account.6.sip_server.2.port = {$sip_port_2} -{/if} -account.6.sip_server.2.expires = {$register_expires_2} +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2679,7 +2690,7 @@ account.6.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} account.6.dtmf.info_type = account.6.dtmf.dtmf_payload = @@ -2989,6 +3000,7 @@ local_time.offset_time = {$yealink_time_format} ##The default value is 1. local_time.time_format = {$yealink_time_format} +#Configure the date format; 0-WWW MMM DD (default), 1-DD-MMM-YY, 2-YYYY-MM-DD, 3-DD/MM/YYYY, 4-MM/DD/YY, 5-DD MMM YYYY, 6-WWW DD MMM; local_time.date_format = {$yealink_date_format} ##It enables or disables the phone to update time with the offset time obtained from the DHCP server. diff --git a/resources/templates/provision/yealink/t58v/directory.xml b/resources/templates/provision/yealink/t58v/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/t58v/directory.xml +++ b/resources/templates/provision/yealink/t58v/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/t58v/y000000000058.cfg b/resources/templates/provision/yealink/t58v/y000000000058.cfg index 55aab60f5a..44b5bcfd7a 100644 --- a/resources/templates/provision/yealink/t58v/y000000000058.cfg +++ b/resources/templates/provision/yealink/t58v/y000000000058.cfg @@ -337,12 +337,16 @@ sip.disp_incall_to_info = sip.limit_server_name = sip.limit_server_reason = {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + #sip.tls_listen_port = {if isset($yealink_sip_listen_port)}sip.tls_listen_port = {$yealink_sip_listen_port}{else}sip.tls_listen_port = 5061{/if} + sip.trust_ctrl = {$yealink_trust_ctrl} sip.nat_stun.enable = {if isset($stun_server)}1{else}0{/if} + sip.nat_stun.server = {$stun_server} sip.nat_stun.port = {if isset($stun_port)}{$stun_port}{else}3478{/if} + sip.timer_t1 = sip.timer_t2 = sip.timer_t4 = @@ -359,6 +363,7 @@ sip.escape_characters.enable = ##1-said at the same time to monitor TCP and UDP ##2-said to monitor TCP and UDP at the same time, and from the BLF - the LIST to subscribe to the contact with a transport = TCP parameters sip.listen_mode = {if isset($yealink_sip_listen_port)}sip.listen_port = {$yealink_sip_listen_port}{else}sip.listen_port = 5060{/if} + ##The default value is 0-Disable, 1-Enable.It takes effect after a reboot. ##0-registered according to the uri of the tectonic refer - by domain ##1-according to refer the from header fields to construct refer - by domain @@ -372,6 +377,8 @@ sip.reserve_characters = ##2-the out-contracting ports fixed contact, via carry fix sip.tcp_port_random_mode = +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + ####################################################################################### ## Echo Cancellation ## @@ -449,7 +456,7 @@ transfer.on_hook_trans_enable = {$yealink_transfer_onhook} ##key and the DSS key is configured as a speed dial, transfer or BLF/BLF list key. ##0-New Call,1-Attended Transfer,2-Blind Transfer. ##The default value is 2. -transfer.dsskey_deal_type = +transfer.dsskey_deal_type = {$yealink_dsskey_transfer_mode} ##It enables or disables the phone to enter Transfer to menu during multiple calls when pressing the transfer soft key or TRAN key. ##0-Disabled,1-Enabled. @@ -515,7 +522,12 @@ dialplan.block_out.number.1 = dialplan.block_out.line_id.1 = ###X ranges from 1 to 100 -###dialplan.dialnow.rule.X = +###dialplan.dialnow.rule.X = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} ###dialplan.dialnow.line_id.X = dialplan.dialnow.rule.1 = @@ -1297,7 +1309,7 @@ distinctive_ring_tones.alert_info.10.ringer = {$yealink_ring_file_10} ## Call Waiting ## ####################################################################################### call_waiting.enable = {$yealink_call_waiting} -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} call_waiting.on_code = call_waiting.off_code = diff --git a/resources/templates/provision/yealink/t58v/{$mac}.cfg b/resources/templates/provision/yealink/t58v/{$mac}.cfg index c066a63fb4..3d5ae85a81 100644 --- a/resources/templates/provision/yealink/t58v/{$mac}.cfg +++ b/resources/templates/provision/yealink/t58v/{$mac}.cfg @@ -4,50 +4,54 @@ ##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.## ####################################################################################### -## Account1 Basic Settings ## +## Account 1 Basic Settings ## ####################################################################################### -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.user_name = {$user_id_1} -account.1.password = {$user_password_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} +account.1.password = {$account.1.password} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 -{/if} +account.1.outbound_proxy.1.port = {$account.1.sip_port} +{/if} account.1.dial_tone = -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} account.1.outbound_proxy_fallback_interval = 120 ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.1.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.1.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.1.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.1.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.1.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.1.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.sip_server.2.transport_type = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.sip_server.2.transport_type = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.sip_server.2.transport_type = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.sip_server.2.transport_type = 3{/if} ####################################################################################### ## Failback ## @@ -56,25 +60,22 @@ account.1.outbound_proxy_fallback_interval = 120 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = {$server_address_1} -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 + +{if isset($account.1.server.1.address)} +account.1.sip_server.1.address = {$account.1.server.1.address} {else} -account.1.sip_server.1.port = {$sip_port_1} +account.1.sip_server.1.address = {$account.1.server_address} {/if} -account.1.sip_server.1.expires = {$register_expires_1} + +account.1.sip_server.1.port = {$account.1.sip_port} +account.1.sip_server.1.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 - -account.1.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.1.sip_server.2.port = 0 -{else} -account.1.sip_server.2.port = {$sip_port_2} -{/if} -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -107,15 +108,16 @@ account.1.reg_fail_retry_interval = ###################################################################################### ##It enables or disables the NAT traversal for account X.0-Disabled,1-Enabled ##The default value is 0. -account.1.nat.nat_traversal = +account.1.nat.nat_traversal = {if isset($stun_server)}1{else}0{/if} + ##It configures the type of keep-alive packets sent by the phone to the NAT static to keep the communication port open so that NAT can continue to function for account X. ##0-Dsiabled,1-Default: the phone sends UDP packets to the server,2-Option: the phone sends SIP OPTION packets to the server,3-Notify: the phone sends SIP NOTIFY packets to the server. ##The default value is 1. -account.1.nat.udp_update_enable = +account.1.nat.udp_update_enable = 3 ##It configures the keep-alive interval (in seconds) for account X. ##The default value is 30.Integer from 15 to 2147483647 -account.1.nat.udp_update_time = +account.1.nat.udp_update_time = 30 ##It enables or disables NAT Rport feature for account X.0-Disabled,1-Enabled ##The default value is 0. @@ -203,7 +205,7 @@ account.1.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.1.shared_line = {$shared_line_1} +account.1.shared_line = {$account.1.shared_line} ##It configures the BLA number for account X. ##The default value is blank. @@ -240,11 +242,11 @@ account.1.callpark_enable = ## Audio Codec ## ####################################################################################### -account.1.codec.g722.enable = -account.1.codec.g722.priority = +account.1.codec.g722.enable = 1 +account.1.codec.g722.priority = {$yealink_codec_2_priority} -account.1.codec.g729.enable = -account.1.codec.g729.priority = +account.1.codec.g729.enable = 1 +account.1.codec.g729.priority = {$yealink_codec_3_priority} account.1.codec.g723_53.enable = account.1.codec.g723_53.priority = @@ -272,16 +274,16 @@ account.1.codec.ilbc.enable = account.1.codec.ilbc.priority = account.1.codec.ilbc.rtpmap = -account.1.codec.opus.enable = -account.1.codec.opus.priority = +account.1.codec.opus.enable = 1 +account.1.codec.opus.priority = {$yealink_codec_1_priority} account.1.codec.opus.rtpmap = account.1.codec.opus.samplerate = -account.1.codec.pcmu.enable = -account.1.codec.pcmu.priority = +account.1.codec.pcmu.enable = 1 +account.1.codec.pcmu.priority = {$yealink_codec_4_priority} -account.1.codec.pcma.enable = -account.1.codec.pcma.priority = +account.1.codec.pcma.enable = 1 +account.1.codec.pcma.priority = {$yealink_codec_5_priority} account.1.codec.g722_1_24kpbs.enable = account.1.codec.g722_1_24kpbs.para = @@ -354,7 +356,7 @@ account.1.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} account.1.dtmf.info_type = account.1.dtmf.dtmf_payload = @@ -490,42 +492,48 @@ account.1.xsi.port = ####################################################################################### -## Account2 Basic Settings ## +## Account 2 Basic Settings ## ####################################################################################### -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.1.port = 5060 +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} + +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} + +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.1.port = {$account.2.sip_port} account.2.dial_tone = -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy.2.port = 5060 +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy.2.port = {$account.2.sip_port} account.2.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.2.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.2.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.1.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.1.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.1.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.2.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.sip_server.2.transport_type = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.sip_server.2.transport_type = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.sip_server.2.transport_type = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -535,25 +543,22 @@ account.2.outbound_proxy_fallback_interval = account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = {$server_address_2} -{if $sip_transport_1 == 'dns srv'} -account.2.sip_server.1.port = 0 + +{if isset($account.2.server.1.address)} +account.2.sip_server.1.address = {$account.2.server.1.address} {else} -account.2.sip_server.1.port = {$sip_port_1} -{/if} -account.2.sip_server.1.expires = {$register_expires_1} +account.2.sip_server.1.address = {$account.2.server_address} +{/if} + +account.2.sip_server.1.port = {$account.2.sip_port} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 - -account.2.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.2.sip_server.2.port = 0 -{else} -account.2.sip_server.2.port = {$sip_port_2} -{/if} -account.2.sip_server.2.expires = {$register_expires_2} +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -672,7 +677,7 @@ account.2.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.2.shared_line = {$shared_line_2} +account.2.shared_line = {$account.2.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.2.bla_number = @@ -818,7 +823,7 @@ account.2.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} account.2.dtmf.info_type = account.2.dtmf.dtmf_payload = @@ -949,43 +954,49 @@ account.2.xsi.port = ####################################################################################### -## Account3 Basic Settings ## +## Account 3 Basic Settings ## ####################################################################################### -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.1.port = 5060 +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} + +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} + +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.1.port = {$account.3.sip_port} account.3.dial_tone = -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy.2.port = 5060 +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy.2.port = {$account.3.sip_port} account.3.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.3.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.3.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.3.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.3.sip_server.1.transport_type = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.sip_server.1.transport_type = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.sip_server.1.transport_type = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.sip_server.1.transport_type = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.3.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.3.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.3.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.3.sip_server.2.transport_type = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.sip_server.2.transport_type = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.sip_server.2.transport_type = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.sip_server.2.transport_type = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -995,25 +1006,22 @@ account.3.outbound_proxy_fallback_interval = account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = {$server_address_3} -{if $sip_transport_1 == 'dns srv'} -account.3.sip_server.1.port = 0 + +{if isset($account.3.server.1.address)} +account.3.sip_server.1.address = {$account.3.server.1.address} {else} -account.3.sip_server.1.port = {$sip_port_1} -{/if} -account.3.sip_server.1.expires = {$register_expires_1} +account.3.sip_server.1.address = {$account.3.server_address} +{/if} + +account.3.sip_server.1.port = {$account.3.sip_port} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 - -account.3.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.3.sip_server.2.port = 0 -{else} -account.3.sip_server.2.port = {$sip_port_2} -{/if} -account.3.sip_server.2.expires = {$register_expires_2} +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1132,7 +1140,7 @@ account.3.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.3.shared_line = {$shared_line_3} +account.3.shared_line = {$account.3.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.3.bla_number = @@ -1278,7 +1286,7 @@ account.3.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} account.3.dtmf.info_type = account.3.dtmf.dtmf_payload = @@ -1409,42 +1417,46 @@ account.3.xsi.port = ####################################################################################### -## Account4 Basic Settings ## +## Account 4 Basic Settings ## ####################################################################################### -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.1.port = 5060 +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.1.port = {$account.4.sip_port} account.4.dial_tone = -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy.2.port = 5060 +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy.2.port = {$account.4.sip_port} account.4.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.4.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.4.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.4.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.4.sip_server.1.transport_type = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.sip_server.1.transport_type = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.sip_server.1.transport_type = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.sip_server.1.transport_type = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.4.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.4.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.4.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.4.sip_server.2.transport_type = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.sip_server.2.transport_type = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.sip_server.2.transport_type = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.sip_server.2.transport_type = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -1454,25 +1466,22 @@ account.4.outbound_proxy_fallback_interval = account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = {$server_address_4} -{if $sip_transport_1 == 'dns srv'} -account.4.sip_server.1.port = 0 + +{if isset($account.4.server.1.address)} +account.4.sip_server.1.address = {$account.4.server.1.address} {else} -account.4.sip_server.1.port = {$sip_port_1} -{/if} -account.4.sip_server.1.expires = {$register_expires_1} +account.4.sip_server.1.address = {$account.4.server_address} +{/if} + +account.4.sip_server.1.port = {$account.4.sip_port} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 - -account.4.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.4.sip_server.2.port = 0 -{else} -account.4.sip_server.2.port = {$sip_port_2} -{/if} -account.4.sip_server.2.expires = {$register_expires_2} +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1596,7 +1605,7 @@ account.4.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.4.shared_line = {$shared_line_4} +account.4.shared_line = {$account.4.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.4.bla_number = @@ -1742,7 +1751,7 @@ account.4.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} account.4.dtmf.info_type = account.4.dtmf.dtmf_payload = @@ -1874,42 +1883,46 @@ account.4.xsi.port = ####################################################################################### -## Account5 Basic Settings ## +## Account 5 Basic Settings ## ####################################################################################### -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.1.port = 5060 +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.1.port = {$account.5.sip_port} account.5.dial_tone = -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy.2.port = 5060 +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy.2.port = {$account.5.sip_port} account.5.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.5.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.5.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.5.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.5.sip_server.1.transport_type = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.sip_server.1.transport_type = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.sip_server.1.transport_type = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.sip_server.1.transport_type = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.5.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.5.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.5.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.5.sip_server.2.transport_type = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.sip_server.2.transport_type = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.sip_server.2.transport_type = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.sip_server.2.transport_type = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -1919,25 +1932,22 @@ account.5.outbound_proxy_fallback_interval = account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = {$server_address_5} -{if $sip_transport_1 == 'dns srv'} -account.5.sip_server.1.port = 0 + +{if isset($account.5.server.1.address)} +account.5.sip_server.1.address = {$account.5.server.1.address} {else} -account.5.sip_server.1.port = {$sip_port_1} -{/if} -account.5.sip_server.1.expires = {$register_expires_1} +account.5.sip_server.1.address = {$account.5.server_address} +{/if} + +account.5.sip_server.1.port = {$account.5.sip_port} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 - -account.5.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.5.sip_server.2.port = 0 -{else} -account.5.sip_server.2.port = {$sip_port_2} -{/if} -account.5.sip_server.2.expires = {$register_expires_2} +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2061,7 +2071,7 @@ account.5.blf.match_host.enable= ####################################################################################### ##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA. ##The default value is 0. -account.5.shared_line = {$shared_line_5} +account.5.shared_line = {$account.5.shared_line} ##It configures the BLA number for account X. ##The default value is blank. account.5.bla_number = @@ -2209,7 +2219,7 @@ account.5.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} account.5.dtmf.info_type = account.5.dtmf.dtmf_payload = @@ -2342,43 +2352,47 @@ account.5.xsi.port = ####################################################################################### -## Account6 Basic Settings ## +## Account 6 Basic Settings ## ####################################################################################### -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} +account.6.user_name = {$account.6.user_id} +{/if} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.1.port = 5060 +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.1.port = {$account.6.sip_port} account.6.dial_tone = -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy.2.port = 5060 +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy.2.port = {$account.6.sip_port} account.6.outbound_proxy_fallback_interval = ##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_1 == 'udp'}account.6.sip_server.1.transport_type = 0{/if} -{if $sip_transport_1 == 'tcp'}account.6.sip_server.1.transport_type = 1{/if} -{if $sip_transport_1 == 'tls'}account.6.sip_server.1.transport_type = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.6.sip_server.1.transport_type = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.sip_server.1.transport_type = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.sip_server.1.transport_type = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.sip_server.1.transport_type = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.sip_server.1.transport_type = 3{/if} ##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR ##The default value is 0. -{if $sip_transport_2 == 'udp'}account.6.sip_server.2.transport_type = 0{/if} -{if $sip_transport_2 == 'tcp'}account.6.sip_server.2.transport_type = 1{/if} -{if $sip_transport_2 == 'tls'}account.6.sip_server.2.transport_type = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.6.sip_server.2.transport_type = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.sip_server.2.transport_type = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.sip_server.2.transport_type = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.sip_server.2.transport_type = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.sip_server.2.transport_type = 3{/if} ####################################################################################### @@ -2388,25 +2402,22 @@ account.6.outbound_proxy_fallback_interval = account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = {$server_address_6} -{if $sip_transport_1 == 'dns srv'} -account.6.sip_server.1.port = 0 + +{if isset($account.6.server.1.address)} +account.6.sip_server.1.address = {$account.6.server.1.address} {else} -account.6.sip_server.1.port = {$sip_port_1} -{/if} -account.6.sip_server.1.expires = {$register_expires_1} +account.6.sip_server.1.address = {$account.6.server_address} +{/if} + +account.6.sip_server.1.port = {$account.6.sip_port} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 - -account.6.sip_server.2.address = -{if $sip_transport_2 == 'dns srv'} -account.6.sip_server.2.port = 0 -{else} -account.6.sip_server.2.port = {$sip_port_2} -{/if} -account.6.sip_server.2.expires = {$register_expires_2} +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2679,7 +2690,7 @@ account.6.direct_pickup_code = ####################################################################################### ## DTMF ## ####################################################################################### -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} account.6.dtmf.info_type = account.6.dtmf.dtmf_payload = diff --git a/resources/templates/provision/yealink/vp530/directory.xml b/resources/templates/provision/yealink/vp530/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/vp530/directory.xml +++ b/resources/templates/provision/yealink/vp530/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/vp530/y000000000023.cfg b/resources/templates/provision/yealink/vp530/y000000000023.cfg index b909d60af4..8e56e4b095 100644 --- a/resources/templates/provision/yealink/vp530/y000000000023.cfg +++ b/resources/templates/provision/yealink/vp530/y000000000023.cfg @@ -240,7 +240,7 @@ watch_dog.enable = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled (default), 1-Enabled; @@ -702,6 +702,11 @@ dialplan.block_out.line_id.1 = #Configure the dialnow rule for the phone. X ranges from 1 to 10; #dialplan.dialnow.rule.x = +dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1} +dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2} +dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3} +dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4} +dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5} #dialplan.dialnow.line_id.x = dialplan.dialnow.rule.1 = @@ -895,7 +900,7 @@ features.dnd.off_code = *79 call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_call_waiting_tone} #Enable or disable the intercom feature; 0-Disabled, 1-Enabled (default); features.intercom.allow = @@ -1104,3 +1109,9 @@ directory_setting.url = https://{if isset($http_auth_username)}{$http_auth_usern #Uploading the settings of the shortcut keys; #Require reboot; dialing_shortcut.url= + +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} diff --git a/resources/templates/provision/yealink/vp530/{$mac}.cfg b/resources/templates/provision/yealink/vp530/{$mac}.cfg index d0636fdb29..5eb9ed3ad3 100644 --- a/resources/templates/provision/yealink/vp530/{$mac}.cfg +++ b/resources/templates/provision/yealink/vp530/{$mac}.cfg @@ -8,40 +8,40 @@ ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_1) } +{if isset($account.1.password) } account.1.enable = 1 {else} account.1.enable = 0 {/if} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.auth_name = {$auth_id_1} -account.1.password = {$user_password_1} -account.1.user_name = {$user_id_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = 5060 -account.1.sip_listen_port = 5060 +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} +account.1.user_name = {$account.1.user_id} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} +account.1.sip_listen_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} ####################################################################################### @@ -57,21 +57,17 @@ account.1.failback_timeout = 3600 account.1.naptr_build = 0 account.1.fallback.redundancy_type = 0 account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.1.sip_server.1.address = -{if $sip_transport_1 == 'dns srv'} -account.1.sip_server.1.port = 0 -{else} -account.1.sip_server.1.port = {$sip_port_1} -{/if} +account.1.sip_server.1.address = {$account.1.server.1.address} +account.1.sip_server.1.port = {$account.1.sip_port} #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.expires = {$account.1.register_expires} account.1.sip_server.1.retry_counts = 3 account.1.sip_server.1.failback_mode = 0 account.1.sip_server.1.failback_timeout = 3600 account.1.sip_server.1.register_on_enable = 0 -account.1.sip_server.2.address = -account.1.sip_server.2.port = 5060 -account.1.sip_server.2.expires = 3600 +account.1.sip_server.2.address = {$account.1.server.2.address} +account.1.sip_server.2.port = {$account.1.sip_port} +account.1.sip_server.2.expires = {$account.1.register_expires} account.1.sip_server.2.retry_counts = 3 account.1.sip_server.2.failback_mode = 0 account.1.sip_server.2.failback_timeout = 3600 @@ -204,8 +200,8 @@ account.1.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_1) } -account.1.shared_line = {$shared_line_1} +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} {else} account.1.shared_line = 0 {/if} @@ -229,12 +225,12 @@ account.1.bla_subscribe_period = 300 account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -249,12 +245,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -322,7 +318,7 @@ account.1.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.1.dtmf.info_type = @@ -488,30 +484,30 @@ account.1.xsi.port = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_2) } +{if isset($account.2.password) } account.2.enable = 1 {else} account.2.enable = 0 {/if} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.auth_name = {$auth_id_2} -account.2.password = {$user_password_2} -account.2.user_name = {$user_id_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = 5060 +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.auth_name = {$account.2.auth_id} +account.2.password = {$account.2.password} +account.2.user_name = {$account.2.user_id} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} account.2.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -526,17 +522,17 @@ account.2.failback_timeout = 3600 account.2.naptr_build = 0 account.2.fallback.redundancy_type = 0 account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.2.sip_server.1.address = -account.2.sip_server.1.port = 5060 +account.2.sip_server.1.address = {$account.2.server.1.address} +account.2.sip_server.1.port = {$account.2.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.2.sip_server.1.expires = {$register_expires_2} +account.2.sip_server.1.expires = {$account.2.register_expires} account.2.sip_server.1.retry_counts = 3 account.2.sip_server.1.failback_mode = 0 account.2.sip_server.1.failback_timeout = 3600 account.2.sip_server.1.register_on_enable = 0 -account.2.sip_server.2.address = -account.2.sip_server.2.port = 5060 -account.2.sip_server.2.expires = 3600 +account.2.sip_server.2.address = {$account.2.server.2.address} +account.2.sip_server.2.port = {$account.2.sip_port} +account.2.sip_server.2.expires = {$account.2.register_expires} account.2.sip_server.2.retry_counts = 3 account.2.sip_server.2.failback_mode = 0 account.2.sip_server.2.failback_timeout = 3600 @@ -669,8 +665,8 @@ account.2.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.2.shared_line = {$shared_line_2} +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} {else} account.2.shared_line = 0 {/if} @@ -787,7 +783,7 @@ account.2.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.2.dtmf.info_type = @@ -997,30 +993,30 @@ network.static_dns_enable = 1 ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_3) } +{if isset($account.3.password) } account.3.enable = 1 {else} account.3.enable = 0 {/if} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.auth_name = {$auth_id_3} -account.3.password = {$user_password_3} -account.3.user_name = {$user_id_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = 5060 +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.auth_name = {$account.3.auth_id} +account.3.password = {$account.3.password} +account.3.user_name = {$account.3.user_id} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_port = {$account.3.sip_port} account.3.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1035,17 +1031,17 @@ account.3.failback_timeout = 3600 account.3.naptr_build = 0 account.3.fallback.redundancy_type = 0 account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.3.sip_server.1.address = -account.3.sip_server.1.port = 5060 +account.3.sip_server.1.address = {$account.3.server.1.address} +account.3.sip_server.1.port = {$account.3.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.3.sip_server.1.expires = {$register_expires_3} +account.3.sip_server.1.expires = {$account.3.register_expires} account.3.sip_server.1.retry_counts = 3 account.3.sip_server.1.failback_mode = 0 account.3.sip_server.1.failback_timeout = 3600 account.3.sip_server.1.register_on_enable = 0 -account.3.sip_server.2.address = -account.3.sip_server.2.port = 5060 -account.3.sip_server.2.expires = 3600 +account.3.sip_server.2.address = {$account.3.server.2.address} +account.3.sip_server.2.port = {$account.3.sip_port} +account.3.sip_server.2.expires = {$account.3.register_expires} account.3.sip_server.2.retry_counts = 3 account.3.sip_server.2.failback_mode = 0 account.3.sip_server.2.failback_timeout = 3600 @@ -1178,8 +1174,8 @@ account.3.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_3) } -account.3.shared_line = {$shared_line_3} +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} {else} account.3.shared_line = 0 {/if} @@ -1296,7 +1292,7 @@ account.3.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.3.dtmf.info_type = @@ -1481,6 +1477,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1488,30 +1485,30 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_4) } +{if isset($account.4.password) } account.4.enable = 1 {else} account.4.enable = 0 {/if} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.auth_name = {$auth_id_4} -account.4.password = {$user_password_4} -account.4.user_name = {$user_id_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = 5060 +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} +account.4.user_name = {$account.4.user_id} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} account.4.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -1526,17 +1523,17 @@ account.4.failback_timeout = 3600 account.4.naptr_build = 0 account.4.fallback.redundancy_type = 0 account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.4.sip_server.1.address = -account.4.sip_server.1.port = 5060 +account.4.sip_server.1.address = {$account.3.server.1.address} +account.4.sip_server.1.port = {$account.4.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.4.sip_server.1.expires = {$register_expires_4} +account.4.sip_server.1.expires = {$account.4.register_expires} account.4.sip_server.1.retry_counts = 3 account.4.sip_server.1.failback_mode = 0 account.4.sip_server.1.failback_timeout = 3600 account.4.sip_server.1.register_on_enable = 0 -account.4.sip_server.2.address = -account.4.sip_server.2.port = 5060 -account.4.sip_server.2.expires = 3600 +account.4.sip_server.2.address = {$account.4.server.2.address} +account.4.sip_server.2.port = {$account.4.sip_port} +account.4.sip_server.2.expires = {$account.4.register_expires} account.4.sip_server.2.retry_counts = 3 account.4.sip_server.2.failback_mode = 0 account.4.sip_server.2.failback_timeout = 3600 @@ -1669,8 +1666,8 @@ account.4.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_4) } -account.4.shared_line = {$shared_line_4} +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} {else} account.4.shared_line = 0 {/if} @@ -1787,7 +1784,7 @@ account.4.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.4.dtmf.info_type = @@ -1972,6 +1969,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -1979,30 +1977,30 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_5) } +{if isset($account.5.password) } account.5.enable = 1 {else} account.5.enable = 0 {/if} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.auth_name = {$auth_id_5} -account.5.password = {$user_password_5} -account.5.user_name = {$user_id_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = 5060 +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} +account.5.user_name = {$account.5.user_id} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} account.5.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2017,17 +2015,17 @@ account.5.failback_timeout = 3600 account.5.naptr_build = 0 account.5.fallback.redundancy_type = 0 account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.5.sip_server.1.address = -account.5.sip_server.1.port = 5060 +account.5.sip_server.1.address = {$account.5.server.1.address} +account.5.sip_server.1.port = {$account.5.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.5.sip_server.1.expires = {$register_expires_5} +account.5.sip_server.1.expires = {$account.5.register_expires} account.5.sip_server.1.retry_counts = 3 account.5.sip_server.1.failback_mode = 0 account.5.sip_server.1.failback_timeout = 3600 account.5.sip_server.1.register_on_enable = 0 -account.5.sip_server.2.address = -account.5.sip_server.2.port = 5060 -account.5.sip_server.2.expires = 3600 +account.5.sip_server.2.address = {$account.5.server.2.address} +account.5.sip_server.2.port = {$account.5.sip_port} +account.5.sip_server.2.expires = {$account.5.register_expires} account.5.sip_server.2.retry_counts = 3 account.5.sip_server.2.failback_mode = 0 account.5.sip_server.2.failback_timeout = 3600 @@ -2160,8 +2158,8 @@ account.5.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_5) } -account.5.shared_line = {$shared_line_5} +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} {else} account.5.shared_line = 0 {/if} @@ -2278,7 +2276,7 @@ account.5.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.5.dtmf.info_type = @@ -2463,6 +2461,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} ####################################################################################### @@ -2470,30 +2469,30 @@ network.internet_port.gateway = ####################################################################################### ## ranges from 1 to 6; ##account.X.enable = -{if isset($user_password_6) } +{if isset($account.6.password) } account.6.enable = 1 {else} account.6.enable = 0 {/if} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.auth_name = {$auth_id_6} -account.6.password = {$user_password_6} -account.6.user_name = {$user_id_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = 5060 +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.auth_name = {$account.6.auth_id} +account.6.password = {$account.6.password} +account.6.user_name = {$account.6.user_id} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} account.6.sip_listen_port = 5060 #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_6 == 'udp'}account.6.transport = 0{/if} -{if $sip_transport_6 == 'tcp'}account.6.transport = 1{/if} -{if $sip_transport_6 == 'tls'}account.6.transport = 2{/if} -{if $sip_transport_6 == 'dns srv'}account.6.transport = 3{/if} +{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if} +{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if} +{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if} +{if $account.6.sip_transport == 'dns srv'}account.6.transport = 3{/if} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy_enable = {if isset($outbound_proxy_primary_6)}1{else}0{/if} +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if} ####################################################################################### ## Failback ## @@ -2508,17 +2507,17 @@ account.6.failback_timeout = 3600 account.6.naptr_build = 0 account.6.fallback.redundancy_type = 0 account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} -account.6.sip_server.1.address = -account.6.sip_server.1.port = 5060 +account.6.sip_server.1.address = {$account.6.server.1.address} +account.6.sip_server.1.port = {$account.6.sip_port} #Configure the register expiry time (in seconds), the default value is 3600. -account.6.sip_server.1.expires = {$register_expires_6} +account.6.sip_server.1.expires = {$account.6.register_expires} account.6.sip_server.1.retry_counts = 3 account.6.sip_server.1.failback_mode = 0 account.6.sip_server.1.failback_timeout = 3600 account.6.sip_server.1.register_on_enable = 0 -account.6.sip_server.2.address = -account.6.sip_server.2.port = 5060 -account.6.sip_server.2.expires = 3600 +account.6.sip_server.2.address = {$account.6.server.2.address} +account.6.sip_server.2.port = {$account.6.sip_port} +account.6.sip_server.2.expires = {$account.6.register_expires} account.6.sip_server.2.retry_counts = 3 account.6.sip_server.2.failback_mode = 0 account.6.sip_server.2.failback_timeout = 3600 @@ -2650,8 +2649,8 @@ account.6.out_dialog_blf_enable = 0 ##account.X.shared_line = #Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; -{if isset($shared_line_2) } -account.6.shared_line = {$shared_line_6} +{if isset($account.6.shared_line) } +account.6.shared_line = {$account.6.shared_line} {else} account.6.shared_line = 0 {/if} @@ -2768,7 +2767,7 @@ account.56.direct_pickup_code = ## DTMF ## ####################################################################################### #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the DTMF info type when using the SIP INFO; 0-Disabled (default), 1-DTMF-Relay, 2-DTMF, 3-Telephone-Event; account.6.dtmf.info_type = @@ -2953,7 +2952,9 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} ####################################################################################### diff --git a/resources/templates/provision/yealink/w52p/directory.xml b/resources/templates/provision/yealink/w52p/directory.xml index a05b029e18..81f4fcec97 100644 --- a/resources/templates/provision/yealink/w52p/directory.xml +++ b/resources/templates/provision/yealink/w52p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -71,4 +84,4 @@ {/if} {/foreach} - \ No newline at end of file + diff --git a/resources/templates/provision/yealink/w52p/y000000000025.cfg b/resources/templates/provision/yealink/w52p/y000000000025.cfg index 11f4fe3089..a8a9ed4e96 100644 --- a/resources/templates/provision/yealink/w52p/y000000000025.cfg +++ b/resources/templates/provision/yealink/w52p/y000000000025.cfg @@ -168,7 +168,7 @@ sip.reg_surge_prevention = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled (default), 1-Enabled; @@ -310,7 +310,7 @@ account.X.dnd.off_code = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_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 @@ -543,3 +543,9 @@ network.snmp.port = #Require reboot; network.snmp.trust_ip = + +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} diff --git a/resources/templates/provision/yealink/w52p/{$mac}.cfg b/resources/templates/provision/yealink/w52p/{$mac}.cfg index 35ec85a70f..1072fe1806 100644 --- a/resources/templates/provision/yealink/w52p/{$mac}.cfg +++ b/resources/templates/provision/yealink/w52p/{$mac}.cfg @@ -8,55 +8,64 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.1.password) } account.1.enable = 1 +{else} +account.1.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$user_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} +{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.1.outbound_port = 5060 +account.1.outbound_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} #Configure the address of the backup outbound proxy server. @@ -84,7 +93,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -144,7 +153,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -182,12 +191,12 @@ account.1.advanced.timer_t4 = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -202,12 +211,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -263,50 +272,74 @@ account.1.dnd.enable = account.1.sip_trust_ctrl = 1 +####################################################################################### +## BLA/SCA ## +####################################################################################### + +#Assign account1 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; +{if isset($account.1.shared_line) } +account.1.shared_line = {$account.1.shared_line} +{else} +account.1.shared_line = 0 +{/if} + +#Configure BLA number for account1 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300. +account.1.bla_number = +account.1.bla_subscribe_period = 300 + ####################################################################################### ## Account2 Settings ## ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.2.password) } account.2.enable = 1 +{else} +account.2.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 1. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$user_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.user_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = +account.2.outbound_host = {$account.2.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.2.outbound_port =5060 +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -333,7 +366,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.2.100rel_enable = {$yealink_retransmission} @@ -393,7 +426,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -512,50 +545,74 @@ account.2.dnd.enable = account.2.sip_trust_ctrl = 1 +####################################################################################### +## BLA/SCA ## +####################################################################################### + +#Assign account2 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; +{if isset($account.2.shared_line) } +account.2.shared_line = {$account.2.shared_line} +{else} +account.2.shared_line = 0 +{/if} + +#Configure BLA number for account2 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300. +account.2.bla_number = +account.2.bla_subscribe_period = 300 + ####################################################################################### ## Account3 Settings ## ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.3.password) } account.3.enable = 1 +{else} +account.3.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 1. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$user_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.user_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.3.outbound_port = 5060 +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -582,7 +639,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.3.100rel_enable = {$yealink_retransmission} @@ -642,7 +699,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -761,50 +818,74 @@ account.3.dnd.enable = account.3.sip_trust_ctrl = 1 +####################################################################################### +## BLA/SCA ## +####################################################################################### + +#Assign account3 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; +{if isset($account.3.shared_line) } +account.3.shared_line = {$account.3.shared_line} +{else} +account.3.shared_line = 0 +{/if} + +#Configure BLA number for account3 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300. +account.3.bla_number = +account.3.bla_subscribe_period = 300 + ####################################################################################### ## Account4 Settings ## ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.4.enable = +{if isset($account.4.password) } +account.4.enable = 1 +{else} +account.4.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.4.label = +account.4.label = {$account.4.display_name} #Configure the display name of account 1. -account.4.display_name = +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = -account.4.password = +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Configure the SIP server address. -account.4.sip_server_host = +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = +account.4.outbound_host = {$account.4.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. @@ -832,7 +913,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.4.100rel_enable = {$yealink_retransmission} @@ -892,7 +973,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1012,50 +1093,74 @@ account.4.dnd.enable = account.4.sip_trust_ctrl = 1 +####################################################################################### +## BLA/SCA ## +####################################################################################### + +#Assign account4 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; +{if isset($account.4.shared_line) } +account.4.shared_line = {$account.4.shared_line} +{else} +account.4.shared_line = 0 +{/if} + +#Configure BLA number for account4 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300. +account.4.bla_number = +account.4.bla_subscribe_period = 300 + ####################################################################################### ## Account5 Settings ## ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.5.enable = +{if isset($account.5.password) } +account.5.enable = 1 +{else} +account.5.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.5.label = +account.5.label = {$account.5.display_name} #Configure the display name of account 1. -account.5.display_name = +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = -account.5.password = +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Configure the SIP server address. -account.5.sip_server_host = +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = +account.5.outbound_host = {$account.5.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port = {$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1082,7 +1187,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.5.100rel_enable = {$yealink_retransmission} @@ -1142,7 +1247,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1263,6 +1368,21 @@ account.5.sip_trust_ctrl = 1 voice_mail.number.1 = {$voicemail_number} +####################################################################################### +## BLA/SCA ## +####################################################################################### + +#Assign account5 as shared line; 0-Disabled (default), 1-Broadsoft SCA, 2-BLA; +{if isset($account.5.shared_line) } +account.5.shared_line = {$account.5.shared_line} +{else} +account.5.shared_line = 0 +{/if} + +#Configure BLA number for account5 and the subscribe period (in seconds). It ranges from 60 to 7200, the default value is 300. +account.5.bla_number = +account.5.bla_subscribe_period = 300 + ####################################################################################### ## Network ## ####################################################################################### @@ -1277,5 +1397,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} diff --git a/resources/templates/provision/yealink/w56p/directory.xml b/resources/templates/provision/yealink/w56p/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/w56p/directory.xml +++ b/resources/templates/provision/yealink/w56p/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/w56p/y000000000025.cfg b/resources/templates/provision/yealink/w56p/y000000000025.cfg index 3ae300cb37..5a23f3b06c 100644 --- a/resources/templates/provision/yealink/w56p/y000000000025.cfg +++ b/resources/templates/provision/yealink/w56p/y000000000025.cfg @@ -168,7 +168,7 @@ sip.reg_surge_prevention = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled (default), 1-Enabled; @@ -310,7 +310,7 @@ account.X.dnd.off_code = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_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 @@ -543,3 +543,9 @@ network.snmp.port = #Require reboot; network.snmp.trust_ip = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/w56p/{$mac}.cfg b/resources/templates/provision/yealink/w56p/{$mac}.cfg index 35ec85a70f..44025313e2 100644 --- a/resources/templates/provision/yealink/w56p/{$mac}.cfg +++ b/resources/templates/provision/yealink/w56p/{$mac}.cfg @@ -8,55 +8,64 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.1.password) } account.1.enable = 1 +{else} +account.1.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.1.label = {$display_name_1} +account.1.label = {$account.1.display_name} #Configure the display name of account 1. -account.1.display_name = {$display_name_1} +account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$user_id_1} -account.1.password = {$user_password_1} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. -account.1.user_name = {$user_id_1} +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} +account.1.user_name = {$account.1.user_id} +{/if} #Configure the SIP server address. -account.1.sip_server_host = {$server_address_1} +account.1.sip_server_host = {$account.1.server_address} #Specify the port for the SIP server. The default value is 5060. -account.1.sip_server_port = {$sip_port_1} +account.1.sip_server_port = {$account.1.sip_port} +{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$outbound_proxy_1} +account.1.outbound_host = {$account.1.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.1.outbound_port = 5060 +account.1.outbound_port = {$account.1.sip_port} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_1 == 'udp'}account.1.transport = 0{/if} -{if $sip_transport_1 == 'tcp'}account.1.transport = 1{/if} -{if $sip_transport_1 == 'tls'}account.1.transport = 2{/if} -{if $sip_transport_1 == 'dns srv'}account.1.transport = 3{/if} +{if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} +{if $account.1.sip_transport == 'tcp'}account.1.transport = 1{/if} +{if $account.1.sip_transport == 'tls'}account.1.transport = 2{/if} +{if $account.1.sip_transport == 'dns srv'}account.1.transport = 3{/if} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy_enable = {if isset($outbound_proxy_primary_1)}1{else}0{/if} +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} +account.1.outbound_proxy_enable = {if isset($account.1.outbound_proxy_primary)}1{else}0{/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.1.port = {$outbound_proxy_1_port} {else} -account.1.outbound_proxy.1.port = 5060 +account.1.outbound_proxy.1.port = {$account.1.sip_port} {/if} {if isset($outbound_proxy_1_port)} account.1.outbound_proxy.2.port = {$outbound_proxy_2_port} {else} -account.1.outbound_proxy.2.port = 5060 +account.1.outbound_proxy.2.port = {$account.1.sip_port} {/if} #Configure the address of the backup outbound proxy server. @@ -84,7 +93,7 @@ account.1.anonymous_reject_offcode = account.1.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.1.expires = {$register_expires_1} +account.1.expires = {$account.1.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.1.100rel_enable = {$yealink_retransmission} @@ -144,7 +153,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -182,12 +191,12 @@ account.1.advanced.timer_t4 = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -202,12 +211,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -268,45 +277,54 @@ account.1.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.2.password) } account.2.enable = 1 +{else} +account.2.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.2.label = {$display_name_2} +account.2.label = {$account.2.display_name} #Configure the display name of account 1. -account.2.display_name = {$display_name_2} +account.2.display_name = {$account.2.display_name} #Configure the username and password for register authentication. -account.2.auth_name = {$user_id_2} -account.2.password = {$user_password_2} +account.2.auth_name = {$account.2.user_id} +account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$user_id_2} +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} +account.2.user_name = {$account.2.user_id} +{/if} #Configure the SIP server address. -account.2.sip_server_host = {$server_address_2} +account.2.sip_server_host = {$account.2.server_address} #Specify the port for the SIP server. The default value is 5060. -account.2.sip_server_port = {$sip_port_2} +account.2.sip_server_port = {$account.2.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = +account.2.outbound_host = {$account.2.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.2.outbound_port =5060 +account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_2 == 'udp'}account.2.transport = 0{/if} -{if $sip_transport_2 == 'tcp'}account.2.transport = 1{/if} -{if $sip_transport_2 == 'tls'}account.2.transport = 2{/if} -{if $sip_transport_2 == 'dns srv'}account.2.transport = 3{/if} +{if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} +{if $account.2.sip_transport == 'tcp'}account.2.transport = 1{/if} +{if $account.2.sip_transport == 'tls'}account.2.transport = 2{/if} +{if $account.2.sip_transport == 'dns srv'}account.2.transport = 3{/if} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy_enable = {if isset($outbound_proxy_primary_2)}1{else}0{/if} +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.2.backup_outbound_host = @@ -333,7 +351,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.2.100rel_enable = {$yealink_retransmission} @@ -393,7 +411,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -517,45 +535,54 @@ account.2.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.3.password) } account.3.enable = 1 +{else} +account.3.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.3.label = {$display_name_3} +account.3.label = {$account.3.display_name} #Configure the display name of account 1. -account.3.display_name = {$display_name_3} +account.3.display_name = {$account.3.display_name} #Configure the username and password for register authentication. -account.3.auth_name = {$user_id_3} -account.3.password = {$user_password_3} +account.3.auth_name = {$account.3.user_id} +account.3.password = {$account.3.password} #Configure the register user name. -account.3.user_name = {$user_id_3} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} +account.3.user_name = {$account.3.user_id} +{/if} #Configure the SIP server address. -account.3.sip_server_host = {$server_address_3} +account.3.sip_server_host = {$account.3.server_address} #Specify the port for the SIP server. The default value is 5060. -account.3.sip_server_port = {$sip_port_3} +account.3.sip_server_port = {$account.3.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$outbound_proxy_3} +account.3.outbound_host = {$account.3.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.3.outbound_port = 5060 +account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_3 == 'udp'}account.3.transport = 0{/if} -{if $sip_transport_3 == 'tcp'}account.3.transport = 1{/if} -{if $sip_transport_3 == 'tls'}account.3.transport = 2{/if} -{if $sip_transport_3 == 'dns srv'}account.3.transport = 3{/if} +{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} +{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if} +{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if} +{if $account.3.sip_transport == 'dns srv'}account.3.transport = 3{/if} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy_enable = {if isset($outbound_proxy_primary_3)}1{else}0{/if} +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.3.backup_outbound_host = @@ -582,7 +609,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.3.100rel_enable = {$yealink_retransmission} @@ -642,7 +669,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -766,45 +793,54 @@ account.3.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.4.enable = +{if isset($account.4.password) } +account.4.enable = 1 +{else} +account.4.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.4.label = +account.4.label = {$account.4.display_name} #Configure the display name of account 1. -account.4.display_name = +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = -account.4.password = +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Configure the SIP server address. -account.4.sip_server_host = +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. -account.4.sip_server_port = {$sip_port_4} +account.4.sip_server_port = {$account.4.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = +account.4.outbound_host = {$account.4.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_4 == 'udp'}account.4.transport = 0{/if} -{if $sip_transport_4 == 'tcp'}account.4.transport = 1{/if} -{if $sip_transport_4 == 'tls'}account.4.transport = 2{/if} -{if $sip_transport_4 == 'dns srv'}account.4.transport = 3{/if} +{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} +{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if} +{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if} +{if $account.4.sip_transport == 'dns srv'}account.4.transport = 3{/if} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy_enable = {if isset($outbound_proxy_primary_4)}1{else}0{/if} +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. @@ -832,7 +868,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.4.100rel_enable = {$yealink_retransmission} @@ -892,7 +928,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -1017,45 +1053,54 @@ account.4.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.5.enable = +{if isset($account.5.password) } +account.5.enable = 1 +{else} +account.5.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.5.label = +account.5.label = {$account.5.display_name} #Configure the display name of account 1. -account.5.display_name = +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = -account.5.password = +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.password} #Configure the register user name. -account.5.user_name = +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Configure the SIP server address. -account.5.sip_server_host = +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. -account.5.sip_server_port = {$sip_port_5} +account.5.sip_server_port = {$account.5.sip_port} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = +account.5.outbound_host = {$account.5.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port ={$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; -{if $sip_transport_5 == 'udp'}account.5.transport = 0{/if} -{if $sip_transport_5 == 'tcp'}account.5.transport = 1{/if} -{if $sip_transport_5 == 'tls'}account.5.transport = 2{/if} -{if $sip_transport_5 == 'dns srv'}account.5.transport = 3{/if} +{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if} +{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if} +{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if} +{if $account.5.sip_transport == 'dns srv'}account.5.transport = 3{/if} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy_enable = {if isset($outbound_proxy_primary_5)}1{else}0{/if} +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if} #Configure the address of the backup outbound proxy server. account.5.backup_outbound_host = @@ -1082,7 +1127,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.5.100rel_enable = {$yealink_retransmission} @@ -1142,7 +1187,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1277,5 +1322,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if} diff --git a/resources/templates/provision/yealink/w60b/directory.xml b/resources/templates/provision/yealink/w60b/directory.xml index 5959cc4b54..085b2a191f 100644 --- a/resources/templates/provision/yealink/w60b/directory.xml +++ b/resources/templates/provision/yealink/w60b/directory.xml @@ -3,6 +3,11 @@ {if $smarty.get.contacts == "users" && $row.category == "users"} {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {$row.contact_name_given} {$row.contact_name_family} {else} {$row.effective_caller_id_name} @@ -19,7 +24,11 @@ {elseif $smarty.get.contacts == "groups" && $row.category == "groups"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} @@ -48,7 +57,11 @@ {elseif $smarty.get.contacts == "all"} {if $row.contact_name_given != ""} - {$row.contact_name_given} {$row.contact_name_family} + {if $row.contact_organization != ""} + {$row.contact_organization} {$row.contact_name_given} {$row.contact_name_family} + {else} + {$row.contact_name_given} {$row.contact_name_family} + {/if} {else} {$row.effective_caller_id_name} {/if} diff --git a/resources/templates/provision/yealink/w60b/y000000000077.cfg b/resources/templates/provision/yealink/w60b/y000000000077.cfg index c50b768a8b..34ee540ee6 100644 --- a/resources/templates/provision/yealink/w60b/y000000000077.cfg +++ b/resources/templates/provision/yealink/w60b/y000000000077.cfg @@ -168,7 +168,7 @@ sip.reg_surge_prevention = #Enable or disable the transferee to display the missed call prompt when receiving a semi_attended transfer call; #0-Disabled, 1-Enabled (default); -transfer.semi_attend_tran_enable = +transfer.semi_attend_tran_enable = {$yealink_transfer_semi_attended} #Enable or disable the phone to complete the blind or attended transfer through on-hook; #0-Disabled (default), 1-Enabled; @@ -310,7 +310,7 @@ account.X.dnd.off_code = call_waiting.enable = {$yealink_call_waiting} #Enable or disable the playing of call waiting tone; 0-Disabled, 1-Enabled (default); -call_waiting.tone = +call_waiting.tone = {$yealink_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 @@ -597,3 +597,9 @@ network.snmp.port = #Require reboot; network.snmp.trust_ip = +####################################################################################### +## SIP Advanced ## +####################################################################################### + +sip.call_fail_use_reason.enable = {$yealink_sip_call_fail_use_reason_enable} + diff --git a/resources/templates/provision/yealink/w60b/{$mac}.cfg b/resources/templates/provision/yealink/w60b/{$mac}.cfg index c190563e79..28fbb62702 100644 --- a/resources/templates/provision/yealink/w60b/{$mac}.cfg +++ b/resources/templates/provision/yealink/w60b/{$mac}.cfg @@ -4,36 +4,42 @@ ##File header "#!version:1.0.0.1" can not be edited or deleted.## ####################################################################################### -## Account1 Settings ## +## Account 1 Settings ## ####################################################################################### #Basic Settings -account.1.enable = {if isset($user_password_1)}1{else}0{/if}{""} -account.1.label = {$display_name_1} -account.1.display_name = {$display_name_1} -account.1.user_name = {$user_id_1} -account.1.auth_name = {$user_id_1} -account.1.password = {$user_password_1} -account.1.sip_server_host = {$server_address_1} -account.1.sip_server_port = {$sip_port_1} -account.1.transport = {if $sip_transport_1 == 'udp'}0{/if}{if $sip_transport_1 == 'tcp'}1{/if}{if $sip_transport_1 == 'tls'}2{/if}{if $sip_transport_1 == 'dns srv'}3{/if}{""} -account.1.expires = {$register_expires_1} -account.1.outbound_host = {$outbound_proxy_1} -account.1.outbound_port = {$sip_port_1} +account.1.enable = {if isset($account.1.password)}1{else}0{/if}{""} + +account.1.label = {$account.1.display_name} +account.1.display_name = {$account.1.display_name} +account.1.user_name = {$account.1.user_id} +account.1.auth_name = {$account.1.user_id} +account.1.password = {$account.1.password} +account.1.sip_server_host = {$account.1.server_address} +account.1.sip_server_port = {$account.1.sip_port} +account.1.transport = {if $account.1.sip_transport == 'udp'}0{/if}{if $account.1.sip_transport == 'tcp'}1{/if}{if $account.1.sip_transport == 'tls'}2{/if}{if $account.1.sip_transport == 'dns srv'}3{/if}{""} + +account.1.expires = {$account.1.register_expires} +account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_port = {$account.1.sip_port} #Server Redundancy -account.1.sip_server.2.address= {$server_address_2} -account.1.sip_server.2.port= {$sip_port_2} -account.1.sip_server.2.transport_type = {if $sip_transport_1 == 'udp'}0{/if}{if $sip_transport_1 == 'tcp'}1{/if}{if $sip_transport_1 == 'tls'}2{/if}{if $sip_transport_1 == 'dns srv'}3{/if}{""} -account.1.sip_server.2.expires= {$register_expires_2} +account.1.sip_server.2.address= {$account.1.server.2.address} +account.1.sip_server.2.port= {$account.1.sip_port} +account.1.sip_server.2.transport_type = {if $account.1.sip_transport == 'udp'}0{/if}{if $account.1.sip_transport == 'tcp'}1{/if}{if $account.1.sip_transport == 'tls'}2{/if}{if $account.1.sip_transport == 'dns srv'}3{/if}{""} + +account.1.sip_server.2.expires= {$account.1.register_expires} account.1.retry_counts = 3 #Basic Proxy Settings -account.1.outbound_proxy_enable= {if isset($outbound_proxy_primary_1)}1{else}0{/if}{""} -account.1.outbound_proxy.1.address = {$outbound_proxy_primary_1} -account.1.outbound_proxy.1.port = {if isset($outbound_proxy_1_port)}{$outbound_proxy_1_port}{else}5060{/if}{""} -account.1.outbound_proxy.2.address = {$outbound_proxy_secondary_1} -account.1.outbound_proxy.2.port = {if isset($outbound_proxy_1_port)}{$outbound_proxy_1_port}{else}5060{/if}{""} +account.1.outbound_proxy_enable= {if isset($account.1.outbound_proxy_primary)}1{else}0{/if}{""} + +account.1.outbound_proxy.1.address = {$account.1.outbound_proxy_primary} +account.1.outbound_proxy.1.port = {if isset($account.1.sip_port)}{$account.1.sip_port}{else}5060{/if}{""} + +account.1.outbound_proxy.2.address = {$account.1.outbound_proxy_secondary} + +account.1.outbound_proxy.2.port = {if isset($account.1.sip_port)}{$account.1.sip_port}{else}5060{/if}{""} account.1.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -111,7 +117,7 @@ account.1.enable_signal_encode = account.1.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.1.dtmf.type = +account.1.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.1.dtmf.dtmf_payload = @@ -149,12 +155,12 @@ account.1.advanced.timer_t4 = account.1.codec.1.enable = 1 account.1.codec.1.payload_type = PCMU -account.1.codec.1.priority = 1 +account.1.codec.1.priority = {$yealink_codec_1_priority} account.1.codec.1.rtpmap = 0 account.1.codec.2.enable = 1 account.1.codec.2.payload_type = PCMA -account.1.codec.2.priority = 2 +account.1.codec.2.priority = {$yealink_codec_2_priority} account.1.codec.2.rtpmap = 8 account.1.codec.3.enable = 0 @@ -169,12 +175,12 @@ account.1.codec.4.rtpmap = 4 account.1.codec.5.enable = 1 account.1.codec.5.payload_type = G729 -account.1.codec.5.priority = 3 +account.1.codec.5.priority = {$yealink_codec_3_priority} account.1.codec.5.rtpmap = 18 account.1.codec.6.enable = 1 account.1.codec.6.payload_type = G722 -account.1.codec.6.priority = 4 +account.1.codec.6.priority = {$yealink_codec_4_priority} account.1.codec.6.rtpmap = 9 account.1.codec.7.enable = 0 @@ -231,36 +237,42 @@ account.1.dnd.enable = account.1.sip_trust_ctrl = 1 ####################################################################################### -## Account2 Settings ## +## Account 2 Settings ## ####################################################################################### #Basic Settings -account.2.enable = {if isset($user_password_2) }1{else}0{/if}{""} -account.2.label = {$display_name_2} -account.2.display_name = {$display_name_2} -account.2.user_name = {$user_id_2} -account.2.auth_name = {$user_id_2} -account.2.password = {$user_password_2} -account.2.sip_server_host = {$server_address_2} -account.2.sip_server_port = {$sip_port_2} -account.2.transport = {if $sip_transport_2 == 'udp'}0{/if}{if $sip_transport_2 == 'tcp'}1{/if}{if $sip_transport_2 == 'tls'}2{/if}{if $sip_transport_2 == 'dns srv'}3{/if}{""} -account.2.expires = {$register_expires_2} -account.2.outbound_host = {$outbound_proxy_2} -account.2.outbound_port = {$sip_port_2} +account.2.enable = {if isset($account.2.password) }1{else}0{/if}{""} + +account.2.label = {$account.2.display_name} +account.2.display_name = {$account.2.display_name} +account.2.user_name = {$account.2.user_id} +account.2.auth_name = {$account.2.user_id} +account.2.password = {$account.2.password} +account.2.sip_server_host = {$account.2.server_address} +account.2.sip_server_port = {$account.2.sip_port} +account.2.transport = {if $account.2.sip_transport == 'udp'}0{/if}{if $account.2.sip_transport == 'tcp'}1{/if}{if $account.2.sip_transport == 'tls'}2{/if}{if $account.2.sip_transport == 'dns srv'}3{/if}{""} + +account.2.expires = {$account.2.register_expires} +account.2.outbound_host = {$account.2.outbound_proxy} +account.2.outbound_port = {$account.2.sip_port} #Server Redundancy -account.2.sip_server.2.address= {$server_address_2} -account.2.sip_server.2.port= {$sip_port_2} -account.2.sip_server.2.transport_type = {if $sip_transport_2 == 'udp'}0{/if}{if $sip_transport_2 == 'tcp'}1{/if}{if $sip_transport_2 == 'tls'}2{/if}{if $sip_transport_2 == 'dns srv'}3{/if}{""} -account.2.sip_server.2.expires= {$register_expires_2} +account.2.sip_server.2.address= {$account.2.server.2.address} +account.2.sip_server.2.port= {$account.2.sip_port} +account.2.sip_server.2.transport_type = {if $account.2.sip_transport == 'udp'}0{/if}{if $account.2.sip_transport == 'tcp'}1{/if}{if $account.2.sip_transport == 'tls'}2{/if}{if $account.2.sip_transport == 'dns srv'}3{/if}{""} + +account.2.sip_server.2.expires= {$account.2.register_expires} account.2.retry_counts = 3 #Basic Proxy Settings -account.2.outbound_proxy_enable= {if isset($outbound_proxy_primary_2)}1{else}0{/if}{""} -account.2.outbound_proxy.1.address = {$outbound_proxy_primary_2} -account.2.outbound_proxy.1.port = {if isset($outbound_proxy_2_port)}{$outbound_proxy_2_port}{else}5060{/if}{""} -account.2.outbound_proxy.2.address = {$outbound_proxy_secondary_2} -account.2.outbound_proxy.2.port = {if isset($outbound_proxy_2_port)}{$outbound_proxy_2_port}{else}5060{/if}{""} +account.2.outbound_proxy_enable= {if isset($account.2.outbound_proxy_primary)}1{else}0{/if}{""} + +account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary} +account.2.outbound_proxy.1.port = {if isset($account.2.sip_port)}{$account.2.sip_port}{else}5060{/if}{""} + +account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary} +account.2.outbound_proxy.2.port = {if isset($account.2.sip_port)}{$account.2.sip_port}{else}5060{/if}{""} + account.2.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -281,7 +293,7 @@ account.2.anonymous_reject_offcode = account.2.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.2.expires = {$register_expires_2} +account.2.expires = {$account.2.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.2.100rel_enable = {$yealink_retransmission} @@ -341,7 +353,7 @@ account.2.enable_signal_encode = account.2.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.2.dtmf.type = +account.2.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.2.dtmf.dtmf_payload = @@ -461,37 +473,43 @@ account.2.dnd.enable = account.2.sip_trust_ctrl = 1 ####################################################################################### -## Account3 Settings ## +## Account 3 Settings ## ####################################################################################### #Basic Settings -account.3.enable = {if isset($user_password_3) }1{else}0{/if}{""} -account.3.label = {$display_name_3} -account.3.display_name = {$display_name_3} -account.3.user_name = {$user_id_3} -account.3.auth_name = {$user_id_3} -account.3.password = {$user_password_3} -account.3.sip_server_host = {$server_address_3} -account.3.sip_server_port = {$sip_port_3} -account.3.transport = {if $sip_transport_3 == 'udp'}0{/if}{if $sip_transport_3 == 'tcp'}1{/if}{if $sip_transport_3 == 'tls'}2{/if}{if $sip_transport_3 == 'dns srv'}3{/if}{""} -account.3.expires = {$register_expires_3} -account.3.outbound_host = {$outbound_proxy_3} -account.3.outbound_port = {$sip_port_3} +account.3.enable = {if isset($account.3.password) }1{else}0{/if}{""} + +account.3.label = {$account.3.display_name} +account.3.display_name = {$account.3.display_name} +account.3.user_name = {$account.3.user_id} +account.3.auth_name = {$account.3.user_id} +account.3.password = {$account.3.password} +account.3.sip_server_host = {$account.3.server_address} +account.3.sip_server_port = {$account.3.sip_port} +account.3.transport = {if $account.3.sip_transport == 'udp'}0{/if}{if $account.3.sip_transport == 'tcp'}1{/if}{if $account.3.sip_transport == 'tls'}2{/if}{if $account.3.sip_transport == 'dns srv'}3{/if}{""} + +account.3.expires = {$register_expires} +account.3.outbound_host = {$outbound_proxy} +account.3.outbound_port = {$sip_port} #Server Redundancy -account.3.sip_server.2.address= {$server_address_3} -account.3.sip_server.2.port= {$sip_port_3} -account.3.sip_server.2.transport_type = {if $sip_transport_3 == 'udp'}0{/if}{if $sip_transport_3 == 'tcp'}1{/if}{if $sip_transport_3 == 'tls'}2{/if}{if $sip_transport_3 == 'dns srv'}3{/if}{""} -account.3.sip_server.2.expires= {$register_expires_3} +account.3.sip_server.2.address= {$account.3.server.2.address} +account.3.sip_server.2.port= {$account.3.sip_port} +account.3.sip_server.2.transport_type = {if $account.3.sip_transport == 'udp'}0{/if}{if $account.3.sip_transport == 'tcp'}1{/if}{if $account.3.sip_transport == 'tls'}2{/if}{if $account.3.sip_transport == 'dns srv'}3{/if}{""} + +account.3.sip_server.2.expires= {$account.3.register_expires} account.3.retry_counts = 3 #Basic Proxy Settings -account.3.outbound_proxy_enable= {if isset($outbound_proxy_primary_3)}1{else}0{/if}{""} -account.3.outbound_proxy.1.address = {$outbound_proxy_primary_3} -account.3.outbound_proxy.1.port = {if isset($outbound_proxy_3_port)}{$outbound_proxy_3_port}{else}5060{/if}{""} -account.3.outbound_proxy.2.address = {$outbound_proxy_secondary_3} -account.3.outbound_proxy.2.port = {if isset($outbound_proxy_3_port)}{$outbound_proxy_3_port}{else}5060{/if}{""} -account.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} +account.3.outbound_proxy_enable= {if isset($account.3.outbound_proxy_primary)}1{else}0{/if}{""} + +account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary} +account.3.outbound_proxy.1.port = {if isset($account.3.sip_port)}{$account.3.sip_port}{else}5060{/if}{""} + +account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary} +account.3.outbound_proxy.2.port = {if isset($account.3.sip_port)}{$account.3.sip_port}{else}5060{/if}{""} +a +ccount.3.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; account.3.anonymous_call = @@ -511,7 +529,7 @@ account.3.anonymous_reject_offcode = account.3.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.3.expires = {$register_expires_3} +account.3.expires = {$account.3.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.3.100rel_enable = {$yealink_retransmission} @@ -571,7 +589,7 @@ account.3.enable_signal_encode = account.3.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.3.dtmf.type = +account.3.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.3.dtmf.dtmf_payload = @@ -691,36 +709,42 @@ account.3.dnd.enable = account.3.sip_trust_ctrl = 1 ####################################################################################### -## Account4 Settings ## +## Account 4 Settings ## ####################################################################################### #Basic Settings -account.4.enable = {if isset($user_password_4) }1{else}0{/if}{""} -account.4.label = {$display_name_4} -account.4.display_name = {$display_name_4} -account.4.user_name = {$user_id_4} -account.4.auth_name = {$user_id_4} -account.4.password = {$user_password_4} -account.4.sip_server_host = {$server_address_4} -account.4.sip_server_port = {$sip_port_4} -account.4.transport = {if $sip_transport_4 == 'udp'}0{/if}{if $sip_transport_4 == 'tcp'}1{/if}{if $sip_transport_4 == 'tls'}2{/if}{if $sip_transport_4 == 'dns srv'}3{/if}{""} -account.4.expires = {$register_expires_4} -account.4.outbound_host = {$outbound_proxy_4} -account.4.outbound_port = {$sip_port_4} +account.4.enable = {if isset($account.4.password) }1{else}0{/if}{""} + +account.4.label = {$account.4.display_name} +account.4.display_name = {$account.4.display_name} +account.4.user_name = {$account.4.user_id} +account.4.auth_name = {$account.4.user_id} +account.4.password = {$account.4.password} +account.4.sip_server_host = {$account.4.server_address} +account.4.sip_server_port = {$account.4.sip_port} +account.4.transport = {if $account.4.sip_transport == 'udp'}0{/if}{if $account.4.sip_transport == 'tcp'}1{/if}{if $account.4.sip_transport == 'tls'}2{/if}{if $account.4.sip_transport == 'dns srv'}3{/if}{""} + +account.4.expires = {$account.4.register_expires} +account.4.outbound_host = {$account.4.outbound_proxy} +account.4.outbound_port = {$account.4.sip_port} #Server Redundancy -account.4.sip_server.2.address= {$server_address_4} -account.4.sip_server.2.port= {$sip_port_4} -account.4.sip_server.2.transport_type = {if $sip_transport_4 == 'udp'}0{/if}{if $sip_transport_4 == 'tcp'}1{/if}{if $sip_transport_4 == 'tls'}2{/if}{if $sip_transport_4 == 'dns srv'}3{/if}{""} -account.4.sip_server.2.expires= {$register_expires_4} +account.4.sip_server.2.address= {$account.4.server.2.address} +account.4.sip_server.2.port= {$account.4.sip_port} +account.4.sip_server.2.transport_type = {if $account.4.sip_transport == 'udp'}0{/if}{if $account.4.sip_transport == 'tcp'}1{/if}{if $account.4.sip_transport == 'tls'}2{/if}{if $account.4.sip_transport == 'dns srv'}3{/if}{""} + +account.4.sip_server.2.expires= {$account.4.register_expires} account.4.retry_counts = 3 #Basic Proxy Settings -account.4.outbound_proxy_enable= {if isset($outbound_proxy_primary_4)}1{else}0{/if}{""} -account.4.outbound_proxy.1.address = {$outbound_proxy_primary_4} -account.4.outbound_proxy.1.port = {if isset($outbound_proxy_4_port)}{$outbound_proxy_4_port}{else}5060{/if}{""} -account.4.outbound_proxy.2.address = {$outbound_proxy_secondary_4} -account.4.outbound_proxy.2.port = {if isset($outbound_proxy_4_port)}{$outbound_proxy_4_port}{else}5060{/if}{""} +account.4.outbound_proxy_enable= {if isset($account.4.outbound_proxy_primary)}1{else}0{/if}{""} + +account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary} +account.4.outbound_proxy.1.port = {if isset($account.4.sip_port)}{$account.4.sip_port}{else}5060{/if}{""} + +account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary} +account.4.outbound_proxy.2.port = {if isset($account.4.sip_port)}{$account.4.sip_port}{else}5060{/if}{""} + account.4.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -741,7 +765,7 @@ account.4.anonymous_reject_offcode = account.4.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.4.expires = {$register_expires_4} +account.4.expires = {$account.4.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.4.100rel_enable = {$yealink_retransmission} @@ -801,7 +825,7 @@ account.4.enable_signal_encode = account.4.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.4.dtmf.type = +account.4.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.4.dtmf.dtmf_payload = @@ -921,36 +945,42 @@ account.4.dnd.enable = account.4.sip_trust_ctrl = 1 ####################################################################################### -## Account5 Settings ## +## Account 5 Settings ## ####################################################################################### #Basic Settings -account.5.enable = {if isset($user_password_5) }1{else}0{/if}{""} -account.5.label = {$display_name_5} -account.5.display_name = {$display_name_5} -account.5.user_name = {$user_id_5} -account.5.auth_name = {$user_id_5} -account.5.password = {$user_password_5} -account.5.sip_server_host = {$server_address_5} -account.5.sip_server_port = {$sip_port_5} -account.5.transport = {if $sip_transport_5 == 'udp'}0{/if}{if $sip_transport_5 == 'tcp'}1{/if}{if $sip_transport_5 == 'tls'}2{/if}{if $sip_transport_5 == 'dns srv'}3{/if}{""} -account.5.expires = {$register_expires_5} -account.5.outbound_host = {$outbound_proxy_5} -account.5.outbound_port = {$sip_port_5} +account.5.enable = {if isset($account.5.password) }1{else}0{/if}{""} + +account.5.label = {$account.5.display_name} +account.5.display_name = {$account.5.display_name} +account.5.user_name = {$account.5.user_id} +account.5.auth_name = {$account.5.user_id} +account.5.password = {$account.5.password} +account.5.sip_server_host = {$account.5.server_address} +account.5.sip_server_port = {$account.5.sip_port} +account.5.transport = {if $account.5.sip_transport == 'udp'}0{/if}{if $account.5.sip_transport == 'tcp'}1{/if}{if $account.5.sip_transport == 'tls'}2{/if}{if $account.5.sip_transport == 'dns srv'}3{/if}{""} + +account.5.expires = {$account.5.register_expires} +account.5.outbound_host = {$account.5.outbound_proxy} +account.5.outbound_port = {$account.5.sip_port} #Server Redundancy -account.5.sip_server.2.address= {$server_address_5} -account.5.sip_server.2.port= {$sip_port_5} -account.5.sip_server.2.transport_type = {if $sip_transport_5 == 'udp'}0{/if}{if $sip_transport_5 == 'tcp'}1{/if}{if $sip_transport_5 == 'tls'}2{/if}{if $sip_transport_5 == 'dns srv'}3{/if}{""} -account.5.sip_server.2.expires= {$register_expires_5} +account.5.sip_server.2.address= {$account.5.server.2.address} +account.5.sip_server.2.port= {$account.5.sip_port} +account.5.sip_server.2.transport_type = {if $account.5.sip_transport == 'udp'}0{/if}{if $account.5.sip_transport == 'tcp'}1{/if}{if $account.5.sip_transport == 'tls'}2{/if}{if $account.5.sip_transport == 'dns srv'}3{/if}{""} + +account.5.sip_server.2.expires= {$account.5.register_expires} account.5.retry_counts = 3 #Basic Proxy Settings -account.5.outbound_proxy_enable= {if isset($outbound_proxy_primary_5)}1{else}0{/if}{""} -account.5.outbound_proxy.1.address = {$outbound_proxy_primary_5} -account.5.outbound_proxy.1.port = {if isset($outbound_proxy_5_port)}{$outbound_proxy_5_port}{else}5060{/if}{""} -account.5.outbound_proxy.2.address = {$outbound_proxy_secondary_5} -account.5.outbound_proxy.2.port = {if isset($outbound_proxy_5_port)}{$outbound_proxy_5_port}{else}5060{/if}{""} +account.5.outbound_proxy_enable= {if isset($account.5.outbound_proxy_primary)}1{else}0{/if}{""} + +account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary} +account.5.outbound_proxy.1.port = {if isset($account.5.sip_port)}{$account.5.sip_port}{else}5060{/if}{""} + +account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary} +account.5.outbound_proxy.2.port = {if isset($account.5.sip_port)}{$account.4.sip_port}{else}5060{/if}{""} + account.5.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -971,7 +1001,7 @@ account.5.anonymous_reject_offcode = account.5.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.5.expires = {$register_expires_5} +account.5.expires = {$account.5.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.5.100rel_enable = {$yealink_retransmission} @@ -1031,7 +1061,7 @@ account.5.enable_signal_encode = account.5.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.5.dtmf.type = +account.5.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.5.dtmf.dtmf_payload = @@ -1166,40 +1196,48 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if}{""} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if}{""} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if}{""} ####################################################################################### -## Account6 Settings ## +## Account 6 Settings ## ####################################################################################### #Basic Settings -account.6.enable = {if isset($user_password_6) }1{else}0{/if}{""} -account.6.label = {$display_name_6} -account.6.display_name = {$display_name_6} -account.6.user_name = {$user_id_6} -account.6.auth_name = {$user_id_6} -account.6.password = {$user_password_6} -account.6.sip_server_host = {$server_address_6} -account.6.sip_server_port = {$sip_port_6} -account.6.transport = {if $sip_transport_6 == 'udp'}0{/if}{if $sip_transport_6 == 'tcp'}1{/if}{if $sip_transport_6 == 'tls'}2{/if}{if $sip_transport_6 == 'dns srv'}3{/if}{""} -account.6.expires = {$register_expires_6} -account.6.outbound_host = {$outbound_proxy_6} -account.6.outbound_port = {$sip_port_6} +account.6.enable = {if isset($account.6.password) }1{else}0{/if}{""} + +account.6.label = {$account.6.display_name} +account.6.display_name = {$account.6.display_name} +account.6.user_name = {$account.6.user_id} +account.6.auth_name = {$account.6.user_id} +account.6.password = {$account.6.password} +account.6.sip_server_host = {$account.6.server_address} +account.6.sip_server_port = {$account.6.sip_port} +account.6.transport = {if $account.6.sip_transport == 'udp'}0{/if}{if $account.6.sip_transport == 'tcp'}1{/if}{if $account.6.sip_transport == 'tls'}2{/if}{if $account.6.sip_transport == 'dns srv'}3{/if}{""} +a +ccount.6.expires = {$account.6.register_expires} +account.6.outbound_host = {$account.6.outbound_proxy} +account.6.outbound_port = {$account.6.sip_port} #Server Redundancy -account.6.sip_server.2.address= {$server_address_6} -account.6.sip_server.2.port= {$sip_port_6} -account.6.sip_server.2.transport_type = {if $sip_transport_6 == 'udp'}0{/if}{if $sip_transport_6 == 'tcp'}1{/if}{if $sip_transport_6 == 'tls'}2{/if}{if $sip_transport_6 == 'dns srv'}3{/if}{""} -account.6.sip_server.2.expires= {$register_expires_6} +account.6.sip_server.2.address= {$account.6.server.2.address} +account.6.sip_server.2.port= {$account.6.sip_port} +account.6.sip_server.2.transport_type = {if $account.6.sip_transport == 'udp'}0{/if}{if $account.6.sip_transport == 'tcp'}1{/if}{if $account.6.sip_transport == 'tls'}2{/if}{if $account.6.sip_transport == 'dns srv'}3{/if}{""} + +account.6.sip_server.2.expires= {$account.6.register_expires} account.6.retry_counts = 3 #Basic Proxy Settings -account.6.outbound_proxy_enable= {if isset($outbound_proxy_primary_6)}1{else}0{/if}{""} -account.6.outbound_proxy.1.address = {$outbound_proxy_primary_6} -account.6.outbound_proxy.1.port = {if isset($outbound_proxy_6_port)}{$outbound_proxy_6_port}{else}5060{/if}{""} -account.6.outbound_proxy.2.address = {$outbound_proxy_secondary_6} -account.6.outbound_proxy.2.port = {if isset($outbound_proxy_6_port)}{$outbound_proxy_6_port}{else}5060{/if}{""} +account.6.outbound_proxy_enable= {if isset($account.6.outbound_proxy_primary)}1{else}0{/if}{""} + +account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary} +account.6.outbound_proxy.1.port = {if isset($account.6.sip_port)}{$account.6.sip_port}{else}5060{/if}{""} + +account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary} +account.6.outbound_proxy.2.port = {if isset($account.6.sip_port)}{$account.6.sip_port}{else}5060{/if}{""} + account.6.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -1220,7 +1258,7 @@ account.6.anonymous_reject_offcode = account.6.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.6.expires = {$register_expires_6} +account.6.expires = {$account.6.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.6.100rel_enable = {$yealink_retransmission} @@ -1280,7 +1318,7 @@ account.6.enable_signal_encode = account.6.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.6.dtmf.type = +account.6.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.6.dtmf.dtmf_payload = @@ -1415,40 +1453,48 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if}{""} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if}{""} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if}{""} ####################################################################################### -## Account7 Settings ## +## Account 7 Settings ## ####################################################################################### #Basic Settings -account.7.enable = {if isset($user_password_7) }1{else}0{/if}{""} -account.7.label = {$display_name_7} -account.7.display_name = {$display_name_7} -account.7.user_name = {$user_id_7} -account.7.auth_name = {$user_id_7} -account.7.password = {$user_password_7} -account.7.sip_server_host = {$server_address_7} -account.7.sip_server_port = {$sip_port_7} -account.7.transport = {if $sip_transport_7 == 'udp'}0{/if}{if $sip_transport_7 == 'tcp'}1{/if}{if $sip_transport_7 == 'tls'}2{/if}{if $sip_transport_7 == 'dns srv'}3{/if}{""} -account.7.expires = {$register_expires_7} -account.7.outbound_host = {$outbound_proxy_7} -account.7.outbound_port = {$sip_port_7} +account.7.enable = {if isset($account.7.user_password) }1{else}0{/if}{""} + +account.7.label = {$account.7.display_name} +account.7.display_name = {$account.7.display_name} +account.7.user_name = {$account.7.user_id} +account.7.auth_name = {$account.7.user_id} +account.7.password = {$account.7.user_password} +account.7.sip_server_host = {$account.7.server_address} +account.7.sip_server_port = {$account.7.sip_port} +account.7.transport = {if $account.7.sip_transport == 'udp'}0{/if}{if $account.7.sip_transport == 'tcp'}1{/if}{if $account.7.sip_transport == 'tls'}2{/if}{if $account.7.sip_transport == 'dns srv'}3{/if}{""} + +account.7.expires = {$account.7.register_expires} +account.7.outbound_host = {$account.7.outbound_proxy} +account.7.outbound_port = {$account.7.sip_port} #Server Redundancy -account.7.sip_server.2.address= {$server_address_7} -account.7.sip_server.2.port= {$sip_port_7} -account.7.sip_server.2.transport_type = {if $sip_transport_7 == 'udp'}0{/if}{if $sip_transport_7 == 'tcp'}1{/if}{if $sip_transport_7 == 'tls'}2{/if}{if $sip_transport_7 == 'dns srv'}3{/if}{""} -account.7.sip_server.2.expires= {$register_expires_7} +account.7.sip_server.2.address= {$account.7.server_address} +account.7.sip_server.2.port= {$account.7.sip_port} +account.7.sip_server.2.transport_type = {if $account.7.sip_transport == 'udp'}0{/if}{if $account.7.sip_transport == 'tcp'}1{/if}{if $account.7.sip_transport == 'tls'}2{/if}{if $account.7.sip_transport == 'dns srv'}3{/if}{""} + +account.7.sip_server.2.expires= {$account.7.register_expires} account.7.retry_counts = 3 #Basic Proxy Settings -account.7.outbound_proxy_enable= {if isset($outbound_proxy_primary_7)}1{else}0{/if}{""} -account.7.outbound_proxy.1.address = {$outbound_proxy_primary_7} -account.7.outbound_proxy.1.port = {if isset($outbound_proxy_7_port)}{$outbound_proxy_7_port}{else}5060{/if}{""} -account.7.outbound_proxy.2.address = {$outbound_proxy_secondary_7} -account.7.outbound_proxy.2.port = {if isset($outbound_proxy_7_port)}{$outbound_proxy_7_port}{else}5060{/if}{""} +account.7.outbound_proxy_enable= {if isset($account.7.outbound_proxy_primary)}1{else}0{/if}{""} + +account.7.outbound_proxy.1.address = {$account.7.outbound_proxy_primary} +account.7.outbound_proxy.1.port = {if isset($account.7.sip_port)}{$account.7.outbound_sip_port}{else}5060{/if}{""} + +account.7.outbound_proxy.2.address = {$account.7.outbound_proxy_secondary} +account.7.outbound_proxy.2.port = {if isset($account.7.sip_port)}{$account.7.sip_port}{else}5060{/if}{""} + account.7.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -1529,7 +1575,7 @@ account.7.enable_signal_encode = account.7.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.7.dtmf.type = +account.7.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.7.dtmf.dtmf_payload = @@ -1664,40 +1710,48 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if}{""} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if}{""} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if}{""} ####################################################################################### -## Account8 Settings ## +## Account 8 Settings ## ####################################################################################### #Basic Settings -account.8.enable = {if isset($user_password_8) }1{else}0{/if}{""} -account.8.label = {$display_name_8} -account.8.display_name = {$display_name_8} -account.8.user_name = {$user_id_8} -account.8.auth_name = {$user_id_8} -account.8.password = {$user_password_8} -account.8.sip_server_host = {$server_address_8} -account.8.sip_server_port = {$sip_port_8} -account.8.transport = {if $sip_transport_8 == 'udp'}0{/if}{if $sip_transport_8 == 'tcp'}1{/if}{if $sip_transport_8 == 'tls'}2{/if}{if $sip_transport_8 == 'dns srv'}3{/if}{""} -account.8.expires = {$register_expires_8} -account.8.outbound_host = {$outbound_proxy_8} -account.8.outbound_port = {$sip_port_8} +account.8.enable = {if isset($account.8.user_password) }1{else}0{/if}{""} + +account.8.label = {$account.8.display_name} +account.8.display_name = {$account.8.display_name} +account.8.user_name = {$account.8.user_id} +account.8.auth_name = {$account.8.user_id} +account.8.password = {$account.8.user_password} +account.8.sip_server_host = {$account.8.server_address} +account.8.sip_server_port = {$account.8.sip_port} +account.8.transport = {if $account.8.sip_transport == 'udp'}0{/if}{if $account.8.sip_transport == 'tcp'}1{/if}{if $account.8.sip_transport == 'tls'}2{/if}{if $account.8.sip_transport == 'dns srv'}3{/if}{""} + +account.8.expires = {$account.8.register_expires} +account.8.outbound_host = {$account.8.outbound_proxy} +account.8.outbound_port = {$account.8.sip_port} #Server Redundancy -account.8.sip_server.2.address= {$server_address_8} -account.8.sip_server.2.port= {$sip_port_8} -account.8.sip_server.2.transport_type = {if $sip_transport_8 == 'udp'}0{/if}{if $sip_transport_8 == 'tcp'}1{/if}{if $sip_transport_8 == 'tls'}2{/if}{if $sip_transport_8 == 'dns srv'}3{/if}{""} -account.8.sip_server.2.expires= {$register_expires_8} +account.8.sip_server.2.address= {$account.8.server_address} +account.8.sip_server.2.port= {$account.8.sip_port} +account.8.sip_server.2.transport_type = {if $account.8.sip_transport == 'udp'}0{/if}{if $account.8.sip_transport == 'tcp'}1{/if}{if $account.8.sip_transport == 'tls'}2{/if}{if $account.8.sip_transport == 'dns srv'}3{/if}{""} + +account.8.sip_server.2.expires= {$account.8.register_expires} account.8.retry_counts = 3 #Basic Proxy Settings -account.8.outbound_proxy_enable= {if isset($outbound_proxy_primary_8)}1{else}0{/if}{""} -account.8.outbound_proxy.1.address = {$outbound_proxy_primary_8} -account.8.outbound_proxy.1.port = {if isset($outbound_proxy_8_port)}{$outbound_proxy_8_port}{else}5060{/if}{""} -account.8.outbound_proxy.2.address = {$outbound_proxy_secondary_8} -account.8.outbound_proxy.2.port = {if isset($outbound_proxy_8_port)}{$outbound_proxy_8_port}{else}5060{/if}{""} +account.8.outbound_proxy_enable= {if isset($account.8.outbound_proxy_primary)}1{else}0{/if}{""} + +account.8.outbound_proxy.1.address = {$account.8.outbound_proxy_primary} +account.8.outbound_proxy.1.port = {if isset($account.8.sip_port)}{$account.8.sip_port}{else}5060{/if}{""} + +account.8.outbound_proxy.2.address = {$account.8.outbound_proxy_secondary} +account.8.outbound_proxy.2.port = {if isset($account.8.sip_port)}{$account.8.sip_port}{else}5060{/if}{""} + account.8.fallback.timeout = {$yealink_outbound_proxy_fallback_interval} #Enable or disable the anonymous call feature; 0-Disabled (default), 1-Enabled; @@ -1718,7 +1772,7 @@ account.8.anonymous_reject_offcode = account.8.sip_listen_port = #Configure the register expiry time (in seconds), the default value is 3600. -account.8.expires = {$register_expires_8} +account.8.expires = {$account.8.register_expires} #Enable or disable the 100 reliable retransmission; 0-Disabled, 1-Enabled (default); account.8.100rel_enable = {$yealink_retransmission} @@ -1778,7 +1832,7 @@ account.8.enable_signal_encode = account.8.signal_encode_key = #Configure the DTMF type; 0-INBAND, 1-RFC2833 (default), 2-SIP INFO, 3-AUTO+SIP INFO; -account.8.dtmf.type = +account.8.dtmf.type = {$yealink_dtmf_type} #Configure the RFC2833 payload. It ranges from 96 to 225, the default value is 101. account.8.dtmf.dtmf_payload = @@ -1913,5 +1967,7 @@ network.internet_port.ip = network.internet_port.mask = network.internet_port.gateway = {if isset($dns_server_primary)}network.primary_dns = {$dns_server_primary}{/if}{""} + {if isset($dns_server_secondary)}network.secondary_dns = {$dns_server_secondary}{/if}{""} + {if isset($dns_server_primary)}network.static_dns_enable = 1{else}network.static_dns_enable = 0{/if}{""} diff --git a/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml b/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml new file mode 100644 index 0000000000..b66666243a --- /dev/null +++ b/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml @@ -0,0 +1,247 @@ + + + + yes + TA200 + + + + + + + + no + 0 + 10 + + + yes + no + {$yeastar_provision_url} + {$http_auth_username} + {$http_auth_password} + + 0 + 180 + no + no + lansettings,autopsettings,fxsport,voiptrunktemplate,dialpatterntemplate + + + + 1 + 0 + {$admin_name} + {$admin_password} + yes + + + + {$yeastar_time_zone} + {$yeastar_time_zone_name} + yes + yes + {$ntp_server_primary} + + + + + + 1 + up + 1 + + 1000 + 6000 + yes + no + 30 + no + yes + yes + number + + 40 + 40 + 1 + + {$user_id_1} + {$auth_id_1} + + + {$user_password_1} + no + none + 1 + no + + no + + 2 + disable + bell + 120 + 120 + no + no + yes + 300 + default + ring + bell + no + 12khz + 2000 + 2000 + 500 + + yes + no + + + 2 + up + 2 + + 1000 + 6000 + yes + no + 30 + no + yes + yes + number + + 40 + 40 + 2 + + {$user_id_2} + {$auth_id_2} + + + {$user_password_2} + no + none + 2 + no + + no + + 2 + disable + bell + 120 + 120 + no + no + yes + 300 + default + ring + bell + no + 12khz + 2000 + 2000 + 500 + + yes + no + + + + + 1 + SIP + VoIPServer1 + + {$server_address_1} + 5060 + udp + portregister + no + no + + 5060 + + ulaw + alaw + + + + 0 + yes + rfc2833 + + + no + + 5060 + + + + + + 30 + no + + 5060 + yes + hf + + + 2 + SIP + VoIPServer2 + + {$server_address_2} + 5060 + udp + portregister + no + no + + 5060 + + ulaw + alaw + + + + 0 + yes + rfc2833 + + + no + + 5060 + + + + + + 30 + no + + 5060 + yes + hf + + + + + 1 + DialPatternTemplate1 + .,, + + + 2 + DialPatternTemplate2 + .,, + + + + diff --git a/secure/v_mailto.php b/secure/v_mailto.php index f493aac8d2..b4efb28429 100755 --- a/secure/v_mailto.php +++ b/secure/v_mailto.php @@ -135,6 +135,9 @@ //prepare smtp server settings // load default smtp settings + if ($_SESSION['email']['smtp_hostname']['text'] != '') { + $smtp['hostname'] = $_SESSION['email']['smtp_hostname']['text']; + } $smtp['host'] = (strlen($_SESSION['email']['smtp_host']['text'])?$_SESSION['email']['smtp_host']['text']:'127.0.0.1'); if (isset($_SESSION['email']['smtp_port'])) { $smtp['port'] = (int)$_SESSION['email']['smtp_port']['numeric']; @@ -210,6 +213,9 @@ } $mail->SMTPAuth = $smtp['auth']; + if (isset($smtp['hostname'])) { + $mail->Hostname = $smtp['hostname']; + } $mail->Host = $smtp['host']; if ($smtp['port']!=0) $mail->Port=$smtp['port']; if ($smtp['secure'] != '') { @@ -323,12 +329,15 @@ $mail->ContentType = "text/html"; $mail->Body = $body."

".nl2br($transcription); $mail->AltBody = $body_plain."\n\n$transcription"; + $mail->isHTML(true); } else { // $mail->Body = ($body != '') ? $body : $body_plain; $mail->Body = $body_plain."\n\n$transcription"; $mail->AltBody = $body_plain."\n\n$transcription"; + $mail->isHTML(false); } + $mail->CharSet = "utf-8"; //send the email if(!$mail->Send()) { @@ -337,13 +346,13 @@ $call_uuid = $headers["X-FusionPBX-Call-UUID"]; if ($resend == true) { - echo "Retained in v_emails \n"; + echo "Retained in v_email_logs \n"; } else { // log/store message in database for review - if (!isset($email_uuid)) { - $email_uuid = uuid(); - $sql = "insert into v_emails ( "; - $sql .= "email_uuid, "; + if (!isset($email_log_uuid)) { + $email_log_uuid = uuid(); + $sql = "insert into v_email_logs ( "; + $sql .= "email_log_uuid, "; if ($call_uuid) { $sql .= "call_uuid, "; } @@ -353,7 +362,7 @@ $sql .= "status, "; $sql .= "email "; $sql .= ") values ( "; - $sql .= "'".$email_uuid."', "; + $sql .= "'".$email_log_uuid."', "; if ($call_uuid) { $sql .= "'".$call_uuid."', "; } @@ -367,7 +376,7 @@ unset($sql); } - echo "Retained in v_emails as email_uuid = ".$email_uuid."\n"; + echo "Retained in v_email_logs as email_log_uuid = ".$email_log_uuid."\n"; } } @@ -391,7 +400,7 @@ $fp = fopen(sys_get_temp_dir()."/email.eml", "w"); ob_end_clean(); ob_start(); -$sql = "select email from v_emails where email_uuid = '".$email_uuid."'"; +$sql = "select email from v_email_logs where email_log_uuid = '".$email_log_uuid."'"; $prep_statement = $db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); diff --git a/themes/default/app_config.php b/themes/default/app_config.php index 1676517fe5..4892f23fca 100644 --- a/themes/default/app_config.php +++ b/themes/default/app_config.php @@ -1557,5 +1557,36 @@ $apps[$x]['default_settings'][$y]['default_setting_value'] = "rgba(255,255,255,0.50)"; $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the hover color (and opacity) for the icons in the body."; - -?> \ No newline at end of file + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ab2c46dd-85fe-4916-bccf-4eec6d792cf8"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_width_contracted"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "55"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the contracted pixel width of the side menu."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fafa0181-4d8f-452c-8772-2d3ad4a953a5"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_width_expanded"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "225"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the expanded pixel width of the side menu."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ac2a4991-5aab-4eca-b26e-7608c098cd90"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_brand_image_contracted"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/images/logo_side_contracted.png"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the contracted brand image path for the Side menu."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a3d0fe4f-015a-4577-90f6-088a389c3997"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "theme"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "menu_side_brand_image_expanded"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "/themes/default/images/logo_side_expanded.png"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the expanded brand image path for the Side menu."; +?> diff --git a/themes/default/app_languages.php b/themes/default/app_languages.php index 867c1608a1..e9d5e535e0 100644 --- a/themes/default/app_languages.php +++ b/themes/default/app_languages.php @@ -106,7 +106,6 @@ $text['theme-button-close']['sv-se'] = "Stänga"; $text['theme-button-close']['uk-ua'] = "Близько"; $text['theme-button-close']['tr-tr'] = "Kapat"; - $text['theme-label-search']['en-us'] = "Search..."; $text['theme-label-search']['ar-eg'] = ""; $text['theme-label-search']['de-at'] = "Suchen..."; //copied from de-de @@ -170,4 +169,46 @@ $text['theme-label-all_rights_reserved']['sv-se'] = "All rights reserved."; $text['theme-label-all_rights_reserved']['uk-ua'] = ""; $text['theme-label-all_rights_reserved']['tr-tr'] = "Tüm hakları saklıdır."; -?> +$text['theme-label-user']['en-us'] = "User"; +$text['theme-label-user']['ar-eg'] = ""; +$text['theme-label-user']['de-at'] = "Benutzer"; //copied from de-de +$text['theme-label-user']['de-ch'] = "Benutzer"; //copied from de-de +$text['theme-label-user']['de-de'] = "Benutzer"; +$text['theme-label-user']['es-cl'] = "Usuario"; +$text['theme-label-user']['es-mx'] = "Usuario"; //copied from es-cl +$text['theme-label-user']['fr-ca'] = "Utilisateur"; //copied from fr-fr +$text['theme-label-user']['fr-fr'] = "Utilisateur"; +$text['theme-label-user']['he-il'] = ""; +$text['theme-label-user']['it-it'] = "Utente"; +$text['theme-label-user']['nl-nl'] = ""; +$text['theme-label-user']['pl-pl'] = "Użytkownicy"; +$text['theme-label-user']['pt-br'] = "Usuário"; +$text['theme-label-user']['pt-pt'] = "Utilizadore"; +$text['theme-label-user']['ro-ro'] = ""; +$text['theme-label-user']['ru-ru'] = "Пользователь"; +$text['theme-label-user']['sv-se'] = "Användare"; +$text['theme-label-user']['uk-ua'] = "Користувачі"; +$text['theme-label-user']['tr-tr'] = "Користувачі"; + +$text['theme-label-domain']['en-us'] = "Domain"; +$text['theme-label-domain']['ar-eg'] = "النطاق"; +$text['theme-label-domain']['de-at'] = "Domäne"; //copied from de-de +$text['theme-label-domain']['de-ch'] = "Domäne"; //copied from de-de +$text['theme-label-domain']['de-de'] = "Domäne"; +$text['theme-label-domain']['es-cl'] = "Dominio"; +$text['theme-label-domain']['es-mx'] = "Dominio"; //copied from es-cl +$text['theme-label-domain']['fr-ca'] = "Domaine"; //copied from fr-fr +$text['theme-label-domain']['fr-fr'] = "Domaine"; +$text['theme-label-domain']['he-il'] = "דומיין"; +$text['theme-label-domain']['it-it'] = "Dominio"; +$text['theme-label-domain']['nl-nl'] = ""; +$text['theme-label-domain']['pl-pl'] = "Domena"; +$text['theme-label-domain']['pt-br'] = "Dominio"; +$text['theme-label-domain']['pt-pt'] = "Domínio"; +$text['theme-label-domain']['ro-ro'] = "Domeniu"; +$text['theme-label-domain']['ru-ru'] = "Домен"; +$text['theme-label-domain']['sv-se'] = "Domän"; +$text['theme-label-domain']['uk-ua'] = "Домен"; +$text['theme-label-domain']['tr-tr'] = "Alan Adı"; + +?> \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 10926924fa..898ecbb3f8 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -387,6 +387,13 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; text-decoration: none; } + a#header_domain_selector_domain:hover, + a#header_domain_selector_domain:focus, + a#header_domain_selector_domain:active { + text-decoration: none; + cursor: pointer; + } + /* logout icon */ a.logout_icon { display: inline-block; @@ -396,6 +403,15 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; margin-left: 10px; } + a#header_logout_icon { + display: inline-block; + font-size: 11pt; + padding-left: 5px; + padding-right: 5px; + margin-left: 5px; + margin-right: 5px; + } + a.logout_icon:hover, a.logout_icon:focus, a.logout_icon:active { @@ -425,6 +441,139 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; background: ; } +/* SIDE MENU: Begin ***********************************************************/ + + /* side menu container */ + div#menu_side_container { + z-index: 99900; + position: fixed; + top: 0; + left: 0; + width: px; + height: 100%; + overflow: auto; + + background-image: url(""); + background-position: 0px 0px; + background-repeat: repeat-y; + + background: ; + + -webkit-box-shadow: ; + -moz-box-shadow: ; + box-shadow: ; + + -moz-border-radius: ; + -webkit-border-radius: ; + -khtml-border-radius: ; + border-radius: ; + } + + /* menu side brand container */ + div#menu_side_brand_container { + position: -webkit-sticky; + position: sticky; + z-index: 99901; + top: 0; + padding: 20px; + min-height: 75px; + text-align: left; + + background-image: url(""); + background-position: 0px 0px; + background-repeat: repeat-y; + + background: ; + + + -moz-border-radius: ; + -webkit-border-radius: ; + -khtml-border-radius: ; + border-radius: ; + } + + /* menu side logo */ + img#menu_brand_image_contracted { + border: none; + width: auto; + max-height: 30px; + max-width: 30px; + margin-right: 10px; + } + + img#menu_brand_image_expanded { + border: none; + height: auto; + max-width: 145px; + max-height: 35px; + margin-top: -3px; + margin-left: -6px; + } + + /* menu brand text */ + .menu_brand_text { + color: ; + font-weight: 600; + white-space: nowrap; + } + + .menu_brand_text:hover { + color: ; + text-decoration: none; + } + + a.menu_side_item_main { + display: block; + width: 100%; + padding: 10px 20px; + text-align: left; + font-family: ; + font-size: ; + color: ; + cursor: pointer; + } + + a.menu_side_item_main:hover, + a.menu_side_item_main:focus, + a.menu_side_item_main:active { + color: ; + background: ; + text-decoration: none; + } + + a.menu_side_item_sub { + display: block; + width: 100%; + padding: 5px 20px 5px 42px; + text-align: left; + background: ; + font-family: ; + font-size: ; + color: ; + cursor: pointer; + } + + a.menu_side_item_sub:hover, + a.menu_side_item_sub:focus, + a.menu_side_item_sub:active { + color: ; + background: ; + text-decoration: none; + } + + a.menu_side_toggle { + padding: 10px; + cursor: pointer; + } + /* BUTTONS ********************************************************************/ /* buttons */ @@ -680,8 +829,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; } #login_logo { - width: 250px; - height: auto; + text-decoration: none; } a.login_link { @@ -763,6 +911,12 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; } } + div#content_header { + padding: 10px; + margin-top: 5px; + height: 40px; + } + /* GENERAL ELEMENTS *****************************************************************/ img { @@ -808,6 +962,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; textarea.formfld, input[type=text].formfld, input[type=number].formfld, + input[type=url].formfld, input[type=password].formfld, label.formfld { font-family: ; @@ -853,6 +1008,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; textarea.formfld, input[type=text].formfld, input[type=number].formfld, + input[type=url].formfld, input[type=password].formfld { transition: width 0.25s; -moz-transition: width 0.25s; @@ -873,6 +1029,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; textarea.formfld:hover, input[type=text].formfld:hover, input[type=number].formfld:hover, + input[type=url].formfld:hover, input[type=password].formfld:hover, label.formfld:hover { border-color: ; @@ -886,6 +1043,7 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; textarea.formfld:focus, input[type=text].formfld:focus, input[type=number].formfld:focus, + input[type=url].formfld:focus, input[type=password].formfld:focus, label.formfld:focus { border-color: ; @@ -1335,66 +1493,9 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; padding: 4px 7px; } -/* RESPONSE MESSAGES *******************************************************/ +/* RESPONSE MESSAGE STACK *******************************************************/ #message_container { - z-index: 99998; - position: absolute; - top: -80px; - left: 0; - right: 0; - filter: alpha(opacity=0); - opacity: 0; - -moz-opacity:0; - -khtml-opacity: 0; - padding: 15px 0; - } - - #message_text { - z-index: 99999; - position: absolute; - top: -80px; - left: 0; - right: 0; - filter: alpha(opacity=0); - opacity: 0; - -moz-opacity:0; - -khtml-opacity: 0; - margin: 0 auto; - vertical-align: middle; - padding: 15px 0; - text-align: center; - font-family: arial, san-serif; - font-size: 10pt; - } - - .message_container_mood_default { - background: ; - } - - .message_container_mood_negative { - background: ; - } - - .message_container_mood_alert { - background: ; - } - - .message_text_mood_default { - color: ; - } - - .message_text_mood_negative { - color: ; - } - - .message_text_mood_alert { - color: ; - } - -/* MESSAGES STACK *******************************************************/ - - #messages_container { z-index: 99998; position: absolute; top: 0; @@ -1406,33 +1507,37 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false; .message_text { z-index: 99999; margin: 0 auto; - padding: 0.5em 0; + padding: 10px; text-align: center; font-family: arial, san-serif; font-size: 10pt; display: block; - border-bottom: solid 1px; color: ; background: ; - border-bottom-color: ; + box-shadow: inset 0px 7px 8px -10px ; + border-bottom: solid 1px ; + opacity: 0; + } + + .message_mood_positive { + color: ; + background: ; + box-shadow: inset 0px 7px 8px -10px ; + border-bottom: solid 1px ; } - .message_mood_positive { - color: ; - background: ; - border-bottom-color: ; - } - .message_mood_negative { color: ; background: ; - border-bottom-color: ; + box-shadow: inset 0px 7px 8px -10px ; + border-bottom: solid 1px ; } .message_mood_alert { color: ; background: ; - border-bottom-color: ; + box-shadow: inset 0px 7px 8px -10px ; + border-bottom: solid 1px ; } /* OPERATOR PANEL ****************************************************************/ diff --git a/themes/default/images/logo_login.png b/themes/default/images/logo_login.png new file mode 100644 index 0000000000..1dcd520efa Binary files /dev/null and b/themes/default/images/logo_login.png differ diff --git a/themes/default/images/logo_side_contracted.png b/themes/default/images/logo_side_contracted.png new file mode 100755 index 0000000000..2ccc9ed6a1 Binary files /dev/null and b/themes/default/images/logo_side_contracted.png differ diff --git a/themes/default/images/logo_side_expanded.png b/themes/default/images/logo_side_expanded.png new file mode 100755 index 0000000000..819d78a095 Binary files /dev/null and b/themes/default/images/logo_side_expanded.png differ diff --git a/themes/default/template.php b/themes/default/template.php index 21cc0122aa..2b6f272e52 100644 --- a/themes/default/template.php +++ b/themes/default/template.php @@ -1,4 +1,5 @@ 0) { $php_self_dir = substr($php_self_dir, strlen(PROJECT_PATH), strlen($php_self_dir)); } -?> - - - - - - - - - - -\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +//link to custom css file if ($_SESSION['theme']['custom_css']['text'] != '') { echo "\n\n"; } +//output custom css + if ($_SESSION['theme']['custom_css_code']['text'] != '') { + echo "\n\n"; + } //set fav icon $favicon = (isset($_SESSION['theme']['favicon']['text'])) ? escape($_SESSION['theme']['favicon']['text']) : '/themes/default/favicon.ico'; echo "\n"; -?> -<!--{title}--> +echo "<!--{title}-->\n"; + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; - - - - - - - -/resources/fonts/web_font_loader.php?v=".escape($font_loader_version)."'>\n"; } ?> + - - - - \n"; +echo "\n"; + //add multilingual support $language = new text; $text = $language->get(null,'themes/default'); -?> - +echo "\n"; -
+echo "
\n"; - 0 && permission_exists("domain_select") && count($_SESSION['domains']) > 1) { - ?> -
- -
-
- - ".$text['theme-title-domains']." (".sizeof($_SESSION['domains']).")"; - ?> -

- -
-
- "; - echo "".escape($domain['domain_name'])."\n"; - if ($domain['domain_description'] != '') { - echo " - ".escape($domain['domain_description'])."\n"; - } - echo "
\n"; - $ary_domain_names[] = escape($domain['domain_name']); - $ary_domain_descs[] = str_replace('"','\"',escape($domain['domain_description'])); - } - ?> -
- + if (file_exists($_SERVER["DOCUMENT_ROOT"]."/app/domains/domains.php")) { + $href = '/app/domains/domains.php'; + } + else { + $href = '/core/domain_settings/domains.php'; + } + echo "".$text['theme-title-domains']." (".sizeof($_SESSION['domains']).")"; -
- -
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; - - // qr code container for contacts - echo ""; - - - if (!$default_login) { - - //*************** BOOTSTRAP MENU ******************************** - function show_menu($menu_array, $menu_style, $menu_position) { - global $text; - - //determine menu behavior - switch ($menu_style) { - case 'inline': - $menu_type = 'default'; - $menu_width = 'calc(100% - 20px)'; - $menu_brand = false; - $menu_corners = null; - break; - case 'static': - $menu_type = 'static-top'; - $menu_width = 'calc(100% - 40px)'; - $menu_brand = true; - $menu_corners = "style='-webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;'"; - break; - case 'fixed': - default: - $menu_position = ($menu_position != '') ? $menu_position : 'top'; - $menu_type = 'fixed-'.$menu_position; - $menu_width = 'calc(90% - 20px)'; - $menu_brand = true; - $menu_corners = null; - } - ?> - - - - "; + echo "".escape($domain['domain_name'])."\n"; + if ($domain['domain_description'] != '') { + echo " - ".escape($domain['domain_description'])."\n"; + } + echo "
\n"; + $ary_domain_names[] = escape($domain['domain_name']); + $ary_domain_descs[] = str_replace('"','\"',escape($domain['domain_description'])); } + echo " \n"; - //determine menu configuration - $menu = new menu; - $menu->db = $db; - $menu->menu_uuid = $_SESSION['domain']['menu']['uuid']; - $menu_array = $menu->menu_array(); - unset($menu); + echo " \n"; - $menu_style = ($_SESSION['theme']['menu_style']['text'] != '') ? $_SESSION['theme']['menu_style']['text'] : 'fixed'; - $menu_position = ($_SESSION['theme']['menu_position']['text']) ? $_SESSION['theme']['menu_position']['text'] : 'top'; - $open_container = "
"; + echo "
\n"; + echo "\n"; + } + +// qr code container for contacts + echo "\n"; + + +if (!$default_login) { + + //top fixed, static or inline boostrap menu + function show_menu($menu_array, $menu_style, $menu_position) { + global $text; + + //determine menu behavior switch ($menu_style) { case 'inline': - $logo_align = ($_SESSION['theme']['logo_align']['text'] != '') ? $_SESSION['theme']['logo_align']['text'] : 'left'; - $logo_style = ($_SESSION['theme']['logo_style']['text'] != '') ? $_SESSION['theme']['logo_style']['text'] : ''; - echo str_replace("center", $logo_align, $open_container); - if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/core/install/install.php") { - $logo = ($_SESSION['theme']['logo']['text'] != '') ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/default/images/logo.png"; - echo ""; - } - - show_menu($menu_array, $menu_style, $menu_position); + $menu_type = 'default'; + $menu_width = 'calc(100% - 20px)'; + $menu_brand = false; + $menu_corners = null; break; case 'static': - echo $open_container; - show_menu($menu_array, $menu_style, $menu_position); + $menu_type = 'static-top'; + $menu_width = 'calc(100% - 40px)'; + $menu_brand = true; + $menu_corners = "style='-webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;'"; break; case 'fixed': - show_menu($menu_array, $menu_style, $menu_position); - echo $open_container; + default: + $menu_position = ($menu_position != '') ? $menu_position : 'top'; + $menu_type = 'fixed-'.$menu_position; + $menu_width = 'calc(90% - 20px)'; + $menu_brand = true; + $menu_corners = null; } - ?> -
- -
- - + //begin navbar code + echo "\n"; } - // default login being used + + //determine menu configuration + $menu = new menu; + $menu->db = $db; + $menu->menu_uuid = $_SESSION['domain']['menu']['uuid']; + $menu_array = $menu->menu_array(); + unset($menu); + + $menu_style = ($_SESSION['theme']['menu_style']['text'] != '') ? $_SESSION['theme']['menu_style']['text'] : 'fixed'; + $menu_position = ($_SESSION['theme']['menu_position']['text']) ? $_SESSION['theme']['menu_position']['text'] : 'top'; + + switch ($menu_style) { + case 'inline': + $logo_align = ($_SESSION['theme']['logo_align']['text'] != '') ? $_SESSION['theme']['logo_align']['text'] : 'left'; + $logo_style = ($_SESSION['theme']['logo_style']['text'] != '') ? $_SESSION['theme']['logo_style']['text'] : ''; + echo "
\n"; + if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/core/install/install.php") { + $logo = ($_SESSION['theme']['logo']['text'] != '') ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/default/images/logo.png"; + echo ""; + } + + show_menu($menu_array, $menu_style, $menu_position); + break; + case 'static': + echo "
\n"; + show_menu($menu_array, $menu_style, $menu_position); + break; + case 'fixed': + show_menu($menu_array, $menu_style, $menu_position); + echo "
\n"; + break; + case 'side': + echo "\n"; + echo "
\n"; + echo "
\n"; + //header: left + echo "
\n"; + echo "
\n"; + //header: right + echo ""; + //current user + echo "\n"; + echo "".$text['theme-label-user'].": "; + echo "".$_SESSION['username'].""; + echo "\n"; + //domain name/selector (sm+) + if ($_SESSION["username"] != '' && permission_exists("domain_select") && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') { + echo "\n"; + echo "".$text['theme-label-domain'].": "; + echo "".escape($_SESSION['domain_name']).""; + echo "\n"; + } + //logout icon + if ($_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") { + echo ""; + } + echo ""; + echo "
\n"; + break; + } + + echo "
\n"; + echo " \n"; + echo "
\n"; + echo "\n"; + + echo "
\n"; //initial div from switch statement above + +} + +// default login being used +else { + + if ($_SESSION['theme']['logo_login']['text'] != '') { + $logo = $_SESSION['theme']['logo_login']['text']; + } + else if ($_SESSION['theme']['logo']['text'] != '') { + $logo = $_SESSION['theme']['logo']['text']; + } else { - $logo = (isset($_SESSION['theme']['logo']['text'])) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/default/images/logo.png"; - ?> -
-
- -
- - - - + echo "
\n"; + echo "
\n"; + echo " \n"; + echo "
\n"; + echo "\n"; + + unset($_SESSION['background_image']); + +} + +echo "\n"; +echo "\n"; +?> \ No newline at end of file