XML Browser Developer's Guide
Instruction
About XML Browser, XML browser simply means that the SIP phones' LCD screen display can be managed by external applications. This Guide will show you how to use the XML Browser.
Note: Htek IP phones with the firmware version 1.0.3.70 or higher support XML browser applications.
Who should use this guide?
This guide is designed specifically to provide development engineers, system administrators, or network engineers with information for developing and deploying XML browser feature to Htek IP phones on the network. This guide is not intended for end users on how to use any specific XML applications.
What is XML?
XML stands for extensible Markup Language. It is a markup language much like HTML.
HTML was designed to display data and to focus on how data looks. XML was designed to describe data and to focus on what data is.
The following are characteristics of XML:
XML tags are not predefined. You must define your own tags
XML uses an XML Schema is designed to be self-descriptive
XML with an XML Schema is designed to be self-descriptive
XML is a W3C Standard Recommendation
Sample of Basic XML document:
Function
The XML Browser in the Htek IP phones allows users to create custom services which meet user functional requirements on the server. Users can customize practical applications, such as weather report, stock information and news service, etc.
Htek IP Phone supported objects are:
TextMenu
TextScreen
Directory
Status
Execute
FormattedTextScreen
InputScreen
ImageScreen
Configuration
ImageMenu
Some of these objects also support customizable softkeys that are declared as an independent object.
How does it work?
Htek has developed the XML browser capability on the phone using the HTTP transport protocol.
You can press the predefined key to trigger the phone initiated application of XML browser. After pressing the key, the IP phone issues an HTTP(s) GET command to the server, waits for the answer, decodes and displays the answer on the LCD screen.
Figure1: Htek IP Phone as a client
Htek IP Phone XML objects
This chapter details all the XML objects supported by the Htek IP phones.
TextMenu object
TextMenu object allows users to display a list of menu items on IP phones.
TextMenu XML example:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the TextMenu object are listed in the following table:
Parameter | Type | Value | Description |
TextMenu | mandatory | none | The root element of the TextMenu. |
defaultIndex | optional | Integer | Position of the cursor to enter into the menu interface. If not specified, the cursor is positioned on the first menu item. Default value is 1. |
style | optional | "number" | MenuType: |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
wrapList | optional | "yes" | Whether to display the title specified by the Prompt parameter in multi-lines, when the content of the title is longer than one line. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 45s. |
Title | mandatory | string | The content of the menu item. |
wrap | optional | "yes" | Whether to display the title in multi-lines when the content of the title is longer than one line. |
MenuItem | mandatory | none | The element of menu item.(Up to 30 instance, minimum is 1) |
Prompt | mandatory | string | The label of menu item, its display is controlled by "wrapList". |
URI | mandatory | URI | The operation of menu item. |
Dial | optional | Phone number | The phone will dial out the number by an off-hook action with the cursor on this menu item. |
Selection | optional | string | If the URI of softkey is the HTTP server address, it will send a request with the "selection=the parameter" |
SoftKey | optional | XML object | Support "Exit", "Select", "Next", "Previous" |
If there is no softkey defined in the TextMenu object, the default softkeys label show as the following table:
Softkey index | Label | URI |
1 | Select | SoftKey:Select |
4 | Exit | SoftKey:Exit |
An example of the TextMenu object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
TextScreen Object
The TextScreen object allows users to display some texts on the IP phones.
XML description of the TextScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the TextScreen object are listed in the following table:
Parameter | Type | Value | Description |
Timeout | optional | "integer" | If there is no operation at a fixed interval on the phone, the phone will automatically exit the TextScreen interface. |
Title | mandatory | string | The title of the screen text. |
Text | mandatory | string | The content of the screen text. |
If there is no softkey defined in the TextMenu object, the default softkeys label show as the following table:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
An example of the TextMenu object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
Directory Object
The Directory object allows users to browse an online directory in real time. The Directory object is just like are remote phonebook. It displays an automatically numbered list of contacts. After selecting a contact with the cursor, the contact can be dialed directly by pressing the "Dial" softkey.
XML description of the Directory object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the Directory object are listed in the following table:
Parameter | Type | Value | Description |
Directory | mandatory | none | The root element of the Directory |
defaultIndex | optional | Integer | Position of the cursor to enter into the menu interface. If not specified, the cursor is positioned on the first menu item. Default value is 1. |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 50s. |
Title | mandatory | string | The content of the menu item. |
wrap | optional | "yes" | Whether to display the title in multi-lines when the content of the title is longer than one line. |
MenuItem | mandatory | none | The element of menu item.(Up to 30 instance, minimum is 1) |
Prompt | mandatory | string | The label of menu item, its display is controlled by "wrap List". |
URI | mandatory | URI | The operation of menu item. |
If there is no softkey defined in the Directory object, the LCD screen displays the following default softkeys:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
2 | Previous | The URI specified by "Previous" of the Directory Object, "SoftKey:Previous" |
3 | Next | The URI specified by "Next" of the Directory Object, "SoftKey:Next" |
4 | Dial | SoftKey:Dial |
An example of the Directory object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
Status Object
The Status object allows users to display a status message on a single designated line on the phone's idle screen when XML information is pushed from the servers. The Status object an remind users of received messages, missed calls, news, notify, etc.
XML description of the Status object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the Status object are listed in the following table:
Parameter | Type | Value | Description |
PhoneStatus | mandatory | none | The root element of the Status. |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
SessionID | optional | string | Session ID is used to mark different Status Objects. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 30s. |
Message | optional | string | Message to be displayed or empty to reset the message. (Up to 10 instances.) |
Size | optional | "normal" | Font size of the text. |
Align | optional | "center" | Alignment of the message display. |
Color | optional | "white" | Color of the line. |
Account | optional | string | Specify the registered account for the status. |
Icon | optional | Forward | Icon used to index status message |
An example of the Status object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
Execute Object
The Execute object allows an external application to ask the phone to execute a sequence of local commands using URIs. The phone will execute each specified command in order.
XML description of the Execute object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the Execute object are listed in the following table:
Parameter | Type | Value | Description |
PhoneExecute | mandatory | none | The root element of the Execute |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
ExecuteItem URI | mandatory | URI | The operation of command item, such as call user, data download from server according to the URL, etc. Valid values are listed in the following tables. |
Commonly used commands:
Name | URI Value | Function |
Supported | http(s)://myserver.com/ | Execute "TextMenu.xml" from the root directory on the server "myserver.com". |
Dial:XXXXX | Dial out the number | |
Led:XXXX=on/off/slowflash/fastflash | Control the LEDs according to the commands | |
Phone Reset | Command:Reset | Reset to the factory |
Phone Reboot | Command:Reboot | Phone Reboot |
Clear | Command:ClearCallersList | Clear local call record list |
Command:ClearDirectory | Clear contact list | |
Command:ClearRedialList | Clear placed calls list |
An example of the Execute object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The IP phone enters into the phone Execute interface.
FormattedTextScreen Object
The FormattedTextScreen object allows IP phones to display formatted (alignment, size, color and scrolling) texts on the LCD screen.
XML description of the FormattedTextScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the FormattedTextScreen object are listed in the following table:
Parameter | Type | Value | Description |
FormattedTextScreen | mandatory | none | The root element of the FormattedTextScreen |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 60s. |
Line | mandatory | string | Text to be displayed on the line. If the length of the text is too long to be displayed on the LCD screen, the line will be cropped to the last word. The Header block can display two lines at most, and the Footer block can display only one line. |
Size | optional | "normal" | Font size of the text. |
Align | optional | "center" | Alignment of the message display. |
Color | optional | "white" | Color of the line. |
Scroll | optional | none | Define the scrolling content for display. The Line above the Scroll is as Header, under the Scroll is as Footer. |
If there is no softkey defined in the FormattedTextScreen object, the LCD screen displays the following default softkey:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
An example of the FormattedTextScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
Note: The UC802/UC803/UC804/UC806 don't support the FormattedTextScreen Object.
InputScreen Object
The InputScreen object allows users to create a screen capable of gathering user input. It constructs and displays an input form, which prompts the users to input content, then sends the input content to the target URL. You can use Input Screen object for user login or saving some information to server. You can define the content and format of the input content.
XML description of the InputScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the InputScreen object are listed in the following table:
Parameter | Type | Value | Description |
InputScreen | mandatory | none | The root element of the InputScreen |
Type | mandatory | "IP" | Data input options: |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Password | optional | "yes" | Whether to mask the input by "*" characters. Default value is "no". |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 0s. |
inputLanguage | optional | "English" | The language of user input. |
displayMode | optional | "normal" | normal (default): Display the prompt and input box in two lines. |
defaultIndex | optional | integer | Position of the cursor. If the value is not specified or exceeds the number of input boxes, the cursor is positioned on the first input box. Default value is 2. |
Title | mandatory | string | The content of the menu item. |
wrap | optional | "yes" | Whether to display the title in multi-lines when the content of the title is longer than one line. |
URI | mandatory | URI | The operation of menu item. |
InputField | optional | none | Set several input boxes. |
editable | optional | "yes" | Whether to allow users to input something. Default value is "yes". Users can not input anything if it is set to "no". |
Prompt | mandatory | string | The label of menu item, its display is controlled by "wrap List". |
Parameter | mandatory | string | Name of parameter to be added after the URL. |
Selection | optional | string | If "URI" is set to an HTTP URL, the phone will send a request with "selection= xxx" when the user presses the "Select" soft key. |
Default | optional | string | Default value to be displayed |
Note: The InputField parameter in the XML file is optional. You can use this parameter to customize more input fields on the IP phone.
If there is no softkey defined in the InputScreen object, the LCD screen displays the following default softkey:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
2 | 123 | SoftKey:ChangeMode |
3 | Delete | SoftKey:Delete |
4 | Submit | SoftKey:Submit |
An example of the InputScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
ImageScreen Object
The ImageScreen object allows users to display simple image on the IP phones. The user can specify where the image should be placed by setting horizontal and vertical alignment of the upper left hand corner, along with the height and width of the image. But this Object is only applies to color IP Phone.
XML description of the ImageScreen object
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the ImageScreen object are listed in the following table:
Parameter | Type | Value | Description |
ImageScreen | mandatory | none | The root element of the ImageScreen. |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 45s. |
mode | optional | "regular" | The display mode of the image. If not specified, the default value is "regular". |
horizontalAlign | optional | "left" | Vertical position of the image. |
verticalAlign | optional | "top" | Horizontal position of the image. |
height | mandatory | integer | Height in pixels. Must match |
width | mandatory | integer | Width in pixels. Must match |
If there is no softkey defined in the ImageScreen object, the LCD screen displays the following default softkey:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
An example of the ImageScreen object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
Note: The UC802/UC803/UC804/UC806 also support ImageScreen Object, but the image's depth must be 1bit.
Configuration Object
The Configuration object allows an external application to modify configuration of the IP phones dynamically. The configuration parameters are ones that are used in configuration files.
XML description of the Configuration object
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the Configuration object are listed in the following table:
Parameter | Type | Value | Description |
Configuration | mandatory | none | The root element of the Configuration object. |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Item | mandatory | none | The item consists of a Capital letter P and 2 to 5 digit numeric numbers. i.e., P2 is associated with "Admin Password" in the Advanced Page. |
An example of the Configuration object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The IP phone registers account 531 on line 1:
ImageMenu:
The ImageMenu object allows users to create an image list of menu items on the IP phones. The user can specify the image menu items to link HTTP requests.
XML description of the ImageMenu object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The parameters of the ImageMenu object are listed in the following table:
Parameter | Type | Value | Description |
ImageMenu | mandatory | none | The root element of the ImageMenu Object. |
Beep | optional | "yes" | Whether to play a tone when entering into the menu. |
Timeout | optional | "integer" | If the user has no operation at a fixed interval, the phone will automatically exit the menu interface. Default value is 45s. |
mode | optional | "regular" | The display mode of the image. If not specified, the default value is "regular". |
Image | mandatory | string | Image as hexadecimal characters or URL. |
horizontalAlign | optional | "left" | Vertical position of the image. |
verticalAlign | optional | "top" | Horizontal position of the image. |
height | mandatory | integer | Height in pixels. Must match |
width | mandatory | integer | Width in pixels. Must match |
URIList | mandatory | none | Master tag of the URI list linked to a keypad key (0-9, * and #). |
Base | optional | string | The Base value is the parent directory of the URI value. |
URI | mandatory | string | URI to be used if the user presses the value of "Key". |
Key | mandatory | "0-9,*"and "#" | Define the key to trigger the URI. |
If there is no softkey defined in the ImageMenu object, the LCD screen displays the following default softkey:
Softkey index | Label | URI |
1 | Exit | SoftKey:Exit |
An example of the ImageMenu object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
The screenshot of the UC924 phone user interface for reference is shown as below:
How to customize the softkey?
Htek IP phones allow users to create softkeys with customizable labels, positions and actions o be taken when the softkeys is pressed. The customizable softkeys can override the default softkeys in each XML object.
XML descriptions of customizable softkeys :
<SoftKey index="2"> |
The parameters of the softkey are listed in the following table:
Parameter | Type | Value | Description |
softkey | mandatory | none | The softkey |
index | mandatory | Integer | Indicatethe softkey number. |
Label | mandatory | string | The label of the softkey. |
URI | mandatory | string | The action of the softkey. |
An example of the customizable softkeys used with the TextMenu object:
<?xml version="1.0" encoding="ISO-8859-1"?> |
<Selection>0&menu_pos=1</Selection> |
<MenuItem> |
The screenshot of the IP phone user interface for reference is shown as below:
Configuration a HTTP server
Htek IP Phone support downloading by HTTP(s) protocol . You can setup a HTTP(s) server and place the XML files on the server for downloading.
We recommend using the XAMPP application.
Step 1: Double click the XAMPP Control Panel.exe.
Step 2: Click Config of Apache and click Apache (httpd.conf). Edit the name and port that the server uses to identify itself. Default port is 80. Edit the server's root directory. Default root directory is ../xampp/htdocs.
Step 3: Click Start of Apache. Put the XML files into the root directory of the HTTP server.
How to configuration the XML Browser via webpage?
Step 1: Log in the IP Phone's webpage
Step 2: Function keys->Line key (Memory key), select the XML Browser in Type field and input the XML Browser's URL in the value field.
Step 3: Click the "SaveSet" button to accept the change.
Step 4: Press the Line key 4, you can browse the XML content.