Fix a bug that made the the IVR Menu not play the long greeting when the short greeting was not provided.

This commit is contained in:
Mark Crane 2013-06-21 16:09:31 +00:00
parent 66da97d3b4
commit 570f55c9ec
2 changed files with 13 additions and 5 deletions

View File

@ -122,6 +122,10 @@ if (count($_POST)>0) {
$ivr_menu_enabled = check_str($_POST["ivr_menu_enabled"]);
$ivr_menu_description = check_str($_POST["ivr_menu_description"]);
if (isset($ivr_menu_greet_long) && !isset($ivr_menu_greet_short)) {
// $ivr_menu_greet_short = $ivr_menu_greet_long;
}
$ivr_menu_exit_action = check_str($_POST["ivr_menu_exit_action"]);
//$ivr_menu_exit_action = "transfer:1001 XML default";
$timeout_action_array = explode(":", $ivr_menu_exit_action);
@ -481,7 +485,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td class='vtable' align='left'>\n";
echo "\n";
echo " <select name='ivr_menu_greet_short' class='formfld' onchange='changeToInput(this);'\">\n";
echo " <select name='ivr_menu_greet_short' class='formfld' onchange='changeToInput(this);'>\n";
echo " <option></option>\n";
//misc
if (if_group("superadmin")) {
@ -535,7 +539,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</optgroup>\n";
//select
if (if_group("superadmin")) {
if (!$tmp_selected) {
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";

View File

@ -130,10 +130,14 @@
ivr_menu_greet_long = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_greet_long;
end
end
if (not file_exists(ivr_menu_greet_short)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_greet_short)) then
ivr_menu_greet_short = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_greet_short;
if (string.len(ivr_menu_greet_short) > 1) then
if (not file_exists(ivr_menu_greet_short)) then
if (file_exists(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_greet_short)) then
ivr_menu_greet_short = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_greet_short;
end
end
else
ivr_menu_greet_short = ivr_menu_greet_long;
end
ivr_menu_invalid_entry = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-that_was_an_invalid_entry.wav";