Changeset 6447
- Timestamp:
- 08/24/08 16:54:13 (5 years ago)
- Files:
-
- modules/branches/2.5/queues/functions.inc.php (modified) (6 diffs)
- modules/branches/2.5/queues/module.xml (modified) (2 diffs)
- modules/branches/2.5/queues/page.queues.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/queues/functions.inc.php
r6439 r6447 2 2 3 3 class queues_conf { 4 5 var $_queues_general = array(); 6 4 7 // return an array of filenames to write 5 8 // files named like pinset_N 6 9 function get_filename() { 7 return "queues_additional.conf"; 10 $files = array( 11 'queues_additional.conf', 12 'queues_general_additional.conf', 13 ); 14 return $files; 8 15 } 9 16 10 17 // return the output that goes in each of the files 11 function generateConf() { 18 function generateConf($file) { 19 global $version; 20 21 switch ($file) { 22 case 'queues_additional.conf': 23 return $this->generate_queues_additional($version); 24 break; 25 case 'queues_general_additional.conf': 26 return $this->generate_queues_general_additional($version); 27 break; 28 } 29 } 30 31 function addQueuesGeneral($key, $value) { 32 $this->_queues_general[] = array('key' => $key, 'value' => $value); 33 } 34 35 function generate_queues_additional($ast_version) { 12 36 13 37 global $db; 14 global $version;15 38 16 39 $additional = ""; … … 18 41 // Asterisk 1.4 does not like blank assignments so just don't put them there 19 42 // 20 $ver12 = version_compare($ version, '1.4', 'lt');43 $ver12 = version_compare($ast_version, '1.4', 'lt'); 21 44 22 45 // legacy but in case someone was using this we will leave it … … 53 76 switch($keyword){ 54 77 case 'ringinuse': 78 case 'autofill': 55 79 break; 56 80 default: … … 104 128 return $output; 105 129 } 130 131 function generate_queues_general_additional($ast_version) { 132 $output = ''; 133 134 if (isset($this->_queues_general) && is_array($this->_queues_general)) { 135 foreach ($this->_queues_general as $values) { 136 $output .= $values['key']."=".$values['value']."\n"; 137 } 138 } 139 return $output; 140 } 141 142 143 106 144 } 107 145 … … 189 227 function queues_get_config($engine) { 190 228 global $ext; // is this the best way to pass this? 229 global $queues_conf; 230 191 231 switch($engine) { 192 232 case "asterisk": 233 234 if (isset($queues_conf) && is_a($queues_conf, "queues_conf")) { 235 $queues_conf->addQueuesGeneral('persistentmembers','yes'); 236 } 237 193 238 /* queue extensions */ 194 239 $ext->addInclude('from-internal-additional','ext-queues'); … … 355 400 array($account,'eventmemberstatus',($_REQUEST['eventmemberstatus'])?$_REQUEST['eventmemberstatus']:'no',0), 356 401 array($account,'weight',(isset($_REQUEST['weight']))?$_REQUEST['weight']:'0',0), 402 array($account,'autofill',(isset($_REQUEST['autofill']))?'yes':'no',0), 357 403 ); 358 404 modules/branches/2.5/queues/module.xml
r6441 r6447 2 2 <rawname>queues</rawname> 3 3 <name>Queues</name> 4 <version>2.5. 2.4</version>4 <version>2.5.3</version> 5 5 <type>setup</type> 6 6 <category>Inbound Call Control</category> … … 9 9 </description> 10 10 <changelog> 11 *2.5.3* #3098 WARNING: subtle queue behavior might change: set persistenetmembers=yes so dynamic agents are retained on asterisk restarting, and added option for autofill 11 12 *2.5.2.4* #3069 add queue weight option to queues 12 13 *2.5.2.3* #3083, setting ringinuse causes transfered call to keep agent as unavailable, removing since it is not needed for FreePBX standard agents modules/branches/2.5/queues/page.queues.php
r6440 r6447 31 31 $qregex = isset($_REQUEST['qregex'])?$_REQUEST['qregex']:''; 32 32 $weight = isset($_REQUEST['weight'])?$_REQUEST['weight']:'0'; 33 $autofill = isset($_REQUEST['autofill'])?$_REQUEST['autofill']:'no'; 33 34 34 35 … … 560 561 </td> 561 562 </tr> 563 564 <tr> 565 <td><a href="#" class="info"><?php echo _("Autofill:")?><span><?php echo _("Starting with Asterisk 1.4, if this is checked, and multiple agents are available, Asterisk will send one call to each waiting agent (depending on the ring strategy). Otherwise, it will hold all calls while it tries to find an agent for the top call in the queue making other calls wait. This was the behavior in Asterisk 1.2 and has no effect in 1.2. See Asterisk documentation for more details of this feature.")?></span></a></td> 566 <td> 567 <input name="autofill" type="checkbox" value="1" <?php echo (isset($autofill) && $autofill == 'yes' ? 'checked' : ''); ?> tabindex="<?php echo ++$tabindex;?>"/> 568 </td> 569 </tr> 562 570 563 571 <tr>
