104 Commits
Author SHA1 Message Date
Zachary Kitchen 5a48f7e39b Disable anonymous (ghost calling) on Grandstreams (#3070)
* Disable anonymous (ghost calling) on Grandstreams

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml
2018-05-28 16:30:07 -07:00
FusionPBX 54492becf5 Update functions.php 2018-05-28 14:18:40 -06:00
FusionPBX 08d797b5c7 Update extension_edit.php 2018-05-28 14:18:04 -06:00
FusionPBX fed213f37a Update app_config.php 2018-05-28 14:16:38 -06:00
FusionPBX 5b63911802 Update extension_copy.php 2018-05-28 14:13:36 -06:00
FusionPBX a27ea3963d Update app_config.php 2018-05-28 11:13:49 -06:00
FusionPBX 45e98b85cd Update app_config.php 2018-05-24 09:38:12 -07:00
Zachary Kitchen 0994a9d834 Updated for Weather App on Grandstream Phones (#3066)
* Updated for Weather App on Grandstream Phons

* Revert "Updated for Weather App on Grandstream Phons"

This reverts commit b61a678db5.

* Revert "Revert "Updated for Weather App on Grandstream Phons""

This reverts commit 4659f5556b.
2018-05-23 16:00:35 -07:00
FusionPBX b3fd50bcf3 Update app_config.php 2018-05-23 15:59:29 -07:00
Zachary Kitchen b0c539a020 City Code for GXP Phones (#3064)
* City Code for GXP Phones

This allows users to add custom city codes to tables.

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml

* Update app_config.php

* Update {$mac}.xml

This fixes the unintended consequences when users are trying to push an assigned BLF key to transfer a call it would attempt to perform an attended transfer rather than a blind transfer.

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml
2018-05-23 13:12:40 -07:00
Len 0de7aecda0 Update {$mac}.cfg (#3063) 2018-05-22 21:31:30 -06:00
FusionPBX 43adf974c1 Update app_config.php 2018-05-22 14:39:58 -07:00
Luis Daniel Lucio Quiroz 02f5f567b2 Fix Voicemail DELETE FROM SQL Sentence [4.4] (#3060)
Same, the AS alias is not needed, it breaks MariaDB/MySQL and maybe other databases as well. Also, the SQL sentence is just dealing with one table, so it is not needed.
2018-05-22 01:12:28 -06:00
FusionPBX 2baed9f91e Update user_edit.php 2018-05-19 23:55:11 -06:00
FusionPBX 30a8f5ade9 Update functions.php 2018-05-19 23:53:49 -06:00
FusionPBX 02a8464327 Update v_xml_cdr_import.php 2018-05-19 16:59:57 -06:00
FusionPBX 463454d714 Update database.php 2018-05-19 15:49:01 -06:00
FusionPBX 7d45353229 Update xml_cdr_details.php 2018-05-19 13:25:02 -06:00
FusionPBX 71e115dcc2 Update database.php 2018-05-18 18:56:35 -06:00
Luis Daniel Lucio Quiroz 3d502971c9 Fix Mysql/MariaDB installation 2/2 [4.4] (#3057)
Same as 4.5
2018-05-18 00:58:36 -06:00
FusionPBX 1baa07fbf0 Update call_forward.lua 2018-05-09 22:46:46 -06:00
FusionPBX 9b888b1690 Update extension_edit.php 2018-05-09 17:36:20 -06:00
FusionPBX 19164f4a6f Update v_xml_cdr_import.php 2018-05-09 16:48:41 -06:00
FusionPBX 7ce16806f0 Update destination_edit.php 2018-05-09 13:47:45 -06:00
FusionPBX d6069285da Update destination_edit.php 2018-05-09 13:39:58 -06:00
FusionPBX 0a1208eb11 Update 900_voicemail.xml 2018-05-09 10:07:58 -06:00
FusionPBX 22cd7fd452 Update index.lua 2018-05-09 09:56:35 -06:00
FusionPBX b188aa1a69 Update index.lua 2018-05-09 09:51:08 -06:00
FusionPBX b1d3767c9e Update index.lua 2018-05-09 09:07:59 -06:00
FusionPBX b6a81cb892 Update app_config.php 2018-05-09 09:06:10 -06:00
FusionPBX 9199ccc07c Update index.lua 2018-05-09 09:02:23 -06:00
FusionPBX 8d95457276 Update index.lua 2018-05-06 13:10:29 -06:00
FusionPBX 375ec767d8 Update app_languages.php 2018-05-04 08:36:23 -06:00
FusionPBX 0577d0fa61 Update xml_cdr.php 2018-05-04 08:34:17 -06:00
FusionPBX 2d2a7c1c37 Update dialplan.lua 2018-05-03 15:19:44 -06:00
FusionPBX fbef2afb6d Update app_config.php 2018-05-03 12:42:18 -06:00
FusionPBX 82d397d5c5 Update fax_send.php 2018-05-02 11:42:19 -06:00
Len 7b305c7f4b Update app_config.php (#3045) 2018-05-01 12:08:43 -06:00
FusionPBX c93425d6ec Update app_config.php 2018-04-30 16:19:16 -06:00
FusionPBX 695ebf33b1 Update y000000000028.cfg 2018-04-30 16:15:25 -06:00
FusionPBX 4c185166f4 Update app_config.php 2018-04-30 16:14:19 -06:00
FusionPBX f1e45f2aaa Update record_greeting.lua 2018-04-30 10:32:25 -06:00
FusionPBX 1f8d92d759 Update destination_edit.php 2018-04-27 21:33:48 -06:00
FusionPBX 3323f86266 Update destination_edit.php 2018-04-27 13:25:11 -06:00
FusionPBX 8b3beb9098 Update user_dashboard.php 2018-04-26 23:10:06 -06:00
Luis Daniel Lucio Quiroz 39b2c9381b Prevent NILs for 4.4 (#3039)
When updating from 4.2 to 4.4. Because there are new fields, some of them can return a NIL. this verifications prevents a LUA script failure
2018-04-26 14:42:10 -06:00
FusionPBX 77ba7f685b Update index.php 2018-04-25 23:48:06 -06:00
FusionPBX ffe39776cd Update user_edit.php 2018-04-25 22:15:27 -06:00
FusionPBX 4f92434d7d Update index.lua 2018-04-25 21:19:51 -06:00
FusionPBX 880480a8e2 Update dialplan.php 2018-04-25 17:37:30 -06:00
FusionPBX 4539e8e74c Update gateway_edit.php 2018-04-24 16:31:17 -06:00
FusionPBX 18ef639d22 Update scripts.php 2018-04-23 11:27:20 -06:00
FusionPBX 612b382a3f Update v_xml_cdr_import.php 2018-04-22 11:53:26 -06:00
FusionPBX 0fcffa2fea Update pdo.php 2018-04-21 09:31:26 -06:00
FusionPBX 59d75656a2 Update extension_edit.php 2018-04-20 13:55:58 -06:00
FusionPBX 1584410f3f Create app_config.php 2018-04-20 10:59:28 -06:00
FusionPBX 5b357e8ed4 Update index.lua 2018-04-20 09:33:57 -06:00
FusionPBX c34be68f01 Update v_xml_cdr_import.php 2018-04-18 18:22:51 -06:00
FusionPBX e246fed126 Update v_xml_cdr_import.php 2018-04-18 16:30:20 -06:00
FusionPBX e878c7b72d Update v_xml_cdr_import.php 2018-04-18 11:53:12 -06:00
FusionPBX 26f89e3f61 Update call_center_queue_edit.php 2018-04-17 10:28:17 -06:00
FusionPBX e0b743a369 Update call_center_active_inc.php 2018-04-17 09:08:52 -06:00
FusionPBX 57a7482bc8 Update app_config.php 2018-04-16 10:41:08 -06:00
FusionPBX 10a45a3013 Update call_center_queue_edit.php 2018-04-15 21:45:46 -06:00
FusionPBX 06122af1d2 Update voicemail_option_delete.php 2018-04-15 20:21:41 -06:00
FusionPBX e46a13b812 Update {$mac}.cfg 2018-04-15 00:32:32 -06:00
FusionPBX 6ff0eea666 Update {$mac}.cfg 2018-04-15 00:32:09 -06:00
FusionPBX c40323dfb9 Update {$mac}.cfg 2018-04-15 00:31:45 -06:00
FusionPBX 8594eb48f1 Update {$mac}.cfg 2018-04-15 00:31:19 -06:00
FusionPBX a139f42353 Update index.php 2018-04-14 23:58:10 -06:00
FusionPBX 540e2acf2e Update {$mac}.cfg 2018-04-14 16:18:33 -06:00
FusionPBX 5329e27687 Update {$mac}.cfg 2018-04-14 16:18:15 -06:00
FusionPBX bd7236d2ce Update {$mac}.cfg 2018-04-14 16:17:55 -06:00
FusionPBX b40f861c6d Update {$mac}.cfg 2018-04-14 16:17:37 -06:00
FusionPBX 2745d36798 Update index.php 2018-04-14 15:18:10 -06:00
Len 19489bbc67 template update for grandstream p1359 4.4 branch (#3031) 2018-04-14 09:55:34 -06:00
Len 3e2a1e5140 typo fix (#3027) 2018-04-13 15:40:02 -06:00
FusionPBX dceb32c8f7 Update call_center_active.php 2018-04-13 07:45:13 -06:00
FusionPBX 3ad4901e67 Update call_center_active_inc.php 2018-04-13 07:44:30 -06:00
FusionPBX e6aa7aca47 Update {$mac}.cfg 2018-04-12 00:05:50 -06:00
FusionPBX 6dd738fa30 Update {$mac}.cfg 2018-04-12 00:05:13 -06:00
FusionPBX 7a2b648dab Update {$mac}.cfg 2018-04-12 00:04:32 -06:00
FusionPBX 501858a2f2 Update {$mac}.cfg 2018-04-12 00:04:02 -06:00
FusionPBX fb59acdc83 Create phonebook.xml 2018-04-11 23:54:12 -06:00
FusionPBX 27685127f4 Create phonebook.xml 2018-04-11 23:53:46 -06:00
FusionPBX 22289090ad Create phonebook.xml 2018-04-11 23:53:14 -06:00
FusionPBX 8c65719721 Create phonebook.xml 2018-04-11 23:52:34 -06:00
FusionPBX 0f5f77449d Update app_languages.php 2018-04-10 21:16:22 -06:00
FusionPBX e3a993f7c7 Update ringbacks.php 2018-04-10 21:14:47 -06:00
FusionPBX 334576961d Create app_defaults.php 2018-04-10 21:12:47 -06:00
Len 5be35f91ba Update {$mac}.xml (#3023) 2018-04-10 18:24:40 -06:00
Len d5e0c810a0 Update {$mac}.xml (#3025)
value not needed, causes issue for updating phone
2018-04-10 18:24:03 -06:00
FusionPBX 2582a266f9 Update index.lua 2018-04-09 16:16:14 -06:00
FusionPBX b775321411 Update index.lua 2018-04-09 10:40:25 -06:00
FusionPBX f5f00027ad Update call_center_queue_edit.php 2018-04-08 12:08:57 -06:00
FusionPBX d9a0151fc5 Update call_center_agent_edit.php 2018-04-08 10:43:26 -06:00
FusionPBX 39395ccf99 Update call_center_agent_delete.php 2018-04-08 10:40:48 -06:00
gmaruzz acdd869d0f wrong translation of 'Account Settings' to 'Gestione Gruppi', now corrected to 'Impostazioni Utente' (also, test pull request) (#3022) 2018-04-07 12:06:05 -06:00
FusionPBX d41f33110a Update app_languages.php 2018-04-07 02:11:27 -06:00
FusionPBX 4977adbde6 Update call_center_active_inc.php 2018-04-06 09:35:31 -06:00
FusionPBX 964039c9de Update {$mac}.xml 2018-04-06 09:14:02 -06:00
FusionPBX 23470069d8 Update user_dashboard.php 2018-04-06 09:05:48 -06:00
FusionPBX e5e95fc959 Update {$mac}.xml 2018-04-06 08:57:45 -06:00
FusionPBX 2a27df50cf Update app_menu.php 2018-04-05 23:16:55 -06:00
96 changed files with 1358 additions and 669 deletions
@@ -1,4 +1,4 @@
<?php
<?php
/*
FusionPBX
Version: MPL 1.1
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2017
Portions created by the Initial Developer are Copyright (C) 2008-2018
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -46,6 +46,10 @@
$queue_name = $_GET['queue_name'];
$name = $_GET['name'];
//get a new session array
unset($_SESSION['queues']);
unset($_SESSION['agents']);
//get the header
require_once "resources/header.php";
$document['title'] = $text['title-call_center_queue_activity'];
@@ -43,8 +43,25 @@
$language = new text;
$text = $language->get();
//get the queue_name and set it as a variable
$queue_name = $_GET['queue_name'];
//get the queue uuid and set it as a variable
$queue_uuid = $_GET['queue_name'];
//get the queues from the database
if (!is_array($_SESSION['queues'])) {
$sql = "select * from v_call_center_queues ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "order by queue_name ASC ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$_SESSION['queues'] = $prep_statement->fetchAll(PDO::FETCH_NAMED);
}
//get the queue name
foreach ($_SESSION['queues'] as $row) {
if ($row['call_center_queue_uuid'] == $queue_uuid) {
$queue_name = $row['queue_name'];
}
}
//convert the string to a named array
function str_to_named_array($tmp_str, $tmp_delimiter) {
@@ -104,7 +121,7 @@
//send the event socket command and get the response
//callcenter_config queue list tiers [queue_name] |
$switch_cmd = 'callcenter_config queue list tiers '.$queue_name;
$switch_cmd = 'callcenter_config queue list tiers '.$queue_uuid;
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
$result = str_to_named_array($event_socket_str, '|');
@@ -126,7 +143,7 @@
//send the event socket command and get the response
//callcenter_config queue list agents [queue_name] [status] |
$switch_cmd = 'callcenter_config queue list agents '.$queue_name;
$switch_cmd = 'callcenter_config queue list agents '.$queue_uuid;
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
$agent_result = str_to_named_array($event_socket_str, '|');
@@ -173,7 +190,7 @@
//get the agent name
$agent_name = '';
if (is_array($_SESSION['agents'])) foreach ($_SESSION['agents'] as $agent) {
if ($agent['call_center_agent_uuid'] = $agent_uuid) {
if ($agent['call_center_agent_uuid'] == $agent_uuid) {
$agent_name = $agent['agent_name'];
}
}
@@ -269,7 +286,7 @@
//get the queue list
//send the event socket command and get the response
//callcenter_config queue list members [queue_name]
$switch_cmd = 'callcenter_config queue list members '.$queue_name;
$switch_cmd = 'callcenter_config queue list members '.$queue_uuid;
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
$result = str_to_named_array($event_socket_str, '|');
if (!is_array($result)) { unset($result); }
@@ -281,7 +298,7 @@
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($_GET['name'])."</b><br />\n";
echo " <td align='left'><b>".$text['label-queue'].": ".ucfirst($queue_name)."</b><br />\n";
echo " ".$text['description-queue']."<br />\n";
echo " </td>\n";
echo " <td align='right' valign='top'>";
@@ -340,7 +357,7 @@
//get the serving agent name
$serving_agent_name = '';
if (is_array($_SESSION['agents'])) foreach ($_SESSION['agents'] as $agent) {
if ($agent['call_center_agent_uuid'] = $serving_agent) {
if ($agent['call_center_agent_uuid'] == $serving_agent) {
$serving_agent_name = $agent['agent_name'];
}
}
+1 -1
View File
@@ -1421,7 +1421,7 @@ $text['label-exit_keys']['ru-ru'] = "";
$text['label-exit_keys']['sv-se'] = "Knapp för att lämna";
$text['label-exit_keys']['uk-ua'] = "";
$text['description-exit_keys']['en-us'] = "Keys to quite the current queue waiting.";
$text['description-exit_keys']['en-us'] = "Keys to quit the current queue waiting.";
$text['description-exit_keys']['ar-eg'] = "";
$text['description-exit_keys']['de-at'] = "Tasten um die aktuelle Warteschlange zu verlassen."; //copied from de-de
$text['description-exit_keys']['de-ch'] = "Tasten um die aktuelle Warteschlange zu verlassen."; //copied from de-de
+5 -15
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2018
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -43,29 +43,19 @@
$text = $language->get();
//get the primary key
if (count($_GET)>0) {
if (isset($_GET["id"]) && is_uuid($_GET["id"])) {
$id = check_str($_GET["id"]);
}
//get the agent details
$sql = "select * from v_call_center_agents ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and call_center_agent_uuid = '$id' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$agent_name = $row["agent_name"];
break; //limit to 1 row
else {
exit;
}
unset ($prep_statement);
//delete the agent from the freeswitch
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//delete the agent over event socket
if ($fp) {
$cmd = "api callcenter_config agent del ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name'];
$cmd = "api callcenter_config agent del ".$id;
$response = event_socket_request($fp, $cmd);
}
+15 -13
View File
@@ -111,7 +111,7 @@
$msg = '';
//if (strlen($call_center_agent_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
//if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
if (strlen($agent_name) == 0) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
if (strlen($agent_type) == 0) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
if (strlen($agent_call_timeout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
@@ -175,32 +175,32 @@
//add the agent using event socket
if ($fp) {
//add the agent
$cmd = "api callcenter_config agent add ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_type;
$cmd = "api callcenter_config agent add ".$call_center_agent_uuid." ".$agent_type;
$response = event_socket_request($fp, $cmd);
usleep(200);
//agent set contact
$cmd = "api callcenter_config agent set contact ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_contact;
$cmd = "api callcenter_config agent set contact ".$call_center_agent_uuid." ".$agent_contact;
$response = event_socket_request($fp, $cmd);
usleep(200);
//agent set status
$cmd = "api callcenter_config agent set status ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." '".$agent_status."'";
$cmd = "api callcenter_config agent set status ".$call_center_agent_uuid." '".$agent_status."'";
$response = event_socket_request($fp, $cmd);
usleep(200);
//agent set reject_delay_time
$cmd = "api callcenter_config agent set reject_delay_time ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_reject_delay_time;
$cmd = "api callcenter_config agent set reject_delay_time ".$call_center_agent_uuid." ".$agent_reject_delay_time;
$response = event_socket_request($fp, $cmd);
usleep(200);
//agent set busy_delay_time
$cmd = "api callcenter_config agent set busy_delay_time ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_busy_delay_time;
$cmd = "api callcenter_config agent set busy_delay_time ".$call_center_agent_uuid." ".$agent_busy_delay_time;
$response = event_socket_request($fp, $cmd);
//agent set no_answer_delay_time
$cmd = "api callcenter_config agent set no_answer_delay_time ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_no_answer_delay_time;
$cmd = "api callcenter_config agent set no_answer_delay_time ".$call_center_agent_uuid." ".$agent_no_answer_delay_time;
$response = event_socket_request($fp, $cmd);
//agent set max_no_answer
$cmd = "api callcenter_config agent set max_no_answer ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_max_no_answer;
$cmd = "api callcenter_config agent set max_no_answer ".$call_center_agent_uuid." ".$agent_max_no_answer;
$response = event_socket_request($fp, $cmd);
//agent set wrap_up_time
$cmd = "api callcenter_config agent set wrap_up_time ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_wrap_up_time;
$cmd = "api callcenter_config agent set wrap_up_time ".$call_center_agent_uuid." ".$agent_wrap_up_time;
$response = event_socket_request($fp, $cmd);
}
@@ -224,9 +224,11 @@
//prepare the array
$array['call_center_agents'][] = $_POST;
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['users'][0]['user_uuid'] = $user_uuid;
$array['users'][0]['user_status'] = $agent_status;
if (isset($user_uuid) && strlen($user_uuid) > 0) {
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['users'][0]['user_uuid'] = $user_uuid;
$array['users'][0]['user_status'] = $agent_status;
}
//save to the data
$database = new database;
@@ -412,7 +414,7 @@
echo "</tr>\n";
echo " <tr>";
echo " <td class='vncellreq' valign='top'>".$text['label-username']."</td>";
echo " <td class='vncell' valign='top'>".$text['label-username']."</td>";
echo " <td class='vtable' align='left'>";
echo " <select name=\"user_uuid\" class='formfld' style='width: auto;'>\n";
echo " <option value=\"\"></option>\n";
+53 -55
View File
@@ -219,8 +219,9 @@
//get the application and data
$action_array = explode(":",$queue_timeout_action);
$queue_timeout_application = $action_array[0];
$queue_timeout_data = substr($queue_timeout_action, strlen($action_array[0])+1, strlen($queue_timeout_application));
$queue_timeout_app = $action_array[0];
unset($action_array[0]);
$queue_timeout_data = implode($action_array);
//build the xml dialplan
$dialplan_xml = "<extension name=\"".$queue_name."\" continue=\"\" uuid=\"".$dialplan_uuid."\">\n";
@@ -237,7 +238,7 @@
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".$queue_cc_exit_keys."\"/>\n";
}
$dialplan_xml .= " <action application=\"callcenter\" data=\"".$call_center_queue_uuid."\"/>\n";
$dialplan_xml .= " <action application=\"".$queue_timeout_application."\" data=\"".$queue_timeout_data."\"/>\n";
$dialplan_xml .= " <action application=\"".$queue_timeout_app."\" data=\"".$queue_timeout_data."\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
@@ -462,7 +463,7 @@
if ($action == "update") {
echo " &nbsp;&nbsp;&nbsp;";
if (permission_exists('call_center_wallboard')) {
echo " <input type='button' class='btn' value='".$text['button-wallboard']."' onclick=\"document.location.href='call_center_wallboard.php?queue_name=".$database_queue_name."';\" />\n";
echo " <input type='button' class='btn' value='".$text['button-wallboard']."' onclick=\"document.location.href='call_center_wallboard.php?queue_name=".$call_center_queue_uuid."';\" />\n";
}
echo " <input type='button' class='btn' value='".$text['button-stop']."' onclick=\"document.location.href='cmd.php?cmd=api+callcenter_config+queue+unload+".$call_center_queue_uuid."';\" />\n";
echo " <input type='button' class='btn' value='".$text['button-start']."' onclick=\"document.location.href='cmd.php?cmd=api+callcenter_config+queue+load+".$call_center_queue_uuid."';\" />\n";
@@ -566,7 +567,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('call_center_tier_view')) {
if (permission_exists('call_center_tier_view') && is_array($agents) && count($agents) > 0) {
echo "<tr>";
echo " <td class='vncell' valign='top'>".$text['label-agents']."</td>";
echo " <td class='vtable' align='left'>";
@@ -577,58 +578,55 @@
echo " <td class='vtable' style='text-align: center;'>".$text['label-tier_position']."</td>\n";
echo " <td></td>\n";
echo " </tr>\n";
if ($call_center_queue_uuid != null) {
if (is_array($tiers)) {
$x = 0;
foreach($tiers as $field) {
echo " <tr>\n";
echo " <td class=''>";
echo " <input type=\"hidden\" name=\"call_center_tiers[$x][call_center_queue_uuid]\" value=\"".$field['call_center_queue_uuid']."\">\n";
echo " <input type=\"hidden\" name=\"call_center_tiers[$x][call_center_tier_uuid]\" value=\"".$field['call_center_tier_uuid']."\">\n";
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\">\n";
echo " <option value=\"\"></option>\n";
foreach($agents as $row) {
$selected = '';
if ($row['call_center_agent_uuid'] == $field['call_center_agent_uuid']) {
$selected = "selected=\"selected\"";
}
echo " <option value=\"".$row['call_center_agent_uuid']."\" $selected>".$row['agent_name']."</option>\n";
}
echo " </select>";
echo " </td>\n";
echo " <td class='' style='text-align: center;'>";
echo " <select name=\"call_center_tiers[$x][tier_level]\" class=\"formfld\">\n";
$i=0;
while($i<=9) {
$selected = ($i == $field['tier_level']) ? "selected" : null;
echo " <option value=\"$i\" ".$selected.">$i</option>\n";
$i++;
}
echo " </select>\n";
echo " </td>\n";
echo " <td class='' style='text-align: center;'>\n";
echo " <select name=\"call_center_tiers[$x][tier_position]\" class=\"formfld\">\n";
$i=0;
while($i<=9) {
$selected = ($i == $field['tier_position']) ? "selected" : null;
echo " <option value=\"$i\" ".$selected.">$i</option>\n";
$i++;
}
echo " </select>\n";
echo " </td>\n";
echo " <td class=''>";
if (permission_exists('call_center_tier_delete')) {
echo " <a href=\"call_center_queue_edit.php?id=".$call_center_queue_uuid."&call_center_tier_uuid=".$field['call_center_tier_uuid']."&a=delete\" alt=\"".$text['button-delete']."\" onclick=\"return confirm('".$text['confirm-delete']."');\">$v_link_label_delete</a>";
}
echo " </td>\n";
echo " </tr>\n";
$assigned_agents[] = $field['agent_name'];
$x++;
}
unset ($prep_statement, $sql, $tiers);
$x = 0;
foreach($tiers as $field) {
echo " <tr>\n";
echo " <td class=''>";
if (strlen($field['call_center_tier_uuid']) > 0) {
echo " <input name='call_center_tiers[".$x."][call_center_tier_uuid]' type='hidden' value=\"".$field['call_center_tier_uuid']."\">\n";
}
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\">\n";
echo " <option value=\"\"></option>\n";
foreach($agents as $row) {
$selected = '';
if ($row['call_center_agent_uuid'] == $field['call_center_agent_uuid']) {
$selected = "selected=\"selected\"";
}
echo " <option value=\"".$row['call_center_agent_uuid']."\" $selected>".$row['agent_name']."</option>\n";
}
echo " </select>";
echo " </td>\n";
echo " <td class='' style='text-align: center;'>";
echo " <select name=\"call_center_tiers[$x][tier_level]\" class=\"formfld\">\n";
$i=0;
while($i<=9) {
$selected = ($i == $field['tier_level']) ? "selected" : null;
echo " <option value=\"$i\" ".$selected.">$i</option>\n";
$i++;
}
echo " </select>\n";
echo " </td>\n";
echo " <td class='' style='text-align: center;'>\n";
echo " <select name=\"call_center_tiers[$x][tier_position]\" class=\"formfld\">\n";
$i=0;
while($i<=9) {
$selected = ($i == $field['tier_position']) ? "selected" : null;
echo " <option value=\"$i\" ".$selected.">$i</option>\n";
$i++;
}
echo " </select>\n";
echo " </td>\n";
echo " <td class=''>";
if (permission_exists('call_center_tier_delete')) {
echo " <a href=\"call_center_queue_edit.php?id=".$call_center_queue_uuid."&call_center_tier_uuid=".$field['call_center_tier_uuid']."&a=delete\" alt=\"".$text['button-delete']."\" onclick=\"return confirm('".$text['confirm-delete']."');\">$v_link_label_delete</a>";
}
echo " </td>\n";
echo " </tr>\n";
$assigned_agents[] = $field['agent_name'];
$x++;
}
unset ($prep_statement, $sql, $tiers);
echo " </table>\n";
echo " <br>\n";
echo " ".$text['description-tiers']."\n";
+1 -3
View File
@@ -108,8 +108,6 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_room_record";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "user";
$y++;
$apps[$x]['permissions'][$y]['name'] = "conference_room_max_members";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
@@ -432,4 +430,4 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "end_epoch";
?>
?>
+26 -2
View File
@@ -108,7 +108,7 @@
$destination_number_regex = string_to_regex($destination_number);
$_POST["destination_number_regex"] = $destination_number_regex;
//get the destination app and data
$destination_array = explode(":", $_POST["destination_action"]);
$destination_array = explode(":", $_POST["destination_action"], 2);
$destination_app = $destination_array[0];
$destination_data = $destination_array[1];
unset($_POST["destination_action"]);
@@ -244,10 +244,12 @@
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"call_direction=inbound\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_uuid=".$_SESSION['domain_uuid']."\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_name=".$_SESSION['domain_name']."\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"hangup_after_bridge=true\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"continue_on_fail=true\" inline=\"true\"/>\n";
if (strlen($destination_cid_name_prefix) > 0) {
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"effective_caller_id_name=".$destination_cid_name_prefix."#\${caller_id_name}\" inline=\"true\"/>\n";
}
if (strlen($destination_record) > 0) {
if (strlen($destination_record) > 0 && $destination_record == 'true') {
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_path=\${recordings_dir}/\${domain_name}/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_name=\${uuid}.\${record_ext}\" inline=\"true\"/>\n";
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"record_append=true\" inline=\"true\"/>\n";
@@ -304,6 +306,28 @@
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
$y++;
//add hangup_after_bridge
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "hangup_after_bridge=true";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
$y++;
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
//add continue_on_fail
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "continue_on_fail=true";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
$y++;
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
+1 -1
View File
@@ -751,7 +751,7 @@ include "root.php";
elseif ($dialplan_detail_type == "week") {
$condition_type = 'time';
}
elseif ($ialplan_detail_type == "date-time") {
elseif ($dialplan_detail_type == "date-time") {
$condition_type = 'time';
}
else {
@@ -1,8 +1,6 @@
<context name="{v_context}">
<extension name="voicemail" number="[ext]" continue="false" app_uuid="e3c14f2f-7697-4b5d-9c62-2443c0e22bf2">
<condition field="${user_exists}" expression="true">
<action application="answer"/>
<action application="sleep" data="1000"/>
<!--<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>-->
<action application="set" data="voicemail_action=save"/>
<action application="set" data="voicemail_id=${destination_number}"/>
+3 -1
View File
@@ -160,7 +160,9 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_copy";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//default settings
$y=0;
+1 -1
View File
@@ -31,7 +31,7 @@
require_once "resources/paging.php";
//check permissions
if (permission_exists('extension_add')) {
if (permission_exists('extension_copy')) {
//access granted
}
else {
+3 -10
View File
@@ -100,7 +100,6 @@
$voicemail_mail_to = $_POST["voicemail_mail_to"];
$voicemail_file = $_POST["voicemail_file"];
$voicemail_local_after_email = $_POST["voicemail_local_after_email"];
$voicemail_description = $_POST["voicemail_description"];
$user_context = $_POST["user_context"];
$range = $_POST["range"];
$autogen_users = $_POST["autogen_users"];
@@ -409,10 +408,7 @@
$array["voicemails"][$i]["voicemail_local_after_email"] = $voicemail_local_after_email;
}
$array["voicemails"][$i]["voicemail_enabled"] = $voicemail_enabled;
if ( empty($voicemail_description)){
$voicemail_description = $description;
}
$array["voicemails"][$i]["voicemail_description"] = $voicemail_description;
$array["voicemails"][$i]["voicemail_description"] = $description;
$array["voicemails"][$i]["voicemail_tutorial"] = $voicemail_tutorial;
}
}
@@ -434,7 +430,7 @@
unset($mwi_account_array);
}
}
}
}
//update devices having extension assigned to line(s) with new password
if ($action == "update" && $range == 1 && permission_exists('extension_password')) {
@@ -443,7 +439,6 @@
$sql .= "where domain_uuid = '".check_str($_SESSION['domain_uuid'])."' ";
$sql .= "and server_address = '".check_str($_SESSION['domain_name'])."' ";
$sql .= "and user_id = '".check_str($extension)."' ";
$sql .= "and password = '".check_str($extension)."' ";
$db->exec(check_sql($sql));
unset($sql);
}
@@ -665,7 +660,6 @@
$voicemail_file = $row["voicemail_file"];
$voicemail_local_after_email = $row["voicemail_local_after_email"];
$voicemail_enabled = $row["voicemail_enabled"];
$voicemail_description = $row["voicemail_description"];
$voicemail_tutorial = $row["voicemail_tutorial"];
}
unset ($prep_statement);
@@ -804,7 +798,7 @@
if ($action == 'update' && (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb'))) {
echo " <input type='button' class='btn' alt='".$text['button-call_routing']."' onclick=\"window.location='../calls/call_edit.php?id=".$extension_uuid."';\" value='".$text['button-call_routing']."'>\n";
}
if ($action == "update") {
if ($action == "update" && permission_exists('extension_copy')) {
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick=\"copy_extension();\" value='".$text['button-copy']."'>\n";
}
echo " <input type='button' class='btn' value='".$text['button-save']."' onclick='submit_form();'>\n";
@@ -1321,7 +1315,6 @@
if (permission_exists('voicemail_edit') && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "<input type='hidden' name='voicemail_description' value='".$voicemail_description."'>\n";
echo " ".$text['label-voicemail_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
+1
View File
@@ -742,6 +742,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
foreach ($fax_numbers as $fax_number) {
$fax_number = trim($fax_number);
fax_split_dtmf($fax_number, $fax_dtmf);
//prepare the fax command
+1 -5
View File
@@ -169,11 +169,7 @@
require_once "resources/footer.php";
return;
}
//remove the invalid characters from the gateway name
$gateway = str_replace(" ", "_", $gateway);
$gateway = str_replace("/", "", $gateway);
//add or update the database
if ($_POST["persistformvar"] != "true") {
+17 -1
View File
@@ -280,7 +280,7 @@
$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+|*++}";
$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++;
@@ -388,4 +388,20 @@
$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'] = "5da62e0c-5eb0-11e8-9c2d-fa7ae01bbebc";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_city_code";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Boise,ID";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enter City to configure City for the Weather app on the Phone";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "52b6e1e2-5ed5-11e8-9c2d-fa7ae01bbebc";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_temp_unit";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "f";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "c - Celsius f - Farenheit / If disabled will be set to auto";
$y++;
?>
+20 -5
View File
@@ -57,14 +57,29 @@
//if call center app is installed then update the user_status
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/call_centers')) {
//get the call center agent uuid
$sql = "select call_center_agent_uuid from v_call_center_agents ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and user_uuid = '".$_SESSION['user']['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
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$switch_cmd .= "callcenter_config agent set status ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." '".$user_status."'";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
if (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
$cmd = "api callcenter_config agent set state ".$_SESSION['user']['username']."@".$_SESSION['domain_name']." Waiting";
$response = event_socket_request($fp, $cmd);
if (isset($call_center_agent_uuid)) {
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting";
$response = event_socket_request($fp, $cmd);
}
}
//stop execution
+1 -1
View File
@@ -201,7 +201,7 @@ $text['label-features']['ru-ru'] = "";
$text['label-features']['sv-se'] = "";
$text['label-features']['uk-ua'] = "";
$text['label-region_skyetel']['en-us'] = "Providing service to the United States.";
$text['label-region_skyetel']['en-us'] = "Providing service to the United States and Canada.";
$text['label-region_skyetel']['ar-eg'] = "";
$text['label-region_skyetel']['de-at'] = "";
$text['label-region_skyetel']['de-ch'] = "";
+2 -2
View File
@@ -178,7 +178,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'] = "12";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "11";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
@@ -210,7 +210,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'] = "5";
$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'] = "";
$y++;
+5
View File
@@ -96,6 +96,11 @@
$mac = substr($_SERVER['HTTP_USER_AGENT'],-12);
}
}
//HTek: $_SERVER['HTTP_USER_AGENT'] = "Htek UC926 2.0.4.2 00:1f:c1:00:00:00"
if (substr($_SERVER['HTTP_USER_AGENT'],0,4) == "Htek") {
$mac = substr($_SERVER['HTTP_USER_AGENT'],-17);
$mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac);
}
//Panasonic: $_SERVER['HTTP_USER_AGENT'] = "Panasonic_KX-UT670/01.022 (0080f000000)"
if (substr($_SERVER['HTTP_USER_AGENT'],0,9) == "Panasonic") {
$mac = substr($_SERVER['HTTP_USER_AGENT'],-14);
+2 -2
View File
@@ -253,8 +253,8 @@ if (!class_exists('scripts')) {
}
elseif ($this->db_type == "pgsql") {
if ($this->db_host == "localhost") { $this->db_host = "127.0.0.1"; }
$tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options='' application_name='".$this->db_name."'\";\n";
$tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options='' application_name='freeswitch'\";\n";
$tmp .= " database.system = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=".$this->db_name." user=".$this->db_username." password=".$this->db_password." options=''\";\n";
$tmp .= " database.switch = \"pgsql://hostaddr=".$this->db_host." port=".$this->db_port." dbname=freeswitch user=".$this->db_username." password=".$this->db_password." options=''\";\n";
}
elseif ($this->db_type == "sqlite") {
$tmp .= " database.system = \"sqlite://".$this->db_path."/".$this->db_name."\";\n";
+42
View File
@@ -0,0 +1,42 @@
<?php
//application details
$apps[$x]['name'] = "Snom";
$apps[$x]['uuid'] = "91d9c209-1eca-46ca-8441-2a6bba386f53";
$apps[$x]['category'] = "Vendor";
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['license'] = "";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "";
$apps[$x]['description']['ar-eg'] = "";
$apps[$x]['description']['de-at'] = "";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-de'] = "";
$apps[$x]['description']['es-cl'] = "";
$apps[$x]['description']['es-mx'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-fr'] = "";
$apps[$x]['description']['he-il'] = "";
$apps[$x]['description']['it-it'] = "";
$apps[$x]['description']['nl-nl'] = "";
$apps[$x]['description']['pl-pl'] = "";
$apps[$x]['description']['pt-br'] = "";
$apps[$x]['description']['pt-pt'] = "";
$apps[$x]['description']['ro-ro'] = "";
$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'] = "13d07ee4-e887-4993-94ba-e0f9ce044eaf";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "snom_time_zone";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "USA-7";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "http://wiki.snom.com/Settings/timezone";
$y++;
?>
+9 -1
View File
@@ -198,7 +198,15 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "time_conditions";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "preset_usa";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"thanksgiving_day":{"wday":"5-6","mon":"11","mday":"22-28"}}';
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"thanksgiving_day":{"wday":"5","mon":"11","mday":"22-28"}}';
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "USA Holiday";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2fcab411-971d-466c-bf6d-42f6bcd32ad2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "time_conditions";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "preset_usa";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "array";
$apps[$x]['default_settings'][$y]['default_setting_value'] = '{"black_friday":{"wday":"6","mon":"11","mday":"23-29"}}';
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "USA Holiday";
$y++;
+4 -4
View File
@@ -3,7 +3,7 @@
//application details
$apps[$x]['name'] = "Tones";
$apps[$x]['uuid'] = "38ab9f01-bcd2-4726-a9ff-9af8ed9e396a";
$apps[$x]['category'] = "Switch";;
$apps[$x]['category'] = "Switch";
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['license'] = "Mozilla Public License 1.1";
@@ -34,14 +34,14 @@
$apps[$x]['destinations'][$y]['label'] = "tones";
$apps[$x]['destinations'][$y]['name'] = "tones";
$apps[$x]['destinations'][$y]['sql'] = "select var_uuid as uuid, var_name as name, var_value as destination, var_description as description from v_vars";
$apps[$x]['destinations'][$y]['where'] = "where var_category = 'Ringtones' ";
$apps[$x]['destinations'][$y]['where'] = "where var_category = 'Tones' ";
$apps[$x]['destinations'][$y]['order_by'] = "var_name asc";
$apps[$x]['destinations'][$y]['field']['uuid'] = "var_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "var_name";
$apps[$x]['destinations'][$y]['field']['destination'] = "var_filename";
$apps[$x]['destinations'][$y]['field']['description'] = "var_description";
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "play tone_stream://\${destination}";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "play tone_stream://\${destination}";
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "playback:tone_stream://\${destination}";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:playback tone_stream://\${destination}";
$apps[$x]['destinations'][$y]['select_label'] = "\${name}";
?>
+44
View File
@@ -0,0 +1,44 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
if ($domains_processed == 1) {
//Change ringtones to tones
$sql = "select * from v_vars ";
$sql .= "where var_category = 'Tones' and var_name like '%-ring%'; ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$ringtones = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (is_array($ringtones)) {
$sql = "update v_vars set var_category = 'Ringtones' ";
$sql .= "where var_category = 'Tones' and var_name like '%-ring%'; ";
$db->exec(check_sql($sql));
unset($sql);
}
}
?>
+8 -1
View File
@@ -28,7 +28,6 @@
$apps[$x]['description']['sv-se'] = "";
$apps[$x]['description']['uk-ua'] = "";
//destination details
$y=0;
$apps[$x]['destinations'][$y]['type'] = "sql";
@@ -217,6 +216,14 @@
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "77620475-258a-4988-bec5-f74f2603666e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "voicemail";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "not_found_message";
$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'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
//schema details
$y=0;
+3 -3
View File
@@ -82,10 +82,10 @@
//delete the voicemail from the destionations
$sqld = "
delete from
v_voicemail_destinations as d
v_voicemail_destinations
where
d.voicemail_destination_uuid = '".$voicemail_destination_uuid."' and
d.voicemail_uuid = '".$voicemail_uuid."'";
voicemail_destination_uuid = '".$voicemail_destination_uuid."' and
voicemail_uuid = '".$voicemail_uuid."'";
$db->exec(check_sql($sqld));
//redirect the browser
messages::add($text['message-delete']);
+16 -12
View File
@@ -17,22 +17,26 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2018
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('voicemail_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('voicemail_option_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
@@ -57,4 +61,4 @@ else {
messages::add($text['message-delete']);
header('Location: voicemail_edit.php?id='.$voicemail_uuid);
?>
?>
+22 -62
View File
@@ -1681,46 +1681,6 @@ $text['label-context']['ru-ru'] = "Контекст";
$text['label-context']['sv-se'] = "Context";
$text['label-context']['uk-ua'] = "Контекст";
$text['label-cid-number']['en-us'] = "CID Number";
$text['label-cid-number']['ar-eg'] = "";
$text['label-cid-number']['de-at'] = "Anrufer Nummer"; //copied from de-de
$text['label-cid-number']['de-ch'] = "Anrufer Nummer"; //copied from de-de
$text['label-cid-number']['de-de'] = "Anrufer Nummer";
$text['label-cid-number']['es-cl'] = "Número CID";
$text['label-cid-number']['es-mx'] = "Número CID"; //copied from es-cl
$text['label-cid-number']['fr-ca'] = "Nombre de l'Appelant"; //copied from fr-fr
$text['label-cid-number']['fr-fr'] = "Nombre de l'Appelant";
$text['label-cid-number']['he-il'] = "";
$text['label-cid-number']['it-it'] = "Numero CID";
$text['label-cid-number']['nl-nl'] = "";
$text['label-cid-number']['pl-pl'] = "Prezentacja numeru dzwoniącego";
$text['label-cid-number']['pt-br'] = "Número CID"; //copied from pt-pt
$text['label-cid-number']['pt-pt'] = "Número CID";
$text['label-cid-number']['ro-ro'] = "";
$text['label-cid-number']['ru-ru'] = "CID номера";
$text['label-cid-number']['sv-se'] = "CID, Nummer";
$text['label-cid-number']['uk-ua'] = "CID Номер";
$text['label-cid-name']['en-us'] = "CID Name";
$text['label-cid-name']['ar-eg'] = "";
$text['label-cid-name']['de-at'] = "Anrufer Name"; //copied from de-de
$text['label-cid-name']['de-ch'] = "Anrufer Name"; //copied from de-de
$text['label-cid-name']['de-de'] = "Anrufer Name";
$text['label-cid-name']['es-cl'] = "Nombre CID";
$text['label-cid-name']['es-mx'] = "Nombre CID"; //copied from es-cl
$text['label-cid-name']['fr-ca'] = "Nom de l'Appelant"; //copied from fr-fr
$text['label-cid-name']['fr-fr'] = "Nom de l'Appelant";
$text['label-cid-name']['he-il'] = "";
$text['label-cid-name']['it-it'] = "Nome CID";
$text['label-cid-name']['nl-nl'] = "";
$text['label-cid-name']['pl-pl'] = "Prezentacja nazwy dzwoniącego";
$text['label-cid-name']['pt-br'] = "Nome CID"; //copied from pt-pt
$text['label-cid-name']['pt-pt'] = "Nome CID";
$text['label-cid-name']['ro-ro'] = "";
$text['label-cid-name']['ru-ru'] = "CID Имя";
$text['label-cid-name']['sv-se'] = "CID Namn";
$text['label-cid-name']['uk-ua'] = "CID Ім’я";
$text['label-channel']['en-us'] = "Channel Data";
$text['label-channel']['ar-eg'] = "";
$text['label-channel']['de-at'] = "Kanal Daten"; //copied from de-de
@@ -1761,27 +1721,7 @@ $text['label-cancelled']['ru-ru'] = "Отменено";
$text['label-cancelled']['sv-se'] = "Avbröts";
$text['label-cancelled']['uk-ua'] = "скасовано";
$text['label-caller_id_number']['en-us'] = "CID Number";
$text['label-caller_id_number']['ar-eg'] = "";
$text['label-caller_id_number']['de-at'] = "Anrufer Nummer"; //copied from de-de
$text['label-caller_id_number']['de-ch'] = "Anrufer Nummer"; //copied from de-de
$text['label-caller_id_number']['de-de'] = "Anrufer Nummer";
$text['label-caller_id_number']['es-cl'] = "Número CID";
$text['label-caller_id_number']['es-mx'] = "Número CID"; //copied from es-cl
$text['label-caller_id_number']['fr-ca'] = "Numéro de l'Appelant"; //copied from fr-fr
$text['label-caller_id_number']['fr-fr'] = "Numéro de l'Appelant";
$text['label-caller_id_number']['he-il'] = "";
$text['label-caller_id_number']['it-it'] = "Numero CID";
$text['label-caller_id_number']['nl-nl'] = "";
$text['label-caller_id_number']['pl-pl'] = "Prezentacja numeru dzwoniącego";
$text['label-caller_id_number']['pt-br'] = "Número CID"; //copied from pt-pt
$text['label-caller_id_number']['pt-pt'] = "Número CID";
$text['label-caller_id_number']['ro-ro'] = "";
$text['label-caller_id_number']['ru-ru'] = "CID Номер";
$text['label-caller_id_number']['sv-se'] = "CID Nummer";
$text['label-caller_id_number']['uk-ua'] = "Caller ID Номер";
$text['label-caller_id_name']['en-us'] = "CID Name";
$text['label-caller_id_name']['en-us'] = "Caller Name";
$text['label-caller_id_name']['ar-eg'] = "";
$text['label-caller_id_name']['de-at'] = "Anrufer Name"; //copied from de-de
$text['label-caller_id_name']['de-ch'] = "Anrufer Name"; //copied from de-de
@@ -1799,7 +1739,27 @@ $text['label-caller_id_name']['pt-pt'] = "Nome CID";
$text['label-caller_id_name']['ro-ro'] = "";
$text['label-caller_id_name']['ru-ru'] = "CID Имя";
$text['label-caller_id_name']['sv-se'] = "CID Namn";
$text['label-caller_id_name']['uk-ua'] = "Caller ID Ім’я";
$text['label-caller_id_name']['uk-ua'] = "CID Ім’я";
$text['label-caller_id_number']['en-us'] = "Caller Number";
$text['label-caller_id_number']['ar-eg'] = "";
$text['label-caller_id_number']['de-at'] = "Anrufer Nummer"; //copied from de-de
$text['label-caller_id_number']['de-ch'] = "Anrufer Nummer"; //copied from de-de
$text['label-caller_id_number']['de-de'] = "Anrufer Nummer";
$text['label-caller_id_number']['es-cl'] = "Número CID";
$text['label-caller_id_number']['es-mx'] = "Número CID"; //copied from es-cl
$text['label-caller_id_number']['fr-ca'] = "Nombre de l'Appelant"; //copied from fr-fr
$text['label-caller_id_number']['fr-fr'] = "Nombre de l'Appelant";
$text['label-caller_id_number']['he-il'] = "";
$text['label-caller_id_number']['it-it'] = "Numero CID";
$text['label-caller_id_number']['nl-nl'] = "";
$text['label-caller_id_number']['pl-pl'] = "Prezentacja numeru dzwoniącego";
$text['label-caller_id_number']['pt-br'] = "Número CID"; //copied from pt-pt
$text['label-caller_id_number']['pt-pt'] = "Número CID";
$text['label-caller_id_number']['ro-ro'] = "";
$text['label-caller_id_number']['ru-ru'] = "CID номера";
$text['label-caller_id_number']['sv-se'] = "CID, Nummer";
$text['label-caller_id_number']['uk-ua'] = "CID Номер";
$text['label-caller_destination']['en-us'] = "Caller Destination";
$text['label-caller_destination']['ar-eg'] = "";
+58 -20
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2017
Portions created by the Initial Developer are Copyright (C) 2008-2018
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -114,6 +114,12 @@
xml_cdr_log("\nfail loadxml: " . $e->getMessage() . "\n");
}
//convert the xml object to json
$json = check_str(json_encode($xml));
//convert json to an array
$array = json_decode($json, true);
//filter out b-legs
if($leg == 'b'){
if(!accept_b_leg($xml)){
@@ -215,10 +221,10 @@
$database->fields['pdd_ms'] = check_str(urldecode($xml->variables->progress_mediamsec) + urldecode($xml->variables->progressmsec));
//get break down the date to year, month and day
$tmp_time = strtotime($start_stamp);
$tmp_year = date("Y", $tmp_time);
$tmp_month = date("M", $tmp_time);
$tmp_day = date("d", $tmp_time);
$start_time = strtotime($start_stamp);
$start_year = date("Y", $start_time);
$start_month = date("M", $start_time);
$start_day = date("d", $start_time);
//get the domain values from the xml
$domain_name = check_str(urldecode($xml->variables->domain_name));
@@ -254,19 +260,30 @@
$database->fields['domain_name'] = $domain_name;
}
//save to the database in json format
if ($_SESSION['cdr']['format']['text'] == "json" && $_SESSION['cdr']['storage']['text'] == "db") {
$database->fields['json'] = $json;
}
//dynamic cdr fields
if (is_array($_SESSION['cdr']['field'])) {
foreach ($_SESSION['cdr']['field'] as $field) {
$fields = explode(",", $field);
$field_name = end($fields);
if (count($fields) == 1) {
$database->fields[$field_name] = urldecode($xml->variables->$fields[0]);
$database->fields[$field_name] = urldecode($array['variables'][$fields[0]]);
}
if (count($fields) == 2) {
$database->fields[$field_name] = urldecode($xml->$fields[0]->$fields[1]);
$database->fields[$field_name] = urldecode($array[$fields[0]][$fields[1]]);
}
if (count($fields) == 3) {
$database->fields[$field_name] = urldecode($xml->$fields[0]->$fields[1]->$fields[2]);
$database->fields[$field_name] = urldecode($array[$fields[0]][0][$fields[1]][$fields[2]]);
}
if (count($fields) == 4) {
$database->fields[$field_name] = urldecode($array[$fields[0]][$fields[1]][$fields[2]][$fields[3]]);
}
if (count($fields) == 5) {
$database->fields[$field_name] = urldecode($array[$fields[0]][$fields[1]][$fields[2]][$fields[3]][$fields[4]]);
}
}
}
@@ -276,11 +293,6 @@
$database->fields['xml'] = check_str($xml_string);
}
//save to the database in json format
if ($_SESSION['cdr']['format']['text'] == "json" && $_SESSION['cdr']['storage']['text'] == "db") {
$database->fields['json'] = check_str(json_encode($xml));
}
//insert the check_str($extension_uuid)
if (strlen($xml->variables->extension_uuid) > 0) {
$database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid));
@@ -292,6 +304,11 @@
$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") {
$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);
@@ -334,6 +351,31 @@
}
}
}
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($record_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($record_path.'/'.$uuid.'.mp3')) {
$record_path = $path;
$record_name = $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) {
@@ -351,8 +393,8 @@
$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_direction'] = urldecode($xml->variables->call_direction);
//$array['call_recordings'][$x]['call_recording_description']= $row['zzz'];
//$array['call_recordings'][$x]['call_recording_base64']= $row['zzz'];
//$recordings['call_recordings'][$x]['call_recording_description']= $row['zzz'];
//$recordings['call_recordings'][$x]['call_recording_base64']= $row['zzz'];
//add the temporary permission
$p = new permissions;
@@ -585,11 +627,7 @@
if ($_SESSION['cdr']['storage']['text'] == "dir" && $error != "true") {
if (strlen($uuid) > 0) {
$tmp_time = strtotime($start_stamp);
$tmp_year = date("Y", $tmp_time);
$tmp_month = date("M", $tmp_time);
$tmp_day = date("d", $tmp_time);
$tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
$tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if(!file_exists($tmp_dir)) {
event_socket_mkdir($tmp_dir);
}
+4 -4
View File
@@ -225,7 +225,7 @@
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td class='vncell' valign='top' nowrap='nowrap'>\n";
echo " ".$text['label-source']."\n";
echo " ".$text['label-caller_id_number']."\n";
echo " </td>\n";
echo " <td class='vtable' align='left' style='white-space: nowrap;'>\n";
echo " <input type='text' class='formfld' style='".$style['caller_id_number']."' name='caller_id_number' id='caller_id_number' value='".$caller_id_number."'>\n";
@@ -256,7 +256,7 @@
echo " </tr>\n";
echo " <tr>\n";
echo " <td class='vncell' valign='top' nowrap='nowrap'>\n";
echo " ".$text['label-cid-name']."\n";
echo " ".$text['label-caller_id_name']."\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " <input type='text' class='formfld' name='caller_id_name' value='$caller_id_name'>\n";
@@ -376,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);
}
+1 -1
View File
@@ -49,7 +49,7 @@
//get the cdr string from the database
$sql = "select * from v_xml_cdr ";
if ($_GET['showall'] && permission_exists('xml_cdr_all')) {
if (permission_exists('xml_cdr_all')) {
$sql .= "where uuid = '$uuid' ";
} else {
$sql .= "where uuid = '$uuid' and domain_uuid = '$domain_uuid' ";
+33
View File
@@ -446,4 +446,37 @@
$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";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c7227e2b-870f-4c11-aab8-dfff8d626ded";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_predial_autodial";
$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;";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "627ef79d-1a49-4bae-b215-56182e308351";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ring_type";
$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);";
$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'] = "368d8f25-9faf-417b-a1ac-942ecf8b9793";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_ringtone_delete";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$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";
?>
+2 -2
View File
@@ -23,6 +23,6 @@
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['path'] = "/core/notifications/notification_edit.php";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
//$apps[$x]['menu'][$y]['groups'][] = "superadmin";
?>
?>
+14 -13
View File
@@ -246,21 +246,22 @@
echo "</form>\n";
echo "<br /><br />";
foreach($_SESSION["response"] as $part => $response){
echo "<b>". $text["label-results"]." - ".$text["label-${part}"]."</b>";
echo "<br /><br />";
if (is_array($response)) {
echo "<pre>";
echo implode("\n", $response);
echo "</pre>";
if (is_array($_SESSION["response"])) {
foreach($_SESSION["response"] as $part => $response){
echo "<b>". $text["label-results"]." - ".$text["label-${part}"]."</b>";
echo "<br /><br />";
if (is_array($response)) {
echo "<pre>";
echo implode("\n", $response);
echo "</pre>";
}
else {
echo $response;
}
echo "<br /><br />";
}
else {
echo $response;
}
echo "<br /><br />";
unset($_SESSION["response"]);
}
unset($_SESSION["response"]);
//include the footer
require_once "resources/footer.php";
+9 -9
View File
@@ -62,9 +62,8 @@
$language = new text;
$text = $language->get();
//load header and set the title
//load the header
require_once "resources/header.php";
$document['title'] = $text['title-user_dashboard'];
//start the content
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
@@ -930,7 +929,6 @@
$n++;
}
//system status
if (is_array($selected_blocks) && in_array('system', $selected_blocks)) {
$c = 0;
@@ -941,12 +939,7 @@
//disk usage
if (PHP_OS == 'FreeBSD' || PHP_OS == 'Linux') {
$df = shell_exec("/usr/bin/which df");
if($df){
$tmp = shell_exec($df." /home 2>&1");
} else {
$tmp = shell_exec("df /home 2>&1");
}
$tmp = shell_exec("df /home 2>&1");
$tmp = explode("\n", $tmp);
$tmp = preg_replace('!\s+!', ' ', $tmp[1]); // multiple > single space
$tmp = explode(' ', $tmp);
@@ -1263,6 +1256,13 @@
echo "</div>\n";
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//set the title
$document['title'] = $text['title-user_dashboard'];
//show the footer
require_once "resources/footer.php";
+2 -2
View File
@@ -35,7 +35,7 @@
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Configuration du Compte";
$apps[$x]['menu'][$y]['title']['he-il'] = "הגדרת חשבון";
$apps[$x]['menu'][$y]['title']['it-it'] = "Gestione Gruppi";
$apps[$x]['menu'][$y]['title']['it-it'] = "Impostazioni Utente";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Ustawienia konta";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Configurações da conta";
@@ -52,4 +52,4 @@
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
?>
?>
+23 -61
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2016
Portions created by the Initial Developer are Copyright (C) 2008-2018
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -159,7 +159,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
exit;
}
if (!check_password_strength($password, $text)) {
if (!check_password_strength($password, $text, 'user')) {
if ($action == 'edit') {
header("Location: user_edit.php?id=".$user_uuid);
}
@@ -370,50 +370,6 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
}
$x++;
//if call center installed
if (
$action == 'edit' &&
permission_exists('user_edit') &&
$username != $username_old &&
file_exists($_SERVER["PROJECT_ROOT"]."/app/call_center/app_config.php")
) {
//update call center agent table
$sql = "select call_center_agent_uuid from v_call_center_agents ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "and agent_name = '".$username_old."' ";
$prep_statement = $db->prepare(check_sql($sql));
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
$a = 0;
foreach ($result as $row) {
$array['call_center_agents'][$a]['call_center_agent_uuid'] = $row['call_center_agent_uuid'];
$array['call_center_agents'][$a]['agent_name'] = $username;
$a++;
}
}
unset($sql, $prep_statement, $result);
//update call center tiers table
$sql = "select call_center_tier_uuid from v_call_center_tiers ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "and agent_name = '".$username_old."' ";
$prep_statement = $db->prepare(check_sql($sql));
if ($prep_statement) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
$t = 0;
foreach ($result as $row) {
$array['call_center_tiers'][$t]['call_center_tier_uuid'] = $row['call_center_tier_uuid'];
$array['call_center_tiers'][$t]['agent_name'] = $username;
$t++;
}
}
unset($sql, $prep_statement, $result);
}
//add the user_edit permission
$p = new permissions;
$p->add("user_setting_add", "temp");
@@ -433,25 +389,31 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
$p->delete("user_edit", "temp");
//if call center installed
if (
$action == 'edit' &&
permission_exists('user_edit') &&
$username != $username_old &&
file_exists($_SERVER["PROJECT_ROOT"]."/app/call_center/app_config.php")
) {
//syncrhonize the configuration
save_call_center_xml();
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
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$switch_cmd .= "callcenter_config agent set status ".$username."@".$_SESSION['domains'][$domain_uuid]['domain_name']." '".$user_status."'";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
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
$cmd = "api callcenter_config agent set state ".$username."@".$_SESSION['domains'][$domain_uuid]['domain_name']." Waiting";
$response = event_socket_request($fp, $cmd);
if (isset($call_center_agent_uuid)) {
$cmd = "api callcenter_config agent set state ".$call_center_agent_uuid." Waiting";
$response = event_socket_request($fp, $cmd);
}
}
//redirect the browser
+40 -22
View File
@@ -2120,27 +2120,6 @@ $text['label-delete']['sv-se'] = "Ta Bort";
$text['label-delete']['uk-ua'] = "Видалити";
$text['label-delete']['tr-tr'] = "Sil";
$text['label-ringback']['en-us'] = "Ringback";
$text['label-ringback']['ar-eg'] = "";
$text['label-ringback']['de-at'] = "Rufton"; //copied from de-de
$text['label-ringback']['de-ch'] = "Rufton"; //copied from de-de
$text['label-ringback']['de-de'] = "Rufton";
$text['label-ringback']['es-cl'] = "Volver a llamar";
$text['label-ringback']['es-mx'] = "Volver a llamar"; //copied from es-cl
$text['label-ringback']['fr-ca'] = "Rappeler"; //copied from fr-fr
$text['label-ringback']['fr-fr'] = "Rappeler";
$text['label-ringback']['he-il'] = "לצלצל בחזרה";
$text['label-ringback']['it-it'] = "Ringback";
$text['label-ringback']['nl-nl'] = "Werombelje";
$text['label-ringback']['pl-pl'] = "Oddzwonienie";
$text['label-ringback']['pt-br'] = "Ringback"; //copied from pt-pt
$text['label-ringback']['pt-pt'] = "Ringback";
$text['label-ringback']['ro-ro'] = "";
$text['label-ringback']['ru-ru'] = "Перезвонить";
$text['label-ringback']['sv-se'] = "Ring tillbaka";
$text['label-ringback']['uk-ua'] = "відповідний";
$text['label-ringback']['tr-tr'] = "Geri Ara";
$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
@@ -2183,6 +2162,26 @@ $text['label-recordings']['sv-se'] = "Inspelningar";
$text['label-recordings']['uk-ua'] = "записи";
$text['label-recordings']['tr-tr'] = "Kayıtlar";
$text['label-ringtones']['en-us'] = "Ringtones";
$text['label-ringtones']['ar-eg'] = "";
$text['label-ringtones']['de-at'] = "Töne"; //copied from de-de
$text['label-ringtones']['de-ch'] = "Töne"; //copied from de-de
$text['label-ringtones']['de-de'] = "Töne";
$text['label-ringtones']['es-cl'] = "Tono";
$text['label-ringtones']['es-mx'] = "Tono"; //copied from es-cl
$text['label-ringtones']['fr-ca'] = "Ton"; //copied from fr-fr
$text['label-ringtones']['fr-fr'] = "Ton";
$text['label-ringtones']['he-il'] = "טוֹן";
$text['label-ringtones']['it-it'] = "Tono";
$text['label-ringtones']['nl-nl'] = "Toon";
$text['label-ringtones']['pl-pl'] = "Ton";
$text['label-ringtones']['pt-br'] = "Tom"; //copied from pt-pt
$text['label-ringtones']['pt-pt'] = "Tom";
$text['label-ringtones']['ro-ro'] = "";
$text['label-ringtones']['ru-ru'] = "Тон";
$text['label-ringtones']['sv-se'] = "Toner";
$text['label-ringtones']['uk-ua'] = "Тон";
$text['label-streams']['en-us'] = 'Streams';
$text['label-streams']['ar-eg'] = '';
$text['label-streams']['de-at'] = '';
@@ -2203,6 +2202,26 @@ $text['label-streams']['ru-ru'] = '';
$text['label-streams']['sv-se'] = '';
$text['label-streams']['uk-ua'] = '';
$text['label-tones']['en-us'] = "Tones";
$text['label-tones']['ar-eg'] = "";
$text['label-tones']['de-at'] = "Töne"; //copied from de-de
$text['label-tones']['de-ch'] = "Töne"; //copied from de-de
$text['label-tones']['de-de'] = "Töne";
$text['label-tones']['es-cl'] = "Tono";
$text['label-tones']['es-mx'] = "Tono"; //copied from es-cl
$text['label-tones']['fr-ca'] = "Ton"; //copied from fr-fr
$text['label-tones']['fr-fr'] = "Ton";
$text['label-tones']['he-il'] = "טוֹן";
$text['label-tones']['it-it'] = "Tono";
$text['label-tones']['nl-nl'] = "Toon";
$text['label-tones']['pl-pl'] = "Ton";
$text['label-tones']['pt-br'] = "Tom"; //copied from pt-pt
$text['label-tones']['pt-pt'] = "Tom";
$text['label-tones']['ro-ro'] = "";
$text['label-tones']['ru-ru'] = "Тон";
$text['label-tones']['sv-se'] = "Toner";
$text['label-tones']['uk-ua'] = "Тон";
$text['label-default']['en-us'] = "Default";
$text['label-default']['ar-eg'] = "בְּרִירַת מֶחדָל";
$text['label-default']['de-at'] = "Standard"; //copied from de-de
@@ -2266,7 +2285,6 @@ $text['label-git_commit']['sv-se'] = "Begå";
$text['label-git_commit']['uk-ua'] = "здійснити";
$text['label-git_commit']['tr-tr'] = "Commit:";
$text['label-us-ring']['en-us'] = "us-ring";
$text['label-us-ring']['ar-eg'] = "";
$text['label-us-ring']['de-at'] = "us-ring"; //copied from de-de
+3 -2
View File
@@ -116,7 +116,7 @@ include "root.php";
}
//sanitize the database name
$this->db_name = preg_replace('#[^a-zA-Z0-9_\-]#', '', $this->db_name);
$this->db_name = preg_replace('#[^a-zA-Z0-9_\-\.]#', '', $this->db_name);
if ($this->driver == "sqlite") {
if (strlen($this->db_name) == 0) {
@@ -132,8 +132,9 @@ include "root.php";
if (file_exists($this->path.'/'.$this->db_name)) {
//connect to the database
$this->db = new PDO('sqlite:'.$this->path.'/'.$this->db_name); //sqlite 3
//enable foreign key constraints
//PRAGMA commands
$this->db->query('PRAGMA foreign_keys = ON;');
$this->db->query('PRAGMA journal_mode = wal;');
//add additional functions to SQLite so that they are accessible inside SQL
//bool PDO::sqliteCreateFunction ( string function_name, callback callback [, int num_args] )
$this->db->sqliteCreateFunction('md5', 'php_md5', 1);
+20 -21
View File
@@ -31,7 +31,7 @@ if (!class_exists('ringbacks')) {
//define variables
public $db;
public $domain_uuid;
private $ringbacks;
private $ringtones_list;
private $tones_list;
private $music_list;
private $recordings_list;
@@ -54,24 +54,23 @@ if (!class_exists('ringbacks')) {
$language = new text;
$text = $language->get();
//get the ringback types
//get the ringtones
$sql = "select * from v_vars ";
$sql .= "where var_category = 'Ringtones' ";
$sql .= "order by var_name asc ";
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$ringbacks = $prep_statement->fetchAll(PDO::FETCH_NAMED);
$ringtones = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset ($prep_statement, $sql);
foreach($ringbacks as $ringback) {
$ringback = $ringback['var_name'];
$label = $text['label-'.$ringback];
foreach($ringtones as $ringtone) {
$ringtone = $ringtone['var_name'];
$label = $text['label-'.$ringtone];
if ($label == "") {
$label = $ringback;
$label = $ringtone;
}
$ringback_list[$ringback] = $label;
$ringtones_list[$ringtone] = $label;
}
$this->ringbacks = $ringback_list;
unset($ringback_list);
$this->ringtones_list = $ringtones_list;
//get the default_ringback label
/*
@@ -162,18 +161,18 @@ if (!class_exists('ringbacks')) {
}
}
//ringbacks
if (sizeof($this->ringbacks) > 0) {
$selected_ringback = $selected;
$selected_ringback = preg_replace('/\A\${/',"",$selected_ringback);
$selected_ringback = preg_replace('/}\z/',"",$selected_ringback);
$select .= " <optgroup label='".$text['label-ringback']."'>";
//$select .= " <option value='default_ringback'".(($selected == "default_ringback") ? ' selected="selected"' : '').">".$text['label-default']." (".$this->default_ringback_label.")</option>\n";
foreach($this->ringbacks as $ringback_value => $ringback_name) {
$select .= " <option value='\${".$ringback_value."}'".(($selected_ringback == $ringback_value) ? ' selected="selected"' : '').">".$ringback_name."</option>\n";
//ringtones
if (sizeof($this->ringtones_list) > 0) {
$selected_ringtone = $selected;
$selected_ringtone = preg_replace('/\A\${/',"",$selected_ringtone);
$selected_ringtone = preg_replace('/}\z/',"",$selected_ringtone);
$select .= " <optgroup label='".$text['label-ringtones']."'>";
//$select .= " <option value='default_ringtones'".(($selected == "default_ringback") ? ' selected="selected"' : '').">".$text['label-default']." (".$this->default_ringtone_label.")</option>\n";
foreach($this->ringtones_list as $ringtone_value => $ringtone_name) {
$select .= " <option value='\${".$ringtone_value."}'".(($selected_ringtone == $ringtone_value) ? ' selected="selected"' : '').">".$ringtone_name."</option>\n";
}
$select .= " </optgroup>\n";
unset($selected_ringback);
unset($selected_ringtone);
}
//tones
@@ -181,7 +180,7 @@ if (!class_exists('ringbacks')) {
$selected_tone = $selected;
$selected_tone = preg_replace('/\A\${/',"",$selected_tone);
$selected_tone = preg_replace('/}\z/',"",$selected_tone);
$select .= " <optgroup label='".$text['label-tone']."'>";
$select .= " <optgroup label='".$text['label-tones']."'>";
foreach($this->tones_list as $tone_value => $tone_name) {
$select .= " <option value='\${".$tone_value."}'".(($selected_tone == $tone_value) ? ' selected="selected"' : '').">".$tone_name."</option>\n";
}
+15 -7
View File
@@ -27,7 +27,7 @@
if (!function_exists('software_version')) {
function software_version() {
return '4.4.0';
return '4.4.1';
}
}
@@ -998,13 +998,21 @@ function format_string ($format, $data) {
}
//check password strength against requirements (if any)
function check_password_strength($password, $text) {
function check_password_strength($password, $text, $type = 'default') {
if ($password != '') {
$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;
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;
} elseif ($type == 'user') {
$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;
}
if (is_numeric($req['length']) && $req['length'] != 0 && !preg_match_all('$\S*(?=\S{'.$req['length'].',})\S*$', $password)) { // length
$msg_errors[] = $req['length'].'+ '.$text['label-characters'];
}
@@ -5,6 +5,9 @@
digit_timeout = 5000;
debug["sql"] = true;
--general functions
require "resources.functions.trim";
--connect to the database
local Database = require "resources.functions.database";
dbh = Database.new('system');
@@ -104,74 +107,80 @@
--get the user_uuid
if (agent_authorized == 'true') then
local sql = "SELECT user_status FROM v_users ";
sql = sql .. "WHERE user_uuid = :user_uuid ";
sql = sql .. "AND domain_uuid = :domain_uuid ";
local params = {user_uuid = user_uuid, domain_uuid = domain_uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[call_center] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params, function(row)
--get the user info
user_status = row.user_status;
if (user_status == "Available") then
action = "logout";
status = 'Logged Out';
else
action = "login";
status = 'Available';
end
--show the status in the log
freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. status .. "\n");
--get the agent status from mod_callcenter
cmd = "callcenter_config agent get status "..agent_uuid.."";
freeswitch.consoleLog("notice", "[user status][login] "..cmd.."\n");
user_status = trim(api:executeString(cmd));
--set the user_status in the users table
local sql = "UPDATE v_users SET ";
sql = sql .. "user_status = :status ";
--get the user info
if (user_status == "Available") then
action = "logout";
status = 'Logged Out';
else
action = "login";
status = 'Available';
end
--send a login or logout to mod_callcenter
cmd = "callcenter_config agent set status "..agent_uuid.." '"..status.."'";
freeswitch.consoleLog("notice", "[user status][login] "..cmd.."\n");
result = api:executeString(cmd);
--update the user status
if (user_uuid ~= nil and user_uuid ~= '') then
local sql = "SELECT user_status FROM v_users ";
sql = sql .. "WHERE user_uuid = :user_uuid ";
local params = {status = status, user_uuid = user_uuid};
sql = sql .. "AND domain_uuid = :domain_uuid ";
local params = {user_uuid = user_uuid, domain_uuid = domain_uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[call_center] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params);
dbh:query(sql, params, function(row)
--send a login or logout to mod_callcenter
cmd = "callcenter_config agent set status "..agent_uuid.." '"..status.."'";
freeswitch.consoleLog("notice", "[user status][login] "..cmd.."\n");
result = api:executeString(cmd);
--set the user_status in the users table
local sql = "UPDATE v_users SET ";
sql = sql .. "user_status = :status ";
sql = sql .. "WHERE user_uuid = :user_uuid ";
local params = {status = status, user_uuid = user_uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[call_center] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end
dbh:query(sql, params);
end);
end
--set the presence to terminated - turn the lamp off:
if (action == "logout") then
event = freeswitch.Event("PRESENCE_IN");
event:addHeader("proto", "sip");
event:addHeader("event_type", "presence");
event:addHeader("alt_event_type", "dialog");
event:addHeader("Presence-Call-Direction", "outbound");
event:addHeader("state", "Active (1 waiting)");
event:addHeader("from", agent_name.."@"..domain_name);
event:addHeader("login", agent_name.."@"..domain_name);
event:addHeader("unique-id", user_uuid);
event:addHeader("answer-state", "terminated");
event:fire();
end
--set the presence to terminated - turn the lamp off:
if (action == "logout") then
event = freeswitch.Event("PRESENCE_IN");
event:addHeader("proto", "sip");
event:addHeader("event_type", "presence");
event:addHeader("alt_event_type", "dialog");
event:addHeader("Presence-Call-Direction", "outbound");
event:addHeader("state", "Active (1 waiting)");
event:addHeader("from", agent_name.."@"..domain_name);
event:addHeader("login", agent_name.."@"..domain_name);
event:addHeader("unique-id", agent_uuid);
event:addHeader("answer-state", "terminated");
event:fire();
end
--set presence in - turn lamp on
if (action == "login") then
event = freeswitch.Event("PRESENCE_IN");
event:addHeader("proto", "sip");
event:addHeader("login", agent_name.."@"..domain_name);
event:addHeader("from", agent_name.."@"..domain_name);
event:addHeader("status", "Active (1 waiting)");
event:addHeader("rpid", "unknown");
event:addHeader("event_type", "presence");
event:addHeader("alt_event_type", "dialog");
event:addHeader("event_count", "1");
event:addHeader("unique-id", user_uuid);
event:addHeader("Presence-Call-Direction", "outbound");
event:addHeader("answer-state", "confirmed");
event:fire();
end
end);
--set presence in - turn lamp on
if (action == "login") then
event = freeswitch.Event("PRESENCE_IN");
event:addHeader("proto", "sip");
event:addHeader("login", agent_name.."@"..domain_name);
event:addHeader("from", agent_name.."@"..domain_name);
event:addHeader("status", "Active (1 waiting)");
event:addHeader("rpid", "unknown");
event:addHeader("event_type", "presence");
event:addHeader("alt_event_type", "dialog");
event:addHeader("event_count", "1");
event:addHeader("unique-id", agent_uuid);
event:addHeader("Presence-Call-Direction", "outbound");
event:addHeader("answer-state", "confirmed");
event:fire();
end
end
--unauthorized
@@ -85,6 +85,16 @@
end
end
--fanvil
if (vendor == "fanvil") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'resync');
end
end
--grandstream
if (vendor == "grandstream") then
if (command == "reboot") then
@@ -95,6 +105,16 @@
end
end
--htek
if (vendor == "htek") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'resync');
end
end
--linksys
if (vendor == "linksys") then
if (command == "reboot") then
@@ -105,6 +125,16 @@
end
end
--panasonic
if (vendor == "panasonic") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
end
--polycom
if (vendor == "polycom") then
if (command == "reboot") then
@@ -115,16 +145,6 @@
end
end
--yealink
if (vendor == "yealink") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'check-sync;reboot=false');
end
end
--snom
if (vendor == "snom") then
if (command == "reboot") then
@@ -135,13 +155,13 @@
end
end
--panasonic
if (vendor == "panasonic") then
--yealink
if (vendor == "yealink") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'check-sync;reboot=true');
event:addHeader('event-string', 'check-sync;reboot=false');
end
end
@@ -463,28 +463,6 @@
--add the row to the destinations array
destinations[x] = row;
end
--determine if the user is registered if not registered then lookup
cmd = "sofia_contact */".. destination_number .."@" ..leg_domain_name;
if (api:executeString(cmd) == "error/user_not_registered") then
cmd = "user_data ".. destination_number .."@" ..leg_domain_name.." var forward_user_not_registered_enabled";
if (api:executeString(cmd) == "true") then
--get the new destination number
cmd = "user_data ".. destination_number .."@" ..leg_domain_name.." var forward_user_not_registered_destination";
not_registered_destination_number = api:executeString(cmd);
--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 .." "..leg_domain_name;
user_exists = api:executeString(cmd);
if (user_exists == "true") then
row['user_exists'] = "true";
else
row['user_exists'] = "false";
end
end
end
else
--set the values
external = "true";
@@ -499,7 +477,7 @@
--freeswitch.consoleLog("NOTICE", "[ring_group] external "..external.."\n");
--get the dialplan data and save it to a table
if (external) then
if (external == "true") then
dialplans = route_to_bridge.preload_dialplan(
dbh, domain_uuid, {hostname = hostname, context = context}
)
@@ -526,6 +504,33 @@
domain_name = row.domain_name;
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
--follow the forwards
count, destination_number = get_forward_all(0, destination_number, leg_domain_name);
@@ -785,6 +790,7 @@
--if the user is busy rollover to the next destination
if (ring_group_strategy == "rollover") then
x = 0;
app_data = '{ignore_early_media=true}';
for key, row in pairs(destinations) do
--set the values from the database as variables
user_exists = row.user_exists;
@@ -797,9 +803,6 @@
extension_uuid = trim(api:executeString(cmd));
end
--set the timeout
session:execute("set", "call_timeout="..row.destination_timeout);
--if the timeout was reached go to the timeout action
if (x > 0) then
if (session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
@@ -811,15 +814,18 @@
--send the call to the destination
if (user_exists == "true") then
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",call_direction="..call_direction..",dialed_extension=" .. destination_number .. ",extension_uuid="..extension_uuid..",domain_name="..domain_name..",domain_uuid="..domain_uuid..row.record_session.."]user/" .. destination_number .. "@" .. domain_name;
session:execute("bridge", dial_string);
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",leg_timeout="..destination_timeout..",call_direction="..call_direction..",dialed_extension=" .. destination_number .. ",extension_uuid="..extension_uuid..",domain_name="..domain_name..",domain_uuid="..domain_uuid..row.record_session.."]user/" .. destination_number .. "@" .. domain_name;
elseif (tonumber(destination_number) == nil) then
--sip uri
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",call_direction=outbound,domain_name="..domain_name..",domain_uuid="..domain_uuid.."]" .. destination_number;
session:execute("bridge", dial_string);
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",call_timeout="..destination_timeout..",call_direction=outbound,domain_name="..domain_name..",domain_uuid="..domain_uuid.."]" .. destination_number;
else
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",call_direction=outbound]loopback/" .. destination_number;
session:execute("bridge", dial_string);
dial_string = "["..group_confirm.."sip_invite_domain="..domain_name..",call_timeout="..destination_timeout..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",call_direction=outbound]loopback/" .. destination_number;
end
--add the delimiter
if (x == 0) then
app_data = app_data .. dial_string;
else
app_data = app_data .. delimiter .. dial_string;
end
--increment the value of x
@@ -204,9 +204,17 @@
password_min_length = settings['voicemail']['password_min_length']['numeric'];
end
end
not_found_message = 'false';
if (settings['voicemail']['not_found_message'] ~= nil) then
if (settings['voicemail']['not_found_message']['boolean'] ~= nil) then
not_found_message = settings['voicemail']['not_found_message']['boolean'];
end
end
end
if settings['voicemail'] then
if (settings['voicemail']) then
if settings['voicemail']['voicemail_to_sms'] then
voicemail_to_sms = (settings['voicemail']['voicemail_to_sms']['boolean'] == 'true');
end
@@ -258,10 +266,11 @@
end
--valid voicemail
if (voicemail_uuid ~= nil) then
if (voicemail_uuid ~= nil and string.len(voicemail_uuid) > 0) then
--answer the session
if (session:ready()) then
session:answer();
session:execute("sleep", "1000");
end
--unset bind meta app
@@ -591,8 +600,12 @@
referred_by = referred_by:match('[%d]+');
session:transfer(referred_by, "XML", context);
else
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-no_answer_no_vm.wav");
session:hangup("NO_ANSWER");
if (not_found_message == "true") then
session:answer();
session:execute("sleep", "1000");
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-no_answer_no_vm.wav");
session:hangup();
end
end
end
end
@@ -29,14 +29,22 @@
--define a function to record the greeting
function record_greeting(greeting_id, menu)
local db = dbh or Database.new('system')
local settings = Settings.new(db, domain_name, domain_uuid)
local max_len_seconds = settings:get('voicemail', 'greeting_max_length', 'numeric') or 90;
--setup the database connection
local db = dbh or Database.new('system')
--get the voicemail settings
local settings = Settings.new(db, domain_name, domain_uuid)
--set the maximum greeeting length
local max_len_seconds = settings:get('voicemail', 'greeting_max_length', 'numeric') or 90;
--flush dtmf digits from the input buffer
session:flushDigits();
--disable appending to the recording
session:setVariable("record_append", "false");
--choose a greeting between 1 and 9
if (greeting_id == nil) then
if (session:ready()) then
@@ -49,7 +49,7 @@
--set the dialplan cache key
local dialplan_cache_key = "dialplan:" .. call_context;
if (context_name == 'public' and context_type == "single") then
key = "dialplan:" .. call_context .. ":" .. destination_number;
dialplan_cache_key = "dialplan:" .. call_context .. ":" .. destination_number;
end
--get the cache
@@ -498,115 +498,115 @@
table.insert(xml, [[ <variable name="caller_id_name" value="]] .. sip_from_user .. [["/>]]);
table.insert(xml, [[ <variable name="caller_id_number" value="]] .. sip_from_number .. [["/>]]);
table.insert(xml, [[ <variable name="presence_id" value="]] .. presence_id .. [["/>]]);
if (string.len(call_group) > 0) then
if (call_group ~= nil) and (string.len(call_group) > 0) then
table.insert(xml, [[ <variable name="call_group" value="]] .. call_group .. [["/>]]);
end
if (string.len(call_screen_enabled) > 0) then
if (call_screen_enabled ~= nil) and (string.len(call_screen_enabled) > 0) then
table.insert(xml, [[ <variable name="call_screen_enabled" value="]] .. call_screen_enabled .. [["/>]]);
end
if (string.len(user_record) > 0) then
if (user_record ~= nil) and (string.len(user_record) > 0) then
table.insert(xml, [[ <variable name="user_record" value="]] .. user_record .. [["/>]]);
end
if (string.len(hold_music) > 0) then
if (hold_music ~= nil) and (string.len(hold_music) > 0) then
table.insert(xml, [[ <variable name="hold_music" value="]] .. hold_music .. [["/>]]);
end
if (string.len(toll_allow) > 0) then
if (toll_allow ~= nil) and (string.len(toll_allow) > 0) then
table.insert(xml, [[ <variable name="toll_allow" value="]] .. toll_allow .. [["/>]]);
end
if (string.len(accountcode) > 0) then
if (accountcode ~= nil) and (string.len(accountcode) > 0) then
table.insert(xml, [[ <variable name="accountcode" value="]] .. accountcode .. [["/>]]);
end
table.insert(xml, [[ <variable name="user_context" value="]] .. user_context .. [["/>]]);
if (string.len(effective_caller_id_name) > 0) then
if (effective_caller_id_name ~= nil) and (string.len(effective_caller_id_name) > 0) then
table.insert(xml, [[ <variable name="effective_caller_id_name" value="]] .. effective_caller_id_name.. [["/>]]);
end
if (string.len(effective_caller_id_number) > 0) then
if (effective_caller_id_number ~= nil) and (string.len(effective_caller_id_number) > 0) then
table.insert(xml, [[ <variable name="effective_caller_id_number" value="]] .. effective_caller_id_number.. [["/>]]);
end
if (string.len(outbound_caller_id_name) > 0) then
if (outbound_caller_id_name ~= nil) and (string.len(outbound_caller_id_name) > 0) then
table.insert(xml, [[ <variable name="outbound_caller_id_name" value="]] .. outbound_caller_id_name .. [["/>]]);
end
if (string.len(outbound_caller_id_number) > 0) then
if (outbound_caller_id_number ~= nil) and (string.len(outbound_caller_id_number) > 0) then
table.insert(xml, [[ <variable name="outbound_caller_id_number" value="]] .. outbound_caller_id_number .. [["/>]]);
end
if (string.len(emergency_caller_id_name) > 0) then
if (emergency_caller_id_name ~= nil) and (string.len(emergency_caller_id_name) > 0) then
table.insert(xml, [[ <variable name="emergency_caller_id_name" value="]] .. emergency_caller_id_name .. [["/>]]);
end
if (string.len(emergency_caller_id_number) > 0) then
if (emergency_caller_id_number ~= nil) and (string.len(emergency_caller_id_number) > 0) then
table.insert(xml, [[ <variable name="emergency_caller_id_number" value="]] .. emergency_caller_id_number .. [["/>]]);
end
if (string.len(missed_call_app) > 0) then
if (missed_call_app ~= nil) and (string.len(missed_call_app) > 0) then
table.insert(xml, [[ <variable name="missed_call_app" value="]] .. missed_call_app .. [["/>]]);
end
if (string.len(missed_call_data) > 0) then
if (missed_call_data ~= nil) and (string.len(missed_call_data) > 0) then
table.insert(xml, [[ <variable name="missed_call_data" value="]] .. missed_call_data .. [["/>]]);
end
if (string.len(directory_full_name) > 0) then
if (directory_full_name ~= nil) and (string.len(directory_full_name) > 0) then
table.insert(xml, [[ <variable name="directory_full_name" value="]] .. directory_full_name .. [["/>]]);
end
if (string.len(directory_visible) > 0) then
if (directory_visible ~= nil) and (string.len(directory_visible) > 0) then
table.insert(xml, [[ <variable name="directory-visible" value="]] .. directory_visible .. [["/>]]);
end
if (string.len(directory_exten_visible) > 0) then
if (directory_exten_visible ~= nil) and (string.len(directory_exten_visible) > 0) then
table.insert(xml, [[ <variable name="directory-exten-visible" value="]] .. directory_exten_visible .. [["/>]]);
end
if (string.len(limit_max) > 0) then
if (limit_max ~= nil) and (string.len(limit_max) > 0) then
table.insert(xml, [[ <variable name="limit_max" value="]] .. limit_max .. [["/>]]);
else
table.insert(xml, [[ <variable name="limit_max" value="5"/>]]);
end
if (string.len(limit_destination) > 0) then
if (limit_destination ~= nil) and (string.len(limit_destination) > 0) then
table.insert(xml, [[ <variable name="limit_destination" value="]] .. limit_destination .. [["/>]]);
end
if (string.len(sip_force_contact) > 0) then
if (sip_force_contact ~= nil) and (string.len(sip_force_contact) > 0) then
table.insert(xml, [[ <variable name="sip-force-contact" value="]] .. sip_force_contact .. [["/>]]);
end
if (string.len(sip_force_expires) > 0) then
if (sip_force_expires ~= nil) and (string.len(sip_force_expires) > 0) then
table.insert(xml, [[ <variable name="sip-force-expires" value="]] .. sip_force_expires .. [["/>]]);
end
if (string.len(nibble_account) > 0) then
if (nibble_account ~= nil) and (string.len(nibble_account) > 0) then
table.insert(xml, [[ <variable name="nibble_account" value="]] .. nibble_account .. [["/>]]);
end
if (string.len(absolute_codec_string) > 0) then
if (absolute_codec_string ~= nil) and (string.len(absolute_codec_string) > 0) then
table.insert(xml, [[ <variable name="absolute_codec_string" value="]] .. absolute_codec_string .. [["/>]]);
end
if (string.len(force_ping) > 0) then
if (force_ping ~= nil) and (string.len(force_ping) > 0) then
table.insert(xml, [[ <variable name="force_ping" value="]] .. force_ping .. [["/>]]);
end
if (sip_bypass_media == "bypass-media") then
if (sip_bypass_media ~= nil) and (sip_bypass_media == "bypass-media") then
table.insert(xml, [[ <variable name="bypass_media" value="true"/>]]);
end
if (sip_bypass_media == "bypass-media-after-bridge") then
if (sip_bypass_media ~= nil) and (sip_bypass_media == "bypass-media-after-bridge") then
table.insert(xml, [[ <variable name="bypass_media_after_bridge" value="true"/>]]);
end
if (sip_bypass_media == "proxy-media") then
if (sip_bypass_media ~= nil) and (sip_bypass_media == "proxy-media") then
table.insert(xml, [[ <variable name="proxy_media" value="true"/>]]);
end
if (string.len(forward_all_enabled) > 0) then
if (forward_all_enabled ~= nil) and (string.len(forward_all_enabled) > 0) then
table.insert(xml, [[ <variable name="forward_all_enabled" value="]] .. forward_all_enabled .. [["/>]]);
end
if (string.len(forward_all_destination) > 0) then
if (forward_all_destination ~= nil) and (string.len(forward_all_destination) > 0) then
table.insert(xml, [[ <variable name="forward_all_destination" value="]] .. forward_all_destination .. [["/>]]);
end
if (string.len(forward_busy_enabled) > 0) then
if (forward_busy_enabled ~= nil) and (string.len(forward_busy_enabled) > 0) then
table.insert(xml, [[ <variable name="forward_busy_enabled" value="]] .. forward_busy_enabled .. [["/>]]);
end
if (string.len(forward_busy_destination) > 0) then
if (forward_busy_destination ~= nil) and (string.len(forward_busy_destination) > 0) then
table.insert(xml, [[ <variable name="forward_busy_destination" value="]] .. forward_busy_destination .. [["/>]]);
end
if (string.len(forward_no_answer_enabled) > 0) then
if (forward_no_answer_enabled ~= nil) and (string.len(forward_no_answer_enabled) > 0) then
table.insert(xml, [[ <variable name="forward_no_answer_enabled" value="]] .. forward_no_answer_enabled .. [["/>]]);
end
if (string.len(forward_no_answer_destination) > 0) then
if (forward_no_answer_destination ~= nil) and (string.len(forward_no_answer_destination) > 0) then
table.insert(xml, [[ <variable name="forward_no_answer_destination" value="]] .. forward_no_answer_destination .. [["/>]]);
end
if (string.len(forward_user_not_registered_enabled) > 0) then
if (forward_user_not_registered_enabled ~= nil) and (string.len(forward_user_not_registered_enabled) > 0) then
table.insert(xml, [[ <variable name="forward_user_not_registered_enabled" value="]] .. forward_user_not_registered_enabled .. [["/>]]);
end
if (string.len(forward_user_not_registered_destination) > 0) then
if (forward_user_not_registered_destination ~= nil) and (string.len(forward_user_not_registered_destination) > 0) then
table.insert(xml, [[ <variable name="forward_user_not_registered_destination" value="]] .. forward_user_not_registered_destination .. [["/>]]);
end
if (string.len(do_not_disturb) > 0) then
if (do_not_disturb ~= nil) and (string.len(do_not_disturb) > 0) then
table.insert(xml, [[ <variable name="do_not_disturb" value="]] .. do_not_disturb .. [["/>]]);
end
table.insert(xml, [[ <variable name="record_stereo" value="true"/>]]);
+1 -4
View File
@@ -34,16 +34,13 @@
--create the api object
api = freeswitch.API();
--include config.lua
--includes
require "resources.functions.config";
require "resources.functions.channel_utils";
local log = require "resources.functions.log".call_forward
local cache = require "resources.functions.cache"
local Database = require "resources.functions.database"
local Settings = require "resources.functions.lazy_settings"
local route_to_bridge = require "resources.functions.route_to_bridge"
local blf = require "resources.functions.blf"
local notify = require "app.feature_event.resources.functions.feature_event_notify"
+8
View File
@@ -0,0 +1,8 @@
--BEGIN TRANSACTION;
CREATE INDEX index_billsec ON v_xml_cdr(billsec);
CREATE INDEX index_caller_id_name ON v_xml_cdr(caller_id_name);
CREATE INDEX index_destination_number ON v_xml_cdr(destination_number);
CREATE INDEX index_duration ON v_xml_cdr(duration);
CREATE INDEX index_hangup_cause ON v_xml_cdr(hangup_cause);
CREATE INDEX index_start_stamp ON v_xml_cdr(start_stamp);
--COMMIT;
+4 -2
View File
@@ -254,10 +254,12 @@ if ($db_type == "pgsql") {
}
} //end if db_type pgsql
//domain list
if ( ( !isset($_SESSION["domain_uuid"])) or (strlen($_SESSION["domain_uuid"]) == 0)) {
//get the domain list
if (!is_array($_SESSION['domains']) or (!isset($_SESSION["domain_uuid"])) or (strlen($_SESSION["domain_uuid"]) == 0)) {
//get the domain
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
//get the domains from the database
$sql = "select * from v_domains";
$prep_statement = $db->prepare($sql);
@@ -1076,6 +1076,7 @@
<EnableDST>{$fanvil_enable_dst}</EnableDST>
<DSTRuleMode>2</DSTRuleMode>
<SNTPTimeout>60</SNTPTimeout>
<DSTType>1</DSTType>
<DSTMinOffset>60</DSTMinOffset>
<DSTStartMon>3</DSTStartMon>
<DSTStartWeek>5</DSTStartWeek>
@@ -73,7 +73,7 @@
<P237>{$domain_name}{$project_path}/app/provision</P237>
<!-- XML Config File Password -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<P1360>{$http_auth_username}</P1360>
@@ -38,7 +38,7 @@
<!-- Config Server Path -->
<P237>{$domain_name}{$project_path}/app/provision</P237>
<!-- XML Config File Password -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<P1360>{$http_auth_username}</P1360>
<!-- HTTP/HTTPS Password -->
@@ -2632,7 +2632,7 @@
<!-- XML Config File Password -->
<!-- String Max Length: 40 -->
<!-- Mandatory; between ascii values 33 and 126 -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name for config server -->
<!-- String Max Length: 40; between ascii values 33 and 126 -->
@@ -904,7 +904,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -778,7 +778,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -1152,7 +1152,7 @@
<P238>0</P238>
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
<P1360>{$http_auth_username}</P1360>
@@ -1152,7 +1152,7 @@
<P238>0</P238>
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
<P1360>{$http_auth_username}</P1360>
@@ -1533,7 +1533,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -1342,7 +1342,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -2033,7 +2033,7 @@
<P235></P235>
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- Authenticate Conf File. 0 - No, 1 - Yes. Default is No -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
@@ -6042,7 +6042,7 @@
<!-- # XML Config File Password -->
<!-- # String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- # Authenticate Conf File. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -1889,7 +1889,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -441,7 +441,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2347>0</P2347>
<P2347>1</P2347>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -716,7 +716,7 @@
<!-- Disable Recovery on Blind Transfer. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2384>0</P2384>
<P2384>1</P2384>
<!-- No Key Entry Timeout (in seconds). Default is 4 -->
<!-- Number: 1 - 15 -->
@@ -1207,7 +1207,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2447>0</P2447>
<P2447>1</P2447>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -1586,7 +1586,7 @@
<!-- Name -->
<!-- String -->
<P507>{$display_name_3}</P507>
<!-- Voice Mail UserID -->
<!-- String -->
<P526>*97</P526>
@@ -1961,7 +1961,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2547>0</P2547>
<P2547>1</P2547>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -2715,7 +2715,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2647>0</P2647>
<P2647>1</P2647>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -3469,7 +3469,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2747>0</P2747>
<P2747>1</P2747>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4226,7 +4226,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2847>0</P2847>
<P2847>1</P2847>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4573,7 +4573,7 @@
<!-- String -->
<!-- For GXP2130, Default value is Grandstream GXP2130. -->
<!-- P148>Grandstream GXP2130</P148> -->
<!-- For GXP2140, Default value is Grandstream GXP2140. -->
<!-- P148>Grandstream GXP2140</P148> -->
@@ -4848,7 +4848,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -5493,7 +5493,7 @@
<!-- User-Agent Prefix -->
<!-- String -->
<P8358></P8358>
<!-- Auto Provision List Starting Point. 0 - Extension Boards, 1 - VPKs, 2 - MPK . Default is 0. - VPK/MPK is for GXP2130 only. Extension Boards/VPK is for GXP2140/2160/2170. -->
<!-- Number: 0, 1, 2 -->
<!-- Mandatory -->
@@ -5503,12 +5503,12 @@
<!-- Number: 10 - 900 -->
<!-- Mandatory -->
<P26055>10</P26055>
<!-- Play Tone On Receiving IM. 0 - Disable, 1 - Enable. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P26056>0</P26056>
<!-- Allow Incoming Call Before Ringing. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
@@ -5970,11 +5970,16 @@
<!-- 0 - Self-Defined City Code, 1 - Automatic. Default is 1 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
{if isset($grandstream_city_code)}
<P1405>0</P1405>
{else}
<P1405>1</P1405>
{/if}
<!-- Self-Defined City Code -->
<!-- String -->
<P1377></P1377>
<!-- # Self-Defined City Code -->
<!-- # String -->
<P1377>{$grandstream_city_code}</P1377>
<!-- Update Interval (in minutes). Default is 15 -->
<!-- Number: 5 - 360 -->
@@ -5984,7 +5989,11 @@
<!-- Degree Unit. auto - Automatic, f - Fahrenheit, c - Celsius. Default is auto -->
<!-- String: auto, f, c -->
<!-- Mandatory -->
<P1379>c</P1379>
{if isset($grandstream_temp_unit)}
<P1379>{$grandstream_temp_unit}</P1379>
{else}
<P1379>auto</P1379>
{/if}
<!-- Currency Update -->
<!-- Enable Currency update. 0 - No, 1 - Yes. Default is 1 -->
@@ -441,7 +441,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2347>0</P2347>
<P2347>1</P2347>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -716,7 +716,7 @@
<!-- Disable Recovery on Blind Transfer. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2384>0</P2384>
<P2384>1</P2384>
<!-- No Key Entry Timeout (in seconds). Default is 4 -->
<!-- Number: 1 - 15 -->
@@ -1207,7 +1207,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2447>0</P2447>
<P2447>1</P2447>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -1586,7 +1586,7 @@
<!-- Name -->
<!-- String -->
<P507>{$display_name_3}</P507>
<!-- Voice Mail UserID -->
<!-- String -->
<P526>*97</P526>
@@ -1961,7 +1961,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2547>0</P2547>
<P2547>1</P2547>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -2715,7 +2715,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2647>0</P2647>
<P2647>1</P2647>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -3469,7 +3469,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2747>0</P2747>
<P2747>1</P2747>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4226,7 +4226,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2847>0</P2847>
<P2847>1</P2847>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4573,7 +4573,7 @@
<!-- String -->
<!-- For GXP2130, Default value is Grandstream GXP2130. -->
<!-- P148>Grandstream GXP2130</P148> -->
<!-- For GXP2140, Default value is Grandstream GXP2140. -->
<!-- P148>Grandstream GXP2140</P148> -->
@@ -4848,7 +4848,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -5493,7 +5493,7 @@
<!-- User-Agent Prefix -->
<!-- String -->
<P8358></P8358>
<!-- Auto Provision List Starting Point. 0 - Extension Boards, 1 - VPKs, 2 - MPK . Default is 0. - VPK/MPK is for GXP2130 only. Extension Boards/VPK is for GXP2140/2160/2170. -->
<!-- Number: 0, 1, 2 -->
<!-- Mandatory -->
@@ -5503,12 +5503,12 @@
<!-- Number: 10 - 900 -->
<!-- Mandatory -->
<P26055>10</P26055>
<!-- Play Tone On Receiving IM. 0 - Disable, 1 - Enable. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P26056>0</P26056>
<!-- Allow Incoming Call Before Ringing. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
@@ -5970,11 +5970,16 @@
<!-- 0 - Self-Defined City Code, 1 - Automatic. Default is 1 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
{if isset($grandstream_city_code)}
<P1405>0</P1405>
{else}
<P1405>1</P1405>
{/if}
<!-- Self-Defined City Code -->
<!-- String -->
<P1377></P1377>
<!-- # Self-Defined City Code -->
<!-- # String -->
<P1377>{$grandstream_city_code}</P1377>
<!-- Update Interval (in minutes). Default is 15 -->
<!-- Number: 5 - 360 -->
@@ -5984,7 +5989,11 @@
<!-- Degree Unit. auto - Automatic, f - Fahrenheit, c - Celsius. Default is auto -->
<!-- String: auto, f, c -->
<!-- Mandatory -->
<P1379>c</P1379>
{if isset($grandstream_temp_unit)}
<P1379>{$grandstream_temp_unit}</P1379>
{else}
<P1379>auto</P1379>
{/if}
<!-- Currency Update -->
<!-- Enable Currency update. 0 - No, 1 - Yes. Default is 1 -->
@@ -441,7 +441,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2347>0</P2347>
<P2347>1</P2347>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -716,7 +716,7 @@
<!-- Disable Recovery on Blind Transfer. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2384>0</P2384>
<P2384>1</P2384>
<!-- No Key Entry Timeout (in seconds). Default is 4 -->
<!-- Number: 1 - 15 -->
@@ -1207,7 +1207,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2447>0</P2447>
<P2447>1</P2447>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -1586,7 +1586,7 @@
<!-- Name -->
<!-- String -->
<P507>{$display_name_3}</P507>
<!-- Voice Mail UserID -->
<!-- String -->
<P526>*97</P526>
@@ -1961,7 +1961,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2547>0</P2547>
<P2547>1</P2547>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -2715,7 +2715,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2647>0</P2647>
<P2647>1</P2647>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -3469,7 +3469,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2747>0</P2747>
<P2747>1</P2747>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4226,7 +4226,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2847>0</P2847>
<P2847>1</P2847>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4573,7 +4573,7 @@
<!-- String -->
<!-- For GXP2130, Default value is Grandstream GXP2130. -->
<!-- P148>Grandstream GXP2130</P148> -->
<!-- For GXP2140, Default value is Grandstream GXP2140. -->
<!-- P148>Grandstream GXP2140</P148> -->
@@ -4848,7 +4848,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -5493,7 +5493,7 @@
<!-- User-Agent Prefix -->
<!-- String -->
<P8358></P8358>
<!-- Auto Provision List Starting Point. 0 - Extension Boards, 1 - VPKs, 2 - MPK . Default is 0. - VPK/MPK is for GXP2130 only. Extension Boards/VPK is for GXP2140/2160/2170. -->
<!-- Number: 0, 1, 2 -->
<!-- Mandatory -->
@@ -5503,12 +5503,12 @@
<!-- Number: 10 - 900 -->
<!-- Mandatory -->
<P26055>10</P26055>
<!-- Play Tone On Receiving IM. 0 - Disable, 1 - Enable. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P26056>0</P26056>
<!-- Allow Incoming Call Before Ringing. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
@@ -5970,11 +5970,16 @@
<!-- 0 - Self-Defined City Code, 1 - Automatic. Default is 1 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
{if isset($grandstream_city_code)}
<P1405>0</P1405>
{else}
<P1405>1</P1405>
{/if}
<!-- Self-Defined City Code -->
<!-- String -->
<P1377></P1377>
<!-- # Self-Defined City Code -->
<!-- # String -->
<P1377>{$grandstream_city_code}</P1377>
<!-- Update Interval (in minutes). Default is 15 -->
<!-- Number: 5 - 360 -->
@@ -5984,7 +5989,11 @@
<!-- Degree Unit. auto - Automatic, f - Fahrenheit, c - Celsius. Default is auto -->
<!-- String: auto, f, c -->
<!-- Mandatory -->
<P1379>c</P1379>
{if isset($grandstream_temp_unit)}
<P1379>{$grandstream_temp_unit}</P1379>
{else}
<P1379>auto</P1379>
{/if}
<!-- Currency Update -->
<!-- Enable Currency update. 0 - No, 1 - Yes. Default is 1 -->
@@ -441,7 +441,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2347>0</P2347>
<P2347>1</P2347>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -716,7 +716,7 @@
<!-- Disable Recovery on Blind Transfer. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2384>0</P2384>
<P2384>1</P2384>
<!-- No Key Entry Timeout (in seconds). Default is 4 -->
<!-- Number: 1 - 15 -->
@@ -1207,7 +1207,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2447>0</P2447>
<P2447>1</P2447>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -1586,7 +1586,7 @@
<!-- Name -->
<!-- String -->
<P507>{$display_name_3}</P507>
<!-- Voice Mail UserID -->
<!-- String -->
<P526>*97</P526>
@@ -1961,7 +1961,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2547>0</P2547>
<P2547>1</P2547>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -2715,7 +2715,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2647>0</P2647>
<P2647>1</P2647>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -3469,7 +3469,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2747>0</P2747>
<P2747>1</P2747>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4226,7 +4226,7 @@
<!-- Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P2847>0</P2847>
<P2847>1</P2847>
<!-- Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
@@ -4573,7 +4573,7 @@
<!-- String -->
<!-- For GXP2130, Default value is Grandstream GXP2130. -->
<!-- P148>Grandstream GXP2130</P148> -->
<!-- For GXP2140, Default value is Grandstream GXP2140. -->
<!-- P148>Grandstream GXP2140</P148> -->
@@ -4848,7 +4848,7 @@
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
@@ -5493,7 +5493,7 @@
<!-- User-Agent Prefix -->
<!-- String -->
<P8358></P8358>
<!-- Auto Provision List Starting Point. 0 - Extension Boards, 1 - VPKs, 2 - MPK . Default is 0. - VPK/MPK is for GXP2130 only. Extension Boards/VPK is for GXP2140/2160/2170. -->
<!-- Number: 0, 1, 2 -->
<!-- Mandatory -->
@@ -5503,12 +5503,12 @@
<!-- Number: 10 - 900 -->
<!-- Mandatory -->
<P26055>10</P26055>
<!-- Play Tone On Receiving IM. 0 - Disable, 1 - Enable. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
<P26056>0</P26056>
<!-- Allow Incoming Call Before Ringing. 0 - No, 1 - Yes. Default is 0 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
@@ -5970,11 +5970,16 @@
<!-- 0 - Self-Defined City Code, 1 - Automatic. Default is 1 -->
<!-- Number: 0, 1 -->
<!-- Mandatory -->
{if isset($grandstream_city_code)}
<P1405>0</P1405>
{else}
<P1405>1</P1405>
{/if}
<!-- Self-Defined City Code -->
<!-- String -->
<P1377></P1377>
<!-- # Self-Defined City Code -->
<!-- # String -->
<P1377>{$grandstream_city_code}</P1377>
<!-- Update Interval (in minutes). Default is 15 -->
<!-- Number: 5 - 360 -->
@@ -5984,7 +5989,11 @@
<!-- Degree Unit. auto - Automatic, f - Fahrenheit, c - Celsius. Default is auto -->
<!-- String: auto, f, c -->
<!-- Mandatory -->
<P1379>c</P1379>
<P1379>{if isset ($grandstream_temp_unit)}
<P1379>{}$grandstream_temp_unit}</P1379>
{else}
<P1379>auto</P1379>
{/if}
<!-- Currency Update -->
<!-- Enable Currency update. 0 - No, 1 - Yes. Default is 1 -->
@@ -470,7 +470,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2347>0</P2347>
<P2347>1</P2347>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -548,7 +548,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P183>{grandstream_srtp)}</P183>
<P183>{$grandstream_srtp}</P183>
{else}
<P183>0</P183>
{/if}
@@ -731,7 +731,7 @@
<!-- # Disable Recovery on Blind Transfer. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2384>0</P2384>
<P2384>1</P2384>
<!-- # Blind Transfer Wait Timeout. Default is 30 -->
<!-- # Number: 30 - 300 -->
@@ -1304,7 +1304,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2447>0</P2447>
<P2447>1</P2447>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -1383,7 +1383,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P443>{grandstream_srtp)}</P443>
<P443>{$grandstream_srtp}</P443>
{else}
<P443>0</P443>
{/if}
@@ -2141,7 +2141,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2547>0</P2547>
<P2547>1</P2547>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -2239,7 +2239,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P543>{grandstream_srtp)}</P543>
<P543>{$grandstream_srtp}</P543>
{else}
<P543>0</P543>
{/if}
@@ -2978,7 +2978,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2647>0</P2647>
<P2647>1</P2647>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -3076,7 +3076,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P643>{grandstream_srtp)}</P643>
<P643>{$grandstream_srtp}</P643>
{else}
<P643>0</P643>
{/if}
@@ -3815,7 +3815,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2747>0</P2747>
<P2747>1</P2747>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -3913,7 +3913,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P1743>{grandstream_srtp)}</P1743>
<P1743>{$grandstream_srtp}</P1743>
{else}
<P1743>0</P1743>
{/if}
@@ -4655,7 +4655,7 @@
<!-- # Accept Incoming SIP from Proxy Only. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
<P2847>0</P2847>
<P2847>1</P2847>
<!-- # Authenticate Incoming INVITE. 0 - No, 1 - Yes. Default is 0 -->
<!-- # Number: 0, 1 -->
@@ -4753,7 +4753,7 @@
<!-- # Number: 0, 1, 2, 3 -->
<!-- # Mandatory -->
{if isset($grandstream_srtp)}
<P1843>{grandstream_srtp)}</P1843>
<P1843>{$grandstream_srtp}</P1843>
{else}
<P1843>0</P1843>
{/if}
@@ -5498,7 +5498,7 @@
<!-- # XML Config File Password -->
<!-- # String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- # Authenticate Conf File. 0 - No, 1 - Yes. Default is No -->
<!-- # Number: 0, 1 -->
@@ -7243,11 +7243,16 @@
<!-- # 0 - Self-Defined City Code, 1 - Automatic. Default is 1 -->
<!-- # Number: 0, 1 -->
<!-- # Mandatory -->
{if isset($grandstream_city_code)}
<P1405>0</P1405>
{else}
<P1405>1</P1405>
{/if}
<!-- # Self-Defined City Code -->
<!-- # String -->
<P1377></P1377>
<P1377>{$grandstream_city_code}</P1377>
<!-- # Update Interval (in minutes). Default is 15 -->
<!-- # Number: 5 - 360 -->
@@ -7257,7 +7262,11 @@
<!-- # Degree Unit. auto - Automatic, f - Fahrenheit, c - Celsius. Default is auto -->
<!-- # String: auto, f, c -->
<!-- # Mandatory -->
<P1379>{if isset ($grandstream_temp_unit)}
<P1379>{}$grandstream_temp_unit}</P1379>
{else}
<P1379>auto</P1379>
{/if}
<!-- # Currency Update -->
<!-- # Enable Currency update. 0 - No, 1 - Yes. Default is 1 -->
@@ -2681,7 +2681,7 @@
<P238>0</P238>
<!-- XML Config File Password -->
<!-- String -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String -->
<P1360>{$http_auth_username}</P1360>
@@ -17,7 +17,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -3198,7 +3198,7 @@ Account 5 Codec Settings
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -3198,7 +3198,7 @@ Account 5 Codec Settings
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -1361,7 +1361,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -1241,7 +1241,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -740,7 +740,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -4793,7 +4793,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -3198,7 +3198,7 @@ Account 5 Codec Settings
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -585,7 +585,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -62,7 +62,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -153,7 +153,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -47,7 +47,7 @@
<!-- Config Server Path. Server address -->
<P237>{$domain_name}{$project_path}/app/provision</P237>
<!-- XML Config File Password. Max Length: 40 characters; between ascii values 33 and 126 -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name. Max Length: 40 characters; between ascii values 33 and 126 -->
<P1360>{$http_auth_username}</P1360>
<!-- HTTP/HTTPS Password. Max Length: 40 characters; between ascii values 33 and 126 -->
@@ -147,7 +147,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -75,7 +75,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -83,7 +83,7 @@
<!-- XML Config File Password -->
<!-- String; between ascii values 33 and 126 -->
<!-- Mandatory -->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -79,7 +79,7 @@
<!-- XML Config File Password -->
<!-- String-->
<P1359>{$http_auth_password}</P1359>
<P1359></P1359>
<!-- HTTP/HTTPS User Name -->
<!-- String; between ascii values 33 and 126 -->
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<PhoneDirectory>
{foreach $contacts as $row}
{if $smarty.get.contacts == "users" && $row.category == "users"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
</DirectoryEntry>
{elseif $smarty.get.contacts == "all"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.category == "extensions"}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
{else}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
{/if}
</DirectoryEntry>
{/if}
{/foreach}
</PhoneDirectory>
@@ -896,12 +896,36 @@
<P8751 para="SoftKeyLayout.CustomSoftkey">1</P8751>
<!--Directory-->
<!--Directory/RemotePhoneBook-->
<P4401 para="RemotePhoneBook1.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users</P4401>
<P3316 para="RemotePhoneBook1.Name" />
<P4402 para="RemotePhoneBook2.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups</P4402>
<P3312 para="RemotePhoneBook2.Name" />
<P4403 para="RemotePhoneBook3.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions</P4403>
<P3313 para="RemotePhoneBook3.Name" />
{if isset($htek_remote_phonebook_1_url) }
<P4401 para="RemotePhoneBook1.Url">{$htek_remote_phonebook_1_url}</P4401>
{else}
<P4401 para="RemotePhoneBook1.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=users</P4401>
{/if}
{if isset($htek_remote_phonebook_1_name) }
<P3316 para="RemotePhoneBook1.Name">{$htek_remote_phonebook_1_name}</P3316>
{else}
<P3316 para="RemotePhoneBook1.Name">Users</P3316>
{/if}
{if isset($htek_remote_phonebook_2_url) }
<P4402 para="RemotePhoneBook2.Url">{$htek_remote_phonebook_2_url}</P4402>
{else}
<P4402 para="RemotePhoneBook2.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=groups</P4402>
{/if}
{if isset($htek_remote_phonebook_2_name) }
<P3312 para="RemotePhoneBook2.Name">{$htek_remote_phonebook_2_name}</P3312>
{else}
<P3312 para="RemotePhoneBook2.Name">Groups</P3312>
{/if}
{if isset($htek_remote_phonebook_3_url) }
<P4403 para="RemotePhoneBook3.Url">{$htek_remote_phonebook_3_url}</P4403>
{else}
<P4403 para="RemotePhoneBook3.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=extensions</P4403>
{/if}
{if isset($htek_remote_phonebook_3_name) }
<P3313 para="RemotePhoneBook3.Name">{$htek_remote_phonebook_3_name}</P3313>
{else}
<P3313 para="RemotePhoneBook3.Name">Extensions</P3313>
{/if}
<P4404 para="RemotePhoneBook4.Url" />
<P3314 para="RemotePhoneBook4.Name" />
<P4405 para="RemotePhoneBook5.Url" />
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<PhoneDirectory>
{foreach $contacts as $row}
{if $smarty.get.contacts == "users" && $row.category == "users"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
</DirectoryEntry>
{elseif $smarty.get.contacts == "all"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.category == "extensions"}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
{else}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
{/if}
</DirectoryEntry>
{/if}
{/foreach}
</PhoneDirectory>
@@ -896,12 +896,36 @@
<P8751 para="SoftKeyLayout.CustomSoftkey">1</P8751>
<!--Directory-->
<!--Directory/RemotePhoneBook-->
<P4401 para="RemotePhoneBook1.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users</P4401>
<P3316 para="RemotePhoneBook1.Name" />
<P4402 para="RemotePhoneBook2.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups</P4402>
<P3312 para="RemotePhoneBook2.Name" />
<P4403 para="RemotePhoneBook3.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions</P4403>
<P3313 para="RemotePhoneBook3.Name" />
{if isset($htek_remote_phonebook_1_url) }
<P4401 para="RemotePhoneBook1.Url">{$htek_remote_phonebook_1_url}</P4401>
{else}
<P4401 para="RemotePhoneBook1.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=users</P4401>
{/if}
{if isset($htek_remote_phonebook_1_name) }
<P3316 para="RemotePhoneBook1.Name">{$htek_remote_phonebook_1_name}</P3316>
{else}
<P3316 para="RemotePhoneBook1.Name">Users</P3316>
{/if}
{if isset($htek_remote_phonebook_2_url) }
<P4402 para="RemotePhoneBook2.Url">{$htek_remote_phonebook_2_url}</P4402>
{else}
<P4402 para="RemotePhoneBook2.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=groups</P4402>
{/if}
{if isset($htek_remote_phonebook_2_name) }
<P3312 para="RemotePhoneBook2.Name">{$htek_remote_phonebook_2_name}</P3312>
{else}
<P3312 para="RemotePhoneBook2.Name">Groups</P3312>
{/if}
{if isset($htek_remote_phonebook_3_url) }
<P4403 para="RemotePhoneBook3.Url">{$htek_remote_phonebook_3_url}</P4403>
{else}
<P4403 para="RemotePhoneBook3.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=extensions</P4403>
{/if}
{if isset($htek_remote_phonebook_3_name) }
<P3313 para="RemotePhoneBook3.Name">{$htek_remote_phonebook_3_name}</P3313>
{else}
<P3313 para="RemotePhoneBook3.Name">Extensions</P3313>
{/if}
<P4404 para="RemotePhoneBook4.Url" />
<P3314 para="RemotePhoneBook4.Name" />
<P4405 para="RemotePhoneBook5.Url" />
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<PhoneDirectory>
{foreach $contacts as $row}
{if $smarty.get.contacts == "users" && $row.category == "users"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
</DirectoryEntry>
{elseif $smarty.get.contacts == "all"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.category == "extensions"}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
{else}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
{/if}
</DirectoryEntry>
{/if}
{/foreach}
</PhoneDirectory>
@@ -896,12 +896,36 @@
<P8751 para="SoftKeyLayout.CustomSoftkey">1</P8751>
<!--Directory-->
<!--Directory/RemotePhoneBook-->
<P4401 para="RemotePhoneBook1.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users</P4401>
<P3316 para="RemotePhoneBook1.Name" />
<P4402 para="RemotePhoneBook2.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups</P4402>
<P3312 para="RemotePhoneBook2.Name" />
<P4403 para="RemotePhoneBook3.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions</P4403>
<P3313 para="RemotePhoneBook3.Name" />
{if isset($htek_remote_phonebook_1_url) }
<P4401 para="RemotePhoneBook1.Url">{$htek_remote_phonebook_1_url}</P4401>
{else}
<P4401 para="RemotePhoneBook1.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=users</P4401>
{/if}
{if isset($htek_remote_phonebook_1_name) }
<P3316 para="RemotePhoneBook1.Name">{$htek_remote_phonebook_1_name}</P3316>
{else}
<P3316 para="RemotePhoneBook1.Name">Users</P3316>
{/if}
{if isset($htek_remote_phonebook_2_url) }
<P4402 para="RemotePhoneBook2.Url">{$htek_remote_phonebook_2_url}</P4402>
{else}
<P4402 para="RemotePhoneBook2.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=groups</P4402>
{/if}
{if isset($htek_remote_phonebook_2_name) }
<P3312 para="RemotePhoneBook2.Name">{$htek_remote_phonebook_2_name}</P3312>
{else}
<P3312 para="RemotePhoneBook2.Name">Groups</P3312>
{/if}
{if isset($htek_remote_phonebook_3_url) }
<P4403 para="RemotePhoneBook3.Url">{$htek_remote_phonebook_3_url}</P4403>
{else}
<P4403 para="RemotePhoneBook3.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=extensions</P4403>
{/if}
{if isset($htek_remote_phonebook_3_name) }
<P3313 para="RemotePhoneBook3.Name">{$htek_remote_phonebook_3_name}</P3313>
{else}
<P3313 para="RemotePhoneBook3.Name">Extensions</P3313>
{/if}
<P4404 para="RemotePhoneBook4.Url" />
<P3314 para="RemotePhoneBook4.Name" />
<P4405 para="RemotePhoneBook5.Url" />
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<PhoneDirectory>
{foreach $contacts as $row}
{if $smarty.get.contacts == "users" && $row.category == "users"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "groups" && $row.category == "groups"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
</DirectoryEntry>
{elseif $smarty.get.contacts == "extensions" && $row.category == "extensions"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
</DirectoryEntry>
{elseif $smarty.get.contacts == "all"}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
{else}
<Name>{$row.effective_caller_id_name}</Name>
{/if}
{if $row.category == "extensions"}
{if $row.phone_number != ""}
<Telephone>{$row.phone_number}</Telephone>
{else}
<Telephone>{$row.phone_extension}</Telephone>
{/if}
{else}
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
<Telephone>{$number.phone_number}</Telephone>
{else}
<Telephone>{$number.phone_extension}</Telephone>
{/if}
{/foreach}
{/if}
</DirectoryEntry>
{/if}
{/foreach}
</PhoneDirectory>
@@ -896,12 +896,36 @@
<P8751 para="SoftKeyLayout.CustomSoftkey">1</P8751>
<!--Directory-->
<!--Directory/RemotePhoneBook-->
<P4401 para="RemotePhoneBook1.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=users</P4401>
<P3316 para="RemotePhoneBook1.Name" />
<P4402 para="RemotePhoneBook2.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=groups</P4402>
<P3312 para="RemotePhoneBook2.Name" />
<P4403 para="RemotePhoneBook3.Url">http://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=directory.xml&contacts=extensions</P4403>
<P3313 para="RemotePhoneBook3.Name" />
{if isset($htek_remote_phonebook_1_url) }
<P4401 para="RemotePhoneBook1.Url">{$htek_remote_phonebook_1_url}</P4401>
{else}
<P4401 para="RemotePhoneBook1.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=users</P4401>
{/if}
{if isset($htek_remote_phonebook_1_name) }
<P3316 para="RemotePhoneBook1.Name">{$htek_remote_phonebook_1_name}</P3316>
{else}
<P3316 para="RemotePhoneBook1.Name">Users</P3316>
{/if}
{if isset($htek_remote_phonebook_2_url) }
<P4402 para="RemotePhoneBook2.Url">{$htek_remote_phonebook_2_url}</P4402>
{else}
<P4402 para="RemotePhoneBook2.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=groups</P4402>
{/if}
{if isset($htek_remote_phonebook_2_name) }
<P3312 para="RemotePhoneBook2.Name">{$htek_remote_phonebook_2_name}</P3312>
{else}
<P3312 para="RemotePhoneBook2.Name">Groups</P3312>
{/if}
{if isset($htek_remote_phonebook_3_url) }
<P4403 para="RemotePhoneBook3.Url">{$htek_remote_phonebook_3_url}</P4403>
{else}
<P4403 para="RemotePhoneBook3.Url">https://{if isset($http_auth_username)}{$http_auth_username}:{$http_auth_password}@{/if}{$domain_name}/app/provision/?file=phonebook.xml&contacts=extensions</P4403>
{/if}
{if isset($htek_remote_phonebook_3_name) }
<P3313 para="RemotePhoneBook3.Name">{$htek_remote_phonebook_3_name}</P3313>
{else}
<P3313 para="RemotePhoneBook3.Name">Extensions</P3313>
{/if}
<P4404 para="RemotePhoneBook4.Url" />
<P3314 para="RemotePhoneBook4.Name" />
<P4405 para="RemotePhoneBook5.Url" />
@@ -920,7 +920,7 @@ phone_setting.page_tip =
phone_setting.logon_wizard =
#Enable or disable the phone to automatically dial out the dialed digits in the pre-dial interface; 0-Disabled (default), 1-Enabled;
phone_setting.predial_autodial = 1
phone_setting.predial_autodial = {$yealink_predial_autodial}
#Enable or disable customizing the softkey layout; 0-Disabled (default), 1-Enabled;
phone_setting.custom_softkey_enable =