function restartAsterisk() { global $config; $myAsterisk = new Asterisk(); $myAsterisk->config['asmanager'] = $config['asterisk']; $res = $myAsterisk->connect(); $myAsterisk->Command(" restart now "); $myAsterisk->disconnect(); return; }
function reloadAsterisk() { global $config; $myAsterisk = new Asterisk(); $myAsterisk->config['asmanager'] = $config['asterisk']; $res = $myAsterisk->connect(); $r = $myAsterisk->Command(" reload "); $myAsterisk->disconnect(); return $r; }