Download Print this page

Grandstream Networks XML Application Manual page 20

Part a – application explanations part b – xml syntax, technical detail, file examples

Advertisement

Example of Survey Implementation
An initial URI is configurable using the web interface. This is the location of the server that the phone will
attempt to interact with. It can be triggered by, lets say, overloading the phonebook button or the right arrow
button or even by providing a menu in which the user can select with from the phone. In this example, we
will use the initial URL to be:
Once the XML service is triggered, the phone will send an empty HTTP GET request to the above URL at
the selected port. The server will respond with a 200 OK with the XML attached to the packet. The XML
syntax may look like this:
 
<GS_XML_Application>
<Display>
<Screen>
</Screen>
</Display>
<SoftKeys>
<SoftKey>
<URL>http://www.XMLquestionnaire.com/questionnaire.php?do=prev
</SoftKey>
<SoftKey>
<URL>http://www.XMLquestionnaire.com/questionnaire.php?ans=yes
</SoftKey>
<SoftKey>
<URL>http://www.XMLquestionnaire.com/questionnaire.php?ans=no
</SoftKey>
<SoftKey>
<URL>http://www.XMLquestionnaire.com/questionnaire.php?do=next
</SoftKey>
</SoftKeys>
</GS_XML_Application >
After receiving the 200 OK, the display and softkey area of the screen is changed to show the XML content:
 
Grandstream Networks, Inc.
http://www.XMLquestionnaire.com:123
<DisplayString>
<X>0</X>
<Y>0</Y>
<DisplayStr> Do you have a spouse?</DisplayStr>
</DisplayString>
<Label>Previous</Label>
<Action>
<UseURL>
</UseURL>
</Action>
<Label>Yes</Label>
<Action>
<UseURL>
</UseURL>
</Action>
<Label>No</Label>
<Action>
<UseURL>
</UseURL>
</Action>
<Label>Next</Label>
<Action>
<UseURL>
</UseURL>
</Action>
XML Application Guide
where 123 represent the port.
</URL>
</URL>
</URL>
</URL>
Last Updated: 3/2009
Page 20 of 24

Advertisement

loading