mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Voicemail to sms notification (#2205)
Requires that you have fusionpbx-apps/sms Doesn’t impact anything if you don’t have it. Must be enabled with default_setting voicemail_to_sms Everything is disabled by default and the fields in voicemail_edit.php are hidden by default.
This commit is contained in:
@@ -64,6 +64,8 @@
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "user";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "voicemail_sms_edit";
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
@@ -103,6 +105,10 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the email address to send voicemail to.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_sms_to";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the sms did to send voicemail to.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_attach_file";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Choose whether to attach the file to the email.";
|
||||
|
||||
@@ -146,6 +146,17 @@ $text['label-voicemail_alternate_greet_id']['uk'] = "";
|
||||
$text['label-voicemail_alternate_greet_id']['de-at'] = "";
|
||||
$text['label-voicemail_alternate_greet_id']['he'] = "";
|
||||
|
||||
$text['label-voicemail_sms_to']['en-us'] = "SMS To";
|
||||
$text['label-voicemail_sms_to']['es-cl'] = "SMS a";
|
||||
$text['label-voicemail_sms_to']['pt-pt'] = "";
|
||||
$text['label-voicemail_sms_to']['fr-fr'] = "SMS à";
|
||||
$text['label-voicemail_sms_to']['pt-br'] = "SMS para";
|
||||
$text['label-voicemail_sms_to']['pl'] = "SMS do";
|
||||
$text['label-voicemail_sms_to']['sv-se'] = "";
|
||||
$text['label-voicemail_sms_to']['uk'] = "SMS-повідомлення на";
|
||||
$text['label-voicemail_sms_to']['de-at'] = "SMS an";
|
||||
$text['label-voicemail_sms_to']['he'] = "";
|
||||
|
||||
$text['label-voicemail_mail_to']['en-us'] = "Mail To";
|
||||
$text['label-voicemail_mail_to']['es-cl'] = "Correo a";
|
||||
$text['label-voicemail_mail_to']['pt-pt'] = "Email Para";
|
||||
@@ -500,6 +511,17 @@ $text['description-voicemail_password']['uk'] = "Введіть пароль";
|
||||
$text['description-voicemail_password']['de-at'] = "Geben Sie das numerische Mailbox Passwort an.";
|
||||
$text['description-voicemail_password']['he'] = "";
|
||||
|
||||
$text['description-voicemail_sms_to']['en-us'] = "Enter the SMS Number to send voicemail notification to. ";
|
||||
$text['description-voicemail_sms_to']['es-cl'] = "Introduzca el número de SMS para enviar notificación de correo de voz.";
|
||||
$text['description-voicemail_sms_to']['pt-pt'] = "Digite o número de SMS para enviar notificação de correio de voz para.";
|
||||
$text['description-voicemail_sms_to']['fr-fr'] = "Entrez le numéro de SMS pour envoyer une notification de messagerie vocale à.";
|
||||
$text['description-voicemail_sms_to']['pt-br'] = "";
|
||||
$text['description-voicemail_sms_to']['pl'] = "Wprowadź numer SMS do wysyłania powiadomienia poczty głosowej.";
|
||||
$text['description-voicemail_sms_to']['sv-se'] = "Ange numret SMS för att skicka röstmeddelanden anmälan till.";
|
||||
$text['description-voicemail_sms_to']['uk'] = "Введіть номер SMS відправити повідомлення голосової пошти.";
|
||||
$text['description-voicemail_sms_to']['de-at'] = "Geben Sie die SMS-Nummer um Voicemail Benachrichtigung zu senden.";
|
||||
$text['description-voicemail_sms_to']['he'] = "הזן את מספר ה-SMS לשלוח הודעת תא קולי.";
|
||||
|
||||
$text['description-voicemail_message']['en-us'] = "A list of recorded voice messages which shows when the message was created, caller ID information, length, file size and download or delete the message.";
|
||||
$text['description-voicemail_message']['es-cl'] = "Un listado de grabaciones de mensajes de voz que muestran la fecha de creación, información del Caller ID, duración, tamaño del archivo y permite descargar o eliminar el archivo";
|
||||
$text['description-voicemail_message']['pt-pt'] = "Uma lista de mensagens gravadas que mostra quando uma mensagem foi criada, o ID do chamador, a duração, o tamanho do ficheiro e opção de descarregar ou remover a mensagem.";
|
||||
|
||||
@@ -58,6 +58,7 @@ else {
|
||||
$voicemail_options = $_POST["voicemail_options"];
|
||||
$voicemail_alternate_greet_id = check_str($_POST["voicemail_alternate_greet_id"]);
|
||||
$voicemail_mail_to = check_str($_POST["voicemail_mail_to"]);
|
||||
$voicemail_sms_to = check_str($_POST["voicemail_sms_to"]);
|
||||
$voicemail_file = check_str($_POST["voicemail_file"]);
|
||||
$voicemail_local_after_email = check_str($_POST["voicemail_local_after_email"]);
|
||||
$voicemail_enabled = check_str($_POST["voicemail_enabled"]);
|
||||
@@ -145,6 +146,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "greeting_id, ";
|
||||
$sql .= "voicemail_alternate_greet_id, ";
|
||||
$sql .= "voicemail_mail_to, ";
|
||||
$sql .= "voicemail_sms_to, ";
|
||||
$sql .= "voicemail_file, ";
|
||||
$sql .= "voicemail_local_after_email, ";
|
||||
$sql .= "voicemail_enabled, ";
|
||||
@@ -159,6 +161,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= (($greeting_id != '') ? "'".$greeting_id."'" : 'null').", ";
|
||||
$sql .= (($voicemail_alternate_greet_id != '') ? "'".$voicemail_alternate_greet_id."'" : 'null').", ";
|
||||
$sql .= "'".$voicemail_mail_to."', ";
|
||||
$sql .= "'".$voicemail_sms_to."', ";
|
||||
$sql .= "'".$voicemail_file."', ";
|
||||
$sql .= "'".$voicemail_local_after_email."', ";
|
||||
$sql .= "'".$voicemail_enabled."', ";
|
||||
@@ -177,6 +180,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "greeting_id = ".(($greeting_id != '') ? "'".$greeting_id."'" : 'null').", ";
|
||||
$sql .= "voicemail_alternate_greet_id = ".(($voicemail_alternate_greet_id != '') ? "'".$voicemail_alternate_greet_id."'" : 'null').", ";
|
||||
$sql .= "voicemail_mail_to = '".$voicemail_mail_to."', ";
|
||||
$sql .= "voicemail_sms_to = '".$voicemail_sms_to."', ";
|
||||
$sql .= "voicemail_file = '".$voicemail_file."', ";
|
||||
$sql .= "voicemail_local_after_email = '".$voicemail_local_after_email."', ";
|
||||
$sql .= "voicemail_enabled = '".$voicemail_enabled."', ";
|
||||
@@ -262,6 +266,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$greeting_id = $row["greeting_id"];
|
||||
$voicemail_alternate_greet_id = $row["voicemail_alternate_greet_id"];
|
||||
$voicemail_mail_to = $row["voicemail_mail_to"];
|
||||
$voicemail_sms_to = $row["voicemail_sms_to"];
|
||||
$voicemail_file = $row["voicemail_file"];
|
||||
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
||||
$voicemail_enabled = $row["voicemail_enabled"];
|
||||
@@ -473,6 +478,18 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo $text['description-voicemail_mail_to']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
if(permission_exists('voicemail_sms_edit')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-voicemail_sms_to']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='voicemail_sms_to' maxlength='255' value=\"$voicemail_sms_to\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-voicemail_sms_to']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
||||
Reference in New Issue
Block a user