background image

 

Grandstream Networks, Inc. 

XML Application Guide

  

Page 14 of 24 

 

 

Last Updated:  3/2009

 

 

The string can contain dynamic contents.  As present, we support the following 18 system variables that will 
be substituted with dynamic contents at run-time. 

 
1.  $W:  This variable is replaced with the current day of week and has the following possible values: 

Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday 

2.  $N: This variable is replaced with the configured Account 1 Display Name. 
3.  $X: This variable is replaced with the configured Account 1 SIP User ID. 
4.  $V: This variable is replaced with the configured Account 1 SIP Server. 
5.  $I: This variable is replaced with the system IP address. 
6.  $D: This variable is replaced with the current day of month with leading zero, possible values: 

01, 02, …, 31 

7.  $d: This variable is replaced with the current day of month without leading zero, possible values: 

1, 2, …, 31 

8.  $M: This variable is replaced with the current month in English, possible values: 

January, February, …, December 

9.  $o: This variable is replaced with the current month in number with leading zero, possible values: 

01, 02, …, 12 

10.  $n: This variable is replaced with the current month in number without leading zero, possible 

values: 
1, 2, …, 12 

11.  $Y: This variable is replaced with the current year in 4-digit number, for example: 

2006, 2007 … 

12.  $y: This variable is replaced with the current year in 2-digit number, for example: 

06, 07 … 

13.  $P: This variable is replaced with the current AM/PM status in upper case, possible values: 

AM, PM 

14.  $p: This variable is replaced with the current AM/PM status in lower case, possible values: 

am, pm 

15.  $H: This variable is replaced with the current hour of day in 24-hour representation with leading 

zero, possible values: 
00, 02, …, 23 

16.  $h: This variable is replaced with the current hour of day in 12-hour representation with leading 

zero, possible values: 
01, 02, …, 12 

17.  $m: This variable is replaced with the current minute of hour with leading zero, possible values: 

01, 02, …, 59 

18.  $s: This variable is replaced with the current second of minute with leading zero, possible values: 

01, 02, …, 59 

 
Note: If you want to display the “$” sign, you will use “$$” escape sequence. 

Elements X and Y 

This element contains X and Y offsets from the origin that we will use to render the string. 

<

xsd:element

 

name

=

"

X

"

 

type

=

"

xsd:integer

"

 

minOccurs

=

"

1

"

 

maxOccurs

=

"

1

"

 

default

=

"

0

"

/> 

<

xsd:element

 

name

=

"

Y

"

 

type

=

"

xsd:integer

"

 

minOccurs

=

"

1

"

 

maxOccurs

=

"

1

"

 

default

=

"

0

"

/> 

Attribute a1reg 

This OPTIONAL attribute specifies the conditions when the string will be displayed. 

<

xsd:attribute

 

name

=

"

alreg

"

 

type

=

"

xsd:boolean

"

/> 

 

When this attribute is present and the value is “true” then the string will be displayed ONLY when SIP 
Account 1 is in REGISTERED state.   

 

When this attribute is present and the value is “false” then the string will be displayed only when SIP 
Account 1 is NOT in REGISTERED state. 

Содержание XML

Страница 1: ...Grandstream XML Application Guide Three XML Applications PART A Application Explanations PART B XML Syntax Technical Detail File Examples...

Страница 2: ...XML Application Guide PART A Three XML Applications Grandstream GXP Series supports both simple and advanced XML applications Part A of this application note will describe Grandstream s XML applicati...

Страница 3: ...IP endpoints XML enables our SIP phones to serve as output devices for many exciting applications The XML infrastructure allows our phones to interact with external applications in a flexible and prog...

Страница 4: ...p to 128 characters that contains a path to the XML file It must follow the host path format i e directory grandstream com engineering The XML feature is activated when Enable Idle Screen XML Download...

Страница 5: ...manually remove edited entries on download YES NO default NO P333 possible values 0 1 other values ignored The XML phonebook feature is activated when Enable Downloadable Phonebook is set to YES HTTP...

Страница 6: ...009 Grandstream XML Application Guide PART B XML Syntax Technical Detail File Examples Part B of this application note will guide you through the technical details of our three applications 1 XML Cust...

Страница 7: ...mplexType xs element xs complexType name BitmapType xs sequence xs element name Bitmap type xs base64Binary minOccurs 1 maxOccurs 1 xs element name X type xs integer minOccurs 1 maxOccurs 1 default 0...

Страница 8: ...ion value a1reg xs enumeration value a2reg xs enumeration value a3reg xs enumeration value a4reg xs enumeration value a5reg xs enumeration value a6reg xs enumeration value a1voiceMsg xs enumeration va...

Страница 9: ...ion value MissedCalls xs enumeration value CallReturn xs enumeration value PhoneBook xs enumeration value MainMenu xs enumeration value VoiceMail xs restriction xs simpleType xs element xs element nam...

Страница 10: ...DisplayString font f13b halign Center a1reg true DisplayStr X DisplayStr X 65 X Y 26 Y DisplayString DisplayString halign Center valign Bottom DisplayStr I DisplayStr X 65 X Y 48 Y DisplayString Idle...

Страница 11: ...ey Label New Call Label Action NewCall Action SoftKey SoftKey Label Missed Calls Label Action MissedCalls Action displayCondition conditionType missCall conditionType displayCondition SoftKey SoftKey...

Страница 12: ...pType minOccurs 0 maxOccurs unbounded nillable true xs element name DisplayString type StringType minOccurs 0 maxOccurs unbounded nillable true The DisplaySoftKey element apply only to GXP 2020 2010 a...

Страница 13: ...r LCD resolution Anything not bound to the above restriction is dropped and ignored You may use Windows Paint to change an existing BMP file to 1 bit depth Elements X and Y This element contains X and...

Страница 14: ...12 y This variable is replaced with the current year in 2 digit number for example 06 07 13 P This variable is replaced with the current AM PM status in upper case possible values AM PM 14 p This vari...

Страница 15: ...lignmentType xsd simpleType name HorizontalAlignmentType xsd restriction base xsd string xsd enumeration value Left xsd enumeration value Center xsd enumeration value Right xsd restriction xsd simpleT...

Страница 16: ...curs 1 maxOccurs 1 xsd element name country type xsd string minOccurs 1 maxOccurs 1 xsd sequence xsd complexType xsd element xsd element name Phone xsd complexType xsd sequence xsd element name phonen...

Страница 17: ...eir escape sequence Characters Name Escape Sequence Ampersand amp Quote quot Apostrophe apos Left Angle Bracket lt Right Angle Bracket gt GRANDSTREAM XML OBJECT GXP2020 XML Display As illustrated abov...

Страница 18: ...e display showLineLabels Screen Attribute Optional Boolean Enable or disable line labels display to extend xml application display area DisplayString Screen Body Optional Display a string on the scree...

Страница 19: ...ftkey Body Mandatory Action to be taken UseURL Action body Choice URL to call to QuitApp Action Body Choice Quit the current XML application Dial Action Body Choice Dial a number The remote server may...

Страница 20: ...espond with a 200 OK with the XML attached to the packet The XML syntax may look like this GS_XML_Application Display Screen DisplayString X 0 X Y 0 Y DisplayStr Do you have a spouse DisplayStr Displa...

Страница 21: ...ter X 0 X Y 0 Y DisplayStr Thank you for taking the DisplayStr DisplayString DisplayString X 0 X Y 10 Y DisplayStr Survey DisplayStr DisplayString DisplayString halign Right valign Bottom X 0 X Y 0 Y...

Страница 22: ...howLineLabels false DisplayString X 0 X Y 0 Y DisplayStr wrap true Hello Please press Dial to start dialing and hang up the phone to exit the application DisplayStr DisplayString Screen Display SoftKe...

Страница 23: ...plication Guide Page 23 of 24 Last Updated 3 2009 Action Event Events GS_XML_Application Pressing Dial dials 3051 with Account 1 After the survey is finished and the user hangs up the survey is ended...

Страница 24: ...ou ll just need to navigate to the URL of the soft key as can be seen in the XML code For example on 12 34 56 78 test_gs xml you ll see that the first soft key is set to make the phone browse to 12 34...

Отзывы: