Merge pull request #14 from fusionpbx/master

12
This commit is contained in:
blackc2004
2016-02-03 07:59:08 -08:00
30 changed files with 796 additions and 275 deletions

View File

@@ -54,7 +54,7 @@ if ($domains_processed == 1) {
$sql .= "'call_center', ";
$sql .= "'dir', ";
$sql .= "'".$_SESSION['switch']['conf']['dir']."/autoload_configs', ";
$sql .= "'true', ";
$sql .= "'false', ";
$sql .= "'' ";
$sql .= ")";
$db->exec(check_sql($sql));

View File

@@ -365,7 +365,7 @@ else {
echo "<optgroup label='Phrases'>\n";
foreach ($result as &$row) {
$selected = ($conference_center_greeting == "phrase:".$row["phrase_name"].".".$domain_uuid) ? true : false;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' ".(($selected) ? "selected='selected'" : null).">".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' ".(($selected) ? "selected='selected'" : null).">".$row["phrase_name"]."</option>\n";
if ($selected) { $tmp_selected = true; }
}
unset ($prep_statement);

View File

@@ -111,6 +111,9 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_user_record";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "extension_missed_call";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//$apps[$x]['permissions'][$y]['groups'][] = "admin";

View File

@@ -1729,42 +1729,44 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-user_record']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='user_record'>\n";
echo " <option value=''>".$text['label-user_record_none']."</option>\n";
if ($user_record == "all") {
echo " <option value='all' selected='selected'>".$text['label-user_record_all']."</option>\n";
if (permission_exists('extension_user_record')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-user_record']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='user_record'>\n";
echo " <option value=''>".$text['label-user_record_none']."</option>\n";
if ($user_record == "all") {
echo " <option value='all' selected='selected'>".$text['label-user_record_all']."</option>\n";
}
else {
echo " <option value='all'>".$text['label-user_record_all']."</option>\n";
}
if ($user_record == "local") {
echo " <option value='local' selected='selected'>".$text['label-user_record_local']."</option>\n";
}
else {
echo " <option value='local'>".$text['label-user_record_local']."</option>\n";
}
if ($user_record == "inbound") {
echo " <option value='inbound' selected='selected'>".$text['label-user_record_inbound']."</option>\n";
}
else {
echo " <option value='inbound'>".$text['label-user_record_inbound']."</option>\n";
}
if ($user_record == "outbound") {
echo " <option value='outbound' selected='selected'>".$text['label-user_record_outbound']."</option>\n";
}
else {
echo " <option value='outbound'>".$text['label-user_record_outbound']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-user_record']."\n";
echo "</td>\n";
echo "</tr>\n";
}
else {
echo " <option value='all'>".$text['label-user_record_all']."</option>\n";
}
if ($user_record == "local") {
echo " <option value='local' selected='selected'>".$text['label-user_record_local']."</option>\n";
}
else {
echo " <option value='local'>".$text['label-user_record_local']."</option>\n";
}
if ($user_record == "inbound") {
echo " <option value='inbound' selected='selected'>".$text['label-user_record_inbound']."</option>\n";
}
else {
echo " <option value='inbound'>".$text['label-user_record_inbound']."</option>\n";
}
if ($user_record == "outbound") {
echo " <option value='outbound' selected='selected'>".$text['label-user_record_outbound']."</option>\n";
}
else {
echo " <option value='outbound'>".$text['label-user_record_outbound']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-user_record']."\n";
echo "</td>\n";
echo "</tr>\n";
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
echo "<tr>\n";

View File

@@ -745,7 +745,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<optgroup label='Phrases'>\n";
foreach ($result as &$row) {
$selected = ($fax_send_greeting == "phrase:".$row["phrase_name"].".".$domain_uuid) ? true : false;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' ".(($selected) ? "selected='selected'" : null).">".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' ".(($selected) ? "selected='selected'" : null).">".$row["phrase_name"]."</option>\n";
if ($selected) { $tmp_selected = true; }
}
unset ($prep_statement);

View File

@@ -498,7 +498,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
*/
//select
if (if_group("superadmin")) {
if (!$tmp_selected) {
if (!$tmp_selected && strlen($ivr_menu_greet_long) > 0) {
echo "<optgroup label='Selected'>\n";
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_long)) {
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
@@ -562,10 +562,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
foreach ($result as &$row) {
if ($ivr_menu_greet_short == "phrase:".$row["phrase_name"].".".$domain_uuid) {
$tmp_selected = true;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' selected='selected'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' selected='selected'>".$row["phrase_name"]."</option>\n";
}
else {
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."'>".$row["phrase_name"]."</option>\n";
}
}
echo "</optgroup>\n";
@@ -901,10 +901,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
foreach ($result as &$row) {
if ($ivr_menu_invalid_sound == "phrase:".$row["phrase_name"].".".$domain_uuid) {
$tmp_selected = true;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' selected='selected'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' selected='selected'>".$row["phrase_name"]."</option>\n";
}
else {
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."'>".$row["phrase_name"]."</option>\n";
}
}
unset ($prep_statement);
@@ -933,7 +933,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//select
if (if_group("superadmin")) {
if (!$tmp_selected) {
if (!$tmp_selected && strlen($ivr_menu_invalid_sound) > 0) {
echo "<optgroup label='Selected'>\n";
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_invalid_sound)) {
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_invalid_sound."' selected='selected'>".$ivr_menu_invalid_sound."</option>\n";
@@ -997,10 +997,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
foreach ($result as &$row) {
if ($ivr_menu_exit_sound == "phrase:".$row["phrase_name"].".".$domain_uuid) {
$tmp_selected = true;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' selected='selected'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' selected='selected'>".$row["phrase_name"]."</option>\n";
}
else {
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."'>".$row["phrase_name"]."</option>\n";
}
}
unset ($prep_statement);
@@ -1029,7 +1029,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//select
if (if_group("superadmin")) {
if (!$tmp_selected) {
if (!$tmp_selected && strlen($ivr_menu_exit_sound) > 0) {
echo "<optgroup label='Selected'>\n";
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_exit_sound)) {
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_exit_sound."' selected='selected'>".$ivr_menu_exit_sound."</option>\n";

View File

@@ -44,6 +44,28 @@ $text['label-unload_module']['uk'] = "Вивантажити модуль";
$text['label-unload_module']['sv-se'] = "Ladda av Modul";
$text['label-unload_module']['de-at'] = "Modul deaktivieren";
$text['label-unknown']['en-us'] = "Unknown";
$text['label-unknown']['es-cl'] = "";
$text['label-unknown']['pt-pt'] = "";
$text['label-unknown']['fr-fr'] = "";
$text['label-unknown']['pt-br'] = "";
$text['label-unknown']['he'] = "";
$text['label-unknown']['pl'] = "";
$text['label-unknown']['uk'] = "";
$text['label-unknown']['sv-se'] = "";
$text['label-unknown']['de-at'] = "";
$text['label-none']['en-us'] = "None";
$text['label-none']['es-cl'] = "";
$text['label-none']['pt-pt'] = "";
$text['label-none']['fr-fr'] = "";
$text['label-none']['pt-br'] = "";
$text['label-none']['he'] = "";
$text['label-none']['pl'] = "";
$text['label-none']['uk'] = "";
$text['label-none']['sv-se'] = "";
$text['label-none']['de-at'] = "";
$text['label-stopped']['en-us'] = "Stopped";
$text['label-stopped']['es-cl'] = "Detenido";
$text['label-stopped']['pt-pt'] = "Parado";
@@ -220,4 +242,14 @@ $text['description-modules']['uk'] = "Модулі розширюють можл
$text['description-modules']['sv-se'] = "Moduler utökar funktionerna i systemet. Använd den här sidan för att aktivera eller inaktivera moduler.";
$text['description-modules']['de-at'] = "Module erweitern die Funktionalität des Systems. Benutzen Sie diese Seite um Module zu aktivieren oder zu deaktivieren.";
$text['error-event-socket']['en-us'] = "Connection to Event Socket failed.";
$text['error-event-socket']['es-cl'] = "Conexión a Socket de Eventos fallida.";
$text['error-event-socket']['pt-pt'] = "A ligação ao Event Socket falhou.";
$text['error-event-socket']['fr-fr'] = "Connexion à l'Event Socket en echec.";
$text['error-event-socket']['pt-br'] = "A conexão do evento socket falhou";
$text['error-event-socket']['pl'] = "Połączenie do “Event Socket” nie powiodło się";
$text['error-event-socket']['sv-se'] = "Kontakten till 'Event Socket' misslyckades.";
$text['error-event-socket']['uk'] = "Помилка підключення до сокета подій";
$text['error-event-socket']['de-at'] = "Connection to Event Socket failed.";
?>

View File

@@ -67,6 +67,27 @@ if (strlen($_GET["a"]) > 0) {
}
}
$esl_alive = false;
if($fp){
$esl_alive = true;
fclose($fp);
}
//Warning if FS not start
if(!$esl_alive){
$msg = "<div align='center'>".$text['error-event-socket']."<br /></div>";
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
echo "<tr>\n";
echo "<th align='left'>".$text['label-message']."</th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
}
//use the module class to get the list of modules from the db and add any missing modules
$mod = new modules;
$mod->db = $db;
@@ -157,18 +178,24 @@ if (strlen($_GET["a"]) > 0) {
echo $row["module_label"];
}
echo " </td>\n";
if ($mod->active($row["module_name"])) {
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-running']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href='modules.php?a=stop&m=".$row["module_name"]."' alt='".$text['label-stop']."'>".$text['label-stop']."</a></td>\n";
}
else {
if ($row['module_enabled']=="true") {
echo " <td valign='top' class='".$row_style[$c]."'><b>".$text['label-stopped']."</b></td>\n";
if($esl_alive) {
if ($mod->active($row["module_name"])) {
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-running']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href='modules.php?a=stop&m=".$row["module_name"]."' alt='".$text['label-stop']."'>".$text['label-stop']."</a></td>\n";
}
else {
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-stopped']." ".$notice."</td>\n";
if ($row['module_enabled']=="true") {
echo " <td valign='top' class='".$row_style[$c]."'><b>".$text['label-stopped']."</b></td>\n";
}
else {
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-stopped']." ".$notice."</td>\n";
}
echo " <td valign='top' class='".$row_style[$c]."'><a href='modules.php?a=start&m=".$row["module_name"]."' alt='".$text['label-start']."'>".$text['label-start']."</a></td>\n";
}
echo " <td valign='top' class='".$row_style[$c]."'><a href='modules.php?a=start&m=".$row["module_name"]."' alt='".$text['label-start']."'>".$text['label-start']."</a></td>\n";
}
else{
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-unknown']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-none']."</td>\n";
}
echo " <td valign='top' class='".$row_style[$c]."'>";
if ($row["module_enabled"] == "true") {

View File

@@ -90,22 +90,23 @@ include "root.php";
}
}
//recordings
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/")) {
$recordings_dir = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/";
if($dh = opendir($recordings_dir)) {
$tmp_selected = false;
$files = Array();
//$select .= "<optgroup label='recordings'>\n";
while($file = readdir($dh)) {
if($file != "." && $file != ".." && $file[0] != '.') {
if(is_dir($_SESSION['switch']['recordings']['dir'] . "/" . $file)) {
if(is_dir($recordings_dir . $file)) {
//this is a directory
}
else {
if ($this->select_value == $_SESSION['switch']['recordings']['dir']."/".$file && strlen($this->select_value) > 0) {
if ($this->select_value == $recordings_dir . $file && strlen($this->select_value) > 0) {
$tmp_selected = true;
$select .= " <option value='".$_SESSION['switch']['recordings']['dir']."/".$file."' selected='selected'>".$file."</option>\n";
$select .= " <option value='".$recordings_dir.$file."' selected='selected'>".$file."</option>\n";
}
else {
$select .= " <option value='".$_SESSION['switch']['recordings']['dir']."/".$file."'>".$file."</option>\n";
$select .= " <option value='".$recordings_dir.$file."'>".$file."</option>\n";
}
}
}

View File

@@ -42,7 +42,7 @@ function save_phrases_xml() {
}
//build xml
$xml .= " <macro name=\"".$row['phrase_name'].".".$domain_uuid."\">\n";
$xml .= " <macro name=\"".$row['phrase_uuid']."\">\n";
$xml .= " <input pattern=\"(.*)\">\n";
$xml .= " <match>\n";

View File

@@ -132,6 +132,12 @@ include "root.php";
case "aastra":
$mac = strtoupper($mac);
break;
case "cisco":
$mac = strtoupper($mac);
break;
case "linksys":
$mac = strtolower($mac);
break;
case "mitel":
$mac = strtoupper($mac);
break;
@@ -519,12 +525,12 @@ include "root.php";
$sql = "select user_uuid from v_extension_users ";
$sql .= "where extension_uuid = '$extension_uuid' ";
$sql .= "and domain_uuid = '$domain_uuid' ";
//echo $sql."\n";
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$extension_users = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($prep_statement);
foreach ($extension_users as &$row) {
//echo "user uuid: ".$row["user_uuid"]."\n";
//get the list of contacts [multiple results]
$sql = "select contact_uuid from v_contact_users ";
$sql .= "where user_uuid = '".$row["user_uuid"]."' ";
@@ -535,7 +541,7 @@ include "root.php";
$extension_users = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($prep_statement);
foreach ($extension_users as &$row) {
$contacts[] = $row["contact_uuid"];
$contact_uuids[] = $row["contact_uuid"];
}
}
}
@@ -543,23 +549,23 @@ include "root.php";
//get the contacts assigned to the user
//SQL 'in' with implode contacts array prevents returning duplicate contacts
if (sizeof($contacts) > 0) {
$sql = "select c.contact_organization, c.contact_name_given, c.contact_name_family, ";
$sql .= "p.phone_number, p.phone_extension ";
$sql .= "from v_contacts as c, v_contact_phones as p ";
$sql .= "where c.contact_uuid in ('".implode("','",$contacts)."') ";
$sql .= "and c.contact_uuid = p.contact_uuid ";
$sql .= "and p.phone_type_voice = '1' ";
$sql .= "and c.domain_uuid = '$domain_uuid' ";
//echo $sql."\n";
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$directory_personal = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($prep_statement);
//print_r($contacts);
//get the contact details
$sql = "select c.contact_organization, c.contact_name_given, c.contact_name_family, ";
$sql .= "p.phone_number, p.phone_extension ";
$sql .= "from v_contacts as c, v_contact_phones as p ";
$sql .= "where c.contact_uuid in ('".implode("','",$contact_uuids)."') ";
$sql .= "and c.contact_uuid = p.contact_uuid ";
$sql .= "and p.phone_type_voice = '1' ";
$sql .= "and c.domain_uuid = '$domain_uuid' ";
//echo $sql."\n";
$prep_statement = $this->db->prepare(check_sql($sql));
$prep_statement->execute();
$user_contacts = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($prep_statement);
//assign the contacts array
$view->assign("user_contacts", $user_contacts);
}
//assign the contacts array
$view->assign("directory_personal", $contacts);
}
//get the contact extensions array and add to the template engine

View File

@@ -173,9 +173,14 @@ include "root.php";
$tmp_config .= "\n";
$tmp_config .= " //pgsql: database connection information\n";
if ($this->global_settings->db_type() == "pgsql") {
$cmt_out = '';
if($this->global_settings->db_host() != 'localhost') { $cmt_out = "//"; }
$tmp_config .= " $cmt_out\$db_host = '".$this->global_settings->db_host()."'; //set the host only if the database is not local\n";
$db_host = $this->global_settings->db_host();
//Unix Socket - if localhost or 127.0.0.1 we want it to default to a Unix Socket.
//$comment_out = '';
//if ( $db_host == "localhost" or $db_host == "127.0.0.1") {
// $comment_out = "//";
//}
//$tmp_config .= " $comment_out\$db_host = '".$this->global_settings->db_host()."'; //set the host only if the database is not local\n";
$tmp_config .= " \$db_host = '".$this->global_settings->db_host()."'; //set the host only if the database is not local\n";
$tmp_config .= " \$db_port = '".$this->global_settings->db_port()."';\n";
$tmp_config .= " \$db_name = '".$this->global_settings->db_name()."';\n";
$tmp_config .= " \$db_username = '".$this->global_settings->db_username()."';\n";

View File

@@ -39,6 +39,7 @@ local log = require "resources.functions.log".ring_group
require "resources.functions.base64";
require "resources.functions.file_exists";
require "resources.functions.channel_utils"
require "resources.functions.format_ringback"
--get the variables
domain_name = session:getVariable("domain_name");
@@ -321,27 +322,7 @@ local log = require "resources.functions.log".ring_group
domain_name = row.domain_name;
--set ringback
if (ring_group_ringback == "${uk-ring}") then
ring_group_ringback = "tone_stream://%(400,200,400,450);%(400,2200,400,450);loops=-1";
end
if (ring_group_ringback == "${us-ring}") then
ring_group_ringback = "tone_stream://%(2000,4000,440.0,480.0);loops=-1";
end
if (ring_group_ringback == "${pt-ring}") then
ring_group_ringback = "tone_stream://%(1000,5000,400.0,0.0);loops=-1";
end
if (ring_group_ringback == "${fr-ring}") then
ring_group_ringback = "tone_stream://%(1500,3500,440.0,0.0);loops=-1";
end
if (ring_group_ringback == "${rs-ring}") then
ring_group_ringback = "tone_stream://%(1000,4000,425.0,0.0);loops=-1";
end
if (ring_group_ringback == "${it-ring}") then
ring_group_ringback = "tone_stream://%(1000,4000,425.0,0.0);loops=-1";
end
if (ring_group_ringback == "") then
ring_group_ringback = "local_stream://default";
end
ring_group_ringback = format_ringback(ring_group_ringback);
session:setVariable("ringback", ring_group_ringback);
session:setVariable("transfer_ringback", ring_group_ringback);

View File

@@ -24,6 +24,9 @@
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--include functions
require "resources.functions.format_ringback"
--get the cache
hostname = trim(api:execute("switchname", ""));
if (trim(api:execute("module_exists", "mod_memcache")) == "true") then
@@ -95,25 +98,9 @@
table.insert(xml, [[ <queue name="]]..queue_name..[[@]]..domain_name..[[">]]);
table.insert(xml, [[ <param name="strategy" value="]]..queue_strategy..[["/>]]);
if (string.len(queue_moh_sound) == 0) then
table.insert(xml, [[ <param name="moh-sound" value="local_stream://default"/>]]);
else
if (string.sub(queue_moh_sound, 0, 14) == 'tone_stream://' or string.sub(queue_moh_sound, 0, 2) == '${') then
--given this string --tone_stream://${us-ring};loops=-1 --return us-ring
a, b, tone_string = string.find(queue_moh_sound, ".*{(.*)}.*");
if (tone_string ~= nil) then
tone_string = trim(api:execute("global_getvar", tone_string));
table.insert(xml, [[ <param name="moh-sound" value="tone_stream://]]..tone_string..[[;loops=-1"/>]]);
end
elseif (string.sub(queue_moh_sound, 0, 15) == 'local_stream://') then
table.insert(xml, [[ <param name="moh-sound" value="]]..queue_moh_sound..[["/>]]);
else
if (queue_moh_sound == nil or queue_moh_sound == "") then
queue_moh_sound = "local_stream://default";
end
table.insert(xml, [[ <param name="moh-sound" value="]]..queue_moh_sound..[["/>]]);
end
end
--set ringback
queue_ringback = format_ringback(queue_moh_sound);
table.insert(xml, [[ <param name="moh-sound" value="]]..queue_ringback..[["/>]]);
if (queue_record_template ~= nil) then
table.insert(xml, [[ <param name="record-template" value="]]..queue_record_template..[["/>]]);
end

View File

@@ -13,7 +13,7 @@
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
@@ -77,7 +77,155 @@
ivr_menu_description = row["ivr_menu_description"];
end);
--recording path
--get the recordings from the database
ivr_menu_greet_long_is_base64 = false;
ivr_menu_greet_short_is_base64 = false;
ivr_menu_invalid_sound_is_base64 = false;
ivr_menu_exit_sound_is_base64 = false;
if (storage_type == "base64") then
--greet long
if (string.len(ivr_menu_greet_long) > 1) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_greet_long..[[' ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."\n");
end
status = dbh:query(sql, function(row)
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long;
ivr_menu_greet_long_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
local file = io.open(ivr_menu_greet_long, "w");
file:write(base64.decode(row["recording_base64"]));
file:close();
end
end);
end
end
--greet short
if (string.len(ivr_menu_greet_short) > 1) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_greet_short..[[' ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."\n");
end
status = dbh:query(sql, function(row)
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_short;
ivr_menu_greet_short_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
local file = io.open(ivr_menu_greet_short, "w");
file:write(base64.decode(row["recording_base64"]));
file:close();
end
end);
end
end
--invalid sound
if (string.len(ivr_menu_invalid_sound) > 1) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_invalid_sound)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_invalid_sound..[[' ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."\n");
end
status = dbh:query(sql, function(row)
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_invalid_sound = recordings_dir..domain_name.."/".."/"..ivr_menu_invalid_sound;
ivr_menu_invalid_sound_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
local file = io.open(ivr_menu_invalid_sound, "w");
file:write(base64.decode(row["recording_base64"]));
file:close();
end
end);
end
end
--exit sound
if (string.len(ivr_menu_exit_sound) > 1) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_exit_sound)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_exit_sound..[[' ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[ivr_menu] SQL: "..sql.."\n");
end
status = dbh:query(sql, function(row)
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_exit_sound;
ivr_menu_exit_sound_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
local file = io.open(ivr_menu_exit_sound, "w");
file:write(base64.decode(row["recording_base64"]));
file:close();
end
end);
end
end
elseif (storage_type == "http_cache") then
--add the path to file name
ivr_menu_greet_long = storage_path.."/"..ivr_menu_greet_long;
ivr_menu_greet_short = storage_path.."/"..ivr_menu_greet_short;
ivr_menu_invalid_sound = storage_path.."/"..ivr_menu_invalid_sound;
ivr_menu_exit_sound = storage_path.."/"..ivr_menu_exit_sound;
end
--greet long
if (not file_exists(ivr_menu_greet_long)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long)) then
ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long;
elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_long)) then
ivr_menu_greet_long = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_long;
end
end
--greet short
if (string.len(ivr_menu_greet_short) > 1) then
if (not file_exists(ivr_menu_greet_short)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long)) then
ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..ivr_menu_greet_long;
elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_greet_long)) then
ivr_menu_greet_short = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_greet_long;
end
end
else
ivr_menu_greet_short = ivr_menu_greet_long;
end
--invalid sound
if (not file_exists(ivr_menu_invalid_sound)) then
if (file_exists(recordings_dir.."/"..domain_name.. "/"..ivr_menu_invalid_sound)) then
ivr_menu_invalid_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_invalid_sound;
elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_invalid_sound)) then
ivr_menu_invalid_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_invalid_sound;
end
end
--exit sound
if (not file_exists(ivr_menu_exit_sound)) then
if (file_exists(recordings_dir.."/"..ivr_menu_exit_sound)) then
ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..ivr_menu_exit_sound;
elseif (file_exists(sounds_dir.."/en/us/callie/8000/"..ivr_menu_exit_sounde)) then
ivr_menu_exit_sound = sounds_dir.."/${default_language}/${default_dialect}/${default_voice}/"..ivr_menu_exit_sound;
end
end
--start the xml array
local xml = {}

View File

@@ -339,10 +339,10 @@
table.insert(xml, [[<document type="freeswitch/xml">]]);
table.insert(xml, [[ <section name="directory">]]);
table.insert(xml, [[ <domain name="]] .. domain_name .. [[" alias="true">]]);
table.insert(xml, [[ <params>]]);
table.insert(xml, [[ <param name="jsonrpc-allowed-methods" value="verto"/>]]);
table.insert(xml, [[ <param name="jsonrpc-allowed-event-channels" value="demo,conference,presence"/>]]);
table.insert(xml, [[ </params>]]);
table.insert(xml, [[ <params>]]);
table.insert(xml, [[ <param name="jsonrpc-allowed-methods" value="verto"/>]]);
table.insert(xml, [[ <param name="jsonrpc-allowed-event-channels" value="demo,conference,presence"/>]]);
table.insert(xml, [[ </params>]]);
table.insert(xml, [[ <groups>]]);
table.insert(xml, [[ <group name="default">]]);
table.insert(xml, [[ <users>]]);

View File

@@ -40,6 +40,9 @@
require "resources.functions.database_handle";
dbh = database_handle('system');
--include functions
require "resources.functions.format_ringback"
--settings
require "resources.functions.settings";
settings = settings(domain_uuid);
@@ -88,40 +91,14 @@
if (not default_dialect) then default_dialect = 'us'; end
if (not default_voice) then default_voice = 'callie'; end
--set ringback
directory_ringback = format_ringback(session:getVariable("ringback"));
session:setVariable("ringback", directory_ringback);
session:setVariable("transfer_ringback", directory_ringback);
--set the sounds path for the language, dialect and voice
ringback = session:getVariable("ringback");
if (ringback) then
ringback = ringback:gsub("$", "");
ringback = ringback:gsub("{", "");
ringback = ringback:gsub("}", "");
end
session:setVariable("instant_ringback", "true");
session:setVariable("ignore_early_media", "true");
if (not ringback) then
session:execute("set", "ringback=local_stream://default"); --set to ringtone
session:execute("set", "transfer_ringback=local_stream://default"); --set to ringtone
elseif (ringback == "uk-ring") then
session:setVariable("ringback", "%(400,200,400,450);%(400,2200,400,450)");
session:setVariable("transfer_ringback", "%(400,200,400,450);%(400,2200,400,450)");
elseif (ringback == "us-ring") then
session:setVariable("ringback", "%(2000, 4000, 440.0, 480.0)");
session:setVariable("transfer_ringback", "%(2000, 4000, 440.0, 480.0)");
elseif (ringback == "pt-ring") then
session:setVariable("ringback", "%(1000, 5000, 400.0, 0.0)");
session:setVariable("transfer_ringback", "%(1000, 5000, 400.0, 0.0)");
elseif (ringback == "fr-ring") then
session:setVariable("ringback", "%(1500, 3500, 440.0, 0.0)");
session:setVariable("transfer_ringback", "%(1500, 3500, 440.0, 0.0)");
elseif (ringback == "rs-ring") then
session:setVariable("ringback", "%(1000, 4000, 425.0, 0.0)");
session:setVariable("transfer_ringback", "%(1000, 4000, 425.0, 0.0)");
elseif (ringback == "it-ring") then
session:setVariable("ringback", "%(1000, 4000, 425.0, 0.0)");
session:setVariable("transfer_ringback", "%(1000, 4000, 425.0, 0.0)");
else
session:execute("set", "ringback=local_stream://default"); --set to ringtone
session:execute("set", "transfer_ringback=local_stream://default"); --set to ringtone
end
--define the sounds directory
sounds_dir = session:getVariable("sounds_dir");

View File

@@ -13,7 +13,7 @@
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
@@ -38,6 +38,9 @@
require "resources.functions.database_handle";
dbh = database_handle('system');
--include functions
require "resources.functions.format_ringback"
--get the variables
domain_name = session:getVariable("domain_name");
context = session:getVariable("context");
@@ -76,8 +79,6 @@
end
end
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
--set default variable(s)
tries = 0;
@@ -135,27 +136,7 @@
end
--set ringback
if (ivr_menu_ringback == "${uk-ring}") then
ivr_menu_ringback = "tone_stream://%(400,200,400,450);%(400,2200,400,450);loops=-1";
end
if (ivr_menu_ringback == "${us-ring}") then
ivr_menu_ringback = "tone_stream://%(2000,4000,440.0,480.0);loops=-1";
end
if (ivr_menu_ringback == "${pt-ring}") then
ivr_menu_ringback = "tone_stream://%(1000,5000,400.0,0.0);loops=-1";
end
if (ivr_menu_ringback == "${fr-ring}") then
ivr_menu_ringback = "tone_stream://%(1500,3500,440.0,0.0);loops=-1";
end
if (ivr_menu_ringback == "${rs-ring}") then
ivr_menu_ringback = "tone_stream://%(1000,4000,425.0,0.0);loops=-1";
end
if (ivr_menu_ringback == "${it-ring}") then
ivr_menu_ringback = "tone_stream://%(1000,4000,425.0,0.0);loops=-1";
end
if (ivr_menu_ringback == nil or ivr_menu_ringback == "") then
ivr_menu_ringback = "local_stream://default";
end
ivr_menu_ringback = format_ringback(ivr_menu_ringback);
session:setVariable("ringback", ivr_menu_ringback);
session:setVariable("transfer_ringback", ivr_menu_ringback);
@@ -202,7 +183,7 @@
if (storage_type == "base64") then
--greet long
if (string.len(ivr_menu_greet_long) > 1) then
if (not file_exists(recordings_dir.."/"..greet_long_file_name)) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..greet_long_file_name)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..greet_long_file_name..[[' ]];
@@ -213,7 +194,7 @@
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_greet_long = recordings_dir.."/"..greet_long_file_name;
ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..greet_long_file_name;
ivr_menu_greet_long_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
@@ -226,7 +207,7 @@
end
--greet short
if (string.len(ivr_menu_greet_short) > 1) then
if (not file_exists(recordings_dir.."/"..greet_short_file_name)) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..greet_short_file_name)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..greet_short_file_name..[[' ]];
@@ -237,7 +218,7 @@
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_greet_short = recordings_dir.."/"..greet_short_file_name;
ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..greet_short_file_name;
ivr_menu_greet_short_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
@@ -250,7 +231,7 @@
end
--invalid sound
if (string.len(ivr_menu_invalid_sound) > 1) then
if (not file_exists(recordings_dir.."/"..invalid_sound_file_name)) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..invalid_sound_file_name)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..invalid_sound_file_name..[[' ]];
@@ -261,7 +242,7 @@
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_invalid_sound = recordings_dir.."/"..invalid_sound_file_name;
ivr_menu_invalid_sound = recordings_dir.."/"..domain_name.."/"..invalid_sound_file_name;
ivr_menu_invalid_sound_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
@@ -274,7 +255,7 @@
end
--exit sound
if (string.len(ivr_menu_exit_sound) > 1) then
if (not file_exists(recordings_dir.."/"..exit_sound_file_name)) then
if (not file_exists(recordings_dir.."/"..domain_name.."/"..exit_sound_file_name)) then
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..exit_sound_file_name..[[' ]];
@@ -285,7 +266,7 @@
--add functions
require "resources.functions.base64";
--add the path to filename
ivr_menu_exit_sound = recordings_dir.."/"..exit_sound_file_name;
ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..exit_sound_file_name;
ivr_menu_exit_sound_is_base64 = true;
--save the recording to the file system
if (string.len(row["recording_base64"]) > 32) then
@@ -307,19 +288,19 @@
--adjust file paths
--greet long
if (not file_exists(ivr_menu_greet_long)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_long_file_name)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..greet_long_file_name)) then
ivr_menu_greet_long = recordings_dir.."/"..domain_name.."/"..greet_long_file_name;
elseif (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_long_file_name)) then
ivr_menu_greet_long = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_long_file_name;
elseif (file_exists(recordings_dir.."/"..greet_long_file_name)) then
ivr_menu_greet_long = recordings_dir.."/"..greet_long_file_name;
end
end
--greet short
if (string.len(ivr_menu_greet_short) > 1) then
if (not file_exists(ivr_menu_greet_short)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_short_file_name)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..greet_short_file_name)) then
ivr_menu_greet_short = recordings_dir.."/"..domain_name.."/"..greet_short_file_name;
elseif (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_short_file_name)) then
ivr_menu_greet_short = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..greet_short_file_name;
elseif (file_exists(recordings_dir.."/"..greet_short_file_name)) then
ivr_menu_greet_short = recordings_dir.."/"..greet_short_file_name;
end
end
else
@@ -327,18 +308,18 @@
end
--invalid sound
if (not file_exists(ivr_menu_invalid_sound)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..invalid_sound_file_name)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..invalid_sound_file_name)) then
ivr_menu_invalid_sound = recordings_dir.."/"..domain_name.."/"..invalid_sound_file_name;
elseif (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..invalid_sound_file_name)) then
ivr_menu_invalid_sound = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..invalid_sound_file_name;
elseif (file_exists(recordings_dir.."/"..invalid_sound_file_name)) then
ivr_menu_invalid_sound = recordings_dir.."/"..invalid_sound_file_name;
end
end
--exit sound
if (not file_exists(ivr_menu_exit_sound)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..exit_sound_file_name)) then
if (file_exists(recordings_dir.."/"..domain_name.."/"..exit_sound_file_name)) then
ivr_menu_exit_sound = recordings_dir.."/"..domain_name.."/"..exit_sound_file_name;
elseif (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..exit_sound_file_name)) then
ivr_menu_exit_sound = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..exit_sound_file_name;
elseif (file_exists(recordings_dir.."/"..exit_sound_file_name)) then
ivr_menu_exit_sound = recordings_dir.."/"..exit_sound_file_name;
end
end

View File

@@ -9,11 +9,15 @@
require "resources.functions.trim";
local api = api
if (not api) and freeswitch then api = freeswitch.API() else
api = {}
function api:execute()
return '-ERR UNSUPPORTTED'
end
if not api then
if freeswitch then
api = freeswitch.API()
else
api = {}
function api:execute()
return '-ERR UNSUPPORTTED'
end
end
end
local function send_event(action, key)

View File

@@ -0,0 +1,26 @@
--add the format_ringback function
function format_ringback (ringback)
--include trim
require "resources.functions.trim";
--prepare the api object
api = freeswitch.API();
--handle ringback
if (ringback == nil or ringback == "") then
--get the default ring back
ringback = trim(api:execute("global_getvar", "hold_music"));
elseif (ringback:match("%${.*}")) then
--strip the ${ and }
ringback = ringback:gsub("%${", "");
ringback = ringback:gsub("}", "");
--get the ringback variable
ringback = trim(api:execute("global_getvar", ringback));
--fallback to us-ring
if (ringback == "") then
ringback = trim(api:execute("global_getvar", "us-ring"));
end
--convert to tone_stream
ringback = "tone_stream://" .. ringback .. ";loops=-1";
end
return ringback;
end

View File

@@ -54,9 +54,7 @@
end
--set the recordings directory
if (domain_count > 1) then
recordings_dir = recordings_dir .. "/"..domain_name;
end
recordings_dir = recordings_dir .. "/"..domain_name;
--check if a file exists
require "resources.functions.file_exists";
@@ -139,6 +137,7 @@
end
session:setInputCallback("on_dtmf", "");
session:streamFile(file_name);
session:unsetInputCallback();
end
--if base64, remove temp file (increases responsiveness when files remain local)

View File

@@ -24,7 +24,7 @@
</modem-settings>
<fax-settings>
<param name="use-ecm" value="true"/>
<param name="use-ecm" value="false"/>
<param name="verbose" value="false"/>
<param name="disable-v17" value="false"/>
<param name="ident" value="SpanDSP Fax Ident"/>

View File

@@ -2,7 +2,7 @@
<Title>Personal</Title>
<Prompt>Please choose...</Prompt>
{assign var=x value=1}
{foreach $directory_personal as $row}
{foreach $user_contacts as $row}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
@@ -18,7 +18,3 @@
{assign var=x value=$x+1}
{/foreach}
</CiscoIPPhoneDirectory>

View File

@@ -2,7 +2,7 @@
<Title>Personal</Title>
<Prompt>Please choose...</Prompt>
{assign var=x value=1}
{foreach $directory_personal as $row}
{foreach $user_contacts as $row}
<DirectoryEntry>
{if $row.contact_name_given != ""}
<Name>{$row.contact_name_given} {$row.contact_name_family}</Name>
@@ -18,7 +18,3 @@
{assign var=x value=$x+1}
{/foreach}
</CiscoIPPhoneDirectory>

View File

@@ -266,31 +266,22 @@
<pbaddr60></pbaddr60>
<snmp>0</snmp>
<srtp>0</srtp>
<pkDescription>
<Key Line="25" Fea="6" Des="Line 1" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="26" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="27" Fea="7" Des="Line 2" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="28" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="29" Fea="8" Des="Line 3" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="30" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="31" Fea="9" Des="Line 4" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="32" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="33" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="34" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="35" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="36" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="37" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="38" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="39" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="40" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<!--<Key Line="41" Fea="19" Des="Weather" Addr="http://weather.yahooapis.com/forecastrss?p=CAXX0343" Addr2="" Mode="1" Mode2="1" UserID=""></Key>-->
<Key Line="42" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="43" Fea="4" Des="Headset" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="44" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="45" Fea="3" Des="Advisory" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="46" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="47" Fea="2" Des="Call logs" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="48" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<pkDescription>
{foreach $keys as $row}
{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if}
{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if}
{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if}
{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if}
{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if}
{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if}
{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if}
{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if}
{if $row.device_key_type == "6"}
<Key Line="{$row.device_key_id}" Fea="{$feature}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{else}
<Key Line="{$row.device_key_id}" Fea="{$row.device_key_type}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{/if}
{/foreach}
</pkDescription>
<webdialurl></webdialurl>
<cw_tone>1</cw_tone>

View File

@@ -0,0 +1,12 @@
<Parameter Model="5324">
<tftp_config>2</tftp_config>
<http_download>{$domain_name}/app/provision</http_download>
</Parameter>
<Parameter Model="5330">
<tftp_config>2</tftp_config>
<http_download>{$domain_name}/app/provision</http_download>
</Parameter>
<Parameter Model="5340">
<tftp_config>2</tftp_config>
<http_download>{$domain_name}/app/provision</http_download>
</Parameter>

View File

@@ -0,0 +1,356 @@
<Parameter Model="5340">
<dhcpenable>1</dhcpenable>
{if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config>
{/if}<pppoe_enable>0</pppoe_enable>
<tftp_task_enable>1</tftp_task_enable>
<boot_version>02.00.00.24</boot_version>
<image_version>R7.2.02.00.00.24</image_version>
<tftp_upgrade>0</tftp_upgrade>
<http_upgrade>0</http_upgrade>
<outbound_state>0</outbound_state>
<local_sip_port>5060</local_sip_port>
<tos>0</tos>
<e802_priority>-1</e802_priority>
{if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id>
{/if}<host_name>sip1</host_name>
<domain>-example.com</domain>
<addr_type>0</addr_type>
<hot_line>0</hot_line>
<hot_address>operator@example.com</hot_address>
<hot_addr_type>0</hot_addr_type>
<tls_private_url></tls_private_url>
<tls_certificate_url></tls_certificate_url>
<tls_ca_cert_url></tls_ca_cert_url>
<tls_root_cert_url></tls_root_cert_url>
<tls_certificate></tls_certificate>
<tls_ca_cert></tls_ca_cert>
<tls_root_cert></tls_root_cert>
<poundkeydial>1</poundkeydial>
<dialtonekey>12</dialtonekey>
<htmlpuseraccess>1</htmlpuseraccess>
<remote_reboot>1</remote_reboot>
<checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive>
<rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip>
<video_ip>135.199.77.12</video_ip>
<sntp>128.138.141.172</sntp>
<time_zone>{$mitel_time_zone}</time_zone>
<auth_method>2</auth_method>
<register_expire>120</register_expire>
<emerg_number></emerg_number>
<emerg_ip>0.0.0.0</emerg_ip>
<emerg_port>5060</emerg_port>
<audio_codec>5</audio_codec>
<audio_pkt_size>20</audio_pkt_size>
<video_codec>0</video_codec>
<dtmf_type>0</dtmf_type>
<dtmf_payload>101</dtmf_payload>
<advisorymsg>0</advisorymsg>
<reasons>0</reasons>
<other_reason></other_reason>
<do_not_disturb>0</do_not_disturb>
<noans_fwd_mode>0</noans_fwd_mode>
<try_ring_nums>10</try_ring_nums>
<noans_fwd_addr></noans_fwd_addr>
<beep_on_hold>1</beep_on_hold>
<on_hold_alert>60</on_hold_alert>
<system_mode>0</system_mode>
<pppoe_login></pppoe_login>
<pppoe_passwd>******</pppoe_passwd>
<callCountIn>0</callCountIn>
<callCountOut>0</callCountOut>
<discovery>0</discovery>
<pbIndex>0</pbIndex>
<adminId>admin</adminId>
<admin_dispname>Administrator</admin_dispname>
<admin_passwd>510731ac096ebcb3989fb1ed5b7075bb</admin_passwd>
<busy_fwd_mode>0</busy_fwd_mode>
<busy_fwd_addr></busy_fwd_addr>
<always_fwd_mode>0</always_fwd_mode>
<always_fwd_addr></always_fwd_addr>
<pcport>0</pcport>
<lanport>0</lanport>
<lcd>4</lcd>
<rdkw1></rdkw1>
<rdringtype1>0</rdringtype1>
<rdvmail1>0</rdvmail1>
<rdblock1>0</rdblock1>
<rdkw2></rdkw2>
<rdringtype2>0</rdringtype2>
<rdvmail2>0</rdvmail2>
<rdblock2>0</rdblock2>
<rdkw3></rdkw3>
<rdringtype3>0</rdringtype3>
<rdvmail3>0</rdvmail3>
<rdblock3>0</rdblock3>
<rdkw4></rdkw4>
<rdringtype4>0</rdringtype4>
<rdvmail4>0</rdvmail4>
<rdblock4>0</rdblock4>
<rdkw5></rdkw5>
<rdringtype5>0</rdringtype5>
<rdvmail5>0</rdvmail5>
<rdblock5>0</rdblock5>
<dtringtype1>0</dtringtype1>
<dtringtype2>0</dtringtype2>
<dtringtype3>0</dtringtype3>
<dtringtype4>0</dtringtype4>
<dtringtype5>0</dtringtype5>
<dtringtype6>0</dtringtype6>
<dtringtype7>0</dtringtype7>
<dtringtype8>0</dtringtype8>
<dtringtype9>0</dtringtype9>
<dtringtype10>0</dtringtype10>
<dtringtype11>0</dtringtype11>
<dtringtype12>0</dtringtype12>
<http_task_enable>1</http_task_enable>
<https_task_enable>0</https_task_enable>
<httpport>80</httpport>
<httpsport>443</httpsport>
<telnet_task_enable>1</telnet_task_enable>
<voicemail_ringnum>4</voicemail_ringnum>
<gruu_ctl>1</gruu_ctl>
<proxyrequire_ctl>0</proxyrequire_ctl>
<fwEnable>0</fwEnable>
<fwWanurl></fwWanurl>
<sym_udp>0</sym_udp>
<stunip>213.192.59.75</stunip>
<fwWanDurl></fwWanDurl>
<fwMode>0</fwMode>
<start_port>20000</start_port>
<end_port>20998</end_port>
<multi_user_enable>0</multi_user_enable>
<upgrade>0</upgrade>
<bksrvtm>3</bksrvtm>
<ntfcfg>0</ntfcfg>
<lancode>en_US</lancode>
<tonecode>US</tonecode>
<dsmode>1</dsmode>
<dsmonth>3</dsmonth>
<dsweek>2</dsweek>
<dsday>1</dsday>
<dsemonth>11</dsemonth>
<dseweek>1</dseweek>
<dseday>1</dseday>
<ds_transition_time>2</ds_transition_time>
<flashVer>201</flashVer>
<http_download>{$domain_name}/app/provision</http_download>
<tftp></tftp>
<downloadtype>1</downloadtype>
<dialpl></dialpl>
<gtEnable>0</gtEnable>
<dtimer>3</dtimer>
<autoanswer>0</autoanswer>
<ringPitch>0</ringPitch>
<keysys_enable>0</keysys_enable>
<pbName1></pbName1>
<pbaddr1></pbaddr1>
<pbName2></pbName2>
<pbaddr2></pbaddr2>
<pbName3></pbName3>
<pbaddr3></pbaddr3>
<pbName4></pbName4>
<pbaddr4></pbaddr4>
<pbName5></pbName5>
<pbaddr5></pbaddr5>
<pbName6></pbName6>
<pbaddr6></pbaddr6>
<pbName7></pbName7>
<pbaddr7></pbaddr7>
<pbName8></pbName8>
<pbaddr8></pbaddr8>
<pbName9></pbName9>
<pbaddr9></pbaddr9>
<pbName10></pbName10>
<pbaddr10></pbaddr10>
<pbName11></pbName11>
<pbaddr11></pbaddr11>
<pbName12></pbName12>
<pbaddr12></pbaddr12>
<pbName13></pbName13>
<pbaddr13></pbaddr13>
<pbName14></pbName14>
<pbaddr14></pbaddr14>
<pbName15></pbName15>
<pbaddr15></pbaddr15>
<pbName16></pbName16>
<pbaddr16></pbaddr16>
<pbName17></pbName17>
<pbaddr17></pbaddr17>
<pbName18></pbName18>
<pbaddr18></pbaddr18>
<pbName19></pbName19>
<pbaddr19></pbaddr19>
<pbName20></pbName20>
<pbaddr20></pbaddr20>
<pbName21></pbName21>
<pbaddr21></pbaddr21>
<pbName22></pbName22>
<pbaddr22></pbaddr22>
<pbName23></pbName23>
<pbaddr23></pbaddr23>
<pbName24></pbName24>
<pbaddr24></pbaddr24>
<pbName25></pbName25>
<pbaddr25></pbaddr25>
<pbName26></pbName26>
<pbaddr26></pbaddr26>
<pbName27></pbName27>
<pbaddr27></pbaddr27>
<pbName28></pbName28>
<pbaddr28></pbaddr28>
<pbName29></pbName29>
<pbaddr29></pbaddr29>
<pbName30></pbName30>
<pbaddr30></pbaddr30>
<pbName31></pbName31>
<pbaddr31></pbaddr31>
<pbName32></pbName32>
<pbaddr32></pbaddr32>
<pbName33></pbName33>
<pbaddr33></pbaddr33>
<pbName34></pbName34>
<pbaddr34></pbaddr34>
<pbName35></pbName35>
<pbaddr35></pbaddr35>
<pbName36></pbName36>
<pbaddr36></pbaddr36>
<pbName37></pbName37>
<pbaddr37></pbaddr37>
<pbName38></pbName38>
<pbaddr38></pbaddr38>
<pbName39></pbName39>
<pbaddr39></pbaddr39>
<pbName40></pbName40>
<pbaddr40></pbaddr40>
<pbName41></pbName41>
<pbaddr41></pbaddr41>
<pbName42></pbName42>
<pbaddr42></pbaddr42>
<pbName43></pbName43>
<pbaddr43></pbaddr43>
<pbName44></pbName44>
<pbaddr44></pbaddr44>
<pbName45></pbName45>
<pbaddr45></pbaddr45>
<pbName46></pbName46>
<pbaddr46></pbaddr46>
<pbName47></pbName47>
<pbaddr47></pbaddr47>
<pbName48></pbName48>
<pbaddr48></pbaddr48>
<pbName49></pbName49>
<pbaddr49></pbaddr49>
<pbName50></pbName50>
<pbaddr50></pbaddr50>
<pbName51></pbName51>
<pbaddr51></pbaddr51>
<pbName52></pbName52>
<pbaddr52></pbaddr52>
<pbName53></pbName53>
<pbaddr53></pbaddr53>
<pbName54></pbName54>
<pbaddr54></pbaddr54>
<pbName55></pbName55>
<pbaddr55></pbaddr55>
<pbName56></pbName56>
<pbaddr56></pbaddr56>
<pbName57></pbName57>
<pbaddr57></pbaddr57>
<pbName58></pbName58>
<pbaddr58></pbaddr58>
<pbName59></pbName59>
<pbaddr59></pbaddr59>
<pbName60></pbName60>
<pbaddr60></pbaddr60>
<snmp>0</snmp>
<srtp>0</srtp>
<pkDescription>
{foreach $keys as $row}
{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if}
{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if}
{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if}
{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if}
{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if}
{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if}
{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if}
{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if}
{if $row.device_key_type == "6"}
<Key Line="{$row.device_key_id}" Fea="{$feature}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{else}
<Key Line="{$row.device_key_id}" Fea="{$row.device_key_type}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{/if}
{/foreach}
</pkDescription>
<webdialurl></webdialurl>
<cw_tone>1</cw_tone>
<missedcallsctl>1</missedcallsctl>
<callforwardctl>1</callforwardctl>
<lcdbacklightctl>1</lcdbacklightctl>
<time_format>1</time_format>
<csta_enable>0</csta_enable>
<csta_passwd>******</csta_passwd>
<cfg_poll_timer>1440</cfg_poll_timer>
<reboot_phone>1</reboot_phone>
<firmware_timer>1440</firmware_timer>
<firmware_abs_timer_hr>23</firmware_abs_timer_hr>
<firmware_abs_timer_min>59</firmware_abs_timer_min>
<firmware_abs_enable>1</firmware_abs_enable>
<installer_passcode></installer_passcode>
<user_passwd>5d41402abc4b2a76b9719d911017c592</user_passwd>
<web_logo1></web_logo1>
<!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>-->
<sip_mode>sip</sip_mode>
<voicemail_key>{$voicemail_number}</voicemail_key>
<html_enable>1</html_enable>
<html_filename></html_filename>
<facDef>90</facDef>
<user_list>
{foreach $lines as $row}
<User State="1"
ID="{$row.user_id}"
DispName="{$row.display_name}"
Pwd="{$row.password}"
AuthName="{$row.auth_id}"
Realm=""
RegSvr="{$row.server_address}"
RegPort="{$row.sip_port}"
RegScheme="2"
ProxySvr="{$row.server_address}"
ProxyPort="{$row.sip_port}"
ProxyScheme="2"
VMSvr="{$row.server_address}"
VMPort="{$row.sip_port}"
VMScheme="2"
{if isset($row.outbound_proxy)}OutSvr = "{$row.outbound_proxy}"{else}OutSvr=""{/if}
OutPort="{$row.sip_port}"
OutCtr="0"
Ring="1"
Line="0"
EventSvr=""
EventPort="{$row.sip_port}"
EventScheme="2"
NatMode="0"
NatType="option"
NatIp="0">
</User>
{/foreach}
<!--
<User State="1" ID="user" DispName="disp username" Pwd="hello" AuthName="user" Realm="" RegSvr="" RegPort="5060" RegScheme="2" ProxySvr="" ProxyPort="5060" ProxyScheme="2" VMSvr="" VMPort="5060" VMScheme="2" OutSvr="" OutPort="5060" OutCtr="0" Ring="1" Line="0" EventSvr="" EventPort="5060" EventScheme="2" NatMode="0" NatType="option" NatIp="0"></User>
-->
</user_list>
<!--
<ipadr>10.7.0.12</ipadr>
<ipgateway>10.7.0.1</ipgateway>
<ipmask>255.255.255.0</ipmask>
<dhcpLease>86400</dhcpLease>
<dhcpT1>43200</dhcpT1>
<dhcpT2>75600</dhcpT2>
<dhcpSrv>10.7.0.1</dhcpSrv>
<ipdns>10.7.0.1</ipdns>
<ipscddns>0.0.0.0</ipscddns>
-->
<cfg_version>7.2</cfg_version>
</Parameter>

View File

@@ -1,4 +1,4 @@
<Parameter Model="5340">
<Parameter Model="5324">
<dhcpenable>1</dhcpenable>
{if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config>
{/if}<pppoe_enable>0</pppoe_enable>
@@ -266,31 +266,22 @@
<pbaddr60></pbaddr60>
<snmp>0</snmp>
<srtp>0</srtp>
<pkDescription>
<Key Line="25" Fea="6" Des="Line 1" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="26" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="27" Fea="7" Des="Line 2" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="28" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="29" Fea="8" Des="Line 3" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="30" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="31" Fea="9" Des="Line 4" Addr="" Addr2="" Mode="1" Mode2="1" UserID="{$user_id_1}"></Key>
<Key Line="32" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="33" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="34" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="35" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="36" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="37" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="38" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="39" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="40" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<!--<Key Line="41" Fea="19" Des="Weather" Addr="http://weather.yahooapis.com/forecastrss?p=CAXX0343" Addr2="" Mode="1" Mode2="1" UserID=""></Key>-->
<Key Line="42" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="43" Fea="4" Des="Headset" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="44" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="45" Fea="3" Des="Advisory" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="46" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="47" Fea="2" Des="Call logs" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<Key Line="48" Fea="0" Des="" Addr="" Addr2="" Mode="1" Mode2="1" UserID=""></Key>
<pkDescription>
{foreach $keys as $row}
{if $row.device_key_line == "1"}{$feature = "6"}{$user_id = $user_id_1}{/if}
{if $row.device_key_line == "2"}{$feature = "7"}{$user_id = $user_id_2}{/if}
{if $row.device_key_line == "3"}{$feature = "8"}{$user_id = $user_id_3}{/if}
{if $row.device_key_line == "4"}{$feature = "9"}{$user_id = $user_id_4}{/if}
{if $row.device_key_line == "5"}{$feature = "10"}{$user_id = $user_id_5}{/if}
{if $row.device_key_line == "6"}{$feature = "11"}{$user_id = $user_id_6}{/if}
{if $row.device_key_line == "7"}{$feature = "12"}{$user_id = $user_id_7}{/if}
{if $row.device_key_line == "8"}{$feature = "13"}{$user_id = $user_id_8}{/if}
{if $row.device_key_type == "6"}
<Key Line="{$row.device_key_id}" Fea="{$feature}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{else}
<Key Line="{$row.device_key_id}" Fea="{$row.device_key_type}" Des="{$row.device_key_label}" Addr="{$row.device_key_value}" Addr2="" Mode="1" Mode2="1" UserID="{$user_id}"></Key>
{/if}
{/foreach}
</pkDescription>
<webdialurl></webdialurl>
<cw_tone>1</cw_tone>

View File

@@ -49,7 +49,7 @@
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek.lastInMonth="0"
/>
<DIALPLAN
dialplan.digitmap="[*]xxxx|[2-9]11|0T|011xxx.T|[0-1][2-9]xxxxxxxxx|[2-9]xxxxxxxxx|[1-9]xxT|**x.T"
{if isset($polycom_digitmap)}dialplan.digitmap="{$polycom_digitmap}"{else}dialplan.digitmap=""{/if}
/>
<DEVICE_KEYS
attendant.uri=""

View File

@@ -49,7 +49,7 @@
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek.lastInMonth="0"
/>
<DIALPLAN
dialplan.digitmap="[*]xxxx|[2-9]11|0T|011xxx.T|[0-1][2-9]xxxxxxxxx|[2-9]xxxxxxxxx|[1-9]xxT|**x.T"
{if isset($polycom_digitmap)}dialplan.digitmap="{$polycom_digitmap}"{else}dialplan.digitmap=""{/if}
/>
<DEVICE_KEYS
attendant.uri=""