i i
Table of Contents Table of Contents....................................................................i About This Guide ...................................................................1 Who should use this guide? ............................................................................................ 1 Summary of Changes ..................................................................................................... 1 Changes for Release 71.0, Guide Version 71.155............................
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Yealink IP Phone XML Configurations ................................... 55 Configuring an XML Browser Key ................................................................................. 55 Configuring the Block XML In Calling ........................................................................... 56 Configuring the Push XML Server Address .................................................................. 57 Configuring the XML SIP Notify ...
About This Guide XML browser simply means that the SIP phones’ LCD screen display can be managed by external applications. This Developers’ Guide shows you how to use XML API to control the LCD screen display of Yealink IP phones as well as its configuration. The XML API is intended to provide you with flexibility in developing applications on the phones while tightly integrating into the phone’s telephony capabilities and functions.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Customizable Soft Keys on page 43. Configuring the Push XML Server on page 51.
XML and Yealink IP Phones 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. XML enables the SIP 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.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The XML browser feature on Yealink IP phones allows users to develop and deploy custom services which meet user functional requirements 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.
XML and Yealink IP Phones You can press the predefined XML Browser key to trigger the phone initiated application of XML browser. After you press the key, the IP phone issues an HTTP(s) GET command to the server, waits for the answer, decodes and displays this answer as any web browser, such as Microsoft Internet Explorer or Firefox would do as a web client. For more information on how to configure an XML Browser key, refer to Configuring an XML Browser Key.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones In addition, Yealink IP phones support accepting SIP NOTIFY messages from a SIP proxy server, and act as a limited web server. For more information on how to configure the XML SIP Notify, refer to Configuring the XML SIP Notify.
XML and Yealink IP Phones This chapter describes the available part of the LCD screen for Yealink SIP-4X IP phones as well as the keys that are controlled by the XML objects.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 8
Yealink IP Phone XML Objects Creating interactive service applications is relatively easy when you understand the XML objects that are defined for the Yealink IP 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 in the page. This section details each proprietary XML objects supported by Yealink IP phones.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones
Yealink IP Phone XML Objects Parameter Type Value Description 45. If set to be “yes”, the phone LockIn optional “yes” “no” ignores all events that would cause the screen to exit, except the soft key events defined by the XML object. Default value is “no”. cancelAction optional URI Title mandatory string Defines the URI to be called when the user cancels the XML object. The title of the text menu.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value SoftKey optional string Description Refer to Customizable Soft Keys for more information.
Yealink IP Phone XML Objects An example of the TextMenu object: Phone Services
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The TextScreen object allows users to display some texts on the IP phones. XML description of the TextScreen object:
Yealink IP Phone XML Objects Parameter Type Value Description when the user cancels the XML object. If there is no operation at a fixed interval on the phone, the phone will automatically “integer” Timeout optional Unit: second exit the TextScreen interface. If set to be 0, the phone will not exit the TextScreen interface until pressing the “Exit” soft key. Default value is 45.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The function keys are listed in the following table: Key Name Statement Up/Down Up and down keys Digitkey Digit keys 1~9 Soft key, Exit URI=”SoftKey: Exit” Description To see the content of text tips by pressing up and down. No response. Redisplays the previous XML interface, otherwise returns to the idle interface. If there is a number contained in the Dial tag, Offhook/ LineKey/ the phone will dial out the number.
Yealink IP Phone XML Objects The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: 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 something to server. You can define the content and format of the input content.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones password = “yes/no” editable = “yes/no” > Guidance for the input parameter name add to URL Default Value Selection The parameters of the InputScreen object are listed in the follow
Yealink IP Phone XML Objects Parameter Type Value Description 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, null string, the line number is determined by “displayMode”. Beep Password optional optional “yes” “no” “yes” “no” Whether to play a tone when the XML object is opened. Default value is “yes”. Whether to mask the input by “*” characters. Default value is “no”.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value Description lines. condensed: Display the prompt and input box in one line Position of the cursor. If not defaultIndex optional integer specified, the cursor is positioned on the first input box. Default value is 1. Title mandatory string The title of input object. Whether to display the title in multi-lines when the content of wrap optional “yes” the title is longer than one line.
Yealink IP Phone XML Objects Parameter Type Value Description Selection: 0&menu_pos=1 The phone will send a request “http://10.1.0.105/menu1.xml?sel ection=0&menu_pos=1” when the user presses “Select”.) When the cursor moves to the input box, the soft keys displayed will change SoftKey optional string accordingly. (e.g., add the input mode.) Refer to Customizable Soft Keys for more information. Note The InputField parameter in the XML file is optional.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 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: SoftKey Index Label URI 1 Exit SoftKey: Exit 2 BackSpace SoftKey: BackSpace 4 Submit 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: SoftKey Index Label URI
Yealink IP Phone XML Objects Key Name Statement Description ChangeMode” Soft key, URI= NextSpace “SoftKey: NextSpace” Inserts a space in the input box at the cursor position. If the value of the LockIn is “yes”, there will Offhook/ Off hook/Line Key/ LineKey/ Handfree Key Handfree be no responses to any operation. The phone will enter into pre-dial interface when the value of the LockIn is “no”.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Password: proxy The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: The PhoneDirectory object allows users to browse an online directory in real time. The PhoneDirectory object is just like a remote phonebook.
Yealink IP Phone XML Objects number The parameters of the PhoneDirectory object are listed in the following table: Parameter Type Value mandatory none next optional URI previous optional URI YealinkIPPhone Directory Beep cancelAction optional optional “yes” “no” URI Description The root element of the PhoneDirectory object.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value MenuItem mandatory none Prompt mandatory string URI mandatory URI SoftKey optional string Description Address item. (Value ranges from 1 to15.) The prompt of address item. The operation of address item, such as the telephone number. Refer to Customizable Soft Keys for more information.
Yealink IP Phone XML Objects Key Name Statement LineKey/ Handfree Key Description Handfree Cancel The “X” key of the phone If the value of the LockIn is “no”, the function of “X” key returns to the idle interface, if the value of the LockIn is “yes”, there will be no response. If the value of the LockIn is “no”, the function of OK The “OK” key of “OK” key is the same as that of “Dial”, if the the phone value of the LockIn is “yes”, there will be no response.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: The PhoneStatus 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 PhoneStatus object can remind users of received messages, missed calls, news, notify, etc. XML description of the PhoneStatus object:
Yealink IP Phone XML Objects The parameters of the PhoneStatus object are listed in the following table: Parameter YealinkIPPh oneStatus Beep Type Value mandatory none optional “yes” “no” Description The root element of the PhoneStatus object. Whether to play a tone when the XML object is opened. Default value is “yes”. Whether to display the title in multi-lines when the content of the wrapList optional “yes” title is longer than one line.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value Description IP phone. Font size of the message. Size optional “normal” “small”: 12 pt “small” “normal”: 18 pt “double” “double”: 24 pt “large” “large”: 28 pt Default value is “normal”. “center” Align optional “left” “right” Alignment of the message display. Default value is “center”. “white” “black” “red” “green” “brown” “blue” “magenta” Color optional “cyan” Font color of the message.
Yealink IP Phone XML Objects Timeout = 60 SessionID=2 wrapList="no"> DND is enabled
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The parameters of the PhoneExecute object are listed in the following table: Parameter YealinkIPPhon eExecute Beep Type Value mandatory none optional “yes” “no” Description The root element of the PhoneExecute object. Whether to play a tone when beginning to execute the commands. Default value is “yes”.
Yealink IP Phone XML Objects Name URI Value Function Clear local call Command: ClearCallersList Clear record list Command: ClearDirectory Clear contact list Clear redial list Command: ClearRedialList Do nothing (dialed call) none none Specification of “XXXX” in “Led: XXXX=on/off/slowflash/fastflash”: Setting Method EXP-%d-%d2-%s Indicator Example %d: the “%d”th expansion module, “Led: EXP-2-3-RED=on”: value range: 1~6; Lighten the indicator of %d2: the “%d”th key of expansion the third
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Setting Method UP DOWN LEFT RIGHT Indicator Up key Down key Left key Right key INCREASE Increase volume DECREASE Decrease volume REDIAL Redial key HOLD Hold key MUTE Mute key TRANSFER Example Transfer key SMS Message key HEADSET Headset key HANDFREE Handfree key Line key, LINE%d For T46G: 1~27 For T42G/T41P: 1~15 HOTKEY%d Soft key, value 1~4 KEY_%d Digit key, value 0~9 STAR ‘*’ key POUND ‘#’ key An example of the Pho
Yealink IP Phone XML Objects Phones Auto Provisioning Guide. XML description of the PhoneConfiguration object:
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: The IP phone registers account 10008 on line 3. The FormattedTextScreen object allows IP phones to display formatted (alignment, size, color and scrolling) texts on the LCD screen. This text is divided into the following 3 distinct blocks, any of which can be empty: The Header block is displayed at the top of the LCD screen and contains static text.
Yealink IP Phone XML Objects Scroll Line Footer Li
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value Description FormattedTextScreen interface until pressing the “Exit” soft key. Default value is 45. If set to be “yes”, the phone ignores all events that LockIn optional “yes” would cause the screen to “no” exit without using the keys defined by the XML object. Default value is “no”. Text to be displayed on the line.
Yealink IP Phone XML Objects Parameter Type Value Description “lightgray” “darkgray” “lightred” “lightgreen” “yellow” “lightblue” “lightmagenta” “lightcyan” Defines the scrolling content Scroll optional none for display. The Line above the Scroll is as header, under the Scroll is as Footer. SoftKey optional string Refer to Customizable Soft Keys for more information.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: 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:
Yealink IP Phone XML Objects Parameter Type Value “no” Description XML object is opened. Default value is “yes”. doneAction optional URI Defines the URI to be called when the user presses the “OK” key. If there is no operation at a fixed interval on the phone, the phone will automatically exit the Timeout optional “integer” Unit: second ImageMenu interface. If set to be 0, the phone will not exit the ImageMenu interface until pressing the “Exit” soft key. Default value is 45.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Parameter Type Value Description more information. If there is no soft key defined in the ImageMenu object, the LCD screen displays the following default soft key: SoftKey Index Label URI 1 Exit SoftKey: Exit An example of the ImageMenu object: http://10.3.
Yealink IP Phone XML Objects Yealink IP 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 objects. XML descriptions of customizable soft keys: http://someserver/somepage OR SoftKey: someaction Note Customizable soft keys are only available for the UI XML objects.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones Name Action Function such as “http”. Next SoftKey: Next Dial out the URI of “Next” command, such as “http”. TextScreen Object Exit SoftKey: Exit Previous SoftKey: Previous Next SoftKey: Next Redisplay the previous XML interface, otherwise return to the idle interface. Dial out the URI of “Previous” command, such as “http”. Dial out the URI of “Next” command, such as “http”.
Yealink IP Phone XML Objects Name Action Next SoftKey: Next Exit SoftKey: Exit Function Dial out the URI of “Next” command, such as “http”. Redisplay the previous XML interface, otherwise return to the idle interface. ImageMenu Object Roll SoftKey: Roll Exit SoftKey: Exit Scroll the image. Redisplay the previous XML interface, otherwise return to the idle interface.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The screenshot of the SIP-T46G IP phone user interface for reference is shown as below: 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. The HTTP POST packet must contain an “xml=” line in the message body.
Yealink IP Phone XML Objects if($fp) { fputs($fp, $post.$xml); flush(); fclose($fp); } } ############################## # The above codes are fixed, please just edit the following codes according to requirement.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones fputs($fp, $post.$xml); flush(); fclose($fp); } } ############################## $xml = "\n"; $xml .= "Push test\n"; $xml .= "This is a test for pushing text to a phone.\n"; $xml .= "\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.
Configuring the HTTP Server Yealink IP phones support downloading using the HTTP (HTTPS) protocol. 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 to configure the HTTP server and how to obtain the access URL of the XML files to be downloaded by the IP phones. To configure the HTTP server using HFS application: 1. Double click the HFS.exe. 2.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 50
Configure the Push XML Server We recommend that you configure the Apache server acting as the push XML server. You can download the Apache installation application from: http://prdownloads.sourceforge.net/appserv/appserv-win32-2.5.5.exe?download, and then follow the instructions to install it. To configure the Apache server: 1. Double click appserv-win32-2.5.5.exe to run the application. 2. Follow the setup wizard shown as below: Remember the installation path of the Apache server.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 52
Configure the Push XML Server 3. Click Close to finish the installation.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones The screen pops up the following window: 4. You can validate that the installation is successful. Enter “Http://localhost/” in the address bar of the web browser and press the Enter key. The web page should be shown as below: To push an XML object to the phone: After the Apache server is installed in your local system, you can find the www directory in the installation path (For example, C:\AppServ.) of the Apache server. 1.
Yealink IP Phone XML Configurations To use the XML browser feature, you must configure an XML key in advance. You can configure an XML Browser key via web user interface or phone user interface. To configure an XML Browser key via web user interface (take the SIP-T46G IP phone as an example): 1. Access the web user interface of the phone. 2. Click on DSSKey->Line Key. 3. Select XML Browser from the pull-down list of Type. 4. Enter the available access URL in the Value field. 5. (Optional.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 6. Enter the available access URL in the Value field. 7. Press the Save soft key to accept the change. You can configure the Block XML In Calling via web user interface. It enables or disables the phone to block XML applications during a call. For example, if it is enabled, press a XML browser key when there is an active call on the phone, the XML application will be blocked.
Yealink IP Phone XML Configurations The IP address or domain name of the push XML server is specified in the Push XML Server IP Address field. After configuration, the IP phone will be able to accept the HTTP(s) POST from the server. To configure the Push XML Server via web user interface (take the SIP-T46G IP phone as an example): 1. Access the web interface of the phone. 2. Click on Features->Remote Control. 3. Enter IP addresses or domain names in the Push XML Server IP Address field.
XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones 3. Select Enabled from the pull-down list of SIP Notify field. 4. Click Confirm to accept the change. Upon receiving the XML SIP NOTIFY message, the phone will display the information or execute the command contained in the NOTIFY message.
Yealink IP Phone XML Configurations We are striving to improve our documentation quality and we appreciate your feedback. Email your opinions and comments to DocsFeedback@yealink.com.