Changeset 7347
- Timestamp:
- 01/06/09 17:05:28 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.5/amp_conf/htdocs/admin/config.php
r6764 r7347 23 23 $action = isset($_REQUEST['action'])?$_REQUEST['action']:null; 24 24 $quietmode = isset($_REQUEST['quietmode'])?$_REQUEST['quietmode']:''; 25 $skip_astman = isset($_REQUEST['skip_astman'])?$_REQUEST['skip_astman']:false; 25 26 if (isset($_REQUEST['restrictmods'])) { 26 27 $restrict_mods = explode('/',$_REQUEST['restrictmods']); freepbx/branches/2.5/amp_conf/htdocs/admin/header.php
r6525 r7347 115 115 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 116 116 $asterisk_conf = parse_asterisk_conf($amp_conf["ASTETCDIR"]."/asterisk.conf"); 117 $astman = new AGI_AsteriskManager(); 117 if (!$skip_astman) { 118 require_once('common/php-asmanager.php'); 119 $astman = new AGI_AsteriskManager(); 118 120 119 // attempt to connect to asterisk manager proxy 120 if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 121 // attempt to connect directly to asterisk, if no proxy or if proxy failed 122 if (!$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 123 // couldn't connect at all 124 unset( $astman ); 121 // attempt to connect to asterisk manager proxy 122 if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 123 // attempt to connect directly to asterisk, if no proxy or if proxy failed 124 if (!$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 125 // couldn't connect at all 126 unset( $astman ); 127 } 125 128 } 126 129 } … … 129 132 130 133 // default password check 131 if (!$quietmode) { 134 135 if (!$quietmode && !isset($_REQUEST['handler'])) { 132 136 $nt = notifications::create($db); 133 137 if ($amp_conf['AMPMGRPASS'] == $amp_conf_defaults['AMPMGRPASS'][1]) {
