unset ($_error); unset ($_command); $HTTP_POST_VARS["ziel"] = preg_replace ("/[^0-9]/", "", $HTTP_POST_VARS["ziel"]); $HTTP_POST_VARS["msn"] = preg_replace ("/[^0-9]/", "", $HTTP_POST_VARS["msn"]); if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST") { if (!eregi("cfu|cfb|cfnr", $HTTP_POST_VARS["type"])) $_error = "Ungültiger AWS-Typ."; else if (($HTTP_POST_VARS["ziel"] != "") && ($HTTP_POST_VARS["mode"] == "setup")) $_command = "/usr/local/bin/capidivert a " . $HTTP_POST_VARS["type"] . " 0 " . $HTTP_POST_VARS["msn"] . " " . $HTTP_POST_VARS["ziel"]; else if ($HTTP_POST_VARS["mode"] == "delete") $_command = "/usr/local/bin/capidivert d " . $HTTP_POST_VARS["type"] . " 0 " . $HTTP_POST_VARS["msn"]; else $_error = "Es ist ein Fehler aufgetreten. Wenn eine AWS eingerichtet werden soll, bitte ein Ziel angeben!"; } ?>
Hier können Anrufweiterschaltungen eingerichtet werden, um eingehende Anrufe automatisch an ein anderes Ziel zu leiten.
if (isset($_command)) { ?>
Der Befehl echo $_command; ?> wurde mit folgendem Ergebnis ausgeführt:
passthru ($_command); ?>
Auf folgenden Nummern ist momentan eine Anrufweiterschaltung aktiviert:
passthru ("/usr/local/bin/capidivert i"); ?>