Changeset 5912
- Timestamp:
- 07/05/08 04:01:36 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/common/php-asmanager.php
r5263 r5912 228 228 * @return boolean true on success 229 229 */ 230 function connect($server=NULL, $username=NULL, $secret=NULL )230 function connect($server=NULL, $username=NULL, $secret=NULL, $events='on') 231 231 { 232 232 // use config if not specified … … 271 271 272 272 // login 273 $res = $this->send_request('login', array('Username'=>$username, 'Secret'=>$secret ));273 $res = $this->send_request('login', array('Username'=>$username, 'Secret'=>$secret, 'Events'=>$events)); 274 274 if($res['Response'] != 'Success') 275 275 { freepbx/trunk/amp_conf/htdocs/admin/header.php
r5016 r5912 118 118 119 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"] )) {120 if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 121 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"] )) {122 if (!$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"], 'off')) { 123 123 // couldn't connect at all 124 124 unset( $astman );
