Category:HowTo:Minibrowser
From Snom User Wiki
Author: Hirosh Dabui, Alexander Feldt
Contents |
XML Browser Elements
In this section the syntax, behavior, and usage of each XML object is described. Creating interactive services is relatively easy when you understand the XML objects that are supported by firmware V7 on the snom370, snom360, snom320, snom300, and V8 on snom820 and snom870.
XML Browser Objects
XML Browser Object Tags
XML Browser Object attributes
Usage
The XML Browser can be invoked on snom phones using the following methods:
- Keypad or Event- Triggered HTTP GET Request to load XML pages from a HTTP Server
- Remote HTTP GET Request to load XML pages from a HTTP Server or
- SIP (NOTIFY) with XML content.
Note: URLs may contain credentials e.g.
http[s]://username:password@example.com/test.xml
Note: If the response time takes more then 500ms from the HTTP Server there will be an animation and the URL.
Keypad- Triggered
Configure one of the available keys with an Action URL, e.g. the "snom" key on snom3x0
By pressing the key a GET request to the HTTP server will be sent and the appropriate XML page will be returned.
Event- Triggered
Configure one or more Action URL Events on the the WUI page "Action URL Settings":
If the event is true a GET request to the HTTP server will be sent and the appropriate XML page will be returned.
Remote HTTP GET Request
From FW V8.2.7 onwards XML Browser content can be pushed to the phone via HTTP Requests.
Take this example and send it from any HTTP Browser. Note that in FW versions lower than 8.4.32 you MUST NOT use "http://" within the URL!!!
http://phone_ip/minibrowser.htm?url=www.yourserver.com/xmlcontent/test.xml
From 8.4.32 onwards the behavior has changed for the URL to be fetched like shown below:
- You MUST use a scheme now, e.g. "http://"
- You MUST use URL encoding
http://phone_ip/minibrowser.htm?url=http://IPADDRESS/menu.xml?mac=MAC&check=1234&type=4
has to be encoded like this:
http://phone_ip/minibrowser.htm?url=http://IPADDRESS%2Fmenu.xml%3Fmac%3DMAC%26check%3D1234%26type%3D4
Starting with version 8.2.6 you can also use the minibrowser.htm URL to set phone settings.
http://phone_ip/minibrowser.htm?url=www.yourserver.com/xmlcontent/test.xml&settings=save&setting1_name=value&setting2_name=value
where setting1_name and setting2_name are the names of the settings you want to set.
SIP NOTIFY
- The phone has to be configured as follows:
- XML NOTIFY Support --> "On"
- Filter packets from Registrar --> "Off"
- Network identity (Port) --> 5060
- Offer GRUU --> "Off"
- Reboot the phone (You MUST NOT reset)
- Use SIPSAK to send SIP messages
Example
- Workstation: 10.0.5.30
- snom320: 10.0.0.174
- sip Identity: 440
- CALL-ID: any@any (check RFC 3261 - SIP)
- Content-Length: 317 (bytes of the xml content, use a plain textfile to determine the exact amount of bytes!)
- Place the following lines into a plain textfile (ie. xmlnotify.txt) and replace with your applicable values!
NOTIFY sip:10.0.0.174:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.5.30:1036 From: <sip:sipsak@10.0.5.30>;tag=2502 To: <sip:440@10.0.0.174>;tag=2502 Call-ID: blablub@snom320xxx CSeq: 1 NOTIFY Max-Forwards: 70 Event: xml Subscription-State: active;expires=30000 Content-Type: application/snomxml Content-Length: 317 <?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneDirectory> <Title>Menutitle</Title> <Prompt>Prompt</Prompt> <DirectoryEntry> <Name>John</Name> <Telephone>123456789</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>Doe</Name> <Telephone>987654321</Telephone> </DirectoryEntry> </SnomIPPhoneDirectory>
Use the following command line
sipsak -i -O ID -l 1036 -f xmlnotify.txt -s sip:440@10.0.0.174:5060 -H 10.0.5.30 -v
Check the SIP Trace
Received from udp:10.0.5.30:4683 at 28/10/2009 12:46:48:649 (639 bytes): NOTIFY sip:10.0.0.174:5060 SIP/2.0 Via: SIP/2.0/UDP 10.0.5.30:1036 From: <sip:sipsak@10.0.5.30>;tag=2502 To: <sip:440@10.0.0.174>;tag=2502 Call-ID: blablub@snom320xxx CSeq: 1 NOTIFY Max-Forwards: 70 Event: xml Subscription-State: active;expires=30000 Content-Type: application/snomxml Content-Length: 317 <?xml version="1.0" encoding="UTF-8"?> <SnomIPPhoneDirectory> <Title>Menutitle</Title> <Prompt>Prompt</Prompt> <DirectoryEntry> <Name>John</Name> <Telephone>123456789</Telephone> </DirectoryEntry> <DirectoryEntry> <Name>Doe</Name> <Telephone>987654321</Telephone> </DirectoryEntry> </SnomIPPhoneDirectory> Sent to udp:10.0.5.30:1036 at 28/10/2009 12:46:48:667 (189 bytes): SIP/2.0 200 Ok Via: SIP/2.0/UDP 10.0.5.30:1036 From: <sip:sipsak@10.0.5.30>;tag=2502 To: <sip:440@10.0.0.174>;tag=2502 Call-ID: blablub@snom320xxx CSeq: 1 NOTIFY Content-Length: 0
Applications
Collection of XML application
External Directory
Pseudo-Videostream via Minibrowser for 360, 370 and 8x0
Video Streaming (Motion JPEG over HTTP)
Pages in category "HowTo:Minibrowser"
This category contains only the following page.

