Changeset 6247
- Timestamp:
- 08/01/08 23:33:25 (5 years ago)
- Files:
-
- modules/branches/2.5/core/agi-bin/dialparties.agi (modified) (1 diff)
- modules/branches/2.5/core/module.xml (modified) (1 diff)
- modules/branches/2.5/queues/functions.inc.php (modified) (4 diffs)
- modules/branches/2.5/queues/install.php (modified) (1 diff)
- modules/branches/2.5/queues/module.xml (modified) (2 diffs)
- modules/branches/2.5/queues/page.queues.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/agi-bin/dialparties.agi
r6246 r6247 67 67 $cidname = $AGI->request['agi_calleridname']; 68 68 debug("Caller ID name is '$cidname' number is '$cidnum'", 1); 69 70 $queue_wait = get_var( $AGI, "QUEUEWAIT" ); 71 if ($queue_wait != '') { 72 $saved_cidname = get_var( $AGI, "SAVEDCIDNAME" ); 73 $elapsed = round((time() - $queue_wait)/60,0); 74 if ($saved_cidname == '') { 75 $AGI->set_variable('__SAVEDCIDNAME',$cidname); 76 $AGI->set_variable('CALLERID(name)',"M$elapsed:$cidname"); 77 } else { 78 $AGI->set_variable('CALLERID(name)',"M$elapsed:$saved_cidname"); 79 } 80 } 69 81 70 82 // From this point forward, Set KEEPCID in the channel so subsequent calls, CF, etc. retain the incoming modules/branches/2.5/core/module.xml
r6199 r6247 4 4 <category>Basic</category> 5 5 <name>Core</name> 6 <version>2.5.0alpha1. 1</version>6 <version>2.5.0alpha1.2</version> 7 7 <candisable>no</candisable> 8 8 <canuninstall>no</canuninstall> 9 9 <changelog> 10 *2.5.0alpha1.2* #2976, #2778, #2413, #2974, #2962, #2894, #2073 10 11 *2.5.0alpha1.1* #2930, #2938, #2922, #2939, #1568, #2949, #2779, #2953, #1911, #2807 11 12 *2.5.0alpha1.0* #2853, #2925, #2391, #2785, #2923, #2671, #2585, #2908, #2909, #2510, #2976, #2845, #1715, #2760, #2926, #2927, #2838, also added misc icons, links between users/devices modules/branches/2.5/queues/functions.inc.php
r6170 r6247 213 213 // line to clear this flag so that subsequent transfers can occur. 214 214 // 215 if ($q['queuewait']) { 216 $ext->add('ext-queues', $exten, '', new ext_execif('$["${QUEUEWAIT}" = ""]', 'Set', '__QUEUEWAIT=${EPOCH}')); 217 } 215 218 $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_OVERRIDE', 'BLKVM/${EXTEN}/${CHANNEL}')); 216 219 $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}')); … … 317 320 } 318 321 319 function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='no',$qregex='' ) {322 function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='no',$qregex='',$queuewait='no') { 320 323 global $db; 321 324 … … 382 385 $dest = isset($goto) ? $goto:''; 383 386 $cwignore = isset($cwignore) ? $cwignore:'0'; 387 $queuewait = isset($queuewait) ? $queuewait:'0'; 384 388 $qregex = isset($qregex) ? addslashes($qregex):''; 385 389 386 390 // Assumes it has just been deleted 387 $sql = "INSERT INTO queues_config (extension, descr, grppre, alertinfo, joinannounce_id, ringing, agentannounce_id, maxwait, password, ivr_id, dest, cwignore, qregex )388 VALUES ('$extension', '$descr', '$grppre', '$alertinfo', '$joinannounce_id', '$ringing', '$agentannounce_id', '$maxwait', '$password', '$ivr_id', '$dest', '$cwignore', '$qregex' ) ";391 $sql = "INSERT INTO queues_config (extension, descr, grppre, alertinfo, joinannounce_id, ringing, agentannounce_id, maxwait, password, ivr_id, dest, cwignore, qregex, queuewait) 392 VALUES ('$extension', '$descr', '$grppre', '$alertinfo', '$joinannounce_id', '$ringing', '$agentannounce_id', '$maxwait', '$password', '$ivr_id', '$dest', '$cwignore', '$qregex', '$queuewait') "; 389 393 $results = sql($sql); 390 394 return true; … … 588 592 $results['cwignore'] = $config['cwignore']; 589 593 $results['qregex'] = $config['qregex']; 594 $results['queuewait'] = $config['queuewait']; 590 595 } 591 596 modules/branches/2.5/queues/install.php
r6170 r6247 425 425 } 426 426 427 outn(_("checking for queuewait field..")); 428 $sql = "SELECT `queuewait` FROM queues_config"; 429 $check = $db->getRow($sql, DB_FETCHMODE_ASSOC); 430 if(DB::IsError($check)) { 431 // add new field 432 $sql = "ALTER TABLE queues_config ADD `queuewait` TINYINT( 1 ) DEFAULT 0"; 433 $result = $db->query($sql); 434 if(DB::IsError($result)) { 435 die_freepbx($result->getDebugInfo()); 436 } 437 out(_("OK")); 438 } else { 439 out(_("already exists")); 440 } 441 427 442 ?> modules/branches/2.5/queues/module.xml
r6171 r6247 2 2 <rawname>queues</rawname> 3 3 <name>Queues</name> 4 <version>2.5. 1</version>4 <version>2.5.2</version> 5 5 <type>setup</type> 6 6 <category>Inbound Call Control</category> … … 9 9 </description> 10 10 <changelog> 11 *2.5.2* #2073 add a Queue hold time CID prepend to report how long the caller has been holding 11 12 *2.5.1* #2068 recordings_id, don't list IVRs with compound messages 12 13 *2.5.0.1* #2875, #2768 modules/branches/2.5/queues/page.queues.php
r6170 r6247 27 27 $maxwait = isset($_REQUEST['maxwait'])?$_REQUEST['maxwait']:''; 28 28 $cwignore = isset($_REQUEST['cwignore'])?$_REQUEST['cwignore']:'0'; 29 $queuewait = isset($_REQUEST['queuewait'])?$_REQUEST['queuewait']:'0'; 29 30 $rtone = isset($_REQUEST['rtone'])?$_REQUEST['rtone']:'0'; 30 31 $qregex = isset($_REQUEST['qregex'])?$_REQUEST['qregex']:''; … … 98 99 $conflict_url = framework_display_extension_usage_alert($usage_arr); 99 100 } else { 100 queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo,$cwignore,$qregex );101 queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo,$cwignore,$qregex,$queuewait); 101 102 needreload(); 102 103 redirect_standard(); … … 110 111 case "edit": //just delete and re-add 111 112 queues_del($account); 112 queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo,$cwignore,$qregex );113 queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo,$cwignore,$qregex,$queuewait); 113 114 needreload(); 114 115 redirect_standard('extdisplay'); … … 207 208 208 209 <tr> 210 <td><a href="#" class="info"><?php echo _("Wait Time Prefix:")?><span><?php echo _("When set to Yes, the CID Name will be prefixed with the total wait time in the queue so the answering agent is aware how long they have waited. It will be rounded to the nearest minute, in the form of Mnn: where nn is the number of minutes")?></span></a></td> 211 <td> 212 <select name="queuewait" tabindex="<?php echo ++$tabindex;?>"> 213 <?php 214 $default = (isset($queuewait) ? $queuewait : 'no'); 215 $items = array('1'=>_("Yes"),'0'=>_("No")); 216 foreach ($items as $item=>$val) { 217 echo '<option value="'.$item.'" '. ($default == $item ? 'SELECTED' : '').'>'.$val; 218 } 219 ?> 220 </select> 221 </td> 222 </tr> 223 224 <tr> 209 225 <td><a href="#" class="info"><?php echo _("Alert Info")?><span><?php echo _('ALERT_INFO can be used for distinctive ring with SIP devices.')?></span></a>:</td> 210 226 <td><input type="text" name="alertinfo" size="30" value="<?php echo (isset($alertinfo)?$alertinfo:'') ?>" tabindex="<?php echo ++$tabindex;?>"></td>
