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