Changeset 9651

Show
Ignore:
Timestamp:
05/19/10 01:18:29 (3 years ago)
Author:
mickecarlsson
Message:

Close #4282, remove hardcoded paths in ARI, replace with parse_amportal. Thank you kurtlidl

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/recordings/includes/bootstrap.php

    r7318 r9651  
    114114        if ($fileCount>$SETTINGS_MAX_FILES) { 
    115115          $_SESSION['ari_error']  
    116             .= _("To many files in $msg_path Not all files processed") . "<br>"; 
     116            .= sprintf(_("Too many files in %s. Not all files processed"),$msg_path) . "<br>"; 
    117117          return; 
    118118        } 
     
    123123          if ($dirCount>10) { 
    124124            $_SESSION['ari_error']  
    125               .= sprintf(_("To many directories in %s Not all files processed"),$msg_path) . "<br>"; 
     125              .= sprintf(_("Too many directories in %s. Not all files processed"),$msg_path) . "<br>"; 
    126126            return; 
    127127          } 
     
    309309setARIRoot(); 
    310310 
     311include_once("./includes/common.php"); 
    311312include_once("./includes/main.conf.php"); 
    312313include_once("./version.php"); 
  • freepbx/trunk/amp_conf/htdocs/recordings/includes/main.conf.php

    r9474 r9651  
    1515$AMPORTAL_CONF_FILE = "/etc/amportal.conf"; 
    1616 
     17$amp_conf = parse_amportal_conf($AMPORTAL_CONF_FILE); 
    1718# 
    1819# Host for Asterisk Manager Interface 
     
    130131# voicemail config. 
    131132# 
    132 $ASTERISK_VOICEMAIL_CONF = "/etc/asterisk/voicemail.conf"; 
     133$ASTERISK_VOICEMAIL_CONF = $amp_conf["ASTETCDIR"]."/voicemail.conf"; 
    133134 
    134135# 
     
    142143#    Use semi-colon for multiple paths 
    143144# 
    144 $ASTERISK_VOICEMAIL_PATH = "/var/spool/asterisk/voicemail"; 
     145 
     146$ASTERISK_VOICEMAIL_PATH = $amp_conf["ASTSPOOLDIR"]."/voicemail"; 
    145147 
    146148# 
     
    165167# Location of asterisk call monitor recordings on server 
    166168# 
    167 $ASTERISK_CALLMONITOR_PATH = "/var/spool/asterisk/monitor"; 
     169$ASTERISK_CALLMONITOR_PATH = $amp_conf["ASTSPOOLDIR"]."/monitor"; 
    168170 
    169171# 
     
    260262$ASTERISK_PROTOCOLS = array(); 
    261263$ASTERISK_PROTOCOLS['iax']['table'] = "iax"; 
    262 $ASTERISK_PROTOCOLS['iax']['config_files'] = "/etc/asterisk/iax.conf;/etc/asterisk/iax_additional.conf"; 
     264$ASTERISK_PROTOCOLS['iax']['config_files'] = $amp_conf["ASTETCDIR"]."/iax.conf;".$amp_conf["ASTETCDIR"]."/iax_additional.conf"; 
    263265$ASTERISK_PROTOCOLS['sip']['table'] = "sip"; 
    264 $ASTERISK_PROTOCOLS['sip']['config_files'] = "/etc/asterisk/sip.conf;/etc/asterisk/sip_additional.conf"; 
     266$ASTERISK_PROTOCOLS['sip']['config_files'] = $amp_conf["ASTETCDIR"]."/sip.conf;".$amp_conf["ASTETCDIR"]."/sip_additional.conf"; 
    265267$ASTERISK_PROTOCOLS['zap']['table'] = "zap"; 
    266 $ASTERISK_PROTOCOLS['zap']['config_files'] = "/etc/asterisk/zapata.conf;/etc/asterisk/zapata_additional.conf;/etc/asterisk/chan_dahdi.conf;/etc/asterisk/chan_dahdi_additional.conf"; 
    267  
     268$ASTERISK_PROTOCOLS['zap']['config_files'] = $amp_conf["ASTETCDIR"]."/zapata.conf;".$amp_conf["ASTETCDIR"]."/zapata_additional.conf;".$amp_conf["ASTETCDIR"]."/chan_dahdi.conf;".$amp_conf["ASTETCDIR"]."/chan_dahdi_additional.conf"; 
    268269# Settings for Follow-Me Select Boxes in seconds 
    269270#