1.4.2 version.
This commit is contained in:
@ -37,7 +37,8 @@
|
||||
<xs:element name="SoftKey" type="softKeyType" minOccurs="0" maxOccurs="6"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="destroyOnExit" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="Beep" type="textAttributeType" default="no" />
|
||||
<xs:attribute name="style" type="xs:string" default="numbered" />
|
||||
<xs:attribute name="defaultIndex" type="integerAttributeType" default="1" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
Binary file not shown.
BIN
PA-001004-00-03-XML-API.pdf
Normal file
BIN
PA-001004-00-03-XML-API.pdf
Normal file
Binary file not shown.
16
README.txt
16
README.txt
@ -1,19 +1,19 @@
|
||||
AASTRA TELECOM INC.
|
||||
|
||||
November 2006
|
||||
April 2007
|
||||
|
||||
-PA-001004-00-03-XML-API.pdf - Aastra IP Phone XML API document. For use with IP Phone SIP Release 1.4.2.
|
||||
|
||||
-PA-001004-00-02-XML-API.pdf - Aastra IP Phone XML API document. For use with IP Phone SIP Release 1.4.1.
|
||||
-AastraXMLSchema 1.4.2.xsd - XML Schema which can be used to validate XML development.
|
||||
For use with IP Phone SIP Release 1.4.2.
|
||||
|
||||
-AastraXMLSchema 1.4.1.xsd - XML Schema which can be used to validate XML development.
|
||||
For use with IP Phone SIP Release 1.3.1.
|
||||
|
||||
-php_classes 1.4.1.zip - contains the directory php classes with all the XML classes.
|
||||
-php_classes 1.4.2.zip - contains the directory php classes with all the XML classes.
|
||||
The files are commented.
|
||||
|
||||
-asterisk sample source 1.4.1.zip - contains the source code of XML Asterisk integration described in the XML API document
|
||||
-asterisk sample source 1.4.2.zip - contains the source code of XML Asterisk integration described in the XML API document
|
||||
The files are commented.
|
||||
|
||||
|
||||
For XML documents related to IP Phone SIP Release 1.3.0, see file PA-001004-00-00.zip
|
||||
For XML documents related to IP Phone SIP Release 1.3.1, see file PA-001004-00-01.zip
|
||||
For XML documents related to IP Phone SIP Release 1.3.1, see file PA-001004-00-01.zip
|
||||
For XML documents related to IP Phone SIP Release 1.4.1, see file PA-001004-00-02.zip
|
1115
XML-API.txt
1115
XML-API.txt
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
###################################################################################################
|
||||
# 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
|
||||
@ -43,6 +43,7 @@
|
||||
#
|
||||
# Specific to the object
|
||||
# setDestroyOnExit() to set DestroyOnExit parameter to "yes", 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
|
||||
# least one is needed.
|
||||
# natsortbyname() to order the list
|
||||
@ -68,12 +69,18 @@ require_once('AastraIPPhoneTextMenuEntry.class.php');
|
||||
|
||||
class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
var $_defaultIndex="";
|
||||
var $_style="";
|
||||
|
||||
function setDefaultIndex($defaultIndex)
|
||||
{
|
||||
$this->_defaultIndex = $defaultIndex;
|
||||
}
|
||||
|
||||
function setStyle($style)
|
||||
{
|
||||
$this->_style = $style;
|
||||
}
|
||||
|
||||
function addEntry($name, $url, $selection=NULL)
|
||||
{
|
||||
$this->_entries[] = new AastraIPPhoneTextMenuEntry($name, $url, $selection);
|
||||
@ -98,6 +105,7 @@ class AastraIPPhoneTextMenu extends AastraIPPhone {
|
||||
$out = "<AastraIPPhoneTextMenu ";
|
||||
if ($this->_destroyOnExit=='yes') $out .= "destroyOnExit=\"yes\" ";
|
||||
if ($this->_defaultIndex!="") $out .= "defaultIndex=\"{$this->_defaultIndex}\"";
|
||||
if ($this->_style!='') $out .= " style=\"{$this->_style}\"";
|
||||
if($this->_beep=='yes') $out .= " Beep=\"yes\"";
|
||||
$out .= ">\n";
|
||||
$out .= "<Title>".$title."</Title>\n";
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
###################################################################################################
|
||||
# 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
|
||||
@ -28,7 +28,7 @@
|
||||
#
|
||||
###################################################################################################
|
||||
# Sample php applications using the Aastra XML API Classes
|
||||
# Aastra SIP Phones Firmware 1.4.1 or better
|
||||
# Aastra SIP Phones Firmware 1.4.2 or better
|
||||
#
|
||||
# @param type, type of XML object to display
|
||||
# type=textmenu AastraIPPhoneTextMenu
|
||||
@ -43,36 +43,58 @@
|
||||
##########################################################
|
||||
# Retrieve type parameter
|
||||
$type=$_GET['type'];
|
||||
$type='inputscreen';
|
||||
|
||||
# Global parameters
|
||||
$XML_SERVER = "http://$SERVER_ADDR".$_SERVER['SCRIPT_NAME'];
|
||||
|
||||
# Display the object
|
||||
switch($type)
|
||||
{
|
||||
case 'textmenu':
|
||||
case '':
|
||||
require_once('AastraIPPhoneTextMenu.class.php');
|
||||
$menu = new AastraIPPhoneTextMenu();
|
||||
$menu->setTitle('Sample Applications');
|
||||
$menu->setDestroyOnExit();
|
||||
$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('Status', $XML_SERVER.'?type=status');
|
||||
$menu->addEntry('Execute', $XML_SERVER.'?type=execute');
|
||||
$menu->natsortByName();
|
||||
$menu->output();
|
||||
break;
|
||||
|
||||
case 'textmenu1':
|
||||
require_once('AastraIPPhoneTextMenu.class.php');
|
||||
$menu = new AastraIPPhoneTextMenu();
|
||||
$menu->setTitle('Title');
|
||||
# $menu->setDestroyOnExit();
|
||||
$menu->setDestroyOnExit();
|
||||
$menu->setDeFaultIndex('3');
|
||||
$menu->addEntry('Choice 2', 'http://65.205.71.13/php_classes/php_classes_1.4.1/sample.php', 'Value=2');
|
||||
$menu->addEntry('Choice 1', 'http://65.205.71.13/php_classes/php_classes_1.4.1/sample.php', 'Value=1');
|
||||
$menu->addEntry('Choice 3', 'http://65.205.71.13/php_classes/php_classes_1.4.1/sample.php', 'Value=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', 'Label', 'http://myserver.com/script.php?action=1');
|
||||
$menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
|
||||
$menu->output();
|
||||
break;
|
||||
|
||||
|
||||
# $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', 'Label', 'http://myserver.com/script.php?action=1');
|
||||
# $menu->addSoftkey('6', 'Exit', 'SoftKey:Exit');
|
||||
# $menu->output();
|
||||
|
||||
|
||||
case 'textmenu2':
|
||||
require_once('AastraIPPhoneTextMenu.class.php');
|
||||
$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->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('6', 'Exit', 'SoftKey:Exit');
|
||||
$menu->output();
|
||||
break;
|
||||
|
||||
case 'textscreen':
|
||||
@ -89,27 +111,17 @@ switch($type)
|
||||
case 'inputscreen':
|
||||
require_once('AastraIPPhoneInputScreen.class.php');
|
||||
$input = new AastraIPPhoneInputScreen();
|
||||
$input->setTitle('Test Input');
|
||||
$input->setPrompt('Pin code');
|
||||
$input->setParameter('password');
|
||||
$input->setType('number');
|
||||
$input->setURL('http://192.168.0.49/VoIPer/Default.aspx?type=T001&user=TEST&number=');
|
||||
$input->setTitle('Title');
|
||||
$input->setPrompt('Enter your password');
|
||||
$input->setParameter('param');
|
||||
$input->setType('string');
|
||||
$input->setURL('http://myserver.com/script.php');
|
||||
$input->setPassword();
|
||||
$input->setDestroyOnExit();
|
||||
$input->setDefault('Default');
|
||||
$input->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
|
||||
$input->addSoftkey('6', 'Exit', 'SoftKey:Exit');
|
||||
$input->output();
|
||||
|
||||
# $input = new AastraIPPhoneInputScreen();
|
||||
# $input->setTitle('Title');
|
||||
# $input->setPrompt('Enter your password');
|
||||
# $input->setParameter('param');
|
||||
# $input->setType('string');
|
||||
# $input->setURL('http://myserver.com/script.php');
|
||||
# $input->setPassword();
|
||||
# $input->setDestroyOnExit();
|
||||
# $input->setDefault('Default');
|
||||
# $input->addSoftkey('1', 'Label', 'http://myserver.com/script.php?action=1');
|
||||
# $input->addSoftkey('6', 'Exit', 'SoftKey:Exit');
|
||||
# $input->output();
|
||||
break;
|
||||
|
||||
case 'directory':
|
||||
|
Reference in New Issue
Block a user