Changeset 3652

Show
Ignore:
Timestamp:
01/25/07 16:35:10 (5 years ago)
Author:
naftali5
Message:

infrastucture to handle new ringmethod firstavail firstnotonphone #1671

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/agi-bin/dialparties.agi

    r3583 r3652  
    383383      } 
    384384    } 
     385    elseif ( ($exthascw == 1) && ($rgmethod == 'firstnotonphone') ) 
     386    { // get ExtensionState: 0-idle; 1-busy; 4-unavail; 8-ringing <--- these are unconfirmed 
     387      $extstate = is_ext_avail($extnum); 
     388      debug("Extension $extnum has ExtensionState: $extstate",1); 
     389      if ($extstate == 1) 
     390      { // CW in use - but blocked for hunt 
     391        debug("Extension $extnum has call waiting enabled but blocked for hunt",1); 
     392        $extnum = ''; 
     393        $AGI->set_variable('DIALSTATUS','BUSY');   
     394      } 
     395    } 
    385396  } 
    386397   
     
    402413     
    403414      // Update Caller ID for calltrace application 
    404       if ((strpos($k,"#")==0) && (($rgmethod != "hunt") && ($rgmethod != "memoryhunt")) ) 
     415      if ((strpos($k,"#")==0) && (($rgmethod != "hunt") && ($rgmethod != "memoryhunt") && ($rgmethod != "firstavailable") && ($rgmethod != "firstnotonphone")) ) 
    405416      { 
    406417        if ( isset($cidnum) && is_numeric($cidnum) ) 
     
    435446$myhuntmember = ""; 
    436447 
    437 if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt")
     448if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt") || ($rgmethod == "firstavailable") || ($rgmethod == "firstnotonphone")
    438449{ 
    439450  if ($cidnum) 
     
    447458      //If the original array is included in the extension hash then set variables 
    448459      $myhuntmember="HuntMember"."$loops"; 
    449       if ($rgmethod == "hunt"
     460      if (($rgmethod == "hunt") || ($rgmethod == "firstavailable") || ($rgmethod == "firstnotonphone")
    450461        $AGI->set_variable($myhuntmember,$ext_hunt[$k]); 
    451462      elseif ($rgmethod == "memoryhunt")  
     
    551562  $AGI->noop(''); 
    552563} else { 
    553   if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt")
     564  if (($rgmethod == "hunt") || ($rgmethod == "memoryhunt") || ($rgmethod == "firstavailable") || ($rgmethod == "firstnotonphone")
    554565  { 
    555566    $ds = '|'; 
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r3630 r3652  
    7878exten => s,42,Dial(${${HuntMember}}${ds} ) ; dialparties will set the priority to 20 if $ds is not null and its a hunt group 
    7979exten => s,43,Set(HuntLoop=$[1 + ${HuntLoop}]) 
    80 exten => s,44,Set(HuntMembers=$[${HuntMembers} - 1]) 
    81 exten => s,45,Goto(s,22) 
     80exten => s,44,GotoIf($[$[$["foo${RingGroupMethod}" != "foofirstavailable"] & $["foo${RingGroupMethod}" != "foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?46) 
     81exten => s,45,Set(HuntMembers=0) 
     82exten => s,46,Set(HuntMembers=$[${HuntMembers} - 1]) 
     83exten => s,47,Goto(s,22) 
    8284exten => s,50,DBdel(CALLTRACE/${CT_EXTEN}) 
    8385exten => s,51,Goto(s,42)