mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix a null error and translation for select option voicemail.
This commit is contained in:
@@ -44,7 +44,7 @@ else {
|
||||
|
||||
//define the call_block_get_extensions function
|
||||
function call_block_get_extensions($select_extension) {
|
||||
global $db;
|
||||
global $db, $text;
|
||||
|
||||
//list voicemail
|
||||
$sql = "select extension, user_context, description from v_extensions ";
|
||||
@@ -55,12 +55,12 @@ else {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
echo "<optgroup label='Voicemail'>\n";
|
||||
echo "<optgroup label='".$text['label-voicemail']."'>\n";
|
||||
foreach ($result as &$row) {
|
||||
$extension = $row["extension"];
|
||||
$context = $row["user_context"];
|
||||
$description = $row["description"];
|
||||
if ($extension == $select_extension) $selected = "SELECTED";
|
||||
if ($extension == $select_extension) $selected = "selected='selected'";
|
||||
echo " <option value='Voicemail $context $extension' $selected>".$extension." ".$description."</option>\n";
|
||||
$selected = "";
|
||||
}
|
||||
@@ -77,7 +77,7 @@ else {
|
||||
}
|
||||
|
||||
//get http post variables and set them to php variables
|
||||
if (count($_POST)>0) {
|
||||
if (count($_POST) > 0) {
|
||||
$call_block_name = check_str($_POST["call_block_name"]);
|
||||
$call_block_number = check_str($_POST["call_block_number"]);
|
||||
$call_block_action = check_str($_POST["call_block_action"]);
|
||||
|
||||
@@ -177,15 +177,12 @@ This method causes the script to get its manadatory arguments directly from the
|
||||
logger("W", "NOTICE", "number " .. params["cid_num"] .. " blocked with " .. found_count .. " previous hits, domain_name: " .. params["domain_name"])
|
||||
if (found_action == "Reject") then
|
||||
session:hangup("CALL_REJECTED")
|
||||
end
|
||||
if (found_action == "Busy") then
|
||||
elseif (found_action == "Busy") then
|
||||
session:hangup("USER_BUSY")
|
||||
end
|
||||
if (details[0] =="Hold") then
|
||||
elseif (found_action =="Hold") then
|
||||
session:setAutoHangup(false)
|
||||
session:execute("transfer", "*9664 XML " .. details[1])
|
||||
end
|
||||
if (details[0] =="Voicemail") then
|
||||
session:execute("transfer", "*9664")
|
||||
elseif (details[0] =="Voicemail") then
|
||||
session:setAutoHangup(false)
|
||||
session:execute("transfer", "*99" .. details[2] .. " XML " .. details[1])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user