REVISION HISTORY ............................................................................................................................. 4
VERSION 1.0.0.1 ............................................................................................................................ 4
VERSION 1.0.0.2 ............................................................................................................................ 4
WHAT IS XML ........................................................................................................................................ 5
WHY XML .............................................................................................................................................. 5
XML API ARCHITECTURE .................................................................................................................... 5
XML APPLICATION CONFIGURA TION ..................................................... 7
SYSTEM VARIABLES IN STRING DISPLAY ........................................... 35
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 3 of 36
INTRODUCTION
The Grandstream GXP21xx supports XML Application on firmware version 1.0.3.30/1.0.4.x. This XML API
allows users to access service information in web server, present the information in LCD as well as
customize screen display. It's a custom application wher e the XML fram ework is an interactive, rea l-time
implementation and XML message is dynam ic, depending on a conf igurable obj ect set. It coul d be easily
developed with all the programming languages for web application development (e.g., PHP, ASP, and etc).
Typical XML applications could be call center service, survey, reservations and much more.
REVISION HISTORY
VERSION 1.0.0.1
• Initial version for GXP21xx firmware version 1.0.3.30.
VERSION 1.0.0.2
• Updated for GXP21xx firmware version 1.0.4.23.
• Added HTTPS support in XML application, for both XML application server path and Softkey action.
• The allowed XML Server Path length is extended from 128 characters to 256 characters.
• Element <LeftStatusBar> is removed from template.xml. This element is optional. If present, it will
override the default LeftSt atusBar display pre-defined on the phone.
•Element <SoftkeyBar> is removed from template.xml. This element is optional. If present, it will
override the default SoftkeyBar display pre-defined on the phone.
•Added Radio button support by using type="radio" in <input> element. Supported attributes are
"group", "value", "sel ected" and "label". When the qu ery is sent back the result is group =value. For
example, a radio with group "answerToQ1" with a value of "B" would result in "answerToQ1=B".
•Added Checkbox support by using type="checkbox" in <input> element. Supported attributes are
"name", "value" and "label". When the query is sent back the result is name=value.
• Added Selection list support by using <select> element.
• Added "password" type in <input> element so the entered digits will be displayed as *.
• Added "hidden" type i n <input> elem ent so the input file d and entered digits won't displ ay. It can be
used to pass value which is preferred to be hidden on LCD.
•Added system variable $xU for account x' s SIP User ID to be used in XML application where x is 0 to 5
for account 1 to account 6.
•Added system variable $x N for account x' s Displa y Name if filled in, other wise account x' s Acc ount
Name (x is 0 to 5 for account 1 to account 6).
•Added system variable $xS for account x' s SIP Server where x is 0 to 5 for account 1 to account 6.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 4 of 36
WHAT IS XML
XML (eXtensible Markup Language) is a markup language* for docum ents and applications containing
structured inform ation. This information contains both content (text, pictures, inp ut box and etc.) and an
indication of what role that content plays (e.g. content in a sectio n header is different fr om content in a
footnote, or cont ent in a figure cap tion, or content in a database table, etc .). Almost a ll documents have
certain kind of structure.
*A markup language is a mechanism to identify structures in a document. The XML specification defines a
standard way to add markup to documents.
WHY XML
What benefits does XML provide to SIP endpoints? XML enables our SIP phones to serve as output
devices for web services and other online applications. The XML infrastructure allows the phones to
interact with external applications in a flexible and programmable manner. Three specific XML API
supported by GXP21xx are XML Custom Screen, XML Phonebook and XML Application.
XML API ARCHITECTURE
The XML application on GXP21xx is us ing HTTP/HTTPS as the transport protocol. The following f igure
shows how it work s. Basic ally, GXP21xx initiates the HTTP/HT TPS GET Reques t to the server and waits
for the response. Once the phone receives the response with XML content in BODY, it displays the
information.
Two types of XML API architecture are introduced below, depending on if the application is within LAN or
accessed via Internet.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 5 of 36
1. An application in LAN area may exchange information in the following manner. GXP21xx sends
request and accepts XML contents via HTTP/HTTPS, directly communicating with the server. The
server will then handle t he r eques t and r esp ons e via a n y protoc ols w ith t he o ther application server to
get the expected information for the XML service.
2. If the above Web Server accesses Internet, it could interact with outside web server and respond
real-time content to GXP21xx.
As illustrated abo ve, all of the application lo gic lies within the server side of the ar chitecture. This a llows
faster applications development and minimal phone side maintenance.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 6 of 36
XML APPLICATION CONFIGURATION
FIRMWARE
Before the XML appl ication is launched on GXP21xx , the firmware on the phone m ust be upgraded to
version 1.0.3.30/1.0.4.x. This document describes functions and features based on firmware version
1.0.4.23. Please refer to the following link for firmware upgrading information:
http://www.grandstream.com/support/firmware
WEB GUI CONFIGURATION
To launch the XML application on GXP21xx, firstly set the XML application server path and softkey label in
web GUI->Settings->Advanced Settings page.
The Server Path must be set to t he web s er ver directory wher e the a pp lication is located. C urr e ntly HTTP
and HTTPS are supported. The accepted format are as below (content in [ ] is optional).
•For HTTP
IP_address[:port]/dir/filename or http://IP_address[:port]/dir/filename
Hostname[:port]/dir/filename or http://Hostname[:port]/dir/filename
•If "http://" is not specified in the Server Path, the phone will use HTTP by default. Therefore, "http://" is
not necessary to be included in the path if HTTP is used.
•For HTTPS, users must specify "https://" in the Server Path. If username and password are required by
the HTTPS server, users could use "https://username:password@server_address/directory" to access.
•The content in [ ] is optional. If ":port" is not specified, by default port 80 will be used for HTTP and port
443 will be used for HTTPS.
The default value for Softkey Label is "XML Service". Users presses this softkey to launch the XML
application. Please make sure the label string does not exceed the softkey maximum length on each model.
After the above configurat ion, click on "Update" in web GUI->Settings->Advanced Settings page. The
GXP21xx wil l then display the X ML Serv ice s of tkey on LCD. Press the softkey with the configured la be l to
launch the application.
Users may also use config file to provision the XML Application Server Path and Softkey Label to the phone.
In this case, GXP21xx needs to be provisioned and rebooted. The corresponding P values are as below.
•P337: Server Path.
This is a string of up to 256 characters that should contain the path to the XML application file.
•P352: Softkey Label.
This is a string of up to 16 characters to display the softkey label on LCD.
USING LCD AND KEYPAD
Without configuration, the default idle screen (GXP2120) is like below.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 8 of 36
Once the XML Application server path and softkey label are successfully configured, the label will be displayed
as the second softkey. Press this key to load the application.
As you may know, it is also possible to enter the appl ication server path into PC's web browser. In this way you’ll
be able to see the exact XML document on your PC that your phone is receiving.
An example application screen will be like below.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 9 of 36
NAVIGATION IN XML APPLICATION
Now the XML application is started on the phone. To navigate and proceed i n the application, use the keypad
and softkeys to complete the following different actions.
•Keypad digit input
- Enter the digits on the phone's keypad if the application requires input.
- To delete an input digit, press "Left" arrow key on the phone as backspace.
- If there are multiple input fields, press "UP" or "DOWN" arrow to toggle among the input fields.
- For example, enter the digits for Your Applicant ID in the input field as the above figure shows.
•Radio button selection
- Press "UP" or "DOWN" arrow to move the selection cursor to the desired radio button.
- Press "MENU" to make the selection.
•Checkbox selection
- Press "UP" or "DOWN" arrow to move the selection cursor to the desired checkbox.
- Press "MENU" to make the selection.
•Selection list
- Press "UP" or "DOWN" arrow to move the selection cursor to the desired list field .
- Press "LEFT" or "RIGHT" to toggle among different selections defined in the list.
•Softkey navigation
- Press the corresponding softkeys to navigate. The softkeys are defined in the XML code. Each softkey
could contain label for display, action and URL to trigger the phone to display another page. In the
above example, "Submit" will navigate you to the next step of the screening process. "Exit" allows you
to quit the application. "Tutorial" will launch the information page for users to browse.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 10 of 36
- In the case when there are more than 3 or 4 softkeys (depending on the GXP21xx model) used in the
XML application, a "MORE" softkey will automatically show. Click on it to view more softkeys.
•Quit application.
- During the XML application, there is a default way for users to quit and return to normal idle screen. To
quit, press and hold the "HOLD" button on phone's keypad for about 3 seconds.
- A warning window will then be popped out "Quit Application: Are you sure you want to exit the current
application?".
- Press softkey "OK" to quit, or press "Cancel" to continue the application.
- This operation is not applicable for GXP2124 yet on firmware version 1.0.4.23.
•Make/Answer call during application.
- When the phone is running the application, users could make or answer call without exit.
- Make call by offhook the handset, or press the speaker button.
- Answer incoming call by offhook the handset, or press the speaker button, or press the softkey
"AnswerCall".
- Once the call screen is triggered, "ResumeAPP" softkey will display. Press this key to continue the
application.
Note:
The above exam ple and screenshots are taken on GXP2120. The c onfigurations and operat ion are the
same for all the other GXP21xx models, but the screen size and softkey layout may vary.
SCREEN LAYOUT
The GXP2120/2110/2100/2124 have different screen s ize and softk ey layout. The LC D size (in p ixel) and
default layout are described below as reference.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 11 of 36
Note:
Please refer to the actual device for the precise appearance and size.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 12 of 36
XML APPLICATION FOR M AT
HEADER
In the first line of the XM L document, the following header can be set as X ML declaration. It defines the
XML version and encoding. On GXP21xx, UTF-8 is used as encoding method for correct display.
<?xml version="1.0" encoding="UTF-8"?>
SPECIAL CHARACTERS
As followed by the standard XML recommendation, some characters need to be escaped. The following
table lists the characters with their escape sequence.
Characters Name Escape Sequence
& Ampersand &
“ Quote "
‘ Apostrophe &apos
< Left Angle Bracket <
> Right Angle Bracket >
GXP21xx SCREEN XML STRUCTURE
The XML application template could be represented like below. <Page> section (mandatory) and
<Events> section (o ptional) are the main custom ization area for th e XML applica tion. Please refer to the
template.xml included in the package for more comments.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 13 of 36
<Screen>
<Page>
<ShowStatusLine>false</ShowStatusLine>
<Contents>
<!-- ADD DISPLAY AND INPUT ELEMENTS FOR XML APPLICATION CONTENTS--> </Contents>
<SoftKeys>
<!-- ADD SOFTKEY ELEMENTS FOR XML APPLICATION CONTENTS--> </SoftKeys>
</Page>
The XML document s tructure can be pr esent ed in the f ollowing d iagram. This provides users an overv iew
of the XML element and screen layout.
When creating your own X ML doc ument, it is not recommended to customize the <Lef tSt atus B ar > sec ti on
and <SoftkeyBar> section as shown in blue back ground of the follo wing diagram. T he default conte nt for
<LeftStatusBar> and <SoftkeyBar> are pre-defined for each model already. Therefore, unless users would
like to override the default displ a y on purpose, please do not include those two elements in the XML file. If
needed, the default content for these two elements could be found in the same section of the XML
customized idle sc reen templat es. Ple ase mak e sure use the c orrect t emplates for diff erent m odels since
they may have different width or height defined.
The XML customized idle screen templates can be downloaded in the following link:
For the element attribute and text information, please refer to the details in the next section “GXP21xx XML
ELEMENT”.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 14 of 36
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 15 of 36
GXP21xx XML ELEMENT
for XML
This section describes details of the XML element used in GXP21xx XML application. Please note that the
element name is case-sensitive when being used in XML document.
ROOT ELEMENT <Screen>
<Screen> is the root element of the XM L document used for GXP21xx X ML application. This element i s
mandatory.
<Screen>
All the information for screen display is here
</Screen>
<Screen> ELEMENT DETAILS
The following table shows child elements and attributes for <Screen> element.
Object Position Type Values Comments
Screen Root element Mandatory - Root element of the XML document
LeftStatusBar Child element Optional - Defines account bar display
(customization not recommended)
SoftkeyBar Child element Optional - Defines softkey bar display
(customization not recommended)
Page Child element Mandatory - Main customization area
application content and softkeys
Events Child element Optional - Used when certain event is triggered
<LeftStatusBar> ELEMENT
The <LeftStatusBar> sectio n is used for d ispla ying the ac count s tatus and inform ation in idle sc reen, i.e.,
the account name, register ed or not, the back ground images for each bar. T his element is optional. The
size and format for eac h account are pre-defined for each m odel alread y and we recommend user s not to include this element when creating the XML application.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 16 of 36
Each model might hav e d if ferent width value defined f or t he L ef tStatusBar. The foll o wing f igure s h o ws th e
<LeftStatusBar> area for GXP2120.
<LeftStatusBar>
<Layout width="Width of the background layout">
<DisplayList>
<X>X location</X>
<Y>Y location</Y>
</DisplayList>
<DisplayBitmap> Image information here </DisplayBitmap>
<DisplayString> String information here</DisplayString>
</Layout>
<Account height="Height of the account display ">
<DisplayElement>
<DisplayBitmap> Image information here </DisplayBitmap>
</DisplayElement>
</Account>
</LeftStatusBar>
<LeftStatusBar> ELEMENT DETAILS
Object Position Type Values Comments
LeftStatusBar Element Optional - Defines account bar display
Layout Child element Mandatory - Defines account bar layout
width <Layout> attribute Mandatory int
Account Child element Optional - Defines d ispla y per account and it applies
the same display to each account
height <Account> attribute Mandatory int
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 17 of 36
<SoftkeyBar> ELEMENT
The <SoftkeyBar> section def ines how the softkey layout is, e. g, softkey bar height, posi tion and button
shape. This element is optional. The size and format are pre-defined for each model already and we recommend users not to include this element when creating the XML application.
Each model might ha ve different height value d efined for the Softke y bar. The follo wing figure s hows the
<SoftkeyBar> area for GXP2120.
<SoftkeyBar>
<Layout height="Height of the softkeyBar" >
<DisplayBitmap>
Image information here
</DisplayBitmap>
<DisplayList>
<X>X location</X>
<Y>Y location </Y>
</DisplayList>
</Layout>
<ButtonShape id="Id number" width="Width of the button" height="Height of the button">
<DisplayElement>
DisplayElement information here
</DisplayElement>
</ButtonShape>
</SoftkeyBar>
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 18 of 36
<SoftkeyBar> ELEMENT DETAILS
and it
call screen for call status update
Object Position Type Values Comments
SoftkkeyBar Element Mandatory - Defines softkey bar display
Layout Child element Mandatory - Defines softkey bar layout
height <Layout> Attribute Mandatory int
Buttonshape Child element Mandatory - Defines display per softkey
applies the same display to each key
id <Buttonshape> Attribute Mandatory int
width <Buttonshape> Attribute Mandatory int
height <Buttonshape> Attribute Mandatory int
<Page> ELEMENT
This is the main customization section for the XML application.
Contents Child element Mandatory - Defines all the strings, pictures, input,
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 19 of 36
"false"
When it’s set to true, phone will not
refresh the XML application sc r een to
(except the one trigger e d b y pres s ing
LINE key). Default value is false.
select fields
will not be displayed during XML
</Contents>
Softkeys Child element Mandatory - Defines softkey display and action.
ShowStatusLine Child element Optional "true"/
"false"
It could use "true" or "false" as its
text.
"true": the line label on the left side
will be always displa yed during XML
application.
"false": the line label on the left side
application. So the XML application
information could be shown in a full
screen manner.
Default is "true".
<Contents> ELEMENT
This is the main customization section for the XML application. A sample cou ld be lik e belo w.
DisplayString Child element Optional - Displays string
DisplayBitmap Child element Optional - Displays bitmap picture
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 20 of 36
DisplayRectangle Child element Optional - Displays rectangle
x <Display Rect angle> Attrib ute Optional int Default value is 0
y <Display Rect angle> Attrib ute Optional int Default value is 0
width <Display Rect angle> Attrib ute Mandatory int
height <Display Rect angle> Attrib ute Mandatory Int
bgcolor <DisplayRe ctangl e> At tribute Optional string Default value is Black
input Child element Optional - Display input field
select Child element Optional - Display selection list field
<DisplayString> ELEMENT
This element is used for displaying string information on the screen.
<DisplayString font = "unifont" width="width of the string" height="height of the string" halign="
center/left/right" color="color of the string" bgcolor="color of the background" >
font <DisplayString> Attribute Optional "unifont" "unifont" is supported and default
width <DisplayString> Attribute Optional int
height <DisplayString> Attribute Optional int
halign <DisplayString> Attribute Optional string Default value is "left"
color <DisplayString> Attribute Optional string Def ault va lue is "Black"
bgcolor <DisplayString> Attribute Optional string Def ault value is "White"
X Child element Mandatory int Displays the string from X
Y Child element Mandatory int Displays the string from Y
DisplayStr Child element Mandatory string The string to be displayed
<DisplayBitmap> ELEMENT
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 21 of 36
This element is to displa y a bitmap picture on the s creen. Inside t he <Bitm ap> tag of the XM L document,
"true": to display the picture
n the firmware.
the picture
the picture must be encoded in base64 format already. There are plenty of base64 encoder online
provided for encoding the .bmp picture. Please make sure the original .bmp picture is in monochrome grey
level 8 before encoding.
<DisplayBitmap isfile="true/false" isflash=”true/false”>
<Bitmap> Bitmap file encoded in base64 format </Bitmap>
<X> X location </X>
<Y> Y location </Y>
</DisplayBitmap>
X Child element Mandatory int Displays the picture from X
Y Child element Mandatory int Displays the picture from Y
Bitmap Child element Mandatory string The base-64 encoded .bmp file
To create .bmp and display it on the phone:
•Firstly, make sure the picture is in .bmp format and not exceed the LCD size of the phone.
GXP21xx support .bmp file with monochrome grey level 8 to be displayed.
• Use a base-64 encoder to encode the picture. Users shall find base64 encoders online.
• Copy and paste and encoded result inside <Bitmap> tag.
Example:
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 22 of 36
"false"
"false"
embedded i
Users won't be able to directly
use it for customized pictures.
"false": to display
customized in <Bitmap> tag.
Default value is "false".
Default value is "false"
name <input> Attribute Mandatory string A unique id for the input field
value <input> Attribute Optional string Input field value
type <input> Attribute Optional "text"
"password"
"hidden"
"radio"
"checkbox"
"text": the input digits will display as it is;
"password": the input digits will display
as * after 2 seconds idle time or different
key pressing;
"hidden": the input dig its will not display
but the value can still be sent to the
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 24 of 36
query.
"radio": used for radio selection with
attribute "group";
"checkbox": used for checkbox (multiple)
selection (s).
maxlength <input> Attribute Optional int To limit the input length from users
data-type <input> Attribute Optional "int"/"string" Currently "int" or "string" can be used.
Default value is "string"
styles Child element Mandatory int Input display style
pos_x <styles> Attribute Mandatory int Input field displays from X
pos_y <styles> Attribute Mandatory int Input field displays from Y
height <styles> Attribute Mandatory int Input field height
Example 1 - Input type "text":
An input field which requires maximum 4-digit number to login. The entered digit will display as it is.
<input name="memid" value="" type="text" maxlength="4" data-type="int">
<styles pos_x="190" pos_y="85" bor d er -color="Black" bgcolor="Light2" width="70"/>
</input>
Example 2 - Input type "password":
An input field whic h requires max imum 4-digit password to logi n. The entered digit will display as * after
2-second idle time or different key pressing.
<input name="memid" value ="" type="password" maxlength="4" data-type="int">
<styles pos_x="190" pos_y="85" bor d er -color="Black" bgcolor="Light2" width="70"/>
</input>
Example 3 - Input type "hidden":
An input field which requires maximum 4-digit id to login. The input field, the pre-defined text in "value=" or
the entered digits will not display. However, the value can still be passed to the query.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 25 of 36
Example 4 - Radio button:
Two groups are defined in this ex am ple with value 1, 2, 3, 4 to b e sel ec ted f or each group. Only one r adio
button for each group could be selected.
<input group="group1" value ="4" type="radio" selected="1" label="">
<styles pos_x="120" pos_y="35"/>
</input>
<input group="group1" value="3" type="radio" selected="0" la b el = "" >
<styles pos_x="140" pos _y="35"/>
</input>
<input group="group1" value ="2" type="radio" selected="0" label="">
<styles pos_x="160" pos_y="35"/>
</input>
<input group="group1" value="1" type="radio" selected="0" la bel="">
<styles pos_x="180" pos_y="35"/>
</input>
This element is to render selection list fields on screen so that users could choose the answer to submit or
proceed. "name=value" will be passed to the query. The text for <item> element is the displayed option for
the list.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 27 of 36
<select> ELEMENET DETAILS
Object Position Type Values Comments
select Element Optional -
name <select> Attribute Mandatory string A unique id for the select field
styles Child element Mandatory - Selection list display style
pos_x <styles> Attribute Mandatory int Select field displays from X
pos_y <styles> Attribute Mandatory int Select field displays from Y
items Child element Mandatory - Selec t io n lis t options
item <items> Child element Mandatory - Attribute "value" is mandatory;
<select name="Age">
<styles pos_x="5" pos_y="80"/>
<items>
<item value="1">Under 25</item>
<item value="25">25 to 50</item>
<item value="50">A bo ve 5 0</item>
<item value="100">Refused to answer</item>
</items>
</select>
<SoftKeys> ELEMENT
This element is the parent element for <SoftKey> element. The purpose is to set up the softkey display and
action. This element is mandatory.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 28 of 36
</SoftKeys>
<SoftKeys>
<SoftKey>
Softkey information here
</SoftKey>
<SoftKeys> ELEMENET DETAILS
Object Position Type Values Comments
SoftKeys Element Mandatory -
softkey Child element Mandatory - Defines each softkey' s display and action
<SoftKey> ELEMENT
This element defines eac h softkey's label a nd action. T his elem ent is mandator y. If there are more than 3
or 4 softkeys set up here (depending on the softkey number of different models), a "MORE" softkey will be
displayed automatically to access all the active softkeys.
<SoftKey action="Softkey act ion " label="Softkey label" commandArgs="Argument" />
"AppendInputURL", "QuitApp"
label <SoftKey> Attribute Mandatory string Displays the softkey name
commandArgs <SoftKey> Attribute Optional string URL information, or number
commandId <SoftKey> Attribute Optional int Only for action=Dial. This specifies
the account index to d ial out the call
from, starting from 0 for account 1
Example 1 - Dial:
A softkey "Call" will be displayed. When pressing on it, 1087 will be dialed out using account 1.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 29 of 36
A softkey "Start" will be displayed. When pressing it, phone will send out HTTP request for the link
specified in comm andArgs. The XML document in link "http://192.168.40.144/hotelSurvey/login.php" will
be displayed. This could be used for directing to Next page, or back to Previous page in the XML
application.
The URL in commandArgs could als o have v ariables directl y append ed to r eflect us er's res ponse in X ML
application. The following "Yes" softkey pressing will trigger request for link with answer=yes at the end.
A softkey "Login" will be displayed. When pressing it, phone will send out HTT P request for the link with
<input> element "name=value" appended at the end of the link. Then the corresponding page will be
displayed. For exam ple, if the <input> element has nam e=id, and the user enters "1234" in the sc reen
input field, the reques ted link will be "http://192.168.40.144/hotelSurvey/login.php?id=1234". In this way,
the input information could be passed to the next XML application pages.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 30 of 36
</Events>
If there are multiple inp ut fields defined in one page, please make s ure each input elem ent has different
name. And all of them will be appended to the com mandArgs with the sequence of input fields.
Users could append the input fie ld to a URL which contains the variable already. For example, user enters
password 1234 in input field where input name=password. To construct link
"192.168.40.144/Survey/page2.php?id=1234&password=1234", use the following commandArgs.
A softkey "Exit" will be displayed. When pressing it, phone will quit the XML application and go back to idle
screen.
<SoftKey action="QuitApp" label="Exit" />
<Even ts> ELEMENT
This element enables the phone to respond to certain pre-defined event.
<Events>
<Event>
Event
</Event>
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 31 of 36
<Eve n ts> ELEMENET DETAILS
Object Position Type Values Comments
Events Element Optional -
Event Child element Mandatory - Defines each event
<Event> ELEMENT
In one XML document, m ultiple <E vent> elem ents could be used. How ever, the state for each even t m ust
be different so that the action is unique for that state.
state <Event> Attribute Mandatory string Please refer to "ATTRIBUTE state"
section for values and meaning
Action Child element Mandatory -
action <Action> Attribute Mandatory string
commandArgs <Action> Attribute Optional string
Example:
When event "onhook " is tr igger e d during the XML application, a HT TP request to the specified <URL > will
be sent out. Then the screen will display the XML document in that link.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 32 of 36
XML APPLICATION ELEMENT ATTRIBUTE
ATTRIBUTE color/bgcolor
• For "color" attribute, the default value is "Black".
• For "bgcolor" attribute, the default value is "White".
• For "border-color" attribute, the default value is "None".
color/bgcolor Details
None
Black
Dark6
Dark5
Dark4
Dark3
Dark2
Dark1
Gray
LightGray
Light1
Light2
Light3
Light4
Light5
Light6
White
ATTRIBUTE halign
Attribute halign is used for <DisplayString> element. The default value is "left".
halign Details
center
left GXP21xx XML Application
right GXP21xx XML Application
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 33 of 36
GXP21xx XML Application
ATTRIBUTE state
Attribute state is used for <Event> element. This attribute is mandatory.
state Details
callStateStarted W hen phone is switching to call state (e.g., offhook to di aling
state, or an incoming phone call) from idle
callStateEnded When phone is switching to idle from call state
resumeFromCallEnded Resume XML application from Call Ended state
resumeFromCallConnected Resume XML application from Call Connected state
resumeFromCallFailed Resume XML application from Call Failed state
resumeFromCallOnhold Resume XML application from Call On Hold state
resumeFromCallRinging Resume XML application from Call Ringing state
onhook When phone is onhook
offhook When phone is offhook
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 34 of 36
SYSTEM VARIABLES IN STRING DISPLAY
on the
In <DisplayString> element, the following system variables could be used to display the pre-defined values
in XML application (also applied to XML customized idle screen).
$String
This variable is replac ed with the configured
$a
account name
$b - $B
This variable is replaced with Missed Call
$c
string along with missed call count.
This variable is rep laced with th e current da y
of month with leading zero, possible values: 1,
$d
2, …, 31
This variable is replaced with the onhook
$e
dialing number
This variable is replaced with the
Month-week-date format based
$f
configuration
This variable is replaced with the country
$g
name for weather information
This variable is replace d with the c urr ent hour
of day in 12-hour format with leading zero,
$h
possible values: 01, 02, …, 12
This variable is replaced with the system IPV6
$i
Address
This variable is replac ed with Forwarded Call
$j
string along with forwarded calls count
$l - $L
This variable is replaced with the current
minute of hour with leading zero, possible
$m
values: 01, 02, …, 59
This variable is replaced with the current
month in number with leading zero, possible
$n
values: 1, 2, …, 12
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 35 of 36
This variable is replaced with configured
$A
softkey label
This variable is repl aced with the curr ent da y
of month with leading zero, possible values :
01, 02, …, 31
This variable is replaced with DND
$C
(Do-Not-Disturb) label when DND is enabled
This variable is repl aced with the curr ent da y
of month with lead in g zero, pos s ible val ues:
$D
01, 02, …, 31
$E -
$F -
This variable is replac ed with the number of
$G
the Missed Call
This variable is replaced with the current hour
of day in 24-hour representatio n with leading
$H
zero, possible values: 00, 02, …, 23
This variable is replaced with the system IPV4
$I
Address
$J -
This variable is replaced with the city name
for weather information
This variable is replaced with the current
month in English, possible values: January,
$M
February, …, December
This variable is rep laced with the configur ed
$N
SIP Display Name or account name
This variable is replaced with the current
of week and has the following possible
Sunday, Monday, Tuesday,
month in number with leading zero, possible
$o
$O -
values: 01, 02, …, 12
This variable is replaced with the current
$p - $P
AM/PM status in upper case, possible values:
AM, PM
$r This variable is replaced with the volume level $R -
This variable is replaced with the current
second of minute with lead ing zero, possible
$s
values: 01, 02, …, 59
This variable is replac ed with the state name
$S
of the weather information
This variable is replaced with the current
hour:minute (am/pm ) of the day, in wh ich ":"
$t - $T
will flash per second. Depending on user's
configuration, it will be displayed as 12 hour or
24 hour format. Possible values: 1:00pm,
13:00
This variable is replaced with 5V power usage
$v
alert message when incorrect power is used
This variable is rep laced with the configur ed
$V
Account SIP Server host
This variable is repl aced with the curr ent da y
This variable is replaced with the temperature
$w
of the weather information
$W
values:
Wednesday, Thursday, Friday, Saturday
This variable is rep laced with the humidit y of
$x
the weather information
This variable is rep lac e d wi th t he c ur re nt year
$y
in 2-digit number, for example: 06, 07
This variable is replace d with account x 's conf igured S IP User ID where x is 0 to 5 f or account 1 to
$xU
account 6. For example, $0U is account 1's SIP User ID if configured.
This variable is rep laced with the configur ed
$X
Account SIP User ID
This variable is replaced with the current year
$Y
in 4-digit number, for example: 2006, 2007 …
This variable is rep laced with account x ' s Display Na me if filled in, oth erwise ac count x ' s Acc ount
Name will be used where x is 0 t o 5 for account 1 to account 6. For example, $ 0N is account 1's
$xN
Display Name if configured. If account 1's Display Name is not configured, $0N will be replaced with
account 1's Account Name.
This variable is re placed with account x' s SIP Server where x is 0 to 5 for ac count 1 t o acco unt 6.
$xS
For example, $0S is account 1's SIP Server if configured.
Note:
To display "$", please use "$$" escape sequence.
FIRMWARE VERSION 1.0.4.23 GXP21xx XML APPLICATION GUIDE Page 36 of 36
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.