Changeset 8163

Show
Ignore:
Timestamp:
08/25/09 15:47:51 (4 years ago)
Author:
p_lindheimer
Message:

fixes #3701 unavail phones creating problems for firstavailable and firstnotonphone strategies, also fixed some un-reported cases affecting prim mode when phone is occupied in states other than standard 'busy'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/core/agi-bin/dialparties.agi

    r7901 r8163  
    392392      debug("Extension $extnum has ExtensionState: $extstate",1); 
    393393 
    394       if ( ($exthascw == 1) && ($extstate == 1) ) { 
     394      if ( ($exthascw == 1) && ($extstate != 0) && ($extstate != 4)) { 
    395395        // process this one extension but the remaining should be skipped since there is cw and 
    396396        // the extension is occupied. This will try this extension but not the others. 
    397397        $skipremaining = 1; 
    398398        debug("In mastermode with cw enabled so $extnum will be tried and others skipped",4); 
    399       } elseif ( ($exthascw == 0) && ($extstate == 1) ) { 
     399      } elseif ( ($exthascw == 0) && ($extstate != 0) && ($extstate != 4)) { 
    400400        // no cw, ext is busy. So if cfb is set, it will forward there and if not, it will be 
    401401        // ignored as normal behavior. In either case, we skip the remaining numbers. 
     
    468468    } elseif ($rgmethod == "none" && $exthascw == 1 && $cwinusebusy) { 
    469469      $extstate = is_ext_avail($extnum); 
    470       if ($extstate == 1) { 
     470      if ($extstate > 0 && $extstate != 4) { 
    471471        $AGI->set_variable('DIALSTATUS_CW','BUSY');            
    472472        debug("Extension $extnum has call waiting enabled with state: $extstate",1); 
     
    477477      debug("Extension $extnum has ExtensionState: $extstate",1); 
    478478      // CW in use - but blocked for hunt 
    479       if ($extstate == 1) { 
    480         debug("Extension $extnum has call waiting enabled but blocked for hunt",1); 
    481         $extnum = ''; 
    482         $AGI->set_variable('DIALSTATUS','BUSY');   
    483       } 
     479      // treat as on phone if already ringing, on hold, etc. 
     480      if ($extstate != 0) { 
     481        debug("Extension $extnum has call waiting enabled but blocked for hunt",1); 
     482        $extnum = ''; 
     483        $AGI->set_variable('DIALSTATUS','BUSY');   
     484      } 
     485    } elseif ($rgmethod == 'firstavailable') { 
     486      $extstate = is_ext_avail($extnum); 
     487      debug("Extension $extnum has ExtensionState: $extstate",1); 
     488      // if phone is not available don't bother putting it in hunt group or it will fail since not busy 
     489      if ($extstate == 4) { 
     490        debug("Extension $extnum is unavailable so don't include in firstavailable hunt",1); 
     491        $extnum = ''; 
     492        $AGI->set_variable('DIALSTATUS','BUSY');   
     493      } 
    484494    } 
    485495  } 
  • modules/branches/2.6/core/module.xml

    r8115 r8163  
    1010  <canuninstall>no</canuninstall> 
    1111  <changelog> 
    12     *2.6.0beta1.4* #3075, #3501, #3636, #3581, #3266 
     12    *2.6.0beta1.4* #3075, #3501, #3636, #3581, #3266, #3701 
    1313    *2.6.0beta1.3* trunk tab improvements 
    1414    *2.6.0beta1.2* added more sql escape in devices