mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add ability to configure the extension directory xml to provide the option to use freeswitch voicemail
This commit is contained in:
@@ -90,15 +90,15 @@
|
||||
$text['description-user_list']['pt-pt'] = "Atribuir os utilizadores que estão associados a esta extensão.";
|
||||
$text['description-user_list']['fr-fr'] = "Assigner cette extension aux utilisateur.";
|
||||
|
||||
$text['label-vm_password']['en-us'] = "Voicemail Password";
|
||||
$text['label-vm_password']['es-cl'] = "Contraseña de correo de voz";
|
||||
$text['label-vm_password']['pt-pt'] = "Password do Correio de Voz";
|
||||
$text['label-vm_password']['fr-fr'] = "Mot de passe de la messagerie vocale";
|
||||
$text['label-voicemail_password']['en-us'] = "Voicemail Password";
|
||||
$text['label-voicemail_password']['es-cl'] = "Contraseña de correo de voz";
|
||||
$text['label-voicemail_password']['pt-pt'] = "Password do Correio de Voz";
|
||||
$text['label-voicemail_password']['fr-fr'] = "Mot de passe de la messagerie vocale";
|
||||
|
||||
$text['description-vm_password']['en-us'] = "Enter the numeric voicemail password here.";
|
||||
$text['description-vm_password']['es-cl'] = "Ingrese la contraseña numérica para el correo de voz aquí.";
|
||||
$text['description-vm_password']['pt-pt'] = "Introduza uma password numérica para o correio de voz aqui.";
|
||||
$text['description-vm_password']['fr-fr'] = "Insérer un mot de passe numérique pour la messagerie vocale.";
|
||||
$text['description-voicemail_password']['en-us'] = "Enter the numeric voicemail password here.";
|
||||
$text['description-voicemail_password']['es-cl'] = "Ingrese la contraseña numérica para el correo de voz aquí.";
|
||||
$text['description-voicemail_password']['pt-pt'] = "Introduza uma password numérica para o correio de voz aqui.";
|
||||
$text['description-voicemail_password']['fr-fr'] = "Insérer un mot de passe numérique pour la messagerie vocale.";
|
||||
|
||||
$text['label-accountcode']['en-us'] = "Account Code";
|
||||
$text['label-accountcode']['es-cl'] = "Código de Cuenta";
|
||||
@@ -252,45 +252,45 @@
|
||||
$text['label-device_template']['pt-pt'] = "Template";
|
||||
$text['label-device_template']['fr-fr'] = "Template";
|
||||
|
||||
$text['label-vm_enabled']['en-us'] = "Voicemail Enabled";
|
||||
$text['label-vm_enabled']['es-cl'] = "Correo de Voz Activado";
|
||||
$text['label-vm_enabled']['pt-pt'] = "Correio de Voz Habilitado";
|
||||
$text['label-vm_enabled']['fr-fr'] = "Messagerie Vocale Active";
|
||||
$text['label-voicemail_enabled']['en-us'] = "Voicemail Enabled";
|
||||
$text['label-voicemail_enabled']['es-cl'] = "Correo de Voz Activado";
|
||||
$text['label-voicemail_enabled']['pt-pt'] = "Correio de Voz Habilitado";
|
||||
$text['label-voicemail_enabled']['fr-fr'] = "Messagerie Vocale Active";
|
||||
|
||||
$text['description-vm_enabled']['en-us'] = "Enable/disable voicemail for this extension.";
|
||||
$text['description-vm_enabled']['es-cl'] = "Activar/desactivar el correo de voz para esta extensión.";
|
||||
$text['description-vm_enabled']['pt-pt'] = "Habilitar/Desabilitar o correio de voz para esta extensão.";
|
||||
$text['description-vm_enabled']['fr-fr'] = "Messagerie Vocale disponible ou non pour cette extension.";
|
||||
$text['description-voicemail_enabled']['en-us'] = "Enable/disable voicemail for this extension.";
|
||||
$text['description-voicemail_enabled']['es-cl'] = "Activar/desactivar el correo de voz para esta extensión.";
|
||||
$text['description-voicemail_enabled']['pt-pt'] = "Habilitar/Desabilitar o correio de voz para esta extensão.";
|
||||
$text['description-voicemail_enabled']['fr-fr'] = "Messagerie Vocale disponible ou non pour cette extension.";
|
||||
|
||||
$text['label-vm_mailto']['en-us'] = "Voicemail Mail To";
|
||||
$text['label-vm_mailto']['es-cl'] = "Enviar correo de voz a";
|
||||
$text['label-vm_mailto']['pt-pt'] = "Enviar correio de voz para";
|
||||
$text['label-vm_mailto']['fr-fr'] = "Courriel destination";
|
||||
$text['label-voicemail_mail_to']['en-us'] = "Voicemail Mail To";
|
||||
$text['label-voicemail_mail_to']['es-cl'] = "Enviar correo de voz a";
|
||||
$text['label-voicemail_mail_to']['pt-pt'] = "Enviar correio de voz para";
|
||||
$text['label-voicemail_mail_to']['fr-fr'] = "Courriel destination";
|
||||
|
||||
$text['description-vm_mailto']['en-us'] = "Enter the email address to send voicemail to (optional).";
|
||||
$text['description-vm_mailto']['es-cl'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
|
||||
$text['description-vm_mailto']['pt-pt'] = "Introduza o endereço de email para enviar o correio de voz (opcional).";
|
||||
$text['description-vm_mailto']['fr-fr'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
|
||||
$text['description-voicemail_mail_to']['en-us'] = "Enter the email address to send voicemail to (optional).";
|
||||
$text['description-voicemail_mail_to']['es-cl'] = "Ingrese una dirección de correo electrónico para enviar el correo de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['pt-pt'] = "Introduza o endereço de email para enviar o correio de voz (opcional).";
|
||||
$text['description-voicemail_mail_to']['fr-fr'] = "Insérer le courriel où sera envoyé le message de notification (optionnel).";
|
||||
|
||||
$text['label-vm_attach_file']['en-us'] = "Voicemail Attach File";
|
||||
$text['label-vm_attach_file']['es-cl'] = "Adjuntar Archivo de Correo de Voz";
|
||||
$text['label-vm_attach_file']['pt-pt'] = "Anexar Ficheiro Áudio";
|
||||
$text['label-vm_attach_file']['fr-fr'] = "Fichier Audio";
|
||||
$text['label-voicemail_attach_file']['en-us'] = "Voicemail Attach File";
|
||||
$text['label-voicemail_attach_file']['es-cl'] = "Adjuntar Archivo de Correo de Voz";
|
||||
$text['label-voicemail_attach_file']['pt-pt'] = "Anexar Ficheiro Áudio";
|
||||
$text['label-voicemail_attach_file']['fr-fr'] = "Fichier Audio";
|
||||
|
||||
$text['description-vm_attach_file']['en-us'] = "Choose whether to attach the voicemail to the email as an audio file.";
|
||||
$text['description-vm_attach_file']['es-cl'] = "Seleccione si desea adjuntar el correo de voz al correo electrónico como un archivo de audio.";
|
||||
$text['description-vm_attach_file']['pt-pt'] = "Escolha se deseja anexar o correio de voz ao email como um ficheiro de áudio.";
|
||||
$text['description-vm_attach_file']['fr-fr'] = "Choisir si l'enregistrement audio est attaché au courriel.";
|
||||
$text['description-voicemail_attach_file']['en-us'] = "Choose whether to attach the voicemail to the email as an audio file.";
|
||||
$text['description-voicemail_attach_file']['es-cl'] = "Seleccione si desea adjuntar el correo de voz al correo electrónico como un archivo de audio.";
|
||||
$text['description-voicemail_attach_file']['pt-pt'] = "Escolha se deseja anexar o correio de voz ao email como um ficheiro de áudio.";
|
||||
$text['description-voicemail_attach_file']['fr-fr'] = "Choisir si l'enregistrement audio est attaché au courriel.";
|
||||
|
||||
$text['label-vm_keep_local_after_email']['en-us'] = "VM Keep Local After Email";
|
||||
$text['label-vm_keep_local_after_email']['es-cl'] = "Mantener Mensaje de Voz despues de enviar por Email";
|
||||
$text['label-vm_keep_local_after_email']['pt-pt'] = "Manter mensagem de correio de voz depois de enviado o email";
|
||||
$text['label-vm_keep_local_after_email']['fr-fr'] = "Message gardé en local après courriel";
|
||||
$text['label-voicemail_local_after_email']['en-us'] = "VM Keep Local After Email";
|
||||
$text['label-voicemail_local_after_email']['es-cl'] = "Mantener Mensaje de Voz despues de enviar por Email";
|
||||
$text['label-voicemail_local_after_email']['pt-pt'] = "Manter mensagem de correio de voz depois de enviado o email";
|
||||
$text['label-voicemail_local_after_email']['fr-fr'] = "Message gardé en local après courriel";
|
||||
|
||||
$text['description-vm_keep_local_after_email']['en-us'] = "Keep local file after sending the email.";
|
||||
$text['description-vm_keep_local_after_email']['es-cl'] = "Mantener el archivo de forma local despues de enviar por correo electrónico.";
|
||||
$text['description-vm_keep_local_after_email']['pt-pt'] = "Manter o ficheiro local depois de enviar o email.";
|
||||
$text['description-vm_keep_local_after_email']['fr-fr'] = "Conserver ou non le message sur la messagerie vocale après l'envoi du courriel.";
|
||||
$text['description-voicemail_local_after_email']['en-us'] = "Keep local file after sending the email.";
|
||||
$text['description-voicemail_local_after_email']['es-cl'] = "Mantener el archivo de forma local despues de enviar por correo electrónico.";
|
||||
$text['description-voicemail_local_after_email']['pt-pt'] = "Manter o ficheiro local depois de enviar o email.";
|
||||
$text['description-voicemail_local_after_email']['fr-fr'] = "Conserver ou non le message sur la messagerie vocale après l'envoi du courriel.";
|
||||
|
||||
$text['label-toll_allow']['en-us'] = "Toll Allow";
|
||||
$text['label-toll_allow']['es-cl'] = "Permitir Tarifas Especiales";
|
||||
|
||||
@@ -182,30 +182,29 @@ else {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$vm_mailto = $row["voicemail_mail_to"];
|
||||
$vm_attach_file = $row["voicemail_attach_file"];
|
||||
$vm_keep_local_after_email = $row["voicemail_local_after_email"];
|
||||
$vm_enabled = $row["voicemail_enabled"];
|
||||
$voicemail_mailto = $row["voicemail_mail_to"];
|
||||
$voicemail_attach_file = $row["voicemail_attach_file"];
|
||||
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
||||
$voicemail_enabled = $row["voicemail_enabled"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//set the new voicemail password
|
||||
if (strlen($vm_password) == 0) {
|
||||
$vm_password = generate_password(9, 1);
|
||||
if (strlen($voicemail_password) == 0) {
|
||||
$voicemail_password = generate_password(9, 1);
|
||||
}
|
||||
|
||||
//add voicemail via class
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->db = $db;
|
||||
$ext->domain_uuid = $domain_uuid;
|
||||
$ext->extension = $extension_new;
|
||||
$ext->number_alias = $number_alias_new;
|
||||
$ext->vm_password = $vm_password;
|
||||
$ext->vm_mailto = $vm_mailto;
|
||||
$ext->vm_attach_file = $vm_attach_file;
|
||||
$ext->vm_keep_local_after_email = $vm_keep_local_after_email;
|
||||
$ext->vm_enabled = $vm_enabled;
|
||||
$ext->voicemail_password = $voicemail_password;
|
||||
$ext->voicemail_mail_to = $voicemail_mailto;
|
||||
$ext->voicemail_attach_file = $voicemail_attach_file;
|
||||
$ext->voicemail_local_after_email = $voicemail_local_after_email;
|
||||
$ext->voicemail_enabled = $voicemail_enabled;
|
||||
$ext->description = $description;
|
||||
$ext->voicemail();
|
||||
unset($ext);
|
||||
|
||||
@@ -68,11 +68,11 @@ else {
|
||||
$limit_destination = check_str($_POST["limit_destination"]);
|
||||
$device_uuid = check_str($_POST["device_uuid"]);
|
||||
$device_line = check_str($_POST["device_line"]);
|
||||
$vm_password = check_str($_POST["vm_password"]);
|
||||
$vm_enabled = check_str($_POST["vm_enabled"]);
|
||||
$vm_mailto = check_str($_POST["vm_mailto"]);
|
||||
$vm_attach_file = check_str($_POST["vm_attach_file"]);
|
||||
$vm_keep_local_after_email = check_str($_POST["vm_keep_local_after_email"]);
|
||||
$voicemail_password = check_str($_POST["voicemail_password"]);
|
||||
$voicemail_enabled = check_str($_POST["voicemail_enabled"]);
|
||||
$voicemail_mail_to = check_str($_POST["voicemail_mail_to"]);
|
||||
$voicemail_attach_file = check_str($_POST["voicemail_attach_file"]);
|
||||
$voicemail_local_after_email = check_str($_POST["voicemail_local_after_email"]);
|
||||
$user_context = check_str($_POST["user_context"]);
|
||||
$range = check_str($_POST["range"]);
|
||||
$autogen_users = check_str($_POST["autogen_users"]);
|
||||
@@ -243,7 +243,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (strlen($extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
//if (strlen($number_alias) == 0) { $msg .= $text['message-required']."Number Alias<br>\n"; }
|
||||
//if (strlen($vm_password) == 0) { $msg .= $text['message-required']."Voicemail Password<br>\n"; }
|
||||
//if (strlen($voicemail_password) == 0) { $msg .= $text['message-required']."Voicemail Password<br>\n"; }
|
||||
//if (strlen($accountcode) == 0) { $msg .= $text['message-required']."Account Code<br>\n"; }
|
||||
//if (strlen($effective_caller_id_name) == 0) { $msg .= $text['message-required']."Effective Caller ID Name<br>\n"; }
|
||||
//if (strlen($effective_caller_id_number) == 0) { $msg .= $text['message-required']."Effective Caller ID Number<br>\n"; }
|
||||
@@ -256,9 +256,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//if (strlen($directory_exten_visible) == 0) { $msg .= $text['message-required']."Directory Extension Visible<br>\n"; }
|
||||
//if (strlen($limit_max) == 0) { $msg .= $text['message-required']."Max Callsr<br>\n"; }
|
||||
//if (strlen($limit_destination) == 0) { $msg .= $text['message-required']."Transfer Destination Number<br>\n"; }
|
||||
//if (strlen($vm_mailto) == 0) { $msg .= $text['message-required']."Voicemail Mail To<br>\n"; }
|
||||
//if (strlen($vm_attach_file) == 0) { $msg .= $text['message-required']."Voicemail Attach File<br>\n"; }
|
||||
//if (strlen($vm_keep_local_after_email) == 0) { $msg .= $text['message-required']."VM Keep Local After Email<br>\n"; }
|
||||
//if (strlen($voicemail_mail_to) == 0) { $msg .= $text['message-required']."Voicemail Mail To<br>\n"; }
|
||||
//if (strlen($voicemail_attach_file) == 0) { $msg .= $text['message-required']."Voicemail Attach File<br>\n"; }
|
||||
//if (strlen($voicemail_local_after_email) == 0) { $msg .= $text['message-required']."VM Keep Local After Email<br>\n"; }
|
||||
//if (strlen($user_context) == 0) { $msg .= $text['message-required']."User Context<br>\n"; }
|
||||
//if (strlen($toll_allow) == 0) { $msg .= $text['message-required']."Toll Allow<br>\n"; }
|
||||
//if (strlen($call_group) == 0) { $msg .= $text['message-required']."Call Group<br>\n"; }
|
||||
@@ -440,21 +440,20 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//add or update voicemail
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
|
||||
//set the voicemail password
|
||||
if (strlen($vm_password) == 0) {
|
||||
$vm_password = generate_password(9, 1);
|
||||
if (strlen($voicemail_password) == 0) {
|
||||
$voicemail_password = generate_password(9, 1);
|
||||
}
|
||||
//voicemail class
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->db = $db;
|
||||
$ext->domain_uuid = $domain_uuid;
|
||||
$ext->extension = $extension;
|
||||
$ext->number_alias = $number_alias;
|
||||
$ext->vm_password = $vm_password;
|
||||
$ext->vm_mailto = $vm_mailto;
|
||||
$ext->vm_attach_file = $vm_attach_file;
|
||||
$ext->vm_keep_local_after_email = $vm_keep_local_after_email;
|
||||
$ext->vm_enabled = $vm_enabled;
|
||||
$ext->voicemail_password = $voicemail_password;
|
||||
$ext->voicemail_mail_to = $voicemail_mailto;
|
||||
$ext->voicemail_attach_file = $voicemail_attach_file;
|
||||
$ext->voicemail_local_after_email = $voicemail_local_after_email;
|
||||
$ext->voicemail_enabled = $voicemail_enabled;
|
||||
$ext->description = $description;
|
||||
$ext->voicemail();
|
||||
unset($ext);
|
||||
@@ -471,8 +470,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$password = generate_password();
|
||||
}
|
||||
//set the voicemail password
|
||||
if (strlen($vm_password) == 0) {
|
||||
$vm_password = generate_password(9, 1);
|
||||
if (strlen($voicemail_password) == 0) {
|
||||
$voicemail_password = generate_password(9, 1);
|
||||
}
|
||||
//update extensions
|
||||
$sql = "update v_extensions set ";
|
||||
@@ -546,11 +545,11 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$ext->domain_uuid = $domain_uuid;
|
||||
$ext->extension = $extension;
|
||||
$ext->number_alias = $number_alias;
|
||||
$ext->vm_password = $vm_password;
|
||||
$ext->vm_mailto = $vm_mailto;
|
||||
$ext->vm_attach_file = $vm_attach_file;
|
||||
$ext->vm_keep_local_after_email = $vm_keep_local_after_email;
|
||||
$ext->vm_enabled = $vm_enabled;
|
||||
$ext->voicemail_password = $voicemail_password;
|
||||
$ext->voicemail_mailto = $voicemail_mailto;
|
||||
$ext->voicemail_attach_file = $voicemail_attach_file;
|
||||
$ext->voicemail_local_after_email = $voicemail_local_after_email;
|
||||
$ext->voicemail_enabled = $voicemail_enabled;
|
||||
$ext->description = $description;
|
||||
$ext->voicemail();
|
||||
unset($ext);
|
||||
@@ -705,18 +704,18 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach ($result as &$row) {
|
||||
$vm_password = $row["voicemail_password"];
|
||||
$voicemail_password = $row["voicemail_password"];
|
||||
//$greeting_id = $row["greeting_id"];
|
||||
$vm_mailto = $row["voicemail_mail_to"];
|
||||
$vm_mailto = str_replace(" ", "", $vm_mailto);
|
||||
$vm_attach_file = $row["voicemail_attach_file"];
|
||||
$vm_keep_local_after_email = $row["voicemail_local_after_email"];
|
||||
$vm_enabled = $row["voicemail_enabled"];
|
||||
$voicemail_mail_to = $row["voicemail_mail_to"];
|
||||
$voicemail_mail_to = str_replace(" ", "", $voicemail_mail_to);
|
||||
$voicemail_attach_file = $row["voicemail_attach_file"];
|
||||
$voicemail_local_after_email = $row["voicemail_local_after_email"];
|
||||
$voicemail_enabled = $row["voicemail_enabled"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
//clean the variables
|
||||
$vm_password = str_replace("#", "", $vm_password);
|
||||
$vm_mailto = str_replace(" ", "", $vm_mailto);
|
||||
$voicemail_password = str_replace("#", "", $voicemail_password);
|
||||
$voicemail_mail_to = str_replace(" ", "", $voicemail_mail_to);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
@@ -935,12 +934,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-vm_password'].":\n";
|
||||
echo " ".$text['label-voicemail_password'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='password' name='vm_password' id='vm_password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value='$vm_password'>\n";
|
||||
echo " <input class='formfld' type='password' name='voicemail_password' id='voicemail_password' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value='$voicemail_password'>\n";
|
||||
echo " <br />\n";
|
||||
echo " ".$text['description-vm_password']."\n";
|
||||
echo " ".$text['description-voicemail_password']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
@@ -1369,17 +1368,17 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-vm_enabled'].":\n";
|
||||
echo " ".$text['label-voicemail_enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='vm_enabled'>\n";
|
||||
if ($vm_enabled == "true") {
|
||||
echo " <select class='formfld' name='voicemail_enabled'>\n";
|
||||
if ($voicemail_enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($vm_enabled == "false") {
|
||||
if ($voicemail_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -1387,34 +1386,34 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-vm_enabled']."\n";
|
||||
echo $text['description-voicemail_enabled']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-vm_mailto'].":\n";
|
||||
echo " ".$text['label-voicemail_mail_to'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='vm_mailto' maxlength='255' value=\"$vm_mailto\">\n";
|
||||
echo " <input class='formfld' type='text' name='voicemail_mail_to' maxlength='255' value=\"$voicemail_mail_to\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-vm_mailto']."\n";
|
||||
echo $text['description-voicemail_mail_to']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-vm_attach_file'].":\n";
|
||||
echo " ".$text['label-voicemail_attach_file'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='vm_attach_file'>\n";
|
||||
if ($vm_attach_file == "true") {
|
||||
echo " <select class='formfld' name='voicemail_attach_file'>\n";
|
||||
if ($voicemail_attach_file == "true") {
|
||||
echo " <option value='true' selected >".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($vm_attach_file == "false") {
|
||||
if ($voicemail_attach_file == "false") {
|
||||
echo " <option value='false' selected >".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -1422,23 +1421,23 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-vm_attach_file']."\n";
|
||||
echo $text['description-voicemail_attach_file']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-vm_keep_local_after_email'].":\n";
|
||||
echo " ".$text['label-voicemail_local_after_email'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='vm_keep_local_after_email'>\n";
|
||||
if ($vm_keep_local_after_email == "true") {
|
||||
echo " <select class='formfld' name='voicemail_local_after_email'>\n";
|
||||
if ($voicemail_local_after_email == "true") {
|
||||
echo " <option value='true' selected >".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($vm_keep_local_after_email == "false") {
|
||||
if ($voicemail_local_after_email == "false") {
|
||||
echo " <option value='false' selected >".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -1446,7 +1445,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-vm_keep_local_after_email']."\n";
|
||||
echo $text['description-voicemail_local_after_email']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ require_once "resources/paging.php";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('call_group', $text['label-call_group'], $order_by, $order);
|
||||
//echo th_order_by('vm_mailto', $text['label-vm_mailto'], $order_by, $order);
|
||||
//echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||
echo "<td class='list_control_icons'>\n";
|
||||
@@ -155,7 +155,7 @@ require_once "resources/paging.php";
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_group']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['vm_mailto']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['voicemail_mail_to']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']."</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['description']." </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
public $number_alias;
|
||||
public $password;
|
||||
public $provisioning_list;
|
||||
public $vm_password;
|
||||
public $voicemail_password;
|
||||
public $accountcode;
|
||||
public $effective_caller_id_name;
|
||||
public $effective_caller_id_number;
|
||||
@@ -49,10 +49,10 @@
|
||||
public $directory_exten_visible;
|
||||
public $limit_max;
|
||||
public $limit_destination;
|
||||
public $vm_enabled;
|
||||
public $vm_mailto;
|
||||
public $vm_attach_file;
|
||||
public $vm_keep_local_after_email;
|
||||
public $voicemail_enabled;
|
||||
public $voicemail_mail_to;
|
||||
public $voicemail_attach_file;
|
||||
public $voicemail_local_after_email;
|
||||
public $user_context;
|
||||
public $toll_allow;
|
||||
public $call_timeout;
|
||||
@@ -127,11 +127,11 @@
|
||||
$sql .= "'".$this->domain_uuid."', ";
|
||||
$sql .= "'".uuid()."', ";
|
||||
$sql .= "'".$this->voicemail_id."', ";
|
||||
$sql .= "'".$this->vm_password."', ";
|
||||
$sql .= "'".$this->vm_mailto."', ";
|
||||
$sql .= "'".$this->vm_attach_file."', ";
|
||||
$sql .= "'".$this->vm_keep_local_after_email."', ";
|
||||
$sql .= "'".$this->vm_enabled."', ";
|
||||
$sql .= "'".$this->voicemail_password."', ";
|
||||
$sql .= "'".$this->voicemail_mail_to."', ";
|
||||
$sql .= "'".$this->voicemail_attach_file."', ";
|
||||
$sql .= "'".$this->voicemail_local_after_email."', ";
|
||||
$sql .= "'".$this->voicemail_enabled."', ";
|
||||
$sql .= "'".$this->description."' ";
|
||||
$sql .= ")";
|
||||
$this->db->exec(check_sql($sql));
|
||||
@@ -140,11 +140,11 @@
|
||||
else {
|
||||
//update the voicemail box
|
||||
$sql = "update v_voicemails set ";
|
||||
$sql .= "voicemail_password = '".$this->vm_password."', ";
|
||||
$sql .= "voicemail_mail_to = '".$this->vm_mailto."', ";
|
||||
$sql .= "voicemail_attach_file = '".$this->vm_attach_file."', ";
|
||||
$sql .= "voicemail_local_after_email = '".$this->vm_keep_local_after_email."', ";
|
||||
$sql .= "voicemail_enabled = '".$this->vm_enabled."', ";
|
||||
$sql .= "voicemail_password = '".$this->voicemail_password."', ";
|
||||
$sql .= "voicemail_mail_to = '".$this->voicemail_mail_to."', ";
|
||||
$sql .= "voicemail_attach_file = '".$this->voicemail_attach_file."', ";
|
||||
$sql .= "voicemail_local_after_email = '".$this->voicemail_local_after_email."', ";
|
||||
$sql .= "voicemail_enabled = '".$this->voicemail_enabled."', ";
|
||||
$sql .= "voicemail_description = '".$this->description."' ";
|
||||
$sql .= "where domain_uuid = '".$this->domain_uuid."' ";
|
||||
$sql .= "and voicemail_id = '".$this->voicemail_id."' ";
|
||||
@@ -174,9 +174,10 @@
|
||||
}
|
||||
|
||||
//write the xml files
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "order by call_group asc ";
|
||||
$sql = "SELECT * FROM v_extensions AS e, v_voicemails AS v ";
|
||||
$sql .= "WHERE e.domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "AND e.number_alias = v.voicemail_id ";
|
||||
$sql .= "ORDER BY e.call_group ASC ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$i = 0;
|
||||
@@ -199,8 +200,8 @@
|
||||
}
|
||||
$call_timeout = $row['call_timeout'];
|
||||
$user_context = $row['user_context'];
|
||||
//$vm_password = $row['vm_password'];
|
||||
//$vm_password = str_replace("#", "", $vm_password); //preserves leading zeros
|
||||
$voicemail_password = $row['voicemail_password'];
|
||||
//$voicemail_password = str_replace("#", "", $voicemail_password); //preserves leading zeros
|
||||
|
||||
//echo "enabled: ".$row['enabled'];
|
||||
if ($row['enabled'] != "false") {
|
||||
@@ -231,9 +232,10 @@
|
||||
$xml .= " <user id=\"".$row['extension']."\"".$cidr."".$number_alias.">\n";
|
||||
$xml .= " <params>\n";
|
||||
$xml .= " <param name=\"password\" value=\"" . $row['password'] . "\"/>\n";
|
||||
/*
|
||||
$xml .= " <param name=\"vm-password\" value=\"" . $vm_password . "\"/>\n";
|
||||
switch ($row['vm_enabled']) {
|
||||
|
||||
//voicemail settings
|
||||
$xml .= " <param name=\"vm-password\" value=\"" . $voicemail_password . "\"/>\n";
|
||||
switch ($row['voicemail_enabled']) {
|
||||
case "true":
|
||||
$xml .= " <param name=\"vm-enabled\" value=\"true\"/>\n";
|
||||
break;
|
||||
@@ -243,10 +245,10 @@
|
||||
default:
|
||||
$xml .= " <param name=\"vm-enabled\" value=\"true\"/>\n";
|
||||
}
|
||||
if (strlen($row['vm_mailto']) > 0) {
|
||||
if (strlen($row['voicemail_mail_to']) > 0) {
|
||||
$xml .= " <param name=\"vm-email-all-messages\" value=\"true\"/>\n";
|
||||
|
||||
switch ($row['vm_attach_file']) {
|
||||
switch ($row['voicemail_attach_file']) {
|
||||
case "true":
|
||||
$xml .= " <param name=\"vm-attach-file\" value=\"true\"/>\n";
|
||||
break;
|
||||
@@ -256,7 +258,7 @@
|
||||
default:
|
||||
$xml .= " <param name=\"vm-attach-file\" value=\"true\"/>\n";
|
||||
}
|
||||
switch ($row['vm_keep_local_after_email']) {
|
||||
switch ($row['voicemail_local_after_email']) {
|
||||
case "true":
|
||||
$xml .= " <param name=\"vm-keep-local-after-email\" value=\"true\"/>\n";
|
||||
break;
|
||||
@@ -266,9 +268,9 @@
|
||||
default:
|
||||
$xml .= " <param name=\"vm-keep-local-after-email\" value=\"true\"/>\n";
|
||||
}
|
||||
$xml .= " <param name=\"vm-mailto\" value=\"" . $row['vm_mailto'] . "\"/>\n";
|
||||
$xml .= " <param name=\"vm-mailto\" value=\"" . $row['voicemail_mail_to'] . "\"/>\n";
|
||||
}
|
||||
*/
|
||||
|
||||
if (strlen($row['mwi_account']) > 0) {
|
||||
$xml .= " <param name=\"MWI-Account\" value=\"" . $row['mwi_account'] . "\"/>\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user