Changeset 3570

Show
Ignore:
Timestamp:
01/17/07 03:15:50 (6 years ago)
Author:
gregmac
Message:

Implement #1680

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/bin/module_admin

    r2820 r3570  
    5353 
    5454function init_amportal_environment($ampconfpath) { 
    55   global $amp_conf, $asterisk_conf, $db
     55  global $amp_conf, $asterisk_conf, $db, $astman
    5656   
    5757  if (!file_exists($ampconfpath)) { 
     
    6969  // include the functions file from WEBROOT 
    7070  include(AMP_BASE_INCLUDE_PATH.'/functions.inc.php'); 
     71  // include astman api 
     72  include(AMP_BASE_INCLUDE_PATH.'/common/php-asmanager.php'); 
    7173   
    7274  // now apply the real parse function (this makes some default assumptions and does a bit more error checking) 
     
    8183  require_once(AMP_BASE_INCLUDE_PATH.'/common/db_connect.php'); //PEAR must be installed 
    8284 
     85  $astman= new AGI_AsteriskManager(); 
     86  if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
     87    unset( $astman ); 
     88  } 
    8389} 
    8490