Changeset 5993

Show
Ignore:
Timestamp:
07/13/08 20:34:25 (5 years ago)
Author:
p_lindheimer
Message:

#2875, #2768 only add auto-blkvm once, add ringinuse on Ast 1.4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/queues/functions.inc.php

    r5949 r5993  
    3434    } 
    3535 
    36     $results = queues_list(); 
     36    $results = queues_list(true); 
    3737    foreach ($results as $result) { 
    3838      $output .= "[".$result[0]."]\n"; 
     
    5151      foreach ($results2 as $keyword => $data) { 
    5252        if ($ver12){ 
    53           $output .= $keyword."=".$data."\n"; 
     53          switch($keyword){ 
     54            case 'ringinuse':  
     55              break; 
     56            default: 
     57              $output .= $keyword."=".$data."\n"; 
     58              break; 
     59          } 
    5460        }else{ 
    5561          switch($keyword){ 
     
    102108function queues_destinations() { 
    103109  //get the list of all exisiting 
    104   $results = queues_list(); 
     110  $results = queues_list(true); 
    105111   
    106112  //return an associative array with destination and description 
     
    150156      /* queue extensions */ 
    151157      $ext->addInclude('from-internal-additional','ext-queues'); 
    152       $qlist = queues_list(); 
     158      $qlist = queues_list(true); 
    153159      if (is_array($qlist)) { 
    154160        foreach($qlist as $item) { 
     
    175181          $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}')); 
    176182          $ext->add('ext-queues', $exten, '', new ext_setvar('DB(${BLKVM_OVERRIDE})', 'TRUE')); 
    177           $ext->add('ext-queues', $exten, '', new ext_setvar('_DIAL_OPTIONS', '${DIAL_OPTIONS}M(auto-blkvm)')); 
     183          $ext->add('ext-queues', $exten, '', new ext_execif('$["${REGEX("(M[(]auto-blkvm[)])" ${DIAL_OPTIONS})}" != "1"]', 'Set', '_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm)')); 
    178184 
    179185          // Inform all the children NOT to send calls to destinations or voicemail 
     
    301307  array($account,'monitor-join','yes',0), 
    302308  array($account,'eventwhencalled',($_REQUEST['eventwhencalled'])?$_REQUEST['eventwhencalled']:'no',0), 
    303   array($account,'eventmemberstatus',($_REQUEST['eventmemberstatus'])?$_REQUEST['eventmemberstatus']:'no',0)); 
     309  array($account,'eventmemberstatus',($_REQUEST['eventmemberstatus'])?$_REQUEST['eventmemberstatus']:'no',0), 
     310  array($account,'ringinuse',($cwignore)?'no':'yes',0), 
     311); 
    304312 
    305313  if ($_REQUEST['music'] != 'inherit') { 
     
    359367 
    360368//get the existing queue extensions 
    361 function queues_list() { 
     369// 
     370function queues_list($listall=false) { 
    362371  global $db; 
    363372  $sql = "SELECT extension, descr FROM queues_config ORDER BY extension"; 
     
    368377 
    369378  foreach($results as $result){ 
    370     if (checkRange($result[0])){ 
     379    if ($listall || checkRange($result[0])){ 
    371380      $extens[] = array($result[0],$result[1]); 
    372381    }