
Yealink DECT Phones XML Browser Developer's Guide V1.5
Yealink DECT Phones XML Browser Developer's Guide V1.5
Yealink DECT Phones XML Browser ...
Yealink DECT Phones XML Browser Developer's Guide V1.5 Contents
About This Guide........................................................................................ 3
Who should use this guide?............................................................................................................... 3
XML and Yealink DECT Phones................................................................. 4
What is XML?......................................................................................................................................4 XML Format.........................................................................................................................................5 Functionality......................................................................................................................................... 6 How does it work?.............................................................................................................................. 7
Phone-initiated Application....................................................................................................... 7 Server-initiated Application....................................................................................................... 7
Yealink DECT Phone XML Objects............................................................ 8
XML Object Definitions........................................................................................................................9 TextMenu Object....................................................................................................................... 9 TextScreen Object...................................................................................................................17 InputScreen Object................................................................................................................. 22
Customizable Soft Keys.................................................................................................................... 35 XML Objects Pushed to the Phone.................................................................................................. 38 Some Development Guidelines......................................................................................................... 40
Configuring the HTTP Server................................................................... 41
Configuring the Push XML Server...........................................................42
Installing the XMAPP........................................................................................................................ 42 Starting the XMAPP.......................................................................................................................... 45 Testing the Installation of the XAMPP.............................................................................................. 46 Pushing an XML Object to the Phone.............................................................................................. 47
Configuring an XML Browser Key........................................................... 47
Yealink DECT Phone XML Configurations.............................................. 49
Configuring the XML SIP Notify........................................................................................................49
Troubleshooting......................................................................................... 50
Troubleshooting Tools........................................................................................................................ 51 Parsing Error Debug Example.......................................................................................................... 51
| About This Guide | 3
About This Guide
XML browser is a simple browser based on XML language and http / https service. You can dynamically generate XML files that meet your requirements for the phone functions on the server side according to the established syntax,and then download them to the DECT phones.
This guide shows you how to use XML API to control the LCD screen display of DECT phones as well as its configuration.
This guide applies to the following Yealink devices:
Product W80 DECT IP Multi-Cell System W90 DECT IP Multi-Cell System
W70B DECT IP Phone
Device W80DM/W80B
W56H W53H W59R VIM W90DM/W90B W73H W59R W53H W56H W70B W73H W59R W53H W56H
Firmware Version 103.83.0.70 or later 61.83.0.90 or later 88.83.0.90 or later 115.83.0.10 or later
1.0.0.5 or later 130.85.0.20 or later 116.85.0.15 or later 115.85.0.35 or later 88.85.0.35 or later 61.85.0.35 or later 146.85.0.20 or later 116.85.0.15 or later 115.85.0.35 or later 88.85.0.35 or later 61.85.0.35 or later
Note: This guide maily takes W80 as an example. · Who should use this guide?
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 customized client services on DECT phones using the XML browser feature.
This guide is not intended for end users and does not provide user-level information on how to use any specific XML applications.
Before reading this guide,you should be familiar with the following:
· Basic text editors,or full IDE-like Eclipse or Microsoft Visual Studio for creating or writing code. · General application and software development.
| XML and Yealink DECT Phones | 4
· Adequate planning,creating,and testing resources needed to produce a fully deployable web-based application.
· DECT IP multi-cell system and provisioning methods. · How to use an XML editor. · The XML-based schema and syntax.
XML and Yealink DECT Phones
· What is XML? · XML Format · Functionality · How does it work?
What is XML?
XML stands for Extensible Markup Language. It is a markup language much like HTML. HTML is designed to display data and to focus on how data looks,while XML is designed to describe data and focus on what data is. XML enables DECT phones to serve as output devices for many exciting applications. The XML infrastructure allows the phones to interact with external applications in a flexible and programmable manner. The following are characteristics of XML: · XML tags are not predefined. You must define your own tags. · XML uses an XML schema to describe the data. · XML with an XML schema is designed to be self-descriptive. · XML is a W3C Standard Recommendation. Sample of Basic XML document:
| XML and Yealink DECT Phones | 5
XML Format
XML is written in the form of XML elements consisting of tags enclosed in angle brackets (for example,<YealinkDECTTextMenu>). XML contains 3 kinds of tags: the start tag,the end tag and the empty-element tag. The empty-element tag has two kinds of form: in pairs (for example,<MenuItem> </MenuItem>) and not in pairs (for example,<MenuItem/>). With the exception of the empty-element tag not in pairs,XML tags most commonly come in pairs like <YealinkDECTTextMenu> and </YealinkDECTTextMenu>. The first tag in a pair is the start tag (for example,<YealinkDECTTextMenu>),and the second tag is the end tag (for example,</YealinkDECTTextMenu>). XML mainly follows rules as below: · XML must have root element. · The end tag must have the character "/". · XML tags are case-sensitive. · Each attribute value should be within double quotations. · The texts within <!-- --> are considered as comments. XML provides escape facilities for including characters which are problematic to include directly. For example,the characters "<" and "&" are key syntax markers and may never appear in the content. XML has five predefined entities. The XML conversion table is shown as below:
| XML and Yealink DECT Phones | 6
Character & " ` < >
Name Ampersand Quote Apostrophe Left angle bracket Right angle bracket
Escape Sequence & " ' < >
To respect XML recommendations,the following header can be set at the beginning of the XML document, <?xml version="1.0" encoding="ISO-8859-1"?>
Or <?xml version="1.0" encoding="UTF-8"?>
Yealink provides XML object files beginning with the XML declaration "<?xml version="1.0" encoding="ISO-8859-1"?>".
For more information on XML,refer to http://www.xml.com/.
Functionality
The XML browser allows users to develop and deploy custom services which to meet the user requirements of phone functions on the server. Users can customize practical applications,such as weather report,stock information,Google search, news service,etc.
Phone service developers should take it into consideration that the phone is not a web browser so it cannot parse HTML. Although the content is delivered to the phone through HTTP messages using a web server,keep in mind that the content is not HTML. All content comes to the phone either as plain text or text packaged in XML objects.
DECT phones support 3 proprietary XML objects,which allow the creation of powerful XML applications.
There are 2 types of XML objects:
UI objects: XML objects are used to control the LCD screen display of IP phones.
Non UI objects: XML objects have no direct impact on the current LCD screen display of IP phones.
The supported objects are:
· TextMenu object · TextScreen object · InputScreen object · Directory object (UI) · ImageScreen object (UI) · ImageMenu object (UI) · FormattedTextScreen object (UI) · Status object (UI) · Execute object (Non-UI) · Configuration object (Non-UI)
| XML and Yealink DECT Phones | 7
How does it work?
Depending on the IP infrastructure,Yealink is capable of developing the XML browser of the phones using HTTP. DECT phones support phone-initiated mode for XML browser applications. · Phone-initiated · Server-initiated · Phone-initiated Application · Server-initiated Application
Phone-initiated Application
You can press the predefined XML Browser key to trigger the phone-initiated application of XML browser. After you press the key,the DECT phone issues an HTTP(s) GET request message to the server,waits for the answer,decodes and displays this response message like any web browser,such as Microsoft Internet Explorer or Firefox,and would do as a web client. Figure1 DECT phone acting as a client
Server-initiated Application
The server-initiated application would be more frequently used on the network. In this mode,end-users do not need to do any configuration and operation. The server can push an XML object to the phone via an HTTP POST. In addition,DECT phones support accepting SIP NOTIFY messages from a SIP proxy server and act as limited web servers. Figure2 Yealink IP phone acting as a server (HTTP(s) post)
| Yealink DECT Phone XML Objects | 8
Figure2 W80B device acting as a server (SIP NOTIFY)
Yealink DECT Phone XML Objects
Creating interactive service applications is relatively easy when you understand the XML objects that are defined for DECT phones and the behavior that each XML object generates. Regardless of what causes the phone to load an XML page,the phone always behaves appropriately after it loads a page. Appropriate behavior depends only on the type of data delivered on the page.
| Yealink DECT Phone XML Objects | 9
· XML Object Definitions · Customizable Soft Keys · XML Objects Pushed to the Phone · Some Development Guidelines
XML Object Definitions
This section details each proprietary XML object supported by DECT phones. You can ask the distributor or Yealink FAE for XML object files or obtain XML object files online: http:// support.yealink.com/documentFront/forwardToDocumentFrontDisplayPage.
Note: The size of an XML object cannot exceed 10000 bytes (10 kb). Per XML specifications,only one XML object is supported in an XML document sent to the phone. XML objects do not support Chinese characters. · TextMenu Object · TextScreen Object · InputScreen Object
TextMenu Object
The TextMenu object allows users to create a list of menu items on the DECT phones. You can use the TextMenu object to customize some functions such as weather report,stock information,new services,and so on. You can browse the menu items by linking HTTP requests. XML description of the TextMenu object:
| Yealink DECT Phone XML Objects | 10
<?xml version="1.0" encoding="ISO-8859-1"?> <**TextMenu defaultIndex = "integer" style = "numbered/none" Beep = "yes/no" wrapList="yes/no" Timeout = "integer" refresh="refresh time" url="URI" cancelAction = "URI" previous = "URI" LockIn = "yes/no" > <Title wrap = "yes/no">Menu Title</Title> <MenuItem> <Prompt>Prompt</Prompt> <URI>URI</URI> <Dial>Number to dial</Dial > <Selection>Selection</Selection> </MenuItem> <!--Additional menu items may be added (up to 30) --> <!--Additional Softkey items may be added (up to 6) --> </**TextMenu>
The parameters of the TextMenu object are listed in the following table:
Parameter **TextMenu
Position Root tag
Type mandatory
Value none
Description
The root element of the TextMenu object. Note: "**" in the "**TextMenu" can be any string or an empty string.
defaultIndex Root tag
optional
Integer
Position of the cursor.
If the value is not specified or exceeds the number of menu items, the cursor will be positioned on the first menu item.
The default value is 1.
Note: You can press the digit key to highlight/enter the corresponding menu.
style
Root tag
optional
"numbered" "none"
numbered (default): Add a digit before each menu item for index.
none: No sign before each menu item.
| Yealink DECT Phone XML Objects | 11
Parameter Beep
Position Root tag
Type optional
wrapList
Root tag
optional
Value "yes" "no"
"yes" "no"
Timeout
Root tag
optional
integer
refresh
Root tag
optional
integer
url
Root tag
destroyOnExit Root tag
optional optional
URI
"yes" "no"
Description
Whether to play a tone when the XML object is opened.
The default value is "yes".
Whether to display the title of the menu item specified by the Prompt parameter in multi-lines when the content of the title is more than one line. Select "yes" to display the title in multi-lines,and "no" for one line. The default value is "yes". (only for SIP VPT49G/VP59/SIP-T58A/T57W/T54W/T53W/ T53/T48U/T48G/ /T46U/T46G/T46S/T43U/ T42U/T29G/CP960 IP phones)
Note: It needs to add a space to indicate a new line.
If there is no operation at a fixed interval (in seconds) on the phone,the phone will automatically exit from the TextMenu screen.
If it is set to 0,the phone will not automatically exit from the TextMenu screen until pressing the "Back" soft key/ On-hook key,or long pressing the On-hook key.
The default value is 45.
Define the time interval (in seconds) to automatically refresh the text menu by calling the URI defined by "url".
If it is set to 0,the phone will not automatically refresh the text menu.
Define the URI to be called to refresh the text menu.
If it is set to "yes",the phone exits from the TextMenu screen first and then calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the idle screen when the user presses the "Exit" soft key in the new XML screen.
If it is set to "no",the phone does not exit the TextMenu screen,it directly calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the TextMenu screen when the user presses the "Exit" soft key in the new XML screen.
| Yealink DECT Phone XML Objects | 12
Parameter Position cancelAction Root tag
Type optional
Value URI
previous LockIn
Root tag Root tag
optional optional
URI
"yes" "no"
Title wrap
Body Title tag
mandatory optional
string "yes" "no"
MenuItem Body
mandatory none
Prompt URI
MenuItem body
MenuItem body
mandatory string mandatory URI
Dial
MenuItem optional
Phone
body
number
Description
Define the URI to be called when the user cancels the XML object by pressing the Onhook key.
Define the URI to be executed when the user presses the "Previous" soft key.
If it is set to "yes",the phone ignores specified function key events. The default value is "no". For more information,refer to the function keys and soft keys table shown next.
The title of the text menu.
Whether to display the title of the menu in multi-lines when the content of the title is more than one line (up to 3 lines for SIPT54W/T53W/T53/T46U/T46G/T46S/T43U/ T29G/T27G/CP920 IP phones; up to 2 lines for VP59/SIP-T58A/T42U/T42G/T42S/ T41P/T41S/T40P/T40G/T23P/T23G/T21(P) E2/T19(P) E2/CP860/CP960 IP phones; not limit for SIP VP-T49G/SIP-T57W/T48U/ T48G/T48S with space in title).
Select "yes" to display in multi-lines,and "no" for one line.
The default value is "yes".
The element of the menu item.
(Up to 30 instances,the minimum is 1)
The label of the menu item.
Note: Only one line can be displayed.
URI is used if the user presses the "Select" soft key,"OK" key, or Right navigation key (if it is not customized) with the cursor on this menu item.
Define what number will be dialed when the user picks up the handset,or presses the Speakerphone key,line key or the Off-hook key.
Note: Picking up the handset or pressing the Speakerphone key is not applicable to CP860/CP920/CP960 IP phones. Pressing line key is not applicable to SIP-T19(P) E2/CP860/CP920 IP phones. Pressing off-hook key is only applicable to CP860/ CP920 IP phones.
| Yealink DECT Phone XML Objects | 13
Parameter Selection
Position
MenuItem body
Type optional
Value string
SoftKey
Body
optional
string
Description
If "URI" is set to an HTTP URL,the "? selection= xxx (defined by the Selection parameter)" will be appended to the URI when the user presses the "Select" soft key or the "OK" key.
Example:
http://10.1.0.105/menu1.xml? selection=0&menu_pos=1
If a "?" already exists in the URI,then a "&" is used to separate the URI and the Selection parameters. The parameter name "selection" is automatic. If the Selection attribute is omitted,then nothing extra is appended to the URI. If the Selection parameter has more than one parameter,then these parameters are appended to the URI.
(for example,if "URI" is set to http://10.1.0.105/menu1.xml? and "Selection" is set to 0&menu_pos=1,the phone will send a request "http://10.1.0.105/menu1.xml? &selection=0&menu_pos=1" when the user presses the "Select" soft key.)
Note: Pressing the "OK/" key is not applicable to SIP VP-T49G/VP59/SIPT58A/T57W/CP960 IP phones.
Refer to Customizable Soft Keys for more information.
If there is no soft key defined in the TextMenu object,the LCD screen displays the following default soft keys:
SoftKey Index 1 2
Label Back Select
URI SoftKey:Back SoftKey:Select
For CP860/CP920/CP960/VP59/SIP-T58A/T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/ T41P/T41S/T40P/T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
SoftKey Index 1 4
Label Exit Select
URI SoftKey:Exit SoftKey:Select
For SIP VP-T49G/SIP-T57W/T48U/T48G/T48S IP phones:
SoftKey Index 1
Label Select
URI SoftKey:Select
| Yealink DECT Phone XML Objects | 14
The function keys and soft keys are listed in the following table:
Key Name Up/Down Key
Operation Pressing the up/down key
Function
Browse the menu item up and down.
Note: Pressing the up/down key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
Left/Right Key
Pressing the left/right key
Turn pages.
(not applicable to SIP-T54W/ T53W/T53/T46U/T43U/T42U IP phones)
Note: Pressing the left/right key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP860/ CP920/CP960 IP phones.
Digit Key
Pressing the digit keys 1~9
If the value of the LockIn is "no",the function of the digit key is highlighting a menu item. If the value of the LockIn is "yes",the phone will be no response.
Note: IP phones support onedigit number only. If you press the digit that exceeds the maximum of the menu items,the phone will be no response. It is not applicable to SIP VP-T49G/VP59/ SIP-T58A/CP960 IP phones.
Select
Back/Exit Exit
Pressing the "Select" soft key
Execute the content of the URI field assigned to the selected menu item.
Pressing the "Back"/"Exit" soft key Return to the idle screen.
Pressing the Exit soft key
Exit from the current XML screen.
Tapping (only applicable to SIPT57W/T48U/T48G/T48S IP phones) Tapping (only applicable to SIP VP-T49G IP phones)
Key Name
Off-hook Key/ Line Key/ Speakerphone Key
| Yealink DECT Phone XML Objects | 15
Operation
Function
Pressing the line key/
If there is a number contained in
Speakerphone Key/ Off-hook key the "Dial" tag,the phone will dial
out the number.
If there is no number contained in the "Dial" tag,the phone will not response to any operation.
If the value of the LockIn is "no" and there is a number contained in the Dial tag,the phone will dial out the number.
If the value of the LockIn is "no" and there is no number contained in the Dial tag:
For pressing the line key,the phone will be no response.
For off-hook and pressing Speakerphone Key/off-hook key,the phone will enter the predialing screen.
If the value of the LockIn is "yes" and there is a number contained in the Dial tag:
For off-hook and pressing the line key,the phone will dial out the number.
For pressing the Speakerphone key,the phone will be no response to any operation.
If the value of the LockIn is "yes" and there is no number contained in the Dial tag,the phone will be no response to any operation.
Note: Pressing the line key is not applicable to SIP-T19(P) E2/CP860/CP920 IP phones. Pressing the off-hook key is only applicable to CP860/CP920 IP phones. Off hook by resting the handset is not applicable to CP860/CP920/CP960 IP phones.
| Yealink DECT Phone XML Objects | 16
Key Name Cancel Key
Operation Pressing the On-hook key
OK Key
Pressing the "OK" key
An example of the TextMenu object:
Function
If "cancelAction" is not left blank,the function of On-hook key is calling the URI defined by "cancelAction".
If "cancelAction" is left blank,the function of On-hook key is returning to the idle screen.
Note: Long pressing the On-hook key can also return to the idle screen.
Note: Pressing the "X" key is not applicable to SIP VP-T49G/VP59/ SIP-T58A/T57W/T19(P) E2/ CP860/CP920/CP960 IP phones.
The function of the "OK" key is the same as that of "Select".
Note: Pressing the "OK/" key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
| Yealink DECT Phone XML Objects | 17
<?xml version="1.0" encoding="ISO-8859-1"?> <YealinkDECTTextMenu defaultIndex="2" style="numbered" Beep="no" Timeout="30" refresh="refresh time" url="http://10.2.11.158/XML/TextMenu.xml" cancelAction = "http://10.2.11.158/test.xml" > <Title>Phone Services</Title> <MenuItem> <Prompt>Input</Prompt> <URI>http://10.2.11.158/XML/InputScreen.xml</URI> <Dial>456</Dial> <Selection>12345</Selection> </MenuItem> <MenuItem> <Prompt>TextScreen</Prompt> <URI>http://10.2.11.158/XML/TextScreen.xml</URI> <Dial>1001</Dial> <Selection>4567</Selection> </MenuItem> </YealinkDECTTextMenu>
In the example,with the first menu item selected: · Picking up the handset,the phone will dial "456" using the first available account. · Pressing the Speakerphone key/ Off-hook key,the phone will dial "456" using the available account. · Pressing the first line key,the phone will dial "456" using the corresponding account. · Pressing the Select soft key or OK key,the phone will call http://10.2.11.158/XML/InputScreen.xml.
TextScreen Object
The TextScreen object allows users to display some texts on DECT phones. XML description of the TextScreen object:
| Yealink DECT Phone XML Objects | 18
<?xml version="1.0" encoding="ISO-8859-1"?> <**TextScreen Beep = "yes/no" doneAction = "URI" Timeout = "integer" refresh="refresh time" url="URI" cancelAction = "URI" LockIn = "yes/no"> <Title wrap = "yes/no">Text Title</Title > <Text>The screen text goes here</Text> <!--Additional Softkey items may be added --> </**TextScreen>
The parameters of the TextScreen object are listed in the following table:
Parameter Position **TextScreen Root tag
Type mandatory
Value none
Description
The root element of the TextScreen object. Note: "**" in the "**TextScreen" can be any string or an empty string.
Beep
Root tag
optional
"yes" "no"
Whether to play a tone when the XML object is opened.
The default value is "yes".
doneAction Root tag
optional
URI
Define the URI to be called when the user presses the "OK" key.
Timeout
Root tag
optional
integer
If there is no operation at a fixed interval (in seconds) on the phone,the phone will automatically exit from the TextScreen screen.
If it is set to 0,the phone will not exit from the TextScreen screen until pressing the "Exit" soft key.
The default value is 45.
refresh
Root tag
optional
integer
Define the time interval (in seconds) to automatically refresh the screen text by calling the URI defined by "url". If it is set to 0, the phone will not automatically refresh the screen text.
Note: If pressing the "Exit" soft key during displaying the screen text,the phone will stop refreshing the screen text.
url
Root tag
optional
URI
Define the URI to be called to refresh the
screen text.
| Yealink DECT Phone XML Objects | 19
Parameter Position destroyOnExit Root tag
Type optional
Value "yes" "no"
cancelAction Root tag
optional
URI
LockIn
Root tag
optional
"yes" "no"
Title wrap
Body
mandatory string
Title tag
optional
"yes" "no"
Text
Body
mandatory string
SoftKey
Body
optional
string
Description
If it is set to "yes",the phone exits from the TextScreen screen first and then calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the idle screen when the user presses the "Exit" soft key in the new XML screen.
If it is set to "no",the phone does not exit the TextScreen screen, it directly calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the TextScreen screen when the user presses the "Exit" soft key in the new XML screen.
Define the URI to be called when the user cancels the XML object by pressing the Onhook key.
If it is set to "yes",the phone ignores specified function key events. The default value is "no". For more information,refer to the function keys and soft keys table shown next.
The title of the text.
Note: Only one line can be displayed.
Whether to display the title of the menu in multi-lines when the content of the title is more than one line (up to 3 lines for SIPT54W/T53W/T53/T46U/T46G/T46S/T43U/ T29G/T27G/CP920 IP phones; up to 2 lines for VP59/SIP-T58A/T42U/T42G/T42S/ T41P/T41S/T40P/T40G/T23P/T23G/T21(P) E2/T19(P) E2/CP860/CP960 IP phones; not limit for SIP VP-T49G/SIP-T57W/T48U/ T48G/T48S with space in title).
Select "yes" to display in multi-lines,and "no" for one line. The default value is "yes".
The content of the text.
Note: Only one page can be displayed.
(Text length must be within 2000 bytes.)
Refer to Customizable Soft Keys for more information.
If there is no soft key defined in the TextScreen object,the LCD screen displays the following default soft key (the SIP VP-T49G/SIP-T57W/T48U/T48G/T48S IP phones do not display the soft key):
| Yealink DECT Phone XML Objects | 20
SoftKey Index 1 2
Label Back OK
URI SoftKey:Back SoftKey:OK
For CP860/CP920/CP960/VP59/SIP-T58A/T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/ T41P/T41S/T40P/T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
SoftKey Index 1
Label Exit
URI SoftKey:Exit
The function keys and soft keys are listed in the following table:
Key Name Up/Down Key
Operation Pressing the up/down key
Function
For CP860/CP920/ SIP-T54W/T53W/T53/T46U/ T46G/T46S/T43U/T42U/T42G/ T42S/T41P/T41S/T40P/T40G/ T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2: Browse texts line by line.
For SIP-T48U/T48G/T48S: Turn pages.
Note: Pressing the up/down key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
Left/Right Key
Pressing the left/right key
Turn pages.
(only applicable to SIP-T48U/ T48G/T48S IP phones)
Back/Exit
Pressing the "Back"/"Exit" soft key Return to the idle screen.
Pressing the Exit soft key (not applicable to SIP VP-T49G/ SIP-T57W/T48U/T48G/T48S IP phones)
Tapping (only applicable to SIPT57W/T48U/T48G/T48S IP phones) Tapping (only applicable to SIP VP-T49G IP phones)
| Yealink DECT Phone XML Objects | 21
Key Name Off-hook Key/ Line Key/ Speakerphone Key
Cancel Key
OK Key
Operation
Function
Off hook
Pressing the line key/ Speakerphone Key/ Off-hook key
If the value of the LockIn is "no",the phone will enter the predialing screen.
If the value of the LockIn is "yes",the phone will be no response to any operation.
Note: Pressing the line key is not applicable to SIP-T19(P) E2/CP860/CP920 IP phones. Pressing the off-hook key is only applicable to CP860/CP920/ CP960 IP phones. Off hook by resting the handset is not applicable to CP860/CP920/ CP960 IP phones.
Pressing the On-hook key Pressing the "X" key
If "cancelAction" is not left blank,the function of On-hook key is calling the URI defined by "cancelAction".
If "cancelAction" is left blank,the function of On-hook key is returning to the idle screen.
Note: Long pressing the On-hook key can also return to the idle screen.
Note: Pressing the "X" key is not applicable to SIP VP-T49G/VP59/ SIP-T58A/T57W/T19(P) E2/ CP860/CP920/CP960 IP phones.
Pressing the "OK" key
The function of the "OK" key is calling the URI defined by "doneAction".
Note: Pressing the "OK/" key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
An example of the TextScreen object:
| Yealink DECT Phone XML Objects | 22
<?xml version="1.0" encoding="ISO-8859-1"?> <YealinkDECTTextScreen Beep = "yes" doneAction = "http://10.2.11.158/test.xml" Timeout = "15" refresh="refresh time" url="http://10.2.11.158/TextScreen.xml" cancelAction = "http://10.2.11.158/XML/InputScreen.xml" > <Title wrap="yes">Screen Title </Title> <Text>The screen text goes here. When you see this, congratulations to you complete the configuration.</Text> </YealinkDECTTextScreen>
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 InputScreen object for user login or saving some information to the server. You can define the content and format of the input content.
Note: For SIP-T57W/T48U/T48G/T48S phones,you cannot use the soft keys to input content when onscreen keyboard is enabled. XML description of the InputScreen object:
| Yealink DECT Phone XML Objects | 23
<?xml version="1.0" encoding="ISO-8859-1"?> <**InputScreen type = "IP/string/number/timeUS/timeInt/dateUS/dateInt" Beep = "yes/no" Password = "yes/no" Timeout = "integer" refresh="refresh time" url="URI" LockIn = "yes/no" inputLanguage = "English" cancelAction= "URI" displayMode = "normal/condensed" defaultIndex = "integer from 1 to 7"> <Title wrap = "yes/no">Title string</Title> <URL>Target receiving the input</URL> <InputField type = "IP/string/number/timeUS/timeInt/dateUS/dateInt/empty" password = "yes/no" editable = "yes/no" > <Prompt>Guidance for the input</Prompt> <URL>Target receiving the input</URL> <Parameter> parameter name add to URL</Parameter> <Selection>Selection</Selection> <Default>Default Value</Default> </InputField> <!--Additional input field Items may be added (up to 7) --> <!--Additional Softkey items may be added (up to 6)--> </**InputScreen >
The parameters of the InputScreen object are listed in the following table:
Parameter Position **InputScreen Root tag
Type mandatory
Value none
Description
The root element of the InputScreen object. Note: "**" in the "**InputScreen" can be any string or an empty string.
| Yealink DECT Phone XML Objects | 24
Parameter type
Position Root tag
Beep
Root tag
Type mandatory
Value
"IP" "string" "number" "timeUS" "timeInt" "dateUS" "dateInt" "empty"
optional
"yes" "no"
Description
Specifies the type of input. Data input options: 1. IP 2. string(default) 3. number 4. timeUS,12-hour format
Format: HH:MM:SS AM/PM HH:1-12,MM:0-59,SS:0-59 AM/PM stand for the forenoon/ afternoon. Example: 02:00:23 AM 12:59:00 PM 5. timeInt,24-hour format Format: HH:MM:SS HH:0-23, MM:0-59, SS:0-59 Example: 23:25:00 6. dateUS Format: MM/DD/YYYY MM:1-12,DD:1-31,YYYY:0000-9999 Example: 12/31/2009 7. dateInt Format: DD/MM/YYYY DD:1-31,MM:1-12,YYYY:0000-9999 Example: 31/01/2010 8. empty Note: The value in the root tag takes effect only if that in the InputField tag is left blank.
Whether to play a tone when the XML object is opened. The default value is "yes".
| Yealink DECT Phone XML Objects | 25
Parameter Password
Position Root tag
Type optional
Timeout
Root tag
optional
refresh
Root tag
optional
url LockIn
Root tag Root tag
optional optional
InputLanguage Root tag destroyOnExit Root tag
optional optional
cancelAction Root tag
optional
Value "yes" "no" integer
integer
URI "yes" "no" "English" "yes" "no"
URI
Description
Whether to mask the input by the "*" character .
The default value is "no".
If there is no operation at a fixed interval (in seconds) on the phone,the phone will automatically exit from the InputScreen screen.
If it is set to 0,the phone will not exit from the InputScreen screen until pressing the "Exit" soft key.
The default value is 45.
Define the time interval (in seconds) to automatically refresh the input screen by calling the URI defined by "url". If it is set to 0,the phone will not automatically refresh the input screen.
Define the URI to be called to refresh the input screen.
If it is set to "yes",the phone ignores specified function key events. The default value is "no". For more information,refer to the function keys and soft keys table shown next.
The language of user input. The default value is English.
If it is set to "yes",the phone exits from the InputScreen screen first and then calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the idle screen when the user presses the "Exit" soft key in the new XML screen.
If it is set to "no",the phone does not exit the InputScreen screen, it directly calls the URI defined by "cancelAction" when the user presses the "Cancel/X" key. The phone returns back to the InputScreen screen when the user presses the "Exit" soft key in the new XML screen.
Define the URI to be called when the user cancels the XML object by pressing the Onhook key.
| Yealink DECT Phone XML Objects | 26
Parameter Position displayMode Root tag
defaultIndex Root tag
Title wrap
Body Title tag
URL
Body
InputField Body
Type optional
optional mandatory optional
mandatory optional
Value
Description
"normal" "condensed"
normal(default): Display the prompt and input box in two lines.
condensed: Display the prompt and input box in one line. (not applicable to SIPT42G/T41P/T40P/T40G/T23P/T23G/ T21(P) E2/T19(P) E2/CP860/CP920/ CP960 IP phones)
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.
The default value is 1.
string
The title of the text.
"yes" "no"
Whether to display the title in multi-lines when the content of the title is more than one line (up to 3 lines for SIP-T54W/T53W/ T53/T46U/T46G/T46S/T43U/T29G/T27G/ CP920 IP phones; up to 2 lines for VP59/ SIP-T58A/T42U/T42G/T42S/T41P/T41S/ T40P/T40G/T23P/T23G/T21(P) E2/T19(P) E2/CP860/CP960 IP phones; not limit for SIP VP-T49G/SIP-T57W/T48U/T48G/T48S with space in title).
Select "yes" to display in multi-lines,and "no" for one line. The default value is "yes".
URL none
Specify the target URL to receive the user input.
Set several input boxes.
| Yealink DECT Phone XML Objects | 27
Parameter type
Position
Type
InputField tag optional
password InputField tag optional
Value "IP" "string" "number" "timeUS" "timeInt" "dateUS" "dateInt" "empty"
"yes" "no"
Description
Specifies the type of input. Data input options: 1. IP 2. string(default) 3. number 4. timeUS,12-hour format
Format: HH:MM:SS AM/PM HH:1-12,MM:0-59,SS:0-59 AM/PM stand for the forenoon/ afternoon. Example: 02:00:23 AM 12:59:00 PM 5. timeInt,24-hour format Format: HH:MM:SS HH:0-23, MM:0-59, SS:0-59 Example: 23:25:00 6. dateUS Format: MM/DD/YYYY MM:1-12,DD:1-31,YYYY:0000-9999 Example: 12/31/2009 7. dateInt Format: DD/MM/YYYY DD:1-31,MM:1-12,YYYY:0000-9999 Example: 31/01/2010 8. empty
Whether to mask the input by the "*". The default value is "no". Note: The value in the Inputfield tag has a higher priority than that in the root tag.
| Yealink DECT Phone XML Objects | 28
Parameter editable
Position
Type
InputField tag optional
Value "yes" "no"
Prompt Parameter
InputField body
InputField body
optional
string
mandatory string
Selection
InputField body
optional
string
Default
InputField body
optional
string
SoftKey
Body
optional
string
Description
Whether to allow users to input something. The default value is "yes". Users can not input anything and modify the default input if it is set to "no".
Applicable scenario: only allow some users to login.
Note: If the value of the LockIn is "yes", users can not input anything no matter what you set "editable" to.
The prompt of user input.
Name of the parameter to be appended to the URL.
The "?parameter name= the user input" will be appended to the URL when the user presses the "Select" soft key or the "OK" key.
The "selection= the value of the Selection parameter" will also be appended to the URL when the user presses the "Select" soft key or the "OK" key.
Default value to be displayed in the input field.
If "Default" is left blank,the input field will be automatically filled with corresponding data when the type is set to "timeUS","timeInt","dateUS" or "dateInt".
The soft keys displayed will be changed according to the attribute value of type.
Refer to Customizable Soft Keys for more information.
Note: The InputField parameter in the XML file is optional. You can use this parameter to customize more input fields on the DECT phone.
If there is no soft key defined in the InputScreen object,and the Type for input box is "IP",the LCD screen displays the following default soft keys:
SoftKey Index 1 2
Label Back Submit
URI SoftKey:Back SoftKey:Submit
For CP860/CP920/SIP-T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/T41P/T41S/T40P/ T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
| Yealink DECT Phone XML Objects | 29
SoftKey Index 1 2 3 4
Label Submit Dot (.) BackSpace Exit
URI SoftKey:Submit SoftKey:Dot SoftKey:BackSpace SoftKey:Exit
For SIP-T57W/T48U/T48G/T48S IP phones:
SoftKey Index 1 2 3
Label Dot (.) BackSpace Submit
URI SoftKey:Dot SoftKey:BackSpace SoftKey:Submit
For SIP VP-T49G IP phones: SoftKey Index 1
Label Submit
URI SoftKey:Submit
For VP59/SIP-T58A/CP960 IP phones:
SoftKey Index 1 2
Label Exit Submit
URI SoftKey:Exit SoftKey:Submit
If there is no soft key defined in the InputScreen object,and the Type for input box is "timeUS","timeInt","dateUS" or "dateInt",the LCD screen displays the following default soft keys:
For CP860/CP920/SIP-T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/T41P/T41S/T40P/ T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
SoftKey Index 1 2 3 4
Label Submit 2aB BackSpace Exit
URI SoftKey:Submit SoftKey:ChangeMode SoftKey:BackSpace SoftKey:Exit
For SIP-T57W/T48U/T48G/T48S IP phones:
SoftKey Index 1 2
Label BackSpace Submit
URI SoftKey:BackSpace SoftKey:Submit
For SIP VP-T49G IP phones: SoftKey Index 1
Label Submit
URI SoftKey:Submit
| Yealink DECT Phone XML Objects | 30
For VP59/SIP-T58A/CP960 IP phones:
SoftKey Index 1 2
Label Exit Submit
URI SoftKey:Exit SoftKey:Submit
If there is no soft key defined in the InputScreen object,and the Type for input box is "number",the LCD screen displays the following default soft keys:
For CP860/CP920/SIP-T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/T41P/T41S/T40P/ T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
SoftKey Index 1 2 4
Label Submit BackSpace Exit
URI SoftKey:Submit SoftKey:BackSpace SoftKey:Exit
For SIP-T57W/T48U/T48G/T48S IP phones:
SoftKey Index 1 2
Label BackSpace Submit
URI SoftKey:BackSpace SoftKey:Submit
For SIP VP-T49G IP phones: SoftKey Index 1
Label Submit
URI SoftKey:Submit
For VP59/SIP-T58A/CP960 IP phones:
SoftKey Index 1 2
Label Exit Submit
URI SoftKey:Exit SoftKey:Submit
If there is no soft key defined in the InputScreen object,and the Type for input box is "string",the LCD screen displays the following default soft keys:
For CP860/CP920/SIP-T54W/T53W/T53/T46U/T46G/T46S/T43U/T42U/T42G/T42S/T41P/T41S/T40P/ T40G/T29G/T27G/T23P/T23G/T21(P) E2/T19(P) E2 IP phones:
SoftKey Index 1 2 3 4 5 6
Label Submit 2aB BackSpace Dot (.) NextSpace Exit
URI SoftKey:Submit SoftKey:ChangeMode SoftKey:BackSpace SoftKey:Dot SoftKey:NextSpace SoftKey:Exit
For SIP-T57W/T48U/T48G/T48S IP phones:
| Yealink DECT Phone XML Objects | 31
SoftKey Index 1 2 3 4
Label BackSpace Dot (.) NextSpace Submit
URI SoftKey:BackSpace SoftKey:Dot SoftKey:NextSpace SoftKey:Submit
For SIP VP-T49G IP phones: SoftKey Index 1
Label Submit
URI SoftKey:Submit
For VP59/SIP-T58A/CP960 IP phones:
SoftKey Index 1 2
Label Exit Submit
URI SoftKey:Exit SoftKey:Submit
The function keys and soft keys are listed in the following table:
Key Name Up/Down Key
Operation Pressing the up/down key
Function
Browse the input box up and down.
Note: Pressing the up/down key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
Left/Right Key
Pressing the left/right key
Move the cursor left and right.
Note: Pressing the left/right key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP860/ CP920/CP960 IP phones.
Keypad
Pressing the digit keys 1~9,*,and # keys
If the value of the LockIn is "no" and the value of the "editable" is "yes",then input character; otherwise no response.
Note: It is not applicable to CP960 IP phones.
BackSpace
Pressing the "BackSpace" soft key
Delete the character before the cursor in the input box.
Note: Pressing the BackSpace soft key is not applicable to SIP VP-T49G/VP59/SIP-T58A/CP960 IP phones.
Key Name Dot (.)
Submit Back/Exit 2aB
NextSpace
| Yealink DECT Phone XML Objects | 32
Operation Pressing the "Dot" soft key
Function
Input a "." in the input box at the cursor position.
Note: Pressing the Dot soft key is not applicable to SIP VPT49G/VP59/SIP-T58A/CP960 IP phones.
Pressing the "Submit" soft key
Execute the command comprised of the URI and input content.
Pressing the "Back"/"Exit" soft key Return to the idle screen.
Pressing the 2aB soft key
Input mode switch,for example,switch the input mode among "2aB", "ABC","abc","Abc" or "123".
Note: Pressing the 2aB soft key is not applicable to SIP VPT49G/VP59/SIP-T58A/CP960 IP phones. Pressing the 2aB soft key is not applicable to SIP-T57W/T48U/T48G/T48S IP phones when the onscreen keyboard is enabled.
Pressing the "NextSpace" soft key Input a space in the input box at the cursor position.
Note: Pressing the NextSpace soft key is not applicable to SIP VP-T49G/VP59/SIP-T58A/CP960 IP phones.
Key Name
Off-hook Key/ Line Key/ Speakerphone Key
| Yealink DECT Phone XML Objects | 33
Operation
Function
Pressing the line key/ Speakerphone Key/ Off-hook key
If there is a number contained in the "Dial" tag,the phone will dial out the number. If there is no number contained in the "Dial" tag, the phone will be no response to any operation.
If the value of the LockIn is "no" and there is a number contained in the Dial tag,the phone will dial out the number.
If the value of the LockIn is "no" and there is no number contained in the Dial tag:
For pressing the line key,the phone will be no response.
For off-hook and pressing Speakerphone Key/off-hook key,the phone will enter the predialing screen.
If the value of the LockIn is "yes" and there is a number contained in the Dial tag:
For off-hook and pressing the line key,the phone will dial out the number.
For pressing the Speakerphone key,the phone will be no response to any operation.
If the value of the LockIn is "yes" and there is no number contained in the Dial tag,the phone will be no response to any operation.
Note: Pressing the line key is not applicable to SIP-T19(P) E2/CP860/CP920 IP phones. Pressing the off-hook key is only applicable to CP860/CP920 IP phones. Off hook by resting the handset is not applicable to CP860/CP920/CP960 IP phones.
| Yealink DECT Phone XML Objects | 34
Key Name Cancel Key
OK Key
Operation Pressing the On-hook key
Pressing the "OK" key
Function
If "cancelAction" is not left blank,the function of On-hook key is calling the URI defined by "cancelAction".
If "cancelAction" is left blank,the function of On-hook key is returning to the idle screen.
Note: Long pressing the On-hook key can also return to the idle screen.
Note: Pressing the "X" key is not applicable to SIP VP-T49G/VP59/ SIP-T58A/T57W/T19(P) E2/ CP860/CP920/CP960 IP phones.
The function of the "OK" key is the same as that of "Select".
Note: Pressing the "OK/" key is not applicable to SIP VP-T49G/ VP59/SIP-T58A/T57W/CP960 IP phones.
Note: You can press the # key to switch the input modes among "Abc","123","ABC" or "abc". An example of the InputScreen object:
| Yealink DECT Phone XML Objects | 35
<?xml version="1.0" encoding="ISO-8859-1"?> <YealinkDECTInputScreen type="string" Beep="yes" Timeout="15" LockIn="no"> <Title wrap="yes">Proxy Server</Title> <URL>http://10.3.5.5/XML/input.xml</URL> <InputField> <Prompt>User Name:</Prompt> <Parameter>user</Parameter> <Default></Default> <Selection>1</Selection> </InputField> <InputField> <Prompt>Password:</Prompt> <Parameter>password</Parameter> <Default></Default> <Selection>2</Selection> </InputField> </YealinkDECTInputScreen>
In this example,when the user presses the Submit soft key or OK key on the phone after entering "admin" as the User Name and "222" as the password,the phone will call the following URLs: · http://10.3.5.5/?proxy=admin&p=222&selection=1,if the position of the cursor is located in the User
Name input box. · http://10.3.5.5/?proxy=admin&proxy=222&selection=2,if the position of the cursor is located in the
Password input box. · http://10.3.5.5/XML/input.xml?password=222&user=admin&selection=1,if the position of the cursor is
located in the User Name input box. · http://10.3.5.5/XML/input.xml?password=222&user=admin&selection=2,if the position of the cursor is
located in the Password input box.
Customizable Soft Keys
DECT phones allow users to create soft keys with customizable labels,positions,and actions to be taken when the soft keys are pressed. The customizable soft keys can override the default soft keys in each XML object. XML descriptions of customizable soft keys:
| Yealink DECT Phone XML Objects | 36
<SoftKey index = "1-6"> <Label>Text</Label> <URI>http://someserver/somepage OR SoftKey:someaction</URI> </SoftKey>
Note: Customizable soft keys are only available for the UI XML objects.If you use the customizable soft keys,the default soft keys of the XML object will not be displayed anymore. This means they have to be recreated as customizable soft keys.
The URI of the custom soft key is case sensitive.
The parameters of the soft key are listed in the following table:
Parameter SoftKey Index
Type mandatory mandatory
Value none Integer
Description The soft key.
Indicate the soft key number. (Value ranges from 1~6.)
Label URI
mandatory mandatory
String String
The label of the soft key.
The action of the soft key.
The supported actions for each UI XML object are described in the following table:
Label
URI
Function
TextMenu Object
Exit/Back
SoftKey:Exit/ SoftKey:Back
Return to the idle screen.
Select
SoftKey:Select
Execute the URI defined by "Selection".
Send
SoftKey:Dial
Dial out the number of the highlighted menu item.
TextScreen Object
Exit/Back
SoftKey:Exit/ SoftKey:Back
Return to the idle screen.
InputScreen Object (soft keys cannot be customized on SIP VP-T49G/VP59/SIP-T58A/T57W/T48U/ T48G/T48S/CP960 IP phones)
Exit/Back
SoftKey:Exit/ SoftKey:Back
Return to the idle screen.
Submit
SoftKey:Submit
Execute the command comprised of the URI and input content.
Dot (.)
SoftKey:Dot
Input a "." in the input box at the cursor position.
BackSpace
SoftKey:BackSpace
Delete the character before the cursor in the input box.
NextSpace
SoftKey:NextSpace
Insert a space in the input box at the cursor position.
| Yealink DECT Phone XML Objects | 37
Label 2aB
URI SoftKey:ChangeMode
Directory Object Send
SoftKey:Dial
Previous
SoftKey:Previous
Next
SoftKey:Next
Exit FormattedTextScreen Object Exit ImageScreen Object Exit ImageMenu Object Exit
SoftKey:Exit SoftKey:Exit SoftKey:Exit SoftKey:Exit
Function Input mode switch,for example,switch the input mode among "2aB", "ABC","abc","Abc" or "123".
Dial out the number of the highlighted contact. Execute the URI defined by "Previous". Execute the URI defined by "Next". Exit from the current XML screen.
Exit from the current XML screen.
Exit from the current XML screen.
Exit from the current XML screen.
Note: If you configure more than two soft keys,Options is displayed. You may need to select Options first and then select the corresponding soft key.
An example of the customizable soft keys used with the TextMenu object:
| Yealink DECT Phone XML Objects | 38
<?xml version="1.0" encoding="ISO-8859-1"?> <YealinkDECTTextMenu defaultIndex="2" style="numbered" Beep="no" Timeout="30" refresh="refresh time" url="http://10.2.11.158/XML/TextMenu.xml" cancelAction = "http://10.2.11.158/test.xml" > <Title>Phone Services</Title> <MenuItem> <Prompt>Input</Prompt> <URI>http://10.2.11.158/XML/InputScreen.xml</URI> <Dial>456</Dial> <Selection>12345</Selection> </MenuItem> <MenuItem> <Prompt>TextScreen</Prompt> <URI>http://10.2.11.158/XML/TextScreen.xml</URI> <Dial>1001</Dial> <Selection>4567</Selection> </MenuItem> <SoftKey index="1"> <Label>Select</Label> <URI>SoftKey:Select</URI> </SoftKey> <SoftKey index="2"> <Label>Custom</Label> <URI>http://10.1.0.105/8.8.8.54.rom</URI> </SoftKey> </YealinkDECTTextMenu>
XML Objects Pushed to the Phone
The phone can request an XML object via HTTP GET,or an object can be pushed to the phone via a POST. The phone parses this object immediately upon receipt and displays the information on the screen. You can ask the distributor or Yealink FAE for php source code or obtain php source code online: http:// support.yealink.com/documentFront/forwardToDocumentFrontDisplayPage.
| Yealink DECT Phone XML Objects | 39
The HTTP POST packet must contain an "xml=" line in the message body. XML data is located after the equals sign in the message. HTML forms that post objects to the phone must use a field named "xml" to send data. The applications that construct HTTP packets must also specify this line. To accept a pushed message,the "PushXML_ServerIP" parameter on the phone must be configured as the IP address of the push XML server. For more information,refer to Configuring the Push XML Server. Description of the object oriented php class (the red contents are needed to modify):
<?php # function push2phone($server,$phone,$data) { $xml = "xml=".$data; $post = "POST /servlet?push=xml HTTP/1.1\r\n"; $post .= "Host: $phone\r\n"; $post .= "Referer: $server\r\n"; $post .= "Connection: Keep-Alive\r\n"; $post .= "Content-Type: text/xml\r\n"; $post .= "Content-Length: ".strlen($xml)."\r\n\r\n"; $fp = @fsockopen ( $phone,80,$errno,$errstr,5); if($fp) { fputs($fp,$post.$xml); flush(); fclose($fp); } } ############################## # The above codes are fixed,please just edit the following codes according to requirement.
$xml = "the beginning of the root element in the XML object\n"; $xml . = "the child elements in the XML object\n"; $xml . = "the end of the root element in the XML object\n "; <!--Additional XML Items may be added --> <!--All XML Items added here construct an XML object -->
push2phone("Server IP Address,Phone IP Address ",$xml); # replace IP address of the push XML server with "Server IP Address" # replace IP address of the phone with "Phone IP Address" ?>
Sample php source code:
| Yealink DECT Phone XML Objects | 40
In this example,the IP address of the push XML server is 192.168.0.112,and the server is defined to send a XML message to the IP phone with IP address 192.168.0.150.
<?php # function push2phone($server,$phone,$data) { $xml = "xml=".$data; $post = "POST /servlet?push=xml HTTP/1.1\r\n"; $post .= "Host: $phone\r\n"; $post .= "Referer: $server\r\n"; $post .= "Connection: Keep-Alive\r\n"; $post .= "Content-Type: text/xml\r\n"; $post .= "Content-Length: ".strlen($xml)."\r\n\r\n"; $fp = @fsockopen ( $phone,80,$errno,$errstr,5); if($fp) { fputs($fp,$post.$xml); flush(); fclose($fp); } } ############################## $xml = "<YealinkIPPhoneTextScreen Beep=\"yes\">\n"; $xml .= "<Title>Push test</Title>\n"; $xml .= "<Text>This is a test for pushing text to a phone.</Text>\n"; $xml .= "</YealinkIPPhoneTextScreen>\n"; #The above 4 lines prefixed with "$xml =" constructs a TextScreen object to be pushed to the #phone. #You can construct your own XML object using the same method.
push2phone("192.168.0.112","192.168.0.150",$xml); ?>
Some Development Guidelines
There are some simple rules that you had better follow when you develop XML applications for DECT phones. · Do not forget the "Exit" soft key when you customize soft keys. · Place custom soft keys as they are for the standard objects,also it is better to use the same labels.
| Configuring the HTTP Server | 41
· If you want to access data from the Internet,it is preferable to use an RSS feed or a SOAP interface than Web scraping as Web sites frequently change their layout interface.
Configuring the HTTP Server
DECT phones use the HTTP (HTTPS) protocol for downloading. You can set up the HTTP(s) server,and place some XML files on the server for downloading. This section provides you with some instructions on how to configure the HTTP server and obtain the access URL of the XML files downloaded by the DECT phones.
Procedure 1. Double click the HFS.exe. 2. Click Menu on the main page and select the IP address of the PC from IP address.
The default HTTP port is 80. You can also reset the HTTP port (make sure the port isn't in use before reset). 3. Right click the icon on the left of the main page, select Add folder from disk to add the HTTP Server root directory. 4. Locate the root directory from your local computer. Select your desired folder. 5. Select one of the XML files,then the access URL of the selected XML file is displayed in the address bar. The screenshot for reference is shown as below:
| Configuring the Push XML Server | 42
Configuring the Push XML Server
XAMPP is a free,cross-platform,easy-to-use web server capable of serving dynamic pages. XAMPP consists mainly of the Apache HTTP Server,MySQL database and interpreters for scripts written in the PHP and Perl programming languages. XAMPP is an acronym for X (any of the four operating systems Windows,Linux,Sun Solaris,and Mac OS X),Apache,MySQL,PHP, and Perl. · Installing the XMAPP · Starting the XMAPP · Testing the Installation of the XAMPP · Pushing an XML Object to the Phone
Installing the XMAPP
This section shows you how to install XAMPP on Microsoft Windows system. The XAMPP software is available for free. You can download it from http://www.apachefriends.org/index.html. We recommend that you configure the XAMPP as the push XML server,and then follow the instructions to push an XML object to the phone.
Procedure 1. Double click xampp-win32-1.8.3-3-VC11-installer.exe to run the application.
| Configuring the Push XML Server | 43
2. Follow the setup wizard shown as below: Remember the installation path of the XAMPP. In this example,the installation path is C:\xampp.
| Configuring the Push XML Server | 44
| Configuring the Push XML Server | 45
Starting the XMAPP
Procedure 1. Double click xampp-control.exe in the installation path of the XAMPP.
2. Click Start next to the Apache module.
| Configuring the Push XML Server | 46
Apache is running as shown below:
You can also click Stop to stop Apache. Note: Ensure ports 80 and 443 are not being used when starting the Apache server.
Testing the Installation of the XAMPP
Procedure Enter "http://localhost/xampp/" in the address bar of the web browser and press the Enter key. The web page should be shown as below:
| Configuring an XML Browser Key | 47
Pushing an XML Object to the Phone
After the XAMPP server is installed in your local system and Apache is already started,you can find the htdocs directory in the installation path (For example,C:\xampp.) of the XAMPP.
Procedure
1. Place the php file used to send an XML object to the phone (For example, TextScreen.php) in the htdocs directory.
2. Enter the access URL (For example,http://localhost/TextScreen.php. Replace "TextScreen.php" with the name of the XML object to be pushed.) of the php file in the address bar of the web browser,and press the Enter key to push an XML object to the phone.
Configuring an XML Browser Key
To use the XML browser feature,you must configure an XML key via configuration files in advance.
Procedure 1. Add/Edit XML Browser key parameters in the configuration file (for example, y000000000103.cfg).
The following table shows the information of parameters:
Parameters custom.handset.defined_left_key.type
Permitted Values 25
Default 0
Description: It configures the role of the Left Softkey on the idle screen. The number 25 stands for the key type as XML Browser.
custom.handset.defined_left_key.xml_url
String
Blank
It configures the available access URL for the Left Softkey to browse the XML object. Note: It works only if "custom.handset.defined_left_key.type" is set to 25 (XML Browser).
custom.handset.defined_right_key.type
25
0
| Configuring an XML Browser Key | 48
Parameters
Permitted Values
Description: It configures the role of the Right Softkey on the idle screen. The number 25 stands for the key type as XML Browser.
custom.handset.defined_right_key.xml_url
String
Default Blank
It configures the available access URL for the Right Softkey to browse the XML object. Note: It works only if "custom.handset.defined_right_key.type" is set to 25 (XML Browser).
custom.handset.defined_direction_left_key.type
25
0
Description: It configures the role of the left navigation key on the idle screen. The number 25 stands for the key type as XML Browser.
custom.handset.defined_direction_left_key.xml_url
String
Blank
It configures the available access URL for the left navigation key to browse the XML object. Note: It works only if "custom.handset.defined_direction_left_key.type" is set to 25 (XML Browser).
custom.handset.defined_direction_right_key.type
25
0
Description: It configures the role of the right navigation key on the idle screen. The number 25 stands for the key type as XML Browser.
custom.handset.defined_right_key.xml_url
String
Blank
It configures the available access URL for the right navigation key to browse the XML object. Note: It works only if "custom.handset.defined_direction_right_key.type" is set to 25 (XML Browser).
custom.handset.defined_direction_up_key.type
25
0
Description: It configures the role of the up navigation key on the idle screen. The number 25 stands for the key type as XML Browser.
custom.handset.defined_direction_up_key.xml_url
String
Blank
It configures the available access URL for the up navigation key to browse the XML object. Note: It works only if "custom.handset.defined_direction_up_key.type" is set to 25 (XML Browser).
custom.handset.defined_direction_down_key.type
25
0
Description: It configures the role of the down navigation key on the idle screen. The number 25 stands for the key type as XML Browser.
| Yealink DECT Phone XML Configurations | 49
Parameters custom.handset.defined_direction_down_key.xml_url
Permitted Values String
Default Blank
It configures the available access URL for the down navigation key to browse the XML object. Note: It works only if "custom.handset.defined_direction_down_key.type" is set to 25 (XML Browser).
The following shows an example of configuring an XML Browser key in the configuration file: custom.handset.defined_right_key.type = 25 custom.handset.defined_right_key.xml_url = http://10.2.1.158/TextMenu.xml 2. Reference the configuration file in the boot file (for example, y000000000000.boot). Example: include:config "http://10.2.1.158/HTTP Directory/y000000000103.cfg" 3. Upload the boot file and configuration file to the root directory on the provisioning server. 4. Trigger DECT phone to perform an auto provisioning for a configuration update. For more information on auto provisioning,refer to the latest Auto Provisioning Guide on Yealink Technical Support.
Yealink DECT Phone XML Configurations
· Configuring the XML SIP Notify
Configuring the XML SIP Notify
You can configure the XML SIP Notify via the configuration files. It will enable or disable SIP NOTIFY messages to be processed by the phone.
Procedure 1. Add/Edit the XML SIP Notify parameters in the configuration file (for example, y000000000103.cfg).
The following table shows the information of parameters:
Parameters push_xml.sip_notify
Permitted Values 0 or 1
Default 0
Description: It enables or disables the phone to process the push XML via SIP NOTIFY message. 0-Disabled 1-Enabled
The following shows an example of configuring XML SIP Notify in the configuration file: push_xml.sip_notify = 1
| Troubleshooting | 50
2. Reference the configuration file in the boot file (for example, y000000000000.boot). Example: include:config "http://10.2.1.158/HTTP Directory/y000000000103.cfg"
3. Upload the boot file and configuration file to the root directory of the provisioning server. 4. Trigger W80B device to perform an auto provisioning for a configuration update.
For more information on auto provisioning,refer to the latest Auto Provisioning Guide on Yealink Technical Support. Upon receiving the XML SIP NOTIFY message,the phone will display the information or execute the command contained in the NOTIFY message. Example of a SIP Notify with the XML content:
Troubleshooting
This chapter provides general troubleshooting information to help to solve the problems you might encounter when developing XML applications for DECT phones. Besides,it also provides related troubleshooting tools and parsing error debug example for you to trace errors. If you require additional information or assistance, contact your system administrator. Why does the phone display "Loading error!" when executing the XML object? · Ensure that the network is reachable. · Ensure that the server is running properly. · Ensure that the HTTP server application is running properly. · Ensure that the URI is resolved.
| Troubleshooting | 51
· Ensure that the XML object file exists on the server. · Ensure that the URI is parsed. Why does the phone display "File layout error!" when executing the XML object? · Check whether the XML object files' syntax is right. For example,XML tags are in pairs. · Troubleshooting Tools · Parsing Error Debug Example
Troubleshooting Tools
The following tools will help you troubleshoot problems with the XML services. · Standard web browser (Microsoft Internet Explorer 6.0 or a later)
· Verify the connectivity. · Verify the validity of the URI called by the phone. · Network packet analyzer such as Wireshark · Verify what is exchanged between the phone and the server. · HTTP Server log · Verify if the HTTP GET reaches the server. · Verify the parameters of the HTTP GET. · Phone log (syslog) · Verify how the phone processes an XML request.
Parsing Error Debug Example
Some of the XML editors (such as UltraEdit and Dreamweaver) can also verify the XML syntax and detail the related error in the output window. The following takes the Dreamweaver tool as an example for reference. After you execute the XML object,the LCD screen will prompt" File layout error !".
| Troubleshooting | 52
<?xml version="1.0" encoding="ISO-8859-1"?> <YealinkDECTTextMenu defaultIndex="2" style="numbered" Beep="no" Timeout="30" refresh="refresh time" url="http://10.2.11.158/XML/TextMenu.xml" cancelAction = "http://10.2.11.158/test.xml" > <Title>Phone Services</Title> <MenuItem> <Prompt>Input</Prompt> <URI>http://10.2.11.158/XML/InputScreen.xml</URI> <Dial>456</Dial> <Selection>12345</Selection> </MenuItem> <MenuItem> <Prompt>TextScreen</Prompt> <URI>http://10.2.11.158/XML/TextScreen.xml</URI> <Dial>1001</Dial> <Selection>4567</Selection> </MenuItem> <YealinkDECTTextMenu>
The Dreamweaver tool tells us where the problem is. The error is on the last line,it should be </ YealinkDECTTextMenu>.
Apache FOP Version 2.3 DITA Open Toolkit