Specifications

Aastra July 2014 PA-001011-03-04
302
# SIP Lines
sip line1 auth name: $$AA_SIPAUTHNAME_AA$$
sip line1 password: $$AA_SIPSECRET_AA$$
sip line1 user name: $$AA_SIPUSERNAME_AA$$
sip line1 display name: $$AA_SIPCALLERID_AA$$
sip line1 screen name: $$AA_SIPCALLERID_AA$$
sip line1 proxy ip: $$AA_PROXY_SERVER_AA$$
sip line1 proxy port: 5060
sip line1 registrar ip: $$AA_REGISTRAR_SERVER_AA$$
sip line1 registrar port: 5060
sip line1 vmail: *98
sip line1 mode: 0
# Action URI
action uri startup:
startup.php (located at /var/www/html/startup)
<?php
#####################################################################
# Sample script for self-configuration 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');
require_once('phpagi/misc.php');
require_once('phpagi/phpagi-asmanager.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"];