- Timestamp:
- 05/18/10 19:37:15 (3 years ago)
- Files:
-
- modules/branches/2.8/queues/functions.inc.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.8/queues/functions.inc.php
r9649 r9650 44 44 $ver12 = version_compare($ast_version, '1.4', 'lt'); 45 45 $ver16 = version_compare($ast_version, '1.6', 'ge'); 46 $ast_ge_14_25 = version_compare($ast_version,'1.4.25','ge'); 46 47 47 48 // legacy but in case someone was using this we will leave it … … 59 60 } 60 61 61 if ($a mp_conf['USEQUEUEDEVICE']) {62 if ($ast_ge_14_25) { 62 63 $devices = array(); 63 64 $device_results = core_devices_list('all','full',true); … … 71 72 } 72 73 } 73 if ($amp_conf['USEQUEUESTATE'] || $a mp_conf['USEQUEUEDEVICE']) {74 if ($amp_conf['USEQUEUESTATE'] || $ast_ge_14_25) { 74 75 $users = array(); 75 76 $user_results = core_users_list(); … … 152 153 } 153 154 } 154 } else if ($a mp_conf['USEQUEUEDEVICE']) {155 } else if ($ast_ge_14_25) { 155 156 foreach ($members as $member) { 156 157 preg_match("/^Local\/([\d]+)\@*/",$member,$matches); … … 200 201 return $output; 201 202 } 202 203 204 205 203 } 206 204 … … 298 296 $ast_ge_14 = version_compare($version,'1.4','ge'); 299 297 $ast_ge_16 = version_compare($version,'1.6','ge'); 298 $ast_ge_14_25 = version_compare($version,'1.4.25','ge'); 300 299 301 300 $has_extension_state = $ast_ge_16; … … 522 521 $ext->add($from_queue_exten_only, $item[0], '', new ext_setvar('RingGroupMethod', 'none')); 523 522 $ext->add($from_queue_exten_only, $item[0], '', new ext_macro('record-enable',$item[0].",IN")); 524 if ($ amp_conf['USEDIALONE'] && $has_extension_state) {523 if ($has_extension_state) { 525 524 $ext->add($from_queue_exten_only, $item[0], '', new ext_macro('dial-one',',${DIAL_OPTIONS},'.$item[0])); 526 525 } else { … … 546 545 $ext->add($context, $exten, 'a5', new ext_set('CALLBACKNUM', '${IF($[${LEN(${AMPUSER})}=0]?${CALLERID(number)}:${AMPUSER})}')); 547 546 548 if ($a mp_conf['USEQUEUEDEVICE']) {547 if ($ast_ge_14_25) { 549 548 $ext->add($context, $exten, '', new ext_set('THISDEVICE', '${DB(DEVICE/${REALCALLERIDNUM}/dial)}')); 550 549 } … … 567 566 $ext->add($context, $exten, '', new ext_execif('$[${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 1]', 'AddQueueMember', '${ARG1},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${ARG1}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)},HINT:${CALLBACKNUM}@ext-local')); 568 567 $ext->add($context, $exten, '', new ext_execif('$[${DB_EXISTS(AMPUSER/${CALLBACKNUM}/cidname)} = 0]', 'AddQueueMember', '${ARG1},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${ARG1}/agents/${CALLBACKNUM})}')); 569 } else if ($a mp_conf['USEQUEUEDEVICE']) {568 } else if ($ast_ge_14_25) { 570 569 $ext->add($context, $exten, '', new ext_set('THISDEVICE', '${IF($[${LEN(${THISDEVICE})}=0]?${DB(DEVICE/${CUT(DB(AMPUSER/${CALLBACKNUM}/device),&,1)}/dial)}:${THISDEVICE})}')); 571 570 $ext->add($context, $exten, '', new ext_execif('$[${LEN(${THISDEVICE})}!=0]', 'AddQueueMember', '${ARG1},Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${ARG1}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)},${THISDEVICE}')); … … 1043 1042 global $ext; 1044 1043 global $amp_conf; 1045 1044 global $version; 1045 1046 $ast_ge_14_25 = version_compare($version,'1.4.25','ge'); 1046 1047 $id = "macro-toggle-add-agent"; // The context to be included 1047 1048 … … 1055 1056 if ($amp_conf['USEQUEUESTATE']) { 1056 1057 $ext->add($id, $c, '', new ext_addqueuemember('${QUEUENO}','Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)},HINT:${CALLBACKNUM}@ext-local')); 1057 } else if ($a mp_conf['USEQUEUEDEVICE']) {1058 } else if ($ast_ge_14_25) { 1058 1059 $ext->add($id, $c, '', new ext_addqueuemember('${QUEUENO}','Local/${CALLBACKNUM}@from-queue/n,${DB(QPENALTY/${QUEUENO}/agents/${CALLBACKNUM})},,${DB(AMPUSER/${CALLBACKNUM}/cidname)},${DB(DEVICE/${REALCALLERIDNUM}/dial)}')); 1059 1060 } else {
