Changeset 3938

Show
Ignore:
Timestamp:
04/25/07 11:05:24 (6 years ago)
Author:
diego_iastrubni
Message:

Backport of changeset:3572 to the 2.2 branch. Fixes ticket:1899.
Aproved by p_lindheimer.

Files:

Legend:

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

    r3933 r3938  
    183183  switch ($amp_conf['AMPENGINE']) { 
    184184    case 'asterisk': 
    185       if ($astman) { 
     185      if (isset($astman)) { 
    186186        //get version 
    187187        $response = $astman->send_request('Command', array('Command'=>'show version')); 
    188188        $verinfo = $response['data']; 
    189189      } else { 
    190         // could not connect to asterisk manager 
    191         return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0'); 
     190        // could not connect to asterisk manager, try console 
     191        $verinfo = exec('asterisk -V'); 
    192192      } 
    193193       
     
    198198        return array('engine'=>'asterisk', 'version' => $matches[1], 'additional' => $matches[4]); 
    199199      } 
     200 
     201      // could not connect to asterisk manager 
     202      return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0'); 
    200203    break; 
    201204  }