Voicemail - Edit: Add option to Keep Local After Forward (or not).
This commit is contained in:
parent
1ef5f1dab0
commit
81af0fefd1
|
|
@ -288,16 +288,20 @@
|
||||||
voicemail_mail_to = row["voicemail_mail_to"];
|
voicemail_mail_to = row["voicemail_mail_to"];
|
||||||
voicemail_attach_file = row["voicemail_attach_file"];
|
voicemail_attach_file = row["voicemail_attach_file"];
|
||||||
voicemail_local_after_email = row["voicemail_local_after_email"];
|
voicemail_local_after_email = row["voicemail_local_after_email"];
|
||||||
|
voicemail_local_after_forward = row["voicemail_local_after_forward"];
|
||||||
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
|
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
|
||||||
voicemail_tutorial = row["voicemail_tutorial"];
|
voicemail_tutorial = row["voicemail_tutorial"];
|
||||||
end);
|
end);
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
|
if (voicemail_attach_file == nil) then
|
||||||
|
voicemail_attach_file = "true";
|
||||||
|
end
|
||||||
if (voicemail_local_after_email == nil) then
|
if (voicemail_local_after_email == nil) then
|
||||||
voicemail_local_after_email = "true";
|
voicemail_local_after_email = "true";
|
||||||
end
|
end
|
||||||
if (voicemail_attach_file == nil) then
|
if (voicemail_local_after_forward == nil) then
|
||||||
voicemail_attach_file = "true";
|
voicemail_local_after_forward = "true";
|
||||||
end
|
end
|
||||||
|
|
||||||
--valid voicemail
|
--valid voicemail
|
||||||
|
|
@ -392,15 +396,19 @@
|
||||||
end
|
end
|
||||||
dbh:query(sql, params, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
voicemail_local_after_email = row["voicemail_local_after_email"];
|
voicemail_local_after_email = row["voicemail_local_after_email"];
|
||||||
|
voicemail_local_after_forward = row["voicemail_local_after_forward"];
|
||||||
end);
|
end);
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
if (voicemail_local_after_email == nil) then
|
if (voicemail_local_after_email == nil) then
|
||||||
voicemail_local_after_email = "true";
|
voicemail_local_after_email = "true";
|
||||||
end
|
end
|
||||||
|
if (voicemail_local_after_forward == nil) then
|
||||||
|
voicemail_local_after_forward = "true";
|
||||||
|
end
|
||||||
|
|
||||||
--get the message count and send the mwi event
|
--get the message count and send the mwi event
|
||||||
if (voicemail_local_after_email == 'true') then
|
if (voicemail_local_after_email == 'true' or voicemail_local_after_forward == 'true') then
|
||||||
message_waiting(voicemail_id, domain_uuid);
|
message_waiting(voicemail_id, domain_uuid);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -672,6 +680,37 @@
|
||||||
end
|
end
|
||||||
end --for
|
end --for
|
||||||
|
|
||||||
|
--whether to keep the voicemail message and details local after forward
|
||||||
|
if (voicemail_local_after_email == "false" and voicemail_local_after_forward == "false") then
|
||||||
|
--delete the voicemail message details
|
||||||
|
local sql = [[DELETE FROM v_voicemail_messages
|
||||||
|
WHERE domain_uuid = :domain_uuid
|
||||||
|
AND voicemail_uuid = :voicemail_uuid
|
||||||
|
AND voicemail_message_uuid = :uuid]]
|
||||||
|
local params = {
|
||||||
|
domain_uuid = domain_uuid,
|
||||||
|
voicemail_uuid = voicemail_uuid,
|
||||||
|
uuid = uuid
|
||||||
|
};
|
||||||
|
if (debug["sql"]) then
|
||||||
|
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||||
|
end
|
||||||
|
dbh:query(sql, params);
|
||||||
|
--delete voicemail recording file
|
||||||
|
if (file_exists(full_path)) then
|
||||||
|
os.remove(full_path);
|
||||||
|
end
|
||||||
|
--set message waiting indicator
|
||||||
|
message_waiting(voicemail_id, domain_uuid);
|
||||||
|
--clear the variable
|
||||||
|
db_voicemail_uuid = '';
|
||||||
|
elseif (storage_type == "base64") then
|
||||||
|
--delete voicemail recording file
|
||||||
|
if (file_exists(full_path)) then
|
||||||
|
os.remove(full_path);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
--voicemail not enabled or does not exist
|
--voicemail not enabled or does not exist
|
||||||
if (session ~= nil and session:ready()) then
|
if (session ~= nil and session:ready()) then
|
||||||
|
|
|
||||||
|
|
@ -52,15 +52,19 @@
|
||||||
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
|
voicemail_transcription_enabled = row["voicemail_transcription_enabled"];
|
||||||
voicemail_file = row["voicemail_file"];
|
voicemail_file = row["voicemail_file"];
|
||||||
voicemail_local_after_email = row["voicemail_local_after_email"];
|
voicemail_local_after_email = row["voicemail_local_after_email"];
|
||||||
|
voicemail_local_after_forward = row["voicemail_local_after_forward"];
|
||||||
voicemail_description = row["voicemail_description"];
|
voicemail_description = row["voicemail_description"];
|
||||||
end);
|
end);
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
|
if (voicemail_file == nil) then
|
||||||
|
voicemail_file = "listen";
|
||||||
|
end
|
||||||
if (voicemail_local_after_email == nil) then
|
if (voicemail_local_after_email == nil) then
|
||||||
voicemail_local_after_email = "true";
|
voicemail_local_after_email = "true";
|
||||||
end
|
end
|
||||||
if (voicemail_file == nil) then
|
if (voicemail_local_after_forward == nil) then
|
||||||
voicemail_file = "listen";
|
voicemail_local_after_forward = "true";
|
||||||
end
|
end
|
||||||
|
|
||||||
--require the email address to send the email
|
--require the email address to send the email
|
||||||
|
|
@ -194,13 +198,20 @@
|
||||||
--get the link_address
|
--get the link_address
|
||||||
link_address = http_protocol.."://"..domain_name..project_path;
|
link_address = http_protocol.."://"..domain_name..project_path;
|
||||||
|
|
||||||
|
--set proper delete status
|
||||||
|
if (voicemail_local_after_email == "false" and voicemail_local_after_forward == "false") then
|
||||||
|
local local_after_email = "false";
|
||||||
|
else
|
||||||
|
local local_after_email = "true";
|
||||||
|
end
|
||||||
|
|
||||||
--prepare the headers
|
--prepare the headers
|
||||||
local headers = {
|
local headers = {
|
||||||
["X-FusionPBX-Domain-UUID"] = domain_uuid;
|
["X-FusionPBX-Domain-UUID"] = domain_uuid;
|
||||||
["X-FusionPBX-Domain-Name"] = domain_name;
|
["X-FusionPBX-Domain-Name"] = domain_name;
|
||||||
["X-FusionPBX-Call-UUID"] = uuid;
|
["X-FusionPBX-Call-UUID"] = uuid;
|
||||||
["X-FusionPBX-Email-Type"] = 'voicemail';
|
["X-FusionPBX-Email-Type"] = 'voicemail';
|
||||||
["X-FusionPBX-local_after_email"] = voicemail_local_after_email;
|
["X-FusionPBX-local_after_email"] = local_after_email;
|
||||||
}
|
}
|
||||||
|
|
||||||
--prepare the voicemail_name_formatted
|
--prepare the voicemail_name_formatted
|
||||||
|
|
@ -307,7 +318,7 @@
|
||||||
|
|
||||||
--whether to keep the voicemail message and details local after email
|
--whether to keep the voicemail message and details local after email
|
||||||
if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
|
if (string.len(voicemail_mail_to) > 2 and email_queue_enabled == 'false') then
|
||||||
if (voicemail_local_after_email == "false") then
|
if (voicemail_local_after_email == "false" and voicemail_local_after_forward == "false") then
|
||||||
--delete the voicemail message details
|
--delete the voicemail message details
|
||||||
local sql = [[DELETE FROM v_voicemail_messages
|
local sql = [[DELETE FROM v_voicemail_messages
|
||||||
WHERE domain_uuid = :domain_uuid
|
WHERE domain_uuid = :domain_uuid
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,10 @@
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "agent";
|
$apps[$x]['permissions'][$y]['groups'][] = "agent";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = "voicemail_local_after_forward";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "voicemail_recording_instructions";
|
$apps[$x]['permissions'][$y]['name'] = "voicemail_recording_instructions";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
|
@ -445,6 +449,11 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to keep the voicemail file after sending the email.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to keep the voicemail file after sending the email.";
|
||||||
$z++;
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_local_after_forward";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose to keep the voicemail file after sending to forward destinations.";
|
||||||
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_enabled";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_enabled";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select to enable or disable this voicemail.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Select to enable or disable this voicemail.";
|
||||||
|
|
@ -704,4 +713,4 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -572,8 +572,8 @@ $text['label-voicemail_mail_to']['zh-cn'] = "邮寄至";
|
||||||
$text['label-voicemail_mail_to']['ja-jp'] = "メールアドレス";
|
$text['label-voicemail_mail_to']['ja-jp'] = "メールアドレス";
|
||||||
$text['label-voicemail_mail_to']['ko-kr'] = "메일 수신";
|
$text['label-voicemail_mail_to']['ko-kr'] = "메일 수신";
|
||||||
|
|
||||||
$text['label-voicemail_local_after_email']['en-us'] = "Keep Local";
|
$text['label-voicemail_local_after_email']['en-us'] = "Keep Local After Email";
|
||||||
$text['label-voicemail_local_after_email']['en-gb'] = "Keep Local";
|
$text['label-voicemail_local_after_email']['en-gb'] = "Keep Local After Email";
|
||||||
$text['label-voicemail_local_after_email']['ar-eg'] = "حافظ على المحلية";
|
$text['label-voicemail_local_after_email']['ar-eg'] = "حافظ على المحلية";
|
||||||
$text['label-voicemail_local_after_email']['de-at'] = "Mailbox Nachricht auf dem Server behalten";
|
$text['label-voicemail_local_after_email']['de-at'] = "Mailbox Nachricht auf dem Server behalten";
|
||||||
$text['label-voicemail_local_after_email']['de-ch'] = "Mailbox Nachricht auf dem Server behalten";
|
$text['label-voicemail_local_after_email']['de-ch'] = "Mailbox Nachricht auf dem Server behalten";
|
||||||
|
|
@ -598,6 +598,32 @@ $text['label-voicemail_local_after_email']['zh-cn'] = "保持本地";
|
||||||
$text['label-voicemail_local_after_email']['ja-jp'] = "ローカルに保つ";
|
$text['label-voicemail_local_after_email']['ja-jp'] = "ローカルに保つ";
|
||||||
$text['label-voicemail_local_after_email']['ko-kr'] = "로컬 유지";
|
$text['label-voicemail_local_after_email']['ko-kr'] = "로컬 유지";
|
||||||
|
|
||||||
|
$text['label-voicemail_local_after_forward']['en-us'] = "Keep Local After Forward";
|
||||||
|
$text['label-voicemail_local_after_forward']['en-gb'] = "Keep Local After Forward";
|
||||||
|
$text['label-voicemail_local_after_forward']['ar-eg'] = "الحفاظ على المحلية بعد الأمام";
|
||||||
|
$text['label-voicemail_local_after_forward']['de-at'] = "Nach Weiterleitung lokal behalten";
|
||||||
|
$text['label-voicemail_local_after_forward']['de-ch'] = "Nach Weiterleitung lokal behalten";
|
||||||
|
$text['label-voicemail_local_after_forward']['de-de'] = "Nach Weiterleitung lokal behalten";
|
||||||
|
$text['label-voicemail_local_after_forward']['el-gr'] = "Keep Local After Forward";
|
||||||
|
$text['label-voicemail_local_after_forward']['es-cl'] = "Mantener local después de avanzar";
|
||||||
|
$text['label-voicemail_local_after_forward']['es-mx'] = "Mantener local después de avanzar";
|
||||||
|
$text['label-voicemail_local_after_forward']['fr-ca'] = "Rester local après le transfert";
|
||||||
|
$text['label-voicemail_local_after_forward']['fr-fr'] = "Rester local après le transfert";
|
||||||
|
$text['label-voicemail_local_after_forward']['he-il'] = "שמור על מקומי לאחר קדימה";
|
||||||
|
$text['label-voicemail_local_after_forward']['it-it'] = "Mantieni locale dopo l'inoltro";
|
||||||
|
$text['label-voicemail_local_after_forward']['nl-nl'] = "Lokaal behouden na doorsturen";
|
||||||
|
$text['label-voicemail_local_after_forward']['pl-pl'] = "Zachowaj lokalny po przesłaniu dalej";
|
||||||
|
$text['label-voicemail_local_after_forward']['pt-br'] = "Manter local depois de encaminhar";
|
||||||
|
$text['label-voicemail_local_after_forward']['pt-pt'] = "Manter local depois de encaminhar";
|
||||||
|
$text['label-voicemail_local_after_forward']['ro-ro'] = "Păstrați local după redirecționare";
|
||||||
|
$text['label-voicemail_local_after_forward']['ru-ru'] = "Сохранять локальное значение после пересылки";
|
||||||
|
$text['label-voicemail_local_after_forward']['sv-se'] = "Håll lokal efter Forward";
|
||||||
|
$text['label-voicemail_local_after_forward']['uk-ua'] = "Зберігати локальні після пересилання";
|
||||||
|
$text['label-voicemail_local_after_forward']['tr-tr'] = "İleriden Sonra Yerel Tut";
|
||||||
|
$text['label-voicemail_local_after_forward']['zh-cn'] = "转发后保持本地";
|
||||||
|
$text['label-voicemail_local_after_forward']['ja-jp'] = "転送後もローカルに保持";
|
||||||
|
$text['label-voicemail_local_after_forward']['ko-kr'] = "전달 후 로컬 유지";
|
||||||
|
|
||||||
$text['label-voicemail_transcribe_enabled']['en-us'] = "Transcribe";
|
$text['label-voicemail_transcribe_enabled']['en-us'] = "Transcribe";
|
||||||
$text['label-voicemail_transcribe_enabled']['en-gb'] = "Transcribe";
|
$text['label-voicemail_transcribe_enabled']['en-gb'] = "Transcribe";
|
||||||
$text['label-voicemail_transcribe_enabled']['ar-eg'] = "نسخ";
|
$text['label-voicemail_transcribe_enabled']['ar-eg'] = "نسخ";
|
||||||
|
|
@ -1688,6 +1714,32 @@ $text['description-voicemail_local_after_email']['zh-cn'] = "选择发送电子
|
||||||
$text['description-voicemail_local_after_email']['ja-jp'] = "電子メール通知の送信後にボイスメールをシステムに保持するかどうかを選択します。";
|
$text['description-voicemail_local_after_email']['ja-jp'] = "電子メール通知の送信後にボイスメールをシステムに保持するかどうかを選択します。";
|
||||||
$text['description-voicemail_local_after_email']['ko-kr'] = "이메일 알림을 보낸 후 시스템에 음성 메일을 유지할지 여부를 선택합니다.";
|
$text['description-voicemail_local_after_email']['ko-kr'] = "이메일 알림을 보낸 후 시스템에 음성 메일을 유지할지 여부를 선택합니다.";
|
||||||
|
|
||||||
|
$text['description-voicemail_local_after_forward']['en-us'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
|
||||||
|
$text['description-voicemail_local_after_forward']['en-gb'] = "Choose whether to keep the voicemail in this mailbox after sending to the defined Forward Destination(s).";
|
||||||
|
$text['description-voicemail_local_after_forward']['ar-eg'] = "اختر ما إذا كنت تريد الاحتفاظ بالبريد الصوتي في صندوق البريد هذا بعد إرساله إلى وجهة (وجهات) إعادة التوجيه المحددة.";
|
||||||
|
$text['description-voicemail_local_after_forward']['de-at'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
|
||||||
|
$text['description-voicemail_local_after_forward']['de-ch'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
|
||||||
|
$text['description-voicemail_local_after_forward']['de-de'] = "Wählen Sie, ob die Voicemail nach dem Senden an die definierten Weiterleitungsziele in dieser Mailbox bleiben soll.";
|
||||||
|
$text['description-voicemail_local_after_forward']['el-gr'] = "Επιλέξτε εάν θα διατηρηθεί ο τηλεφωνητής σε αυτό το γραμματοκιβώτιο μετά την αποστολή στον καθορισμένο(ους) Προορισμό(ους).";
|
||||||
|
$text['description-voicemail_local_after_forward']['es-cl'] = "Elija si desea conservar el correo de voz en este buzón después de enviarlo a los destinos de reenvío definidos.";
|
||||||
|
$text['description-voicemail_local_after_forward']['es-mx'] = "Elija si desea conservar el correo de voz en este buzón después de enviarlo a los destinos de reenvío definidos.";
|
||||||
|
$text['description-voicemail_local_after_forward']['fr-ca'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
|
||||||
|
$text['description-voicemail_local_after_forward']['fr-fr'] = "Choisissez si vous souhaitez conserver la messagerie vocale dans cette boîte aux lettres après l'envoi vers la ou les destinations de transfert définies.";
|
||||||
|
$text['description-voicemail_local_after_forward']['he-il'] = "בחר אם לשמור את הדואר הקולי בתיבת הדואר הזו לאחר השליחה ליעד/ים המוגדרים.";
|
||||||
|
$text['description-voicemail_local_after_forward']['it-it'] = "Scegliere se conservare i messaggi vocali in questa casella di posta dopo l'invio alle destinazioni di inoltro definite.";
|
||||||
|
$text['description-voicemail_local_after_forward']['nl-nl'] = "Kies of u de voicemail in deze mailbox wilt bewaren na verzending naar de gedefinieerde doorstuurbestemming(en).";
|
||||||
|
$text['description-voicemail_local_after_forward']['pl-pl'] = "Wybierz, czy poczta głosowa ma być przechowywana w tej skrzynce pocztowej po wysłaniu do określonych miejsc docelowych przekazywania.";
|
||||||
|
$text['description-voicemail_local_after_forward']['pt-br'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
|
||||||
|
$text['description-voicemail_local_after_forward']['pt-pt'] = "Escolha se deseja manter o correio de voz nesta caixa postal após enviar para o(s) destino(s) de encaminhamento definido(s).";
|
||||||
|
$text['description-voicemail_local_after_forward']['ro-ro'] = "Alegeți dacă doriți să păstrați mesageria vocală în această cutie poștală după trimiterea către destinația (destinațiile) de redirecționare definite.";
|
||||||
|
$text['description-voicemail_local_after_forward']['ru-ru'] = "Выберите, следует ли сохранять голосовую почту в этом почтовом ящике после отправки в определенные пункты назначения пересылки.";
|
||||||
|
$text['description-voicemail_local_after_forward']['sv-se'] = "Välj om du vill behålla röstbrevlådan i den här brevlådan efter att ha skickats till den eller de definierade vidarebefordrandestinationerna.";
|
||||||
|
$text['description-voicemail_local_after_forward']['uk-ua'] = "Виберіть, чи зберігати голосову пошту в цій поштовій скриньці після надсилання на визначені пункти призначення.";
|
||||||
|
$text['description-voicemail_local_after_forward']['tr-tr'] = "Tanımlanan İletme Hedef(ler)ine gönderdikten sonra sesli postanın bu posta kutusunda tutulup tutulmayacağını seçin.";
|
||||||
|
$text['description-voicemail_local_after_forward']['zh-cn'] = "选择在发送到定义的转发目的地后是否将语音邮件保留在此邮箱中。";
|
||||||
|
$text['description-voicemail_local_after_forward']['ja-jp'] = "定義された転送先に送信した後、ボイスメールをこのメールボックスに保持するかどうかを選択します。";
|
||||||
|
$text['description-voicemail_local_after_forward']['ko-kr'] = "정의된 전달 대상으로 음성 메일을 보낸 후 이 사서함에 음성 메일을 보관할지 여부를 선택합니다.";
|
||||||
|
|
||||||
$text['description-voicemail_id']['en-us'] = "Enter the Voicemail ID";
|
$text['description-voicemail_id']['en-us'] = "Enter the Voicemail ID";
|
||||||
$text['description-voicemail_id']['en-gb'] = "Enter the Voicemail ID";
|
$text['description-voicemail_id']['en-gb'] = "Enter the Voicemail ID";
|
||||||
$text['description-voicemail_id']['ar-eg'] = "أدخل معرف البريد الصوتي";
|
$text['description-voicemail_id']['ar-eg'] = "أدخل معرف البريد الصوتي";
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@
|
||||||
$voicemail_file = $_POST["voicemail_file"];
|
$voicemail_file = $_POST["voicemail_file"];
|
||||||
$voicemail_local_after_email = $_POST["voicemail_local_after_email"];
|
$voicemail_local_after_email = $_POST["voicemail_local_after_email"];
|
||||||
$voicemail_destination = $_POST["voicemail_destination"];
|
$voicemail_destination = $_POST["voicemail_destination"];
|
||||||
|
$voicemail_local_after_forward = $_POST["voicemail_local_after_forward"];
|
||||||
$voicemail_enabled = $_POST["voicemail_enabled"] ?? 'false';
|
$voicemail_enabled = $_POST["voicemail_enabled"] ?? 'false';
|
||||||
$voicemail_description = $_POST["voicemail_description"];
|
$voicemail_description = $_POST["voicemail_description"];
|
||||||
$voicemail_tutorial = $_POST["voicemail_tutorial"];
|
$voicemail_tutorial = $_POST["voicemail_tutorial"];
|
||||||
|
|
@ -176,9 +177,24 @@
|
||||||
if (permission_exists('voicemail_file')) {
|
if (permission_exists('voicemail_file')) {
|
||||||
$array['voicemails'][0]['voicemail_file'] = $voicemail_file;
|
$array['voicemails'][0]['voicemail_file'] = $voicemail_file;
|
||||||
}
|
}
|
||||||
if (permission_exists('voicemail_local_after_email')) {
|
if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
|
||||||
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email;
|
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_email;
|
||||||
}
|
}
|
||||||
|
else if (permission_exists('voicemail_local_after_forward')) {
|
||||||
|
$array['voicemails'][0]['voicemail_local_after_email'] = $voicemail_local_after_forward;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$array['voicemails'][0]['voicemail_local_after_email'] = 'true';
|
||||||
|
}
|
||||||
|
if (permission_exists('voicemail_local_after_forward')) {
|
||||||
|
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_forward;
|
||||||
|
}
|
||||||
|
else if (permission_exists('voicemail_local_after_email') && !empty($voicemail_mail_to)) {
|
||||||
|
$array['voicemails'][0]['voicemail_local_after_forward'] = $voicemail_local_after_email;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$array['voicemails'][0]['voicemail_local_after_forward'] = 'true';
|
||||||
|
}
|
||||||
$array['voicemails'][0]['voicemail_enabled'] = $voicemail_enabled;
|
$array['voicemails'][0]['voicemail_enabled'] = $voicemail_enabled;
|
||||||
$array['voicemails'][0]['voicemail_description'] = $voicemail_description;
|
$array['voicemails'][0]['voicemail_description'] = $voicemail_description;
|
||||||
|
|
||||||
|
|
@ -333,6 +349,7 @@
|
||||||
$voicemail_recording_options = $row["voicemail_recording_options"];
|
$voicemail_recording_options = $row["voicemail_recording_options"];
|
||||||
$voicemail_file = $row["voicemail_file"];
|
$voicemail_file = $row["voicemail_file"];
|
||||||
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
||||||
|
$voicemail_local_after_forward = $row["voicemail_local_after_forward"];
|
||||||
$voicemail_enabled = $row["voicemail_enabled"];
|
$voicemail_enabled = $row["voicemail_enabled"];
|
||||||
$voicemail_description = $row["voicemail_description"];
|
$voicemail_description = $row["voicemail_description"];
|
||||||
}
|
}
|
||||||
|
|
@ -341,6 +358,7 @@
|
||||||
else {
|
else {
|
||||||
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
|
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
|
||||||
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
|
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
|
||||||
|
$voicemail_local_after_forward = $_SESSION['voicemail']['keep_local']['boolean'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove the spaces
|
//remove the spaces
|
||||||
|
|
@ -350,6 +368,7 @@
|
||||||
|
|
||||||
//set the defaults
|
//set the defaults
|
||||||
if (empty($voicemail_local_after_email)) { $voicemail_local_after_email = 'true'; }
|
if (empty($voicemail_local_after_email)) { $voicemail_local_after_email = 'true'; }
|
||||||
|
if (empty($voicemail_local_after_forward)) { $voicemail_local_after_forward = 'true'; }
|
||||||
if (empty($voicemail_enabled)) { $voicemail_enabled = 'true'; }
|
if (empty($voicemail_enabled)) { $voicemail_enabled = 'true'; }
|
||||||
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
|
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
|
||||||
if (empty($voicemail_tutorial)) { $voicemail_tutorial = 'false'; }
|
if (empty($voicemail_tutorial)) { $voicemail_tutorial = 'false'; }
|
||||||
|
|
@ -827,13 +846,16 @@
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists('voicemail_local_after_email')) {
|
if (
|
||||||
|
permission_exists('voicemail_file') &&
|
||||||
|
permission_exists('voicemail_local_after_email')
|
||||||
|
) {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-voicemail_local_after_email']."\n";
|
echo " ".$text['label-voicemail_local_after_email']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <select class='formfld' name='voicemail_local_after_email' id='voicemail_local_after_email' onchange=\"if (this.selectedIndex == 1) { document.getElementById('voicemail_file').selectedIndex = 1; }\">\n";
|
echo " <select class='formfld' name='voicemail_local_after_email' id='voicemail_local_after_email' onchange=\"if (this.selectedIndex == 1) { document.getElementById('voicemail_file').selectedIndex = 2; }\">\n";
|
||||||
echo " <option value='true' ".(($voicemail_local_after_email == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
echo " <option value='true' ".(($voicemail_local_after_email == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
||||||
echo " <option value='false' ".(($voicemail_local_after_email == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
echo " <option value='false' ".(($voicemail_local_after_email == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
||||||
echo " </select>\n";
|
echo " </select>\n";
|
||||||
|
|
@ -867,7 +889,7 @@
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($voicemail_destinations_assigned, $field);
|
unset($field);
|
||||||
|
|
||||||
if (is_array($voicemail_destinations_available) && @sizeof($voicemail_destinations_available) != 0) {
|
if (is_array($voicemail_destinations_available) && @sizeof($voicemail_destinations_available) != 0) {
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
|
|
@ -893,6 +915,28 @@
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
permission_exists('voicemail_forward') &&
|
||||||
|
permission_exists('voicemail_local_after_forward') &&
|
||||||
|
!empty($voicemail_destinations_assigned) &&
|
||||||
|
is_array($voicemail_destinations_assigned)
|
||||||
|
) {
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-voicemail_local_after_forward']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <select class='formfld' name='voicemail_local_after_forward'>\n";
|
||||||
|
echo " <option value='true' ".(($voicemail_local_after_forward == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
|
||||||
|
echo " <option value='false' ".(($voicemail_local_after_forward == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
|
||||||
|
echo " </select>\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-voicemail_local_after_forward']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
unset($voicemail_destinations_assigned);
|
||||||
|
}
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-voicemail_enabled']."\n";
|
echo " ".$text['label-voicemail_enabled']."\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue