mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Merge branch 'master' into fax_queue
This commit is contained in:
@@ -260,10 +260,10 @@ require_once "resources/header.php";
|
||||
$phone_1 = preg_replace('{\D}', '', $tmp_value_array[0]);
|
||||
|
||||
if ($gateway == "loopback") {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_1."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_1."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
else {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_1." ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_1." ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
echo $cmd."<br />\n";
|
||||
cmd_async($cmd);
|
||||
@@ -335,20 +335,20 @@ require_once "resources/header.php";
|
||||
//make the call
|
||||
if (strlen($phone_1)> 0) {
|
||||
if ($gateway == "loopback") {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_1."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_1."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
else {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_1." ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_1." ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
//echo $cmd."<br />\n";
|
||||
cmd_async($cmd);
|
||||
}
|
||||
if (strlen($phone_2)> 0) {
|
||||
if ($gateway == "loopback") {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_2."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}loopback/".$phone_2."/default/XML ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
else {
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_2." ".$_SESSION['switch']['recordings']['dir']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
$cmd = $_SESSION['switch']['bin']['dir']."/fs_cli -x \"luarun call_broadcast_originate.lua {call_timeout=".$broadcast_timeout."}sofia/gateway/".$gateway."/".$phone_2." ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename." '".$broadcast_caller_id_name."' ".$broadcast_caller_id_number." ".$broadcast_timeout." '".$broadcast_destination_application."' '".$broadcast_destination_data."'\";";
|
||||
}
|
||||
//echo $cmd."<br />\n";
|
||||
cmd_async($cmd);
|
||||
|
||||
@@ -739,7 +739,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$record_ext=($_SESSION['record_ext']=='mp3'?'mp3':'wav');
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.".$record_ext;
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.".$record_ext;
|
||||
echo " <select class='formfld' name='queue_record_template'>\n";
|
||||
if (strlen($queue_record_template) > 0) {
|
||||
echo " <option value='$record_template' selected='selected' >".$text['option-true']."</option>\n";
|
||||
|
||||
@@ -131,7 +131,7 @@ require_once "resources/footer.php";
|
||||
}
|
||||
|
||||
function get_record_cmd(uuid, prefix, name) {
|
||||
cmd = \"uuid_record \"+uuid+\" start ".$_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/\"+uuid+\".wav\";
|
||||
cmd = \"uuid_record \"+uuid+\" start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/\"+uuid+\".wav\";
|
||||
return escape(cmd);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -205,7 +205,7 @@ else {
|
||||
//park
|
||||
echo " <a href='javascript:void(0);' onclick=\"send_cmd('calls_exec.php?cmd='+get_park_cmd(escape('$uuid'), '".$tmp_domain."'));\">".$text['label-park']."</a> \n";
|
||||
//record start/stop
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d");
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d");
|
||||
mkdir($tmp_dir, 0777, true);
|
||||
$tmp_file = $tmp_dir."/".$uuid.".wav";
|
||||
if (file_exists($tmp_file)) {
|
||||
|
||||
@@ -229,13 +229,13 @@ if (count($_GET)>0) {
|
||||
$x=0;
|
||||
while (true) {
|
||||
if ($x > 0) {
|
||||
$dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"]."_".$x.".wav";
|
||||
$dest_file = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"]."_".$x.".wav";
|
||||
}
|
||||
else {
|
||||
$dest_file = $_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav";
|
||||
$dest_file = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav";
|
||||
}
|
||||
if (!file_exists($dest_file)) {
|
||||
rename($_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav", $dest_file);
|
||||
rename($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$_GET["uuid"].".wav", $dest_file);
|
||||
break;
|
||||
}
|
||||
$x++;
|
||||
|
||||
@@ -201,7 +201,7 @@ if (is_array($_REQUEST) && !empty($_REQUEST['src']) && !empty($_REQUEST['dest'])
|
||||
//use the server's time zone to ensure it matches the time zone used by freeswitch
|
||||
date_default_timezone_set($_SESSION['time_zone']['system']);
|
||||
//create the api record command and send it over event socket
|
||||
$switch_cmd = "api uuid_record ".$uuid." start ".$_SESSION['switch']['recordings']['dir']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$uuid.".wav";
|
||||
$switch_cmd = "api uuid_record ".$uuid." start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/".$uuid.".wav";
|
||||
$result2 = trim(event_socket_request($fp, $switch_cmd));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,15 +340,15 @@ else {
|
||||
echo " <select name='conference_center_greeting' class='formfld' ".((permission_exists('conference_center_add') || permission_exists('conference_center_edit')) ? "onchange='changeToInput(this);'" : null).">\n";
|
||||
echo " <option></option>\n";
|
||||
//recordings
|
||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/")) {
|
||||
$tmp_selected = false;
|
||||
$files = Array();
|
||||
echo "<optgroup label='Recordings'>\n";
|
||||
while ($file = readdir($dh)) {
|
||||
if ($file != "." && $file != ".." && $file[0] != '.') {
|
||||
if (!is_dir($_SESSION['switch']['recordings']['dir']."/".$file)) {
|
||||
$selected = ($conference_center_greeting == $_SESSION['switch']['recordings']['dir']."/".$file && strlen($conference_center_greeting) > 0) ? true : false;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$file."' ".(($selected) ? "selected='selected'" : null).">".$file."</option>\n";
|
||||
if (!is_dir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)) {
|
||||
$selected = ($conference_center_greeting == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file && strlen($conference_center_greeting) > 0) ? true : false;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file."' ".(($selected) ? "selected='selected'" : null).">".$file."</option>\n";
|
||||
if ($selected) { $tmp_selected = true; }
|
||||
}
|
||||
}
|
||||
@@ -393,8 +393,8 @@ else {
|
||||
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
||||
if (!$tmp_selected) {
|
||||
echo "<optgroup label='selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$conference_center_greeting)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$conference_center_greeting."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$conference_center_greeting)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$conference_center_greeting."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||
}
|
||||
else if (substr($conference_center_greeting, -3) == "wav" || substr($conference_center_greeting, -3) == "mp3") {
|
||||
echo " <option value='".$conference_center_greeting."' selected='selected'>".$conference_center_greeting."</option>\n";
|
||||
|
||||
@@ -77,7 +77,7 @@ else {
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-conference_session_details']."</b></td>\n";
|
||||
echo " <td width='70%' align='right'>\n";
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".mp3";
|
||||
|
||||
@@ -146,7 +146,7 @@ else {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$start_date." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$end_date." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['profile']." </td>\n";
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$row['conference_session_uuid'].'.mp3')) {
|
||||
$tmp_name = $row['conference_session_uuid'].".mp3";
|
||||
|
||||
@@ -141,7 +141,7 @@ else {
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value);
|
||||
}
|
||||
elseif ($data == "record") {
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$switch_cmd .= $recording_dir."/".$uuid.".wav";
|
||||
if (!file_exists($recording_dir."/".$uuid.".wav")) {
|
||||
$switch_result = event_socket_request($fp, "api ".$switch_cmd);
|
||||
@@ -149,7 +149,7 @@ else {
|
||||
}
|
||||
elseif ($data == "norecord") {
|
||||
//stop recording and rename the file
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$switch_cmd .= $recording_dir."/".$uuid.".wav";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ else {
|
||||
echo " </td>\n";
|
||||
echo "<td align='right'>\n";
|
||||
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$recording_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
|
||||
$recording_name = '';
|
||||
if (file_exists($recording_dir.'/'.$row['uuid'].'.wav')) {
|
||||
$recording_name = $session_uuid.".wav";
|
||||
|
||||
@@ -77,6 +77,15 @@ else {
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//create a new app_uuid when copying a dialplan except for these exceptions
|
||||
switch ($app_uuid) {
|
||||
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": //inbound routes
|
||||
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": //outbound routes
|
||||
case "4b821450-926b-175a-af93-a03c441818b1": //time conditions
|
||||
default:
|
||||
$app_uuid = uuid();
|
||||
}
|
||||
|
||||
//copy the dialplan
|
||||
$dialplan_uuid = uuid();
|
||||
$sql = "insert into v_dialplans ";
|
||||
|
||||
@@ -440,9 +440,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($ivr_menu_greet_long == $_SESSION['switch']['recordings']['dir']."/".$recording_filename && strlen($ivr_menu_greet_long) > 0) {
|
||||
if ($ivr_menu_greet_long == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_greet_long) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else if ($ivr_menu_greet_long == $recording_filename && strlen($ivr_menu_greet_long) > 0) {
|
||||
$tmp_selected = true;
|
||||
@@ -500,8 +500,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\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";
|
||||
}
|
||||
else if (substr($ivr_menu_greet_long, -3) == "wav" || substr($ivr_menu_greet_long, -3) == "mp3") {
|
||||
echo " <option value='".$ivr_menu_greet_long."' selected='selected'>".$ivr_menu_greet_long."</option>\n";
|
||||
@@ -538,9 +538,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$recording_filename && strlen($ivr_menu_greet_short) > 0) {
|
||||
if ($ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_greet_short) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else if ($ivr_menu_greet_short == $recording_filename && strlen($ivr_menu_greet_short) > 0) {
|
||||
$tmp_selected = true;
|
||||
@@ -599,8 +599,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected && strlen($ivr_menu_greet_short) > 0) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_short)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||
}
|
||||
else if (substr($ivr_menu_greet_short, -3) == "wav" || substr($ivr_menu_greet_short, -3) == "mp3") {
|
||||
echo " <option value='".$ivr_menu_greet_short."' selected='selected'>".$ivr_menu_greet_short."</option>\n";
|
||||
@@ -877,9 +877,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($ivr_menu_invalid_sound == $_SESSION['switch']['recordings']['dir']."/".$recording_filename && strlen($ivr_menu_invalid_sound) > 0) {
|
||||
if ($ivr_menu_invalid_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_invalid_sound) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else if ($ivr_menu_invalid_sound == $recording_filename && strlen($ivr_menu_invalid_sound) > 0) {
|
||||
$tmp_selected = true;
|
||||
@@ -935,8 +935,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_invalid_sound)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_invalid_sound."' selected='selected'>".$ivr_menu_invalid_sound."</option>\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";
|
||||
}
|
||||
else if (substr($ivr_menu_invalid_sound, -3) == "wav" || substr($ivr_menu_invalid_sound, -3) == "mp3") {
|
||||
echo " <option value='".$ivr_menu_invalid_sound."' selected='selected'>".$ivr_menu_invalid_sound."</option>\n";
|
||||
@@ -973,9 +973,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($ivr_menu_exit_sound == $_SESSION['switch']['recordings']['dir']."/".$recording_filename && strlen($ivr_menu_exit_sound) > 0) {
|
||||
if ($ivr_menu_exit_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($ivr_menu_exit_sound) > 0) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename."' selected='selected'>".$recording_name."</option>\n";
|
||||
}
|
||||
else if ($ivr_menu_exit_sound == $recording_filename && strlen($ivr_menu_exit_sound) > 0) {
|
||||
$tmp_selected = true;
|
||||
@@ -1031,8 +1031,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (if_group("superadmin")) {
|
||||
if (!$tmp_selected) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$ivr_menu_exit_sound)) {
|
||||
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$ivr_menu_exit_sound."' selected='selected'>".$ivr_menu_exit_sound."</option>\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";
|
||||
}
|
||||
else if (substr($ivr_menu_exit_sound, -3) == "wav" || substr($ivr_menu_exit_sound, -3) == "mp3") {
|
||||
echo " <option value='".$ivr_menu_exit_sound."' selected='selected'>".$ivr_menu_exit_sound."</option>\n";
|
||||
|
||||
@@ -90,7 +90,7 @@ include "root.php";
|
||||
}
|
||||
}
|
||||
//recordings
|
||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/")) {
|
||||
$tmp_selected = false;
|
||||
$files = Array();
|
||||
//$select .= "<optgroup label='recordings'>\n";
|
||||
|
||||
@@ -357,7 +357,7 @@ require_once "resources/header.php";
|
||||
}
|
||||
|
||||
function get_record_cmd(uuid) {
|
||||
cmd = "uuid_record " + uuid + " start <?php echo $_SESSION['switch']['recordings']['dir']?>/archive/<?php echo date('Y')?>/<?php echo date('M')?>/<?php echo date('d')?>/" + uuid + ".wav";
|
||||
cmd = "uuid_record " + uuid + " start <?php echo $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']; ?>/archive/<?php echo date('Y')?>/<?php echo date('M')?>/<?php echo date('d')?>/" + uuid + ".wav";
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ if ($domains_processed == 1) {
|
||||
foreach ($result as &$row) {
|
||||
$phrase_detail_uuid = $row['phrase_detail_uuid'];
|
||||
$phrase_detail_data = $row['phrase_detail_data'];
|
||||
if (substr_count($phrase_detail_data, $_SESSION['switch']['recordings']['dir']) > 0) {
|
||||
$phrase_detail_data = str_replace($_SESSION['switch']['recordings']['dir'].'/', '', $phrase_detail_data);
|
||||
if (substr_count($phrase_detail_data, $_SESSION['switch']['recordings']['dir'].'/'.$domain_name) > 0) {
|
||||
$phrase_detail_data = str_replace($_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/', '', $phrase_detail_data);
|
||||
}
|
||||
//update function and data to be base64 compatible
|
||||
$phrase_detail_data = "lua(streamfile.lua ".$phrase_detail_data.")";
|
||||
@@ -141,7 +141,7 @@ if ($domains_processed == 1) {
|
||||
$phrase_detail_data = str_replace('lua(streamfile.lua ', '', $phrase_detail_data);
|
||||
$phrase_detail_data = str_replace(')', '', $phrase_detail_data);
|
||||
if (substr_count($phrase_detail_data, '/') === 0) {
|
||||
$phrase_detail_data = $_SESSION['switch']['recordings']['dir'].'/'.$phrase_detail_data;
|
||||
$phrase_detail_data = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/'.$phrase_detail_data;
|
||||
}
|
||||
$sql = "update v_phrase_details set ";
|
||||
$sql .= "phrase_detail_function = 'play-file', ";
|
||||
|
||||
@@ -305,7 +305,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"lua(streamfile.lua ".$row["recording_filename"].")\"));\n";
|
||||
}
|
||||
else {
|
||||
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"".$_SESSION['switch']['recordings']['dir'].'/'.$row["recording_filename"]."\"));\n";
|
||||
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"".$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row["recording_filename"]."\"));\n";
|
||||
}
|
||||
}
|
||||
echo "obj_action.appendChild(opt_group);\n";
|
||||
@@ -470,7 +470,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
if ($field['phrase_detail_function'] == 'play-file') {
|
||||
$phrase_detail_function = $text['label-play'];
|
||||
$phrase_detail_data = str_replace($_SESSION['switch']['recordings']['dir'].'/', '', $field['phrase_detail_data']);
|
||||
$phrase_detail_data = str_replace($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/', '', $field['phrase_detail_data']);
|
||||
}
|
||||
echo "<tr>\n";
|
||||
echo " <td class='vtable'>".$phrase_detail_function." </td>\n";
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
*/
|
||||
|
||||
//if the recordings directory doesn't exist then create it
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
||||
if (!is_readable($_SESSION['switch']['recordings']['dir'])) { mkdir($_SESSION['switch']['recordings']['dir'],0777,true); }
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']."/".$domain_name) > 0) {
|
||||
if (!is_readable($_SESSION['switch']['recordings']['dir']."/".$domain_name)) { mkdir($_SESSION['switch']['recordings']['dir']."/".$domain_name,0777,true); }
|
||||
}
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
@@ -45,7 +45,7 @@ if ($domains_processed == 1) {
|
||||
$recording_domain_uuid = $row['domain_uuid'];
|
||||
$recording_filename = $row['recording_filename'];
|
||||
//set recording directory
|
||||
$recording_directory = $_SESSION['switch']['recordings']['dir'];
|
||||
$recording_directory = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name;
|
||||
//encode recording file (if exists)
|
||||
if (file_exists($recording_directory.'/'.$recording_filename)) {
|
||||
$recording_base64 = base64_encode(file_get_contents($recording_directory.'/'.$recording_filename));
|
||||
@@ -78,7 +78,7 @@ if ($domains_processed == 1) {
|
||||
$recording_filename = $row['recording_filename'];
|
||||
$recording_base64 = $row['recording_base64'];
|
||||
//set recording directory
|
||||
$recording_directory = $_SESSION['switch']['recordings']['dir'];
|
||||
$recording_directory = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name;
|
||||
//remove local file, if any
|
||||
if (file_exists($recording_directory.'/'.$recording_filename)) {
|
||||
@unlink($recording_directory.'/'.$recording_filename);
|
||||
|
||||
@@ -66,8 +66,8 @@ if (strlen($id)>0) {
|
||||
unset($sql);
|
||||
|
||||
//delete the recording
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$filename)) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir']."/".$filename);
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$filename)) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (permission_exists('recording_edit')) {
|
||||
//if file name is not the same then rename the file
|
||||
if ($recording_filename != $recording_filename_original) {
|
||||
rename($_SESSION['switch']['recordings']['dir'].'/'.$recording_filename_original, $_SESSION['switch']['recordings']['dir'].'/'.$recording_filename);
|
||||
rename($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename_original, $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename);
|
||||
}
|
||||
|
||||
//update the database with the new data
|
||||
|
||||
@@ -49,7 +49,7 @@ require_once "resources/check_auth.php";
|
||||
if ($_GET['a'] == "download" && (permission_exists('recording_play') || permission_exists('recording_download'))) {
|
||||
session_cache_limiter('public');
|
||||
if ($_GET['type'] = "rec") {
|
||||
$path = $_SESSION['switch']['recordings']['dir'];
|
||||
$path = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'];
|
||||
|
||||
//if from recordings, get recording details from db
|
||||
$recording_uuid = check_str($_GET['id']); //recordings
|
||||
@@ -115,7 +115,7 @@ require_once "resources/check_auth.php";
|
||||
if ($_POST['submit'] == $text['button-upload'] && $_POST['type'] == 'rec' && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
|
||||
$recording_filename = str_replace(" ", "_", $_FILES['ulfile']['name']);
|
||||
$recording_filename = str_replace("'", "", $recording_filename);
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$recording_filename);
|
||||
move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename);
|
||||
|
||||
$_SESSION['message'] = $text['message-uploaded'].": ".htmlentities($recording_filename);
|
||||
|
||||
@@ -146,9 +146,9 @@ require_once "resources/check_auth.php";
|
||||
$array_base64_exists[$row['recording_uuid']] = ($row['recording_base64'] != '') ? true : false;
|
||||
//if not base64, convert back to local files and remove base64 from db
|
||||
if ($_SESSION['recordings']['storage_type']['text'] != 'base64' && $row['recording_base64'] != '') {
|
||||
if (!file_exists($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename'])) {
|
||||
if (!file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['recording_filename'])) {
|
||||
$recording_decoded = base64_decode($row['recording_base64']);
|
||||
file_put_contents($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename'], $recording_decoded);
|
||||
file_put_contents($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['recording_filename'], $recording_decoded);
|
||||
$sql = "update v_recordings set recording_base64 = null where domain_uuid = '".$domain_uuid."' and recording_uuid = '".$row['recording_uuid']."' ";
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
@@ -158,10 +158,10 @@ require_once "resources/check_auth.php";
|
||||
unset ($prep_statement);
|
||||
|
||||
//add recordings to the database
|
||||
if (is_dir($_SESSION['switch']['recordings']['dir'].'/')) {
|
||||
if ($dh = opendir($_SESSION['switch']['recordings']['dir'].'/')) {
|
||||
if (is_dir($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/')) {
|
||||
if ($dh = opendir($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/')) {
|
||||
while (($recording_filename = readdir($dh)) !== false) {
|
||||
if (filetype($_SESSION['switch']['recordings']['dir']."/".$recording_filename) == "file") {
|
||||
if (filetype($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename) == "file") {
|
||||
|
||||
if (!in_array($recording_filename, $array_recordings)) {
|
||||
//file not found in db, add it
|
||||
@@ -187,7 +187,7 @@ require_once "resources/check_auth.php";
|
||||
$sql .= "'".$recording_name."', ";
|
||||
$sql .= "'".$recording_description."' ";
|
||||
if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
|
||||
$recording_base64 = base64_encode(file_get_contents($_SESSION['switch']['recordings']['dir'].'/'.$recording_filename));
|
||||
$recording_base64 = base64_encode(file_get_contents($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename));
|
||||
$sql .= ", '".$recording_base64."' ";
|
||||
}
|
||||
$sql .= ")";
|
||||
@@ -199,7 +199,7 @@ require_once "resources/check_auth.php";
|
||||
if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
|
||||
$found_recording_uuid = array_search($recording_filename, $array_recordings);
|
||||
if (!$array_base64_exists[$found_recording_uuid]) {
|
||||
$recording_base64 = base64_encode(file_get_contents($_SESSION['switch']['recordings']['dir'].'/'.$recording_filename));
|
||||
$recording_base64 = base64_encode(file_get_contents($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename));
|
||||
$sql = "update v_recordings set ";
|
||||
$sql .= "recording_base64 = '".$recording_base64."' ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
@@ -211,8 +211,8 @@ require_once "resources/check_auth.php";
|
||||
}
|
||||
|
||||
//if base64, remove local file
|
||||
if ($_SESSION['recordings']['storage_type']['text'] == 'base64' && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$recording_filename)) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir'].'/'.$recording_filename);
|
||||
if ($_SESSION['recordings']['storage_type']['text'] == 'base64' && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename)) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -307,7 +307,7 @@ require_once "resources/check_auth.php";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['recording_name']."</td>\n";
|
||||
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['recording_filename']."</td>\n";
|
||||
$tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename']);
|
||||
$tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['recording_filename']);
|
||||
$tmp_filesize = byte_convert($tmp_filesize);
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: center;'>".$tmp_filesize."</td>\n";
|
||||
}
|
||||
|
||||
@@ -80,6 +80,46 @@ $text['label-os']['sv-se'] = "Operativsystem";
|
||||
$text['label-os']['uk'] = "Операційна система ";
|
||||
$text['label-os']['de-at'] = "Betriebssystem";
|
||||
|
||||
$text['label-git_info']['en-us'] = "Git Information";
|
||||
$text['label-git_info']['es-cl'] = "";
|
||||
$text['label-git_info']['pt-pt'] = "";
|
||||
$text['label-git_info']['fr-fr'] = "";
|
||||
$text['label-git_info']['pt-br'] = "";
|
||||
$text['label-git_info']['pl'] = "";
|
||||
$text['label-git_info']['sv-se'] = "";
|
||||
$text['label-git_info']['uk'] = "";
|
||||
$text['label-git_info']['de-at'] = "";
|
||||
|
||||
$text['label-git_branch']['en-us'] = "Branch:";
|
||||
$text['label-git_branch']['es-cl'] = "";
|
||||
$text['label-git_branch']['pt-pt'] = "";
|
||||
$text['label-git_branch']['fr-fr'] = "";
|
||||
$text['label-git_branch']['pt-br'] = "";
|
||||
$text['label-git_branch']['pl'] = "";
|
||||
$text['label-git_branch']['sv-se'] = "";
|
||||
$text['label-git_branch']['uk'] = "";
|
||||
$text['label-git_branch']['de-at'] = "";
|
||||
|
||||
$text['label-git_commit']['en-us'] = "Commit:";
|
||||
$text['label-git_commit']['es-cl'] = "";
|
||||
$text['label-git_commit']['pt-pt'] = "";
|
||||
$text['label-git_commit']['fr-fr'] = "";
|
||||
$text['label-git_commit']['pt-br'] = "";
|
||||
$text['label-git_commit']['pl'] = "";
|
||||
$text['label-git_commit']['sv-se'] = "";
|
||||
$text['label-git_commit']['uk'] = "";
|
||||
$text['label-git_commit']['de-at'] = "";
|
||||
|
||||
$text['label-git_origin']['en-us'] = "Origin:";
|
||||
$text['label-git_origin']['es-cl'] = "";
|
||||
$text['label-git_origin']['pt-pt'] = "";
|
||||
$text['label-git_origin']['fr-fr'] = "";
|
||||
$text['label-git_origin']['pt-br'] = "";
|
||||
$text['label-git_origin']['pl'] = "";
|
||||
$text['label-git_origin']['sv-se'] = "";
|
||||
$text['label-git_origin']['uk'] = "";
|
||||
$text['label-git_origin']['de-at'] = "";
|
||||
|
||||
$text['label-memcache_status']['en-us'] = "Memcache Status";
|
||||
$text['label-memcache_status']['es-cl'] = "Estado de Memcache";
|
||||
$text['label-memcache_status']['pt-pt'] = "Estado da Memcache";
|
||||
|
||||
@@ -85,6 +85,24 @@ $document['title'] = $text['title-sys-status'];
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
$git_path = normalize_path_to_os($_SERVER["DOCUMENT_ROOT"]."/.git");
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git_info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".$text['label-git_branch']." ".$git_branch."<br>\n";
|
||||
echo " ".$text['label-git_commit']." ".$git_commit."<br>\n";
|
||||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<!--\n";
|
||||
$tmp_result = shell_exec('uname -a');
|
||||
echo "-->\n";
|
||||
@@ -320,37 +338,37 @@ $document['title'] = $text['title-sys-status'];
|
||||
echo " <th class='th' colspan='2' align='left'>".$text['title-memcache']."</th>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
$mc_fail = false;
|
||||
$memcache_fail = false;
|
||||
$mod = new modules;
|
||||
if ($mod -> active("mod_memcache")) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "memcache status verbose";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
$mc_lines = preg_split('/\n/', $switch_result);
|
||||
foreach($mc_lines as $mc_line) {
|
||||
if (strlen(trim($mc_line)) > 0 && substr_count($mc_line, ': ') > 0) {
|
||||
$mc_temp = explode(': ', $mc_line);
|
||||
$mc_status[$mc_temp[0]] = $mc_temp[1];
|
||||
$memcache_lines = preg_split('/\n/', $switch_result);
|
||||
foreach($memcache_lines as $memcache_line) {
|
||||
if (strlen(trim($memcache_line)) > 0 && substr_count($memcache_line, ': ') > 0) {
|
||||
$memcache_temp = explode(': ', $memcache_line);
|
||||
$memcache_status[$memcache_temp[0]] = $memcache_temp[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($mc_status) && sizeof($mc_status) > 0) {
|
||||
foreach($mc_status as $mc_field => $mc_value) {
|
||||
if (is_array($memcache_status) && sizeof($memcache_status) > 0) {
|
||||
foreach($memcache_status as $memcache_field => $memcache_value) {
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class='vncell' style='text-align: left;'>".$mc_field."</td>\n";
|
||||
echo " <td class='row_style1'>".$mc_value."</td>\n";
|
||||
echo " <td width='20%' class='vncell' style='text-align: left;'>".$memcache_field."</td>\n";
|
||||
echo " <td class='row_style1'>".$memcache_value."</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
else { $mc_fail = true; }
|
||||
else { $memcache_fail = true; }
|
||||
}
|
||||
else { $mc_fail = true; }
|
||||
else { $memcache_fail = true; }
|
||||
|
||||
}
|
||||
else { $mc_fail = true; }
|
||||
else { $memcache_fail = true; }
|
||||
|
||||
if ($mc_fail) {
|
||||
if ($memcache_fail) {
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class='vncell' style='text-align: left;'>".$text['label-memcache_status']."</td>\n";
|
||||
echo " <td class='row_style1'>".$text['message-unavailable']."</td>\n";
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
$database->fields['domain_name'] = $domain_name;
|
||||
|
||||
//check whether a recording exists
|
||||
$recording_relative_path = '/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$recording_relative_path = '/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].$recording_relative_path.'/'.$uuid.'.wav')) {
|
||||
$recording_file = $recording_relative_path.'/'.$uuid.'.wav';
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ else {
|
||||
|
||||
//handle recordings
|
||||
if (permission_exists('recording_play') || permission_exists('recording_download')) {
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if(!empty($row['recording_file']) && file_exists($row['recording_file'])){
|
||||
$tmp_name=$row['recording_file'];
|
||||
|
||||
@@ -54,8 +54,8 @@ if (sizeof($_REQUEST) > 0) {
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
//delete recording, if any
|
||||
if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]))) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]));
|
||||
if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]))) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ else {
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$language."</td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$context."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
//echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')."\">\n";
|
||||
//echo " </a>";
|
||||
|
||||
@@ -208,7 +208,7 @@ else {
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')."\">\n";
|
||||
echo $caller_id_number.' ';
|
||||
echo " </a>";
|
||||
@@ -276,7 +276,7 @@ else {
|
||||
if ($key == "bridge_uuid" || $key == "signal_bond") {
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>\n";
|
||||
echo " <a href='xml_cdr_details.php?uuid=$value'>".$value."</a> \n";
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$value.'.wav')) {
|
||||
$tmp_name = $value.".wav";
|
||||
@@ -290,12 +290,12 @@ else {
|
||||
elseif (file_exists($tmp_dir.'/'.$value.'_1.mp3')) {
|
||||
$tmp_name = $value."_1.mp3";
|
||||
}
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
echo " <a href=\"javascript:void(0);\" onclick=\"window.open('../recordings/v_recording_play.php?a=download&type=moh&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no')\">\n";
|
||||
echo " play";
|
||||
echo " </a> ";
|
||||
}
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode("archive/".$tmp_year."/".$tmp_month."/".$tmp_day."/".$tmp_name)."\">\n";
|
||||
echo " download";
|
||||
echo " </a>";
|
||||
|
||||
@@ -176,7 +176,7 @@ if (strlen($id) > 0) {
|
||||
|
||||
//delete the recordings
|
||||
if (strlen($_SESSION['switch'][recordings]['dir']) > 0) {
|
||||
system('rm -rf '.$_SESSION['switch']['recordings']['dir'].'/'.$domain_name);
|
||||
system('rm -rf '.$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$domain_name);
|
||||
}
|
||||
|
||||
//delete voicemail
|
||||
|
||||
@@ -234,8 +234,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
|
||||
// rename switch/recordings/[domain] (folder)
|
||||
if ( isset($_SESSION['switch']['recordings']['dir']) ) {
|
||||
$switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']);
|
||||
if ( isset($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']) ) {
|
||||
$switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']);
|
||||
if ( file_exists($switch_recordings_dir."/".$original_domain_name) ) {
|
||||
@rename($switch_recordings_dir."/".$original_domain_name, $switch_recordings_dir."/".$domain_name); // folder
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "install";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "75507e6e-891e-11e5-af63-feff819cdc9f";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
//$y = 0;
|
||||
//$apps[$x]['permissions'][$y]['name'] = "install";
|
||||
//$apps[$x]['permissions'][$y]['menu']['uuid'] = "75507e6e-891e-11e5-af63-feff819cdc9f";
|
||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
//$y++;
|
||||
|
||||
?>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = "Install";
|
||||
$apps[$x]['menu'][0]['uuid'] = "75507e6e-891e-11e5-af63-feff819cdc9f";
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
$apps[$x]['menu'][0]['category'] = "internal";
|
||||
$apps[$x]['menu'][0]['path'] = "/core/install/index.php";
|
||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||
//$apps[$x]['menu'][0]['title']['en-us'] = "Install";
|
||||
//$apps[$x]['menu'][0]['uuid'] = "75507e6e-891e-11e5-af63-feff819cdc9f";
|
||||
//$apps[$x]['menu'][0]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
//$apps[$x]['menu'][0]['category'] = "internal";
|
||||
//$apps[$x]['menu'][0]['path'] = "/core/install/index.php";
|
||||
//$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
@@ -35,7 +35,7 @@ require_once "root.php";
|
||||
public function get_switch_dirs() { return $this->_switch_dirs; }
|
||||
public function get_switch_vdirs() { return $this->_switch_vdirs; }
|
||||
|
||||
// dirs - detected by from the switch
|
||||
// dirs - detected from the switch
|
||||
protected $_switch_base_dir = '';
|
||||
protected $_switch_cache_dir = '';
|
||||
protected $_switch_certs_dir = '';
|
||||
@@ -157,7 +157,7 @@ require_once "root.php";
|
||||
$this->_switch_event_host = $_SESSION['event_socket_ip_address'];
|
||||
$this->_switch_event_port = $_SESSION['event_socket_port'];
|
||||
$this->_switch_event_password = $_SESSION['event_socket_password'];
|
||||
|
||||
|
||||
// domain info
|
||||
$this->_domain_name = $_SESSION['domain_name'];
|
||||
$this->_domain_uuid = $_SESSION['domain_uuid'];
|
||||
|
||||
@@ -285,149 +285,160 @@ include "root.php";
|
||||
}
|
||||
|
||||
public function create_config_lua() {
|
||||
$this->write_progress("\tCreating " . $this->config_lua);
|
||||
$path = dirname($this->config_lua);
|
||||
$parent_dir = basename($path);
|
||||
if($parent_dir == 'resources' and !file_exists($path)){
|
||||
$this->write_progress("\t... creating missing '$path'");
|
||||
if (!mkdir($path, 0755, true)) {
|
||||
throw new Exception("Failed to create the missing resources directory '$path'");
|
||||
}
|
||||
}
|
||||
|
||||
global $db;
|
||||
//get the odbc information
|
||||
$sql = "select count(*) as num_rows from v_databases ";
|
||||
$sql .= "where database_driver = 'odbc' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
unset($prep_statement);
|
||||
if ($row['num_rows'] > 0) {
|
||||
$odbc_num_rows = $row['num_rows'];
|
||||
$sql = "select * from v_databases ";
|
||||
$sql .= "where database_driver = 'odbc' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$dsn_name = $row["database_name"];
|
||||
$dsn_username = $row["database_username"];
|
||||
$dsn_password = $row["database_password"];
|
||||
break; //limit to 1 row
|
||||
//define the database connection as global
|
||||
global $db;
|
||||
|
||||
//send progress
|
||||
$this->write_progress("\tCreating " . $this->config_lua);
|
||||
|
||||
//set the directories
|
||||
$path = dirname($this->config_lua);
|
||||
$parent_dir = basename($path);
|
||||
if ($parent_dir == 'resources' and !file_exists($path)){
|
||||
$this->write_progress("\t... creating missing '$path'");
|
||||
if (!mkdir($path, 0755, true)) {
|
||||
throw new Exception("Failed to create the missing resources directory '$path'");
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
|
||||
//get the odbc information
|
||||
$sql = "select count(*) as num_rows from v_databases ";
|
||||
$sql .= "where database_driver = 'odbc' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
unset($prep_statement);
|
||||
if ($row['num_rows'] > 0) {
|
||||
$odbc_num_rows = $row['num_rows'];
|
||||
$sql = "select * from v_databases ";
|
||||
$sql .= "where database_driver = 'odbc' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$dsn_name = $row["database_name"];
|
||||
$dsn_username = $row["database_username"];
|
||||
$dsn_password = $row["database_password"];
|
||||
break; //limit to 1 row
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
else {
|
||||
$odbc_num_rows = '0';
|
||||
}
|
||||
}
|
||||
|
||||
//config.lua
|
||||
$fout = fopen($this->config_lua,"w");
|
||||
if(!$fout){
|
||||
throw new Exception("Failed to open '".$this->config_lua."' for writing");
|
||||
}
|
||||
$tmp = "\n";
|
||||
$tmp .= "--set the variables\n";
|
||||
if (strlen($this->global_settings->switch_sounds_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" sounds_dir = [[".$this->global_settings->switch_sounds_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_phrases_vdir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" phrases_dir = [[".$this->global_settings->switch_phrases_vdir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_db_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" database_dir = [[".$this->global_settings->switch_db_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_recordings_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" recordings_dir = [[".$this->global_settings->switch_recordings_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_storage_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" storage_dir = [[".$this->global_settings->switch_storage_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_voicemail_vdir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" voicemail_dir = [[".$this->global_settings->switch_voicemail_vdir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_script_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" scripts_dir = [[".$this->global_settings->switch_script_dir()."]];\n");
|
||||
}
|
||||
$tmp .= normalize_path_to_os(" php_dir = [[".PHP_BINDIR."]];\n");
|
||||
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
|
||||
$tmp .= " php_bin = \"php.exe\";\n";
|
||||
}
|
||||
else {
|
||||
$odbc_num_rows = '0';
|
||||
$tmp .= " php_bin = \"php\";\n";
|
||||
}
|
||||
}
|
||||
$tmp .= normalize_path_to_os(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n");
|
||||
$tmp .= "\n";
|
||||
|
||||
//config.lua
|
||||
$fout = fopen($this->config_lua,"w");
|
||||
if(!$fout){
|
||||
throw new Exception("Failed to open '".$this->config_lua."' for writing");
|
||||
}
|
||||
$tmp = "\n";
|
||||
$tmp .= "--set the variables\n";
|
||||
if (strlen($this->global_settings->switch_sounds_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" sounds_dir = [[".$this->global_settings->switch_sounds_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_phrases_vdir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" phrases_dir = [[".$this->global_settings->switch_phrases_vdir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_db_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" database_dir = [[".$this->global_settings->switch_db_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_recordings_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" recordings_dir = [[".$this->global_settings->switch_recordings_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_storage_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" storage_dir = [[".$this->global_settings->switch_storage_dir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_voicemail_vdir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" voicemail_dir = [[".$this->global_settings->switch_voicemail_vdir()."]];\n");
|
||||
}
|
||||
if (strlen($this->global_settings->switch_script_dir()) > 0) {
|
||||
$tmp .= normalize_path_to_os(" scripts_dir = [[".$this->global_settings->switch_script_dir()."]];\n");
|
||||
}
|
||||
$tmp .= normalize_path_to_os(" php_dir = [[".PHP_BINDIR."]];\n");
|
||||
if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") {
|
||||
$tmp .= " php_bin = \"php.exe\";\n";
|
||||
}
|
||||
else {
|
||||
$tmp .= " php_bin = \"php\";\n";
|
||||
}
|
||||
$tmp .= normalize_path_to_os(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n");
|
||||
$tmp .= "\n";
|
||||
if ((strlen($this->global_settings->db_type()) > 0) || (strlen($dsn_name) > 0)) {
|
||||
$tmp .= "--database information\n";
|
||||
$tmp .= " database = {}\n";
|
||||
$tmp .= " database[\"type\"] = \"".$this->global_settings->db_type()."\";\n";
|
||||
$tmp .= " database[\"name\"] = \"".$this->global_settings->db_name()."\";\n";
|
||||
$tmp .= normalize_path_to_os(" database[\"path\"] = [[".$this->global_settings->db_path()."]];\n");
|
||||
|
||||
if ((strlen($this->global_settings->db_type()) > 0) || (strlen($dsn_name) > 0)) {
|
||||
$tmp .= "--database information\n";
|
||||
$tmp .= " database = {}\n";
|
||||
$tmp .= " database[\"type\"] = \"".$this->global_settings->db_type()."\";\n";
|
||||
$tmp .= " database[\"name\"] = \"".$this->global_settings->db_name()."\";\n";
|
||||
$tmp .= normalize_path_to_os(" database[\"path\"] = [[".$this->global_settings->db_path()."]];\n");
|
||||
|
||||
if (strlen($dsn_name) > 0) {
|
||||
$tmp .= " database[\"system\"] = \"odbc://".$dsn_name.":".$dsn_username.":".$dsn_password."\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"odbc://freeswitch:".$dsn_username.":".$dsn_password."\";\n";
|
||||
if (strlen($dsn_name) > 0) {
|
||||
$tmp .= " database[\"system\"] = \"odbc://".$dsn_name.":".$dsn_username.":".$dsn_password."\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"odbc://freeswitch:".$dsn_username.":".$dsn_password."\";\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "pgsql") {
|
||||
$db_host = $this->global_settings->db_host();
|
||||
if($db_host == 'localhost') { $db_host = '127.0.0.1'; } // lua cannot resolve localhost
|
||||
if (filter_var($db_host, FILTER_VALIDATE_IP)) {
|
||||
$host_type = "hostaddr";
|
||||
}
|
||||
else {
|
||||
$host_type = "host";
|
||||
}
|
||||
$tmp .= " database[\"system\"] = \"pgsql://".$host_type."=".$db_host." port=".$this->global_settings->db_port()." dbname=".$this->global_settings->db_name()." user=".$this->global_settings->db_username()." password=".$this->global_settings->db_password()." options='' application_name='".$this->global_settings->db_name()."'\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"pgsql://".$host_type."=".$db_host." port=".$this->global_settings->db_port()." dbname=freeswitch user=".$this->global_settings->db_username()." password=".$this->global_settings->db_password()." options='' application_name='freeswitch'\";\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "sqlite") {
|
||||
$tmp .= " database[\"system\"] = \"sqlite://".$this->global_settings->db_path()."/".$this->global_settings->db_name()."\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"sqlite://".$_SESSION['switch']['db']['dir']."\";\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "mysql") {
|
||||
$tmp .= " database[\"system\"] = \"\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"\";\n";
|
||||
}
|
||||
$tmp .= "\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "pgsql") {
|
||||
$lua_db_host = $this->global_settings->db_host();
|
||||
if($lua_db_host == 'localhost') { $lua_db_host = '127.0.0.1'; } // lua cannot resolve localhost
|
||||
$tmp .= " database[\"system\"] = \"pgsql://hostaddr=".$lua_db_host." port=".$this->global_settings->db_port()." dbname=".$this->global_settings->db_name()." user=".$this->global_settings->db_username()." password=".$this->global_settings->db_password()." options='' application_name='".$this->global_settings->db_name()."'\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"pgsql://hostaddr=".$lua_db_host." port=".$this->global_settings->db_port()." dbname=freeswitch user=".$this->global_settings->db_username()." password=".$this->global_settings->db_password()." options='' application_name='freeswitch'\";\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "sqlite") {
|
||||
$tmp .= " database[\"system\"] = \"sqlite://".$this->global_settings->db_path()."/".$this->global_settings->db_name()."\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"sqlite://".$_SESSION['switch']['db']['dir']."\";\n";
|
||||
}
|
||||
elseif ($this->global_settings->db_type() == "mysql") {
|
||||
$tmp .= " database[\"system\"] = \"\";\n";
|
||||
$tmp .= " database[\"switch\"] = \"\";\n";
|
||||
$tmp .= "--set defaults\n";
|
||||
$tmp .= " expire = {}\n";
|
||||
$tmp .= " expire[\"directory\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"dialplan\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"languages\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"sofia.conf\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"acl.conf\"] = \"3600\";\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set xml_handler\n";
|
||||
$tmp .= " xml_handler = {}\n";
|
||||
$tmp .= " xml_handler[\"fs_path\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set the debug options\n";
|
||||
$tmp .= " debug[\"params\"] = false;\n";
|
||||
$tmp .= " debug[\"sql\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_request\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_string\"] = false;\n";
|
||||
$tmp .= " debug[\"cache\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--additional info\n";
|
||||
$tmp .= " domain_count = ".$this->global_settings->domain_count().";\n";
|
||||
$tmp .= normalize_path_to_os(" temp_dir = [[".$this->global_settings->switch_temp_dir()."]];\n");
|
||||
if (isset($_SESSION['domain']['dial_string']['text'])) {
|
||||
$tmp .= " dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
|
||||
}
|
||||
$tmp .= "\n";
|
||||
}
|
||||
$tmp .= "--set defaults\n";
|
||||
$tmp .= " expire = {}\n";
|
||||
$tmp .= " expire[\"directory\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"dialplan\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"languages\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"sofia.conf\"] = \"3600\";\n";
|
||||
$tmp .= " expire[\"acl.conf\"] = \"3600\";\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set xml_handler\n";
|
||||
$tmp .= " xml_handler = {}\n";
|
||||
$tmp .= " xml_handler[\"fs_path\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--set the debug options\n";
|
||||
$tmp .= " debug[\"params\"] = false;\n";
|
||||
$tmp .= " debug[\"sql\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_request\"] = false;\n";
|
||||
$tmp .= " debug[\"xml_string\"] = false;\n";
|
||||
$tmp .= " debug[\"cache\"] = false;\n";
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--additional info\n";
|
||||
$tmp .= " domain_count = ".$this->global_settings->domain_count().";\n";
|
||||
$tmp .= normalize_path_to_os(" temp_dir = [[".$this->global_settings->switch_temp_dir()."]];\n");
|
||||
if (isset($_SESSION['domain']['dial_string']['text'])) {
|
||||
$tmp .= " dial_string = \"".$_SESSION['domain']['dial_string']['text']."\";\n";
|
||||
}
|
||||
$tmp .= "\n";
|
||||
$tmp .= "--include local.lua\n";
|
||||
$tmp .= " require(\"resources.functions.file_exists\");\n";
|
||||
$tmp .= " if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
|
||||
$tmp .= " dofile(\"/etc/fusionpbx/local.lua\");\n";
|
||||
$tmp .= " elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
|
||||
$tmp .= " dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
|
||||
$tmp .= " elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
|
||||
$tmp .= " require(\"resources.local\");\n";
|
||||
$tmp .= " end\n";
|
||||
fwrite($fout, $tmp);
|
||||
unset($tmp);
|
||||
fclose($fout);
|
||||
$tmp .= "--include local.lua\n";
|
||||
$tmp .= " require(\"resources.functions.file_exists\");\n";
|
||||
$tmp .= " if (file_exists(\"/etc/fusionpbx/local.lua\")) then\n";
|
||||
$tmp .= " dofile(\"/etc/fusionpbx/local.lua\");\n";
|
||||
$tmp .= " elseif (file_exists(\"/usr/local/etc/fusionpbx/local.lua\")) then\n";
|
||||
$tmp .= " dofile(\"/usr/local/etc/fusionpbx/local.lua\");\n";
|
||||
$tmp .= " elseif (file_exists(scripts_dir..\"/resources/local.lua\")) then\n";
|
||||
$tmp .= " require(\"resources.local\");\n";
|
||||
$tmp .= " end\n";
|
||||
fwrite($fout, $tmp);
|
||||
unset($tmp);
|
||||
fclose($fout);
|
||||
}
|
||||
|
||||
protected function restart_switch() {
|
||||
|
||||
@@ -186,30 +186,6 @@
|
||||
//set the context
|
||||
$_SESSION["context"] = $_SESSION["domain_name"];
|
||||
|
||||
//recordings add the domain to the path if there is more than one domains
|
||||
if (count($_SESSION["domains"]) > 1) {
|
||||
if (strlen($_SESSION['switch']['recordings']['dir']) > 0) {
|
||||
if (substr($_SESSION['switch']['recordings']['dir'], -strlen($_SESSION["domain_name"])) != $_SESSION["domain_name"]) {
|
||||
//get the default recordings directory
|
||||
$sql = "select * from v_default_settings ";
|
||||
$sql .= "where default_setting_enabled = 'true' ";
|
||||
$sql .= "and default_setting_category = 'switch' ";
|
||||
$sql .= "and default_setting_subcategory = 'recordings' ";
|
||||
$sql .= "and default_setting_name = 'dir' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
$prep_statement->execute();
|
||||
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result_default_settings as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
$switch_recordings_dir = $row['default_setting_value'];
|
||||
}
|
||||
//add the domain
|
||||
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir . '/' . $_SESSION["domain_name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upgrade() {
|
||||
@@ -272,16 +248,6 @@
|
||||
$prep_statement->execute();
|
||||
$result_default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
//get the default recordings directory
|
||||
foreach($result_default_settings as $row) {
|
||||
$name = $row['default_setting_name'];
|
||||
$category = $row['default_setting_category'];
|
||||
$subcategory = $row['default_setting_subcategory'];
|
||||
if ($category == 'switch' && $subcategory == 'recordings' && $name == 'dir') {
|
||||
$switch_recordings_dir = $row['default_setting_value'];
|
||||
}
|
||||
}
|
||||
|
||||
//loop through all domains
|
||||
$sql = "select * from v_domains ";
|
||||
$v_prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -349,11 +315,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
//set the recordings directory
|
||||
if (strlen($switch_recordings_dir) > 1 && count($_SESSION["domains"]) > 1) {
|
||||
$_SESSION['switch']['recordings']['dir'] = $switch_recordings_dir."/".$domain_name;
|
||||
}
|
||||
|
||||
//get the list of installed apps from the core and mod directories and execute the php code in app_defaults.php
|
||||
$default_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_defaults.php");
|
||||
foreach ($default_list as &$default_path) {
|
||||
|
||||
@@ -148,6 +148,10 @@
|
||||
default_language = session:getVariable("default_language");
|
||||
default_dialect = session:getVariable("default_dialect");
|
||||
--recording = session:getVariable("recording");
|
||||
domain_name = session:getVariable("domain_name");
|
||||
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
|
||||
--set the end epoch
|
||||
end_epoch = os.time();
|
||||
@@ -339,6 +343,9 @@
|
||||
--freeswitch.consoleLog("notice", "[conference center] destination_number: " .. destination_number .. "\n");
|
||||
--freeswitch.consoleLog("notice", "[conference center] caller_id_number: " .. caller_id_number .. "\n");
|
||||
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
|
||||
--set the sounds path for the language, dialect and voice
|
||||
default_language = session:getVariable("default_language");
|
||||
default_dialect = session:getVariable("default_dialect");
|
||||
@@ -411,10 +418,6 @@
|
||||
|
||||
--add the domain to the recording directory
|
||||
freeswitch.consoleLog("notice", "[conference center] domain_count: " .. domain_count .. "\n");
|
||||
if (domain_count > 1) then
|
||||
recordings_dir = recordings_dir.."/"..domain_name;
|
||||
freeswitch.consoleLog("notice", "[conference center] recordings_dir: " .. recordings_dir .. "\n");
|
||||
end
|
||||
|
||||
--sounds
|
||||
enter_sound = "tone_stream://v=-20;%(100,1000,100);v=-20;%(90,60,440);%(90,60,620)";
|
||||
|
||||
@@ -36,10 +36,8 @@
|
||||
--get the current time
|
||||
start_epoch = os.time();
|
||||
|
||||
--set the recording variable
|
||||
if (domain_count > 1) then
|
||||
recordings_dir = recordings_dir.."/"..domain_name;
|
||||
end
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
recordings_dir = recordings_dir.."/archive/"..os.date("%Y", start_epoch).."/"..os.date("%b", start_epoch).."/"..os.date("%d", start_epoch);
|
||||
mkdir(recordings_dir);
|
||||
recording = recordings_dir.."/"..conference_session_uuid;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
destination_number = session:getVariable("destination_number");
|
||||
call_direction = session:getVariable("call_direction");
|
||||
domain_name = session:getVariable("domain_name");
|
||||
recordings_dir = session:getVariable("recordings_dir");
|
||||
|
||||
--determine the call direction
|
||||
if (call_direction == nil) then
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
-- Mark J Crane <markjcrane@fusionpbx.com>
|
||||
|
||||
sounds_dir = "";
|
||||
recordings_dir = "";
|
||||
pin_number = "";
|
||||
max_tries = "3";
|
||||
digit_timeout = "3000";
|
||||
|
||||
@@ -76,10 +76,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
--set the recordings directory
|
||||
if (domain_count > 1) then
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
end
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
|
||||
--set default variable(s)
|
||||
tries = 0;
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
recording_slots = session:getVariable("recording_slots");
|
||||
recording_prefix = session:getVariable("recording_prefix");
|
||||
recording_name = session:getVariable("recording_name");
|
||||
domain_name = session:getVariable("domain_name");
|
||||
|
||||
--select the recording number
|
||||
if (recording_slots) then
|
||||
@@ -256,20 +257,9 @@ if ( session:ready() ) then
|
||||
domain_name = session:getVariable("domain_name");
|
||||
domain_uuid = session:getVariable("domain_uuid");
|
||||
|
||||
--set the base recordings dir
|
||||
base_recordings_dir = recordings_dir;
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
|
||||
--use the recording_dir when the variable is set
|
||||
if (session:getVariable("recordings_dir")) then
|
||||
if (base_recordings_dir ~= session:getVariable("recordings_dir")) then
|
||||
recordings_dir = session:getVariable("recordings_dir");
|
||||
end
|
||||
end
|
||||
|
||||
--get the recordings from the config.lua and append the domain_name if the system is multi-tenant
|
||||
if (domain_count > 1) then
|
||||
recordings_dir = recordings_dir .. "/" .. domain_name;
|
||||
end
|
||||
--set the sounds path for the language, dialect and voice
|
||||
default_language = session:getVariable("default_language");
|
||||
default_dialect = session:getVariable("default_dialect");
|
||||
|
||||
@@ -5,49 +5,51 @@
|
||||
<!-- To schedule a wakeup call enter a 4 digit number -->
|
||||
<!-- For 6:30 am press 0630. Enter the digits now. -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/schedule.wav"/>
|
||||
<action function="play-file" data="custom/a.wav"/>
|
||||
<action function="play-file" data="custom/wakeup.wav"/>
|
||||
<action function="play-file" data="custom/call.wav"/>
|
||||
<action function="play-file" data="custom/enter.wav"/>
|
||||
<action function="play-file" data="custom/a.wav"/>
|
||||
<action function="play-file" data="custom/4.wav"/>
|
||||
<action function="play-file" data="custom/digit.wav"/>
|
||||
<action function="play-file" data="custom/number.wav"/>
|
||||
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/for.wav"/>
|
||||
<action function="play-file" data="digits/6.wav"/>
|
||||
<action function="play-file" data="digits/30.wav"/>
|
||||
<action function="play-file" data="custom/a.wav"/>
|
||||
<action function="play-file" data="custom/m.wav"/>
|
||||
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-request_wakeup_call.wav"/>
|
||||
<!--
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/0.wav"/>
|
||||
<action function="play-file" data="digits/6.wav"/>
|
||||
<action function="play-file" data="digits/3.wav"/>
|
||||
<action function="play-file" data="digits/0.wav"/>
|
||||
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/enter.wav"/>
|
||||
<action function="play-file" data="custom/the.wav"/>
|
||||
<action function="play-file" data="custom/digits.wav"/>
|
||||
<action function="play-file" data="custom/now.wav"/>
|
||||
<action function="play-file" data="ivr-for.wav"/>
|
||||
<action function="play-file" data="digits/6.wav"/>
|
||||
<action function="play-file" data="digits/30.wav"/>
|
||||
<action function="play-file" data="time/a-m.wav"/>
|
||||
-->
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-get-extension">
|
||||
<macro name="wakeup-hours">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- Tnter the extension number now -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/enter.wav"/>
|
||||
<action function="play-file" data="custom/the.wav"/>
|
||||
<action function="play-file" data="custom/extension.wav"/>
|
||||
<action function="play-file" data="custom/number.wav"/>
|
||||
<action function="play-file" data="custom/now.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-please_enter_the.wav"/>
|
||||
<action function="play-file" data="time/hours.wav"/>
|
||||
<action function="play-file" data="misc/followed.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-minutes">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="ivr/ivr-please_enter_the.wav"/>
|
||||
<action function="play-file" data="time/minutes.wav"/>
|
||||
<action function="play-file" data="misc/followed.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-destination">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- Enter the number followed by pound -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="ivr/ivr-please_enter_the.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-number.wav"/>
|
||||
<action function="play-file" data="misc/followed.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
@@ -57,13 +59,7 @@
|
||||
<match>
|
||||
<!-- Your wakeup call has been scheduled for 0715 -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/your.wav"/>
|
||||
<action function="play-file" data="custom/wakeup.wav"/>
|
||||
<action function="play-file" data="custom/call.wav"/>
|
||||
<action function="play-file" data="custom/has.wav"/>
|
||||
<action function="play-file" data="custom/been.wav"/>
|
||||
<action function="play-file" data="custom/scheduled.wav"/>
|
||||
<action function="play-file" data="custom/for.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-requested_wakeup_call_for.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
@@ -73,13 +69,10 @@
|
||||
<match>
|
||||
<!-- To accept press 1 to cancel press 2 -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/accept.wav"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-to_accept_press"/>
|
||||
<action function="play-file" data="digits/1.wav"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/cancel.wav"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-to_reject.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/2.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
@@ -90,13 +83,20 @@
|
||||
<match>
|
||||
<!-- To cancel the wakeup call press * -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/cancel.wav"/>
|
||||
<action function="play-file" data="custom/the.wav"/>
|
||||
<action function="play-file" data="custom/wakeup.wav"/>
|
||||
<action function="play-file" data="custom/call.wav"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="play-file" data="digits/*.wav"/>
|
||||
<action function="play-file" data="ivr/ivr-cancel_wakeup_call.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/2.wav"/>
|
||||
<action function="play-file" data="misc/followed.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-cancelled">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- To cancel the wakeup call press * -->
|
||||
<action function="execute" data="sleep(750)"/>
|
||||
<action function="play-file" data="ivr/ivr-wakeup_call_cancelled.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
@@ -104,26 +104,45 @@
|
||||
<macro name="wakeup-call">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- This is your wakeup call to exit press 1 to snooze for 10 minutes press 2 -->
|
||||
<!-- Say the current date and time -->
|
||||
<action function="execute" data="sleep(1000)"/>
|
||||
<action function="play-file" data="custom/this.wav"/>
|
||||
<action function="play-file" data="custom/is.wav"/>
|
||||
<action function="play-file" data="custom/your.wav"/>
|
||||
<action function="play-file" data="custom/wakeup.wav"/>
|
||||
<action function="play-file" data="custom/call.wav"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/exit.wav"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="say" data="current_date_time"/>
|
||||
<action function="play-file" data="voicemail/vm-to_exit.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/*.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-call-exit" enabled="false">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- This is your wakeup call to exit press 1 for 9 minutes press 2 -->
|
||||
<action function="execute" data="sleep(1000)"/>
|
||||
<action function="play-file" data="ivr/ivr-this_is_your_wakeup_call.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-to_exit.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/*.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
<macro name="wakeup-call-snooze" enabled="false">
|
||||
<input pattern="(.*)">
|
||||
<match>
|
||||
<!-- This is your wakeup call to exit press 1 for 10 minutes press 2 -->
|
||||
<action function="execute" data="sleep(1000)"/>
|
||||
<action function="play-file" data="ivr/ivr-this_is_your_wakeup_call.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-to_exit.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/1.wav"/>
|
||||
<action function="play-file" data="custom/to.wav"/>
|
||||
<action function="play-file" data="custom/snooze.wav"/>
|
||||
<action function="play-file" data="custom/for.wav"/>
|
||||
<action function="play-file" data="ivr-for.wav"/>
|
||||
<action function="play-file" data="digits/10.wav"/>
|
||||
<action function="play-file" data="custom/minutes.wav"/>
|
||||
<action function="play-file" data="custom/press.wav"/>
|
||||
<action function="play-file" data="time/minutes.wav"/>
|
||||
<action function="play-file" data="voicemail/vm-press.wav"/>
|
||||
<action function="play-file" data="digits/2.wav"/>
|
||||
<action function="execute" data="sleep(100)"/>
|
||||
</match>
|
||||
</input>
|
||||
</macro>
|
||||
</include>
|
||||
</include>
|
||||
@@ -924,8 +924,8 @@ account.2.xsi.port =
|
||||
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
|
||||
#local_time.time_zone = +8
|
||||
#local_time.time_zone_name = China(Beijing)
|
||||
local_time.time_zone = ${time_zone}
|
||||
local_time.time_zone_name = ${time_zone_name}
|
||||
local_time.time_zone = {$time_zone}
|
||||
local_time.time_zone_name = {$time_zone_name}
|
||||
|
||||
|
||||
#######################################################################################
|
||||
|
||||
Reference in New Issue
Block a user