Specifications

PA-001011-03-04 Aastra July 2014
197
User-Agent’ providing information on the characteristics of the phone (type, MAC address,
firmware),
X-Aastra-ExpMod1’ providing information on the expansion module 1 if present,
‘X-Aastra-ExpMod2’ providing information on the expansion module 2 if present,
‘X-Aastra-ExpMod3’ providing information on the expansion module 3 if present,
‘Accept-Language’ providing information on the language used on the phone.
Example:
User-Agent: Aastra57i MAC:00-08-5D-19-94-B7 V:2.3.1.26-SIP
Accept-Language: en
X-Aastra-ExpMod1: 560M
X-Aastra-ExpMod2: 536M
4.16.1 User-Agent
The User-Agent header includes:
The type of phone
The MAC address of the phone
The firmware version of the phone
Usually, the HTTP server is able to retrieve the User Agent parameters. The Aastra SIP phones
send the following string for the User-Agent.
Phone_Model[space]MAC:-XX-XX-XX-XX-XX-XX[space]V:Version
This allows the application to adapt to the type of phone it is dealing with but also allows to design
a single application to provide XML (for the phones) and HTML (for a web browser).
The following source code is a php example that can be used to decode the User-Agent header
sent by an Aastra phone.
function Aastra_decode_HTTP_header()
{
$user_agent=$_SERVER["HTTP_USER_AGENT"];
if(stristr($user_agent,"Aastra"))
{
$value=preg_split("/ MAC:/",$user_agent);
$end=preg_split("/ /",$value[1]);
$value[1]=preg_replace("/\-/","",$end[0]);
$value[2]=preg_replace("/V:/","",$end[1]);
}
else
{
$value[0]="Unknown";
$value[1]="NA";
$value[2]="NA";
}
$header[‘model’]=$value[0];