| 1 |
<?php |
|---|
| 2 |
//Copyright (C) 2004 Coalescent Systems Inc. (info@coalescentsystems.ca) |
|---|
| 3 |
// |
|---|
| 4 |
//This program is free software; you can redistribute it and/or |
|---|
| 5 |
//modify it under the terms of the GNU General Public License |
|---|
| 6 |
//as published by the Free Software Foundation; either version 2 |
|---|
| 7 |
//of the License, or (at your option) any later version. |
|---|
| 8 |
// |
|---|
| 9 |
//This program 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 |
$action = isset($_REQUEST['action'])?$_REQUEST['action']:''; |
|---|
| 15 |
|
|---|
| 16 |
$cm =& cronmanager::create($db); |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
if ($action == 'editglobals') { |
|---|
| 21 |
$globalfields = array( |
|---|
| 22 |
array($_REQUEST['RECORDING_STATE'],'RECORDING_STATE'), |
|---|
| 23 |
array($_REQUEST['MIXMON_FORMAT'],'MIXMON_FORMAT'), |
|---|
| 24 |
array($_REQUEST['MIXMON_DIR'],'MIXMON_DIR'), |
|---|
| 25 |
array($_REQUEST['MIXMON_POST'],'MIXMON_POST'), |
|---|
| 26 |
array($_REQUEST['RINGTIMER'],'RINGTIMER'), |
|---|
| 27 |
array($_REQUEST['FAX_RX'],'FAX_RX'), |
|---|
| 28 |
array($_REQUEST['FAX_RX_EMAIL'],'FAX_RX_EMAIL'), |
|---|
| 29 |
array($_REQUEST['FAX_RX_FROM'],'FAX_RX_FROM'), |
|---|
| 30 |
array($_REQUEST['DIRECTORY'],'DIRECTORY'), |
|---|
| 31 |
array($_REQUEST['VM_PREFIX'],'VM_PREFIX'), |
|---|
| 32 |
array($_REQUEST['VM_DDTYPE'],'VM_DDTYPE'), |
|---|
| 33 |
array($_REQUEST['VM_GAIN'],'VM_GAIN'), |
|---|
| 34 |
array($_REQUEST['DIAL_OPTIONS'],'DIAL_OPTIONS'), |
|---|
| 35 |
array($_REQUEST['TRUNK_OPTIONS'],'TRUNK_OPTIONS'), |
|---|
| 36 |
array($_REQUEST['TONEZONE'], 'TONEZONE'), |
|---|
| 37 |
array($_REQUEST['TIMEFORMAT'], 'TIMEFORMAT'), |
|---|
| 38 |
array($_REQUEST['ALLOW_SIP_ANON'], 'ALLOW_SIP_ANON'), |
|---|
| 39 |
array($_REQUEST['OPERATOR_XTN'], 'OPERATOR_XTN'), |
|---|
| 40 |
array(isset($_REQUEST['DIRECTORY_OPTS']) ? $_REQUEST['DIRECTORY_OPTS'] : "",'DIRECTORY_OPTS'), |
|---|
| 41 |
array(isset($_REQUEST['VM_OPTS']) ? $_REQUEST['VM_OPTS'] : "",'VM_OPTS'), |
|---|
| 42 |
array(isset($_REQUEST['VMX_CONTEXT']) ? $_REQUEST['VMX_CONTEXT'] : "",'VMX_CONTEXT'), |
|---|
| 43 |
array(isset($_REQUEST['VMX_PRI']) ? $_REQUEST['VMX_PRI'] : "",'VMX_PRI'), |
|---|
| 44 |
array(isset($_REQUEST['VMX_TIMEDEST_CONTEXT']) ? $_REQUEST['VMX_TIMEDEST_CONTEXT'] : "",'VMX_TIMEDEST_CONTEXT'), |
|---|
| 45 |
array(isset($_REQUEST['VMX_TIMEDEST_EXT']) ? $_REQUEST['VMX_TIMEDEST_EXT'] : "",'VMX_TIMEDEST_EXT'), |
|---|
| 46 |
array(isset($_REQUEST['VMX_TIMEDEST_PRI']) ? $_REQUEST['VMX_TIMEDEST_PRI'] : "",'VMX_TIMEDEST_PRI'), |
|---|
| 47 |
array(isset($_REQUEST['VMX_LOOPDEST_CONTEXT']) ? $_REQUEST['VMX_LOOPDEST_CONTEXT'] : "",'VMX_LOOPDEST_CONTEXT'), |
|---|
| 48 |
array(isset($_REQUEST['VMX_LOOPDEST_EXT']) ? $_REQUEST['VMX_LOOPDEST_EXT'] : "",'VMX_LOOPDEST_EXT'), |
|---|
| 49 |
array(isset($_REQUEST['VMX_LOOPDEST_PRI']) ? $_REQUEST['VMX_LOOPDEST_PRI'] : "",'VMX_LOOPDEST_PRI'), |
|---|
| 50 |
array(isset($_REQUEST['VMX_OPTS_TIMEOUT']) ? $_REQUEST['VMX_OPTS_TIMEOUT'] : "",'VMX_OPTS_TIMEOUT'), |
|---|
| 51 |
array(isset($_REQUEST['VMX_OPTS_LOOP']) ? $_REQUEST['VMX_OPTS_LOOP'] : "",'VMX_OPTS_LOOP'), |
|---|
| 52 |
array(isset($_REQUEST['VMX_OPTS_DOVM']) ? $_REQUEST['VMX_OPTS_DOVM'] : "",'VMX_OPTS_DOVM'), |
|---|
| 53 |
array(isset($_REQUEST['VMX_TIMEOUT']) ? $_REQUEST['VMX_TIMEOUT'] : "",'VMX_TIMEOUT'), |
|---|
| 54 |
array(isset($_REQUEST['VMX_REPEAT']) ? $_REQUEST['VMX_REPEAT'] : "",'VMX_REPEAT'), |
|---|
| 55 |
array(isset($_REQUEST['VMX_LOOPS']) ? $_REQUEST['VMX_LOOPS'] : "",'VMX_LOOPS'), |
|---|
| 56 |
); |
|---|
| 57 |
|
|---|
| 58 |
$compiled = $db->prepare('UPDATE globals SET value = ? WHERE variable = ?'); |
|---|
| 59 |
|
|---|
| 60 |
$result = $db->executeMultiple($compiled,$globalfields); |
|---|
| 61 |
if(DB::IsError($result)) { |
|---|
| 62 |
echo $action.'<br>'; |
|---|
| 63 |
die_freepbx($result->getMessage()); |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
*/ |
|---|
| 68 |
$online_updates = isset($_REQUEST['online_updates'])? $_REQUEST['online_updates'] : 'yes'; |
|---|
| 69 |
$update_email = isset($_REQUEST['update_email']) ? $_REQUEST['update_email'] : ''; |
|---|
| 70 |
|
|---|
| 71 |
if ($online_updates == 'yes') { |
|---|
| 72 |
$cm->enable_updates(); |
|---|
| 73 |
} else { |
|---|
| 74 |
$cm->disable_updates(); |
|---|
| 75 |
} |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
// |
|---|
| 79 |
$cm->save_email($update_email); |
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
needreload(); |
|---|
| 83 |
} |
|---|
| 84 |
|
|---|
| 85 |
$online_updates = $cm->updates_enabled() ? 'yes' : 'no'; |
|---|
| 86 |
$update_email = $cm->get_email(); |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
$sql = "SELECT * FROM globals"; |
|---|
| 90 |
$globals = $db->getAll($sql); |
|---|
| 91 |
if(DB::IsError($globals)) { |
|---|
| 92 |
die_freepbx($globals->getMessage()); |
|---|
| 93 |
} |
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
foreach ($globals as $global) { |
|---|
| 97 |
${trim($global[0])} = $global[1]; |
|---|
| 98 |
} |
|---|
| 99 |
|
|---|
| 100 |
?> |
|---|
| 101 |
|
|---|
| 102 |
<form name="general" action="config.php" method="post" onsubmit="return general_onsubmit();"> |
|---|
| 103 |
<input type="hidden" name="display" value="general"/> |
|---|
| 104 |
<input type="hidden" name="action" value="editglobals"/> |
|---|
| 105 |
|
|---|
| 106 |
<h5><?php echo _("Dialing Options")?></h5> |
|---|
| 107 |
<table> |
|---|
| 108 |
<tr><td> |
|---|
| 109 |
<a href=# class="info"><?php echo _("Asterisk Dial command options:")?><span> |
|---|
| 110 |
<?php echo _("t: Allow the called user to transfer the call by hitting #")?><br> |
|---|
| 111 |
<?php echo _("T: Allow the calling user to transfer the call by hitting #")?><br> |
|---|
| 112 |
<?php echo _("r: Generate a ringing tone for the calling party")?><br> |
|---|
| 113 |
<?php echo _("w: Allow the called user to start recording after pressing *1 (Asterisk v1.2)")?><br> |
|---|
| 114 |
<?php echo _("W: Allow the calling user to start recording after pressing *1 (Asterisk v1.2)")?><br> |
|---|
| 115 |
</span></a> |
|---|
| 116 |
</td><td align="right"> |
|---|
| 117 |
<input type="text" size="10" name="DIAL_OPTIONS" value="<?php echo htmlspecialchars($DIAL_OPTIONS)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 118 |
</td></tr> |
|---|
| 119 |
<tr><td> |
|---|
| 120 |
<a href=# class="info"><?php echo _("Asterisk Outbound Dial command options:")?><span> |
|---|
| 121 |
<?php echo _("t: Allow the called user to transfer the call by hitting #")?><br> |
|---|
| 122 |
<?php echo _("T: Allow the calling user to transfer the call by hitting #")?><br> |
|---|
| 123 |
<?php echo _("w: Allow the called user to start recording after pressing *1 (Asterisk v1.2)")?><br> |
|---|
| 124 |
<?php echo _("W: Allow the calling user to start recording after pressing *1 (Asterisk v1.2)")?><br> |
|---|
| 125 |
<?php echo _("r: You SHOULD NOT use this option on outbound trunks")?><br> |
|---|
| 126 |
</span></a> |
|---|
| 127 |
</td><td align="right"> |
|---|
| 128 |
<input type="text" size="10" name="TRUNK_OPTIONS" value="<?php echo htmlspecialchars($TRUNK_OPTIONS)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 129 |
</td></tr> |
|---|
| 130 |
</table> |
|---|
| 131 |
|
|---|
| 132 |
<h5><?php echo _("Call Recording")?></h5> |
|---|
| 133 |
<table> |
|---|
| 134 |
<tr><td> |
|---|
| 135 |
<a href=# class="info"><?php echo _("Extension Recording Override:")?><span> |
|---|
| 136 |
<?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> |
|---|
| 137 |
</td><td align="right"> |
|---|
| 138 |
<select name="RECORDING_STATE" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 139 |
<option value="ENABLED" <?php echo ($RECORDING_STATE == 'ENABLED' ? 'SELECTED' : '')?>><?php echo _("Enabled")?> |
|---|
| 140 |
<option value="DISABLED" <?php echo ($RECORDING_STATE == 'DISABLED' ? 'SELECTED' : '')?>><?php echo _("Disabled")?> |
|---|
| 141 |
</select> |
|---|
| 142 |
</td></tr> |
|---|
| 143 |
<tr><td> |
|---|
| 144 |
<a href=# class="info"><?php echo _("Call recording format:")?><span> |
|---|
| 145 |
<?php echo _("Pick the format in which to save recorded calls")?> |
|---|
| 146 |
</span></a> |
|---|
| 147 |
</td><td align="right"> |
|---|
| 148 |
<select name="MIXMON_FORMAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 149 |
<option value="WAV"<?php if ($MIXMON_FORMAT == "WAV") echo " SELECTED"; ?>><?php echo _("WAV"); ?></option> |
|---|
| 150 |
<option value="wav"<?php if ($MIXMON_FORMAT == "wav") echo " SELECTED"; ?>><?php echo _("wav"); ?></option> |
|---|
| 151 |
<option value="ulaw"<?php if ($MIXMON_FORMAT == "ulaw") echo " SELECTED"; ?>><?php echo _("ulaw"); ?></option> |
|---|
| 152 |
<option value="alaw"<?php if ($MIXMON_FORMAT == "alaw") echo " SELECTED"; ?>><?php echo _("alaw"); ?></option> |
|---|
| 153 |
<option value="sln"<?php if ($MIXMON_FORMAT == "sln") echo " SELECTED"; ?>><?php echo _("sln"); ?></option> |
|---|
| 154 |
<option value="gsm"<?php if ($MIXMON_FORMAT == "gsm") echo " SELECTED"; ?>><?php echo _("gsm"); ?></option> |
|---|
| 155 |
<option value="g729"<?php if ($MIXMON_FORMAT == "g729") echo " SELECTED"; ?>><?php echo _("g729"); ?></option> |
|---|
| 156 |
</select> |
|---|
| 157 |
</td></tr> |
|---|
| 158 |
<tr><td> |
|---|
| 159 |
<a href=# class="info"><?php echo _("Recording Location:")?><span> |
|---|
| 160 |
<?php echo _("Override the default location where asterisk will store call recordings. Include the trailing /. Be sure to set proper permissions on the directory for the asterisk user.")?><br> |
|---|
| 161 |
</span></a> |
|---|
| 162 |
</td><td align="right"> |
|---|
| 163 |
<input type="text" size="30" name="MIXMON_DIR" value="<?php echo htmlspecialchars($MIXMON_DIR)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 164 |
</td></tr> |
|---|
| 165 |
<tr><td> |
|---|
| 166 |
<a href=# class="info"><?php echo _("Run after record:")?><span> |
|---|
| 167 |
<?php echo _("An optional script to be run after the call is hungup. You can include channel and MixMon variables like \${CALLFILENAME}, \${MIXMON_FORMAT} and \${MIXMON_DIR}. To ensure that you variables are properly escaped, use the following notation: ^{MY_VAR}")?><br> |
|---|
| 168 |
</span></a> |
|---|
| 169 |
</td><td align="right"> |
|---|
| 170 |
<input type="text" size="30" name="MIXMON_POST" value="<?php echo htmlspecialchars($MIXMON_POST)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 171 |
</td></tr> |
|---|
| 172 |
</table> |
|---|
| 173 |
|
|---|
| 174 |
<h5><?php echo _("Voicemail")?></h5> |
|---|
| 175 |
<table> |
|---|
| 176 |
<tr><td> |
|---|
| 177 |
<a href=# class="info"><?php echo _("Ringtime Default:")?><span> |
|---|
| 178 |
<?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> |
|---|
| 179 |
</span></a> |
|---|
| 180 |
</td><td align="right"> |
|---|
| 181 |
<input type="text" size="2" name="RINGTIMER" value="<?php echo htmlspecialchars($RINGTIMER)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 182 |
</td></tr> |
|---|
| 183 |
<tr><td> |
|---|
| 184 |
<a href=# class="info"><?php echo _("Direct Dial Voicemail Prefix:")?><span> |
|---|
| 185 |
<?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> |
|---|
| 186 |
</span></a> |
|---|
| 187 |
</td><td align="right"> |
|---|
| 188 |
<input type="text" size="2" name="VM_PREFIX" value="<?php echo htmlspecialchars($VM_PREFIX)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 189 |
</td></tr> |
|---|
| 190 |
<tr><td> |
|---|
| 191 |
<a href=# class="info"><?php echo _("Direct Dial to Voicemail message type:")?><span> |
|---|
| 192 |
<?php echo _("Default message type to use when dialing direct to an extensions voicemail")?><br> |
|---|
| 193 |
</span></a> |
|---|
| 194 |
</td><td align="right"> |
|---|
| 195 |
<select name="VM_DDTYPE" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 196 |
<option value=""><?php echo _("Default"); ?></option> |
|---|
| 197 |
<option value="u"<?php if ($VM_DDTYPE == "u" || $VM_DDTYPE == "su") echo " SELECTED"; ?>><?php echo _("Unavailable"); ?></option> |
|---|
| 198 |
<option value="b"<?php if ($VM_DDTYPE == "b" || $VM_DDTYPE == "sb") echo " SELECTED"; ?>><?php echo _("Busy"); ?></option> |
|---|
| 199 |
<option value="s"<?php if ($VM_DDTYPE == "s") echo " SELECTED"; ?>><?php echo _("No Message"); ?></option> |
|---|
| 200 |
</select> |
|---|
| 201 |
</td></tr> |
|---|
| 202 |
<tr><td> |
|---|
| 203 |
<a href=# class="info"><?php echo _("Optional Voicemail Recording Gain:")?><span> |
|---|
| 204 |
<?php echo _("Use the specified amount of gain when recording the voicemail message."); ?><br><br> |
|---|
| 205 |
<?php echo _("The units are whole-number decibels (dB)."); ?></span></a> |
|---|
| 206 |
</td><td align="right"> |
|---|
| 207 |
<input type="text" size="2" name="VM_GAIN" value="<?php echo htmlspecialchars($VM_GAIN)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 208 |
</td></tr> |
|---|
| 209 |
<tr><td> |
|---|
| 210 |
<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> |
|---|
| 211 |
</td><td align="right"> |
|---|
| 212 |
<input type="checkbox" value="s" name="VM_OPTS" <?php echo (($VM_OPTS || $VM_DDTYPE == "su" || $VM_DDTYPE == "bu") ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 213 |
</td></tr> |
|---|
| 214 |
</table> |
|---|
| 215 |
|
|---|
| 216 |
<h5><?php echo _("Voicemail VmX Locator")?></h5> |
|---|
| 217 |
<table> |
|---|
| 218 |
<tr> |
|---|
| 219 |
<td> |
|---|
| 220 |
<a href=# class="info"><?php echo _("Default Context & Pri:")?><span> |
|---|
| 221 |
<?php echo _("Default to use if only a number/extension are provided."); ?></span></a> |
|---|
| 222 |
</td> |
|---|
| 223 |
<td align="right"><input type="text" size="18" name="VMX_CONTEXT" value="<?php echo htmlspecialchars($VMX_CONTEXT)?>" tabindex="<?php echo ++$tabindex;?>"/> <small><?php echo "context"?></small> </td> |
|---|
| 224 |
<td colspan="2" align="right"><input type="text" size="2" name="VMX_PRI" value="<?php echo htmlspecialchars($VMX_PRI)?>" tabindex="<?php echo ++$tabindex;?>"/></td><td><small><?php echo "pri"?></small></td> |
|---|
| 225 |
</tr> |
|---|
| 226 |
<tr> |
|---|
| 227 |
<td> |
|---|
| 228 |
<a href=# class="info"><?php echo _("Timeout/#-press default:")?><span> |
|---|
| 229 |
<?php echo _("This is the default location that a caller will be sent if they don't press any key (timeout) or press # which is interpreted as a timeout. Set this to 'dovm' to go to voicemail (default)."); ?></span></a> |
|---|
| 230 |
</td> |
|---|
| 231 |
<td align="right"><input type="text" size="18" name="VMX_TIMEDEST_CONTEXT" value="<?php echo htmlspecialchars($VMX_TIMEDEST_CONTEXT)?>" tabindex="<?php echo ++$tabindex;?>"/> <small><?php echo "context"?></small> </td> |
|---|
| 232 |
<td align="right"><input type="text" size="4" name="VMX_TIMEDEST_EXT" value="<?php echo htmlspecialchars($VMX_TIMEDEST_EXT)?>" tabindex="<?php echo ++$tabindex;?>"/> <small><?php echo "exten"?></small> </td> |
|---|
| 233 |
<td align="right"><input type="text" size="2" name="VMX_TIMEDEST_PRI" value="<?php echo htmlspecialchars($VMX_TIMEDEST_PRI)?>" tabindex="<?php echo ++$tabindex;?>"/></td><td><small><?php echo "pri"?></small></td> |
|---|
| 234 |
</tr> |
|---|
| 235 |
<tr> |
|---|
| 236 |
<td> |
|---|
| 237 |
<a href=# class="info"><?php echo _("Loop Exceed default:")?><span> |
|---|
| 238 |
<?php echo _("This is the default location that a caller will be sent if they press an invalid options too man times, as defined by the Maximum Loops count. Set this to 'dovm' to go to voicemail (default)."); ?></span></a> |
|---|
| 239 |
</td> |
|---|
| 240 |
<td align="right"><input type="text" size="18" name="VMX_LOOPDEST_CONTEXT" value="<?php echo htmlspecialchars($VMX_LOOPDEST_CONTEXT)?>" tabindex="<?php echo ++$tabindex;?>"/> <small><?php echo "context"?></small> </td> |
|---|
| 241 |
<td align="right"><input type="text" size="4" name="VMX_LOOPDEST_EXT" value="<?php echo htmlspecialchars($VMX_LOOPDEST_EXT)?>" tabindex="<?php echo ++$tabindex;?>"/> <small><?php echo "exten"?></small> </td> |
|---|
| 242 |
<td align="right"><input type="text" size="2" name="VMX_LOOPDEST_PRI" value="<?php echo htmlspecialchars($VMX_LOOPDEST_PRI)?>" tabindex="<?php echo ++$tabindex;?>"/></td><td><small><?php echo "pri"?></small></td> |
|---|
| 243 |
</tr> |
|---|
| 244 |
<tr> |
|---|
| 245 |
<td> |
|---|
| 246 |
<a href=# class="info"><?php echo _("Timeout VM Msg:")?><span> |
|---|
| 247 |
<?php echo _("If this destination is voicemail, select whether or not to play the standard voicemail instructions or just beep."); ?></span></a> |
|---|
| 248 |
</td> |
|---|
| 249 |
<td colspan="3" align="right"> |
|---|
| 250 |
<select name="VMX_OPTS_TIMEOUT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 251 |
<option value="" <?php echo ($VMX_OPTS_TIMEOUT == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 252 |
<option value="s" <?php echo ($VMX_OPTS_TIMEOUT == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 253 |
</select> |
|---|
| 254 |
</td> |
|---|
| 255 |
</tr> |
|---|
| 256 |
<tr> |
|---|
| 257 |
<td> |
|---|
| 258 |
<a href=# class="info"><?php echo _("Max Loop VM Msg:")?><span> |
|---|
| 259 |
<?php echo _("If this destination is voicemail, select whether or not to play the standard voicemail instructions or just beep."); ?></span></a> |
|---|
| 260 |
</td> |
|---|
| 261 |
<td colspan="3" align="right"> |
|---|
| 262 |
<select name="VMX_OPTS_LOOP" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 263 |
<option value="" <?php echo ($VMX_OPTS_LOOP == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 264 |
<option value="s" <?php echo ($VMX_OPTS_LOOP == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 265 |
</select> |
|---|
| 266 |
</td> |
|---|
| 267 |
</tr> |
|---|
| 268 |
<tr> |
|---|
| 269 |
<td> |
|---|
| 270 |
<a href=# class="info"><?php echo _("Direct VM Option")?><span> |
|---|
| 271 |
<?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> |
|---|
| 272 |
</td> |
|---|
| 273 |
<td colspan="3" align="right"> |
|---|
| 274 |
<select name="VMX_OPTS_DOVM" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 275 |
<option value="" <?php echo ($VMX_OPTS_DOVM == '' ? 'SELECTED' : '') ?>><?php echo _("Std Instructions")?> |
|---|
| 276 |
<option value="s" <?php echo ($VMX_OPTS_DOVM == 's' ? 'SELECTED' : '')?>><?php echo _("Beep Only")?> |
|---|
| 277 |
</select> |
|---|
| 278 |
</td> |
|---|
| 279 |
</tr> |
|---|
| 280 |
<tr> |
|---|
| 281 |
<td> |
|---|
| 282 |
<a href=# class="info"><?php echo _("Msg Timeout:")?><span> |
|---|
| 283 |
<?php echo _("Time to wait after message has played to timeout and/or repeat the message if no entry pressed."); ?></span></a> |
|---|
| 284 |
</td> |
|---|
| 285 |
<td colspan="3" align="right"> |
|---|
| 286 |
<select name="VMX_TIMEOUT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 287 |
<?php |
|---|
| 288 |
for ($i=0;$i<16;$i++) { |
|---|
| 289 |
$VMX_TIMEOUT = (!isset($VMX_TIMEOUT) || $VMX_TIMEOUT == '')?2:$VMX_TIMEOUT; |
|---|
| 290 |
?> |
|---|
| 291 |
<option value="<?php echo $i?>" <?php echo ($VMX_TIMEOUT == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 292 |
<?php |
|---|
| 293 |
} |
|---|
| 294 |
?> |
|---|
| 295 |
</select></td><td><small><?php echo _("seconds")?></small> |
|---|
| 296 |
</td> |
|---|
| 297 |
</tr> |
|---|
| 298 |
<tr> |
|---|
| 299 |
<td> |
|---|
| 300 |
<a href=# class="info"><?php echo _("Msg Play:")?><span> |
|---|
| 301 |
<?php echo _("Number of times to play the recorded message if the caller does not press any options and it times out."); ?></span></a> |
|---|
| 302 |
</td> |
|---|
| 303 |
<td colspan="3" align="right"> |
|---|
| 304 |
<select name="VMX_REPEAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 305 |
<?php |
|---|
| 306 |
for ($i=1;$i<5;$i++) { |
|---|
| 307 |
$VMX_REPEAT = (!isset($VMX_REPEAT) || $VMX_REPEAT == '')?1:$VMX_REPEAT; |
|---|
| 308 |
?> |
|---|
| 309 |
<option value="<?php echo $i?>" <?php echo ($VMX_REPEAT == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 310 |
<?php |
|---|
| 311 |
} |
|---|
| 312 |
?> |
|---|
| 313 |
</select></td><td><small><?php echo _("times")?></small> |
|---|
| 314 |
</td> |
|---|
| 315 |
</tr> |
|---|
| 316 |
<tr> |
|---|
| 317 |
<td> |
|---|
| 318 |
<a href=# class="info"><?php echo _("Error Re-tries:")?><span> |
|---|
| 319 |
<?php echo _("Number of times to play invalid options and repeat the message upon receiving an undefined option."); ?></span></a> |
|---|
| 320 |
</td> |
|---|
| 321 |
<td colspan="3" align="right"> |
|---|
| 322 |
<select name="VMX_LOOPS" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 323 |
<?php |
|---|
| 324 |
for ($i=1;$i<5;$i++) { |
|---|
| 325 |
$VMX_REPEAT = (!isset($VMX_LOOPS) || $VMX_LOOPS == '')?1:$VMX_LOOPS; |
|---|
| 326 |
?> |
|---|
| 327 |
<option value="<?php echo $i?>" <?php echo ($VMX_LOOPS == $i ? 'SELECTED' : '') ?>><?php echo $i?> |
|---|
| 328 |
<?php |
|---|
| 329 |
} |
|---|
| 330 |
?> |
|---|
| 331 |
</select></td><td><small><?php echo _("times")?></small> |
|---|
| 332 |
</td> |
|---|
| 333 |
</tr> |
|---|
| 334 |
</table> |
|---|
| 335 |
|
|---|
| 336 |
<h5><?php echo _("Company Directory")?></h5> |
|---|
| 337 |
<table> |
|---|
| 338 |
<tr><td> |
|---|
| 339 |
<a href=# class="info"><?php echo _("Find users in the Company Directory by:")?><span><?php echo _("The Company Directory allows a caller to spell the user's first name, last name, or both when searching for a user. This will select which of these modes are used.")?></span></a> |
|---|
| 340 |
</td><td align="right"> |
|---|
| 341 |
<select name="DIRECTORY" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 342 |
<option value="first" <?php echo ($DIRECTORY == 'first' ? 'SELECTED' : '')?>><?php echo _("first name")?> |
|---|
| 343 |
<option value="last" <?php echo ($DIRECTORY == 'last' ? 'SELECTED' : '')?>><?php echo _("last name")?> |
|---|
| 344 |
<option value="both" <?php echo ($DIRECTORY == 'both' ? 'SELECTED' : '')?>><?php echo _("first or last name")?> |
|---|
| 345 |
</select> |
|---|
| 346 |
</td></tr> |
|---|
| 347 |
<tr><td> |
|---|
| 348 |
<a href=# class="info"><?php echo _("Announce Extension:")?><span><?php echo _("Plays a message \"Please hold while I transfer you to extension xxx\" that lets the caller know what extension to use in the future when connecting from the company directory.")?></span></a> |
|---|
| 349 |
</td><td align="right"> |
|---|
| 350 |
<input type="checkbox" value="e" name="DIRECTORY_OPTS" <?php echo ($DIRECTORY_OPTS ? 'CHECKED' : '')?> tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 351 |
</td></tr> |
|---|
| 352 |
<tr><td> |
|---|
| 353 |
<a href=# class="info"><?php echo _("Operator Extension:")?><span> |
|---|
| 354 |
<?php echo _("When users hit '0' in the directory, they are put through to this number. Note that it"); ?> |
|---|
| 355 |
<?php echo _(" does NOT need to be an extension, it can be a Ring Group, or even an external number."); ?></span></a> |
|---|
| 356 |
</td><td align="right"> |
|---|
| 357 |
<input type="text" size="10" name="OPERATOR_XTN" value="<?php echo htmlspecialchars($OPERATOR_XTN)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 358 |
</td></tr> |
|---|
| 359 |
</table> |
|---|
| 360 |
|
|---|
| 361 |
<h5><?php echo _("Fax Machine")?></h5> |
|---|
| 362 |
<table> |
|---|
| 363 |
<tr><td> |
|---|
| 364 |
<a class="info" href="#"><?php echo _("Extension of fax machine for receiving faxes:")?><span><?php echo _("Select 'system' to have the system receive and email faxes.<br>Selecting 'disabled' will result in incoming calls being answered more quickly.")?></span></a> |
|---|
| 365 |
<!--<input type="text" size="8" name="FAX_RX" value="<?php echo $FAX_RX?>"/>--> |
|---|
| 366 |
</td><td align="right"> |
|---|
| 367 |
<select name="FAX_RX" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 368 |
<option value="disabled" <?php echo ($FAX_RX == 'disabled' ? 'SELECTED' : '')?>><?php echo _("disabled")?> |
|---|
| 369 |
<option value="system" <?php echo ($FAX_RX == 'system' ? 'SELECTED' : '')?>><?php echo _("system")?> |
|---|
| 370 |
<?php |
|---|
| 371 |
|
|---|
| 372 |
$devices = core_devices_list(); |
|---|
| 373 |
if (isset($devices)) { |
|---|
| 374 |
foreach ($devices as $device) { |
|---|
| 375 |
echo '<option value="'.$device[0].'" '.($FAX_RX == $device[0] ? 'SELECTED' : '').'>'.$device[1].' <'.$device[0].'>'; |
|---|
| 376 |
} |
|---|
| 377 |
} |
|---|
| 378 |
?> |
|---|
| 379 |
</select> |
|---|
| 380 |
</td></tr> |
|---|
| 381 |
<tr><td> |
|---|
| 382 |
<a class="info" href="#"><?php echo _("Email address to have faxes emailed to:")?><span><?php echo _("Email address used if 'system' has been chosen for the fax extension above.")?></span></a> |
|---|
| 383 |
</td><td align="right"> |
|---|
| 384 |
<input type="text" size="30" name="FAX_RX_EMAIL" value="<?php echo htmlspecialchars($FAX_RX_EMAIL)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 385 |
</td></tr> |
|---|
| 386 |
<tr><td> |
|---|
| 387 |
<a class="info" href="#"><?php echo _("Email address that faxes appear to come from:")?><span><?php echo _("Email address that faxes appear to come from if 'system' has been chosen for the fax extension above.")?></span></a> |
|---|
| 388 |
</td><td align="right"> |
|---|
| 389 |
<input type="text" size="30" name="FAX_RX_FROM" value="<?php echo htmlspecialchars($FAX_RX_FROM)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 390 |
</td></tr> |
|---|
| 391 |
</table> |
|---|
| 392 |
<h5><?php echo _("International Settings")?></h5> |
|---|
| 393 |
<table> |
|---|
| 394 |
<tr><td> |
|---|
| 395 |
<a class="info" href="#"><?php echo _("Country Indications")?><span><?php echo _("Select which country you are in")?></span></a>: |
|---|
| 396 |
</td><td align="right"> |
|---|
| 397 |
<?php if (isset($TONEZONE) && strlen($TONEZONE)) |
|---|
| 398 |
general_display_zones($TONEZONE); |
|---|
| 399 |
else |
|---|
| 400 |
general_display_zones('us'); |
|---|
| 401 |
?> |
|---|
| 402 |
</td></tr> |
|---|
| 403 |
<tr><td> |
|---|
| 404 |
<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>: |
|---|
| 405 |
</td><td align="right"> |
|---|
| 406 |
<select name="TIMEFORMAT" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 407 |
<option value="IMp"><?php echo _("no"); ?></option> |
|---|
| 408 |
<option value="kM" <?php echo (($TIMEFORMAT=="kM") ? 'selected="selected"' : '');?>><?php echo _("yes"); ?></option> |
|---|
| 409 |
</select> |
|---|
| 410 |
</td></tr> |
|---|
| 411 |
</table> |
|---|
| 412 |
<h5><?php echo _("Security Settings")?></h5> |
|---|
| 413 |
<table> |
|---|
| 414 |
<tr><td> |
|---|
| 415 |
<a href=# class="info"><?php echo _("Allow Anonymous Inbound SIP Calls?")?><span> |
|---|
| 416 |
<?php echo _("** WARNING **")?><br><br> |
|---|
| 417 |
<?php echo _("Setting this to 'yes' will potentially allow ANYBODY to call into your Asterisk server using the SIP protocol")?><br><br> |
|---|
| 418 |
<?php echo _("It should only be used if you fully understand the impact of allowing anonymous calls into your server")?><br> |
|---|
| 419 |
</span></a>: |
|---|
| 420 |
</td><td align="right"> |
|---|
| 421 |
<select name="ALLOW_SIP_ANON" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 422 |
<option value="no"><?php echo _("no"); ?></option> |
|---|
| 423 |
<option <?php if ($ALLOW_SIP_ANON == "yes") echo "SELECTED "?>value="yes"><?php echo _("yes"); ?></option> |
|---|
| 424 |
</select> |
|---|
| 425 |
</td></tr> |
|---|
| 426 |
</table> |
|---|
| 427 |
|
|---|
| 428 |
<h5><?php echo _("Online Updates")?></h5> |
|---|
| 429 |
<table> |
|---|
| 430 |
<tr> |
|---|
| 431 |
<td> |
|---|
| 432 |
<a href=# class="info"><?php echo _("Check for Updates")?><span> |
|---|
| 433 |
<?php echo _("Choosing Yes will result in the system automatically checking for updates nighly. The resulting infomation 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> |
|---|
| 434 |
</td> |
|---|
| 435 |
<td align=right> |
|---|
| 436 |
<select name="online_updates" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 437 |
<option value="yes" <?php echo ($online_updates == 'yes' ? 'SELECTED' : '')?>><?php echo _("Yes")?> |
|---|
| 438 |
<option value="no" <?php echo ($online_updates == 'no' ? 'SELECTED' : '')?>><?php echo _("No")?> |
|---|
| 439 |
</select> |
|---|
| 440 |
</td> |
|---|
| 441 |
</tr> |
|---|
| 442 |
<tr> |
|---|
| 443 |
<td> |
|---|
| 444 |
<a href=# class="info"><?php echo _("Update Email")?><span> |
|---|
| 445 |
<?php echo _("Email address where online updates will be sent. Leaving blank will result in no updates being sent."); ?></span></a> |
|---|
| 446 |
</td> |
|---|
| 447 |
<td> |
|---|
| 448 |
<input type="text" size="40" name="update_email" value="<?php echo htmlspecialchars($update_email)?>" tabindex="<?php echo ++$tabindex;?>"/> |
|---|
| 449 |
</td> |
|---|
| 450 |
</tr> |
|---|
| 451 |
</table> |
|---|
| 452 |
<h6> |
|---|
| 453 |
<input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>" tabindex="<?php echo ++$tabindex;?>"> |
|---|
| 454 |
</h6> |
|---|
| 455 |
<script language="javascript"> |
|---|
| 456 |
<!-- |
|---|
| 457 |
|
|---|
| 458 |
var theForm = document.general; |
|---|
| 459 |
|
|---|
| 460 |
function hasRing (s) { |
|---|
| 461 |
if (s.indexOf('r') >= 0) { |
|---|
| 462 |
return true; |
|---|
| 463 |
} else { |
|---|
| 464 |
return false; |
|---|
| 465 |
} |
|---|
| 466 |
} |
|---|
| 467 |
|
|---|
| 468 |
function warnConfirm (theField, s) { |
|---|
| 469 |
theField.focus(); |
|---|
| 470 |
theField.select(); |
|---|
| 471 |
return confirm(s); |
|---|
| 472 |
} |
|---|
| 473 |
|
|---|
| 474 |
function general_onsubmit() { |
|---|
| 475 |
var msgInvalidSeconds = "<?php echo _('Please enter a valid Number of Seconds'); ?>"; |
|---|
| 476 |
var msgInvalidDefaultFaxEmail = "<?php echo _('Please enter a valid Fax Email'); ?>"; |
|---|
| 477 |
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 signalling indicates the line is answered. This will result in some external IVRs being inaccessible and other strange problems.'); ?>"; |
|---|
| 478 |
|
|---|
| 479 |
defaultEmptyOK = false; |
|---|
| 480 |
if (!isInteger(theForm.RINGTIMER.value)) |
|---|
| 481 |
return warnInvalid(theForm.RINGTIMER, msgInvalidSeconds); |
|---|
| 482 |
|
|---|
| 483 |
// Fax email must be present if selected 'system', otherwise optional |
|---|
| 484 |
if (theForm.FAX_RX.value == "system") { |
|---|
| 485 |
defaultEmptyOK = false; |
|---|
| 486 |
} else { |
|---|
| 487 |
defaultEmptyOK = true; |
|---|
| 488 |
} |
|---|
| 489 |
if (!isEmail(theForm.FAX_RX_EMAIL.value)) |
|---|
| 490 |
return warnInvalid(theForm.FAX_RX_EMAIL, msgInvalidDefaultFaxEmail); |
|---|
| 491 |
|
|---|
| 492 |
if (hasRing(theForm.TRUNK_OPTIONS.value)) |
|---|
| 493 |
return warnConfirm(theForm.TRUNK_OPTIONS, msgRingOptionOutboundTrunk); |
|---|
| 494 |
|
|---|
| 495 |
return true; |
|---|
| 496 |
} |
|---|
| 497 |
|
|---|
| 498 |
//--> |
|---|
| 499 |
</script> |
|---|
| 500 |
</form> |
|---|
| 501 |
|
|---|
| 502 |
|
|---|