Ticket #3642: php-asmanager.php.diff

File php-asmanager.php.diff, 0.9 kB (added by tbyte, 3 years ago)
  • php-asmanager.php

    old new  
    2626* Gracias. :) 
    2727* 
    2828*/ 
    29   define('AST_CONFIG_DIR', '/usr/local/etc/asterisk/'); 
    30   define('AST_SPOOL_DIR', '/var/spool/asterisk/'); 
     29  if(!defined("AMP_CONF")) { define("AMP_CONF", "/etc/amportal.conf"); } 
     30  if(!isset($amp_conf)) 
     31  $amp_conf = parse_amportal_conf(AMP_CONF); 
     32  if(!isset($asterisk_conf)) 
     33  $asterisk_conf = parse_asterisk_conf($amp_conf['ASTETCDIR']); 
     34 
     35  define('AST_CONFIG_DIR', $amp_conf['ASTETCDIR']); 
     36  define('AST_SPOOL_DIR', $asterisk_conf['astspooldir']); 
    3137  define('AST_TMP_DIR', AST_SPOOL_DIR . '/tmp/'); 
    3238  define('DEFAULT_PHPAGI_CONFIG', AST_CONFIG_DIR . '/phpagi.conf'); 
    3339 
    34   if(!defined("AMP_CONF")) { define("AMP_CONF", "/etc/amportal.conf"); } 
    35  
    3640  define('AST_DIGIT_ANY', '0123456789#*'); 
    3741 
    3842  define('AGI_PORT', 4573);