Changeset 13130

Show
Ignore:
Timestamp:
12/28/11 15:47:05 (1 year ago)
Author:
p_lindheimer
Message:

don't set zap to dadhi compat mode UNLESS it is set in Advanced Settings, probably need to look at removing this all together soon

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.10/amp_conf/htdocs/admin/functions.inc.php

    r13098 r13130  
    199199  } 
    200200     
    201   if (version_compare($version, '1.4', 'ge') && $amp_conf['AMPENGINE'] == 'asterisk') {    
    202     if ($amp_conf['ZAP2DAHDICOMPAT']) { 
    203       $ast_with_dahdi = true; 
    204       $chan_dahdi_loaded = true; 
    205       return true; 
    206     } else if (isset($astman) && $astman->connected()) { 
    207       // earlier revisions of 1.4 and dahdi loaded but still running as zap, so if ZapScan is present, we assume 
    208       // that is the mode it is running in. 
    209       $response = $astman->send_request('Command', array('Command' => 'show applications like ZapScan')); 
    210       if (!preg_match('/1 Applications Matching/', $response['data'])) { 
    211         $ast_with_dahdi = true; 
    212         $chan_dahdi_loaded = true; 
    213         return $ast_with_dahdi; 
    214       } else { 
    215         $chan_dahdi_loaded = false; 
    216       } 
    217     } 
     201  if ($amp_conf['ZAP2DAHDICOMPAT']) { 
     202    $ast_with_dahdi = true; 
     203    $chan_dahdi_loaded = true; 
     204    return true; 
    218205  } 
    219206  $ast_with_dahdi = false; 
  • modules/branches/2.10/core/functions.inc.php

    r13091 r13130  
    13891389      // 
    13901390      if (!isset($chan_dahdi_loaded)) { 
    1391         if ($ast_ge_14 && isset($astman) && $astman->connected()) { 
    1392           $response = $astman->send_request('Command', array('Command' => 'module show like chan_dahdi')); 
    1393           $chan_dahdi_loaded = (preg_match('/1 modules loaded/', $response['data']) > 0); 
     1391        if (isset($astman) && $astman->connected()) { 
     1392          $chan_dahdi_loaded = $astman->mod_loaded('chan_dahdi'); 
    13941393        } 
    13951394      } 
     
    39563955        $ext->add($mcontext,$exten,'begin', new ext_set('THISDIAL', '${DB(DEVICE/${CUT(DEVICES,&,${ITER})}/dial)}')); 
    39573956        if ($chan_dahdi) { 
    3958           $ext->add($mcontext,$exten,'', new ext_gosubif('$["${ASTCHANDAHDI}" != ""]','zap2dahdi,1')); 
     3957          $ext->add($mcontext,$exten,'', new ext_gosubif('$["${ASTCHANDAHDI}" = "1"]','zap2dahdi,1')); 
    39593958        } 
    39603959        $ext->add($mcontext,$exten,'', new ext_set('DSTRING', '${DSTRING}${THISDIAL}&'));