Changeset 8163
- Timestamp:
- 08/25/09 14:47:51 (2 years ago)
- Files:
-
- modules/branches/2.6/core/agi-bin/dialparties.agi (modified) (3 diffs)
- modules/branches/2.6/core/module.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/core/agi-bin/dialparties.agi
r7901 r8163 392 392 debug("Extension $extnum has ExtensionState: $extstate",1); 393 393 394 if ( ($exthascw == 1) && ($extstate == 1)) {394 if ( ($exthascw == 1) && ($extstate != 0) && ($extstate != 4)) { 395 395 // process this one extension but the remaining should be skipped since there is cw and 396 396 // the extension is occupied. This will try this extension but not the others. 397 397 $skipremaining = 1; 398 398 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)) { 400 400 // no cw, ext is busy. So if cfb is set, it will forward there and if not, it will be 401 401 // ignored as normal behavior. In either case, we skip the remaining numbers. … … 468 468 } elseif ($rgmethod == "none" && $exthascw == 1 && $cwinusebusy) { 469 469 $extstate = is_ext_avail($extnum); 470 if ($extstate == 1) {470 if ($extstate > 0 && $extstate != 4) { 471 471 $AGI->set_variable('DIALSTATUS_CW','BUSY'); 472 472 debug("Extension $extnum has call waiting enabled with state: $extstate",1); … … 477 477 debug("Extension $extnum has ExtensionState: $extstate",1); 478 478 // 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 } 484 494 } 485 495 } modules/branches/2.6/core/module.xml
r8115 r8163 10 10 <canuninstall>no</canuninstall> 11 11 <changelog> 12 *2.6.0beta1.4* #3075, #3501, #3636, #3581, #3266 12 *2.6.0beta1.4* #3075, #3501, #3636, #3581, #3266, #3701 13 13 *2.6.0beta1.3* trunk tab improvements 14 14 *2.6.0beta1.2* added more sql escape in devices
