5.0.0 version.
This commit is contained in:
parent
071529b1e8
commit
8273ee8749
BIN
58015045-00-XML-API.pdf
Normal file
BIN
58015045-00-XML-API.pdf
Normal file
Binary file not shown.
Binary file not shown.
12
README.txt
12
README.txt
@ -1,11 +1,10 @@
|
||||
MITEL
|
||||
October 2015
|
||||
July 2017
|
||||
|
||||
|
||||
-PA-001011-06-00-XML-API.pdf - Mitel IP Phone XML API document. For use with Mitel SIP Phones Release 4.2.0
|
||||
-58015045-00-XML-API.pdf - Mitel IP Phone XML API document. For use with Mitel SIP Phones Release 5.0.0
|
||||
|
||||
-XMLSchema.xsd - XML Schema which can be used to validate XML development.
|
||||
For use with Mitel SIP Phones Release 4.2.0
|
||||
|
||||
-php_classes.zip - contains the directory php classes with all the XML classes.
|
||||
The files are commented.
|
||||
@ -19,7 +18,7 @@ October 2015
|
||||
-ldap_directory.zip contains the source code of a directory application using LDAP.
|
||||
The files are commented
|
||||
|
||||
-pictureCallerID.zip contains the source code of an application providing formatted images for the 6739i, 6867i, 6869i, 6873i for incoming and outgoing calls.
|
||||
-pictureCallerID.zip contains the source code of an application providing formatted images for the graphic phones for incoming and outgoing calls.
|
||||
The files are commented
|
||||
|
||||
For XML documents related to IP Phone SIP Release 1.3.0, see file PA-001004-00-00.zip
|
||||
@ -50,3 +49,8 @@ For XML documents related to IP Phone SIP Release 4.0.0 see file PA-001011-04-00
|
||||
For XML documents related to IP Phone SIP Release 4.0.0 SP1 see file PA-001011-04-01.zip
|
||||
For XML documents related to IP Phone SIP Release 4.0.0 SP2 see file PA-001011-04-02.zip
|
||||
For XML documents related to IP Phone SIP Release 4.1.0 see file PA-001011-05-00.zip
|
||||
For XML documents related to IP Phone SIP Release 4.1.0-SP2 see file PA-001011-05-01.zip
|
||||
For XML documents related to IP Phone SIP Release 4.2.0 see file PA-001011-06-00.zip
|
||||
For XML documents related to IP Phone SIP Release 4.2.0-SP1 see file PA-001011-06-01.zip
|
||||
For XML documents related to IP Phone SIP Release 4.3.0 see file 58015044-00-XML_API.zip
|
||||
For XML documents related to IP Phone SIP Release 4.3.0-SP1 see file 58015044-01-XML_API.zip
|
17652
XML-API.txt
17652
XML-API.txt
File diff suppressed because it is too large
Load Diff
154
XMLSchema.xsd
154
XMLSchema.xsd
@ -7,9 +7,21 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="layoutType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="1|2" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="modeType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="normal|extended|fullscreen" />
|
||||
<xs:pattern value="regular|extended|fullscreen" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="modeType2">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="regular|extended" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
@ -33,20 +45,30 @@
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="white|
|
||||
black|
|
||||
darkred|
|
||||
red|
|
||||
green|
|
||||
brown|
|
||||
blue|
|
||||
magenta|
|
||||
cyan|
|
||||
lightgray|
|
||||
darkgray|
|
||||
lightred|
|
||||
darkgreen|
|
||||
green|
|
||||
lightgreen|
|
||||
yellow|
|
||||
darkblue|
|
||||
blue|
|
||||
lightblue|
|
||||
darkyellow|
|
||||
yellow|
|
||||
lightyellow|
|
||||
darkgray|
|
||||
gray|
|
||||
lightgray|
|
||||
darkbrown|
|
||||
brown|
|
||||
lightbrown|
|
||||
darkmagenta|
|
||||
magenta|
|
||||
lightmagenta|
|
||||
lightcyan|
|
||||
darkcyan|
|
||||
cyan|
|
||||
lightcyan
|
||||
"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
@ -77,6 +99,25 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="wrap" default="no">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="yes|no"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="blink" default="no">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="no|slow|fast"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="topTitleTagType" mixed="true">
|
||||
<xs:attribute name="Color" default="white" type="colorType"/>
|
||||
<xs:attribute name="icon" type="integerAttributeType" default="0" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="imageType" mixed="true">
|
||||
@ -148,7 +189,9 @@
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
<xs:attribute name="doneAction" type="xs:string" />
|
||||
<xs:attribute name="allowAnswer" type="xs:string" default="no"/>
|
||||
@ -184,6 +227,10 @@
|
||||
</xs:all>
|
||||
<xs:attribute name="base" type="xs:string" />
|
||||
<xs:attribute name="icon" type="integerAttributeType" default="0" />
|
||||
<xs:attribute name="iconr1" type="integerAttributeType" default="0" />
|
||||
<xs:attribute name="iconr2" type="integerAttributeType" default="0" />
|
||||
<xs:attribute name="iconr3" type="integerAttributeType" default="0" />
|
||||
<xs:attribute name="iconr4" type="integerAttributeType" default="0" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SoftKey" type="softKeyType" minOccurs="0" maxOccurs="10" />
|
||||
@ -192,7 +239,9 @@
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="defaultIndex" type="integerAttributeType" default="1" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
<xs:attribute name="style" type="xs:string" default="numbered" />
|
||||
@ -211,6 +260,60 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:element name="AastraIPPhoneIconMenu">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TopTitle" type="topTitleTagType" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="MenuItem" minOccurs="1" maxOccurs="24">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="URI" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Dial" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="line" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1" />
|
||||
<xs:maxInclusive value="24" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Selection" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Line" type="lineTagType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="iconName" type="xs:string" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="scaled" type="textAttributeType" default="no" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="fontMono" type="textAttributeType" default="no" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="SoftKey" type="softKeyType" minOccurs="0" maxOccurs="10" />
|
||||
<xs:element name="IconList" type="iconListType" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="defaultIndex" type="integerAttributeType" default="1" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
<xs:attribute name="allowAnswer" type="xs:string" default="no"/>
|
||||
<xs:attribute name="fontMono" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="allowDrop" type="xs:string" default="no"/>
|
||||
<xs:attribute name="allowConf" type="xs:string" default="no"/>
|
||||
<xs:attribute name="allowXfer" type="xs:string" default="no"/>
|
||||
<xs:attribute name="mode" type="modeType2" default="regular" />
|
||||
<xs:attribute name="layout" type="layoutType" default="1" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:element name="AastraIPPhoneInputScreen">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@ -260,7 +363,9 @@
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="defaultIndex" type="integerAttributeType" default="1" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
<xs:attribute name="allowAnswer" type="xs:string" default="no"/>
|
||||
@ -330,7 +435,7 @@
|
||||
<xs:attribute name="type">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="alert" />
|
||||
<xs:pattern value="normal|alert|icon|toaster" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
@ -363,6 +468,23 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="AastraIPPhoneSoftkey">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SoftkeyItem" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Parameter" type="xs:string" />
|
||||
<xs:element name="Value" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="triggerDestroyOnExit" type="textAttributeType" default="no" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:group name="linesAndScroll">
|
||||
<xs:sequence>
|
||||
<xs:element name="Scroll" minOccurs="1" maxOccurs="1">
|
||||
@ -399,7 +521,9 @@
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
<xs:attribute name="doneAction" type="xs:string" />
|
||||
<xs:attribute name="allowAnswer" type="xs:string" default="no"/>
|
||||
@ -419,9 +543,11 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="mode" type="modeType" default="normal" />
|
||||
<xs:attribute name="mode" type="modeType" default="regular" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="imageAction" type="xs:string" />
|
||||
<xs:attribute name="doneAction" type="xs:string" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
@ -456,9 +582,11 @@
|
||||
</xs:sequence>
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="mode" type="modeType" default="normal" />
|
||||
<xs:attribute name="mode" type="modeType" default="regular" />
|
||||
<xs:attribute name="LockIn" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="CallProtection" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Timeout" type="integerAttributeType" default="45" />
|
||||
<xs:attribute name="bgColor" type="colorType" default="white" />
|
||||
<xs:attribute name="imageAction" type="xs:string" />
|
||||
<xs:attribute name="doneAction" type="xs:string" />
|
||||
<xs:attribute name="cancelAction" type="xs:string" />
|
||||
|
@ -10,11 +10,11 @@
|
||||
# @title string
|
||||
# @color string, "red", "blue", ... (optional)
|
||||
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
|
||||
# setTopTitle(title,color,icon_index) to set the Top Title of the XML screen (6739i only)
|
||||
# setTopTitle(title,color,icon_index) to set the Top Title of the XML screen
|
||||
# @title string
|
||||
# @color string, "red", "blue", ... (optional)
|
||||
# @icon_index integer, icon number
|
||||
# setBackgroundColor(color) to change the XML object background color (optional 6739i only)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
|
||||
# @uri string
|
||||
@ -23,6 +23,8 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional only for non softkey phones)
|
||||
@ -67,12 +69,13 @@ class AastraIPPhone {
|
||||
var $_refreshURL='';
|
||||
var $_beep='';
|
||||
var $_lockin='';
|
||||
var $_callprotection='';
|
||||
var $_timeout=0;
|
||||
var $_allowAnswer='';
|
||||
var $_allowDrop='';
|
||||
var $_allowXfer='';
|
||||
var $_allowConf='';
|
||||
var $_bcolor='';
|
||||
var $_background_color='';
|
||||
var $_toptitle='';
|
||||
var $_toptitle_icon='';
|
||||
var $_toptitle_color='';
|
||||
@ -105,7 +108,7 @@ class AastraIPPhone {
|
||||
|
||||
function setBackgroundColor($color)
|
||||
{
|
||||
$this->_bcolor = $color;
|
||||
$this->_background_color = $color;
|
||||
}
|
||||
|
||||
function setTitle($title,$color='')
|
||||
@ -159,6 +162,15 @@ class AastraIPPhone {
|
||||
$this->_lockin='call';
|
||||
}
|
||||
|
||||
function setCallProtection($notif=False)
|
||||
{
|
||||
if($notif==True) {
|
||||
$this->_callprotection='notif';
|
||||
} else {
|
||||
$this->_callprotection='yes';
|
||||
}
|
||||
}
|
||||
|
||||
function setTimeout($timeout)
|
||||
{
|
||||
$this->_timeout=$timeout;
|
||||
@ -213,7 +225,8 @@ class AastraIPPhone {
|
||||
|
||||
function addIcon($index, $icon)
|
||||
{
|
||||
if(Aastra_is_icons_supported()) $this->_icons[$index] = new AastraIPPhoneIconEntry($index, $icon);
|
||||
# if(Aastra_is_icons_supported()) $this->_icons[$index] = new AastraIPPhoneIconEntry($index, $icon);
|
||||
$this->_icons[$index] = new AastraIPPhoneIconEntry($index, $icon);
|
||||
}
|
||||
|
||||
function escape($string)
|
||||
|
@ -81,12 +81,13 @@
|
||||
# None
|
||||
#
|
||||
# Returns an array
|
||||
# 'model' Phone Type
|
||||
# 'model' Phone Model
|
||||
# 'mac' Phone MAC Address
|
||||
# 'firmware' Phone firmware version
|
||||
# 'ip' Phone Remote IP address
|
||||
# 'language' Phone Language
|
||||
# 'module'[x] Expansion Modules
|
||||
# 'minet' Boolean for Minet firmware
|
||||
# 'rp' Boolean for RP set
|
||||
###################################################################################################
|
||||
function Aastra_decode_HTTP_header()
|
||||
@ -94,15 +95,15 @@ function Aastra_decode_HTTP_header()
|
||||
Global $TEST;
|
||||
|
||||
# Debug mode
|
||||
if($TEST)
|
||||
{
|
||||
if($TEST) {
|
||||
# Calculate fake mac address suffix based on client's source address
|
||||
$fake_mac_suffix = strtoupper(substr(md5(Aastra_getvar_safe('REMOTE_ADDR','','SERVER')),0,6));
|
||||
$array=array( 'model'=>'Aastra57i',
|
||||
$array=array( 'model'=>'Mitel6930',
|
||||
'mac'=>'00085D'.$fake_mac_suffix,
|
||||
'firmware'=>'2.5.3.26',
|
||||
'firmware'=>'5.0.0',
|
||||
'ip'=>Aastra_getvar_safe('REMOTE_ADDR','','SERVER'),
|
||||
'language'=>'en',
|
||||
'minet'=>False,
|
||||
'rp'=>False
|
||||
);
|
||||
return($array);
|
||||
@ -110,16 +111,16 @@ if($TEST)
|
||||
|
||||
# User Agent
|
||||
$user_agent=Aastra_getvar_safe('HTTP_USER_AGENT','','SERVER');
|
||||
|
||||
if(stristr($user_agent,'Aastra'))
|
||||
{
|
||||
$minet=False;
|
||||
if(stristr($user_agent,'Aastra') or stristr($user_agent,'Mitel')) {
|
||||
$count=0;
|
||||
$user_agent=str_replace('MitelMINET_','Mitel',$user_agent,$count);
|
||||
if($count>0) $minet=True;
|
||||
$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
|
||||
{
|
||||
} else {
|
||||
$value[0]='MSIE';
|
||||
$value[1]='NA';
|
||||
$value[2]='NA';
|
||||
@ -127,8 +128,7 @@ else
|
||||
|
||||
# Modification for RP phones
|
||||
$rp=False;
|
||||
if(strstr($value[0],'RP'))
|
||||
{
|
||||
if(strstr($value[0],'RP')) {
|
||||
$rp=True;
|
||||
$value[0]=preg_replace(array('/67/','/ RP/'),array('',''),$value[0]);
|
||||
}
|
||||
@ -139,7 +139,15 @@ $module[2]=Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD2','','SERVER');
|
||||
$module[3]=Aastra_getvar_safe('HTTP_X_AASTRA_EXPMOD3','','SERVER');
|
||||
|
||||
# Create array
|
||||
$array=array('model'=>$value[0],'mac'=>$value[1],'firmware'=>$value[2],'ip'=>Aastra_getvar_safe('REMOTE_ADDR','','SERVER'),'module'=>$module,'language'=>Aastra_getvar_safe('HTTP_ACCEPT_LANGUAGE','','SERVER'),'rp'=>$rp);
|
||||
$array=array( 'model'=>$value[0],
|
||||
'mac'=>$value[1],
|
||||
'firmware'=>$value[2],
|
||||
'ip'=>Aastra_getvar_safe('REMOTE_ADDR','','SERVER'),
|
||||
'module'=>$module,
|
||||
'language'=>Aastra_getvar_safe('HTTP_ACCEPT_LANGUAGE','','SERVER'),
|
||||
'minet'=>$minet,
|
||||
'rp'=>$rp
|
||||
);
|
||||
return($array);
|
||||
}
|
||||
|
||||
@ -156,8 +164,7 @@ return($array);
|
||||
###################################################################################################
|
||||
function Aastra_escape_encode($string)
|
||||
{
|
||||
return(str_replace(
|
||||
array('<', '>', '&'),
|
||||
return(str_replace( array('<', '>', '&'),
|
||||
array('<', '>', '&'),
|
||||
$string
|
||||
));
|
||||
@ -176,8 +183,7 @@ return(str_replace(
|
||||
###################################################################################################
|
||||
function Aastra_escape_decode($string)
|
||||
{
|
||||
return(str_replace(
|
||||
array('<', '>', '&'),
|
||||
return(str_replace( array('<', '>', '&'),
|
||||
array('<', '>', '&'),
|
||||
$string
|
||||
));
|
||||
@ -206,9 +212,10 @@ $return=0;
|
||||
# Start with the HTTP header
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Must be an Aastra
|
||||
if(stristr($header['model'],'Aastra'))
|
||||
{
|
||||
# Must be an Aastra/Mitel
|
||||
if(stristr($header['model'],'Aastra') or stristr($header['model'],'Mitel')) {
|
||||
# Always OK for Minet phones
|
||||
if(!$header['minet']) {
|
||||
# Retrieve firmware version
|
||||
$phone_version=$header['firmware'];
|
||||
$piece=preg_split("/\./",$phone_version);
|
||||
@ -223,11 +230,9 @@ if(stristr($header['model'],'Aastra'))
|
||||
if($count>2)$test_version+=$piece[2];
|
||||
|
||||
# Compare to passed version
|
||||
if($test_version>$phone_version)
|
||||
{
|
||||
if($test_version>$phone_version) {
|
||||
$return=2;
|
||||
if($type==0)
|
||||
{
|
||||
if($type==0) {
|
||||
$output = "<AastraIPPhoneTextScreen>\n";
|
||||
$output .= "<Title>Firmware not compatible</Title>\n";
|
||||
$output .= "<Text>This XML application needs firmware version $version or better.</Text>\n";
|
||||
@ -239,12 +244,10 @@ if(stristr($header['model'],'Aastra'))
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$return=1;
|
||||
if($type==0)
|
||||
{
|
||||
echo "This XML application works better when using a Mitel SIP phone, not a Web browser.<p>See <a href=\"http://www.mitel.com/node/35841\">here</a> for instructions and information.<p>Copyright Mitel Networks 2005-2014.";
|
||||
if($type==0) {
|
||||
echo "This XML application works better when using a Mitel IP phone, not a Web browser.<p>See <a href=\"http://www.mitel.com/node/35841\">here</a> for instructions and information.<p>Copyright Mitel Networks 2005-2014.";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -269,7 +272,7 @@ return($return);
|
||||
# 2=480i,480i Cordless
|
||||
# 3=6730i,6731i,6751i,6753i,9143i,6863i,6865i
|
||||
# 4=6755i,6757i,6757iCT,9480i,9480iCT,6735i,6737i,6867i,6869i,6873i
|
||||
# 5=6739i, 8000i
|
||||
# 5=6739i, Aastra8000i
|
||||
#
|
||||
# Returns
|
||||
# 0 everything is fine
|
||||
@ -303,7 +306,7 @@ else
|
||||
$models=array('Aastra6730i','Aastra6731i','Aastra51i','Aastra53i','Aastra6863i','Aastra6865i');
|
||||
break;
|
||||
case '4':
|
||||
$models=array('Aastra55i','Aastra57iCTi','Aastra9480i','Aastra9480iCT','Aastra6735i','Aastra6737i','Aastra6867i','Aastra6869i','Aastra6873i');
|
||||
$models=array('Aastra55i','Aastra57iCTi','Aastra9480i','Aastra9480iCT','Aastra6735i','Aastra6737i','Aastra6867i','Aastra6869i','Aastra6873i','Aastra6920','Aastra6930','Aastra6940','Mitel6920','Mitel6930','Mitel6940');
|
||||
break;
|
||||
case '5':
|
||||
$models=array('Aastra6739i','Aastra8000i');
|
||||
@ -342,10 +345,8 @@ if($TEST) return True;
|
||||
# Get phone characteristics
|
||||
$header=Aastra_decode_HTTP_header();
|
||||
if(in_array($header['model'],$models)==$check) return True;
|
||||
else
|
||||
{
|
||||
if($type==0)
|
||||
{
|
||||
else {
|
||||
if($type==0) {
|
||||
$output = "<AastraIPPhoneTextScreen>\n";
|
||||
$output .= "<Title>Phone not supported</Title>\n";
|
||||
$output .= "<Text>This XML application is not supported by your phone.</Text>\n";
|
||||
@ -377,8 +378,7 @@ $return=True;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test the model
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra9112i':
|
||||
case 'Aastra9133i':
|
||||
case 'Aastra480i':
|
||||
@ -409,8 +409,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test the model
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra8000i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -431,7 +430,7 @@ return($return);
|
||||
###################################################################################################
|
||||
function Aastra_is_top_title_supported($header=NULL)
|
||||
{
|
||||
# True by default
|
||||
# False by default
|
||||
$return=False;
|
||||
|
||||
# Get header info if needed
|
||||
@ -443,6 +442,12 @@ function Aastra_is_top_title_supported($header=NULL)
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
$return=True;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
@ -473,8 +478,7 @@ $return=True;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra9112i':
|
||||
case 'Aastra9133i':
|
||||
case 'Aastra480i':
|
||||
@ -485,6 +489,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra8000i':
|
||||
$return=False;
|
||||
@ -513,8 +523,7 @@ $return=True;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra9112i':
|
||||
case 'Aastra9133i':
|
||||
case 'Aastra480i':
|
||||
@ -548,8 +557,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra55i':
|
||||
case 'Aastra57i':
|
||||
case 'Aastra57iCT':
|
||||
@ -562,6 +570,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
$return=True;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
@ -594,8 +608,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra55i':
|
||||
case 'Aastra57i':
|
||||
case 'Aastra57iCT':
|
||||
@ -608,6 +621,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
$return=True;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
@ -640,8 +659,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra55i':
|
||||
case 'Aastra57i':
|
||||
case 'Aastra57iCT':
|
||||
@ -677,11 +695,16 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
$return=True;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
@ -714,8 +737,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra55i':
|
||||
case 'Aastra57i':
|
||||
case 'Aastra57iCT':
|
||||
@ -752,14 +774,19 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6739i':
|
||||
if(Aastra_test_phone_version('3.2.0.',1,$header)==0) $return=True;
|
||||
break;
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra8000i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -769,66 +796,6 @@ switch($header['model'])
|
||||
return($return);
|
||||
}
|
||||
|
||||
###################################################################################################
|
||||
# Aastra_is_touch_launch_supported(header)
|
||||
#
|
||||
# Parameters
|
||||
# header phone HTTP header (optional)
|
||||
#
|
||||
# Returns
|
||||
# Boolean
|
||||
###################################################################################################
|
||||
function Aastra_is_touch_launch_supported($header=NULL)
|
||||
{
|
||||
# False by default
|
||||
$return=False;
|
||||
|
||||
# Get header info if needed
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
case 'Aastra6873i':
|
||||
$return=True;
|
||||
break;
|
||||
}
|
||||
|
||||
# Return result
|
||||
return($return);
|
||||
}
|
||||
|
||||
###################################################################################################
|
||||
# Aastra_is_font_mono_supported(header)
|
||||
#
|
||||
# Parameters
|
||||
# header phone HTTP header (optional)
|
||||
#
|
||||
# Returns
|
||||
# Boolean
|
||||
###################################################################################################
|
||||
function Aastra_is_font_mono_supported($header=NULL)
|
||||
{
|
||||
# False by default
|
||||
$return=False;
|
||||
|
||||
# Get header info if needed
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
$return=True;
|
||||
break;
|
||||
}
|
||||
|
||||
# Return result
|
||||
return($return);
|
||||
}
|
||||
|
||||
###################################################################################################
|
||||
# Aastra_is_jpeg_graphics_supported(header)
|
||||
#
|
||||
@ -847,8 +814,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6739i':
|
||||
if(Aastra_test_phone_version('3.2.1.',1,$header)==0) $return=True;
|
||||
break;
|
||||
@ -879,8 +845,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6739i':
|
||||
if(Aastra_test_phone_version('3.2.1.',1,$header)==0) $return=True;
|
||||
break;
|
||||
@ -932,11 +897,9 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Version OK?
|
||||
if(Aastra_test_phone_version('2.0.2.',1,$header)==0)
|
||||
{
|
||||
if(Aastra_test_phone_version('2.0.2.',1,$header)==0) {
|
||||
# Test model
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra51i':
|
||||
case 'Aastra9480i':
|
||||
case 'Aastra9480iCT':
|
||||
@ -1053,8 +1016,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra480i':
|
||||
case 'Aastra480i Cordless':
|
||||
case 'Aastra55i':
|
||||
@ -1068,6 +1030,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra8000i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -1095,12 +1063,17 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra8000i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -1128,12 +1101,15 @@ $return=0;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6920':
|
||||
case 'Mitel6920':
|
||||
$return=4;
|
||||
break;
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6930':
|
||||
case 'Mitel6930':
|
||||
$return=5;
|
||||
break;
|
||||
case 'Aastra480i':
|
||||
@ -1146,6 +1122,8 @@ switch($header['model'])
|
||||
case 'Aastra6735i':
|
||||
case 'Aastra6737i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6940':
|
||||
$return=6;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
@ -1176,8 +1154,7 @@ $return=0;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check Model/Version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra480i':
|
||||
case 'Aastra480i Cordless':
|
||||
case 'Aastra55i':
|
||||
@ -1188,14 +1165,20 @@ switch($header['model'])
|
||||
case 'Aastra6735i':
|
||||
case 'Aastra6737i':
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6920':
|
||||
case 'Mitel6920':
|
||||
$return=6;
|
||||
break;
|
||||
case 'Aastra6869i':
|
||||
$return=6;
|
||||
case 'Aastra6930':
|
||||
case 'Mitel6930':
|
||||
$return=8;
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra8000i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6940':
|
||||
$return=10;
|
||||
break;
|
||||
}
|
||||
@ -1204,6 +1187,7 @@ switch($header['model'])
|
||||
return($return);
|
||||
}
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# Aastra_is_doneaction_supported(header)
|
||||
#
|
||||
@ -1264,8 +1248,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Depending on the phone
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6739i':
|
||||
if(Aastra_test_phone_version('3.2.0.',1,$header)==0) $return=True;
|
||||
break;
|
||||
@ -1425,8 +1408,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra480i':
|
||||
case 'Aastra480i Cordless':
|
||||
case 'Aastra55i':
|
||||
@ -1439,6 +1421,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra6739i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -1466,8 +1454,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Check model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra55i':
|
||||
case 'Aastra57i':
|
||||
case 'Aastra57iCT':
|
||||
@ -1478,6 +1465,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra6739i':
|
||||
$return=True;
|
||||
break;
|
||||
@ -1565,8 +1558,7 @@ function Aastra_is_dynamic_sip_supported($header=NULL)
|
||||
$return=False;
|
||||
|
||||
# Check version
|
||||
if($header['model']!='Aastra8000i')
|
||||
{
|
||||
if($header['model']!='Aastra8000i') {
|
||||
if(Aastra_test_phone_version('2.5.0.',1,$header)==0) $return=True;
|
||||
}
|
||||
|
||||
@ -1592,10 +1584,8 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# All but the 6739i
|
||||
if($header['model']!='Aastra6739i')
|
||||
{
|
||||
if(Aastra_test_phone_version('2.6.0.',1,$header)==0)
|
||||
{
|
||||
if($header['model']!='Aastra6739i') {
|
||||
if(Aastra_test_phone_version('2.6.0.',1,$header)==0) {
|
||||
if(Aastra_test_phone_version('3.0.0.',1,$header)!=0) $return=True;
|
||||
}
|
||||
}
|
||||
@ -1622,8 +1612,7 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# All but the 6739i
|
||||
if($header['model']!='Aastra6739i')
|
||||
{
|
||||
if($header['model']!='Aastra6739i') {
|
||||
if(Aastra_test_phone_version('2.6.0.',1,$header)==0) $return=True;
|
||||
}
|
||||
|
||||
@ -1649,14 +1638,19 @@ $return=False;
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Only the 6867i/6869i/6873i/6739i/8000i
|
||||
if($header['model']=='Aastra6739i')
|
||||
{
|
||||
if($header['model']=='Aastra6739i') {
|
||||
if(Aastra_test_phone_version('3.0.1.',1,$header)==0) $return=True;
|
||||
}
|
||||
if($header['model']=='Aastra8000i') $return=True;
|
||||
if($header['model']=='Aastra6867i') $return=True;
|
||||
if($header['model']=='Aastra6869i') $return=True;
|
||||
if($header['model']=='Aastra6873i') $return=True;
|
||||
else if($header['model']=='Aastra6867i') $return=True;
|
||||
else if($header['model']=='Aastra6869i') $return=True;
|
||||
else if($header['model']=='Aastra6873i') $return=True;
|
||||
else if($header['model']=='Aastra6920') $return=True;
|
||||
else if($header['model']=='Aastra6930') $return=True;
|
||||
else if($header['model']=='Aastra6940') $return=True;
|
||||
else if($header['model']=='Mitel6920') $return=True;
|
||||
else if($header['model']=='Mitel6930') $return=True;
|
||||
else if($header['model']=='Mitel6940') $return=True;
|
||||
|
||||
# Return result
|
||||
return($return);
|
||||
@ -1682,9 +1676,8 @@ $return=0;
|
||||
# Get info header if needed
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
|
||||
switch($header['model'])
|
||||
{
|
||||
# Depending on model
|
||||
switch($header['model']) {
|
||||
case 'Aastra51i':
|
||||
case 'Aastra53i':
|
||||
case 'Aastra6730i':
|
||||
@ -1706,6 +1699,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra8000i':
|
||||
$return=14;
|
||||
@ -1733,8 +1732,7 @@ $return=0;
|
||||
# Get info header if needed
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra51i':
|
||||
case 'Aastra53i':
|
||||
case 'Aastra9112i':
|
||||
@ -1762,6 +1760,12 @@ switch($header['model'])
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
case 'Mitel6940':
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra8000i':
|
||||
$return='32';
|
||||
@ -1792,9 +1796,10 @@ $return=0;
|
||||
# Get info header if needed
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6920':
|
||||
case 'Mitel6920':
|
||||
if($mode=='regular') {
|
||||
$array=array( 'width'=>'320','height'=>'184');
|
||||
} else if($mode=='extended') {
|
||||
@ -1804,6 +1809,8 @@ switch($header['model'])
|
||||
}
|
||||
break;
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6930':
|
||||
case 'Mitel6930':
|
||||
if($mode=='regular') {
|
||||
$array=array( 'width'=>'480','height'=>'204');
|
||||
} else if($mode=='extended') {
|
||||
@ -1813,6 +1820,8 @@ switch($header['model'])
|
||||
}
|
||||
break;
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6940':
|
||||
if($mode=='regular') {
|
||||
$array=array( 'width'=>'800','height'=>'372');
|
||||
} else if($mode=='extended') {
|
||||
@ -1871,23 +1880,23 @@ function Aastra_get_custom_icon($icon_name)
|
||||
$return = '000000000000000000000000';
|
||||
|
||||
if($icon_name == 'BoxChecked') return '0000FEC6AA92AAC6FE000000';
|
||||
if($icon_name == 'BoxUnchecked') return '0000FE8282828282FE000000';
|
||||
if($icon_name == 'Office') return '000000FEAEFAAEFE00000000';
|
||||
if($icon_name == 'Cellphone') return '000000007E565AFE00000000';
|
||||
if($icon_name == 'Home') return '000000103E7A3E1000000000';
|
||||
if($icon_name == 'ArrowRightBold') return '000038383838FE7C38100000';
|
||||
if($icon_name == 'ArrowLeftBold') return '000010387CFE383838380000';
|
||||
if($icon_name == 'Bell') return '000000063E7E3E0600000000';
|
||||
if($icon_name == 'Phone') return '000000664E5A4E6600000000';
|
||||
if($icon_name == 'MessageUnread') return '00FEC6AA928A8A92AAC6FE00';
|
||||
if($icon_name == 'MessageRead') return '00FEC6AA924A2A120A060200';
|
||||
if($icon_name == 'Keypad') return '000000540054005400000000';
|
||||
if($icon_name == 'DND') return '0000007CEEEEEE7C00000000';
|
||||
if($icon_name == 'OK') return '0000000804020C30C0000000';
|
||||
if($icon_name == 'Available') return '000000664E5A4E6600000000';
|
||||
if($icon_name == 'Offhook') return '00000002060E96F200000000';
|
||||
if($icon_name == 'Speaker') return '0038387CFE00281044380000';
|
||||
if($icon_name == 'Muted') return '0038387CFE00386C6C6C3800';
|
||||
else if($icon_name == 'BoxUnchecked') return '0000FE8282828282FE000000';
|
||||
else if($icon_name == 'Office') return '000000FEAEFAAEFE00000000';
|
||||
else if($icon_name == 'Cellphone') return '000000007E565AFE00000000';
|
||||
else if($icon_name == 'Home') return '000000103E7A3E1000000000';
|
||||
else if($icon_name == 'ArrowRightBold') return '000038383838FE7C38100000';
|
||||
else if($icon_name == 'ArrowLeftBold') return '000010387CFE383838380000';
|
||||
else if($icon_name == 'Bell') return '000000063E7E3E0600000000';
|
||||
else if($icon_name == 'Phone') return '000000664E5A4E6600000000';
|
||||
else if($icon_name == 'MessageUnread') return '00FEC6AA928A8A92AAC6FE00';
|
||||
else if($icon_name == 'MessageRead') return '00FEC6AA924A2A120A060200';
|
||||
else if($icon_name == 'Keypad') return '000000540054005400000000';
|
||||
else if($icon_name == 'DND') return '0000007CEEEEEE7C00000000';
|
||||
else if($icon_name == 'OK') return '0000000804020C30C0000000';
|
||||
else if($icon_name == 'Available') return '000000664E5A4E6600000000';
|
||||
else if($icon_name == 'Offhook') return '00000002060E96F200000000';
|
||||
else if($icon_name == 'Speaker') return '0038387CFE00281044380000';
|
||||
else if($icon_name == 'Muted') return '0038387CFE00386C6C6C3800';
|
||||
|
||||
return($return);
|
||||
}
|
||||
@ -1919,8 +1928,7 @@ $post .= "Connection: Keep-Alive\r\n";
|
||||
$post .= "Content-Type: text/xml\r\n";
|
||||
$post .= 'Content-Length: '.strlen($xml)."\r\n\r\n";
|
||||
$fp = @fsockopen($phone,80,$errno, $errstr, 5);
|
||||
if($fp)
|
||||
{
|
||||
if($fp) {
|
||||
fputs($fp, $post.$xml);
|
||||
fclose($fp);
|
||||
$return=True;
|
||||
@ -1946,22 +1954,7 @@ return($return);
|
||||
###################################################################################################
|
||||
function Aastra_getvar_safe($var_name,$default='',$method='GET')
|
||||
{
|
||||
eval('$return = (isset($_'.$method.'["'.$var_name.'"])) ? htmlentities(html_entity_decode((trim($_'.$method.'["'.$var_name.'"])),ENT_QUOTES),ENT_QUOTES) : $default;');
|
||||
|
||||
$m_patterns = array();
|
||||
$m_patterns[0] = '/&/';
|
||||
$m_patterns[1] = '/"/';
|
||||
$m_patterns[2] = '/</';
|
||||
$m_patterns[3] = '/>/';
|
||||
$m_replacements = array();
|
||||
$m_replacements[0] = '&';
|
||||
$m_replacements[1] = '"';
|
||||
$m_replacements[2] = '<';
|
||||
$m_replacements[3] = '>';
|
||||
|
||||
$return = preg_replace($m_patterns, $m_replacements, $return);
|
||||
$return = html_entity_decode($return,ENT_QUOTES);
|
||||
|
||||
eval('$return = (isset($_'.$method.'["'.$var_name.'"])) ? htmlentities(html_entity_decode(stripslashes((trim($_'.$method.'["'.$var_name.'"]))),ENT_QUOTES),ENT_QUOTES) : $default;');
|
||||
return $return;
|
||||
}
|
||||
|
||||
@ -1999,7 +1992,7 @@ return(md5($header['model'].$header['mac'].$header['ip']));
|
||||
# 2=480i,480i Cordless
|
||||
# 3=6730i,6731i,6751i,6753i,9143i
|
||||
# 4=6755i,6757i,6757iCT
|
||||
# 5=6739i,8000i
|
||||
# 5=6739i,VideoPhone
|
||||
###################################################################################################
|
||||
function Aastra_phone_type($header=NULL)
|
||||
{
|
||||
@ -2010,8 +2003,7 @@ $return='0';
|
||||
if(!$header) $header=Aastra_decode_HTTP_header();
|
||||
|
||||
# Test model/version
|
||||
switch($header['model'])
|
||||
{
|
||||
switch($header['model']) {
|
||||
case 'Aastra9112i':
|
||||
case 'Aastra9133ii':
|
||||
$return='1';
|
||||
@ -2038,11 +2030,17 @@ switch($header['model'])
|
||||
case 'Aastra6737i':
|
||||
case 'Aastra6867i':
|
||||
case 'Aastra6869i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6920':
|
||||
case 'Aastra6930':
|
||||
case 'Mitel6920':
|
||||
case 'Mitel6930':
|
||||
$return='4';
|
||||
break;
|
||||
case 'Aastra6739i':
|
||||
case 'Aastra8000i':
|
||||
case 'Aastra6873i':
|
||||
case 'Aastra6940':
|
||||
case 'Mitel6940':
|
||||
$return='5';
|
||||
break;
|
||||
}
|
||||
|
@ -19,12 +19,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -42,16 +46,20 @@
|
||||
# @flush boolean optional, output buffer to be flushed out or not.
|
||||
#
|
||||
# Specific to the object
|
||||
# addLine(text,size,align,color) to add a formatted line
|
||||
# addLine(text,size,align,color,wrap,blink) to add a formatted line
|
||||
# @text string
|
||||
# @size string, optional, "small", "double" or "large"
|
||||
# @align string, optional, "left", "right" or "center"
|
||||
# @color string, optional, "red", "black", ...
|
||||
# addText(text,size,align,$color) to add a formatted text as formatted lines
|
||||
# @wrap boolean, optional, "yes", "no" (default)
|
||||
# @blink string, optional, "slow", "fast" or "no" (default)
|
||||
# addText(text,size,align,$color,wrap,blink) to add a formatted text as formatted lines
|
||||
# @text string, can include carriage returns
|
||||
# @size string, optional, "double"
|
||||
# @align string, optional, "left", "right" or "center"
|
||||
# @color string, optional, "red", "black", ...
|
||||
# @wrap boolean, optional, "yes", "no" (default)
|
||||
# @blink string, optional, "slow", "fast" or "no" (default)
|
||||
# setScrollStart(height) to define the beginning of the scrolling section and its height
|
||||
# @height integer
|
||||
# setScrollEnd() to define the end of the scrolling section
|
||||
@ -105,25 +113,25 @@ class AastraIPPhoneFormattedTextScreen extends AastraIPPhone {
|
||||
var $_dialLine='';
|
||||
var $_fontMono='';
|
||||
|
||||
function addLine($text, $size=NULL, $align=NULL, $color=NULL)
|
||||
function addLine($text, $size=NULL, $align=NULL, $color=NULL, $wrap=NULL, $blink=NULL)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $color, 'normal');
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $color, $wrap, $blink, 'normal');
|
||||
}
|
||||
|
||||
function addText($text, $size=NULL, $align=NULL, $color=NULL)
|
||||
function addText($text, $size=NULL, $align=NULL, $color=NULL, $wrap=NULL, $blink=NULL)
|
||||
{
|
||||
$pieces=explode("\n",wordwrap($text,$this->_display_size,"\n",True));
|
||||
foreach($pieces as $value) $this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($value, $size, $align, $color, 'normal');
|
||||
foreach($pieces as $value) $this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($value, $size, $align, $color, $wrap, $blink, 'normal');
|
||||
}
|
||||
|
||||
function setScrollStart($height)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, $height, NULL, NULL, 'scrollstart');
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, $height, NULL, NULL, NULL, NULL, 'scrollstart');
|
||||
}
|
||||
|
||||
function setScrollEnd()
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, NULL, NULL, NULL, 'scrollend');
|
||||
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, NULL, NULL, NULL, NULL, NULL, 'scrollend');
|
||||
}
|
||||
|
||||
function setDoneAction($uri)
|
||||
@ -198,6 +206,11 @@ class AastraIPPhoneFormattedTextScreen extends AastraIPPhone {
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# AllowAnswer
|
||||
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
|
||||
|
||||
@ -213,6 +226,9 @@ class AastraIPPhoneFormattedTextScreen extends AastraIPPhone {
|
||||
# TimeOut
|
||||
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# AllowDTMF
|
||||
if($this->_allowDTMF=='yes') $out .= " allowDTMF=\"yes\"";
|
||||
|
||||
|
@ -12,15 +12,19 @@ class AastraIPPhoneFormattedTextScreenEntry extends AastraIPPhone {
|
||||
var $_size;
|
||||
var $_align;
|
||||
var $_color;
|
||||
var $_wrap;
|
||||
var $_blink;
|
||||
var $_type;
|
||||
|
||||
function AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $color, $type)
|
||||
function AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $color, $wrap, $blink, $type)
|
||||
{
|
||||
if($size=='double')$this->_text=$this->convert_high_ascii($text);
|
||||
else $this->_text=$text;
|
||||
$this->_size=$size;
|
||||
$this->_align=$align;
|
||||
$this->_color=$color;
|
||||
$this->_wrap=$wrap;
|
||||
$this->_blink=$blink;
|
||||
$this->_type=$type;
|
||||
}
|
||||
|
||||
@ -33,6 +37,8 @@ class AastraIPPhoneFormattedTextScreenEntry extends AastraIPPhone {
|
||||
if($this->_size!=NULL) $xml .= " Size=\"{$this->_size}\"";
|
||||
if($this->_align!=NULL) $xml .= " Align=\"{$this->_align}\"";
|
||||
if($this->_color!=NULL) $xml .= " Color=\"{$this->_color}\"";
|
||||
if($this->_wrap!=NULL) $xml .= " wrap=\"{$this->_wrap}\"";
|
||||
if($this->_blink!=NULL) $xml .= " blink=\"{$this->_blink}\"";
|
||||
$xml .= ">";
|
||||
$xml .= $this->escape($this->_text)."</Line>\n";
|
||||
break;
|
||||
|
242
php_classes/AastraIPPhoneIconMenu.class.php
Normal file
242
php_classes/AastraIPPhoneIconMenu.class.php
Normal file
@ -0,0 +1,242 @@
|
||||
<?php
|
||||
########################################################################################################
|
||||
# Aastra XML API Classes - AastraIPPhoneTextMenu
|
||||
# Copyright Mitel Networks 2005-2015
|
||||
#
|
||||
# AastraIPPhoneTextMenu object.
|
||||
#
|
||||
# Public methods
|
||||
#
|
||||
# Inherited from AastraIPPhone
|
||||
# setTitle(Title) to setup the title of an object (optional)
|
||||
# @title string
|
||||
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
|
||||
# setTopTitle(title,color,icon_index) to set the Top Title of the XML screen (6739i only)
|
||||
# @title string
|
||||
# @color string, "red", "blue", ... (optional)
|
||||
# @icon_index integer, icon number
|
||||
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
|
||||
# setBeep() to enable a notification beep with the object (optional)
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
# @uri string
|
||||
# @icon_index integer, icon number
|
||||
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# @URL string
|
||||
# setEncodingUTF8() to change encoding from default ISO-8859-1 to UTF-8 (optional)
|
||||
# addIcon(index,icon) to add custom icons to the object (optional)
|
||||
# @index integer, icon index
|
||||
# @icon string, icon name or definition
|
||||
# generate() to return the generated XML for the object
|
||||
# output(flush) to display the object
|
||||
# @flush boolean optional, output buffer to be flushed out or not.
|
||||
#
|
||||
# Specific to the object
|
||||
# setLayout(layout) to set the desired layout
|
||||
# @layout 1 or 2
|
||||
# setMode(mode) to set the screen mode
|
||||
# @mode 'regular' or 'extended'
|
||||
# setDefaultIndex(index) to set the default selection in the list (optional)
|
||||
# @index index (1-24)
|
||||
# setFontMono(fontMono) to decide the use of the monotype font
|
||||
# @fontMono boolean ("yes"/"no")
|
||||
# addEntry(url,selection,icon,iconScaled,fontMono,dial,line) to add an element in the list to be displayed
|
||||
# @url string
|
||||
# @selection string (optional)
|
||||
# @icon string (optional)
|
||||
# @iconScaled boolean (optional)
|
||||
# @fontMono boolean (optional)
|
||||
# @dial string, phone number to dial (optional)
|
||||
# @line integer, SIP line to use (optional)
|
||||
# addLine(text,align,color) to add a line in the current item
|
||||
# @text string
|
||||
# @align string, optional, "left", "right" or "center"
|
||||
# @color string, optional, "red", "black", ...
|
||||
#
|
||||
# Example
|
||||
# require_once('AastraIPPhoneIconMenu.class.php');
|
||||
# $menu = new AastraIPPhoneIconMenu();
|
||||
# $menu->setDestroyOnExit();
|
||||
# $menu->setDeFaultIndex('3');
|
||||
# $menu->setLayout('1');
|
||||
# $menu->setMode('regular');
|
||||
# $menu->setFontMono('yes');
|
||||
# $menu->addEntry('http://myserver.com/script.php?choice=1','Value=1','Icon:Alarm','yes');
|
||||
# $menu->addLine('Line 11','left','red');
|
||||
# $menu->addLine('Line 12','right','green');
|
||||
# $menu->addLine('Line 13','center','blue');
|
||||
# $menu->addEntry('http://myserver.com/script.php?choice=2','Value=2','Icon:AlarmFilled','no');
|
||||
# $menu->addLine('Line 21','left','red');
|
||||
# $menu->addLine('Line 22','right','green');
|
||||
# $menu->addLine('Line 23','center','blue');
|
||||
# $menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1');
|
||||
# $menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
|
||||
# $menu->output();
|
||||
#
|
||||
########################################################################################################
|
||||
require_once('AastraIPPhone.class.php');
|
||||
require_once('AastraIPPhoneIconMenuEntry.class.php');
|
||||
|
||||
class AastraIPPhoneIconMenu extends AastraIPPhone {
|
||||
var $_layout='';
|
||||
var $_mode='';
|
||||
var $_defaultIndex='';
|
||||
var $_style='';
|
||||
var $_maxitems='24';
|
||||
var $_fontMono='';
|
||||
|
||||
function setLayout($layout)
|
||||
{
|
||||
$this->_layout = $layout;
|
||||
}
|
||||
|
||||
function setMode($mode)
|
||||
{
|
||||
$this->_mode = $mode;
|
||||
}
|
||||
|
||||
function setFontMono($fontMono)
|
||||
{
|
||||
$this->_fontMono = $fontMono;
|
||||
}
|
||||
|
||||
function setDefaultIndex($defaultIndex)
|
||||
{
|
||||
$this->_defaultIndex = $defaultIndex;
|
||||
}
|
||||
|
||||
function setStyle($style)
|
||||
{
|
||||
$this->_style = $style;
|
||||
}
|
||||
|
||||
function addEntry($url, $selection=NULL, $icon=NULL, $iconScaled=NULL, $fontMono=NULL, $dial=NULL, $line=NULL)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneIconMenuEntry( $url,
|
||||
$selection,
|
||||
$icon,
|
||||
$iconScaled,
|
||||
$fontMono,
|
||||
$dial,
|
||||
$line
|
||||
);
|
||||
}
|
||||
|
||||
function addLine($text, $align=NULL, $color=NULL)
|
||||
{
|
||||
$index=count($this->_entries);
|
||||
if($index>0) {
|
||||
$this->_entries[$index-1]->addLine($text, $align, $color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function render()
|
||||
{
|
||||
# Beginning of root tag
|
||||
$out = "<AastraIPPhoneIconMenu";
|
||||
|
||||
# DestroyOnExit
|
||||
if ($this->_destroyOnExit=='yes') $out .= " destroyOnExit=\"yes\"";
|
||||
|
||||
# DefaultIndex
|
||||
if ($this->_defaultIndex!="") $out .= " defaultIndex=\"{$this->_defaultIndex}\"";
|
||||
|
||||
# Layout
|
||||
if ($this->_layout!='') $out .= " layout=\"{$this->_layout}\"";
|
||||
|
||||
# Mode
|
||||
if ($this->_mode!='') $out .= " mode=\"{$this->_mode}\"";
|
||||
|
||||
# FontMono
|
||||
if ($this->_fontMono!='') $out .= " fontMono=\"{$this->_fontMono}\"";
|
||||
|
||||
# Beep
|
||||
if ($this->_beep=='yes') $out .= " Beep=\"yes\"";
|
||||
|
||||
# Lockin
|
||||
if($this->_lockin!='') {
|
||||
$out .= " LockIn=\"{$this->_lockin}\"";
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# Timeout
|
||||
if ($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# Font Monotype
|
||||
if ($this->_fontMono == 'no') $out .= " fontMono=\"no\"";
|
||||
|
||||
# End of root tag
|
||||
$out .= ">\n";
|
||||
|
||||
# Top Title
|
||||
if ($this->_toptitle!='')
|
||||
{
|
||||
$toptitle = $this->escape($this->_toptitle);
|
||||
$out .= "<TopTitle";
|
||||
if ($this->_toptitle_icon!='') $out .= " icon=\"{$this->_toptitle_icon}\"";
|
||||
if ($this->_toptitle_color!='') $out .= " Color=\"{$this->_toptitle_color}\"";
|
||||
$out .= ">".$toptitle."</TopTitle>\n";
|
||||
}
|
||||
|
||||
# Menu items
|
||||
if (isset($this->_entries) && is_array($this->_entries))
|
||||
{
|
||||
$index=0;
|
||||
$is_softkeys=Aastra_is_softkeys_supported();
|
||||
foreach ($this->_entries as $entry)
|
||||
{
|
||||
if($index<$this->_maxitems) $out .= $entry->render();
|
||||
$index++;
|
||||
}
|
||||
}
|
||||
|
||||
# Softkeys
|
||||
if (isset($this->_softkeys) && is_array($this->_softkeys))
|
||||
{
|
||||
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
|
||||
}
|
||||
|
||||
# Icons
|
||||
if (isset($this->_icons) && is_array($this->_icons))
|
||||
{
|
||||
$IconList=False;
|
||||
foreach ($this->_icons as $icon)
|
||||
{
|
||||
if(!$IconList)
|
||||
{
|
||||
$out .= "<IconList>\n";
|
||||
$IconList=True;
|
||||
}
|
||||
$out .= $icon->render();
|
||||
}
|
||||
if($IconList) $out .= "</IconList>\n";
|
||||
}
|
||||
|
||||
# End Tag
|
||||
$out .= "</AastraIPPhoneIconMenu>\n";
|
||||
|
||||
# Return XML object
|
||||
return($out);
|
||||
}
|
||||
}
|
||||
?>
|
87
php_classes/AastraIPPhoneIconMenuEntry.class.php
Normal file
87
php_classes/AastraIPPhoneIconMenuEntry.class.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
################################################################################
|
||||
# Aastra XML API Classes - AastraIPPhoneTextMenuEntry
|
||||
# Copyright Mitel Networks 2005-2015
|
||||
#
|
||||
# Internal class for AastraIPPhoneTextMenu object.
|
||||
################################################################################
|
||||
|
||||
class AastraIPPhoneIconMenuEntry extends AastraIPPhone {
|
||||
var $_url;
|
||||
var $_selection;
|
||||
var $_icon;
|
||||
var $_iconScaled;
|
||||
var $_fontMono;
|
||||
var $_dial;
|
||||
var $_line;
|
||||
var $_lines=array();
|
||||
|
||||
function AastraIPPhoneIconMenuEntry($url, $selection, $icon, $iconScaled, $fontMono, $dial, $line)
|
||||
{
|
||||
$this->_url=$url;
|
||||
$this->_selection=$selection;
|
||||
$this->_icon=$icon;
|
||||
$this->_iconScaled=$iconScaled;
|
||||
$this->_dial=$dial;
|
||||
$this->_line=$line;
|
||||
$this->_fontMono=$fontMono;
|
||||
}
|
||||
|
||||
function addLine($text, $align, $color)
|
||||
{
|
||||
$this->_lines[]=array('text'=>$text,'align'=>$align,'color'=>$color);
|
||||
}
|
||||
|
||||
function render()
|
||||
{
|
||||
# Opening
|
||||
$xml = '<MenuItem';
|
||||
if($this->_fontMono!='') $xml .= " fontMono=\"{$this->_fontMono}\"";
|
||||
$xml .= ">\n";
|
||||
|
||||
# Prompt
|
||||
$icon = $this->escape($this->_icon);
|
||||
$xml .= "<iconName";
|
||||
if($this->_iconScaled!='') $xml .= " scaled=\"{$this->_iconScaled}\"";
|
||||
$xml .= ">{$icon}</iconName>\n";
|
||||
|
||||
# URI
|
||||
$url = $this->escape($this->_url);
|
||||
$xml .= "<URI>{$url}</URI>\n";
|
||||
|
||||
# Selection
|
||||
$selection = $this->escape($this->_selection);
|
||||
if($selection!=NULL) $xml .= "<Selection>{$selection}</Selection>\n";
|
||||
|
||||
# Dial
|
||||
if($this->_dial!=NULL)
|
||||
{
|
||||
if($this->_line!=NULL) $xml .= "<Dial line=\"{$this->_line}\">{$this->_dial}</Dial>\n";
|
||||
else $xml .= "<Dial>{$this->_dial}</Dial>\n";
|
||||
}
|
||||
|
||||
# Lines
|
||||
foreach($this->_lines as $value) {
|
||||
$xml .= '<Line';
|
||||
if($value['align']!='') {
|
||||
$align = $this->escape($value['align']);
|
||||
$xml .= " Align=\"{$align}\"";
|
||||
}
|
||||
if($value['color']!='') {
|
||||
$color = $this->escape($value['color']);
|
||||
$xml .= " Color=\"{$color}\"";
|
||||
}
|
||||
$xml .= ">";
|
||||
$text = $this->escape($value['text']);
|
||||
if($text!='') $xml .= $text;
|
||||
$xml .= '</Line>'."\n";
|
||||
}
|
||||
|
||||
# Close
|
||||
$xml .= '</MenuItem>'."\n";
|
||||
|
||||
# Return generated vaue
|
||||
return($xml);
|
||||
}
|
||||
}
|
||||
?>
|
@ -19,12 +19,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional, only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -193,6 +197,11 @@ class AastraIPPhoneImageMenu extends AastraIPPhone {
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# AllowAnswer
|
||||
if ($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
|
||||
|
||||
@ -208,6 +217,9 @@ class AastraIPPhoneImageMenu extends AastraIPPhone {
|
||||
# Timeout
|
||||
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# ImageAction
|
||||
if($this->_imageAction != '')
|
||||
{
|
||||
|
@ -19,12 +19,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional, only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional, only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -42,8 +46,9 @@
|
||||
# @flush boolean optional, output buffer to be flushed out or not.
|
||||
#
|
||||
# Specific to the object
|
||||
# setImage(image) to define the image to be displayed
|
||||
# setImage(image,scaling) to define the image to be displayed
|
||||
# @image string
|
||||
# @scaling scaling indicator "yes"/"no" optional
|
||||
# setGDImage(GDImage) to use a GDImage for display, the size is forced to 40x144
|
||||
# @GDImage GDImage
|
||||
# setSPImage(SPImage) to use a SPImage for display, the size is forced to 40x144
|
||||
@ -51,6 +56,7 @@
|
||||
# setAlignment(vertical,horizontal) to define image alignment
|
||||
# @vertical string, "top", "middle", "bottom"
|
||||
# @horizontal string, "left", "middle", "right"
|
||||
# setScaling() to indicate if image must be scaled
|
||||
# setSize(height,width) to define image size
|
||||
# @height integer (pixels)
|
||||
# @width integer (pixels)
|
||||
@ -118,6 +124,7 @@ class AastraIPPhoneImageScreen extends AastraIPPhone {
|
||||
var $_image;
|
||||
var $_verticalAlign=NULL;
|
||||
var $_horizontalAlign=NULL;
|
||||
var $_scaled='';
|
||||
var $_height=NULL;
|
||||
var $_width=NULL;
|
||||
var $_allowDTMF='';
|
||||
@ -140,6 +147,11 @@ class AastraIPPhoneImageScreen extends AastraIPPhone {
|
||||
$this->_horizontalAlign = $horizontal;
|
||||
}
|
||||
|
||||
function setScaling()
|
||||
{
|
||||
$this->_scaled = 'yes';
|
||||
}
|
||||
|
||||
function setSize($height,$width)
|
||||
{
|
||||
$this->_height = $height;
|
||||
@ -249,9 +261,17 @@ class AastraIPPhoneImageScreen extends AastraIPPhone {
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# Timeout
|
||||
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# AllowAnswer
|
||||
if ($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
|
||||
|
||||
@ -315,6 +335,9 @@ class AastraIPPhoneImageScreen extends AastraIPPhone {
|
||||
# Width
|
||||
if($this->_width!=NULL) $out .= " width=\"{$this->_width}\"";
|
||||
|
||||
# Scaling
|
||||
if($this->_scaled!='') $out .= " scaled=\"{$this->_scaled}\"";
|
||||
|
||||
# Image and end of image tag
|
||||
$out .= ">{$this->_image}</Image>\n";
|
||||
|
||||
|
@ -22,12 +22,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -319,6 +323,11 @@ class AastraIPPhoneInputScreen extends AastraIPPhone {
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# AllowAnswer
|
||||
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
|
||||
|
||||
@ -334,6 +343,9 @@ class AastraIPPhoneInputScreen extends AastraIPPhone {
|
||||
# TimeOut
|
||||
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# End of the root tag
|
||||
$out .= ">\n";
|
||||
|
||||
|
77
php_classes/AastraIPPhoneSoftkey.class.php
Normal file
77
php_classes/AastraIPPhoneSoftkey.class.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
########################################################################################################
|
||||
# Aastra XML API Classes - AastraIPPhoneConfiguration
|
||||
# Copyright Mitel Networks 2005-2016
|
||||
#
|
||||
# AastraIPPhoneConfiguration object.
|
||||
#
|
||||
# Public methods
|
||||
#
|
||||
# Inherited from AastraIPPhone
|
||||
# setBeep() to enable a notification beep with the object (optional)
|
||||
# setEncodingUTF8() to change encoding from default ISO-8859-1 to UTF-8 (optional)
|
||||
# generate() to return the generated XML for the object
|
||||
# output(flush) to display the object
|
||||
# @flush boolean optional, output buffer to be flushed out or not.
|
||||
#
|
||||
# Specific to the object
|
||||
# addEntry(parameter,value,type) to add a configuration change
|
||||
# @parameter string, parameter name
|
||||
# @value string, parameter value
|
||||
# @type string, conmfiguration change type (optional)
|
||||
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to
|
||||
# "yes" (optional)
|
||||
#
|
||||
# Example
|
||||
# require_once('AastraIPPhoneConfiguration.class.php');
|
||||
# $configuration = new AastraIPPhoneConfiguration();
|
||||
# $configuration->addEntry('topsoftkey1 label','Test');
|
||||
# $configuration->addEntry('topsoftkey1 background color','blue');
|
||||
# $configuration->output();
|
||||
#
|
||||
########################################################################################################
|
||||
|
||||
require_once('AastraIPPhone.class.php');
|
||||
require_once('AastraIPPhoneSoftkeyParam.class.php');
|
||||
|
||||
class AastraIPPhoneSoftkey extends AastraIPPhone {
|
||||
var $_triggerDestroyOnExit='';
|
||||
|
||||
function addEntry($parameter, $value)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneSoftkeyParam($parameter, $value);
|
||||
}
|
||||
|
||||
function setTriggerDestroyOnExit()
|
||||
{
|
||||
$this->_triggerDestroyOnExit="yes";
|
||||
}
|
||||
|
||||
function render()
|
||||
{
|
||||
# Beginning of root tag
|
||||
$out = "<AastraIPPhoneSoftkey";
|
||||
|
||||
# Beep
|
||||
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
|
||||
|
||||
# TriggerDestroyOnExit
|
||||
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
|
||||
|
||||
# End of root tag
|
||||
$out .= ">\n";
|
||||
|
||||
# Configuration Items
|
||||
if (isset($this->_entries) && is_array($this->_entries))
|
||||
{
|
||||
foreach ($this->_entries as $entry) $out .= $entry->render();
|
||||
}
|
||||
|
||||
# End tag
|
||||
$out .= "</AastraIPPhoneSoftkey>\n";
|
||||
|
||||
# Return XML object
|
||||
return($out);
|
||||
}
|
||||
}
|
||||
?>
|
42
php_classes/AastraIPPhoneSoftkeyParam.class.php
Normal file
42
php_classes/AastraIPPhoneSoftkeyParam.class.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
################################################################################
|
||||
# Aastra XML API Classes - AastraIPPhoneSoftkeyParam
|
||||
# Firmware 2.0 or better
|
||||
# Copyright Mitel Networks 2005-2015
|
||||
#
|
||||
# Internal class for AastraIPPhoneConfiguration object.
|
||||
################################################################################
|
||||
|
||||
class AastraIPPhoneSoftkeyParam extends AastraIPPhone {
|
||||
var $_parameter;
|
||||
var $_value;
|
||||
|
||||
function AastraIPPhoneSoftkeyParam($parameter, $value)
|
||||
{
|
||||
$this->setParameter($parameter);
|
||||
$this->setValue($value);
|
||||
}
|
||||
|
||||
function setParameter($parameter)
|
||||
{
|
||||
$this->_parameter = $parameter;
|
||||
}
|
||||
|
||||
function setValue($value)
|
||||
{
|
||||
$this->_value = $value;
|
||||
}
|
||||
|
||||
|
||||
function render()
|
||||
{
|
||||
$parameter = $this->escape($this->_parameter);
|
||||
$value = $this->escape($this->_value);
|
||||
$xml = "<SoftkeyItem>\n";
|
||||
$xml .= "<Parameter>".$parameter."</Parameter>\n";
|
||||
$xml .= "<Value>".$value."</Value>\n";
|
||||
$xml .= "</SoftkeyItem>\n";
|
||||
return($xml);
|
||||
}
|
||||
}
|
||||
?>
|
@ -60,6 +60,16 @@ class AastraIPPhoneStatus extends AastraIPPhone {
|
||||
$this->_entries[] = new AastraIPPhoneStatusEntry($index, $message, $type, $timeout, $uri, $icon, $color);
|
||||
}
|
||||
|
||||
function addMessage($index, $message, $timeout=NULL, $uri='', $icon=0, $color='')
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneStatusEntry($index, $message, '', $timeout, $uri, $icon, $color);
|
||||
}
|
||||
|
||||
function addToaster($message, $uri='', $icon=0)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneStatusEntry('0', $message, 'toaster', NULL, $uri, $icon, '');
|
||||
}
|
||||
|
||||
function render()
|
||||
{
|
||||
# Beginning of root tag
|
||||
|
@ -22,12 +22,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -57,7 +61,7 @@
|
||||
# setBase(base) to configure the menuItem base URI
|
||||
# @base string
|
||||
# resetBase() to reset the menuItem base URI
|
||||
# addEntry(name,url,selection,icon,dial,line,color,split) to add an element in the list to be displayed
|
||||
# addEntry(name,url,selection,icon,dial,line,color,split,iconr1,iconr2,iconr3,iconr4) to add an element in the list to be displayed
|
||||
# @name string or array(0=>Line1,1=>Line2,2=>Offset,3=>Char,4=>Mode)
|
||||
# @url string
|
||||
# @selection string (optional)
|
||||
@ -66,6 +70,10 @@
|
||||
# @line integer, SIP line to use (optional)
|
||||
# @color string, "red", "black", ... (optional)
|
||||
# @split integer, position of the split between line 1 and line 2 (optional)
|
||||
# @iconr1 integer (optional)
|
||||
# @iconr2 integer (optional)
|
||||
# @iconr3 integer (optional)
|
||||
# @iconr4 integer (optional)
|
||||
# setScrollUp(uri) to set the URI to be called when the user presses the Up arrow (optional)
|
||||
# @uri string
|
||||
# setScrollDown(uri) to set the URI to be called when the user presses the Down arrow (optional)
|
||||
@ -131,10 +139,23 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
$this->_style = $style;
|
||||
}
|
||||
|
||||
function addEntry($name, $url, $selection=NULL, $icon=NULL, $dial=NULL, $line=NULL, $color='', $split=NULL)
|
||||
function addEntry($name, $url, $selection=NULL, $icon=NULL, $dial=NULL, $line=NULL, $color='', $split=NULL, $iconRight1=NULL, $iconRight2=NULL, $iconRight3=NULL, $iconRight4=NULL)
|
||||
{
|
||||
if(!Aastra_is_icons_supported()) $icon=NULL;
|
||||
$this->_entries[] = new AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial, $line, $color, $split, NULL);
|
||||
$this->_entries[] = new AastraIPPhoneTextMenuEntry( $name,
|
||||
$url,
|
||||
$selection,
|
||||
$icon,
|
||||
$dial,
|
||||
$line,
|
||||
$color,
|
||||
$split,
|
||||
NULL,
|
||||
$iconRight1,
|
||||
$iconRight2,
|
||||
$iconRight3,
|
||||
$iconRight4
|
||||
);
|
||||
}
|
||||
|
||||
function setBase($base)
|
||||
@ -226,6 +247,11 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# WrapList
|
||||
if ($this->_wraplist=='yes') $out .= " wrapList=\"yes\"";
|
||||
|
||||
@ -244,6 +270,9 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
# Timeout
|
||||
if ($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# Prevent list wrap
|
||||
if ($this->_scrollConstrain == 'yes') $out .= " scrollConstrain=\"yes\"";
|
||||
|
||||
@ -263,9 +292,6 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
# Unit scroll (6739i)
|
||||
if ($this->_unitScroll == 'yes') $out .= " unitScroll=\"yes\"";
|
||||
|
||||
# Background color(6739i)
|
||||
if ($this->_bcolor != '') $out .= " Bcolor=\"{$this->_bcolor}\"";
|
||||
|
||||
# End of root tag
|
||||
$out .= ">\n";
|
||||
|
||||
|
@ -16,8 +16,12 @@ class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
|
||||
var $_base;
|
||||
var $_split;
|
||||
var $_color;
|
||||
var $_iconRight1;
|
||||
var $_iconRight2;
|
||||
var $_iconRight3;
|
||||
var $_iconRight4;
|
||||
|
||||
function AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial, $line, $color, $split, $base)
|
||||
function AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial, $line, $color, $split, $base, $iconRight1=NULL, $iconRight2=NULL, $iconRight3=NULL, $iconRight4=NULL)
|
||||
{
|
||||
$this->_name=$name;
|
||||
$this->_url=$url;
|
||||
@ -28,6 +32,10 @@ class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
|
||||
$this->_split=$split;
|
||||
$this->_color=$color;
|
||||
$this->_base=$base;
|
||||
$this->_iconRight1=$iconRight1;
|
||||
$this->_iconRight2=$iconRight2;
|
||||
$this->_iconRight3=$iconRight3;
|
||||
$this->_iconRight4=$iconRight4;
|
||||
}
|
||||
|
||||
function getName()
|
||||
@ -121,6 +129,10 @@ class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
|
||||
else $xml .= " base=\"\"";
|
||||
}
|
||||
if($this->_icon!=NULL) $xml .= " icon=\"{$this->_icon}\"";
|
||||
if($this->_iconRight1!=NULL) $xml .= " iconr1=\"{$this->_iconRight1}\"";
|
||||
if($this->_iconRight2!=NULL) $xml .= " iconr2=\"{$this->_iconRight2}\"";
|
||||
if($this->_iconRight3!=NULL) $xml .= " iconr3=\"{$this->_iconRight3}\"";
|
||||
if($this->_iconRight4!=NULL) $xml .= " iconr4=\"{$this->_iconRight4}\"";
|
||||
$xml .= ">\n";
|
||||
|
||||
# Prompt
|
||||
|
@ -22,12 +22,16 @@
|
||||
# setLockIn(uri) to set the Lock-in tag to 'yes' and the GoodbyeLockInURI(optional)
|
||||
# @uri string, GoodByeLockInURI
|
||||
# setLockInCall() to set the Lock-in tag to 'call' (optional)
|
||||
# setCallProtection(notif) to protect the XML object against incoming calls
|
||||
# @notif to enable/disable (false by default) the display of an incoming call notification (optional)
|
||||
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowDrop() to set the allowDrop tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowXfer() to set the allowXfer tag to 'yes' (optional only for non softkey phones)
|
||||
# setAllowConf() to set the allowConf tag to 'yes' (optional only for non softkey phones)
|
||||
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
|
||||
# @timeout integer (seconds)
|
||||
# setBackgroundColor(color) to change the XML object background color (optional)
|
||||
# @color string, "red", "blue", ...
|
||||
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
|
||||
# @index integer, softkey number
|
||||
# @label string
|
||||
@ -167,12 +171,20 @@ class AastraIPPhoneTextScreen extends AastraIPPhone {
|
||||
# TimeOut
|
||||
if ($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
|
||||
|
||||
# Background color
|
||||
if ($this->_background_color!='') $out .= " bgColor=\"{$this->_background_color}\"";
|
||||
|
||||
# Lockin
|
||||
if($this->_lockin!='') {
|
||||
$out .= " LockIn=\"{$this->_lockin}\"";
|
||||
if($this->_lockin_uri!='') $out .= " GoodbyeLockInURI=\"".$this->escape($this->_lockin_uri)."\"";
|
||||
}
|
||||
|
||||
# Call Protection
|
||||
if($this->_callprotection!='') {
|
||||
$out .= " CallProtection=\"{$this->_callprotection}\"";
|
||||
}
|
||||
|
||||
# AllowAnswer
|
||||
if ($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2005-2015 Mitel Networks.
|
||||
Copyright (c) 2005-2017 Mitel Networks.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
Loading…
x
Reference in New Issue
Block a user