Phrases: Include full path for recordings (not sounds), when not using base64.

This commit is contained in:
Nate Jones
2015-04-28 19:06:27 +00:00
parent 75f8cb0a9e
commit 04c9e31f63
3 changed files with 9 additions and 3 deletions

View File

@@ -109,6 +109,9 @@ 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);
}
//update function and data to be base64 compatible
$phrase_detail_data = "lua(streamfile.lua ".$phrase_detail_data.")";
$sql = "update v_phrase_details set ";
@@ -137,6 +140,9 @@ if ($domains_processed == 1) {
//update function and data to use standard method
$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;
}
$sql = "update v_phrase_details set ";
$sql .= "phrase_detail_function = 'play-file', ";
$sql .= "phrase_detail_data = '".$phrase_detail_data."' ";

View 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"]."\", \"".$row["recording_filename"]."\"));\n";
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"".$_SESSION['switch']['recordings']['dir'].'/'.$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 = $field['phrase_detail_data'];
$phrase_detail_data = str_replace($_SESSION['switch']['recordings']['dir'].'/', '', $field['phrase_detail_data']);
}
echo "<tr>\n";
echo " <td class='vtable'>".$phrase_detail_function."&nbsp;</td>\n";

View File

@@ -134,7 +134,7 @@
session:answer();
slept = session:getVariable("slept");
if (slept == nil or slept == "false") then
freeswitch.consoleLog("notice", "[ivr_menu] sleeping....\n");
freeswitch.consoleLog("notice", "[ivr_menu] sleeping (1s)\n");
session:sleep(1000);
if (slept == "false") then
session:setVariable("slept", "true");