function listCommands() { global $config; $objResponse = new xajaxResponse(); $myAsterisk = new Asterisk(); $myAsterisk->config['asmanager'] = $config['asterisk']; $res = $myAsterisk->connect(); if (!$res) { $objResponse->addAssign("AMIStatudDiv", "innerHTML", $locate->Translate("AMI_connection_failed")); } else { print_r($myAsterisk->ListCommands()); } return $objResponse; }