2.1.0 version.

This commit is contained in:
2018-02-15 22:59:05 +01:00
parent 7b586f1444
commit 35330993ff
41 changed files with 12066 additions and 2916 deletions

View File

@ -1,62 +1,58 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
# Aastra XML API Classes - AastraIPPhone
# Copyright Aastra Telecom 2007
#
# AastraIPPhone is the root class for all the Aastra XML objects.
#
# Public methods
# setTitle(Title) to setup the title of an object
# setTitle(Title) to setup the title of an object (optional)
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
# setBeep() to enable a notification beep with the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# addSoftkey(index,label,uri) to add custom soktkeys to the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,icon_index) to add custom soktkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# generate() to return the object content
# output() to display the object
#
###################################################################################################
require_once('AastraIPPhoneSoftkeyEntry.class.php');
require_once('AastraIPPhoneIconEntry.class.php');
class AastraIPPhone {
var $_entries;
var $_softkeys;
var $_title;
var $_icons;
var $_title='';
var $_title_wrap='';
var $_destroyOnExit='';
var $_cancelAction='';
var $_refreshTimeout=0;
var $_refreshURL='';
var $_beep='';
var $_lockin='';
var $_timeout=0;
var $_allowAnswer='';
function AastraIPPhone()
{
$this->_entries = array();
$this->_softkeys = array();
$this->_icons = array();
$this->_title = '';
$this->_destroyOnExit='';
$this->_refreshTimeout=0;
$this->_refreshURL='';
$this->_beep='';
$this->_lockin='';
$this->_timeout=0;
$this->_allowAnswer='';
}
function setTitle($title)
@ -64,6 +60,11 @@ class AastraIPPhone {
$this->_title = $title;
}
function setTitleWrap()
{
$this->_title_wrap = "yes";
}
function setRefresh($timeout,$URL)
{
$this->_refreshTimeout = $timeout;
@ -80,6 +81,27 @@ class AastraIPPhone {
$this->_destroyOnExit='yes';
}
function setCancelAction($cancelAction)
{
$this->_cancelAction=$cancelAction;
}
function setLockIn()
{
$this->_lockin='yes';
}
function setTimeout($timeout)
{
$this->_timeout=$timeout;
}
function setAllowAnswer()
{
$this->_allowAnswer='yes';
}
function output()
{
header("Content-type: text/xml");
@ -89,9 +111,21 @@ class AastraIPPhone {
echo($output);
}
function addSoftkey($index, $label, $uri)
function generate()
{
$this->_softkeys[] = new AastraIPPhoneSoftkeyEntry($index, $label, $uri);
$output=$this->render();
return($output);
}
function addSoftkey($index, $label, $uri, $icon=NULL)
{
$this->_softkeys[] = new AastraIPPhoneSoftkeyEntry($index, $this->escape($label), $this->escape($uri), $icon);
}
function addIcon($index, $icon)
{
$this->_icons[] = new AastraIPPhoneIconEntry($index, $icon);
}
function escape($string)

View File

@ -0,0 +1,58 @@
<?php
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneConfiguration
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneConfiguration object.
#
# Public methods
#
# Inherited from AastraIPPhone
# output() to display the object
# generate() to return the object content
# setBeep() to enable a notification beep with the object (optional)
#
# Specific to the object
# addEntry(parameter,value) to add a configuration change.
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to
# "yes" (optional)
#
# Example
# require_once('AastraIPPhoneConfiguration.class.php');
# $configuration = new AastraIPPhoneConfiguration();
# $configuration->addEntry('softkey1 label','Test');
# $configuration->addEntry('softkey1 type','xml');
# $configuration->setTriggerDestroyOnExit();
# $configuration->setBeep();
# $configuration->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneConfigurationEntry.class.php');
class AastraIPPhoneConfiguration extends AastraIPPhone {
function addEntry($parameter, $value)
{
$this->_entries[] = new AastraIPPhoneConfigurationEntry($parameter, $value);
}
function setTriggerDestroyOnExit()
{
$this->_triggerDestroyOnExit="yes";
}
function render()
{
$out = "<AastraIPPhoneConfiguration";
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
$out .= ">\n";
foreach ($this->_entries as $entry) $out .= $entry->render();
$out .= "</AastraIPPhoneConfiguration>\n";
return($out);
}
}
?>

View File

@ -0,0 +1,41 @@
<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneConfigurationEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneConfiguration object.
################################################################################
class AastraIPPhoneConfigurationEntry extends AastraIPPhone {
var $_parameter;
var $_value;
function AastraIPPhoneConfigurationEntry($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 = "<ConfigurationItem>\n";
$xml .= "<Parameter>".$parameter."</Parameter>\n";
$xml .= "<Value>".$value."</Value>\n";
$xml .= "</ConfigurationItem>\n";
return($xml);
}
}
?>

View File

@ -1,49 +1,30 @@
<?
##################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneDirectory
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneDirectory object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setTitle(Title) to setup the title of an object
# setTitle(Title) to setup the title of an object (optional)
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# addSoftkey(index,label,uri) to add custom softkeys to the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,icon_index) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setNext(next) to set URI of the next page, optional
# setPrevious(previous) to set URI of the previous page, optional
# setNext(next) to set URI of the next page (optional)
# setPrevious(previous) to set URI of the previous page (optional)
# addEntry(name,phone) to add an element in the list to be displayed, at least one is needed.
# natsortbyname() to order the list
#
@ -57,8 +38,8 @@
# $directory->addEntry('John Doe', '200');
# $directory->addEntry('Jane Doe', '201');
# $directory->natsortByName();
# $directory->addSoftkey('1','Label 1','http://myserver.com/script.php?action=1');
# $directory->addSoftkey('6','Exit','SoftKey:Exit');
# $directory->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
# $directory->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $directory->output();
#
########################################################################################################
@ -100,17 +81,37 @@ class AastraIPPhoneDirectory extends AastraIPPhone {
function render()
{
$title = $this->escape($this->_title);
$next = $this->escape($this->_next);
$previous = $this->escape($this->_previous);
$out = '';
$out .= "<AastraIPPhoneDirectory";
if($previous!="") $out .= " previous=\"$previous\"";
if($next!="") $out .= " next=\"$next\"";
if($this->_previous!="")
{
$previous = $this->escape($this->_previous);
$out .= " previous=\"$previous\"";
}
if($this->_next!="")
{
$next = $this->escape($this->_next);
$out .= " next=\"$next\"";
}
if($this->_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_lockin=='yes') $out .= " LockIn=\"yes\"";
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
$out .= "<Title>{$title}</Title>\n";
if ($this->_title!='')
{
$title = $this->escape($this->_title);
$out .= "<Title";
if ($this->_title_wrap=='yes') $out .= " wrap=\"yes\"";
$out .= ">".$title."</Title>\n";
}
$index=0;
foreach ($this->_entries as $entry) {
if($index<15) $out .= $entry->render();

View File

@ -1,33 +1,8 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneDirectoryEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneDirectory object.
########################################################################################################

View File

@ -1,44 +1,21 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneExecute
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneTextMenu object.
# AastraIPPhoneExecute object.
#
# Public methods
#
# Inherited from AastraIPPhone
# output() to display the object
# generate() to return the object content
# setBeep() to enable a notification beep with the object (optional)
#
# Specific to the object
# addEntry(url) to add an action to be executed.
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to "yes" (optional)
# addEntry(url,interruptCall) to add an action to be executed.
#
# Example
# require_once('AastraIPPhoneExecute.class.php');
@ -53,10 +30,17 @@ require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneExecuteEntry.class.php');
class AastraIPPhoneExecute extends AastraIPPhone {
function addEntry($url)
var $_defaultIndex="";
var $_triggerDestroyOnExit="";
function addEntry($url,$interruptCall=NULL)
{
$this->_entries[] = new AastraIPPhoneExecuteEntry($url);
$this->_entries[] = new AastraIPPhoneExecuteEntry($url,$interruptCall);
}
function setTriggerDestroyOnExit()
{
$this->_triggerDestroyOnExit="yes";
}
function render()
@ -64,6 +48,7 @@ class AastraIPPhoneExecute extends AastraIPPhone {
$title = $this->escape($this->_title);
$out = "<AastraIPPhoneExecute";
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
$out .= ">\n";
foreach ($this->_entries as $entry) $out .= $entry->render();
$out .= "</AastraIPPhoneExecute>\n";

View File

@ -1,50 +1,28 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
################################################################################
# Aastra XML API Classes - AastraIPPhoneExecuteEntry
# Aastra 480i Firmware 1.4.1 or better
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneExecute object.
################################################################################
class AastraIPPhoneExecuteEntry extends AastraIPPhone {
var $_url;
var $_interruptCall;
function AastraIPPhoneExecuteEntry($url)
function AastraIPPhoneExecuteEntry($url,$interruptCall)
{
$this->_url=$url;
$this->_url = $url;
$this->_interruptCall = $interruptCall;
}
function render()
{
$url = $this->escape($this->_url);
$xml = "<ExecuteItem URI=\"".$url."\"/>\n";
$xml = "<ExecuteItem URI=\"".$url."\"";
if ($this->_interruptCall=='no') $xml .= " interuptCall=\"no\"";
$xml .= "/>\n";
return($xml);
}
}

View File

@ -0,0 +1,113 @@
<?
########################################################################################################
# Aastra XML API Classes - AastraIPFormattedPhoneTextScreen
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneFormattedTextScreen object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index, label, uri) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# addLine(text,size,align) to add a formatted line
# setScrollStart(height) to define the beginning of the scrolling section and its height
# setScrollEnd() to define the end of the scrolling section
# setDoneAction(uri) to set the URI to be called when the user selects the default "Done" key (optional)
#
# Example
# require_once('AastraIPPhoneFormattedTextScreen.class.php');
# $ftext = new AastraIPPhoneFormattedTextScreen();
# $ftext->setDestroyOnExit();
# $ftext->addLine('Formatted Screen','double','center');
# $ftext->setScrollStart('2');
# $ftext->addLine('Scrolled text1');
# $ftext->addLine('Scrolled text2');
# $ftext->addLine('Scrolled text3');
# $ftext->addLine('Scrolled text4');
# $ftext->addLine('Scrolled text5');
# $ftext->setScrollEnd();
# $ftext->addLine('Footer',NULL,'center');
# $ftext->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1','1');
# $ftext->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $ftext->addIcon('1', 'Icon:Envelope');
# $ftext->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneFormattedTextScreenEntry.class.php');
class AastraIPPhoneFormattedTextScreen extends AastraIPPhone {
var $_doneAction="";
function addLine($text, $size=NULL, $align=NULL)
{
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, 'normal');
}
function setScrollStart($height)
{
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, $height, NULL, 'scrollstart');
}
function setScrollEnd()
{
$this->_entries[] = new AastraIPPhoneFormattedTextScreenEntry(NULL, NULL, NULL, 'scrollend');
}
function setDoneAction($uri)
{
$this->_doneAction = $uri;
}
function render()
{
$out = '';
$out .= "<AastraIPPhoneFormattedTextScreen";
if($this->_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_doneAction != "")
{
$doneAction = $this->escape($this->_doneAction);
$out .= " doneAction=\"{$doneAction}\"";
}
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_lockin=='yes') $out .= " LockIn=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
foreach ($this->_entries as $entry) $out .= $entry->render();
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneFormattedTextScreen>\n";
return $out;
}
}
?>

View File

@ -0,0 +1,45 @@
<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneFormattedTextScreenEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneFormattedTextScreen object.
################################################################################
class AastraIPPhoneFormattedTextScreenEntry extends AastraIPPhone {
var $_text;
var $_size;
var $_align;
var $_type;
function AastraIPPhoneFormattedTextScreenEntry($text, $size, $align, $type)
{
$this->_text=$text;
$this->_size=$size;
$this->_align=$align;
$this->_type=$type;
}
function render()
{
switch($this->_type)
{
case "normal":
$xml = "<Line";
if($this->_size!=NULL) $xml .= " Size=\"{$this->_size}\"";
if($this->_align!=NULL) $xml .= " Align=\"{$this->_align}\"";
$xml .= ">";
$xml .= $this->escape($this->_text)."</Line>\n";
break;
case "scrollstart":
$xml = "<Scroll Height=\"{$this->_size}\">\n";
break;
case "scrollend":
$xml = "</Scroll>\n";
break;
}
return($xml);
}
}
?>

View File

@ -0,0 +1,28 @@
<?php
################################################################################
# Aastra XML API Classes - AastraIPIconEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhone object.
################################################################################
class AastraIPPhoneIconEntry {
var $_index;
var $_icon;
function AastraIPPhoneIconEntry($index, $icon)
{
$this->_index=$index;
$this->_icon=$icon;
}
function render()
{
$index = $this->_index;
$icon = $this->_icon;
$xml = "<Icon index=\"{$index}\">{$icon}</Icon>\n";
return($xml);
}
}
?>

View File

@ -0,0 +1,125 @@
<?php
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneImageMenu
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneImageMenu object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# addSoftkey(index,label,uri,icon_index) to add custom softkeys to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setImage(image)to define the image to be displayed
# setAlignment(vertical,horizontal) to define image alignment
# setSize(height,width) to define image size
# setURIBase(uriBase) to define the base URI for the selections
# addURI(key,uri) to add a selection key with its URI
#
# Example
# require_once('AastraIPPhoneImageMenu.class.php');
# $imagem = new AastraIPPhoneImageMenu();
# $imagem->setDestroyOnExit();
# $imagem->setSize(40,144);
# $imagem->setImage('fffffffc02fffffffee4ffffbfffc05fffe7ff7a7ffffffffeffeebd7fffffea6bcfffffe796f3feff6fa289f0a86f4866fa20df42414595dd0134f8037ed1637f0e2522b2dd003b6eb936f05fffbd4f4107bba6eb0080e93715000010b754001281271408c640252081b1b22500013c5c66201368004e04467520dc11067152b82094d418e100247205805494780105002601530020131400020a05c91088b002b08c21c0000c200000001fe800000000000000001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020041000004008300000ff08500000000c900000000710000000000000001401400000140140000014014000001401400000140140000000000000007c0ff00000c30880000081088000008108800000c30700000062000000000003f000001e02000000330200000021000000003301e000001e0330000000021000003f033000002001e0000020000000000001e000c03fc33003c013021007c02101201f00330ff03f001e000039000003e039001e00103f003300101f8021003007c03303f003c01e000000c00001e001c03f033007802002100f002002103e000001203c401702003cc0290ff039c02902101fc02b000007c03f01a003c020039018c0ff02d03c402102703c400001203ec01e000026402b0000264029000026c029000027c01a0000338000000033800000003100000000300000000030003f00003fc03000003fc02000003fc020000030001f0000300000000030001e000030002b000030002900003fc02900003fc01a00003f00000000310030000031c01e000031f003000033f81e00003f383000001e081e000008c003000003c01e00000fc03000001f000000003d001a0000390039000039002d00003f002700000f8012000007c000000001c0000000004000000000000000000000000000');
# $imagem->addURI('1','http://myserver.com?choice=1');
# $imagem->addURI('2','http://myserver.com?Choice=2');
# $imagem->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1','1');
# $imagem->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $imagem->addIcon('1', 'Icon:Envelope');
# $imagem->addIcon('2', 'FFFF0000FFFF0000');
# $imagem->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneImageMenuEntry.class.php');
class AastraIPPhoneImageMenu extends AastraIPPhone {
var $_image;
var $_verticalAlign=NULL;
var $_horizontalAlign=NULL;
var $_height=NULL;
var $_width=NULL;
var $_uriBase=NULL;
function setImage($image)
{
$this->_image = $image;
}
function setAlignment($vertical=NULL,$horizontal=NULL)
{
$this->_verticalAlign = $vertical;
$this->_horizontalAlign = $horizontal;
}
function setSize($height,$width)
{
$this->_height = $height;
$this->_width = $width;
}
function setURIBase($uriBase)
{
$this->_uriBase = $uriBase;
}
function addURI($key, $uri)
{
$this->_entries[] = new AastraIPPhoneImageMenuEntry($key, $uri);
}
function render()
{
$title = $this->escape($this->_title);
$out = "<AastraIPPhoneImageMenu";
if ($this->_destroyOnExit=='yes') $out .= " destroyOnExit=\"yes\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_lockin=='yes') $out .= " LockIn=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
$out .= "<Image";
if($this->_verticalAlign!=NULL) $out .= " verticalAlign=\"{$this->_verticalAlign}\"";
if($this->_horizontalAlign!=NULL) $out .= " horizontalAlign=\"{$this->_horizontalAlign}\"";
if($this->_height!=NULL) $out .= " height=\"{$this->_height}\"";
if($this->_width!=NULL) $out .= " width=\"{$this->_width}\"";
$out .= ">{$this->_image}</Image>\n";
$out .= "<URIList";
$uriBase = $this->escape($this->_uriBase);
if($uriBase!=NULL) $out .= " base=\"{$uriBase}\"";
$out .= ">\n";
foreach ($this->_entries as $entry) $out .= $entry->render();
$out .= "</URIList>\n";
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneImageMenu>\n";
return($out);
}
}
?>

View File

@ -0,0 +1,28 @@
<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneImageMenuEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneImageMenu object.
################################################################################
class AastraIPPhoneImageMenuEntry extends AastraIPPhone {
var $_key;
var $_uri;
function AastraIPPhoneImageMenuEntry($key, $uri)
{
$this->_key=$key;
$this->_uri=$uri;
}
function render()
{
$key = $this->_key;
$uri = $this->escape($this->_uri);
$xml = "<URI key=\"{$key}\">{$uri}</URI>\n";
return($xml);
}
}
?>

View File

@ -0,0 +1,101 @@
<?
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneImageScreen
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneImageScreen object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,icon_index) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setImage(image)to define the image to be displayed
# setAlignment(vertical,horizontal) to define image alignment
# setSize(height,width) to define image size
#
# Example
# require_once('AastraIPPhoneImageScreen.class.php');
# $images = new AastraIPPhoneImageScreen();
# $images->setDestroyOnExit();
# $images->setSize(40,40);
# $images->setImage('fffffffc02fffffffee4ffffbfffc05fffe7ff7a7ffffffffeffeebd7fffffea6bcfffffe796f3feff6fa289f0a86f4866fa20df42414595dd0134f8037ed1637f0e2522b2dd003b6eb936f05fffbd4f4107bba6eb0080e93715000010b754001281271408c640252081b1b22500013c5c66201368004e04467520dc11067152b82094d418e100247205805494780105002601530020931400020ac5c91088b0f2b08c21c07d0c2006009fdfe81f80efe0107fe0fb1c3ffff8ffc3fffef8f7febffbfcf87ffbff64');
# $images->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1','1');
# $images->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $images->addIcon('1', 'Icon:Envelope');
# $images->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
class AastraIPPhoneImageScreen extends AastraIPPhone {
var $_image;
var $_verticalAlign=NULL;
var $_horizontalAlign=NULL;
var $_height=NULL;
var $_width=NULL;
function setImage($image)
{
$this->_image = $image;
}
function setAlignment($vertical=NULL,$horizontal=NULL)
{
$this->_verticalAlign = $vertical;
$this->_horizontalAlign = $horizontal;
}
function setSize($height,$width)
{
$this->_height = $height;
$this->_width = $width;
}
function render()
{
$out = "<AastraIPPhoneImageScreen";
if($this->_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
$out .= "<Image";
if($this->_verticalAlign!=NULL) $out .= " verticalAlign=\"{$this->_verticalAlign}\"";
if($this->_horizontalAlign!=NULL) $out .= " horizontalAlign=\"{$this->_horizontalAlign}\"";
if($this->_height!=NULL) $out .= " height=\"{$this->_height}\"";
if($this->_width!=NULL) $out .= " width=\"{$this->_width}\"";
$out .= ">{$this->_image}</Image>\n";
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneImageScreen>\n";
return $out;
}
}
?>

View File

@ -1,48 +1,30 @@
<?
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneInputScreen
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneInputScreen object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setTitle(Title) to setup the title of an object
# setTitle(Title) to setup the title of an object (optional)
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# addSoftkey(index,label,uri) to add custom softkeys to the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,icon_index) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setURL() to set the URL to called after the input
# setType(type) to set type of input ('IP', 'string'or 'number'), 'string'by default
# Specific to the object - Single Input
# setURL(url) to set the URL to called after the input
# setType(type) to set type of input ('IP', 'string'or 'number'), 'string' by default
# setDefault(default) to set default value for the input (optional)
# setParameter(param) to set the parameter name to be parsed after the input
# setPassword() to set the Password parameter to 'yes', 'no' by default (optional)
@ -50,7 +32,26 @@
# setEditable() is now replaced by setNotEditable but kept for compatibility reasons (optional)
# setPrompt(prompt) to set the prompt to be displayed for the input.
#
# Example
# Specific to the object - Multiple Inputs
# setURL(url) to set the URL to called after the input
# setType(type) to set the default type of input ('IP', 'string'or 'number'), 'string' by default
# setDefault(default) to set default default value for the input (optional)
# setParameter(param) to set the default parameter name to be parsed after the input
# setPassword() to set the default Password parameter to 'yes', 'no' by default (optional)
# setNotEditable() to set the default editable parameter to 'no', 'yes' by default (optional)
# setEditable() is now replaced by setNotEditable but kept for compatibility reasons (optional)
# setPrompt(prompt) to set the default prompt to be displayed for the input.
# setDefaultIndex(index) to define the field index the object will use to start (optional) default is 1
# setDisplayMode(display) to define the aspect of the display, normal/condensed (optional) default is normal.
# addField(type) to add an input field and setting its type (IP, string, number, dateUS, timeUS,dateInt, timeInt or empty) if the type is an empty string then the type is inherited from the main object.
# setFieldPassword(password) to set the password mode for the input field ('yes', no'), overrides the value set by setPassword for the field
# setFieldEditable(editable) to set the input field editable mode ('yes', no'), overrides the value set by setEditable or setNotEditable for the field
# setFieldParameter(parameter) to set the parameter name to be parsed after the global input, overrides the value set by setParameter for the field
# setFieldPrompt(prompt)to set the prompt to be displayed for the input field, overrides the value set by setPrompt for the field
# setFieldDefault(default) to set default value for the input field, overrides the value set by setDefault for the field
# addFieldSoftkey(index,label,uri,icon) to add custom softkeys to the input field, overrides the softkeys set by addSoftkey.
#
# Example 1 - Single Input
# require_once('AastraIPPhoneInputScreen.class.php');
# $input = new AastraIPPhoneInputScreen();
# $input->setTitle('Title');
@ -59,16 +60,33 @@
# $input->setType('string');
# $input->setURL('http://myserver.com/script.php');
# $input->setPassword();
# $input->setDefault('');
# $input->setDestroyOnExit();
# $input->setNotEditable();
# $input->addSoftkey('1','Label 1','http://myserver.com/script.php?action=1');
# $input->addSoftkey('6','Exit','SoftKey:Exit');
# $input->setDefault('Default');
# $input->output();
#
# Example 2 - Multiple Inputs
# require_once('AastraIPPhoneInputScreen.class.php');
# $input = new AastraIPPhoneInputScreen();
# $input->setTitle('Example 2');
# $input->setDisplayMode('condensed');
# $input->setURL('http://myserver.com/script.php');
# $input->setDestroyOnExit();
# $input->addSoftkey('5', 'Done', 'SoftKey:Submit');
# $input->addField('string');
# $input->setFieldPrompt('Username:');
# $input->setFieldParameter('user');
# $input->addFieldSoftkey('3', 'ABC', 'SoftKey:ChangeMode');
# $input->addField('number');
# $input->setFieldPassword('yes');
# $input->setFieldPrompt('Pass:');
# $input->setFieldParameter('passwd');
# $input->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneInputScreenEntry.class.php');
require_once('AastraIPPhoneSoftkeyEntry.class.php');
class AastraIPPhoneInputScreen extends AastraIPPhone {
var $_url;
@ -78,7 +96,9 @@ class AastraIPPhoneInputScreen extends AastraIPPhone {
var $_editable='';
var $_default='';
var $_password='';
var $_defaultindex='';
var $_displaymode='';
function setURL($url)
{
$this->_url=$url;
@ -118,24 +138,103 @@ class AastraIPPhoneInputScreen extends AastraIPPhone {
$this->_prompt=$prompt;
}
function setDefaultIndex($index)
{
$this->_defaultindex=$index;
}
function setDisplayMode($display)
{
$this->_displaymode=$display;
}
function addField($type='')
{
$this->_entries[] = new AastraIPPhoneInputScreenEntry($type);
end($this->_entries);
}
function setFieldType($type)
{
$this->_entries[key($this->_entries)]->_type=$type;
}
function setFieldPassword($password='yes')
{
$this->_entries[key($this->_entries)]->_password=$password;
}
function setFieldEditable($editable='yes')
{
$this->_entries[key($this->_entries)]->_editable=$editable;
}
function setFieldParameter($parameter)
{
$this->_entries[key($this->_entries)]->_parameter=$parameter;
}
function setFieldPrompt($prompt)
{
$this->_entries[key($this->_entries)]->_prompt=$this->escape($prompt);
}
function setFieldDefault($default)
{
$this->_entries[key($this->_entries)]->_default=$default;
}
function addFieldSoftkey($index, $label, $uri, $icon=NULL)
{
$this->_entries[key($this->_entries)]->_softkeys[] = new AastraIPPhoneSoftkeyEntry($index, $this->escape($label), $this->escape($uri), $icon);
}
function render()
{
$title = $this->escape($this->_title);
$prompt = $this->escape($this->_prompt);
$url = $this->escape($this->_url);
$out = '';
$out .= "<AastraIPPhoneInputScreen type=\"$this->_type\"";
if($this->_password == 'yes') $out .= " password=\"yes\"";
if($this->_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\"";
if($this->_editable == 'no') $out .= " editable=\"no\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_editable=='no') $out .= " editable=\"no\"";
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_defaultindex!='') $out .= " defaultIndex=\"".$this->_defaultindex."\"";
if($this->_displaymode!='') $out .= " displayMode=\"".$this->_displaymode."\"";
if($this->_lockin=='yes') $out .= " LockIn=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
$out .= "<Title>{$title}</Title>\n";
$out .= "<Prompt>{$prompt}</Prompt>\n";
if ($this->_title!='')
{
$title = $this->escape($this->_title);
$out .= "<Title";
if ($this->_title_wrap=='yes') $out .= " wrap=\"yes\"";
$out .= ">".$title."</Title>\n";
}
if($this->_prompt != '') $out .= "<Prompt>{$prompt}</Prompt>\n";
$out .= "<URL>{$url}</URL>\n";
$out .= "<Parameter>{$this->_parameter}</Parameter>\n";
if($this->_parameter != '') $out .= "<Parameter>{$this->_parameter}</Parameter>\n";
$out .= "<Default>{$this->_default}</Default>\n";
foreach ($this->_entries as $entry) $out .= $entry->render();
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneInputScreen>\n";
return $out;
}

View File

@ -0,0 +1,40 @@
<?php
################################################################################
# Aastra XML API Classes - AastraIPPhoneInputScreenEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneInputScreen object.
################################################################################
class AastraIPPhoneInputScreenEntry {
var $_type='';
var $_password='';
var $_editable='';
var $_parameter='';
var $_prompt='';
var $_default='';
var $_softkeys;
function AastraIPPhoneInputScreenEntry($type)
{
$this->_type = $type;
$this->_softkeys = array();
}
function render()
{
$xml = "<InputField";
if($this->_type != '') $xml .= " type=\"".$this->_type."\"";
if($this->_password != '') $xml .= " password=\"".$this->_password."\"";
if($this->_editable != '') $xml .= " editable=\"".$this->_editable."\"";
$xml .= ">\n";
if($this->_prompt != '') $xml .= "<Prompt>".$this->_prompt."</Prompt>\n";
if($this->_parameter != '') $xml .= "<Parameter>".$this->_parameter."</Parameter>\n";
if($this->_default != '') $xml .= "<Default>".$this->_default."</Default>\n";
foreach ($this->_softkeys as $softkey) $xml .= $softkey->render();
$xml .= "</InputField>\n";
return($xml);
}
}
?>

View File

@ -1,56 +1,34 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
# Aastra XML API Classes - AastraIPSoftkeyEntry
# Aastra 480i Firmware 1.4.1 or better
################################################################################
# Aastra XML API Classes - AastraIPPhoneSoftkeyEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhone object.
################################################################################
class AastraIPPhoneSoftkeyEntry extends AastraIPPhone {
class AastraIPPhoneSoftkeyEntry {
var $_index;
var $_label;
var $_uri;
var $_icon;
function AastraIPPhoneSoftkeyEntry($index, $label, $uri)
function AastraIPPhoneSoftkeyEntry($index, $label, $uri, $icon)
{
$this->_index=$index;
$this->_label=$label;
$this->_uri=$uri;
$this->_index = $index;
$this->_label = $label;
$this->_uri = $uri;
$this->_icon = $icon;
}
function render()
{
$index = $this->_index;
$uri = $this->escape($this->_uri);
$label = $this->escape($this->_label);
$xml = "<SoftKey index=\"$index\">\n<Label>{$label}</Label>\n<URI>{$uri}</URI>\n</SoftKey>\n";
$xml = "<SoftKey index=\"".$this->_index."\"";
if($this->_icon!=NULL) $xml.= " icon=\"".$this->_icon."\"";
$xml .= ">\n";
$xml .= "<Label>".$this->_label."</Label>\n";
$xml .= "<URI>".$this->_uri."</URI>\n";
$xml .= "</SoftKey>\n";
return($xml);
}
}

View File

@ -1,33 +1,8 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneStatus
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneStatus object.
#
@ -35,11 +10,15 @@
#
# Inherited from AastraIPPhone
# output() to display the object
# generate() to return the object content
# setBeep() to enable a notification beep with the object (optional)
#
# Specific to the object
# setSession(session) to setup the session ID
# addEntry(index,message,type,timeout) to add a message to be displayed on the idle screen.
# setTriggerDestroyOnExit() to set the triggerDestroyOnExit tag to
# "yes" (optional)
# addEntry(index,message,type,timeout) to add a message to be displayed
# on the idle screen.
#
# Example
# require_once('AastraIPPhoneStatus.class.php');
@ -57,12 +36,18 @@ require_once('AastraIPPhoneStatusEntry.class.php');
class AastraIPPhoneStatus extends AastraIPPhone {
var $_session;
var $_triggerDestroyOnExit="";
function setSession($session)
{
$this->_session=$session;
}
function setTriggerDestroyOnExit()
{
$this->_triggerDestroyOnExit="yes";
}
function addEntry($index, $message, $type='', $timeout=NULL)
{
$this->_entries[] = new AastraIPPhoneStatusEntry($index, $message, $type, $timeout);
@ -73,6 +58,7 @@ class AastraIPPhoneStatus extends AastraIPPhone {
$session = $this->escape($this->_session);
$out = "<AastraIPPhoneStatus";
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_triggerDestroyOnExit=='yes') $out .= " triggerDestroyOnExit=\"yes\"";
$out .= ">\n";
$out .= "<Session>".$session."</Session>\n";
foreach ($this->_entries as $entry) $out .= $entry->render();

View File

@ -1,57 +1,53 @@
<?php
##################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##################################################################################################
################################################################################
# Aastra XML API Classes - AastraIPPhoneStatusEntry
# Aastra 480i Firmware 1.4.1 or better
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneStatus object.
##################################################################################################
################################################################################
class AastraIPPhoneStatusEntry extends AastraIPPhone {
var $_index;
var $_message;
var $_type='';
var $_timeout=NULL;
var $_timeout=0;
function AastraIPPhoneStatusEntry($index, $message, $type, $timeout)
function AastraIPPhoneStatusEntry($index, $message, $type='', $timeout=NULL)
{
$this->_index=$index;
$this->_message=$message;
$this->_type=$type;
$this->_timeout=$timeout;
$this->setIndex($index);
$this->setMessage($message);
$this->setType($type);
$this->setTimeout($timeout);
}
function setIndex($index)
{
$this->_index = $index;
}
function setMessage($message)
{
$this->_message = $message;
}
function setType($type)
{
$this->_type = $type;
}
function setTimeout($timeout)
{
$this->_timeout = $timeout;
}
function render()
{
$index = $this->escape($this->_index);
$message = $this->escape($this->_message);
$type = $this->_type;
$type = $this->escape($this->_type);
$timeout = $this->_timeout;
$xml = "<Message index=\"{$index}\"";
if ($type!='')

View File

@ -1,68 +1,67 @@
<?php
###################################################################################################
# Copyright (c) 2007 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneTextMenu
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneTextMenu object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setTitle(Title) to setup the title of an object
# setTitle(Title) to setup the title of an object (optional)
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
# setDestroyOnExit() to set DestroyOnExit parameter to "yes" (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# addSoftkey(index,label,uri) to add custom softkeys to the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,icon_index) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setDestroyOnExit() to set DestroyOnExit parameter to "yes", optional
# setDefaultIndex(index) to set the default selection in the list (optional)
# setStyle(style) to set the style of the list numbered/none/radio (optional)
# addEntry(name,url,selection) to add an element in the list to be displayed, at
# addEntry(name,url,selection,icon,dial) to add an element in the list to be displayed, at
# least one is needed.
# natsortbyname() to order the list
#
# Example
# require_once('AastraIPPhoneTextMenu.class.php');
# $menu = new AastraIPPhoneTextMenu();
# $menu->setTitle('Title');
# $menu->setDestroyOnExit();
# $menu->setDefaultIndex();
# $menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2','');
# $menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1','');
# $menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3','');
# $menu->natsortByName();
# $menu->addSoftkey('1','Label 1','http://myserver.com/script.php?action=1');
# $menu->addSoftkey('6','Exit','SoftKey:Exit');
# $menu->output();
# Example 1
# require_once('AastraIPPhoneTextMenu.class.php');
# $menu = new AastraIPPhoneTextMenu();
# $menu->setTitle('Title');
# $menu->setDestroyOnExit();
# $menu->setDeFaultIndex('3');
# $menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2');
# $menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1');
# $menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3');
# $menu->natsortByName();
# $menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1');
# $menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $menu->output();
#
####################################################################################################
# Example 2
# require_once('AastraIPPhoneTextMenu.class.php');
# $menu = new AastraIPPhoneTextMenu();
# $menu->setTitle('Title');
# $menu->setDestroyOnExit();
# $menu->setDeFaultIndex('2');
# $menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2','1');
# $menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1','2');
# $menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3','3');
# $menu->natsortByName();
# $menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1');
# $menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $menu->addIcon('1', 'Icon:PhoneOnHook');
# $menu->addIcon('2', 'Icon:PhoneOffHook');
# $menu->addIcon('3', 'Icon:PhoneRinging');
# $menu->output();
#
########################################################################################################
require_once('AastraIPPhone.class.php');
require_once('AastraIPPhoneTextMenuEntry.class.php');
@ -70,7 +69,7 @@ require_once('AastraIPPhoneTextMenuEntry.class.php');
class AastraIPPhoneTextMenu extends AastraIPPhone {
var $_defaultIndex="";
var $_style="";
function setDefaultIndex($defaultIndex)
{
$this->_defaultIndex = $defaultIndex;
@ -81,9 +80,9 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
$this->_style = $style;
}
function addEntry($name, $url, $selection=NULL)
function addEntry($name, $url, $selection=NULL, $icon=NULL, $dial=NULL)
{
$this->_entries[] = new AastraIPPhoneTextMenuEntry($name, $url, $selection);
$this->_entries[] = new AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial);
}
function natsortByName()
@ -101,20 +100,44 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
function render()
{
$title = $this->escape($this->_title);
$out = "<AastraIPPhoneTextMenu ";
if ($this->_destroyOnExit=='yes') $out .= "destroyOnExit=\"yes\" ";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if ($this->_defaultIndex!="") $out .= "defaultIndex=\"{$this->_defaultIndex}\"";
if ($this->_style!='') $out .= " style=\"{$this->_style}\"";
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if ($this->_beep=='yes') $out .= " Beep=\"yes\"";
if ($this->_lockin=='yes') $out .= " LockIn=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
if ($this->_timeout!=0) $out .= " Timeout=\"{$this->_timeout}\"";
$out .= ">\n";
$out .= "<Title>".$title."</Title>\n";
if ($this->_title!='')
{
$title = $this->escape($this->_title);
$out .= "<Title";
if ($this->_title_wrap=='yes') $out .= " wrap=\"yes\"";
$out .= ">".$title."</Title>\n";
}
$index=0;
foreach ($this->_entries as $entry) {
if($index<15) $out .= $entry->render();
$index++;
}
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneTextMenu>\n";
return($out);
}

View File

@ -1,48 +1,26 @@
<?php
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
# Aastra XML API Classes - AastraIPTextMenuEntry
# Aastra 480i Firmware 1.4.1 or better
################################################################################
# Aastra XML API Classes - AastraIPPhoneTextMenuEntry
# Copyright Aastra Telecom 2007
#
# Internal class for AastraIPPhoneTextMenu object.
###################################################################################################
################################################################################
class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
var $_name;
var $_url;
var $_selection;
var $_icon;
var $_dial;
function AastraIPPhoneTextMenuEntry($name, $url, $selection)
function AastraIPPhoneTextMenuEntry($name, $url, $selection, $icon, $dial)
{
$this->_name=$name;
$this->_url=$url;
$this->_selection=$selection;
$this->_icon=$icon;
$this->_dial=$dial;
}
function getName()
@ -55,8 +33,12 @@ class AastraIPPhoneTextMenuEntry extends AastraIPPhone {
$name = $this->escape($this->_name);
$url = $this->escape($this->_url);
$selection = $this->escape($this->_selection);
$xml = "<MenuItem>\n<Prompt>{$name}</Prompt>\n<URI>{$url}</URI>\n";
$icon=$this->_icon;
$xml = "<MenuItem";
if($icon!=NULL) $xml .= " icon=\"{$icon}\"";
$xml .= ">\n<Prompt>{$name}</Prompt>\n<URI>{$url}</URI>\n";
if($selection!=NULL) $xml .= "<Selection>{$selection}</Selection>\n";
if($this->_dial!=NULL) $xml .= "<Dial>{$this->_dial}</Dial>\n";
$xml .= "</MenuItem>\n";
return($xml);
}

View File

@ -1,48 +1,31 @@
<?
###################################################################################################
# Copyright (c) 2006 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
########################################################################################################
# Aastra XML API Classes - AastraIPPhoneTextScreen
# Copyright Aastra Telecom 2007
#
# AastraIPPhoneTextScreen object.
#
# Public methods
#
# Inherited from AastraIPPhone
# setTitle(Title) to setup the title of an object
# setTitle(Title) to setup the title of an object (optional)
# setTitleWrap() to set the title to be wrapped on 2 lines (optional)
# setDestroyOnExit() to set DestroyonExit parameter to 'yes', 'no' by default (optional)
# setCancelAction(uri) to set the cancel parameter with the URI to be called on Cancel (optional)
# setBeep() to enable a notification beep with the object (optional)
# addSoftkey(index, label, uri) to add custom softkeys to the object (optional)
# setLockIn() to set the Lock-in tag to 'yes' (optional)
# setAllowAnswer() to set the allowAnswer tag to 'yes' (optional)
# setTimeout(timeout) to define a specific timeout for the XML object (optional)
# addSoftkey(index,label,uri,iconindex) to add custom softkeys to the object (optional)
# addIcon(index,icon) to add custom icons to the object (optional)
# setRefresh(timeout,URL) to add Refresh parameters to the object (optional)
# generate() to return the object content
# output() to display the object
#
# Specific to the object
# setText(text) to set the text to be displayed.
# setDoneAction(uri) to set the URI to be called when the user selects the default "Done" key (optional)
#
# Example
# require_once('AastraIPPhoneTextScreen.class.php');
@ -50,22 +33,29 @@
# $text->setTitle('Title');
# $text->setText('Text to be displayed.');
# $text->setDestroyOnExit();
# $text->addSoftkey('1','Label 1','http://myserver.com/script.php?action=1');
# $text->addSoftkey('6','Exit','SoftKey:Exit');
# $text->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1','1');
# $text->addSoftkey('6', 'Exit', 'SoftKey:Exit');
# $text->addIcon('1', 'Icon:Envelope');
# $text->output();
#
###################################################################################################
########################################################################################################
require_once('AastraIPPhone.class.php');
class AastraIPPhoneTextScreen extends AastraIPPhone {
var $_text;
var $_doneAction="";
function setText($text)
{
$this->_text = $text;
}
function setDoneAction($uri)
{
$this->_doneAction = $uri;
}
function render()
{
$title = $this->escape($this->_title);
@ -73,11 +63,39 @@ class AastraIPPhoneTextScreen extends AastraIPPhone {
$out = '';
$out .= "<AastraIPPhoneTextScreen";
if($this->_destroyOnExit == 'yes') $out .= " destroyOnExit=\"yes\"";
if($this->_cancelAction != "")
{
$cancelAction = $this->escape($this->_cancelAction);
$out .= " cancelAction=\"{$cancelAction}\"";
}
if($this->_doneAction != "")
{
$doneAction = $this->escape($this->_doneAction);
$out .= " doneAction=\"{$doneAction}\"";
}
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
if($this->_allowAnswer == 'yes') $out .= " allowAnswer=\"yes\"";
$out .= ">\n";
$out .= "<Title>{$title}</Title>\n";
if ($this->_title!='')
{
$title = $this->escape($this->_title);
$out .= "<Title";
if ($this->_title_wrap=='yes') $out .= " wrap=\"yes\"";
$out .= ">".$title."</Title>\n";
}
$out .= "<Text>{$text}</Text>\n";
foreach ($this->_softkeys as $softkey) $out .= $softkey->render();
$IconList=0;
foreach ($this->_icons as $icon)
{
if($IconList==0)
{
$out .= "<IconList>\n";
$IconList=1;
}
$out .= $icon->render();
}
if($IconList!=0) $out .= "</IconList>\n";
$out .= "</AastraIPPhoneTextScreen>\n";
return $out;
}

View File

@ -1,4 +1,4 @@
Copyright (c) 2006 Aastra Telecom US, Inc.
Copyright (c) 2007 Aastra Telecom US, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,51 +1,75 @@
<?php
###################################################################################################
# Copyright (c) 2007 Aastra Telecom US, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of Aastra Telecom US, Inc. may not be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY AASTRA TELECOM US, INC. ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL AASTRA TELECOM US, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###################################################################################################
##########################################################
# Sample php applications using the Aastra XML API Classes
# Aastra SIP Phones Firmware 1.4.2 or better
# Aastra SIP Phones Firmware 2.1.0 or better
# Copyright Aastra Telecom 2007
#
# @param type, type of XML object to display
# type=textmenu AastraIPPhoneTextMenu
# type=textmenu1 AastraIPPhoneTextMenu
# type=textmenu2 AastraIPPhoneTextMenu
# type=textmenu3 AastraIPPhoneTextMenu
# type=textscreen AastraIPPhoneTextScreen
# type=directory AastraIPPhoneDirectory
# type=input AastraIPPhoneInputScreen
# type=inputscreen1 AastraIPPhoneInputScreen
# type=inputscreen2 AastraIPPhoneInputScreen
# type=inputscreen3 AastraIPPhoneInputScreen
# type=inputscreen4 AastraIPPhoneInputScreen
# type=status AastraIPPhoneStatus
# type=execute AastraIPPhoneExecute
# type=configuration AastraIPPhoneConfiguration
# type=imagescreen AastraIPPhoneImageScreen
# type=imagemenu AastraIPPhoneImageMenu
# type=formattedtextscreen AastraIPPhoneFormattedTextScreen
#
# If type is not set, the list of all the XML objects is displayed
#
##########################################################
##########################################################
# Aastra_decode_HTTP_header
#
# Returns an array
# 'model' Phone Type
# 'mac' Phone MAC Address
# 'firmware' Phone firmware version
# 'ip' Phone Remote IP address
# 'language' Phone Language
# 'module'[x] Expension Modules
#
function Aastra_decode_HTTP_header()
{
# User Agent
$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";
}
# Create array
$array=array('model'=>$value[0],'mac'=>$value[1],'firmware'=>$value[2]);
return($array);
}
##########################################################
# Retrieve type parameter
$type=$_GET['type'];
# Global parameters
$XML_SERVER = "http://$SERVER_ADDR".$_SERVER['SCRIPT_NAME'];
$XML_SERVER = "http://".$_SERVER['SERVER_ADDR'].$_SERVER['SCRIPT_NAME'];
# Get UA information
$header=Aastra_decode_HTTP_header();
# Display the object
switch($type)
@ -55,13 +79,25 @@ switch($type)
$menu = new AastraIPPhoneTextMenu();
$menu->setTitle('Sample Applications');
$menu->setDestroyOnExit();
$menu->addEntry('Configuration', $XML_SERVER.'?type=configuration');
$menu->addEntry('TextMenu1', $XML_SERVER.'?type=textmenu1');
$menu->addEntry('TextMenu2', $XML_SERVER.'?type=textmenu2');
$menu->addEntry('TextScreen', $XML_SERVER.'?type=textscreen');
$menu->addEntry('Directory', $XML_SERVER.'?type=directory');
$menu->addEntry('InputScreen', $XML_SERVER.'?type=inputscreen');
$menu->addEntry('InputScreen1', $XML_SERVER.'?type=inputscreen1');
$menu->addEntry('InputScreen2', $XML_SERVER.'?type=inputscreen2');
$menu->addEntry('Status', $XML_SERVER.'?type=status');
$menu->addEntry('Execute', $XML_SERVER.'?type=execute');
if($header['model']!="Aastra53i")
{
$menu->addEntry('ImageScreen', $XML_SERVER.'?type=imagescreen');
$menu->addEntry('ImageMenu', $XML_SERVER.'?type=imagemenu');
$menu->addEntry('InputScreen3', $XML_SERVER.'?type=inputscreen3');
$menu->addEntry('InputScreen4', $XML_SERVER.'?type=inputscreen4');
$menu->addEntry('InputScreen5', $XML_SERVER.'?type=inputscreen5');
$menu->addEntry('Directory', $XML_SERVER.'?type=directory');
}
$menu->addEntry('FTextScreen1', $XML_SERVER.'?type=formattedtextscreen1');
$menu->addEntry('FTextScreen2', $XML_SERVER.'?type=formattedtextscreen2');
$menu->natsortByName();
$menu->output();
break;
@ -69,14 +105,22 @@ switch($type)
case 'textmenu1':
require_once('AastraIPPhoneTextMenu.class.php');
$menu = new AastraIPPhoneTextMenu();
$menu->setTitle('Title');
$menu->setTitle('Title this is a pretty long title');
$menu->setTitleWrap();
$menu->setDestroyOnExit();
$menu->setDeFaultIndex('3');
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2');
$menu->setStyle('radio');
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2','','12345');
$menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1');
$menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3');
$menu->addEntry('Choice 4', 'http://myserver.com/script.php?choice=4', 'Value=4');
$menu->addEntry('Choice 5', 'http://myserver.com/script.php?choice=5', 'Value=5');
$menu->addEntry('Choice 6', 'http://myserver.com/script.php?choice=6', 'Value=6');
$menu->addEntry('Choice 7', 'http://myserver.com/script.php?choice=7', 'Value=7');
$menu->natsortByName();
$menu->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
$menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1');
$menu->addSoftkey('2', 'My Dial', 'SoftKey:Dial2');
$menu->addSoftkey('4', 'Back', $XML_SERVER);
$menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$menu->output();
break;
@ -86,13 +130,32 @@ switch($type)
$menu = new AastraIPPhoneTextMenu();
$menu->setTitle('Title');
$menu->setDestroyOnExit();
$menu->setDeFaultIndex('3');
$menu->setStyle('none');
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2');
$menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1');
$menu->setDeFaultIndex('2');
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2','1');
$menu->addEntry('Choice 1', 'http://myserver.com/script.php?choice=1', 'Value=1','2');
$menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3','3');
$menu->natsortByName();
$menu->addSoftkey('1', 'My Select', 'http://myserver.com/script.php?action=1');
$menu->addSoftkey('4', 'Back', $XML_SERVER);
$menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$menu->addIcon('1', 'Icon:PhoneOnHook');
$menu->addIcon('2', 'Icon:PhoneOffHook');
$menu->addIcon('3', 'Icon:PhoneRinging');
$menu->output();
break;
case 'textmenu3':
require_once('AastraIPPhoneTextMenu.class.php');
$menu = new AastraIPPhoneTextMenu();
$menu->setTitle('Title');
$menu->setDestroyOnExit();
$menu->addEntry('Choice 1', 'Dial:12345', 'Value=1', '', '6789');
$menu->addEntry('Choice 2', 'http://myserver.com/script.php?choice=2', 'Value=2','','12345');
$menu->addEntry('Choice 3', 'http://myserver.com/script.php?choice=3', 'Value=3');
$menu->natsortByName();
$menu->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
$menu->addSoftkey('1', 'Select', 'SoftKey:Select');
$menu->addSoftkey('2', 'Dial', 'SoftKey:Dial');
$menu->addSoftkey('3', 'Dial2', 'SoftKey:Dial2');
$menu->addSoftkey('4', 'Back', $XML_SERVER);
$menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$menu->output();
break;
@ -101,26 +164,96 @@ switch($type)
require_once('AastraIPPhoneTextScreen.class.php');
$text = new AastraIPPhoneTextScreen();
$text->setTitle('Title');
$text->setText('Text to be displayed.');
$text->setDestroyOnExit();
$text->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
$text->setText('The screen object can be implemented similar to the firmware info screen.');
$text->setDestroyOnExit();
$text->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1','1');
$text->addSoftkey('4', 'Back', $XML_SERVER);
$text->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$text->addIcon('1', 'Icon:Envelope');
$text->output();
break;
case 'inputscreen':
case 'inputscreen1':
require_once('AastraIPPhoneInputScreen.class.php');
$input = new AastraIPPhoneInputScreen();
$input->setTitle('Title');
$input->setPrompt('Enter your password');
$input->setPrompt('Enter date');
$input->setParameter('param');
$input->setType('string');
$input->setURL('http://myserver.com/script.php');
$input->setURL('http://myserver.com/script.php?test=1');
$input->setPassword();
$input->setDestroyOnExit();
$input->setDefault('Default');
$input->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
$input->setDefault('');
$input->setCancelAction($XML_SERVER);
$input->output();
break;
case 'inputscreen2':
require_once('AastraIPPhoneInputScreen.class.php');
$input = new AastraIPPhoneInputScreen();
$input->setTitle('Title');
$input->setPrompt('Enter the date');
$input->setParameter('param');
$input->setType('dateUS');
$input->setURL('http://myserver.com/script.php');
$input->setDestroyOnExit();
$input->setCancelAction($XML_SERVER);
$input->output();
break;
case 'inputscreen3':
require_once('AastraIPPhoneInputScreen.class.php');
$input = new AastraIPPhoneInputScreen();
$input->setTitle('Title');
$input->setPrompt('Enter email address');
$input->setParameter('email');
$input->setType('string');
$input->setURL('http://myserver.com/script.php');
$input->addSoftkey('1', 'Backspace', 'SoftKey:BackSpace');
$input->addSoftkey('2', 'Symbols', 'SoftKey:SymbolList="@."');
$input->addSoftkey('5', 'Done', 'SoftKey:Submit');
$input->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$input->setDestroyOnExit();
$input->output();
break;
case 'inputscreen4':
require_once('AastraIPPhoneInputScreen.class.php');
$input = new AastraIPPhoneInputScreen();
$input->setTitle('Restricted application');
$input->setDisplayMode('condensed');
$input->setURL($XML_SERVER);
$input->setDestroyOnExit();
$input->addSoftkey('5', 'Done', 'SoftKey:Submit');
$input->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$input->addField();
$input->setFieldType('empty');
$input->addField('string');
$input->setFieldType('string');
$input->setFieldPrompt('Username:');
$input->setFieldParameter('user');
$input->addFieldSoftkey('3', 'ABC', 'SoftKey:ChangeMode');
$input->addField('number');
$input->setFieldPassword('yes');
$input->setFieldPrompt('Password:');
$input->setFieldParameter('password');
$input->output();
break;
case 'inputscreen5':
require_once('AastraIPPhoneInputScreen.class.php');
$input = new AastraIPPhoneInputScreen();
$input->setTitle('Date and Time');
$input->setURL('http://myserver.com/script.php');
$input->setDestroyOnExit();
$input->addSoftkey('5', 'Done', 'SoftKey:Submit');
$input->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$input->addField('dateUS');
$input->setFieldPrompt('Enter Date');
$input->setFieldParameter('date');
$input->addField('timeUS');
$input->setFieldPrompt('Enter Time');
$input->setFieldParameter('time');
$input->output();
break;
@ -135,6 +268,7 @@ switch($type)
$directory->addEntry('Jane Doe', '201');
$directory->natsortByName();
$directory->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
$directory->addSoftkey('4', 'Back', $XML_SERVER);
$directory->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$directory->output();
break;
@ -152,9 +286,91 @@ switch($type)
case 'execute':
require_once('AastraIPPhoneExecute.class.php');
$execute = new AastraIPPhoneExecute();
$execute->setTriggerDestroyOnExit();
$execute->addEntry('http://myserver.com/script.php?choice=2');
$execute->addEntry('Command: Reset');
$execute->addEntry('Command: FastReboot');
$execute->addEntry('Led: softkey1=on');
$execute->addEntry('Dial:7001','no');
$execute->output();
break;
case 'configuration':
require_once('AastraIPPhoneConfiguration.class.php');
$configuration = new AastraIPPhoneConfiguration();
$configuration->addEntry('softkey1 label','Test');
$configuration->addEntry('softkey1 type','xml');
$configuration->setTriggerDestroyOnExit();
$configuration->setBeep();
$configuration->output();
break;
case 'formattedtextscreen1':
require_once('AastraIPPhoneFormattedTextScreen.class.php');
$ftext = new AastraIPPhoneFormattedTextScreen();
$ftext->setDestroyOnExit();
if($header['model']!="Aastra53i") $ftext->addLine('Formatted Screen','double','center');
$ftext->setScrollStart('2');
$ftext->addLine('Scrolled text1');
$ftext->addLine('Scrolled text2');
$ftext->addLine('Scrolled text3','double');
$ftext->addLine('Scrolled text4');
$ftext->addLine('Scrolled text5');
$ftext->setScrollEnd();
$ftext->addLine('Footer',NULL,'center');
$ftext->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1','1');
$ftext->addSoftkey('4', 'Back', $XML_SERVER);
$ftext->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$ftext->addIcon('1', 'Icon:Envelope');
$ftext->output();
break;
case 'formattedtextscreen2':
require_once('AastraIPPhoneFormattedTextScreen.class.php');
$ftext = new AastraIPPhoneFormattedTextScreen();
$ftext->setDestroyOnExit();
$ftext->addLine('Line 1');
$ftext->addLine('Line 2');
$ftext->addLine('Line 3');
$ftext->addLine('Line 4');
$ftext->addLine('Line 5');
$ftext->addLine('Line 6');
$ftext->addSoftkey('1', 'Softkey 1', 'SoftKey:Exit');
$ftext->addSoftkey('2', 'Softkey 2', 'SoftKey:Exit');
$ftext->addSoftkey('3', 'Softkey 3', 'SoftKey:Exit');
$ftext->addSoftkey('4', 'Softkey 4', 'SoftKey:Exit');
$ftext->addSoftkey('5', 'Softkey 5', 'SoftKey:Exit');
$ftext->addSoftkey('6', 'Softkey 6', 'SoftKey:Exit');
$ftext->output();
break;
case 'imagescreen':
require_once('AastraIPPhoneImageScreen.class.php');
$images = new AastraIPPhoneImageScreen();
$images->setDestroyOnExit();
$images->setSize(40,144);
$images->setImage('fffffffc02fffffffee4ffffbfffc05fffe7ff7a7ffffffffeffeebd7fffffea6bcfffffe796f3feff6fa289f0a86f4866fa20df42414595dd0134f8037ed1637f0e2522b2dd003b6eb936f05fffbd4f4107bba6eb0080e93715000010b754001281271408c640252081b1b22500013c5c66201368004e04467520dc11067152b82094d418e100247205805494780105002601530020931400020ac5c91088b0f2b08c21c07d0c2006009fdfe81f80efe0107fe0fb1c3ffff8ffc3fffef8f7febffbfcf87ffbff64');
$images->addSoftkey('1', 'Mail', 'http://myserver.com/script.php?action=1','1');
$images->addSoftkey('4', 'Back', $XML_SERVER);
$images->addSoftkey('6', 'Exit', 'SoftKey:Exit',2);
$images->addIcon('1', 'Icon:Envelope');
$images->output();
break;
case 'imagemenu':
require_once('AastraIPPhoneImageMenu.class.php');
$imagem = new AastraIPPhoneImageMenu();
$imagem->setDestroyOnExit();
$imagem->setSize(40,144);
$imagem->setImage('fffffffc02fffffffee4ffffbfffc05fffe7ff7a7ffffffffeffeebd7fffffea6bcfffffe796f3feff6fa289f0a86f4866fa20df42414595dd0134f8037ed1637f0e2522b2dd003b6eb936f05fffbd4f4107bba6eb0080e93715000010b754001281271408c640252081b1b22500013c5c66201368004e04467520dc11067152b82094d418e100247205805494780105002601530020131400020a05c91088b002b08c21c0000c200000001fe800000000000000001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020041000004008300000ff08500000000c900000000710000000000000001401400000140140000014014000001401400000140140000000000000007c0ff00000c30880000081088000008108800000c30700000062000000000003f000001e02000000330200000021000000003301e000001e0330000000021000003f033000002001e0000020000000000001e000c03fc33003c013021007c02101201f00330ff03f001e000039000003e039001e00103f003300101f8021003007c03303f003c01e000000c00001e001c03f033007802002100f002002103e000001203c401702003cc0290ff039c02902101fc02b000007c03f01a003c020039018c0ff02d03c402102703c400001203ec01e000026402b0000264029000026c029000027c01a0000338000000033800000003100000000300000000030003f00003fc03000003fc02000003fc020000030001f0000300000000030001e000030002b000030002900003fc02900003fc01a00003f00000000310030000031c01e000031f003000033f81e00003f383000001e081e000008c003000003c01e00000fc03000001f000000003d001a0000390039000039002d00003f002700000f8012000007c000000001c0000000004000000000000000000000000000');
$imagem->addURI('1','http://myserver.com?choice=1');
$imagem->addURI('2','http://myserver.com?Choice=2');
$imagem->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1','1');
$imagem->addSoftkey('4', 'Back', $XML_SERVER);
$imagem->addSoftkey('6', 'Exit', 'SoftKey:Exit');
$imagem->addIcon('1', 'Icon:Envelope');
$imagem->addIcon('2', 'FFFF0000FFFF0000');
$imagem->output();
break;
}
?>