Minibrowser
From Snom User Wiki
Overview
Author: Hirosh Dabui
snom phones are able to use services on standard web servers like Apache. You can use snom phones to deploy customized client services with which users can interact with the keypad. The snoms use the HTTP/HTTPS protocol. Typical services are:
- To-do lists
- Stock Information
- Weather
- Provisioning
- Daily schedule
- Telefon directory
Quickinstall
Currently supported XML Objects
In this section we describe the behavior and usage of each XML object. Creating interactive services is relatively easy when you understand the XML objects that are supported by firmware v7.1.7 and higher on the snom 370, snom 360, snom 320, and snom 300. The easiest way to do this is to start with our examples (see Quickinstall). Snoms can use HTTP to load an xml page or receive a SIP-Notify.
SnomIPPhoneText
The <SnomIPPhoneText> tag object displays UTF-8 text on the display. Please don't enter any control character into the <Text> message.
<SnomIPPhoneText> <Title>Demo</Title> <Prompt>Prompt Text</Prompt> <Text> Welcome to the snom technology AG minibrowser demo on 360...more infos under support@snom.com . Analyze the xmls via a webbrowser. your snom technology AG </Text> </SnomIPPhoneText>
result:
SnomIPPhoneImageFile
The SnomIPPhoneImage will display a bitmap (128x64 monochrome, bmp) points by <URL) tag. <LocationX> tag and <LocationY> tag will set the position of the bitmap on the display.
<SnomIPPhoneImageFile> <LocationX>0</LocationX> <LocationY>0</LocationY> <SoftKeyItem> <Name>0</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <URL>http://snom.com/minibrowser/snom320.bmp</URL> <SoftKeyItem> <Name>*</Name> <URL>http://snom.com/minibrowser/menu.xml</URL> </SoftKeyItem> </SnomIPPhoneImageFile>
result:
SnomIPPhoneImage
SnomIPPhoneImage includes a 64base encoded bmp file (128x64 monochrome). Use the Tags LocationX and LocationY to position the bitmap on the display.
<SnomIPPhoneImage> <LocationX>0</LocationX> <LocationY>0</LocationY> <SoftKeyItem> <Name>0</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <Data encoding="base64"> Qk2eBQAAAAAAAD4AAAAoAAAAgAAAAFYAAA ABAAEAAAAAAGAFAAARCwAAEQsAAAIAAAACAAAAAAAAAP///wD// //////////////////////////////////////////////// /////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////// ////////////////////////////////////////////////////////// //////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAADDgAAAAAAAAAAAAAAAAAAA/8AAAAAAA AAAAAAAAAAAAAfuAAAAAAAAAAAAAAAAAEAH/wAAAAAAAAAAAAAAAAcAH/+AAAAAA AAAAAAAAAAGAH/3gAEAAAAAAAAAAAAABAB/+gADAAAAAAAAAAAAAAgAf/4AAgAAAAAAAAAAAA AAAf/+AAYAAEw4AAAAAAAAEAP//4AHAACYPwAAAAAAABAH///gDwAAgP0AAAAAAAAQD////A+AAM/ 8AAAAAAAAEA////4PwACP/gAAAAAAABAPwD//B+AAJ/2AAAAAAAAIHAAP/wfwAAMwQAAAAAAAADgAf/8 P8ACDGAAAAAAAAAA4P///D/gAABwAAAAAAAAAf/9//wf8AAAA8AAAAAAAAH/+//8D/gAAAAAAAAAAAAB//D//A f8AAMAAAAAAAAAAf/4//wH/wAGAAAAAAAAAAH/8P/8A58AAAAAAAAAAAAB/+B//AMPgAAAAAAAAAAAAf+AP/wDh8AAAAA AAAAAAAH+wB/0AYPAAAAAAAAAAAAB/uAPwAHDwAAAAAAAAAAAAf5gBgADwcAAAAAAAAAAAAHCAAAAB8HAAAAAAAAAAAABgA ADgU/BwAAAAAAAAAAAAAAIAB7eAMAAAAAAAAAAAAAAPAD8/gCAAAAAAAAAAAAAAD//wP4AAAAAAAAAAAAAAAB/4AD+AAAAA AAAAAAAAAAAf8AA/gAAAAAAAAAAAAAAAD/4APwAAAAAAAAAAAAAAAB//gD4AAAAAAAAAAAAAAAAf//g9AAAAAAAAAAAAAAg AD/j8OAAAAAAAAAAAAAAIAAD/wDAAAAAAAAAAAAAACAB/88AwAAAAAAAAAAAAAA/+fxwgMAAAAAAAAAAAAAAP5+/HEBAAAA AAAAAAAAAAD/nx4YAQAAAAAAAAAAAAAAf/Hj4AAAAAAAAAAAAAAAAH/46eAAAAAAAAAAAAAAAAA//HTgAAAAAAAAAAAAAAA AH/+IAAAAAAAAAAACAAAAAB//IAAAAAAAAAAAAwAAAAAP/9AAAAAAAAAAAADAAAAAA//eAAAAAAAAAAAAAAAAAAH84YAAAA AAAAAAAAAAAAAA/hgAAAAAAAAAAAAAAAAAAD7gAAAAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAA+gAAAAAAAAAAAAAA AAAAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== </Data> </SnomIPPhoneImage>
result:
Please note that the image is expected to be 128x64 (max.), 1-bit (monochrome) color, Windows bitmap (.bmp), base64-encoded.
To convert a BMP image with the above properties to a base64 encoded form which can be used like in the above example script, you can use perl:
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < pic.bmp > pic64
And in order to convert the base64 encoded form back to a PC viewable BMP, you can use:
perl -MMIME::Base64 -ne 'print decode_base64($_)' < pic64 > pic.bmp
SnomIPPhoneMenu
The menu is a list of text items. The user can choose a menu item to request the page with the URL that is associated with the menu item.
<SnomIPPhoneMenu> <Title>Menu</Title> <MenuItem> <Name>Readme First</Name> <URL>http://snom.com/minibrowser/readme.xml</URL> </MenuItem> <MenuItem> <Name>Ken and Dennis</Name> <URL>http://snom.com/minibrowser/ken_dennis.xml</URL> </MenuItem> <MenuItem> <Name>Lejla bmp in xml</Name> <URL>http://snom.com/minibrowser/lejla_image.xml</URL> </MenuItem> <MenuItem> <Name>Picture of snom320</Name> <URL>http://snom.com/minibrowser/snom320_image.xml</URL> </MenuItem> <MenuItem> <Name>Picture of snom VoIP box</Name> <URL>http://snom.com/minibrowser/snombox_image.xml</URL> </MenuItem> <MenuItem> <Name>internal telefonlist of snom</Name> <URL>http://snom.com/minibrowser/telbook.xml</URL> </MenuItem> <MenuItem> <Name>send data to php-server</Name> <URL>http://snom.com/minibrowser/input.xml</URL> </MenuItem> <SoftKeyItem> <Name>#</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>*</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> </SnomIPPhoneMenu>
result:
Since release 7.1.18 you can use sel=true, e.g.
<MenuItem sel=true> ... </MenuItem>
to preselect the item.
SnomIPPhoneDirectory
The directory is a list of SIP-URIs. The user can choose a directory item to dial this URI.
<SnomIPPhoneDirectory> <Title>Menu</Title> <Prompt>Prompt</Prompt> <DirectoryEntry> <Name>Support</Name> <Telephone>444</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>Hirosh Dabui</Name> <Telephone>000</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>Oliver Wittig</Name> <Telephone>000</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>Christian Stredicke</Name> <Telephone>000</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>TU Berlin FAX</Name> <Telephone>31470</Telephone> </DirectoryEntry> <SoftKeyItem> <Name>#</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>*</Name> <URL>http://snom.com/minibrowser/menu.xml</URL> </SoftKeyItem> </SnomIPPhoneDirectory>
result:
SnomIPPhoneInput
The SnomIPPhoneInput constructs an input form on the display. The user enters values and this will send the parameters to the target URL (server process). QueryStringParam and the DefaultValue can contain as an argument the phone settings variables (http://www.snom.com/wiki/index.php/FAQs#Settings_.7C_Remote_Control_.7C_Action_URL_.7C_Mass_Deployment, Version >= 6.0.7 ).
<SnomIPPhoneInput> <Title>Menu</Title> <Prompt>Prompt</Prompt> <URL>http://snom.com/minibrowser/server.php</URL> <InputItem> <DisplayName>send to srv</DisplayName> <QueryStringParam>cookie=0x1023&number</QueryStringParam> <DefaultValue/> <InputFlags>a</InputFlags> </InputItem> </SnomIPPhoneInput>
result:
The following types of inputflags are defined:
a: for ASCII
t: telephonenumber
n: numbers
e: equations
u: uppercase
l: lowercase
p: password
pn: password numeric mode (version > 7.1.30)
Example for a server process that receives values from SnomIPhoneInput:
<?php parse_str($_SERVER['QUERY_STRING'],$vars); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; echo "<SnomIPPhoneText>"; echo "<Text>"; echo "cookie: " . $vars['cookie'] . "-"; echo "The server received: " . $vars['number']; echo "</Text>"; echo "<SoftKeyItem> <Name>0</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>*</Name> <URL>http://snom.com/minibrowser/input.xml</URL> </SoftKeyItem>"; echo "</SnomIPPhoneText>"; ?>
Speedselect
Snom phones allow navigation to a specific line in the menu or directory by pressing numeric DTMF keys. The menu or directory diplays the actual number to be pressed on the left side of the display. Speedselect does not support more than 100 lines.
Softkeys
The softkey items make it possible to customize keys on the keypad to fetch the given page in the <URL> tag.
example:
<SoftKeyItem> <Name>5</Name> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem>
If key '5' is pressed, then the url will load.
possible softkeys names are:
- CANCEL
- ENTER
- ONHOOK
- RIGHT, F_RIGHT(snom 370)
- LEFT, F_LEFT(snom 370)
- REDIAL
- SPEAKER
- TRANSFER
- CONFERENCE
- HELP
- F_MUTE
- F_UP
- F_DOWN
- REC
- SNOM
- DND
- for HOLD use RECALL
You can overwrite the function keys in the context of a snom tag!
- F_MINIBROWSER_SELECT
- F_MINIBROWSER_EXIT
- F_MINIBROWSER_UPDATE
- F_MINIBROWSER_SEARCH
- F_MINIBROWSER_CANCEL
- F_MINIBROWSER_BACK
- F_MINIBROWSER_DIAL
- F_MINIBROWSER_EDIT_DIAL
- F_MINIBROWSER_EDIT_NEXT
- 0..1
- *
- #
Don't overwrite the speedkey functionality of menus or directories with softkeys.
Loading of Xmlobjects
If the response time takes more then 500ms from the Xmlobject server, you will see an animation and the http-address.
Extensions in the latest firmware releases
Version > 7.1.30
- You can use sel attribute in <MenuItem> and <DirectoryEntry> to preselect an item in a list.
e.g.
<DirectoryEntry sel=true> ... </DirectoryEntry>
Version > 7.1.30
- The <fetch> tag exists to load an xml object from an http server automatically after assigned milliseconds (mil attribute).
e.g.:
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneImageFile> <LocationX>00</LocationX> <LocationY>00</LocationY> <URL>http://snom.com/minibrowser/wo.bmp</URL> <fetch mil="1000">http://snom.com/minibrowser/hd.xml</fetch> </SnomIPPhoneImageFile>
- You can label the 4 softkeys F1..F4 by the <Label> tag with your own name and functionality.
e.g.:
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneImageFile> <LocationX>00</LocationX> <LocationY>00</LocationY> <URL>http://snom.com/minibrowser/wo.bmp</URL> <SoftKeyItem> <Name>F1</Name> <Label>fone</Label> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>F2</Name> <Label>ftwo</Label> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>F3</Name> <Label>fthree</Label> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> <SoftKeyItem> <Name>F4</Name> <Label>ffour</Label> <URL>http://snom.com/minibrowser/start.xml</URL> </SoftKeyItem> #<fetch mil="1000">http://snom.com/minibrowser/hd.xml</fetch> </SnomIPPhoneImageFile>
- URL with credentials are possible e.g. http[s]://username:password@example.com/test.xml
Version > 7.1.30
For SnomIPPhoneText the <br/> tag is added to force line breaks. e.g.:
<SnomIPPhoneText> <Title>Demo</Title> <Prompt>Prompt Text</Prompt> <Text> hello world!<br/>a<br/>b<br/>c<br/> </Text> </SnomIPPhoneText>
In old versions <br> was accepted, but the softkeys are not working. It is recommended to use <br/> instead.
For all versions built after 7.10.2007
In these firmware versions we implemented a clearlight attribute for the SnomIPPhoneDirectory tag to switch off the message LED from the minibrowser!
e.g.:
<?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneDirectory clearlight="true"> <Title>Phonelist</Title> <Prompt>Prompt</Prompt> <DirectoryEntry> <Name>Support</Name> <Telephone>444@intern.snom.com</Telephone> </DirectoryEntry> <DirectoryEntry> </SnomIPPhoneDirectory>
Firmware
You must be running a firmware version 6 or above -> see here. Stable version 5.x is not sufficient.
Applications
PhoneBook for Snom-Phones
The "PhoneBook for Snom-Phones" is a phone book browser with an integrated search function and includes an LDAP-, flatfile- and MySQL-backend.
Download at: http://www.bevuta.com/phoneapps/
IPPhone XML library for PHP
This is a set of PHP classes that allows rapid XML application development for the XML browsers implemented in both Cisco 79xx and snom phones. A T9-style phonebook application with flat file and MySQL backends is included.
PHP Toolkit for xml minibrowser, including T9 phonebook coded by Siggi Langauf.







