Changeset 3572
- Timestamp:
- 01/17/07 03:38:08 (6 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r3567 r3572 181 181 switch ($amp_conf['AMPENGINE']) { 182 182 case 'asterisk': 183 if ( $astman) {183 if (isset($astman) && $astman->connected()) { 184 184 //get version 185 185 $response = $astman->send_request('Command', array('Command'=>'show version')); 186 186 $verinfo = $response['data']; 187 187 } else { 188 // could not connect to asterisk manager 189 return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0');188 // could not connect to asterisk manager, try console 189 $verinfo = exec('asterisk -V'); 190 190 } 191 191 … … 196 196 return array('engine'=>'asterisk', 'version' => $matches[1], 'additional' => $matches[4]); 197 197 } 198 199 return array('engine'=>'ERROR-UNABLE-TO-CONNECT', 'version'=>'0', 'additional' => '0'); 198 200 break; 199 201 }
