| 1 |
<?php |
|---|
| 2 |
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); } |
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
$extens = core_users_list(); |
|---|
| 17 |
|
|---|
| 18 |
$uservm = voicemail_getVoicemail(); |
|---|
| 19 |
|
|---|
| 20 |
$vmail_info["activated_info"] = array(); |
|---|
| 21 |
$vmail_info["bycontext"] = array(); |
|---|
| 22 |
$vmail_info["unactivated_info"] = array(); |
|---|
| 23 |
$vmail_info["disabled_list"] = array(); |
|---|
| 24 |
$vmail_info["contexts"] = array(); |
|---|
| 25 |
$vmail_info["contexts"] = array_keys($uservm); |
|---|
| 26 |
|
|---|
| 27 |
$extdisplay = isset($_REQUEST["ext"])?$_REQUEST["ext"]:""; |
|---|
| 28 |
$type = (isset($_REQUEST["type"]) && $_REQUEST["type"] != "")?$_REQUEST["type"]:"setup"; |
|---|
| 29 |
$display = (isset($_REQUEST["display"]) && $_REQUEST["display"] != "")?$_REQUEST["display"]:"voicemail"; |
|---|
| 30 |
|
|---|
| 31 |
$rnav_list = ""; |
|---|
| 32 |
$rnav_enabled_index = array(); |
|---|
| 33 |
$rnav_entries = array(); |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
global $amp_conf; |
|---|
| 37 |
$vmail_root = "/" . trim($amp_conf["ASTSPOOLDIR"] , "/") . "/voicemail"; |
|---|
| 38 |
|
|---|
| 39 |
if (isset($extens) && is_array($extens)) { |
|---|
| 40 |
$i = 0; |
|---|
| 41 |
foreach ($extens as $key => $exten) { |
|---|
| 42 |
$vmbox = null; |
|---|
| 43 |
|
|---|
| 44 |
foreach ($vmail_info["contexts"] as $vmcontext) { |
|---|
| 45 |
if (isset($uservm[$vmcontext][$exten[0]])) { |
|---|
| 46 |
$vmbox["context"] = $vmcontext; |
|---|
| 47 |
break; |
|---|
| 48 |
} |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
$name = $exten[1]; |
|---|
| 53 |
$unactivated_style = ""; |
|---|
| 54 |
$unactivated_txt = ""; |
|---|
| 55 |
$disabled_style = ""; |
|---|
| 56 |
$disabled_txt = ""; |
|---|
| 57 |
$c = ""; |
|---|
| 58 |
$c = isset($vmbox["context"])?$vmbox["context"]:""; |
|---|
| 59 |
if ($vmbox !== null) { |
|---|
| 60 |
$vmail_info["bycontext"][$vmbox["context"]][] = $exten[0]; |
|---|
| 61 |
$vmbox["path"] = $vmail_root . "/" . $vmbox["context"] . "/" . $exten[0]; |
|---|
| 62 |
$rnav_enabled_index[$vmbox["context"]][] = $i; |
|---|
| 63 |
if (is_dir($vmbox["path"])) { |
|---|
| 64 |
$vmail_info["activated_info"][$exten[0]] = $vmbox["context"]; |
|---|
| 65 |
} else { |
|---|
| 66 |
$vmail_info["unactivated_info"][$exten[0]] = $vmbox["context"]; |
|---|
| 67 |
$unactivated_style = " style='background: #abc9ff;'"; |
|---|
| 68 |
$unactivated_txt = " [unactivated]"; |
|---|
| 69 |
} |
|---|
| 70 |
$link = "config.php?type=" . $type . "&display=" . $display . "&ext=" . $exten[0] . "&action=bsettings#" . $exten[0]; |
|---|
| 71 |
} else { |
|---|
| 72 |
|
|---|
| 73 |
$vmail_info["disabled_list"][] = $exten[0]; |
|---|
| 74 |
$disabled_txt = "disabled"; |
|---|
| 75 |
$disabled_style = " style='background: #ffffcc; text-decoration: line-through;'"; |
|---|
| 76 |
|
|---|
| 77 |
if (isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "extensions")) { |
|---|
| 78 |
$link = "config.php?type=setup&display=extensions&extdisplay=" . $exten[0] . "#" . $exten[0]; |
|---|
| 79 |
} else { |
|---|
| 80 |
$link = "config.php?type=setup&display=users&extdisplay=" . $exten[0] . "#" . $exten[0]; |
|---|
| 81 |
} |
|---|
| 82 |
} |
|---|
| 83 |
$rnav_entries[$i] = "\t<li id='voicemail_list_" . $exten[0] . "'${disabled_style}${unactivated_style}><a" . ($extdisplay==$exten[0] ? ' class="current"':'') . "${disabled_style}${unactivated_style} href=\"$link\" onHover='menuUpdatePos();'>{$name} <" . $exten[0] . "> (${c}${disabled_txt})${unactivated_txt}</a></li>\n"; |
|---|
| 84 |
$i++; |
|---|
| 85 |
} |
|---|
| 86 |
} |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
$dlen = 800; |
|---|
| 92 |
$gen_settings = array( "adsifdn" => array("ver" => 1.2, "len" => 4, "type" => "char"), |
|---|
| 93 |
"adsisec" => array("ver" => 1.2, "len" => 4, "type" => "char"), |
|---|
| 94 |
"adsiver" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 95 |
"attach" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 96 |
"authpassword" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 97 |
"authuser" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 98 |
"backupdeleted" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 99 |
"callback" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 100 |
"charset" => array("ver" => 1.2, "len" => 32, "type" => "char"), |
|---|
| 101 |
"cidinternalcontexts" => array("ver" => 1.2, "len" => 640, "type" => "char"), |
|---|
| 102 |
"dialout" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 103 |
"emailbody" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 104 |
"emaildateformat" => array("ver" => 1.2, "len" => 32, "type" => "char"), |
|---|
| 105 |
"emailsubject" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 106 |
"envelope" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 107 |
"exitcontext" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 108 |
"expungeonhangup" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 109 |
"externnotify" => array("ver" => 1.2, "len" => 160, "type" => "char"), |
|---|
| 110 |
"externpass" => array("ver" => 1.2, "len" => 128, "type" => "char"), |
|---|
| 111 |
"externpassnotify" => array("ver" => 1.6, "len" => 128, "type" => "char"), |
|---|
| 112 |
"forcegreetings" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 113 |
"forcename" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 114 |
"format" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 115 |
"fromstring" => array("ver" => 1.2, "len" => 100, "type" => "char"), |
|---|
| 116 |
"greetingsfolder" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 117 |
"imapclosetimeout" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 118 |
"imapflags" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 119 |
"imapfolder" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 120 |
"imapgreetings" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 121 |
"imapopentimeout" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 122 |
"imapparentfolder" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 123 |
"imapport" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 124 |
"imapreadtimeout" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 125 |
"imapserver" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 126 |
"imapwritetimeout" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 127 |
"listen-control-forward-key" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 128 |
"listen-control-pause-key" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 129 |
"listen-control-restart-key" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 130 |
"listen-control-reverse-key" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 131 |
"listen-control-stop-key" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 132 |
"mailcmd" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 133 |
"maxgreet" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 134 |
"maxlogins" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 135 |
"maxmessage" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 136 |
"maxmsg" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 137 |
"maxsecs" => array("ver" => 1.6, "len" => $dlen, "type" => "num"), |
|---|
| 138 |
"maxsilence" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 139 |
"minsecs" => array("ver" => 1.6, "len" => $dlen, "type" => "num"), |
|---|
| 140 |
"moveheard" => array("ver" => 1.6, "len" => 0, "type" => "flag"), |
|---|
| 141 |
"nextaftercmd" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 142 |
"obdcstorage" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 143 |
"odbctable" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 144 |
"operator" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 145 |
"pagerbody" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 146 |
"pagerfromstring" => array("ver" => 1.2, "len" => 100, "type" => "char"), |
|---|
| 147 |
"pagersubject" => array("ver" => 1.2, "len" => $dlen, "type" => "char"), |
|---|
| 148 |
"pbxskip" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 149 |
"pollfreq" => array("ver" => 1.6, "len" => $dlen, "type" => "num"), |
|---|
| 150 |
"pollmailboxes" => array("ver" => 1.6, "len" => 0, "type" => "flag"), |
|---|
| 151 |
"review" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 152 |
"saycid" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 153 |
"sayduration" => array("ver" => 1.2, "len" => $dlen, "type" => "flag"), |
|---|
| 154 |
"saydurationm" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 155 |
"searchcontexts" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 156 |
"sendvoicemail" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 157 |
"serveremail" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 158 |
"silencethreshold" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 159 |
"skipms" => array("ver" => 1.2, "len" => $dlen, "type" => "num"), |
|---|
| 160 |
"smdienable" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 161 |
"smdiport" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 162 |
"tempgreetwarn" => array("ver" => 1.4, "len" => $dlen, "type" => "flag"), |
|---|
| 163 |
"usedirectory" => array("ver" => 1.4, "len" => 0, "type" => "flag"), |
|---|
| 164 |
"userscontext" => array("ver" => 1.4, "len" => $dlen, "type" => "char"), |
|---|
| 165 |
"vm-mismatch" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 166 |
"vm-newpassword" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 167 |
"vm-passchanged" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 168 |
"vm-password" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 169 |
"vm-reenterpassword" => array("ver" => 1.6, "len" => $dlen, "type" => "char"), |
|---|
| 170 |
"volgain" => array("ver" => 1.4, "len" => $dlen, "type" => "num") ); |
|---|
| 171 |
|
|---|
| 172 |
$acct_settings = array( "attach" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 173 |
"attachfmt" => array("ver" => 1.4, "len" => 20, "type" => "char"), |
|---|
| 174 |
"backupdeleted" => array("ver" => 1.6, "len" => 0, "type" => "num"), |
|---|
| 175 |
"callback" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 176 |
"callmenum" => array("ver" => 1.2, "len" => 0, "type" => "num"), |
|---|
| 177 |
"delete" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 178 |
"dialout" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 179 |
"email" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 180 |
"envelope" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 181 |
"exitcontext" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 182 |
"forcegreetings" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 183 |
"forcename" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 184 |
"hidefromdir" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 185 |
"imappassword" => array("ver" => 1.4, "len" => 80, "type" => "char"), |
|---|
| 186 |
"imapuser" => array("ver" => 1.4, "len" => 80, "type" => "char"), |
|---|
| 187 |
"language" => array("ver" => 1.4, "len" => 20, "type" => "char"), |
|---|
| 188 |
"maxmessage" => array("ver" => 1.2, "len" => 0, "type" => "num"), |
|---|
| 189 |
"maxmsg" => array("ver" => 1.2, "len" => 0, "type" => "num"), |
|---|
| 190 |
"maxsecs" => array("ver" => 1.6, "len" => 0, "type" => "num"), |
|---|
| 191 |
"moveheard" => array("ver" => 1.6, "len" => 0, "type" => "flag"), |
|---|
| 192 |
"name" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 193 |
"operator" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 194 |
"pager" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 195 |
"pwd" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 196 |
"review" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 197 |
"saycid" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 198 |
"sayduration" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 199 |
"saydurationm" => array("ver" => 1.2, "len" => 0, "type" => "num"), |
|---|
| 200 |
"sendvoicemail" => array("ver" => 1.2, "len" => 0, "type" => "flag"), |
|---|
| 201 |
"serveremail" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 202 |
"tempgreetwarn" => array("ver" => 1.4, "len" => 0, "type" => "flag"), |
|---|
| 203 |
"tz" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 204 |
"vmcontext" => array("ver" => 1.2, "len" => 80, "type" => "char"), |
|---|
| 205 |
"volgain" => array("ver" => 1.4, "len" => 0, "type" => "num") ); |
|---|
| 206 |
|
|---|
| 207 |
$tooltips = array("tz" => array("name" => _("Timezone definition name"), |
|---|
| 208 |
"def" => _("Time announcement for message playback"), |
|---|
| 209 |
"del" => _("Remove the timezone definition")), |
|---|
| 210 |
"general" => array("adsifdn" => _("The ADSI feature descriptor number to download to"), |
|---|
| 211 |
"adsisec" => _("The ADSI security lock code"), |
|---|
| 212 |
"adsiver" => _("The ADSI Voicemail application version number."), |
|---|
| 213 |
"attach" => _("Option to attach Voicemails to email."), |
|---|
| 214 |
"authpassword" => _("IMAP server master password."), |
|---|
| 215 |
"authuser" => _("IMAP server master username."), |
|---|
| 216 |
"backupdeleted" => _("No. of deleted messages saved per mailbox (can be a number or yes/no, yes meaning MAXMSG, no meaning 0)."), |
|---|
| 217 |
"callback" => _("Context to call back from; if not listed, calling the sender back will not be permitted."), |
|---|
| 218 |
"charset" => _("The character set for Voicemail messages"), |
|---|
| 219 |
"cidinternalcontexts" => _("Comma separated list of internal contexts to use caller ID."), |
|---|
| 220 |
"dialout" => _("Context to dial out from [option 4 from the advanced menu] if not listed, dialing out will not be permitted."), |
|---|
| 221 |
"emailbody" => _("Email body."), |
|---|
| 222 |
"emaildateformat" => _("Load date format config for Voicemail mail."), |
|---|
| 223 |
"emailsubject" => _("Email subject"), |
|---|
| 224 |
"maxsilence" => _("How many seconds of silence before we end the recording"), |
|---|
| 225 |
"envelope" => _("Turn on/off envelope playback before message playback. [ON by default] This does NOT affect option 3,3 from the advanced options menu."), |
|---|
| 226 |
"exitcontext" => _("Context to check for handling * or 0 calls to operator. \"Operator Context\""), |
|---|
| 227 |
"expungeonhangup" => _("Expunge on exit."), |
|---|
| 228 |
"externnotify" => _("External Voicemail notify application."), |
|---|
| 229 |
"externpass" => _("External password changing command (overrides externpassnotify)."), |
|---|
| 230 |
"externpassnotify" => _("Command specified runs after a user changes his password."), |
|---|
| 231 |
"forcegreetings" => _("Force new user to record greetings (the same as forcename, except for recording greetings). The default is \"no\"."), |
|---|
| 232 |
"forcename" => _("Force a new user to record their name. A new user is determined by the password being the same as the mailbox number. The default is \"no\"."), |
|---|
| 233 |
"format" => _("Formats for writing Voicemail. Note that when using IMAP storage for Voicemail, only the first format specified will be used."), |
|---|
| 234 |
"fromstring" => _("From: string for email"), |
|---|
| 235 |
"imapclosetimeout" => _("For IMAP storage"), |
|---|
| 236 |
"imapflags" => _("IMAP server flags."), |
|---|
| 237 |
"imapfolder" => _("IMAP Voicemail folder."), |
|---|
| 238 |
"imapgreetings" => _("If using IMAP storage, specify whether Voicemail greetings should be stored via IMAP. If no, then greetings are stored as if IMAP storage were not enabled"), |
|---|
| 239 |
"greetingsfolder" => _("(yes/no) If imapgreetings=yes, then specify which folder to store your greetings in. If you do not specify a folder, then INBOX will be used."), |
|---|
| 240 |
"imapopentimeout" => _("For IMAP storage - TCP open timeout in seconds"), |
|---|
| 241 |
"imapparentfolder" => _("Set the parent folder (default is to have no parent folder set)."), |
|---|
| 242 |
"imapport" => _("IMAP server port."), |
|---|
| 243 |
"imapreadtimeout" => _("For IMAP storage - TCP read timeout in seconds"), |
|---|
| 244 |
"imapserver" => _("IMAP server address."), |
|---|
| 245 |
"imapwritetimeout" => _("For IMAP storage - TCP write timeout in seconds"), |
|---|
| 246 |
"listen-control-forward-key" => _("Customize the key that fast-forwards message playback"), |
|---|
| 247 |
"listen-control-pause-key" => _("Customize the key that pauses/unpauses message playback"), |
|---|
| 248 |
"listen-control-restart-key" => _("Customize the key that restarts message playback"), |
|---|
| 249 |
"listen-control-reverse-key" => _("Customize the key that rewinds message playback"), |
|---|
| 250 |
"listen-control-stop-key" => _("Customize the key that stops message playback"), |
|---|
| 251 |
"mailcmd" => _("Mail command."), |
|---|
| 252 |
"maxgreet" => _("Max message greeting length."), |
|---|
| 253 |
"maxlogins" => _("Max failed login attempts."), |
|---|
| 254 |
"maxmessage" => _("Max message time length."), |
|---|
| 255 |
"maxsecs" => _("Max message time length."), |
|---|
| 256 |
"maxmsg" => _("Maximum number of messages per folder. If not specified, a default value (100) is used. Maximum value for this option is 9999."), |
|---|
| 257 |
"minsecs" => _("Min message time length - maxsilence should be less than minsecs or you may get empty messages."), |
|---|
| 258 |
"moveheard" => _("Move heard messages to the 'Old' folder automatically. Defaults to on."), |
|---|
| 259 |
"nextaftercmd" => _("Skip to the next message after save/delete."), |
|---|
| 260 |
"obdcstorage" => _("The value of odbcstorage is the database connection configured in res_odbc.conf."), |
|---|
| 261 |
"odbctable" => _("The default table for ODBC Voicemail storage is voicemessages."), |
|---|
| 262 |
"operator" => _("Operator break. Allow sender to hit 0 before/after/during leaving a Voicemail to reach an operator [OFF by default]"), |
|---|
| 263 |
"pagerbody" => _("Body of message sent to pager."), |
|---|
| 264 |
"pagerfromstring" => _("From: string sent to pager."), |
|---|
| 265 |
"pagersubject" => _("Subject sent to pager."), |
|---|
| 266 |
"pbxskip" => _("Skip the \"[PBX]:\" string from the message title"), |
|---|
| 267 |
"pollfreq" => _("If the \"pollmailboxes\" option is enabled, this option sets the polling frequency. The default is once every 30 seconds."), |
|---|
| 268 |
"pollmailboxes" => _("If mailboxes are changed anywhere outside of app_voicemail, then this option must be enabled for MWI to work. This enables polling mailboxes for changes. Normally, it will expect that changes are only made when someone called in to one of the Voicemail applications. Examples of situations that would require this option are web interfaces to Voicemail or an email client in the case of using IMAP storage."), |
|---|
| 269 |
"review" => _("Allow sender to review/rerecord their message before saving it [OFF by default]"), |
|---|
| 270 |
"saycid" => _("Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left. If not described, or set to no, it will be in the envelope."), |
|---|
| 271 |
"sayduration" => _("Turn on/off saying duration information before the message playback. [ON by default]"), |
|---|
| 272 |
"saydurationm" => _("Specify in minutes the minimum duration to say. Default is 2 minutes."), |
|---|
| 273 |
"searchcontexts" => _("Yes to search all contexts, no to search current context (if one is not specified)."), |
|---|
| 274 |
"sendvoicemail" => _("Send Voicemail message. If not listed, sending messages from inside Voicemail will not be permitted."), |
|---|
| 275 |
"serveremail" => _("Who the e-mail notification should appear to come from"), |
|---|
| 276 |
"silencethreshold" => _("Silence threshold (what we consider silence: the lower, the more sensitive)"), |
|---|
| 277 |
"skipms" => _("How many milliseconds to skip forward/back when rew/ff in message playback"), |
|---|
| 278 |
"smdienable" => _("Enable Simple Message Desk Interface (SMDI) integration"), |
|---|
| 279 |
"smdiport" => _("Valid port as specified in smdi.conf for using smdi for external notification."), |
|---|
| 280 |
"tempgreetwarn" => _("Temporary greeting reminder."), |
|---|
| 281 |
"usedirectory" => _("Permit finding entries for forward/compose from the directory"), |
|---|
| 282 |
"userscontext" => _("User context is where entries from users.conf are registered. The default value is 'default'"), |
|---|
| 283 |
"vm-mismatch" => _("Customize which sound file is used instead of the default prompt that says: \"The passwords you entered and re-entered did not match. Please try again.\""), |
|---|
| 284 |
"vm-newpassword" => _("Customize which sound file is used instead of the default prompt that says: \"Please enter your new password followed by the pound key.\""), |
|---|
| 285 |
"vm-passchanged" => _("Customize which sound file is used instead of the default prompt that says: \"Your password has been changed.\""), |
|---|
| 286 |
"vm-password" => _("Customize which sound file is used instead of the default prompt that says: \"password\""), |
|---|
| 287 |
"vm-reenterpassword" => _("Customize which sound file is used instead of the default prompt that says: \"Please re-enter your password followed by the pound key\""), |
|---|
| 288 |
"volgain" => _("Emails bearing the Voicemail may arrive in a volume too quiet to be heard. This parameter allows you to specify how much gain to add to the message when sending a Voicemail. NOTE: sox must be installed for this option to work.") |
|---|
| 289 |
), |
|---|
| 290 |
"account" => array("pwd" => _("This is the password used to access the Voicemail system.<br /><br />This password can only contain numbers.<br /><br />A user can change the password you enter here after logging into the Voicemail system (*98) with a phone."), |
|---|
| 291 |
"attach" => _("Option to attach Voicemails to email."), |
|---|
| 292 |
"attachfmt" => _("Which format of audio file to attach to the email."), |
|---|
| 293 |
"backupdeleted" => _("No. of deleted messages saved per mailbox (can be a number or yes/no, yes meaning MAXMSG, no meaning 0)."), |
|---|
| 294 |
"callback" => _("Context to call back from; if not listed, calling the sender back will not be permitted."), |
|---|
| 295 |
"delete" => _("After notification, the Voicemail is deleted from the server. [per-mailbox only] This is intended for use with users who wish to receive their Voicemail ONLY by email. Note: deletevoicemail is provided as an equivalent option for Realtime configuration."), |
|---|
| 296 |
"dialout" => _("Context to dial out from [option 4 from the advanced menu] if not listed, dialing out will not be permitted."), |
|---|
| 297 |
"email" => _("The email address that Voicemails are sent to."), |
|---|
| 298 |
"envelope" => _("Turn on/off envelope playback before message playback. [ON by default] This does NOT affect option 3,3 from the advanced options menu."), |
|---|
| 299 |
"exitcontext" => _("Context to check for handling * or 0 calls to operator. \"Operator Context\""), |
|---|
| 300 |
"forcegreetings" => _("Force new user to record greetings (the same as forcename, except for recording greetings). The default is \"no\"."), |
|---|
| 301 |
"forcename" => _("Force a new user to record their name. A new user is determined by the password being the same as the mailbox number. The default is \"no\"."), |
|---|
| 302 |
"fullname" => _("Name of Voicemail account"), |
|---|
| 303 |
"hidefromdir" => _("Hide this mailbox from the directory produced by app_directory. The default is \"no\"."), |
|---|
| 304 |
"imappassword" => _("IMAP password."), |
|---|
| 305 |
"imapuser" => _("IMAP user."), |
|---|
| 306 |
"language" => _("Asterisk language code"), |
|---|
| 307 |
"maxmsg" => _("Maximum number of messages per folder. If not specified, a default value (100) is used. Maximum value for this option is 9999."), |
|---|
| 308 |
"maxmessage" => _("Max message time length."), |
|---|
| 309 |
"maxsecs" => _("Max message time length."), |
|---|
| 310 |
"moveheard" => _("Move heard messages to the 'Old' folder automatically. Defaults to on."), |
|---|
| 311 |
"name" => _("Name of account/user"), |
|---|
| 312 |
"operator" => _("Operator break. Allow sender to hit 0 before/after/during leaving a Voicemail to reach an operator [OFF by default]"), |
|---|
| 313 |
"pager" => _("Pager/mobile email address that short Voicemail notifications are sent to."), |
|---|
| 314 |
"review" => _("Allow sender to review/rerecord their message before saving it [OFF by default]"), |
|---|
| 315 |
"saycid" => _("Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left. If not described, or set to no, it will be in the envelope."), |
|---|
| 316 |
"sayduration" => _("Turn on/off saying duration information before the message playback. [ON by default]"), |
|---|
| 317 |
"saydurationm" => _("Specify in minutes the minimum duration to say. Default is 2 minutes."), |
|---|
| 318 |
"sendvoicemail" => _("Send Voicemail message. If not listed, sending messages from inside Voicemail will not be permitted."), |
|---|
| 319 |
"serveremail" => _("Who the e-mail notification should appear to come from"), |
|---|
| 320 |
"tempgreetwarn" => _("Remind the user that their temporary greeting is set"), |
|---|
| 321 |
"tz" => _("Timezone from zonemessages context. Irrelevant if envelope=no."), |
|---|
| 322 |
"vmcontext" => _("This is the Voicemail Context which is normally set to default. Do not change unless you understand the implications."), |
|---|
| 323 |
"volgain" => _("Emails bearing the Voicemail may arrive in a volume too quiet to be heard. This parameter allows you to specify how much gain to add to the message when sending a Voicemail. NOTE: sox must be installed for this option to work."), |
|---|
| 324 |
"callmenum" => _("Call me number. Can be used from within ARI.") |
|---|
| 325 |
) |
|---|
| 326 |
); |
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 |
$type = (isset($_REQUEST["type"]) && $_REQUEST["type"] != "")?$_REQUEST["type"]:"setup"; |
|---|
| 332 |
$display = (isset($_REQUEST["display"]) && $_REQUEST["display"] != "")?$_REQUEST["display"]:"voicemail"; |
|---|
| 333 |
if (isset($_REQUEST["updated"])) { |
|---|
| 334 |
if ($_REQUEST["updated"] == "true") { |
|---|
| 335 |
$update_flag = true; |
|---|
| 336 |
} else { |
|---|
| 337 |
$update_flag = false; |
|---|
| 338 |
} |
|---|
| 339 |
} else { |
|---|
| 340 |
$update_flag = null; |
|---|
| 341 |
} |
|---|
| 342 |
$action = isset($_REQUEST["action"])?$_REQUEST["action"]:""; |
|---|
| 343 |
if (isset($_REQUEST["ext"])) { |
|---|
| 344 |
$extension = $_REQUEST["ext"]; |
|---|
| 345 |
if (isset($vmail_info["activated_info"][$extension])) { |
|---|
| 346 |
$context = $vmail_info["activated_info"][$extension]; |
|---|
| 347 |
} else if (isset($vmail_info["unactivated_info"][$extension])) { |
|---|
| 348 |
$context = $vmail_info["unactivated_info"][$extension]; |
|---|
| 349 |
} else { |
|---|
| 350 |
|
|---|
| 351 |
$context = ""; |
|---|
| 352 |
$extension = ""; |
|---|
| 353 |
} |
|---|
| 354 |
} else { |
|---|
| 355 |
|
|---|
| 356 |
$context = ""; |
|---|
| 357 |
$extension = ""; |
|---|
| 358 |
} |
|---|
| 359 |
|
|---|
| 360 |
|
|---|
| 361 |
if ($action == "Go") { |
|---|
| 362 |
|
|---|
| 363 |
$action = "usage"; |
|---|
| 364 |
|
|---|
| 365 |
$extension = ""; |
|---|
| 366 |
} else if ($action == "Submit") { |
|---|
| 367 |
|
|---|
| 368 |
/* page_type can be settings, account, tz or usage. */ |
|---|
| 369 |
$action = (isset($_REQUEST["page_type"]) && !empty($_REQUEST["page_type"]))?$_REQUEST["page_type"]:"";; |
|---|
| 370 |
$need_update = true; |
|---|
| 371 |
} else { |
|---|
| 372 |
$need_update = false; |
|---|
| 373 |
} |
|---|
| 374 |
|
|---|
| 375 |
|
|---|
| 376 |
if (empty($action)) { |
|---|
| 377 |
$context = ""; |
|---|
| 378 |
$extension = ""; |
|---|
| 379 |
$need_update = false; |
|---|
| 380 |
$action = "usage"; |
|---|
| 381 |
} |
|---|
| 382 |
|
|---|
| 383 |
|
|---|
| 384 |
|
|---|
| 385 |
$rnav_list = implode("\n", $rnav_entries); |
|---|
| 386 |
|
|---|
| 387 |
$rnav_menu = "<ul name='voicemail_menu' id='voicemail_menu' style='max-width:400px;'>\n" . $rnav_list . "</ul>"; |
|---|
| 388 |
$title = voicemail_get_title($action, $context, $extension); |
|---|
| 389 |
$output = ""; |
|---|
| 390 |
$output .= "<div class='rnav'>$rnav_menu</div>"; |
|---|
| 391 |
$output .= "<div class='content'>\n"; |
|---|
| 392 |
$output .= "<form name='frm_voicemail' action='" . $_SERVER['PHP_SELF'] . "' method='post'>"; |
|---|
| 393 |
$output .= "<input type='hidden' name='type' id='type' value='$type' />"; |
|---|
| 394 |
$output .= "<input type='hidden' name='display' id='display' value='$display' />"; |
|---|
| 395 |
$output .= "<input type='hidden' name='ext' id='ext' value='$extension' />"; |
|---|
| 396 |
$output .= "<input type='hidden' name='page_type' id='page_type' value='$action' />"; |
|---|
| 397 |
|
|---|
| 398 |
$output .= "<script type='text/javascript'><!--\n"; |
|---|
| 399 |
$output .= "\n |
|---|
| 400 |
function find_in_menu(id) { |
|---|
| 401 |
var objToFind = document.getElementById(id); |
|---|
| 402 |
document.getElementById('voicemail_menu').scrollTop = objToFind.offsetTop - 2 * objToFind.offsetHeight; |
|---|
| 403 |
}"; |
|---|
| 404 |
if ($extension != "") { |
|---|
| 405 |
$output .= "\n\n" . "find_in_menu('voicemail_list_" . $extension . "');\n"; |
|---|
| 406 |
} |
|---|
| 407 |
$output .= "\n--></script>"; |
|---|
| 408 |
|
|---|
| 409 |
|
|---|
| 410 |
$sys_view_flag = empty($extension)?true:false; |
|---|
| 411 |
$settings_link = "<a" . (($sys_view_flag && $action == "settings")?" style='color:#ff9933;' ":" ") . "href='config.php?type=$type&display=$display&action=settings'>Settings</a>"; |
|---|
| 412 |
$usage_link = "<a" . (($sys_view_flag && $action == "usage")?" style='color:#ff9933;' ":" ") . "href='config.php?type=$type&display=$display&action=usage'>Usage</a>"; |
|---|
| 413 |
$tzone_link = "<a" . (($sys_view_flag && $action == "tz")?" style='color:#ff9933;' ":" ") . "href='config.php?type=$type&display=$display&action=tz'>Timezone Definitions</a>"; |
|---|
| 414 |
$output .= "<table border='0' cellpadding='0.3px' cellspacing='2px'>"; |
|---|
| 415 |
$output .= "<tr><td colspan='3'>$title</td></tr>"; |
|---|
| 416 |
$output .= "<tr><td><h5>" . _("System View Links:") . " </h5></td><td colspan='2'><h5>$settings_link | $usage_link | $tzone_link</h5></td></tr>"; |
|---|
| 417 |
|
|---|
| 418 |
if ($need_update && $action != 'usage') { |
|---|
| 419 |
|
|---|
| 420 |
$args = array(); |
|---|
| 421 |
if (voicemail_update_settings($action, $context, $extension, $_REQUEST)) { |
|---|
| 422 |
$url = "config.php?type=$type&display=$display&action=$action&ext=$extension&updated=true"; |
|---|
| 423 |
redirect($url); |
|---|
| 424 |
} else { |
|---|
| 425 |
$url = "config.php?type=$type&display=$display&action=$action&ext=$extension&updated=false"; |
|---|
| 426 |
redirect($url); |
|---|
| 427 |
} |
|---|
| 428 |
} |
|---|
| 429 |
switch ($action) { |
|---|
| 430 |
case "tz": |
|---|
| 431 |
|
|---|
| 432 |
$settings = voicemail_get_settings($uservm, $action, $extension); |
|---|
| 433 |
$output .= "<tr><td colspan='2'><hr /></td><td></td></tr>"; |
|---|
| 434 |
$output .= "<tr><td style='max-width: 60px' colspan='2'>" . _("A timezone definition specifies how the Voicemail system announces the time.") . "</td><td></td></tr>"; |
|---|
| 435 |
$output .= "<tr><td style='max-width: 60px' colspan='2'>" . _("For example, the time a message was left will be announced according to the user's timezone on message playback.") . "</td><td></td></tr>"; |
|---|
| 436 |
$output .= "<tr><td></td><td></td></tr>"; |
|---|
| 437 |
$output .= "<tr><td style='max-width: 60px' colspan='2'><b>" . _("Entries below will be written to Voicemail configuration as-is.") . "</b></td><td></td></tr>"; |
|---|
| 438 |
$output .= "<tr><td style='max-width: 60px' colspan='2'><b>" . _("Please be sure to follow the format for timezone definitions described below.") . "</b></td></tr>"; |
|---|
| 439 |
$output .= "<tr><td colspan='2'><hr /></td><td></td></tr>"; |
|---|
| 440 |
$output .= "<tr><td><a href='#' class='info'><h4>" . _("Name") . "</h4><span>" . $tooltips["tz"]["name"] . "</span></a></td><td><a href='#' class='info'><h4>" . _("Timezone Definition") . "</h4><span>" . $tooltips["tz"]["def"] . "</span></a>"; |
|---|
| 441 |
$output .= "</td></tr>"; |
|---|
| 442 |
if (is_array($settings) && !empty($settings)) { |
|---|
| 443 |
foreach ($settings as $key => $val) { |
|---|
| 444 |
$output .= "<tr>"; |
|---|
| 445 |
$output .= "<td>$key</td>"; |
|---|
| 446 |
$output .= "<td><input size='50' type='text' name='tz__$key' id='tz__$key' tabindex='1' value=\"$val\" />"; |
|---|
| 447 |
$output .= " <input type='checkbox' name='tzdel__$key' id='tzdel__$key' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . $tooltips["tz"]["del"] . "</span></a></td></tr>"; |
|---|
| 448 |
} |
|---|
| 449 |
} |
|---|
| 450 |
$output .= "<tr><td coslpan='2'></td></tr>"; |
|---|
| 451 |
$output .= "<tr><td><a href='#' class='info'><h4>" . _("New Name") . "</h4><span>" . $tooltips["tz"]["name"] . "</span></a></td><td><a href='#' class='info'><h4>" . _("New Timezone Definition") . "</h4><span>" . $tooltips["tz"]["def"] . "</span></a></td>"; |
|---|
| 452 |
$output .= "<tr><td><input size='10' type='text' name='tznew_name' id='tznew_name' tabindex='1' value='' /></td>"; |
|---|
| 453 |
$output .= "<td><input size='50' type='text' name='tznew_def' id='tznew_def' tabindex='1' value='' /></td></tr>"; |
|---|
| 454 |
|
|---|
| 455 |
$update_notice = ($update_flag == false)?" <b><u>UPDATE FAILED</u></b>":""; |
|---|
| 456 |
$update_notice = ($update_flag == true)?" <b><u>UPDATE COMPLETED</u></b>":""; |
|---|
| 457 |
$output .= "<tr><td></td><td colspan='2'><input type='submit' name='action' id='action' value='Submit' />" . $update_notice . "</td></tr>"; |
|---|
| 458 |
|
|---|
| 459 |
$output .= "<tr><td colspan='2'><hr /></td></tr>"; |
|---|
| 460 |
$output .= "<tr><td style='max-width: 60px' colspan='2'>" . _("Timezone definition format is: ") . " <b style='font-family:courier;'>" . _("timezone|values") . "</b></td><td></td></tr>"; |
|---|
| 461 |
$output .= "<tr><td style='max-width: 60px' colspan='2'><br /><b>" . _("<i>Timezones</i> are listed in /usr/share/zoneinfo") . "</td></tr>"; |
|---|
| 462 |
$output .= "<tr><td style='max-width: 60px' colspan='2'><b>" . _("The <i>values</i> supported in the timezone definition string include:") . "</b></td></tr>" . |
|---|
| 463 |
"<tr><td>" . _("'filename'") . "</td><td style='max-width: 60px' colspan='2'>" . _("The name of a sound file (the file name must be single-quoted)") . "</td></tr>" . |
|---|
| 464 |
"<tr><td>" . _("variable") . "</td><td style='max-width: 60px' colspan='2'>" . _("A variable to be substituted (see below for supported variable values)") . "</td></tr>"; |
|---|
| 465 |
$output .= "<tr><td style='max-width: 60px' colspan='2'><b>" . _("Supported <i>variables</i>:") . "</b></td></tr>" . |
|---|
| 466 |
"<tr><td style='max-width: 60px'>" . _("A or a") . "</td><td style='max-width: 60px' colspan='2'>" . _("Day of week (Saturday, Sunday, ...)") . "</td></tr>" . |
|---|
| 467 |
"<tr><td style='max-width: 60px'>" . _("B or b or h") . "</td><td style='max-width: 60px' colspan='2'>" . _("Month name (January, February, ...)") . "</td></tr>" . |
|---|
| 468 |
"<tr><td style='max-width: 60px'>" . _("d or e") . "</td><td style='max-width: 60px' colspan='2'>" . _("numeric day of month (first, second, ..., thirty-first)") . "</td></tr>" . |
|---|
| 469 |
"<tr><td style='max-width: 60px'>" . _("Y") . "</td><td style='max-width: 60px' colspan='2'>" . _("Year") . "</td></tr>" . |
|---|
| 470 |
"<tr><td style='max-width: 60px'>" . _("I or l") . "</td><td style='max-width: 60px' colspan='2'>" . _("Hour, 12 hour clock") . "</td></tr>" . |
|---|
| 471 |
"<tr><td style='max-width: 60px'>" . _("H") . "</td><td style='max-width: 60px' colspan='2'>" . _("Hour, 24 hour clock (single digit hours preceded by \"oh\")") . "</td></tr>" . |
|---|
| 472 |
"<tr><td style='max-width: 60px'>" . _("k") . "</td><td style='max-width: 60px' colspan='2'>" . _("Hour, 24 hour clock (single digit hours NOT preceded by \"oh\")") . "</td></tr>" . |
|---|
| 473 |
"<tr><td style='max-width: 60px'>" . _("M") . "</td><td style='max-width: 60px' colspan='2'>" . _("Minute, with 00 pronounced as \"o'clock\"") . "</td></tr>" . |
|---|
| 474 |
"<tr><td style='max-width: 60px'>" . _("N") . "</td><td style='max-width: 60px' colspan='2'>" . _("Minute, with 00 pronounced as \"hundred\" (US military time)") . "</td></tr>" . |
|---|
| 475 |
"<tr><td style='max-width: 60px'>" . _("P or p") . "</td><td style='max-width: 60px' colspan='2'>" . _("AM or PM") . "</td></tr>" . |
|---|
| 476 |
"<tr><td style='max-width: 60px'>" . _("Q") . "</td><td style='max-width: 60px' colspan='2'>" . _("\"today\", \"yesterday\" or ABdY") . "</td></tr>" . |
|---|
| 477 |
"<tr><td style='max-width: 60px'>" . _("q") . "</td><td style='max-width: 60px' colspan='2'>" . _("\"\" (for today), \"yesterday\", weekday, or ABdY") . "</td></tr>" . |
|---|
| 478 |
"<tr><td style='max-width: 60px'>" . _("R") . "</td><td style='max-width: 60px' colspan='2'>" . _("24 hour time, including minute") . "</td></tr>"; |
|---|
| 479 |
break; |
|---|
| 480 |
case "bsettings": |
|---|
| 481 |
case "settings": |
|---|
| 482 |
|
|---|
| 483 |
$settings = voicemail_get_settings($uservm, $action, $extension); |
|---|
| 484 |
|
|---|
| 485 |
$ast_info = engine_getinfo(); |
|---|
| 486 |
$version = $ast_info["version"]; |
|---|
| 487 |
$text_size = 40; |
|---|
| 488 |
|
|---|
| 489 |
if (!empty($extension)) { |
|---|
| 490 |
$acct_title_links = "<tr><td><h5>" . _("Account View Links:") . " </h5></td><td colspan='2'><h5><a href='config.php?type=$type&display=$display&action=bsettings&ext=$extension'>" . _("Settings") . "</a> | "; |
|---|
| 491 |
$acct_title_links .= "<a href='config.php?type=$type&display=$display&action=usage&ext=$extension'>" . _("Usage") . "</a> | <a style='color:#ff9933;' href='config.php?type=$type&display=$display&action=settings&ext=$extension'>" . _("Advanced Settings") . "</a></h5></td></tr><tr><td colspan='2'><hr /></td></tr>"; |
|---|
| 492 |
$display_settings = $acct_settings; |
|---|
| 493 |
$display_tips = $tooltips["account"]; |
|---|
| 494 |
$id_prefix = "acct"; |
|---|
| 495 |
} else { |
|---|
| 496 |
$acct_title_links = ""; |
|---|
| 497 |
$output .= "<tr><td colspan='2'><hr /></td></tr>"; |
|---|
| 498 |
$display_settings = $gen_settings; |
|---|
| 499 |
$display_tips = $tooltips["general"]; |
|---|
| 500 |
$id_prefix = "gen"; |
|---|
| 501 |
} |
|---|
| 502 |
$display_name_row = ""; |
|---|
| 503 |
if ($action == "bsettings") { |
|---|
| 504 |
|
|---|
| 505 |
$acct_title_links = "<tr><td><h5>" . _("Account View Links:") . " </h5></td><td colspan='2'><h5><a style='color:#ff9933;' href='config.php?type=$type&display=$display&action=bsettings&ext=$extension'>" . _("Settings") . "</a> | "; |
|---|
| 506 |
$acct_title_links .= "<a href='config.php?type=$type&display=$display&action=usage&ext=$extension'>" . _("Usage") . "</a> | <a href='config.php?type=$type&display=$display&action=settings&ext=$extension'>" . _("Advanced Settings") . "</a></h5></td></tr><tr><td colspan='2'><hr /></td></tr>"; |
|---|
| 507 |
|
|---|
| 508 |
$display_name = isset($settings["name"])?$settings["name"]:_("No name defined; this is configured from the Extensions or Users page."); |
|---|
| 509 |
$display_name_row = "<tr><td><a href='#' class='info'>" . _("Name") . "<span>" . $tooltips["account"]["name"] . "</span></a></td><td> " . $display_name . "</td></tr>"; |
|---|
| 510 |
|
|---|
| 511 |
unset($display_settings); |
|---|
| 512 |
$basic_settings["pwd"] = isset($settings["pwd"])?$settings["pwd"]:""; |
|---|
| 513 |
$basic_settings["email"] = isset($settings["email"])?$settings["email"]:""; |
|---|
| 514 |
$basic_settings["pager"] = isset($settings["pager"])?$settings["pager"]:""; |
|---|
| 515 |
$basic_settings["attach"] = isset($settings["attach"])?$settings["attach"]:""; |
|---|
| 516 |
$basic_settings["saycid"] = isset($settings["saycid"])?$settings["saycid"]:""; |
|---|
| 517 |
$basic_settings["envelope"] = isset($settings["envelope"])?$settings["envelope"]:""; |
|---|
| 518 |
$basic_settings["delete"] = isset($settings["delete"])?$settings["delete"]:""; |
|---|
| 519 |
$basic_settings["callmenum"] = isset($settings["callmenum"])?$settings["callmenum"]:""; |
|---|
| 520 |
unset($settings); |
|---|
| 521 |
$settings = $basic_settings; |
|---|
| 522 |
$display_settings["pwd"] = $acct_settings["pwd"]; |
|---|
| 523 |
$display_settings["email"] = $acct_settings["email"]; |
|---|
| 524 |
$display_settings["pager"] = $acct_settings["pager"]; |
|---|
| 525 |
$display_settings["attach"] = $acct_settings["attach"]; |
|---|
| 526 |
$display_settings["saycid"] = $acct_settings["saycid"]; |
|---|
| 527 |
$display_settings["envelope"] = $acct_settings["envelope"]; |
|---|
| 528 |
$display_settings["delete"] = $acct_settings["delete"]; |
|---|
| 529 |
$display_settings["callmenum"] = $acct_settings["callmenum"]; |
|---|
| 530 |
$opt_headings = $display_settings; |
|---|
| 531 |
$opt_headings["pwd"] = _("Voicemail Password"); |
|---|
| 532 |
$opt_headings["email"] = _("Email Address"); |
|---|
| 533 |
$opt_headings["pager"] = _("Pager Email Address"); |
|---|
| 534 |
$opt_headings["attach"] = _("Email Attachment"); |
|---|
| 535 |
$opt_headings["saycid"] = _("Play CID"); |
|---|
| 536 |
$opt_headings["envelope"] = _("Play Envelope"); |
|---|
| 537 |
$opt_headings["delete"] = _("Delete Voicemail"); |
|---|
| 538 |
$opt_headings["callmenum"] = _("Call-Me Number"); |
|---|
| 539 |
} |
|---|
| 540 |
$output .= $acct_title_links . $display_name_row; |
|---|
| 541 |
|
|---|
| 542 |
|
|---|
| 543 |
foreach ($display_settings as $key => $descrip) { |
|---|
| 544 |
$tooltip = isset($display_tips[$key])?$display_tips[$key]:""; |
|---|
| 545 |
$len = ($descrip["len"] > 0)?$descrip["len"]:$dlen; |
|---|
| 546 |
$id = $id_prefix . "__" . $key; |
|---|
| 547 |
if (isset($settings[$key]) || ($version >= $descrip["ver"])) { |
|---|
| 548 |
$val = isset($settings[$key])?$settings[$key]:""; |
|---|
| 549 |
unset($settings[$key]); |
|---|
| 550 |
$opt_name = ($action == "bsettings")?$opt_headings[$key]:$key; |
|---|
| 551 |
$output .= "<tr><td><a href='#' class='info'>$opt_name<span>$tooltip</span></a></td>"; |
|---|
| 552 |
|
|---|
| 553 |
if ($descrip["type"] == "flag") { |
|---|
| 554 |
switch ($val) { |
|---|
| 555 |
case "yes": |
|---|
| 556 |
$yes_selected = "checked=checked"; |
|---|
| 557 |
$no_selected = ""; |
|---|
| 558 |
$undef_selected = ""; |
|---|
| 559 |
break; |
|---|
| 560 |
case "no": |
|---|
| 561 |
$yes_selected = ""; |
|---|
| 562 |
$no_selected = "checked=checked"; |
|---|
| 563 |
$undef_selected = ""; |
|---|
| 564 |
break; |
|---|
| 565 |
default: |
|---|
| 566 |
$yes_selected = ""; |
|---|
| 567 |
$no_selected = ""; |
|---|
| 568 |
$undef_selected = "checked=checked"; |
|---|
| 569 |
break; |
|---|
| 570 |
} |
|---|
| 571 |
$output .= "<td> <input type='radio' name='$id' id='$id' tabindex='1' value='yes' $yes_selected />" . _("yes"); |
|---|
| 572 |
$output .= "<input type='radio' name='$id' id='$id' tabindex='1' value='no' $no_selected />" . _("no"); |
|---|
| 573 |
$output .= "<input type='radio' name='$id' id='$id' tabindex='1' value='undefined' $undef_selected /><a href='#' class='info'>" . _("undefined") . "<span>" . _("Selecting \"undefined\" will remove this option from the user's Voicemail configuration entry. (System default will be used.)") . "</span></a></td></tr>"; |
|---|
| 574 |
} else { |
|---|
| 575 |
$text_type = ($key == "pwd" || $key == "authpassword")?"password":"text"; |
|---|
| 576 |
$output .= "<td> <input size='$text_size' maxlength='$len' type='$text_type' name='$id' id='$id' tabindex='1' value=\"$val\" /></td></tr>"; |
|---|
| 577 |
} |
|---|
| 578 |
} |
|---|
| 579 |
unset($id); |
|---|
| 580 |
} |
|---|
| 581 |
|
|---|
| 582 |
unset($settings["enabled"]); |
|---|
| 583 |
if (is_array($settings) && !empty($settings)) { |
|---|
| 584 |
foreach ($settings as $key => $val) { |
|---|
| 585 |
$id = $id_prefix . "__" . $key; |
|---|
| 586 |
|
|---|
| 587 |
$output .= "<tr><td>$key</td>"; |
|---|
| 588 |
$output .= "<td> <input size='$text_size' type='text' name='$id' id='$id' tabindex='1' value=\"$val\" /></td></tr>"; |
|---|
| 589 |
} |
|---|
| 590 |
} |
|---|
| 591 |
$update_notice = ($update_flag == false)?" <b><u>UPDATE FAILED</u></b>":""; |
|---|
| 592 |
$update_notice = ($update_flag == true)?" <b><u>UPDATE COMPLETED</u></b>":""; |
|---|
| 593 |
$output .= "<tr><td></td><td colspan='2'> <input type='submit' name='action' id='action' value='Submit' />" . $update_notice . "</td></tr>"; |
|---|
| 594 |
break; |
|---|
| 595 |
case "usage": |
|---|
| 596 |
|
|---|
| 597 |
and individual account views. |
|---|
| 598 |
*/ |
|---|
| 599 |
$scope = voicemail_get_scope($extension); |
|---|
| 600 |
if ($need_update) { |
|---|
| 601 |
voicemail_update_usage($vmail_info, $context, $extension, $_REQUEST); |
|---|
| 602 |
if (!empty($extension)) { |
|---|
| 603 |
$url = "config.php?type=$type&display=$display&ext=$extension&action=$action&updated=true"; |
|---|
| 604 |
} else { |
|---|
| 605 |
$url = "config.php?type=$type&display=$display&action=$action&updated=true"; |
|---|
| 606 |
} |
|---|
| 607 |
redirect($url); |
|---|
| 608 |
} |
|---|
| 609 |
|
|---|
| 610 |
voicemail_get_usage($vmail_info, $scope, $acts_total, $acts_act, $acts_unact, $disabled_count, |
|---|
| 611 |
$msg_total, $msg_in, $msg_other, |
|---|
| 612 |
$name, $unavail, $busy, $temp, $abandoned, |
|---|
| 613 |
$storage, |
|---|
| 614 |
$context, $extension); |
|---|
| 615 |
$lp = "<tr><td colspan='3'><br /></td></tr>"; |
|---|
| 616 |
if ($scope == "system") { |
|---|
| 617 |
$output .= "<tr><td colspan='3'><hr /></td></tr>"; |
|---|
| 618 |
$accounts_row = "<tr><td><a href='#' class='info'>" . _("Number of Accounts:") . "<span>" . _("Total ( Activated / Unactivated / Disabled )") . "</span></a></td>"; |
|---|
| 619 |
$accounts_row .= "<td> $acts_total ( $acts_act / $acts_unact / $disabled_count )</td></tr>"; |
|---|
| 620 |
$accounts_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 621 |
|
|---|
| 622 |
$msg_row = "<tr><td><a href='#' class='info'>" . _("Number of Messages:") . "<span>" . _("Total ( Messages in inboxes / Messages in other folders )") . "</span></a></td>"; |
|---|
| 623 |
$msg_row .= "<td> $msg_total ( $msg_in / $msg_other )</td>"; |
|---|
| 624 |
$msg_row .= "<td><input type='checkbox' name='del_msgs' id='del_msgs' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all messages") . "</span></a></td></tr>"; |
|---|
| 625 |
$msg_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 626 |
|
|---|
| 627 |
$name_row = "<tr><td><a href='#' class='info'>" . _("Recorded Names:") . "<span>" . _("Number of recorded name greetings") . "</span></a></td>"; |
|---|
| 628 |
$name_row .= "<td> $name</td>"; |
|---|
| 629 |
$name_row .= "<td><input type='checkbox' name='del_names' id='del_names' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all recorded names") . "</span></a></td></tr>"; |
|---|
| 630 |
$name_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 631 |
|
|---|
| 632 |
$unavail_row = "<tr><td><a href='#' class='info'>" . _("Unavailable Greetings:") . "<span>" . _("Number of recorded unavailable greetings") . "</span></a></td>"; |
|---|
| 633 |
$unavail_row .= "<td> $unavail</td>"; |
|---|
| 634 |
$unavail_row .= "<td><input type='checkbox' name='del_unavail' id='del_unavail' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all unavailable greetings") . "</span></a></td></tr>"; |
|---|
| 635 |
$unavail_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 636 |
|
|---|
| 637 |
$busy_row = "<tr><td><a href='#' class='info'>" . _("Busy Greetings:") . "<span>" . _("Number of recorded busy greetings") . "</span></a></td>"; |
|---|
| 638 |
$busy_row .= "<td> $busy</td>"; |
|---|
| 639 |
$busy_row .= "<td><input type='checkbox' name='del_busy' id='del_busy' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all busy greetings") . "</span></a></td></tr>"; |
|---|
| 640 |
$busy_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 641 |
|
|---|
| 642 |
$temp_row = "<tr><td><a href='#' class='info'>" . _("Temporary Greetings:") . "<span>" . _("Number of recorded temporary greetings") . "</span></a></td>"; |
|---|
| 643 |
$temp_row .= "<td> $temp</td>"; |
|---|
| 644 |
$temp_row .= "<td><input type='checkbox' name='del_temp' id='del_temp' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all temporary greetings") . "</span></a></td></tr>"; |
|---|
| 645 |
$temp_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 646 |
|
|---|
| 647 |
$abandoned_row = "<tr><td><a href='#' class='info'>" . _("Abandoned Greetings:") . "<span>" . _("Number of abandoned greetings. Such greetings were recorded by the user but were NOT accepted, so the sound file remains on disk but is not used as a greeting.") . "</span></a></td>"; |
|---|
| 648 |
$abandoned_row .= "<td> $abandoned</td>"; |
|---|
| 649 |
$abandoned_row .= "<td><input type='checkbox' name='del_abandoned' id='del_abandoned' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all abandoned greetings (> 1 day old)") . "</span></a></td></tr>"; |
|---|
| 650 |
$abandoned_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 651 |
|
|---|
| 652 |
$storage_row = "<tr><td><a href='#' class='info'>" . _("Storage Used:") . "<span>" . _("Disk space currently in use by Voicemail data") . "</span></a></td>"; |
|---|
| 653 |
$storage_row .= "<td> $storage</td>"; |
|---|
| 654 |
$storage_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 655 |
|
|---|
| 656 |
$output .= $lp . $accounts_row . $msg_row . $name_row . $unavail_row . $busy_row . $temp_row . $abandoned_row . $storage_row; |
|---|
| 657 |
} else { |
|---|
| 658 |
$accounts_row = ""; |
|---|
| 659 |
$output .= "<tr><td><h5>" . _("Account View Links:") . "</h5></td><td colspan='3'><h5><a href='config.php?type=$type&display=$display&action=bsettings&ext=$extension'>" . _("Settings") . "</a> | "; |
|---|
| 660 |
$output .= "<a style='color:#ff9933;' href='config.php?type=$type&display=$display&action=usage&ext=$extension'>" . _("Usage") . "</a> | <a href='config.php?type=$type&display=$display&action=settings&ext=$extension'>" . _("Advanced Settings") . "</a></h5></td></tr><tr><td colspan='3'><hr /></td></tr>"; |
|---|
| 661 |
|
|---|
| 662 |
$msg_row = "<tr><td><a href='#' class='info'>" . _("Number of Messages:") . "<span>" . _("Total ( Messages in inboxes / Messages in other folders )") . "</span></a> </td>"; |
|---|
| 663 |
$msg_row .= "<td> $msg_total ( $msg_in / $msg_other )</td>"; |
|---|
| 664 |
$msg_row .= "<td><input type='checkbox' name='del_msgs' id='del_msgs' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all messages") . "</span></a></td></tr>"; |
|---|
| 665 |
$msg_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 666 |
|
|---|
| 667 |
|
|---|
| 668 |
$ts = voicemail_get_greeting_timestamps($name, $unavail, $busy, $temp, $context, $extension); |
|---|
| 669 |
$name_ts = ($ts["name"] > 0)?$ts["name"]:""; |
|---|
| 670 |
$unavail_ts = ($ts["unavail"] > 0)?$ts["unavail"]:""; |
|---|
| 671 |
$busy_ts = ($ts["busy"] > 0)?$ts["busy"]:""; |
|---|
| 672 |
$temp_ts = ($ts["temp"] > 0)?$ts["temp"]:""; |
|---|
| 673 |
|
|---|
| 674 |
|
|---|
| 675 |
$name = ($name > 0)?"<a href='#' class='info'>" . _("yes") . "<span>" . _("File timestamp: ") . $name_ts . "</span></a>":_("no"); |
|---|
| 676 |
$name_row = "<tr><td><a href='#' class='info'>" . _("Recorded Name:") . "<span>" . _("Has a recorded name greeting?") . "</span></a> </td>"; |
|---|
| 677 |
$name_row .= "<td> $name</td>"; |
|---|
| 678 |
$name_row .= "<td><input type='checkbox' name='del_names' id='del_names' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove recorded name") . "</span></a> </td></tr>"; |
|---|
| 679 |
$name_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 680 |
|
|---|
| 681 |
$unavail = ($unavail > 0)?"<a href='#' class='info'>" . _("yes") . "<span>" . _("File timestamp: ") . $unavail_ts . "</span></a>":_("no"); |
|---|
| 682 |
$unavail_row = "<tr><td><a href='#' class='info'>" . _("Unavailable Greeting:") . "<span>" . _("Has a recorded unavailable greeting?") . "</span></a> </td>"; |
|---|
| 683 |
$unavail_row .= "<td> $unavail</td>"; |
|---|
| 684 |
$unavail_row .= "<td><input type='checkbox' name='del_unavail' id='del_unavail' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove unavailable greeting") . "</span></a> </td></tr>"; |
|---|
| 685 |
$unavail_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 686 |
|
|---|
| 687 |
$busy = ($busy > 0)?"<a href='#' class='info'>" . _("yes") . "<span>" . _("File timestamp: ") . $busy_ts . "</span></a>":_("no"); |
|---|
| 688 |
$busy_row = "<tr><td><a href='#' class='info'>" . _("Busy Greetings:") . "<span>" . _("Has a recorded busy greeting?") . "</span></a> </td>"; |
|---|
| 689 |
$busy_row .= "<td> $busy</td>"; |
|---|
| 690 |
$busy_row .= "<td><input type='checkbox' name='del_busy' id='del_busy' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove busy greeting") . "</span></a> </td></tr>"; |
|---|
| 691 |
$busy_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 692 |
|
|---|
| 693 |
$temp = ($temp > 0)?"<a href='#' class='info'>" . _("yes") . "<span>" . _("File timestamp: ") . $temp_ts . "</span></a>":_("no"); |
|---|
| 694 |
$temp_row = "<tr><td><a href='#' class='info'>" . _("Temporary Greeting:") . "<span>" . _("Has a recorded temporary greeting?") . "</span></a> </td>"; |
|---|
| 695 |
$temp_row .= "<td> $temp</td>"; |
|---|
| 696 |
$temp_row .= "<td><input type='checkbox' name='del_temp' id='del_temp' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove temporary greeting") . "</span></a></td></tr>"; |
|---|
| 697 |
$temp_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 698 |
|
|---|
| 699 |
|
|---|
| 700 |
$abandoned_row = "<tr><td><a href='#' class='info'>" . _("Abandoned Greetings:") . "<span>" . _("Number of abandoned greetings. Such greetings were recorded by the user but were NOT accepted, so the sound file remains on disk but is not used as a greeting.") . "</span></a></td>"; |
|---|
| 701 |
$abandoned_row .= "<td> $abandoned</td>"; |
|---|
| 702 |
$abandoned_row .= "<td><input type='checkbox' name='del_abandoned' id='del_abandoned' value='true' /> <a href='#' class='info'>" . _("Delete") . "<span>" . _("Remove all abandoned greetings (> 1 day old)") . "</span></a></td></tr>"; |
|---|
| 703 |
$abandoned_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 704 |
|
|---|
| 705 |
$storage_row = "<tr><td><a href='#' class='info'>" . _("Storage Used") . "<span>" . _("Disk space currently in use by Voicemail data") . "</span></a></td>"; |
|---|
| 706 |
$storage_row .= "<td> $storage</td>"; |
|---|
| 707 |
$storage_row .= "<tr><td colspan='3'><hr style='height:0.1px;' /></td></tr>"; |
|---|
| 708 |
|
|---|
| 709 |
$output .= $lp . $msg_row . $name_row . $unavail_row . $busy_row . $temp_row . $abandoned_row . $storage_row; |
|---|
| 710 |
} |
|---|
| 711 |
|
|---|
| 712 |
$update_notice = ($update_flag == false)?" <b><u>UPDATE FAILED</u></b>":""; |
|---|
| 713 |
$update_notice = ($update_flag == true)?" <b><u>UPDATE COMPLETED</u></b>":""; |
|---|
| 714 |
$output .= "<tr><td></td><td colspan='2'> <input type='submit' name='action' id='action' value='Submit' />" . $update_notice . "</td></tr>"; |
|---|
| 715 |
break; |
|---|
| 716 |
default: |
|---|
| 717 |
break; |
|---|
| 718 |
} |
|---|
| 719 |
|
|---|
| 720 |
$output .= "</table>"; |
|---|
| 721 |
$output .= "</form>"; |
|---|
| 722 |
|
|---|
| 723 |
echo $output; |
|---|
| 724 |
?> |
|---|
| 725 |
|
|---|