Changeset 11085

Show
Ignore:
Timestamp:
01/24/11 01:24:51 (2 years ago)
Author:
p_lindheimer
Message:

creates _SPAGE. option to use ChanSpy? if channel is busy and is SIP, no option to engage yet but please test by modifying the dialplan of a page group and changing the Local/FPAGEnnn to Local/SPAGEnnn for testing. Suggestion will be to make Force Page a tri-state option now to use ChanSpy? as one mode re #4715

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/paging/functions.inc.php

    r10604 r11085  
    117117        if ($ast_ge_14) { 
    118118          $ext->add($context, $code, 'check', new ext_chanisavail('${DIAL}', 's')); 
    119           $ext->add($context, $code, '', new ext_gotoif('$["${AVAILORIGCHAN}" == ""]', 'end'));      
     119          $ext->add($context, $code, '', new ext_gotoif('$["${AVAILORIGCHAN}" = ""]', 'end'));       
    120120        } else { 
    121121          $ext->add($context, $code, 'check', new ext_chanisavail('${DIAL}', 'sj')); 
    122122        } 
     123        $ext->add($context, $code, '', new ext_noop_trace('AVAILCHAN: ${AVAILCHAN}, AVAILORIGCHAN: ${AVAILORIGCHAN}, AVAILSTATUS: ${AVAILSTATUS}',5)); 
    123124        $ext->add($context, $code, '', new ext_dial('${DIAL}','${DTIME},${DOPTIONS}${INTERCOM_EXT_DOPTIONS}')); 
    124125 
     
    332333      if ($ast_ge_14) { 
    333334        $ext->add($extpaging, "_PAGE.", 'AVAIL', new ext_chanisavail('${DB(DEVICE/${EXTEN:4}/dial)}', 's')); 
    334         $ext->add($extpaging, "_PAGE.", '', new ext_gotoif('$["${AVAILORIGCHAN}" == ""]', 'skipself'));      
     335        $ext->add($extpaging, "_PAGE.", '', new ext_noop_trace('AVAILCHAN: ${AVAILCHAN}, AVAILORIGCHAN: ${AVAILORIGCHAN}, AVAILSTATUS: ${AVAILSTATUS}',5)); 
     336        $ext->add($extpaging, "_PAGE.", '', new ext_gotoif('$["${AVAILORIGCHAN}" = ""]', 'skipself'));       
    335337      } else { 
    336338        $ext->add($extpaging, "_PAGE.", 'AVAIL', new ext_chanisavail('${DB(DEVICE/${EXTEN:4}/dial)}', 'js')); 
     
    342344      if (!$ast_ge_14) { 
    343345        $ext->add($extpaging, "_PAGE.", '', new ext_hangup(''), 'AVAIL',101); 
     346      } 
     347 
     348      // Try ChanSpy Version 
     349      $ext->add($extpaging, "_SPAGE.", '', new ext_gotoif('$[ ${AMPUSER} = ${EXTEN:5} ]','skipself')); 
     350      if ($ast_ge_14) { 
     351        $ext->add($extpaging, "_SPAGE.", 'AVAIL', new ext_chanisavail('${DB(DEVICE/${EXTEN:5}/dial)}', 's')); 
     352        $ext->add($extpaging, "_SPAGE.", '', new ext_noop_trace('AVAILCHAN: ${AVAILCHAN}, AVAILORIGCHAN: ${AVAILORIGCHAN}, AVAILSTATUS: ${AVAILSTATUS}',5)); 
     353        $ext->add($extpaging, "_SPAGE.", '', new ext_gotoif('$["${AVAILORIGCHAN}" = ""]', 'chanspy'));       
     354      } else { 
     355        $ext->add($extpaging, "_SPAGE.", 'AVAIL', new ext_chanisavail('${DB(DEVICE/${EXTEN:5}/dial)}', 'js')); 
     356      } 
     357      $ext->add($extpaging, "_SPAGE.", '', new ext_gotoif('$["${DB(DND/${DB(DEVICE/${EXTEN:5}/user)})}" = "YES"]', 'chanspy'));      
     358      $ext->add($extpaging, "_SPAGE.", 'SKIPCHECK', new ext_macro('autoanswer','${EXTEN:5}')); 
     359      $ext->add($extpaging, "_SPAGE.", '', new ext_dial('${DIAL}','${DTIME},${DOPTIONS}')); 
     360      $ext->add($extpaging, "_SPAGE.", 'skipself', new ext_hangup()); 
     361      $ext->add($extpaging, "_SPAGE.", 'chanspy', new ext_execif('$["${CUT(DB(DEVICE/${EXTEN:5}/dial),/,1)}" = "SIP"]', 'ChanSpy','${DB(DEVICE/${EXTEN:5}/dial)}-,qW')); 
     362      $ext->add($extpaging, "_SPAGE.", '', new ext_noop_trace('Comparison: ${EXTEN:5}, "${CUT(DB(DEVICE/${EXTEN:5}/dial),/,1)}" = "SIP"',9)); 
     363      $ext->add($extpaging, "_SPAGE.", '', new ext_hangup()); 
     364      if (!$ast_ge_14) { 
     365        $ext->add($extpaging, "_SPAGE.", '', new ext_hangup(''), 'AVAIL',101); 
    344366      } 
    345367