XML Application for UT248_Rev1_30Aug2012_Odaguchi

advertisement
KX-NS1000 V2.0
XML Application
for UT248
Rev1.0 30 Aug., 2012
Table of Contents
This document describes about XML application to control, customize,
initiate action of phone.
1. Overview of XML Application
2. Each Function overview
3. Connecting Way
4. System Diagram
5. XML Definition
6. Detailed explanation of each XML commands
You can download the Developer’s Guide and Schema from following Web.
http://panasonic.net/pcc/support/sipphone/download/UT1/index.html
1
Chapter 1
Overview of XML Application
2
1. Overview of XML Application
What can we do with XML Application?
By using XML application, we can customize / control phone. Also phone can
initiate specified action on event, and can access to remote phonebook via
proxy tool.
XML Application
Phone (UT248)
Customizing menu, show text on LCD
- Customizing of Menu (Soft Keys)
- Display / Input Text on LCD.
- Draw Bitmap Image on LCD.
- By Timer Event.
Action by Event
- Phone can access specified URL
when some event occurred.
Example : When incoming call,
access to specified URL.
XML Server
Remote Control of phone
- Let Phone Access to specified URL
- Reboot Phone.
- Run / Stop XML application.
Access Remote phonebook
- Access Remote Phonebook
(via LDAP tool PC -> Server)
3
Chapter 2
Each Function overview
4
2. Each Function overview
Customizing menu, Display message
1.Menu A
Welcome
2011/11/11 12:13:14
2.Menu B
3.Menu C
4.Menu D
Soft1
Soft2
Soft3
Soft4
Customizing Menu, Soft Key, FF Key.
Menu
Draw Bitmap, Show message.
*grayscale (four-color) bitmap
Example :Every 30 minutes.
Input : *****
Input Text Box.
Log
URL
Company Logo.
*Displayed during idle state
*grayscale (four-color) bitmap
Timer Event
5
2. Each Function overview
Action by Event
- Can executed action when specified event occurred.
Like On Hang up, Talking, Make a Call, phone Send Request,
http://xxxxx/xxx.php
On Talking
Example: On talking, access to specified URL
Action triggered by Event
6
2. Each Function overview
Remote Control
-From XML Server phone can be controlled .
Like Get Configuration info., Reboot, Access to specified URL
Get Configuration info.
UT248
XML Server
Example: Get Configuration information
7
2. Each Function overview
Remote Phonebook
LDAP
HTTP
UT248
LDAP Translation Tool
On PC
LDAP Server (V.3)
- It is able to get phone book items with LDAP via LDAP proxy tool
on PC.
- The item can be stored in local phone book.
- It is able to search items by keyword same as local phone book.
John
1
123456789
Johnson
Jonny
Number
Copy
Search
8
Chapter 3
Connecting Way
9
3. Connecting Way
General
1. Server Initiate (Push)
XML server
1. XML data (http with XML)
2. Response (http) 200 OK
2. Client Initiate (Pull)
XML server
1. http-request (http with XML)
2. Response (http) 200 OK
10
3. Connecting Way
Case : Server Initiated action
XML server
2. Act as
requested
1.Send XML data (http with XML)
3.Response (http) 200 OK
XML server can send a request to UT.
When UT gets the request, UT will act as described in XML.
Action can be taken
- Connect to specified URL
- Run / Stop XML
- Reboot a UT
11
3. Connecting Way
Case : Client Initiated action
XML server
1. Event :
eg: make a call
2. Send http-request (http with XML)
3. Response (http) 200 OK
It is able to set URL in configuration parameters at each event
and connect to the URL to get a XML content.
When a event occurs, UT will send a http request to the URL.
Triggered event for connecting URL
-Start UP
-Setting Menu (Soft Key.
-Ringing / Talking / Calling
-Referring to call log / Phonebook
-Idling
12
Chapter 4
System Diagram
13
4. System Diagram
System Diagram
[XML server]
Edit with
Schema
Web Server Socket
(http (port:ex.6666))
[UT]
XML Parser
[LDAP tool / Server]
XML Engine
Phonebook
- UT gets a XML content from
XML server
- UT parse the XML content
Action
(Ex. send http-req.)
http request I/F
Action
(Ex. Making call)
Call Control I/F
Action
(Ex. Display)
GUI I/F
- UT displays the content
and / or set keys
14
Chapter 5
XML Definition
15
5. XML Definition
General
XML format is based on Panasonic SIP phone xml definition (ppxml).
<?xml version="1.0" encoding="utf-8"?>
<ppxml xmlns="http://panasonic/sip_phone"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://panasonic/sip_phone sip_phone.xsd ">
<Screen version="2.0">
<Components>
<Label name="lbl1" text="testes" />
</Components>
</Screen>
</ppxml>
Example
Chaptor6 detailed information of each XML are described.
16
Chapter 6
Detailed explanation
of each XML commands
17
6. Detailed explanation of each XML commands
Customizing menu, show text/image
Element
Description
Menu
Display strings and set soft keys to send a URL
(http request)
Label
Put strings on LCD
PictureBox
Draw bitmap image data
TextBox
Input text
Timer
Occur timer event
Phonebook
Get phone book items from LDAP
18
6. Detailed explanation of each XML commands
Menu
- Can customize Display menu items in each line.
- Can customize soft key, ff key also.
- Select the item with navigation keys and move to the XML content
- Can Assign URL to send request into soft keys.
<Menu name="MainMenu">
<MenuItems>
<MenuItem name=“Item1” text=“Menu A" value="123" selected="true" />
<MenuItem name=“Item2” text=“ Menu B" value="abc" />
<MenuItem name=“Item3” text=“ Menu C" value="456" />
<MenuItem name=“Item4” text=“ Menu D" value="def" />
</MenuItems>
<SoftKeys>
<SoftKey id=“1” name=“sk1” text=“Soft1">
<Events>
<OnClicked>
<SendRequest url="http://192.168.0.200/Cancel.xml"/>
</OnClicked>
</Events>
</SoftKey>
</SoftKeys>
Example
1.Menu A
2.Menu B
3.Menu C
4.Menu D
Soft1
Soft2
Soft3
Soft4
LCD Image
19
6. Detailed explanation of each XML commands
Label
- Label is used to display text message.
<?xml version="1.0" encoding="utf-8"?>
<ppxml>
<Screen version="2.0">
<Components>
<!-- Label's example declaration -->
<Label name="labelTitle" line="2" text="Screen title" textAlignment="Left" />
<Label name="labelTitle" line=“3" showDateTime=“true” textAlignment="Left" />
</Components>
</Screen>
</ppxml>
Example
Screen Title
2011/11/11 12:13:14
LCD Image
20
6. Detailed explanation of each XML commands
Picture Box
- Picture Box is used to display bitmap image by specifying URL.
- Possible to draw bitmap and characters in a screen (*monochrome bitmap)
<?xml version="1.0" encoding="utf-8"?>
<ppxml>
<Screen version="2.0">
<Components>
<PictureBox name="pb1" left="30" top="30“ height="100" width="100“
source=“http://a.com/webServerPath/Screen/PictureBox_1.bmp" />
<Label name=“labelTitle” line=“4” text=“Welcome to Pana Hotel" textAlignment="Left" />
</Components>
</Screen>
</ppxml>
Example
Welcome to Pana Hotel
LCD Image
21
6. Detailed explanation of each XML commands
Text Box
- End User can input text by using Text Box.
- Can set password mode then inputted text shown as “****”
- Inputted text can be sent to server.
<ppxml>
<Screen version="2.0">
<Components>
<TextBox name="textBox1" line="2" text=""
textAlignment="Left" password=“true" maxLength="10" />
<SoftKey id="4" name="sk4" text="ENTER">
<Events>
<OnClicked>
<SendRequest url="http://192.168.0.200" />
</OnClicked>
</Events>
</SoftKey>
</Components>
</Screen>
</ppxml>
Example
Input : *****
Clear
A/a
1/A/?
ENTER
LCD Image
The number of characters in Text Box is maximum 24.
22
6. Detailed explanation of each XML commands
Timer
- By using Timer, can execute required event at specified timing.
<?xml version="1.0" encoding="utf-8"?>
<ppxml>
<Screen version="2.0">
<Timer name="timer1" repeat="true" interval="30">
<Events>
<OnExpired>
<SendRequest url="http://aaa.ccc.com/GetXml.aspx?xml=HotelHome.xml" />
</OnExpired>
</Events>
</Timer>
</Screen>
</ppxml>
Example
URL to
get xml
Example: Every 30 seconds phone access to URL
23
6. Detailed explanation of each XML commands
Action by Event
Element
Event
Description
Execute Action when specific event occurred.
24
6. Detailed explanation of each XML commands
Event
- Can executed action when specified event occurred.
Event : On Talking, On Hung up, On Clicked, On Expired,
Action: Send Request, Make a call, Answer, Hung up, Get Config….
<ppxml>
<Screen version="2.0">
<Components>
<Label text="Transfer" top="10" left="30"/>
</Components>
<!– Access to specified URL when On Hungup -->
<Events>
<OnHungup>
<SendRequest url="http://192.168.0.200/Hungup.xml"/>
</OnHungup>
</Events>
</Screen>
</ppxml>
Example
URL to
get xml
On Hung up
Example: On Hung up, access to specified URL
25
6. Detailed explanation of each XML commands
Remote Control of phone
Element
Description
Trigger
Force phone to access to required URL.
Execute
For getting configuration from phone.
Rebooting phone.
Set enable/disable XML feature.
26
6. Detailed explanation of each XML commands
Trigger
- Server can force phone to access to defined URL
<?xml version="1.0" encoding="utf-8"?>
<!– Request client to access to screen.xml -->
<ppxml xmlns="http://panasonic/sip_phone"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://panasonic/sip_phone sip_phone.xsd">
<Trigger version="2.0">
<Source>@web_server_path/Screen.xml<Source />
</Trigger>
</ppxml>
Example
Request
Server
URL to
get xml
Example: Trigger to access to specified URL
27
6. Detailed explanation of each XML commands
Execute
- Execute is done by background operation of phone.
- Can Get configuration from the phone, Reboot the phone,
set enable/disable XML feature.
<?xml version="2.0" encoding="utf-8"?>
<ppxml xmlns="http://panasonic/sip_phone"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://panasonic/sip_phone sip_phone.xsd">
<Execute version="2.0">
<GetConfig mode="IpAddressSetting" url=“http://xxx.com/GetXml.aspx?xml=test.xml" />
</Execute>
<!– Phone send requested information to server by XML -->
</ppxml>
Example
28
6. Detailed explanation of each XML commands
Remote Phonebook
Element
Phonebook
Description
To access to phonebook of network.
29
6. Detailed explanation of each XML commands
Remote Phonebook
- It is able to get phone book items with LDAP via LDAP proxy tool.
- The item can be stored in local phone book.
- It is able to search items by keyword same as local phone book.
<?xml version="1.0" encoding="utf-8"?>
<ppxml xmlns="http://panasonic/sip_phone"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://panasonic/sip_phone
sip_phone.xsd">
<Screen version="2.0">
<PhoneBook version="1.0">
<Personnel id="1">
<Name>yoshida taro</Name>
<PhoneNum type="ext">3920</PhoneNum>
<PhoneNum type="home">99998888</PhoneNum>
</Personnel>
<Personnel id="2">
<Name>George</Name>
<PhoneNum type="ext">223</PhoneNum>
<PhoneNum type="mobile">088011</PhoneNum>
<PhoneNum type="campany">999</PhoneNum>
</Personnel>
</PhoneBook>
</Screen>
John
1
123456789
Johnson
Jonny
Number
Copy
Search
LCD Image
</ppxml>
Example
30
Developer’s Guide/Schema入手先については紹介不要?
http://panasonic.net/pcc/support/sipphone/download/UT1/index.html
Thank you !
The END
31
Download