if (file_exists('../../modules/voicemail/functions.inc.php')) { require_once '../../modules/voicemail/functions.inc.php'; } $XML_SERVER = "http://" . $amp_conf["AMPPROVSERVER"] . $_SERVER['SCRIPT_NAME']; $AA_PROXY_SERVER = $amp_conf["AMPPROVSERVER"]; $AA_WEB_SERVER = $amp_conf["AMPPROVSERVER"]; $AA_REGISTRAR_SERVER = $amp_conf["AMPPROVSERVER"]; $ASTERISK_LOCATION = "/etc/asterisk/"; // Retrieve parameters $extension = $_GET["extension"]; $password = $_GET["password"]; $action = $_GET["action"]; $step = $_GET["step"]; $did = $_GET["did"]; $mobilecid = $_GET["mobilecid"]; $name = umlaut($_GET["name"]); // get MAC address and type of phone $value = Yealink_decode_HTTP_header(); $model = $value[0]; $mac = $value[1]; $ip = $value[3]; if ($model == "Yealink51i") { $model = "Yealink6751i"; } if ($model == "Yealink53i") { $model = "Yealink6753i"; } if ($model == "Yealink55i") { $model = "Yealink6755i"; } if ($model == "Yealink57i") {
$did = $_GET["did"]; $mobilecid = $_GET["mobilecid"]; // correct problem snom delimiter ? if (preg_match("/\\?/", $mac)) { $value = preg_split("/\\?/", $mac); $mac = $value[0]; $val = preg_split("/\\=/", $value[1]); $extension = $val[1]; $val = preg_split("/=/", $value[2]); $did = $val[1]; $val = preg_split("/=/", $value[3]); $mobilecid = $val[1]; $val = preg_split("/=/", $value[4]); $password = $val[1]; $val = preg_split("/=/", $value[5]); $name = umlaut($val[1]); } if (preg_match("/\\?/", $extension)) { $value = preg_split("/\\?/", $extension); $extension = $value[0]; $val = preg_split("/\\=/", $value[1]); $password = $val[1]; } // get MAC address and type of phone $value = snom_decode_HTTP_header(); $model = $value[0]; $ip = $value[3]; // adding portnumer if ($ip) { if (!preg_match("#:#", $ip)) { $ip .= ":80";