Specifications

Aastra July 2014 PA-001011-03-04
308
# Create Reboot screen
$output = "<AastraIPPhoneTextScreen destroyOnExit=\"yes\">\n";
$output .= "<Title>REBOOT</Title>\n";
$output .= "<Text>Reboot</Text>\n";
$output .= "</AastraIPPhoneTextScreen>\n";
header("Refresh: 1; url=".$XML_SERVER."?action=reboot");
# Display XML Object
header("Content-Type: text/xml");
header("Content-Length: ".strlen($output));
echo $output;
exit;
?>
logout.php (located at /var/www/html/startup)
<?php
#####################################################################
# Sample script for shot desking with Trixbox CE/Asterisk
# Aastra SIP Phones R2.3.0 or better
#
# php source code
# Provided by Aastra 2008
#
# Phone supported
# Aastra 5i series
#####################################################################
####################################################################
# Includes
####################################################################
require_once('include/config.inc.php');
require_once('include/backend.inc.php');
####################################################################
# Private functions
####################################################################
####################################################################
# Aastra_decode_HTTP_header()
#
# Returns an array
# 0 Phone Type
# 1 Phone MAC Address
# 2 Phone firmware version
#####################################################################
function Aastra_decode_HTTP_header()
{
$user_agent=$_SERVER["HTTP_USER_AGENT"];
if(stristr($user_agent,"Aastra"))
{
$value=preg_split("/ MAC:/",$user_agent);
$fin=preg_split("/ /",$value[1]);
$value[1]=preg_replace("/\-/","",$fin[0]);
$value[2]=preg_replace("/V:/","",$fin[1]);
}
else
{
$value[0]="MSIE";
$value[1]="NA";
$value[2]="NA";
}
$value[3]=$_SERVER["REMOTE_ADDR"];
return($value);
}