| 1 |
<?php |
|---|
| 2 |
// This file is part of FreePBX. |
|---|
| 3 |
// |
|---|
| 4 |
// FreePBX is free software: you can redistribute it and/or modify |
|---|
| 5 |
// it under the terms of the GNU General Public License as published by |
|---|
| 6 |
// the Free Software Foundation, either version 2 of the License, or |
|---|
| 7 |
// (at your option) any later version. |
|---|
| 8 |
// |
|---|
| 9 |
// FreePBX is distributed in the hope that it will be useful, |
|---|
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 |
// GNU General Public License for more details. |
|---|
| 13 |
// |
|---|
| 14 |
// You should have received a copy of the GNU General Public License |
|---|
| 15 |
// along with FreePBX. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 16 |
// |
|---|
| 17 |
// Copyright (C) 2004 Coalescent Systems Inc. (info@coalescentsystems.ca) |
|---|
| 18 |
// |
|---|
| 19 |
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); } |
|---|
| 20 |
|
|---|
| 21 |
$action = isset($_REQUEST['action'])?$_REQUEST['action']:''; |
|---|
| 22 |
$tabindex = 0; |
|---|
| 23 |
|
|---|
| 24 |
$cm =& cronmanager::create($db); |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
if ($action == 'editglobals') { |
|---|
| 29 |
$globalfields = array( |
|---|
| 30 |
array($_REQUEST['RECORDING_STATE'],'RECORDING_STATE'), |
|---|
| 31 |
array($_REQUEST['MIXMON_FORMAT'],'MIXMON_FORMAT'), |
|---|
| 32 |
array($_REQUEST['MIXMON_DIR'],'MIXMON_DIR'), |
|---|
| 33 |
array($_REQUEST['MIXMON_POST'],'MIXMON_POST'), |
|---|
| 34 |
array($_REQUEST['RINGTIMER'],'RINGTIMER'), |
|---|
| 35 |
array(isset($_REQUEST['DIRECTORY']) ? $_REQUEST['DIRECTORY'] : 'both','DIRECTORY'), |
|---|
| 36 |
array($_REQUEST['VM_PREFIX'],'VM_PREFIX'), |
|---|
| 37 |
array($_REQUEST['VM_DDTYPE'],'VM_DDTYPE'), |
|---|
| 38 |
array($_REQUEST['VM_GAIN'],'VM_GAIN'), |
|---|
| 39 |
array($_REQUEST['DIAL_OPTIONS'],'DIAL_OPTIONS'), |
|---|
| 40 |
array($_REQUEST['TRUNK_OPTIONS'],'TRUNK_OPTIONS'), |
|---|
| 41 |
array($_REQUEST['TONEZONE'], 'TONEZONE'), |
|---|
| 42 |
array($_REQUEST['TIMEFORMAT'], 'TIMEFORMAT'), |
|---|
| 43 |
array($_REQUEST['ALLOW_SIP_ANON'], 'ALLOW_SIP_ANON'), |
|---|
| 44 |
array($_REQUEST['OPERATOR_XTN'], 'OPERATOR_XTN'), |
|---|
| 45 |
array(isset($_REQUEST['DIRECTORY_OPTS']) ? $_REQUEST['DIRECTORY_OPTS'] : "",'DIRECTORY_OPTS'), |
|---|
| 46 |
array(isset($_REQUEST['VM_OPTS']) ? $_REQUEST['VM_OPTS'] : "",'VM_OPTS'), |
|---|
| 47 |
array(isset($_REQUEST['VMX_CONTEXT']) ? $_REQUEST['VMX_CONTEXT'] : "",'VMX_CONTEXT'), |
|---|
| 48 |
array(isset($_REQUEST['VMX_PRI']) ? $_REQUEST['VMX_PRI'] : "",'VMX_PRI'), |
|---|
| 49 |
array(isset($_REQUEST['VMX_TIMEDEST_CONTEXT']) ? $_REQUEST['VMX_TIMEDEST_CONTEXT'] : "",'VMX_TIMEDEST_CONTEXT'), |
|---|
| 50 |
array(isset($_REQUEST['VMX_TIMEDEST_EXT']) ? $_REQUEST['VMX_TIMEDEST_EXT'] : "",'VMX_TIMEDEST_EXT'), |
|---|
| 51 |
array(isset($_REQUEST['VMX_TIMEDEST_PRI']) ? $_REQUEST['VMX_TIMEDEST_PRI'] : "",'VMX_TIMEDEST_PRI'), |
|---|
| 52 |
array(isset($_REQUEST['VMX_LOOPDEST_CONTEXT']) ? $_REQUEST['VMX_LOOPDEST_CONTEXT'] : "",'VMX_LOOPDEST_CONTEXT'), |
|---|
| 53 |
array(isset($_REQUEST['VMX_LOOPDEST_EXT']) ? $_REQUEST['VMX_LOOPDEST_EXT'] : "",'VMX_LOOPDEST_EXT'), |
|---|
| 54 |
array(isset($_REQUEST['VMX_LOOPDEST_PRI']) ? $_REQUEST['VMX_LOOPDEST_PRI'] : "",'VMX_LOOPDEST_PRI'), |
|---|
| 55 |
array(isset($_REQUEST['VMX_OPTS_TIMEOUT']) ? $_REQUEST['VMX_OPTS_TIMEOUT'] : "",'VMX_OPTS_TIMEOUT'), |
|---|
| 56 |
array(isset($_REQUEST['VMX_OPTS_LOOP']) ? $_REQUEST['VMX_OPTS_LOOP'] : "",'VMX_OPTS_LOOP'), |
|---|
| 57 |
array(isset($_REQUEST['VMX_OPTS_DOVM']) ? $_REQUEST['VMX_OPTS_DOVM'] : "",'VMX_OPTS_DOVM'), |
|---|
| 58 |
array(isset($_REQUEST['VMX_TIMEOUT']) ? $_REQUEST['VMX_TIMEOUT'] : "",'VMX_TIMEOUT'), |
|---|
| 59 |
array(isset($_REQUEST['VMX_REPEAT']) ? $_REQUEST['VMX_REPEAT'] : "",'VMX_REPEAT'), |
|---|
| 60 |
array(isset($_REQUEST['VMX_LOOPS']) ? $_REQUEST['VMX_LOOPS'] : "",'VMX_LOOPS'), |
|---|
| 61 |
); |
|---|
| 62 |
|
|---|
| 63 |
$compiled = $db->prepare('UPDATE globals SET value = ? WHERE variable = ?'); |
|---|
| 64 |
|
|---|
| 65 |
$result = $db->executeMultiple($compiled,$globalfields); |
|---|
| 66 |
if(DB::IsError($result)) { |
|---|
| 67 |
echo $action.'<br>'; |
|---|
| 68 |
die_freepbx($result->getMessage()); |
|---|
| 69 |
} |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
*/ |
|---|
| 73 |
$online_updates = isset($_REQUEST['online_updates'])? $_REQUEST['online_updates'] : 'yes'; |
|---|
| 74 |
$update_email = isset($_REQUEST['update_email']) ? $_REQUEST['update_email'] : ''; |
|---|
| 75 |
|
|---|
| 76 |
if ($online_updates == 'yes') { |
|---|
| 77 |
$cm->enable_updates(); |
|---|
| 78 |
} else { |
|---|
| 79 |
$cm->disable_updates(); |
|---|
| 80 |
} |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
// |
|---|
| 84 |
$cm->save_email($update_email); |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
needreload(); |
|---|
| 88 |
} |
|---|
| 89 |
|
|---|
| 90 |
$online_updates = $cm->updates_enabled() ? 'yes' : 'no'; |
|---|
| 91 |
$update_email = $cm->get_email(); |
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
$sql = "SELECT * FROM globals"; |
|---|
| 95 |
$globals = $db->getAll($sql); |
|---|
| 96 |
if(DB::IsError($globals)) { |
|---|
| 97 |
die_freepbx($globals->getMessage()); |
|---|
| 98 |
} |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
foreach ($globals as $global) { |
|---|
| 102 |
${trim($global[0])} = $global[1]; |
|---|
| 103 |
} |
|---|
| 104 |
|
|---|
| 105 |
?> |
|---|
| 106 |
<br /> |
|---|
| 107 |
<a href="<?php echo $_SERVER['PHP_SELF'] ?>?display=advancedsettings"> |
|---|
| 108 |
<img src="images/cog.png" style="border: none"> |
|---|
| 109 |
<?php echo _('Advanced Settings') ?> |
|---|
| 110 |
</a> |
|---|
| 111 |
<form name="general" action="config.php" method="post" onsubmit="return general_onsubmit();"> |
|---|
| 112 |
<input type="hidden" name="display" value="general"/> |
|---|
| 113 |
<input type="hidden" name="action" value="editglobals"/> |
|---|
| 114 |
|
|---|
| 115 |
<h5><?php echo _("Dialing Options")?></h5> |
|---|
| 116 |
<table> |
|---|
| 117 |
<tr><td> |
|---|
| 118 |
<a href=# class="info"><?php echo _("Asterisk Dial command options:")?><span> |
|---|
| 119 |
<?php echo _("t: Allow the called user to transfer the call by hitting #")?><br> |
|---|
| 120 |
<?php echo _("T: Allow the calling user to transfer the call by hitting #")?><br> |
|---|
| 121 |
<?php echo _("r: Generate a ringing tone for the calling party")?><br> |
|---|
| 122 |
<?php echo _("x or w: Allow the called user to start recording using One-Touch Recording")?><br> |
|---|
| 123 |
<?php echo _("X or W: Allow the calling user to start recording using One-Touch Recording")?><br> |
|---|
| 124 |
<?php echo _("Choose automixmon (x/X) or automon (w/W) for One-Touch Recording in Advanced Settings")?><br> |
|---|
| 125 |
<?php echo _("See Asterisk documentation for other advanced options.")?><br> |
|---|
| 126 |
</span></a> |
|---|
| 127 |
</td><td align="right"> |
|---|
| 128 |
<input type="text" size="10" name="DIAL_OPTIONS" value="<?php echo htmlspecialchars($DIAL_OPTIONS)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 129 |
</td></tr> |
|---|
| 130 |
<tr><td> |
|---|
| 131 |
<a href=# class="info"><?php echo _("Asterisk Outbound Dial command options:")?><span> |
|---|
| 132 |
<?php echo _("t: Allow the called user to transfer the call by hitting #")?><br> |
|---|
| 133 |
<?php echo _("T: Allow the calling user to transfer the call by hitting #")?><br> |
|---|
| 134 |
<?php echo _("r: You SHOULD NOT use this option on outbound trunks")?><br> |
|---|
| 135 |
<?php echo _("x or w: Allow the called user to start recording using One-Touch Recording")?><br> |
|---|
| 136 |
<?php echo _("X or W: Allow the calling user to start recording using One-Touch Recording")?><br> |
|---|
| 137 |
<?php echo _("Choose automixmon (x/X) or automon (w/W) for One-Touch Recording in Advanced Settings")?><br> |
|---|
| 138 |
<?php echo _("See Asterisk documentation for other advanced options.")?><br> |
|---|
| 139 |
</span></a> |
|---|
| 140 |
</td><td align="right"> |
|---|
| 141 |
<input type="text" size="10" name="TRUNK_OPTIONS" value="<?php echo htmlspecialchars($TRUNK_OPTIONS)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 142 |
</td></tr> |
|---|
| 143 |
</table> |
|---|
| 144 |
|
|---|
| 145 |
<h5><?php echo _("Call Recording")?></h5> |
|---|
| 146 |
<table> |
|---|
| 147 |
<tr><td> |
|---|
| 148 |
<a href=# class="info"><?php echo _("Extension Recording Override:")?><span> |
|---|
| 149 |
<?php echo _("This will override the recording settings of all extensions/users. If enabled, the system will ignore all Record Always settings of a user and will not turn on recording. This does not effect On Demand recording controlled by the dial options 'w' and 'W' above. It does not effect other recording settings in modules such as Queues and Conferences. If you don't use recordings, setting this is beneficial to system performance as it removes the check that is otherwise done on every single call."); ?></span></a> |
|---|
| 150 |
</td><td align="right"> |
|---|
| 151 |
<select name="RECORDING_STATE" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 152 |
<option value="DISABLED" <?php echo ($RECORDING_STATE == 'DISABLED' ? 'SELECTED' : '')?>><?php echo _("Enabled")?> |
|---|
| 153 |
<option value="ENABLED" <?php echo ($RECORDING_STATE == 'ENABLED' ? 'SELECTED' : '')?>><?php echo _("Disabled")?> |
|---|
| 154 |
</select> |
|---|
| 155 |
</td></tr> |
|---|
| 156 |
<tr><td> |
|---|
| 157 |
<a href=# class="info"><?php echo _("Call recording format:")?><span> |
|---|
| 158 |
<?php echo _("Pick the format in which to save recorded calls")?> |
|---|
| 159 |
</span></a> |
|---|
| 160 |
</td><td align="right"> |
|---|
| 161 |
<select name="MIXMON_FORMAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 162 |
<option value="WAV"<?php if ($MIXMON_FORMAT == "WAV") echo " SELECTED"; ?>><?php echo _("WAV"); ?></option> |
|---|
| 163 |
<option value="wav"<?php if ($MIXMON_FORMAT == "wav") echo " SELECTED"; ?>><?php echo _("wav"); ?></option> |
|---|
| 164 |
<option value="ulaw"<?php if ($MIXMON_FORMAT == "ulaw") echo " SELECTED"; ?>><?php echo _("ulaw"); ?></option> |
|---|
| 165 |
<option value="alaw"<?php if ($MIXMON_FORMAT == "alaw") echo " SELECTED"; ?>><?php echo _("alaw"); ?></option> |
|---|
| 166 |
<option value="sln"<?php if ($MIXMON_FORMAT == "sln") echo " SELECTED"; ?>><?php echo _("sln"); ?></option> |
|---|
| 167 |
<option value="gsm"<?php if ($MIXMON_FORMAT == "gsm") echo " SELECTED"; ?>><?php echo _("gsm"); ?></option> |
|---|
| 168 |
<option value="g729"<?php if ($MIXMON_FORMAT == "g729") echo " SELECTED"; ?>><?php echo _("g729"); ?></option> |
|---|
| 169 |
</select> |
|---|
| 170 |
</td></tr> |
|---|
| 171 |
</table> |
|---|
| 172 |
|
|---|
| 173 |
<h5><?php echo _("Voicemail")?></h5> |
|---|
| 174 |
<table> |
|---|
| 175 |
<tr><td> |
|---|
| 176 |
<a href=# class="info"><?php echo _("Ringtime Default:")?><span> |
|---|
| 177 |
<?php echo _("Default number of seconds to ring phones before sending callers to voicemail. This can be set per extension/user and will have no effect on phones with no voicemail.")?><br> |
|---|
| 178 |
</span></a> |
|---|
| 179 |
</td><td align="right"> |
|---|
| 180 |
<input type="text" size="2" name="RINGTIMER" value="<?php echo htmlspecialchars($RINGTIMER)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 181 |
</td></tr> |
|---|
| 182 |
<tr><td> |
|---|
| 183 |
<a href=# class="info"><?php echo _("Direct Dial Voicemail Prefix:")?><span> |
|---|
| 184 |
<?php echo _("Prefix used to dial directly to someone's voicemail. Caution should be taken in choosing this prefix to avoid conflicts with featurecodes.")?><br> |
|---|
| 185 |
</span></a> |
|---|
| 186 |
</td><td align="right"> |
|---|
| 187 |
<input type="text" size="2" name="VM_PREFIX" value="<?php echo htmlspecialchars($VM_PREFIX)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 188 |
</td></tr> |
|---|
| 189 |
<tr><td> |
|---|
| 190 |
<a href=# class="info"><?php echo _("Direct Dial to Voicemail message type:")?><span> |
|---|
| 191 |
<?php echo _("Default message type to use when dialing direct to an extensions voicemail")?><br> |
|---|
| 192 |
</span></a> |
|---|
| 193 |
</td><td align="right"> |
|---|
| 194 |
<select name="VM_DDTYPE" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 195 |
<option value=""><?php echo _("Default"); ?></option> |
|---|
| 196 |
<option value="u"<?php if ($VM_DDTYPE == "u" || $VM_DDTYPE == "su") echo " SELECTED"; ?>><?php echo _("Unavailable"); ?></option> |
|---|
| 197 |
<option value="b"<?php if ($VM_DDTYPE == "b" || $VM_DDTYPE == "sb") echo " SELECTED"; ?>><?php echo _("Busy"); ?></option> |
|---|
| 198 |
<option value="s"<?php if ($VM_DDTYPE == "s") echo " SELECTED"; ?>><?php echo _("No Message"); ?></option> |
|---|
| 199 |
</select> |
|---|
| 200 |
</td></tr> |
|---|
| 201 |
<tr><td> |
|---|
| 202 |
<a href=# class="info"><?php echo _("Optional Voicemail Recording Gain:")?><span> |
|---|
| 203 |
<?php echo _("Use the specified amount of gain when recording the voicemail message."); ?><br><br> |
|---|
| 204 |
<?php echo _("The units are whole-number decibels (dB)."); ?></span></a> |
|---|
| 205 |
</td><td align="right"> |
|---|
| 206 |
<input type="text" size="2" name="VM_GAIN" value="<?php echo htmlspecialchars($VM_GAIN)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 207 |
</td></tr> |
|---|
| 208 |
<tr><td> |
|---|
| 209 |
<a href=# class="info"><?php echo _("Do Not Play \"please leave message after tone\" to caller")?><span><?php echo _("Check this to remove the default message \"Please leave your message after the tone. When done, hang-up, or press the pound key.\" That is played after the voicemail greeting (the s option). This applies globally to all vm boxes.")?></span></a> |
|---|
| 210 |
</td><td align="right"> |
|---|
| 211 |
<input type="checkbox" value="s" name="VM_OPTS" <?php echo (($VM_OPTS || $VM_DDTYPE == "su" || $VM_DDTYPE == "bu") ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 212 |
</td></tr> |
|---|
| 213 |
<tr><td> |
|---|
| 214 |
<a href=# class="info"><?php echo _("Operator Extension:")?><span> |
|---|
| 215 |
<?php echo _("Default number to dial when callers hit '0' from voicemail or the built in IVR directory (it has no effect on the Directory Module). This does NOT need to be an extension, it can be a Ring Group, or even an external number."); ?></span></a> |
|---|
| 216 |
</td><td align="right"> |
|---|
| 217 |
<input type="text" size="10" name="OPERATOR_XTN" value="<?php echo htmlspecialchars($OPERATOR_XTN)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 218 |
</td></tr> |
|---|
| 219 |
</table> |
|---|
| 220 |
|
|---|
| 221 |
<h5><?php echo _("Voicemail VmX Locator")?></h5> |
|---|
| 222 |
<table> |
|---|
| 223 |
<tr> |
|---|
| 224 |
<td> |
|---|
| 225 |
<a href=# class="info"><?php echo _("Timeout VM Msg:")?><span> |
|---|
| 226 |
<?php echo _("If this destination is voicemail, select whether or not to play the standard voicemail instructions or just beep."); ?></span></a>. |
|---|
| 227 |
</td> |
|---|
| 228 |
<td colspan="3" align="right"> |
|---|
| 229 |
<select name="VMX_OPTS_TIMEOUT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 230 |
<option value="" <?php echo ($VMX_OPTS_TIMEOUT == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 231 |
<option value="s" <?php echo ($VMX_OPTS_TIMEOUT == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 232 |
</select> |
|---|
| 233 |
</td> |
|---|
| 234 |
</tr> |
|---|
| 235 |
<tr> |
|---|
| 236 |
<td> |
|---|
| 237 |
<a href=# class="info"><?php echo _("Max Loop VM Msg:")?><span> |
|---|
| 238 |
<?php echo _("If this destination is voicemail, select whether or not to play the standard voicemail instructions or just beep."); ?></span></a> |
|---|
| 239 |
</td> |
|---|
| 240 |
<td colspan="3" align="right"> |
|---|
| 241 |
<select name="VMX_OPTS_LOOP" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 242 |
<option value="" <?php echo ($VMX_OPTS_LOOP == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 243 |
<option value="s" <?php echo ($VMX_OPTS_LOOP == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 244 |
</select> |
|---|
| 245 |
</td> |
|---|
| 246 |
</tr> |
|---|
| 247 |
<tr> |
|---|
| 248 |
<td> |
|---|
| 249 |
<a href=# class="info"><?php echo _("Direct VM Option")?><span> |
|---|
| 250 |
<?php echo _("If a user defined option is to go to voicemail (using the 'dovm' extension) this is the default option if not specified by the user's settings."); ?></span></a> |
|---|
| 251 |
</td> |
|---|
| 252 |
<td colspan="3" align="right"> |
|---|
| 253 |
<select name="VMX_OPTS_DOVM" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 254 |
<option value="" <?php echo ($VMX_OPTS_DOVM == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 255 |
<option value="s" <?php echo ($VMX_OPTS_DOVM == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 256 |
</select> |
|---|
| 257 |
</td> |
|---|
| 258 |
</tr> |
|---|
| 259 |
<tr> |
|---|
| 260 |
<td> |
|---|
| 261 |
<a href=# class="info"><?php echo _("Msg Timeout:")?><span> |
|---|
| 262 |
<?php echo _("Time to wait after message has played to timeout and/or repeat the message if no entry pressed."); ?></span></a> |
|---|
| 263 |
</td> |
|---|
| 264 |
<td colspan="3" align="right"> |
|---|
| 265 |
<select name="VMX_TIMEOUT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 266 |
<?php |
|---|
| 267 |
for ($i=0;$i<16;$i++) { |
|---|
| 268 |
$VMX_TIMEOUT = (!isset($VMX_TIMEOUT) || $VMX_TIMEOUT == '')?2:$VMX_TIMEOUT; |
|---|
| 269 |
?> |
|---|
| 270 |
<option value="<?php echo $i?>" <?php echo ($VMX_TIMEOUT == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 271 |
<?php |
|---|
| 272 |
} |
|---|
| 273 |
?> |
|---|
| 274 |
</select></td><td><small><?php echo _("seconds")?></small> |
|---|
| 275 |
</td> |
|---|
| 276 |
</tr> |
|---|
| 277 |
<tr> |
|---|
| 278 |
<td> |
|---|
| 279 |
<a href=# class="info"><?php echo _("Msg Play:")?><span> |
|---|
| 280 |
<?php echo _("Number of times to play the recorded message if the caller does not press any options and it times out."); ?></span></a> |
|---|
| 281 |
</td> |
|---|
| 282 |
<td colspan="3" align="right"> |
|---|
| 283 |
<select name="VMX_REPEAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 284 |
<?php |
|---|
| 285 |
for ($i=1;$i<5;$i++) { |
|---|
| 286 |
$VMX_REPEAT = (!isset($VMX_REPEAT) || $VMX_REPEAT == '')?1:$VMX_REPEAT; |
|---|
| 287 |
?> |
|---|
| 288 |
<option value="<?php echo $i?>" <?php echo ($VMX_REPEAT == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 289 |
<?php |
|---|
| 290 |
} |
|---|
| 291 |
?> |
|---|
| 292 |
</select></td><td><small><?php echo _("times")?></small> |
|---|
| 293 |
</td> |
|---|
| 294 |
</tr> |
|---|
| 295 |
<tr> |
|---|
| 296 |
<td> |
|---|
| 297 |
<a href=# class="info"><?php echo _("Error Re-tries:")?><span> |
|---|
| 298 |
<?php echo _("Number of times to play invalid options and repeat the message upon receiving an undefined option."); ?></span></a> |
|---|
| 299 |
</td> |
|---|
| 300 |
<td colspan="3" align="right"> |
|---|
| 301 |
<select name="VMX_LOOPS" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 302 |
<?php |
|---|
| 303 |
for ($i=1;$i<5;$i++) { |
|---|
| 304 |
$VMX_REPEAT = (!isset($VMX_LOOPS) || $VMX_LOOPS == '')?1:$VMX_LOOPS; |
|---|
| 305 |
?> |
|---|
| 306 |
<option value="<?php echo $i?>" <?php echo ($VMX_LOOPS == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 307 |
<?php |
|---|
| 308 |
} |
|---|
| 309 |
?> |
|---|
| 310 |
</select></td><td><small><?php echo _("times")?></small> |
|---|
| 311 |
</td> |
|---|
| 312 |
</tr> |
|---|
| 313 |
</table> |
|---|
| 314 |
|
|---|
| 315 |
<h5><?php echo _("International Settings")?></h5> |
|---|
| 316 |
<table> |
|---|
| 317 |
<tr><td> |
|---|
| 318 |
<a class="info" href="#"><?php echo _("Country Indications")?><span><?php echo _("Select which country you are in")?></span></a>: |
|---|
| 319 |
</td><td align="right"> |
|---|
| 320 |
<?php if (isset($TONEZONE) && strlen($TONEZONE)) |
|---|
| 321 |
general_display_zones($TONEZONE); |
|---|
| 322 |
else |
|---|
| 323 |
general_display_zones('us'); |
|---|
| 324 |
?> |
|---|
| 325 |
</td></tr> |
|---|
| 326 |
<tr><td> |
|---|
| 327 |
<a class="info" href="#"><?php echo _("24-hour format")?><span><?php echo _("Select Yes if you use 24-hour format or No if you are using 12-hour am/pm format")?></span></a>: |
|---|
| 328 |
</td><td align="right"> |
|---|
| 329 |
<select name="TIMEFORMAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 330 |
<option value="IMp"><?php echo _("no"); ?></option> |
|---|
| 331 |
<option value="kM" <?php echo (($TIMEFORMAT=="kM") ? 'selected="selected"' : '');?>><?php echo _("yes"); ?></option> |
|---|
| 332 |
</select> |
|---|
| 333 |
</td></tr> |
|---|
| 334 |
</table> |
|---|
| 335 |
<h5><?php echo _("Security Settings")?></h5> |
|---|
| 336 |
<table> |
|---|
| 337 |
<tr><td> |
|---|
| 338 |
<a href=# class="info"><?php echo _("Allow Anonymous Inbound SIP Calls?")?><span> |
|---|
| 339 |
<?php echo _("** WARNING **")?><br><br> |
|---|
| 340 |
<?php echo _("Setting this to 'yes' will potentially allow ANYBODY to call into your Asterisk server using the SIP protocol")?><br><br> |
|---|
| 341 |
<?php echo _("It should only be used if you fully understand the impact of allowing anonymous calls into your server")?><br> |
|---|
| 342 |
</span></a>: |
|---|
| 343 |
</td><td align="right"> |
|---|
| 344 |
<select name="ALLOW_SIP_ANON" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 345 |
<option value="no"><?php echo _("no"); ?></option> |
|---|
| 346 |
<option <?php if ($ALLOW_SIP_ANON == "yes") echo "SELECTED "?>value="yes"><?php echo _("yes"); ?></option> |
|---|
| 347 |
</select> |
|---|
| 348 |
</td></tr> |
|---|
| 349 |
</table> |
|---|
| 350 |
|
|---|
| 351 |
<h5><?php echo _("Online Updates")?></h5> |
|---|
| 352 |
<table> |
|---|
| 353 |
<tr> |
|---|
| 354 |
<td> |
|---|
| 355 |
<a href=# class="info"><?php echo _("Check for Updates")?><span> |
|---|
| 356 |
<?php echo _("Choosing Yes will result in the system automatically checking for updates nightly. The resulting information will be displayed in the dashboard and will be optionally emailed to the address below if provided.<br />This will transmit your FreePBX and Asterisk version numbers along with a unique but random identifier. This is used to provide proper update information and to track version usage to focus development and maintenance efforts. No private information is transmitted."); ?></span></a> |
|---|
| 357 |
</td> |
|---|
| 358 |
<td align=right> |
|---|
| 359 |
<select name="online_updates" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 360 |
<option value="yes" <?php echo ($online_updates == 'yes' ? 'SELECTED' : '')?>><?php echo _("Yes")?> |
|---|
| 361 |
<option value="no" <?php echo ($online_updates == 'no' ? 'SELECTED' : '')?>><?php echo _("No")?> |
|---|
| 362 |
</select> |
|---|
| 363 |
</td> |
|---|
| 364 |
</tr> |
|---|
| 365 |
<tr> |
|---|
| 366 |
<td> |
|---|
| 367 |
<a href=# class="info"><?php echo _("Update Email")?><span> |
|---|
| 368 |
<?php echo _("Email address where online updates will be sent. Leaving blank will result in no updates being sent."); ?></span></a> |
|---|
| 369 |
</td> |
|---|
| 370 |
<td> |
|---|
| 371 |
<input type="text" size="40" name="update_email" value="<?php echo htmlspecialchars($update_email)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 372 |
</td> |
|---|
| 373 |
</tr> |
|---|
| 374 |
</table> |
|---|
| 375 |
<h6> |
|---|
| 376 |
<input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 377 |
</h6> |
|---|
| 378 |
<script language="javascript"> |
|---|
| 379 |
<!-- |
|---|
| 380 |
|
|---|
| 381 |
var theForm = document.general; |
|---|
| 382 |
|
|---|
| 383 |
function hasRing (s) { |
|---|
| 384 |
if (s.indexOf('r') >= 0) { |
|---|
| 385 |
return true; |
|---|
| 386 |
} else { |
|---|
| 387 |
return false; |
|---|
| 388 |
} |
|---|
| 389 |
} |
|---|
| 390 |
|
|---|
| 391 |
function warnConfirm (theField, s) { |
|---|
| 392 |
theField.focus(); |
|---|
| 393 |
theField.select(); |
|---|
| 394 |
return confirm(s); |
|---|
| 395 |
} |
|---|
| 396 |
|
|---|
| 397 |
function general_onsubmit() { |
|---|
| 398 |
var msgInvalidSeconds = "<?php echo _('Please enter a valid Number of Seconds'); ?>"; |
|---|
| 399 |
var msgInvalidDefaultFaxEmail = "<?php echo _('Please enter a valid Fax Email'); ?>"; |
|---|
| 400 |
var msgRingOptionOutboundTrunk = "<?php echo _('You have selected the \'r\' option for your trunks. This is highly discouraged and will create problems with calls on many PRI, VoIP, ISDN and other trunks that are capable of signaling. Asterisk will generate a ringing tone until the signaling indicates the line is answered. This will result in some external IVRs being inaccessible and other strange problems.'); ?>"; |
|---|
| 401 |
|
|---|
| 402 |
defaultEmptyOK = false; |
|---|
| 403 |
if (!isInteger(theForm.RINGTIMER.value)) |
|---|
| 404 |
return warnInvalid(theForm.RINGTIMER, msgInvalidSeconds); |
|---|
| 405 |
|
|---|
| 406 |
if (hasRing(theForm.TRUNK_OPTIONS.value)) |
|---|
| 407 |
return warnConfirm(theForm.TRUNK_OPTIONS, msgRingOptionOutboundTrunk); |
|---|
| 408 |
|
|---|
| 409 |
return true; |
|---|
| 410 |
} |
|---|
| 411 |
|
|---|
| 412 |
//--> |
|---|
| 413 |
</script> |
|---|
| 414 |
</form> |
|---|
| 415 |
|
|---|
| 416 |
|
|---|