Changeset 8849

Show
Ignore:
Timestamp:
02/17/10 14:36:58 (2 years ago)
Author:
p_lindheimer
Message:

closes #3575 check for ASTMANAGERHOST and ASTMANAGERPORT

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.7/amp_conf/bin/generate_hints.php

    r8599 r8849  
    1717 
    1818  $astman         = new AGI_AsteriskManager(); 
    19   if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
     19 
     20  $astmanagerhost = (isset($amp_conf['ASTMANAGERHOST']) && trim($amp_conf['ASTMANAGERHOST']) != '')?$amp_conf['ASTMANAGERHOST']:'127.0.0.1'; 
     21  if (isset($amp_conf['ASTMANAGERPORT']) && trim($amp_conf['ASTMANAGERPORT']) != '') { 
     22    $astmanagerhost .= ':'.$amp_conf['ASTMANAGERPORT']; 
     23  } 
     24 
     25  if (! $res = $astman->connect($astmanagerhost, $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 
    2026    exit; 
    2127  }