Changeset 13247 for modules/branches/2.10/paging/functions.inc.php
- Timestamp:
- 01/22/12 07:44:23 (1 year ago)
- Files:
-
- modules/branches/2.10/paging/functions.inc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/paging/functions.inc.php
r13189 r13247 386 386 $sql = "SELECT page_group, force_page, duplex FROM paging_config"; 387 387 $paging_groups = $db->getAll($sql, DB_FETCHMODE_ASSOC); 388 389 if (!$paging_groups) { 390 break;//no need to continue if we dont have any pagegroups 391 } 388 392 foreach ($paging_groups as $thisgroup) { 389 393 $grp=trim($thisgroup['page_group']); … … 417 421 418 422 //if page group it in use, goto to busy 419 $ext->add($apppagegroups, $grp, ' busy-check', new ext_gotoif('$[${TRYLOCK(apppagegroups'. $grp .')}]', '', 'busy'));423 $ext->add($apppagegroups, $grp, '', new ext_gotoif('$[${TRYLOCK(apppagegroups'. $grp .')}]', '', 'busy')); 420 424 421 425 //set blf to in use … … 439 443 $ext->add($apppagegroups, $grp, 'busy', new ext_set('PAGE${PAGEGROUP}BUSY', 'TRUE')); 440 444 $ext->add($apppagegroups, $grp, 'play-busy', new ext_busy(3)); 441 $ext->add($apppagegroups, $grp, 'busy-hang', new ext_goto('app-pagegroups,h,1')); 442 } 445 $ext->add($apppagegroups, $grp, 'busy-hang', new ext_goto('ext-paging,h,1')); 446 } 447 443 448 //h 444 449 $ext->add($apppagegroups, 'h', '', … … 456 461 } 457 462 463 // This is the hook for 'destinations' 464 function paging_destinations() { 465 $results = paging_list(); 466 // return an associative array with destination and description 467 if (isset($results)) { 468 foreach($results as $result){ 469 $desc = $result['description'] ? $result['description'] : _('Page Group') . ' ' . $result['page_group']; 470 $extens[] = array('destination' => 'app-pagegroups,' . $result['page_group'] . ',1', 'description' => $desc); 471 } 472 return $extens; 473 } else { 474 return null; 475 } 476 } 477 478 function paging_getdest($exten) { 479 return array('pagegroups,'.$exten.',1'); 480 } 481 458 482 function paging_get_autoanswer_defaults() { 459 483 global $db;
