This commit is contained in:
markjcrane
2016-03-11 14:21:28 -07:00
248 changed files with 32260 additions and 32251 deletions

View File

@@ -31,7 +31,7 @@ Commercial Support
--------------------------------------
These options support the project and cover any kind of help you might need from architecture, installation, best practices, troubleshooting, custom feature programming, and training.
1. [Commercial Paid Support](http://fusionpbx.com/support.php)
1. [Commercial Paid Support](http://fusionpbx.com/support.php)
2. [Custom Feature Development](http://fusionpbx.com/support.php)
3. [Admin Training](http://fusionpbx.com)
4. [Advanced Training](http://fusionpbx.com)
@@ -39,7 +39,7 @@ These options support the project and cover any kind of help you might need from
Software Requirements
--------------------------------------
- [Debian Jessie](http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso) - Recommended
- [Debian Jessie](http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso) - Recommended
This is the distribution recommended by the FreeSwitch team
- Fusion will also install on Debian Wheezy, Ubuntu 10.10 LTS and is known to work on FreeBSD
- [FusionPBX Installer](http://fusionpbx.com)
@@ -50,14 +50,14 @@ Community
We have a pretty thriving community if you know how to get to us:
- [IRC](http://webchat.freenode.net/) in the fusionpbx channel
- [Twitter](http://twitter.com/fusionpbx)
- [Twitter](http://twitter.com/fusionpbx)
- [Website](http://fusionpbx.com)
Contributing
---------------------------------------
###Requirements
It's easy to contribute to FusionPBX the only thing we ask before accepting your pull request is that you sign a Contributor License Agreement.
It's easy to contribute to FusionPBX the only thing we ask before accepting your pull request is that you sign a Contributor License Agreement.
We ask that you sign the Contributor License Agreement for the following reasons:
1. It protects FusionPBX by you gauranteeing that your contributions are yours to contribute and not the property of an employer or something found on the web.
@@ -88,5 +88,5 @@ chmod 755 install_fusionpbx.sh
```
Installation Questions:
- During the install it will ask you to press continue after verifying that the command ran successfully. This is usually the case, so you can simply tell it to continue. The install also asks several questions.
- During the install it will ask you to press continue after verifying that the command ran successfully. This is usually the case, so you can simply tell it to continue. The install also asks several questions.
- Unless you have a reason to choose otherwise, PostgreSQL and Nginx is probably your best path and is recommended by the developers of FusionPBX

View File

@@ -96,7 +96,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
@@ -155,13 +155,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='access_control_default'>\n";
echo " <option value=''></option>\n";
if ($access_control_default == "allow") {
if ($access_control_default == "allow") {
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
}
else {
echo " <option value='allow'>".$text['label-allow']."</option>\n";
}
if ($access_control_default == "deny") {
if ($access_control_default == "deny") {
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
}
else {

View File

@@ -109,7 +109,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
@@ -158,13 +158,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='node_type'>\n";
echo " <option value=''></option>\n";
if ($node_type == "allow") {
if ($node_type == "allow") {
echo " <option value='allow' selected='selected'>".$text['label-allow']."</option>\n";
}
else {
echo " <option value='allow'>".$text['label-allow']."</option>\n";
}
if ($node_type == "deny") {
if ($node_type == "deny") {
echo " <option value='deny' selected='selected'>".$text['label-deny']."</option>\n";
}
else {

View File

@@ -56,9 +56,9 @@ else {
$rows_per_page = 1000;
$param = "";
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_access_control_nodes ";

View File

@@ -60,9 +60,9 @@ else {
$rows_per_page = 10;
$param = "";
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_access_controls ";

View File

@@ -314,7 +314,7 @@ fieldset {
/*** Others ***/
#lang {
background: transparent;
font-size: .9em;
font-size: .9em;
left: auto;
right: 90px;
position:fixed;

View File

@@ -139,7 +139,7 @@ require_once "resources/require.php";
}
echo " <td valign='top' class='".$row_style[$c]."'>".$tmp_date_added."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_block_action']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['call_block_enabled'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['call_block_enabled']]."</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('call_block_edit')) {
echo "<a href='call_block_edit.php?id=".$row['call_block_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";

View File

@@ -26,7 +26,7 @@
/**
* cache class provides an abstracted cache
*
*
* @method string dialplan - builds the dialplan for call center
*/
//define the call center class

View File

@@ -24,7 +24,7 @@
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Errol Samuels <voiptology@gmail.com>
*/
include "root.php";

View File

@@ -165,7 +165,7 @@
$text['opt-itring']['es-cl'] = "it-ring";
$text['opt-itring']['pt-pt'] = "it-ring";
$text['opt-itring']['fr-fr'] = "it-ring";
$text['opt-moh']['en-us'] = "music";
$text['opt-moh']['es-cl'] = "musica";
$text['opt-moh']['pt-pt'] = "música";

View File

@@ -165,7 +165,7 @@ else {
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_extension']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['conference_center_order']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['conference_center_enabled'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['conference_center_enabled']]."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['conference_center_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('conference_center_edit')) {

View File

@@ -98,7 +98,7 @@ else {
echo $row['extension'];
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['enabled'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['enabled']]."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('extension_edit')) {

View File

@@ -104,7 +104,7 @@ else {
}
echo " &nbsp;\n";
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".ucwords($row['contact_setting_enabled'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".$text['label-'.$row['contact_setting_enabled']]."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['contact_setting_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons' nowrap='nowrap'>";
if (permission_exists('contact_setting_edit')) {

View File

@@ -179,7 +179,7 @@ else {
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['destination_type'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href='destination_edit.php?id=".$row['destination_uuid']."'>".format_phone($row['destination_number'])."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['destination_context']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['destination_enabled'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['destination_enabled']]."</td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['destination_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('destination_edit')) {

View File

@@ -316,7 +316,7 @@ else {
echo " <td valign='top' class='".$row_style[$c]."'>".$row['dialplan_context']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".$row['dialplan_order']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>";
echo " <a href='?id=".$row['dialplan_uuid']."&enabled=".(($row['dialplan_enabled'] == 'true') ? 'false' : 'true').(($app_uuid != '') ? "&app_uuid=".$app_uuid : null).(($search != '') ? "&search=".$search : null).(($order_by != '') ? "&order_by=".$order_by."&order=".$order : null)."'>".ucwords($row['dialplan_enabled'])."</a>\n";
echo " <a href='?id=".$row['dialplan_uuid']."&enabled=".(($row['dialplan_enabled'] == 'true') ? 'false' : 'true').(($app_uuid != '') ? "&app_uuid=".$app_uuid : null).(($search != '') ? "&search=".$search : null).(($order_by != '') ? "&order_by=".$order_by."&order=".$order : null)."'>".$text['label-'.$row['dialplan_enabled']]."</a>\n";
echo " </td>\n";
echo " <td valign='top' class='row_stylebg' width='30%'>".((strlen($row['dialplan_description']) > 0) ? $row['dialplan_description'] : "&nbsp;")."</td>\n";
echo " <td class='list_control_icons'>\n";

View File

@@ -485,7 +485,7 @@ include "root.php";
$dialplan_detail_data = str_replace("\$1", $regex_match_1, $dialplan_detail_data);
$dialplan_detail_data = str_replace("\$2", $regex_match_2, $dialplan_detail_data);
$dialplan_detail_data = str_replace("\$3", $regex_match_3, $dialplan_detail_data);
$this->bridges = $dialplan_detail_data;
$this->bridges = $dialplan_detail_data;
}
}
}

View File

@@ -1,4 +1,4 @@
<context name="{v_context}">
<context name="{v_context}">
<extension name="att_xfer" number="att_xfer" continue="false" app_uuid="7bd7a113-0afc-406a-b4a7-33077c22ac39">
<condition field="destination_number" expression="^att_xfer$">
<action application="read" data="2 6 'tone_stream://%(10000,0,350,440)' digits 30000 #"/>

View File

@@ -2,7 +2,7 @@
<extension name="freeswitch_conference" number="*9888" continue="false" app_uuid="8e3ad78e-4b48-4d36-af7e-4920a9757043" enabled="false">
<condition field="destination_number" expression="^\*9(888|8888|1616|3232)$">
<action application="export" data="hold_music=silence"/>
<!--
<!--
This will take the SAS from the b-leg and send it to the display on the a-leg phone.
Known working with Polycom and Snom maybe others.
-->

View File

@@ -1,7 +1,7 @@
<context name="{v_context}">
<extension name="directory" number="*411" continue="false" app_uuid="a223dc70-28a1-4979-834e-8af813cd8ea6">
<condition field="destination_number" expression="^\*411$">
<action application="lua" data="directory.lua"/>
<action application="lua" data="directory.lua"/>
</condition>
</extension>
</context>

View File

@@ -60,7 +60,7 @@
if (count($_SESSION["domains"]) > 1) {
//make sure the public directory and xml file exist
if (strlen($_SESSION['switch']['dialplan']['dir']) > 0) {
if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public'.$_SESSION['domains'][$domain_uuid]['domain_name'])) {
if (!is_dir($_SESSION['switch']['dialplan']['dir'].'/public'.$_SESSION['domains'][$domain_uuid]['domain_name'])) {
mkdir($_SESSION['switch']['dialplan']['dir'].'/public/'.$_SESSION['domains'][$domain_uuid]['domain_name'],0777,true);
}
$file = $_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$domain_uuid]['domain_name'].".xml";

View File

@@ -57,7 +57,7 @@ else {
echo "<table>";
echo " <tr>";
echo " <td>".$text['label-path']."</td>";
echo " </tr>";
echo " </tr>";
echo " <tr>";
echo " <td>".$folder.$file."</td>";
echo " </tr>";

View File

@@ -61,7 +61,7 @@ function download_send_headers($filename) {
header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate");
header("Last-Modified: {$now} GMT");
// force download
// force download
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
@@ -154,9 +154,9 @@ $row_style["1"] = "row_style1";
echo "<th><input type=\"checkbox\" id=\"selecctall\"/>";
echo "</th>";
echo "<th> Column Name";
echo "</th>";
echo "</th>";
echo "<th> Description";
echo "</th>";
echo "</th>";
echo "</tr>";
echo "</tr>";
foreach ($columns as $value) {
@@ -164,9 +164,9 @@ $row_style["1"] = "row_style1";
echo " <td width = '20px' valign='top' class='".$row_style[$c]."'><input class=\"checkbox1\" type=\"checkbox\" name=\"column_group[]\" value=\"$value\"/>";
echo "</td>";
echo " <td valign='top' class='".$row_style[$c]."'> $value";
echo "</td>";
echo "</td>";
echo " <td valign='top' class='".$row_style[$c]."'>";
echo "</td>";
echo "</td>";
echo "</tr>";
if ($c==0) { $c=1; } else { $c=0; }
}
@@ -181,7 +181,7 @@ $row_style["1"] = "row_style1";
echo "</table>";
echo "<br><br>";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -151,15 +151,15 @@ if(!function_exists('fax_enqueue')) {
$date_utc_now_sql = "datetime('now')";
}
$sql = <<<HERE
INSERT INTO v_fax_tasks( fax_task_uuid, fax_uuid,
task_next_time, task_lock_time,
task_fax_file, task_wav_file, task_uri, task_dial_string, task_dtmf,
INSERT INTO v_fax_tasks( fax_task_uuid, fax_uuid,
task_next_time, task_lock_time,
task_fax_file, task_wav_file, task_uri, task_dial_string, task_dtmf,
task_interrupted, task_status, task_no_answer_counter, task_no_answer_retry_counter, task_retry_counter,
task_reply_address, task_description)
VALUES (?, ?,
$date_utc_now_sql, NULL,
?, ?, ?, ?, ?,
'false', 0, 0, 0, 0,
$date_utc_now_sql, NULL,
?, ?, ?, ?, ?,
'false', 0, 0, 0, 0,
?, ?);
HERE;
$stmt = $db->prepare($sql);

View File

@@ -26,7 +26,7 @@
/**
* cache class provides an abstracted cache
*
*
* @method string dialplan - builds the dialplan for the fax servers
*/
//define the fax class
@@ -150,7 +150,7 @@
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = substr($data,8,strlen($data));
}
elseif (substr($data,0,9) == "outbound:") {}
else {
else {
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $data;
}
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";

View File

@@ -188,8 +188,8 @@ else {
if ($c==0) { $c=1; } else { $c=0; }
}
echo "</table>\n";
//Current logged members
//set the alternating row styles
$c = 0;
@@ -201,33 +201,33 @@ else {
echo "</div>\n";
echo "<br><br>Logged in agents<br><br>\n";
//show the content
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$text['label-username']."</th>\n";
echo "<th>Total inbound calls</th>\n";
echo "<th>Logged on since</th>\n";
echo "</tr>\n";
//print_r($xml->fifo->outbound->member[0]);
//print_r($xml->fifo->outbound->member[1]);
foreach ($xml->fifo->outbound->member as $row) {
$username=explode("@",$row);
$username=explode("/",$username[0]);
$username=$username[1];
$fifo_duration_formatted=$row["logged-on-since"];
$fifo_total_inbound_calls=$row["outbound-call-total-count"];
echo "<tr>\n";
echo "<td valign='top' class='".$row_style[$c]."'>$username &nbsp;</td>\n";
echo "<td valign='top' class='".$row_style[$c]."'>$fifo_total_inbound_calls &nbsp;</td>\n";

View File

@@ -127,7 +127,7 @@ else {
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_extension']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['ivr_menu_direct_dial'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['ivr_menu_enabled'])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['ivr_menu_enabled']]."</td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['ivr_menu_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('ivr_menu_edit')) {

View File

@@ -491,7 +491,7 @@ include "root.php";
$database->where[1]['operator'] = '=';
$database->update();
//delete the old dialplan details to prepare for new details
//delete the old dialplan details to prepare for new details
$database = new database;
$database->table = "v_dialplan_details";
$database->where[0]['name'] = 'domain_uuid';
@@ -828,7 +828,7 @@ include "root.php";
$sub_sql = "select * from v_ivr_menu_options ";
$sub_sql .= "where ivr_menu_uuid = '$ivr_menu_uuid' ";
$sub_sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sub_sql .= "order by ivr_menu_option_order asc ";
$sub_sql .= "order by ivr_menu_option_order asc ";
$sub_prep_statement = $db->prepare(check_sql($sub_sql));
$sub_prep_statement->execute();
$sub_result = $sub_prep_statement->fetchAll(PDO::FETCH_ASSOC);

View File

@@ -627,6 +627,13 @@ echo $mod->dir."\n";
$mod['module_enabled'] = 'false';
$mod['module_default_enabled'] = 'false';
break;
case "mod_translate":
$mod['module_label'] = 'Translate';
$mod['module_category'] = 'Applications';
$mod['module_description'] = 'format numbers into a specified format.';
$mod['module_enabled'] = 'true';
$mod['module_default_enabled'] = 'true';
break;
case "mod_xml_cdr":
$mod['module_label'] = 'XML CDR';
$mod['module_category'] = 'XML Interfaces';
@@ -694,7 +701,7 @@ echo $mod->dir."\n";
//get the list of modules
public function get_modules() {
$sql = " select * from v_modules ";
$sql .= "order by module_category, module_label";
$sql .= "order by module_category, module_label";
$prep_statement = $this->db->prepare($sql);
$prep_statement->execute();
$this->modules = $prep_statement->fetchAll(PDO::FETCH_ASSOC);

View File

@@ -166,9 +166,11 @@ function get_call_activity() {
}
//reindex array using extension instead of auto-incremented value
$result = array();
foreach ($array as $index => $subarray) {
$extension = $subarray['extension'];
foreach ($subarray as $field => $value) {
$array[$subarray['extension']][$field] = $array[$index][$field];
$result[$extension][$field] = $array[$index][$field];
unset($array[$index][$field]);
}
unset($array[$subarray['extension']]['extension']);
@@ -176,5 +178,5 @@ function get_call_activity() {
}
//return array
return $array;
return $result;
}

View File

@@ -359,7 +359,7 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
//deliver the customized config over HTTP/HTTPS
//need to make sure content-type is correct
if ($_REQUEST['content_type'] == 'application/octet-stream') {
//format the mac address and
//format the mac address and
$mac = $prov->format_mac($mac, $device_vendor);
//replace the variable name with the value

View File

@@ -141,7 +141,7 @@ require_once "resources/paging.php";
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ring_group_extension']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['ring_group_enabled'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['ring_group_enabled']]."&nbsp;</td>\n";
if (permission_exists('ring_group_forward')) {
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href='".PROJECT_PATH."/app/ring_groups/ring_group_forward_edit.php?id=".$row['ring_group_uuid']."&return_url=".urlencode($_SERVER['PHP_SELF'])."' alt='".$text['link-call-forward']."'>".$text['link-call-forward']."</a></td>\n";
}

View File

@@ -27,7 +27,7 @@
/**
* scripts class provides methods for creating the config.lua and copying switch scripts
*
*
* @method string correct_path
* @method string copy_files
* @method string write_config
@@ -110,7 +110,7 @@ class scripts {
global $db_path;
global $db_username;
global $db_password;
//replace the backslash with a forward slash
$db_path = str_replace("\\", "/", $db_path);

View File

@@ -154,7 +154,7 @@ if(function_exists('reg_open_key')){
HKEY_CLASSES_ROOT => "HKCR",
HKEY_CURRENT_USER => "HKCU",
HKEY_LOCAL_MACHINE => "HKLM",
HKEY_USERS => "HKU",
HKEY_USERS => "HKU",
HKEY_CURRENT_CONFIG => "HKCC",
);

View File

@@ -1,5 +1,5 @@
<profile name="{v_sip_profile_name}">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!--aliases are other names that will work as a valid profile name for this profile-->
<aliases>
</aliases>

View File

@@ -1,8 +1,8 @@
<profile name="{v_sip_profile_name}">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!--aliases are other names that will work as a valid profile name for this profile-->
<aliases>
<!--
<!--
<alias name="outbound"/>
<alias name="nat"/>
-->

View File

@@ -1,8 +1,8 @@
<profile name="{v_sip_profile_name}">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!--aliases are other names that will work as a valid profile name for this profile-->
<aliases>
<!--
<!--
<alias name="outbound"/>
<alias name="nat"/>
-->

View File

@@ -1,5 +1,5 @@
<profile name="{v_sip_profile_name}">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<settings>
{v_sip_profile_settings}
</settings>

View File

@@ -1,5 +1,5 @@
<profile name="{v_sip_profile_name}">
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<!--aliases are other names that will work as a valid profile name for this profile-->
<aliases>
<!--
@@ -17,7 +17,7 @@
<!--<domain name="$${domain}" parse="true"/>-->
<!-- indicator to parse the directory for domains with parse="true" to get gateways and alias every domain to this profile -->
<!--<domain name="all" alias="true" parse="true"/>-->
<domain name="all" alias="true" parse="false"/>
<domain name="all" alias="true" parse="false"/>
</domains>
<settings>

View File

@@ -39,7 +39,7 @@ else {
$db_path = $db_file_path;
$db_name = $dbfilename;
}
//get the db connection information
if (strlen($_REQUEST['id']) > 0) {
$sql = "select * from v_databases ";

View File

@@ -64,7 +64,7 @@ if ($domains_processed == 1) {
}
}
}
//add the missing default settings
foreach ($missing as $row) {
//add the default settings
@@ -84,7 +84,7 @@ if ($domains_processed == 1) {
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'What region to use by default when choosing Time Conditions';
$x++;
//iterate and add each, if necessary
foreach ($array as $index => $default_settings) {

View File

@@ -49,7 +49,7 @@ require_once "resources/header.php";
$available_presets[] = json_decode($json, true);
}
unset($preset_region);
//set the action as an add or an update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -250,14 +250,14 @@ require_once "resources/header.php";
$is_preset = (in_array($group_id, $_REQUEST['preset'])) ? true : false;
//set group and order number
$dialplan_detail_group_user = check_str($_POST["group_$group_id"]);
if($dialplan_detail_group_user!='') {
$dialplan_detail_group = $dialplan_detail_group_user;
} else {
$dialplan_detail_group = $group_id;
}
}
$dialplan_detail_order = 0;
foreach ($conditions as $cond_num => $cond_var) {

View File

@@ -2,21 +2,21 @@
/*
graph.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2004-2006 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
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,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -197,7 +197,7 @@ function fetch_data() {
function plot_data(obj) {
// Show datetimelegend
var now = new Date();
var datetime = (now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + ' ' +
var datetime = (now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + ' ' +
LZ(now.getHours()) + ":" + LZ(now.getMinutes()) + ":" + LZ(now.getSeconds());
SVGDoc.getElementById('datetime').firstChild.data = datetime;
@@ -223,7 +223,7 @@ function plot_data(obj) {
last_ugmt = ugmt;
last_ifin = ifin;
last_ifout = ifout;
switch (plot_in.length) {
case 0:
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'visible');
@@ -296,7 +296,7 @@ function plot_data(obj) {
rmax *= 1.25;
else
rmax *= 2;
if (i == 8)
rmax *= 1.024;
}

View File

@@ -121,7 +121,7 @@ EOD;
if ( $country_iso===NULL ) {
return;
}
if(isset($countries[$country_iso])){
$country = $countries[$country_iso];
@@ -133,7 +133,7 @@ EOD;
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
if ($row['num_rows'] == 0) {
$sql = "insert into v_vars ";
$sql .= "(";
@@ -161,7 +161,7 @@ EOD;
}
}
unset($prep_statement, $sql);
// Set default Country code
$sql = "select count(*) as num_rows from v_vars ";
$sql .= "where var_name = 'default_countrycode' ";
@@ -197,7 +197,7 @@ EOD;
}
}
unset($prep_statement, $sql);
// Set default International Direct Dialing code
$sql = "select count(*) as num_rows from v_vars ";
$sql .= "where var_name = 'default_exitcode' ";
@@ -229,11 +229,11 @@ EOD;
$sql .= ");";
$db->exec(check_sql($sql));
unset($sql, $row);
$x++;
$x++;
}
}
unset($prep_statement, $sql);
unset($countries);
}
}

View File

@@ -79,7 +79,7 @@ if ($domains_processed == 1) {
}
}
//add that the directory structure for voicemail each domain and voicemail id is
//add that the directory structure for voicemail each domain and voicemail id is
$sql = "select d.domain_name, v.voicemail_id ";
$sql .= "from v_domains as d, v_voicemails as v ";
$sql .= "where v.domain_uuid = d.domain_uuid ";

View File

@@ -186,7 +186,7 @@ else {
echo " <a href='".PROJECT_PATH."/app/voicemail_greetings/voicemail_greetings.php?id=".$row['voicemail_id']."'>".$text['label-greetings']."</a>\n";
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".ucwords($row['voicemail_enabled'])."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-'.$row['voicemail_enabled']]."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['voicemail_description']."&nbsp;</td>\n";
if (permission_exists('voicemail_edit') || permission_exists('voicemail_delete')) {
echo " <td class='list_control_icons' style='width: 25px;'>";

View File

@@ -80,10 +80,10 @@
global $debug;
//fix the xml by escaping the contents of <sip_full_XXX>
$xml_string = preg_replace_callback("/<([^><]+)>(.*?[><].*?)<\/\g1>/",
$xml_string = preg_replace_callback("/<([^><]+)>(.*?[><].*?)<\/\g1>/",
function ($matches) {
return '<' . $matches[1] . '>' .
str_replace(">", "&gt;",
str_replace(">", "&gt;",
str_replace("<", "&lt;", $matches[2])
) .
'</' . $matches[1] . '>';

View File

@@ -82,7 +82,7 @@
$db->beginTransaction();
//reset the count
$x = 0;
}
}
//parse the xml to get the call detail record info
try {
$xml = simplexml_load_string($xml_string);
@@ -101,14 +101,14 @@
echo $sql."\n";
$db->exec($sql);
$x++;
}
}
}
//save the transaction
$db->commit();
//echo finished
echo "completed\n";
}
if ($xml_cdr_archive == "dir") {
if ($xml_cdr_archive == "dir") {
$xml_cdr_list = glob($_SESSION['switch']['log']['dir']."/xml_cdr/archive/*/*/*/*.xml");
echo "count: ".count($xml_cdr_list)."\n";
//print_r($xml_cdr_list);

View File

@@ -125,7 +125,7 @@ else {
} else {
$mos_comparison = '';
}
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
//$mos_comparison = check_str($_REQUEST["mos_comparison"]);
$mos_score = check_str($_REQUEST["mos_score"]);
}

View File

@@ -406,7 +406,7 @@ else {
echo " &nbsp;\n";
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
echo " <a href=\"javascript:document.location.href='?id[]=".$row['default_setting_uuid']."&enabled=".(($row['default_setting_enabled'] == 'true') ? 'false' : 'true')."&category=".$category."&search='+$('#default_setting_search').val();\">".ucwords($row['default_setting_enabled'])."</a>\n";
echo " <a href=\"javascript:document.location.href='?id[]=".$row['default_setting_uuid']."&enabled=".(($row['default_setting_enabled'] == 'true') ? 'false' : 'true')."&category=".$category."&search='+$('#default_setting_search').val();\">".$text['label-'.$row['default_setting_enabled']]."</a>\n";
echo " </td>\n";
echo " <td valign='top' class='row_stylebg' style='width: 40%; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'>".$row['default_setting_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons' nowrap='nowrap'>";

View File

@@ -236,7 +236,7 @@ if (sizeof($_REQUEST) > 1) {
echo " &nbsp;\n";
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
echo " <a href='?domain_id=".$row['domain_uuid']."&id[]=".$row['domain_setting_uuid']."&enabled=".(($row['domain_setting_enabled'] == 'true') ? 'false' : 'true')."'>".ucwords($row['domain_setting_enabled'])."</a>\n";
echo " <a href='?domain_id=".$row['domain_uuid']."&id[]=".$row['domain_setting_uuid']."&enabled=".(($row['domain_setting_enabled'] == 'true') ? 'false' : 'true')."'>".$text['label-'.$row['domain_setting_enabled']]."</a>\n";
echo " </td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['domain_setting_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";

View File

@@ -2,7 +2,7 @@
/**
* events class provides an event system
*
*
* @method void load_plugins
* @method dynamic __call
*/
@@ -94,8 +94,8 @@ class events {
* @param string $args
*
*/
public function __call($method, $args) {
if (! key_exists($method, $this->methods)) {
public function __call($method, $args) {
if (! key_exists($method, $this->methods)) {
throw new Exception ("Call to undefined method: " . $method);
}
array_unshift($args, $this);

View File

@@ -53,8 +53,8 @@ require_once "resources/classes/text.php";
//TBD $locale = Locale::getDefault();
$timezone = 'UTC';
if (is_link('/etc/localtime')) {
// Mac OS X (and older Linuxes)
// /etc/localtime is a symlink to the
// Mac OS X (and older Linuxes)
// /etc/localtime is a symlink to the
// timezone in /usr/share/zoneinfo.
$filename = readlink('/etc/localtime');
if (strpos($filename, '/usr/share/zoneinfo/') === 0) {
@@ -73,7 +73,7 @@ if (is_link('/etc/localtime')) {
$timezone = $data['ZONE'];
}
}
date_default_timezone_set($timezone);
//detect install state

View File

@@ -22,7 +22,7 @@
Contributor(s):
Matthew Vale <github@mafoo.org>
*/
require_once "root.php";
require_once "resources/classes/EventSocket.php";
@@ -151,14 +151,14 @@ require_once "resources/classes/EventSocket.php";
}
return false;
}
protected function event_socket_request($cmd) {
$esl = new EventSocket($this->event_socket);
$result = $esl->request($cmd);
$esl->reset_fp();
return $result;
}
public function restart_switch() {
$this->connect_event_socket();
if(!$this->event_socket){

View File

@@ -22,7 +22,7 @@
Contributor(s):
Matthew Vale <github@mafoo.org>
*/
require_once "root.php";

View File

@@ -427,7 +427,7 @@ include "root.php";
//create the table, user and set the permissions only if the db_create_username was provided
if ($this->global_settings->db_create()) {
$this->write_progress("\tCreating database");
$this->write_progress("\tCreating database");
try {
$this->dbh = new PDO($connect_string, $this->global_settings->db_create_username(), db_create_password, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

View File

@@ -61,7 +61,7 @@ include "root.php";
echo "$message\n";
}
}
function write_progress($message) {
if($this->echo_progress){
echo "$message\n";

View File

@@ -68,7 +68,7 @@
echo "<td class='vtable' align='left'>\n";
echo " <select id='install_default_country' name='install_default_country' class='formfld' style=''>\n";
require "resources/countries.php";
foreach ($countries as $iso_code => $country ){
if($iso_code == $install_default_country){
echo " <option value='$iso_code' selected='selected'>".$country['country']."</option>\n";

View File

@@ -89,7 +89,7 @@
echo "</form>";
if($detect_ok){
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td colspan='4' align='left' nowrap><b>".$text['title-detected_configuration']."</b></td>\n";
echo "</tr>\n";
@@ -102,7 +102,7 @@
echo "<td class='vtable' width='35%' align='left'>\n";
echo " ".$switch_detect->version()."\n";
echo "</td>\n";
foreach ($switch_detect->get_dirs() as $folder)
{
if($id % 2 == 0){ echo "<tr>\n"; }
@@ -132,7 +132,7 @@
if($id % 2 == 1){ echo "</tr>\n"; }
$id++;
}
echo "</table>";
}

View File

@@ -163,7 +163,7 @@
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "menu_item_description";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "menu_item_desc";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;

View File

@@ -127,7 +127,7 @@
$y++;
$apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
//schema details
$y = 0; //table array index
$z = 0; //field array index

View File

@@ -206,7 +206,7 @@ else {
echo " &nbsp;\n";
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
echo " <a href='?user_id=".$row['user_uuid']."&id[]=".$row['user_setting_uuid']."&enabled=".(($row['user_setting_enabled'] == 'true') ? 'false' : 'true')."'>".ucwords($row['user_setting_enabled'])."</a>\n";
echo " <a href='?user_id=".$row['user_uuid']."&id[]=".$row['user_setting_uuid']."&enabled=".(($row['user_setting_enabled'] == 'true') ? 'false' : 'true')."'>".$text['label-'.$row['user_setting_enabled']]."</a>\n";
echo " </td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['user_setting_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";

View File

@@ -2,7 +2,7 @@
/**
* cache class provides an abstracted cache
*
*
* @method string set
* @method string get
* @method string delete

View File

@@ -366,7 +366,7 @@ include "root.php";
$keys=array_keys($data);
$values=array_values($data);
for($i=0;$i<$count;$i++){
$keys[$i]= str_replace("-", "_", $keys[$i]);
$keys[$i]= str_replace("-", "_", $keys[$i]);
$this->{$keys[$i]}=$values[$i];
}
}
@@ -443,7 +443,7 @@ include "root.php";
$xml .= " <param name=\"auth-acl\" value=\"" . $this->auth_acl . "\"/>\n";
}
$xml .= " </params>\n";
$xml .= " <variables>\n";
if (strlen($this->hold_music)) {
$xml .= " <variable name=\"hold_music\" value=\"" . $this->hold_music . "\"/>\n";
@@ -608,7 +608,7 @@ include "root.php";
$xml .= "\n";
$xml .= "<include>\n";
$xml .= " <!--the domain or ip (the right hand side of the @ in the addr-->\n";
if ($extension_dir_name == "default") {
if ($extension_dir_name == "default") {
$xml .= " <domain name=\"\$\${domain}\">\n";
}
else {

View File

@@ -21,7 +21,7 @@ class Syslog extends Event_Handler{
if ($_SESSION['event']['syslog']['enable'] <> 0){
closelog();
}
}
}
public function log_event($event_type, $params){
if ($_SESSION['event']['syslog']['enable'] <> 0){

View File

@@ -323,7 +323,7 @@ include "root.php";
$database->add();
}
//delete the old dialplan details to prepare for new details
//delete the old dialplan details to prepare for new details
$database = new database;
$database->table = "v_dialplan_details";
$database->where[0]['name'] = 'domain_uuid';

View File

@@ -661,7 +661,7 @@
//define singular function to convert a word in english to singular
private function singular($word) {
//"-es" is used for words that end in "-x", "-s", "-z", "-sh", "-ch" in which case you add
//"-es" is used for words that end in "-x", "-s", "-z", "-sh", "-ch" in which case you add
if (substr($word, -2) == "es") {
if (substr($word, -3, 1) == "x") {
return substr($word,0,-2);

View File

@@ -23,7 +23,7 @@
/**
* permission class
*
*
* @method string add
* @method string delete
* @method string exists

View File

@@ -80,7 +80,7 @@ include "root.php";
$this->object->assign($key, $value);
}
if ($this->engine === 'twig') {
$this->var_array[$key] = $value;
$this->var_array[$key] = $value;
}
}

View File

@@ -74,7 +74,7 @@ This method causes the script to get its manadatory arguments directly from the
session:setVariable("call_block", "")
--send to the log
logger("D", "NOTICE", "params are: " .. string.format("'%s', '%s', '%s', '%s'", params["cid_num"],
logger("D", "NOTICE", "params are: " .. string.format("'%s', '%s', '%s', '%s'", params["cid_num"],
params["cid_name"], params["userid"], params["domain_name"]));
--get the cache
@@ -91,7 +91,7 @@ This method causes the script to get its manadatory arguments directly from the
require "resources.functions.database_handle";
dbh = database_handle('system');
--log if not connect
--log if not connect
if dbh:connected() == false then
logger("W", "NOTICE", "db was not connected")
end
@@ -108,7 +108,7 @@ This method causes the script to get its manadatory arguments directly from the
found_count = rows["call_block_count"];
end)
-- dbh:affected_rows() doesn't do anything if using core:db so this is the workaround:
--set the cache
if (found_cid_num) then -- caller id exists
if (found_enabled == "true") then

View File

@@ -26,7 +26,7 @@
--
-- Contributor(s):
-- Mark J Crane <markjcrane@fusionpbx.com>
-- Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
-- Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
--set variables
flags = "";
@@ -80,7 +80,7 @@
end
--get the moderator_pin
sql = [[SELECT moderator_pin FROM v_meetings
sql = [[SELECT moderator_pin FROM v_meetings
WHERE meeting_uuid = ']] .. meeting_uuid ..[[']];
freeswitch.consoleLog("notice", "[voicemail] sql: " .. sql .. "\n");
status = dbh:query(sql, function(row)
@@ -159,7 +159,7 @@
--get the conference sessions
if (conference_session_uuid) then
sql = [[SELECT count(*) as num_rows
sql = [[SELECT count(*) as num_rows
FROM v_conference_sessions
WHERE conference_session_uuid = ']] .. conference_session_uuid ..[[']];
status = dbh:query(sql, function(row)
@@ -435,7 +435,7 @@
--define the function get_pin_number
function get_pin_number(domain_uuid, prompt_audio_file)
--if the pin number is provided then require it
if (not pin_number) then
if (not pin_number) then
min_digits = 2;
max_digits = 20;
max_tries = 1;
@@ -447,16 +447,16 @@
WHERE r.domain_uuid = ']] .. domain_uuid ..[['
AND r.meeting_uuid = m.meeting_uuid
AND m.domain_uuid = ']] .. domain_uuid ..[['
AND (m.moderator_pin = ']] .. pin_number ..[[' or m.participant_pin = ']] .. pin_number ..[[')
AND (m.moderator_pin = ']] .. pin_number ..[[' or m.participant_pin = ']] .. pin_number ..[[')
AND r.enabled = 'true'
AND m.enabled = 'true'
AND (
( r.start_datetime <> '' AND r.start_datetime is not null AND r.start_datetime <= ']] .. os.date("%Y-%m-%d %X") .. [[' ) OR
( r.start_datetime = '' OR r.start_datetime is null )
( r.start_datetime <> '' AND r.start_datetime is not null AND r.start_datetime <= ']] .. os.date("%Y-%m-%d %X") .. [[' ) OR
( r.start_datetime = '' OR r.start_datetime is null )
)
AND (
( r.stop_datetime <> '' AND r.stop_datetime is not null AND r.stop_datetime > ']] .. os.date("%Y-%m-%d %X") .. [[' ) OR
( r.stop_datetime = '' OR r.stop_datetime is null )
( r.stop_datetime <> '' AND r.stop_datetime is not null AND r.stop_datetime > ']] .. os.date("%Y-%m-%d %X") .. [[' ) OR
( r.stop_datetime = '' OR r.stop_datetime is null )
) ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[conference center] SQL: " .. sql .. "\n");
@@ -496,7 +496,7 @@
AND r.conference_center_uuid = ']] .. conference_center_uuid ..[['
AND m.domain_uuid = ']] .. domain_uuid ..[['
AND (m.moderator_pin = ']] .. pin_number ..[[' or m.participant_pin = ']] .. pin_number ..[[')
AND r.enabled = 'true'
AND r.enabled = 'true'
AND m.enabled = 'true'
]];
if (debug["sql"]) then

View File

@@ -17,7 +17,7 @@
api = freeswitch.API();
--check if the conference exists
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
freeswitch.consoleLog("INFO","" .. cmd .. "\n");
result = trim(api:executeString(cmd));
if (string.sub(result, -9) == "not found") then

View File

@@ -52,7 +52,7 @@
file_subject = scripts_dir.."/app/missed_calls/resources/templates/en/us/email_subject.tpl";
file_body = scripts_dir.."/app/missed_calls/resources/templates/en/us/email_body.tpl";
end
--prepare the headers
headers = '{"X-FusionPBX-Domain-UUID":"'..domain_uuid..'",';
headers = headers..'"X-FusionPBX-Domain-Name":"'..domain_name..'",';
@@ -86,7 +86,7 @@
body = body:gsub("'", "&#39;");
body = body:gsub([["]], "&#34;");
body = trim(body);
--send the email
cmd = "luarun email.lua "..missed_call_data.." "..missed_call_data.." "..headers.." '"..subject.."' '"..body.."'";
if (debug["info"]) then
@@ -188,7 +188,7 @@
end
elseif (originate_disposition == "USER_NOT_REGISTERED") then
--handle USER_NOT_REGISTERED
forward_user_not_registered_enabled = session:getVariable("forward_user_not_registered_enabled");
if (forward_user_not_registered_enabled == "true") then
@@ -204,7 +204,7 @@
--send missed call notification
missed();
end
--send missed call notification
--missed();

View File

@@ -154,8 +154,8 @@
end
--get the fax settings from the database
sql = [[SELECT * FROM v_fax
WHERE fax_uuid = ']] .. fax_uuid ..[['
sql = [[SELECT * FROM v_fax
WHERE fax_uuid = ']] .. fax_uuid ..[['
AND domain_uuid = ']] .. domain_uuid ..[[']];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[fax] SQL: " .. sql .. "\n");
@@ -196,7 +196,7 @@
cmd = quote(php_dir.."/"..php_bin).." "..quote(document_root.."/secure/fax_to_email.php").." ";
cmd = cmd .. "email="..quote(fax_email).." ";
cmd = cmd .. "extension="..quote(fax_extension).." ";
cmd = cmd .. "name="..quote(fax_file).." ";
cmd = cmd .. "name="..quote(fax_file).." ";
cmd = cmd .. "messages=" .. quote("result:"..fax_result_text.." sender:"..fax_remote_station_id.." pages:"..fax_document_total_pages).." ";
cmd = cmd .. "domain="..quote(domain_name).." ";
cmd = cmd .. "caller_id_name=" .. quote(caller_id_name or '') .. " ";

View File

@@ -22,7 +22,7 @@ local task if fax_task_uuid then
task = Tasks.select_task(fax_task_uuid)
if not task then
log.warningf("Can not found fax task: %q", tostring(fax_task_uuid))
return
return
end
end

View File

@@ -55,7 +55,7 @@ local function next_task()
local mode = (task.retry_counter % #FAX_OPTIONS) + 1
local dial_string = '{' ..
task.dial_string .. "api_hangup_hook='lua app/fax/resources/scripts/queue/retry.lua'," ..
FAX_OPTIONS[mode] ..
FAX_OPTIONS[mode] ..
'}' .. task.uri
local originate = 'originate ' .. dial_string .. ' &lua(app/fax/resources/scripts/queue/exec.lua)'

View File

@@ -12,12 +12,12 @@
local fax_task_uuid = env:getHeader('fax_task_uuid')
if not fax_task_uuid then
log.warning("No [fax_task_uuid] channel variable")
return
return
end
local task = Tasks.select_task(fax_task_uuid)
if not task then
log.warningf("Can not find fax task: %q", tostring(fax_task_uuid))
return
return
end
-- show all channel variables

View File

@@ -37,7 +37,7 @@ select
t1.fax_task_uuid as uuid,
t1.fax_uuid as fax_uuid,
t3.domain_name,
t3.domain_uuid,
t3.domain_uuid,
t1.task_status as status,
t1.task_uri as uri,
t1.task_dial_string as dial_string,
@@ -51,7 +51,7 @@ select
t2.fax_send_greeting as greeting
from v_fax_tasks t1
inner join v_fax t2 on t2.fax_uuid = t1.fax_uuid
inner join v_domains t3 on t2.domain_uuid = t3.domain_uuid
inner join v_domains t3 on t2.domain_uuid = t3.domain_uuid
where t1.task_interrupted <> 'true'
]]

View File

@@ -128,7 +128,7 @@
--authentication failed
if (authorized == 'false') then
result = session:streamFile(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/voicemail/vm-fail_auth.wav");
end
end
--this device already has an alternate find the correct device_uuid and then override current one
if (authorized == 'true' and action == "login" and device_uuid_alternate ~= nil and device_uuid ~= nil and domain_uuid ~= nil) then

View File

@@ -203,17 +203,17 @@ local log = require "resources.functions.log".ring_group
else
--get the strategy of the ring group, if random, we use random() to order the destinations
sql = [[
SELECT
SELECT
r.ring_group_strategy
FROM
FROM
v_ring_groups as r
WHERE
ring_group_uuid = ']]..ring_group_uuid..[['
AND r.domain_uuid = ']]..domain_uuid..[['
AND r.ring_group_enabled = 'true'
WHERE
ring_group_uuid = ']]..ring_group_uuid..[['
AND r.domain_uuid = ']]..domain_uuid..[['
AND r.ring_group_enabled = 'true'
]];
assert(dbh:query(sql, function(row)
if (row.ring_group_strategy == "random") then
if (database["type"] == "mysql") then
@@ -223,23 +223,23 @@ local log = require "resources.functions.log".ring_group
end
else
sql_order='d.destination_delay, d.destination_number asc'
end
end
end));
--get the ring group destinations
sql = [[
SELECT
r.ring_group_strategy, r.ring_group_timeout_app, r.ring_group_distinctive_ring,
d.destination_number, d.destination_delay, d.destination_timeout, d.destination_prompt,
SELECT
r.ring_group_strategy, r.ring_group_timeout_app, r.ring_group_distinctive_ring,
d.destination_number, d.destination_delay, d.destination_timeout, d.destination_prompt,
r.ring_group_timeout_data, r.ring_group_cid_name_prefix, r.ring_group_cid_number_prefix, r.ring_group_ringback, r.ring_group_skip_active
FROM
FROM
v_ring_groups as r, v_ring_group_destinations as d
WHERE
d.ring_group_uuid = r.ring_group_uuid
AND d.ring_group_uuid = ']]..ring_group_uuid..[['
AND r.domain_uuid = ']]..domain_uuid..[['
AND r.ring_group_enabled = 'true'
ORDER BY
WHERE
d.ring_group_uuid = r.ring_group_uuid
AND d.ring_group_uuid = ']]..ring_group_uuid..[['
AND r.domain_uuid = ']]..domain_uuid..[['
AND r.ring_group_enabled = 'true'
ORDER BY
]]..sql_order..[[
]];
--freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
@@ -282,21 +282,21 @@ local log = require "resources.functions.log".ring_group
--get the dialplan data and save it to a table
if (external) then
sql = [[select * from v_dialplans as d, v_dialplan_details as s
sql = [[select * from v_dialplans as d, v_dialplan_details as s
where (d.domain_uuid = ']] .. domain_uuid .. [[' or d.domain_uuid is null)
and d.app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3'
and d.dialplan_enabled = 'true'
and d.dialplan_uuid = s.dialplan_uuid
order by
d.dialplan_order asc,
d.dialplan_name asc,
d.dialplan_uuid asc,
s.dialplan_detail_group asc,
CASE s.dialplan_detail_tag
WHEN 'condition' THEN 1
WHEN 'action' THEN 2
WHEN 'anti-action' THEN 3
ELSE 100 END,
and d.app_uuid = '8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3'
and d.dialplan_enabled = 'true'
and d.dialplan_uuid = s.dialplan_uuid
order by
d.dialplan_order asc,
d.dialplan_name asc,
d.dialplan_uuid asc,
s.dialplan_detail_group asc,
CASE s.dialplan_detail_tag
WHEN 'condition' THEN 1
WHEN 'action' THEN 2
WHEN 'anti-action' THEN 3
ELSE 100 END,
s.dialplan_detail_order asc ]]
--freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
dialplans = {};
@@ -374,7 +374,7 @@ local log = require "resources.functions.log".ring_group
end
--set confirm
if (ring_group_strategy == "simultaneous"
if (ring_group_strategy == "simultaneous"
or ring_group_strategy == "sequence"
or ring_group_strategy == "rollover") then
session:execute("set", "group_confirm_key=exec");
@@ -413,7 +413,7 @@ local log = require "resources.functions.log".ring_group
--record the session
if (record_session) then
record_session = ",api_on_answer='uuid_record "..uuid.." start ".. record_file .. "'";
else
else
record_session = ""
end
row.record_session = record_session
@@ -569,8 +569,8 @@ local log = require "resources.functions.log".ring_group
--if the timeout was reached go to the timeout action
if (x > 0) then
if (session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
or session:getVariable("originate_disposition") == "NO_ANSWER"
if (session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
or session:getVariable("originate_disposition") == "NO_ANSWER"
or session:getVariable("originate_disposition") == "NO_USER_RESPONSE") then
break;
end
@@ -609,12 +609,12 @@ local log = require "resources.functions.log".ring_group
--timeout destination
if (app_data ~= nil) then
if session:ready() and (
session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
or session:getVariable("originate_disposition") == "NO_ANSWER"
or session:getVariable("originate_disposition") == "NO_USER_RESPONSE"
or session:getVariable("originate_disposition") == "USER_NOT_REGISTERED"
or session:getVariable("originate_disposition") == "NORMAL_TEMPORARY_FAILURE"
or session:getVariable("originate_disposition") == "NO_ROUTE_DESTINATION"
session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
or session:getVariable("originate_disposition") == "NO_ANSWER"
or session:getVariable("originate_disposition") == "NO_USER_RESPONSE"
or session:getVariable("originate_disposition") == "USER_NOT_REGISTERED"
or session:getVariable("originate_disposition") == "NORMAL_TEMPORARY_FAILURE"
or session:getVariable("originate_disposition") == "NO_ROUTE_DESTINATION"
or session:getVariable("originate_disposition") == "USER_BUSY"
or session:getVariable("originate_disposition") == "failure"
) then

View File

@@ -25,7 +25,7 @@
--include config.lua
require "resources.functions.config";
--connect to the database
require "resources.functions.database_handle";
dbh = database_handle('system');
@@ -96,7 +96,7 @@
-- if string.len(destination) == 0) then
-- destination = session:playAndGetDigits(1, 1, max_tries, digit_timeout, "#", "ivr/ivr-enter_destination_telephone_number.wav", "", "\\d+");
-- freeswitch.consoleLog("NOTICE", "[ring_group] destination: "..destination.."\n");
` -- end
-- end
--end
--login or logout
@@ -109,7 +109,7 @@
SELECT COUNT(*) AS in_group FROM
v_ring_group_destinations
WHERE
domain_uuid = ']]..domain_uuid..[['
domain_uuid = ']]..domain_uuid..[['
AND ring_group_uuid = ']]..ring_group_uuid..[['
AND destination_number = ']]..destination..[['
]];
@@ -118,21 +118,21 @@
assert(dbh:query(sql, function(row)
if (row.in_group == "0") then
sql = [[
INSERT INTO
v_ring_group_destinations
INSERT INTO
v_ring_group_destinations
( ring_group_destination_uuid,
domain_uuid,
ring_group_uuid,
domain_uuid,
ring_group_uuid,
destination_number,
destination_delay,
destination_timeout
)
VALUES
)
VALUES
( ']]..ring_group_destination_uuid..[[',
']]..domain_uuid..[[',
']]..ring_group_uuid..[[',
']]..destination..[[',
]]..destination_delay..[[,
']]..domain_uuid..[[',
']]..ring_group_uuid..[[',
']]..destination..[[',
]]..destination_delay..[[,
]]..destination_timeout..[[
)]];
freeswitch.consoleLog("NOTICE", "[ring_group][destination] SQL "..sql.."\n");
@@ -148,11 +148,11 @@
end
if (menu_selection == "2") then
sql = [[
DELETE FROM
v_ring_group_destinations
WHERE
domain_uuid =']]..domain_uuid..[['
AND ring_group_uuid=']]..ring_group_uuid..[['
DELETE FROM
v_ring_group_destinations
WHERE
domain_uuid =']]..domain_uuid..[['
AND ring_group_uuid=']]..ring_group_uuid..[['
AND destination_number=']]..destination..[['
]];
freeswitch.consoleLog("NOTICE", "[ring_group][destination] SQL "..sql.."\n");

View File

@@ -25,7 +25,7 @@
--include config.lua
require "resources.functions.config";
--connect to the database
require "resources.functions.database_handle";
dbh = database_handle('system');
@@ -39,12 +39,12 @@
--define uuid function
local random = math.random;
local function uuid();
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb);
return string.format('%x', v);
end)
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb);
return string.format('%x', v);
end)
end
--get session variables
@@ -100,7 +100,7 @@
SELECT COUNT(*) AS in_group FROM
v_ring_group_destinations
WHERE
domain_uuid = ']]..domain_uuid..[['
domain_uuid = ']]..domain_uuid..[['
AND ring_group_uuid = ']]..ring_group_uuid..[['
AND destination_number = ']]..destination_number..[['
]];
@@ -109,21 +109,21 @@
assert(dbh:query(sql, function(row)
if (row.in_group == "0") then
sql = [[
INSERT INTO
v_ring_group_destinations
INSERT INTO
v_ring_group_destinations
( ring_group_destination_uuid,
domain_uuid,
ring_group_uuid,
domain_uuid,
ring_group_uuid,
destination_number,
destination_delay,
destination_timeout
)
VALUES
)
VALUES
( ']]..ring_group_destination_uuid..[[',
']]..domain_uuid..[[',
']]..ring_group_uuid..[[',
']]..destination..[[',
]]..destination_delay..[[,
']]..domain_uuid..[[',
']]..ring_group_uuid..[[',
']]..destination..[[',
]]..destination_delay..[[,
]]..destination_timeout..[[
)]];
freeswitch.consoleLog("NOTICE", "[ring_group][destination] SQL "..sql.."\n");
@@ -139,11 +139,11 @@
end
if (menu_selection == "2") then
sql = [[
DELETE FROM
v_ring_group_destinations
WHERE
domain_uuid =']]..domain_uuid..[['
AND ring_group_uuid=']]..ring_group_uuid..[['
DELETE FROM
v_ring_group_destinations
WHERE
domain_uuid =']]..domain_uuid..[['
AND ring_group_uuid=']]..ring_group_uuid..[['
AND destination_number=']]..destination..[['
]];
freeswitch.consoleLog("NOTICE", "[ring_group][destination] SQL "..sql.."\n");

View File

@@ -183,7 +183,7 @@
if (voicemail_attach_file == nil) then
voicemail_attach_file = "true";
end
--valid voicemail
if (voicemail_uuid ~= nil) then
--answer the session
@@ -340,7 +340,7 @@
end
--get the voicemail destinations
sql = [[select * from v_voicemail_destinations
sql = [[select * from v_voicemail_destinations
where voicemail_uuid = ']]..voicemail_uuid..[[']]
--freeswitch.consoleLog("notice", "[voicemail][destinations] SQL:" .. sql .. "\n");
destinations = {};
@@ -361,7 +361,7 @@
--determine uuid
if (y == 1) then
voicemail_message_uuid = uuid;
else
else
voicemail_message_uuid = api:execute("create_uuid");
end
y = y + 1;
@@ -506,7 +506,7 @@
--callback (works with DTMF)
--http://wiki.freeswitch.org/wiki/Mod_fsv
--mkdir(voicemail_dir.."/"..voicemail_id);
--session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs)
--session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs)
--session:sayPhrase(macro_name [,macro_data] [,language]);
--session:sayPhrase("voicemail_menu", "1:2:3:#", default_language);
--session:streamFile("directory/dir-to_select_entry.wav"); --works with setInputCallback

View File

@@ -38,7 +38,7 @@
--check to see if the greeting file exists
if (storage_type == "base64" or storage_type == "http_cache") then
greeting_invalid = true;
sql = [[SELECT * FROM v_voicemail_greetings
sql = [[SELECT * FROM v_voicemail_greetings
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND voicemail_id = ']].. voicemail_id.. [['
AND greeting_id = ']].. greeting_id.. [[' ]];
@@ -59,20 +59,20 @@
end
--validate the greeting_id
if (greeting_id == "0"
or greeting_id == "1"
or greeting_id == "2"
or greeting_id == "3"
or greeting_id == "4"
or greeting_id == "5"
or greeting_id == "6"
or greeting_id == "7"
or greeting_id == "8"
if (greeting_id == "0"
or greeting_id == "1"
or greeting_id == "2"
or greeting_id == "3"
or greeting_id == "4"
or greeting_id == "5"
or greeting_id == "6"
or greeting_id == "7"
or greeting_id == "8"
or greeting_id == "9") then
--valid greeting_id update the database
if (session:ready()) then
if (greeting_id == "0") then
if (greeting_id == "0") then
sql = [[UPDATE v_voicemails SET greeting_id = null ]];
else
sql = [[UPDATE v_voicemails SET greeting_id = ']]..greeting_id..[[' ]];
@@ -87,7 +87,7 @@
--get the greeting from the database
if (storage_type == "base64") then
sql = [[SELECT * FROM v_voicemail_greetings
sql = [[SELECT * FROM v_voicemail_greetings
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND voicemail_id = ']].. voicemail_id.. [['
AND greeting_id = ']].. greeting_id.. [[' ]];

View File

@@ -42,7 +42,7 @@
end
--say the message number
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
if (string.len(dtmf_digits) == 0) then
dtmf_digits = macro(session, "message_number", 1, 100, '');
end
end
@@ -72,7 +72,7 @@
end
--get the recordings from the database
if (storage_type == "base64") then
sql = [[SELECT * FROM v_voicemail_messages
sql = [[SELECT * FROM v_voicemail_messages
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND voicemail_message_uuid = ']].. uuid.. [[' ]];
if (debug["sql"]) then

View File

@@ -136,7 +136,7 @@
table.insert(actions, {app="streamFile",data="voicemail/vm-press.wav"});
table.insert(actions, {app="streamFile",data="digits/3.wav"});
end
--At the tone please record your name press any key or stop talking to end the recording
--At the tone please record your name press any key or stop talking to end the recording
if (name == "record_name") then
table.insert(actions, {app="streamFile",data="voicemail/vm-record_name1.wav"});
table.insert(actions, {app="tone_stream",data="L=1;%(1000, 0, 640)"});

View File

@@ -29,7 +29,7 @@
local accounts = {}
table.insert(accounts, voicemail_id);
--get the voicemail id and all related mwi accounts
sql = [[SELECT extension, number_alias from v_extensions
sql = [[SELECT extension, number_alias from v_extensions
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND (mwi_account = ']]..voicemail_id..[[' or mwi_account = ']]..voicemail_id..[[@]]..domain_name..[[')]];
if (debug["sql"]) then
@@ -47,7 +47,7 @@
sql = [[SELECT count(*) as message_count FROM v_voicemail_messages as m, v_voicemails as v
WHERE v.domain_uuid = ']] .. domain_uuid ..[['
AND v.voicemail_uuid = m.voicemail_uuid
AND v.voicemail_id = ']] .. voicemail_id ..[['
AND v.voicemail_id = ']] .. voicemail_id ..[['
AND (m.message_status is null or m.message_status = '') ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
@@ -57,7 +57,7 @@
end);
--send the message waiting event
for key,value in pairs(accounts) do
for key,value in pairs(accounts) do
local event = freeswitch.Event("message_waiting");
if (message_count == "0") then
if (debug["info"]) then

View File

@@ -26,7 +26,7 @@
--define on_dtmf call back function
function on_dtmf(s, type, obj, arg)
if (type == "dtmf") then
freeswitch.console_log("info", "[voicemail] dtmf digit: " .. obj['digit'] .. ", duration: " .. obj['duration'] .. "\n");
freeswitch.console_log("info", "[voicemail] dtmf digit: " .. obj['digit'] .. ", duration: " .. obj['duration'] .. "\n");
if (obj['digit'] == "#") then
return 0;
else

View File

@@ -43,7 +43,7 @@
--get the greeting from the database
if (storage_type == "base64") then
sql = [[SELECT * FROM v_voicemail_greetings
sql = [[SELECT * FROM v_voicemail_greetings
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND voicemail_id = ']].. voicemail_id.. [['
AND greeting_id = ']].. greeting_id.. [[' ]];

View File

@@ -39,14 +39,14 @@
end
--validate the greeting_id
if (greeting_id == "1"
or greeting_id == "2"
or greeting_id == "3"
or greeting_id == "4"
or greeting_id == "5"
or greeting_id == "6"
or greeting_id == "7"
or greeting_id == "8"
if (greeting_id == "1"
or greeting_id == "2"
or greeting_id == "3"
or greeting_id == "4"
or greeting_id == "5"
or greeting_id == "6"
or greeting_id == "7"
or greeting_id == "8"
or greeting_id == "9") then
--record your greeting at the tone press any key or stop talking to end the recording
if (session:ready()) then
@@ -59,7 +59,7 @@
freeswitch.consoleLog("notice", "[voicemail] ".. storage_type .. " ".. storage_path .."\n");
storage_path = storage_path:gsub("${domain_name}", domain_name);
session:execute("record", storage_path .."/"..recording_name);
else
else
--prepare to record the greeting
if (session:ready()) then
max_len_seconds = 30;
@@ -101,12 +101,12 @@
end
end
end
--clean up any tmp greeting files
for gid = 1, 9, 1 do
if (file_exists(voicemail_dir.."/"..voicemail_id.."/greeting_"..gid..".tmp.wav")) then
os.remove(voicemail_dir.."/"..voicemail_id.."/greeting_"..gid..".tmp.wav");
end
end
end

View File

@@ -170,7 +170,7 @@
--remove temporary greeting file, if any
if (file_exists(tmp_file)) then
os.remove(tmp_file);
end
end
record_greeting(greeting_id);
end
if (type == "name") then
@@ -181,8 +181,8 @@
--remove temporary greeting file, if any
if (file_exists(tmp_file)) then
os.remove(tmp_file);
end
end
end
end
--hangup
if (session:ready()) then
dtmf_digits = '';
@@ -205,7 +205,7 @@
--remove temporary greeting file, if any
if (file_exists(tmp_file)) then
os.remove(tmp_file);
end
end
advanced();
end
if (type == "name") then

View File

@@ -40,7 +40,7 @@
if (dtmf_digits == nil) then
dtmf_digits = session:getDigits(max_digits, "#", 1000);
else
dtmf_digits = dtmf_digits .. session:getDigits(max_digits, "#", 1000);
dtmf_digits = dtmf_digits .. session:getDigits(max_digits, "#", 1000);
end
end
if (dtmf_digits) then
@@ -166,10 +166,10 @@
--delete the wav file, if mp3 exists
if (file_exists(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid..".mp3")) then
os.remove(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid..".wav");
else
else
vm_message_ext = "wav";
end
else
else
freeswitch.consoleLog("notice", "neither mod_shout or lame found, defaulting to wav\n");
vm_message_ext = "wav";
end

View File

@@ -189,7 +189,7 @@
os.remove(file);
end
end
end
end

View File

@@ -36,7 +36,7 @@
debug["sql"] = false;
debug["info"] = false;
--only run the script a single time
--only run the script a single time
runonce = true
--connect to the database
require "resources.functions.database_handle";
@@ -65,10 +65,10 @@
end
--Send MWI events for voicemail boxes with messages
sql = [[SELECT v.voicemail_id, v.voicemail_uuid, v.domain_uuid, d.domain_name, COUNT(*) AS message_count
FROM v_voicemail_messages as m, v_voicemails as v, v_domains as d
WHERE v.voicemail_uuid = m.voicemail_uuid
AND v.domain_uuid = d.domain_uuid
sql = [[SELECT v.voicemail_id, v.voicemail_uuid, v.domain_uuid, d.domain_name, COUNT(*) AS message_count
FROM v_voicemail_messages as m, v_voicemails as v, v_domains as d
WHERE v.voicemail_uuid = m.voicemail_uuid
AND v.domain_uuid = d.domain_uuid
GROUP BY v.voicemail_id, v.voicemail_uuid, v.domain_uuid, d.domain_name;]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
@@ -120,5 +120,5 @@
--slow the loop down
os.execute("sleep "..sleep);
end
end

View File

@@ -59,7 +59,7 @@
table.insert(xml, [[ <control action="vol listen dn" digits="4"/>]]);
table.insert(xml, [[ <control action="hangup" digits=""/>]]);
table.insert(xml, [[ <control action="execute_application" digits="0" data="lua app/conference_center/resources/scripts/mute.lua non_moderator"/>]]);
table.insert(xml, [[ <control action="execute_application" digits="*" data="lua app/conference_center/resources/scripts/unmute.lua non_moderator"/>]]);
table.insert(xml, [[ <control action="execute_application" digits="*" data="lua app/conference_center/resources/scripts/unmute.lua non_moderator"/>]]);
table.insert(xml, [[ </group>]]);
table.insert(xml, [[ <group name="page">]]);
table.insert(xml, [[ <control action="mute" digits="0"/>]]);

View File

@@ -44,7 +44,7 @@
assert(dbh:connected());
--get the ivr menu from the database
sql = [[SELECT * FROM v_ivr_menus
sql = [[SELECT * FROM v_ivr_menus
WHERE ivr_menu_uuid = ']] .. ivr_menu_uuid ..[['
AND ivr_menu_enabled = 'true' ]];
if (debug["sql"]) then
@@ -86,7 +86,7 @@
--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
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_greet_long..[[' ]];
if (debug["sql"]) then
@@ -110,7 +110,7 @@
--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
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_greet_short..[[' ]];
if (debug["sql"]) then
@@ -134,7 +134,7 @@
--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
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_invalid_sound..[[' ]];
if (debug["sql"]) then
@@ -158,7 +158,7 @@
--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
sql = [[SELECT * FROM v_recordings
WHERE domain_uuid = ']]..domain_uuid..[['
AND recording_filename = ']]..ivr_menu_exit_sound..[[' ]];
if (debug["sql"]) then

View File

@@ -170,27 +170,27 @@
--determine the type of condition
if (dialplan_detail_type == "hour") then
condition_type = 'time';
elseif (dialplan_detail_type == "minute") then
elseif (dialplan_detail_type == "minute") then
condition_type = 'time';
elseif (dialplan_detail_type == "minute-of-day") then
elseif (dialplan_detail_type == "minute-of-day") then
condition_type = 'time';
elseif (dialplan_detail_type == "mday") then
elseif (dialplan_detail_type == "mday") then
condition_type = 'time';
elseif (dialplan_detail_type == "mweek") then
elseif (dialplan_detail_type == "mweek") then
condition_type = 'time';
elseif (dialplan_detail_type == "mon") then
elseif (dialplan_detail_type == "mon") then
condition_type = 'time';
elseif (dialplan_detail_type == "time-of-day") then
elseif (dialplan_detail_type == "time-of-day") then
condition_type = 'time';
elseif (dialplan_detail_type == "yday") then
elseif (dialplan_detail_type == "yday") then
condition_type = 'time';
elseif (dialplan_detail_type == "year") then
elseif (dialplan_detail_type == "year") then
condition_type = 'time';
elseif (dialplan_detail_type == "wday") then
elseif (dialplan_detail_type == "wday") then
condition_type = 'time';
elseif (dialplan_detail_type == "week") then
elseif (dialplan_detail_type == "week") then
condition_type = 'time';
elseif (dialplan_detail_type == "date-time") then
elseif (dialplan_detail_type == "date-time") then
condition_type = 'time';
else
condition_type = 'default';

View File

@@ -57,9 +57,9 @@
--build the call group array
sql = [[
select * from v_extensions
where domain_uuid = ']]..domain_uuid..[['
order by call_group asc
select * from v_extensions
where domain_uuid = ']]..domain_uuid..[['
order by call_group asc
]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n");

View File

@@ -26,7 +26,7 @@
--
-- Contributor(s):
-- Mark J Crane <markjcrane@fusionpbx.com>
-- Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
-- Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
--set the default
continue = true;
@@ -46,7 +46,7 @@
number_alias_string = "";
vm_mailto = "";
-- event source
-- event source
local event_calling_function = params:getHeader("Event-Calling-Function")
local event_calling_file = params:getHeader("Event-Calling-File")
@@ -67,7 +67,7 @@
dofile(scripts_dir.."/app/xml_handler/resources/scripts/directory/action/directory.lua");
else
--handle action
--all other directory actions: sip_auth, user_call
--all other directory actions: sip_auth, user_call
--except for the action: group_call
if (user == nil) then

View File

@@ -161,7 +161,7 @@
file_handle:close();
end
--iterate array of file paths, get contents of other xml macro files
for key, xml_file_path in pairs(xml_file_paths) do
for key, xml_file_path in pairs(xml_file_paths) do
if (file_exists(xml_file_path)) then
xml_file = io.open(xml_file_path, "r");
if (xml_file ~= nil) then
@@ -170,7 +170,7 @@
xml_file_content = string.gsub(xml_file_content, "</include>", '');
table.insert(xml, xml_file_content);
--freeswitch.consoleLog("notice", "file contents...\n\n"..xml_file_content.."\n");
end
end
xml_file:close();
end
end

View File

@@ -125,7 +125,7 @@ if (session:ready()) then
--hangup the call
session:hangup();
else
else
log.notice("execute " .. app .. " " .. data);
--exucute the application

Some files were not shown because too many files have changed in this diff Show More