Professional Documents
Culture Documents
Session VVT-4011
VVT-4011 8184_05_2003_c1
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Agenda
Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities
VVT-4011 8184_05_2003_c1
IP Phone Services
Power of the World Wide Web to Cisco's IP Phones
Firmware enhancement on the Cisco IP phones which integrate the characteristics of a phone call with enterprise servers or the Internet to further merge voice and data in a convergence solution Utilizes web technologies for application services
eXtensible Markup Language (XML)-based data tags for phone content processing Hyper-Text Transfer Protocol (HTTP) and TCP/IP for transport Web servers and web scripting languages for applications development
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Queens on the IP
SQL DB
VVT-4011 8184_05_2003_c1
If not found, then scan for other locations Brooklyn automatically List other stores and option to immediately dial that store on a keypress
5
AVVID Partner
Calence AAC Associates First Virtual Communications Eyretel MDR Switchview Netcom Systems Dimension Data Berbee Logical Vytek CheckMate
VVT-4011 8184_05_2003_c1
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Agenda
Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities
VVT-4011 8184_05_2003_c1
Services Button
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Cisco IP Phone
Planes of Operation
Cisco 7940 and 7960 IP Phones Operate in 2 Planes: Call Plane Contains line appearances Phone softkeys for hold, transfer, conference, etc Softkeys are not phone service configurable Services Plane
Softkeys are configurable 133x65 real estate for graphics, menu, user input, etc Services plan can be activated by
User Phone (via IDLE URL timeout) Phone service application (via content push)
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
User-Initiated
HTTP Response HTTP GET HTTP Response HTTP GET (Idle URL)
Phone-Initiated
HTTP Response HTTP Post
HTTP GET
Phone ServiceInitiated
VVT-4011 8184_05_2003_c1
HTTP Response
10
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
IP Phone Services
Communications Paths
CallManager HTTP SCCP HTTP RTP Web Server
Protocol
SCCP HTTP
Typical Function
Call Control User Initiated IP Phone Service Audio Path Between IP Phones IP Phone Service Web -initiated Streaming Media to/from IP Phone
CallManager Administrator Adds IP Phone Services and Makes It Available to The Users
User Logs into CallManager User Preferences and Configures Which Services to Be Displayed on the Phone
5
User Presses the Services Button, Which Sends an HTTP GET Message Calling Getservicesmenu.Asp, Located on the CallManager Where the IP Phone Is Configured
VVT-4011 8184_05_2003_c1
12
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Admin Can Set Optional Parameters that the User Can Configure
VVT-4011 8184_05_2003_c1
13
Phone Services
User Configuration
VVT-4011 8184_05_2003_c1
14
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
VVT-4011 8184_05_2003_c1
15
2. Server Retrieves the File (from a Local or Remote File System) HTML/
XML
Task and a Task and Dynamically Builds a Page to Return to the Client IP Phone
16
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Internet
2 Firewall 1
Proxy Web Server
3 4
CallManager Points to Content Proxy Web Server (Configured in IP Phone Services Menu)
Note1: This Is NOT a Full XML Parser; Only the Supported CiscoIPphone XML Objects Are Successfully Parsed
VVT-4011 8184_05_2003_c1
17
IP Phone Services
Simple Code Sample/Walkthrough
<%@ Language=JavaScript%>
Scriptlet
<% Response.ContentType = "text/xml"; %> <CiscoIPPhoneText> <Title>Networkers 2003 VVT -4011</Title> <Text>** IP Phone Services **</Text> <Prompt> </Prompt> </CiscoIPPhoneText> <% Response.End(); %>
Scriptlet
VVT-4011 8184_05_2003_c1
18
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Agenda
Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities
VVT-4011 8184_05_2003_c1
19
CiscoIPPhoneMenu
CiscoIPPhoneGraphicMenu
CiscoIPPhoneInput
CiscoIPPhoneText
VVT-4011 8184_05_2003_c1
CiscoIPPhoneImage
CiscoIPPhoneDirectory
20
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
21
Supports a maximum of 100 menu items per display Menu items could be nested, supporting 100 listed items per sub-menu
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
22
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
<CiscoIPPhoneText> <Title>Title text goes here</Title> <Text>The text to be displayed as the message body goes here</Text> <Prompt>The prompt text goes here</Prompt> </CiscoIPPhoneText>
VVT-4011 8184_05_2003_c1
23
Note: Tools Are Available to Automate Generating the XML Graphics Tags and Content
<Height>Size information for the graphic</Height> <Depth> Number of bits per pixel </Depth> <Data>Packed Pixel Data</Data> <Prompt>Prompt text goes here</Prompt> <MenuItem> <Name>The name of each menu item</Name> <URL>The URL associated with the menu item</URL> </MenuItem> </CiscoIPPhoneGraphicMenu>
VVT-4011 8184_05_2003_c1
24
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Note: Tools Are Available to Automate Generating the XML Graphics Tags and Content
<LocationY>Position information of graphic</LocationY> <Width>Size information for the graphic</Width> <Height>Size information for the graphic </Height> <Depth>Number of bits per pixel</Depth> <Data>Packed Pixel Data</Data> <Prompt>Prompt text goes here</Prompt> </CiscoIPPhoneImage>
VVT-4011 8184_05_2003_c1
25
<CiscoIPPhoneInput> <Title>Directory title goes here</Title> <Prompt>Prompt text goes here</Prompt> <URL>The target URL for the completed input goes here</URL> <InputItem> <DisplayName>Name of the input field to display </DisplayName> <QueryStringParam>The URL query parameter </QueryStringParam> <InputFlags> </InputFlags> <DefaultValue>Value</DefaultValue> </InputItem> </CiscoIPPhoneInput>
VVT-4011 8184_05_2003_c1
26
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
VVT-4011 8184_05_2003_c1
27
<CiscoIPPhoneDirectory> <Title>Directory title goes here</Title> <Prompt>Prompt text goes here</Prompt> <DirectoryEntry> <Name>The name of the directory entry</Name> <Telephone>DN for the entry</Telephone> </DirectoryEntry> </CiscoIPPhoneDirectory>
VVT-4011 8184_05_2003_c1
28
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
x8001
29
Softkey Label Name Maps to Either a Location, or a PrePre - Defined Phone Command The Softkey Position Number on the Phone Display
Position = 1
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
4
30
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Button
Line Keys Number Keys 0 9 Softkey Buttons Number Key * Number Key # Volume Down Key Volume Up Key Headset Key Mute Button I Button Messages Button Services Button Settings Button The 5 Rocker Key The 6 Rocker Key
2003, Cisco Systems, Inc. All rights reserved.
Comments
Lines up to 34 Assume that a 7914 Phone Extender Module Is attached
31
Customizing Softkeys
Example
<SoftKeyItem> <Name>Susan</Name> <URL>Dial:35001</URL> <Position>1</Position> </SoftKeyItem> <SoftKeyItem>
<Name>Rick</Name> <URL>EditDial:35002</URL> <Position>2</Position> </SoftKeyItem> <SoftKeyItem> <Name>Darrick</Name> <URL>Dial:35003</URL> <Position>3</Position> </SoftKeyItem> <SoftKeyItem> <Name>End</Name> <URL>SoftKey:Exit</URL> <Position>4</Position> </SoftKeyItem>
VVT-4011 8184_05_2003_c1
32
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
<CiscoIPPhoneIconMenu/>
Provides ability to create simple graphics to appear next to menu items Makes the menu items more user friendly Icon size limit is 16x9 pixels
VVT-4011 8184_05_2003_c1
33
CiscoIPPhoneIconMenu
Example
<CiscoIPPhoneIconMenu>
Root Element
Similar to <CiscoIPPhoneImage>
Similar to <CiscoIPPhoneMenu>
VVT-4011 8184_05_2003_c1
34
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
IP Phone Services
Pull vs. Push
PULL
When User Is Not Using the Phone (IDLE State), Phone Polls Web Server for Updates to Display to the IP Phone HTTP GET Web Server
PUSH
PUSH : Web Server Initiates the Message to the IP Phone with an HTTP POST Message and the Applicable XML Data Tags HTTP POST Web Server
VVT-4011 8184_05_2003_c1
35
2. When User Is Not Using the Phone (IDLE State), Phone Polls Web Server for Updates to the Ad Service HTTP Poll Dormnet Web Server
IP-WAN/ PSTN
36
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
With Idle URL, we are instructing the phone to automatically issue an HTTP GET to a specified location once the Idle URL timeout value is reached
When User Is Not Using the Phone (IDLE State), Phone Polls Web Server for Updates to Display to the IP Phone HTTP GET Web Server
The URL could be any backend logic that could send content to the IP phone (image, menu items, etc) or perform backoffice operations, etc
37
VVT-4011 8184_05_2003_c1
IP Phone Services
IDLE URL Configuration
38
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
The POST form will contain the XML elements you want processed by the IP phone
Form element must be XML and case -sensitive
VVT-4011 8184_05_2003_c1
39
<CiscoIPPhoneResponse> <ResponseItem Status = the success or failure of the action Data = the information associated with the request URL = the URL or URI specified in the Execute object/> </CiscoIPPhoneResponse>
40
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
HTTP POST
URL 10.0.0.1
<HTML> <HEAD> POST Form </HEAD> <BODY> <FORM action="http://10.0.0.1/CGI/Execute" Method="POST"> <TEXTAREA NAME="XML" Rows="20" Cols="80"> <CiscoIPPhoneExecute> <ExecuteItem Priority="0" URL="http://dfw-services.cisco.com/"/> </CiscoIPPhoneExecute> </TEXTAREA> <BR> <input type=submit value=POST> </FORM> </BODY> </HTML>
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
41
IP Phone Services
Streaming URIs
Ability for IP phone applications to control incoming and outgoing streams Incoming streams can be mixed and outgoing streams can go to different destinations Require
Payload headers for transport HTTP GET/response HTTP POST Streams must be RTP, G.711 Mu -Law, packet size = 20ms RTPRx: RTPRx: Use for App! Use for App!
RTPTx: RTPTx:
Phone IP Address
VVT-4011 8184_05_2003_c1
42
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
RTP Streaming
Code Sample/Walkthrough
<%@ Language=JavaScript %> <% Response.ContentType = "text/xml"; Response.Buffer = true; var serverIP; serverIP = Request.ServerVariables("LOCAL_ADDR"); %> <CiscoIPPhoneInput> <Title>XML Streaming Sample</Title> <Prompt>Make Your Selection...</Prompt> <URL>http://<% Response.write(serverIP) %>/s/StreamIt.asp</URL> <InputItem> <DisplayName>My IP</DisplayName> <QueryStringParam>SrcIP</QueryStringParam> <InputFlags>E</InputFlags> <DefaultValue>10.5.1.50</DefaultValue> </InputItem> <InputItem> <DisplayName>Remote IP</DisplayName> <QueryStringParam>DstIP</QueryStringParam> <InputFlags>E</InputFlags> <DefaultValue>10.5.1.51</DefaultValue> </InputItem> </CiscoIPPhoneInput> <% Response.Flush(); %>
43
RTP Streaming
Code Sample/Walkthrough (Cont.)
<%@ Language=JavaScript %> <% var serverIP; serverIP = Request.ServerVariables("LOCAL_ADDR"); var SrcIP = String(Request.QueryString("SrcIP")); var DstIP = String(Request.QueryString("DstIP")); Response.ContentType = "text/xml"; Response.Buffer = true; %>
Code Cont
<CiscoIPPhoneText> <Title>XML Streaming Sample</Title> <Prompt>Make Your Selection...</Prompt> <Text> Audio streaming test <% Response.write(SrcIP); %> => <% Response.write(DstIP); %></Text> <SoftKeyItem> <Name>TxStart</Name> <URL>RTPTx://<% Response.write(DstIP); %>:5000</URL> <Position>1</Position> </SoftKeyItem> <SoftKeyItem> <Name>RxStart</Name> <URL>RTPRx://<% Response.write(SrcIP); %>:5000</URL> <Position>2</Position> </SoftKeyItem> <SoftKeyItem> <Name>TxStop</Name> <URL>RTPTx:Stop</URL> <Position>3</Position> </SoftKeyItem> <SoftKeyItem> <Name>RxStop</Name> <URL>RTPRx:Stop</URL> <Position>4</Position> </SoftKeyItem> </CiscoIPPhoneText>
VVT-4011 8184_05_2003_c1
44
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Agenda
Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities
VVT-4011 8184_05_2003_c1
45
Sample code
Calendar Stock quote Speed dials Graphics image converter Measurement conversions Weather forecast Airline flight information Postal information Foreign currency exchange World clock
46
Documentation
Phone services developer guide Documents on the included utilities
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
47
VVT-4011 8184_05_2003_c1
48
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
COM
VVT-4011 8184_05_2003_c1
49
Sets and Retrieves the Port Number of the LDAP Sever; Default = 389 Sets and Retrieves the Name of the LDAP Server Sets and Retrieves the Search Base of the LDAP Search
SearchCount Retrieves the Number of Returned Entries in the LDAP Search AuthName Sets and Retrieves the Authorization Name that Binds the LDAP Search (Used Only If There Are Privileged Settings)
AuthPasswd Sets and Retrieves the Authorization Password that Binds the LDAP Search (Used Only If There Are Privileged Settings)
VVT-4011 8184_05_2003_c1
50
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Sets <Title/> in <CiscoIPPhoneDirectory/> and the Max Length of Characters Displayed Sets <Prompt/> <CiscoIPPhoneDirectory/> and the Max Length of Characters Displayed Sets the Limit of Returned Records and Search Timeout Value Allows User to Specify the Groups of the Returned Attrs, Their XML Output Tag and Their Format s in XML Output One Group by One Group Allows the Users to Specify the Sorting Attributes Used to Sort the Search Result ; Set Value of 1 for Ascending Order, 1 for Descending Order Retrieves All Records Based on the Search Base Property Retrieves Records Which Meets the Criteria of the Last Name and the First Name Based on the Search Base Retrieves Records Which Meets the Criteria of the Last Name Based on the Search Base Retrieves Records Which Meets the Criteria of the First Name Based on the Search Base Retrieves Records Which Meets the Criteria of the Phone Number Based on the Search Base Retrieves Records Which Meets the Criteria of the Email Based on the Search Base Retrieves Records Which Meets the Criteria of the Distinguished Name Based on the Search Base Retrieves Records Which Meets the Criteria of the Relative Distinguished Name Based on the Search Base Allows User to Output the Next Ten Records Beginning with the nth Record
2003, Cisco Systems, Inc. All rights reserved.
51
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
COM
Internet
eb oW kt ac dB a ere n vi eliv catio t D li ten pp r on r A . C erve Serve 3 S xy Pro
53
Web Server
Proxy Server
VVT-4011 8184_05_2003_c1
CiscoURLProxy Example
"Magic 8 Ball"
<%@ Language=JavaScript %> <% Response.ContentType = "text/xml"; Response.Buffer = true; var serverIP; serverIP = Request.ServerVariables("LOCAL_ADDR"); try { help_text = "The Magic (8) Ball\r \r"; Create the Object Inet1 = new ActiveXObject("CiscoURLProxy.URLGrabber"); help_text += Inet1.GetURL("http://www.netjeff.com/humor/8ball. pl.cgi"); Inet1 = ""; NOTE: NOTE: No CiscoURLProxy Properties Are Set; Gets the Results of CGI } Therefore Default Settings Are Used: Script atwww.netjeff.com, Object Cleared for TimeOutRequest = 120 Seconds catch (err) Returned as a String; the Next Update ProxySettings = IE Internet Options Settings Assigned to Variable, { //Do Nothing and help_text passes to phone.... Help_text } Response.Write("<CiscoIPPhoneText><Title>www.netjeff.com</Title> <Text>" + help_text + "</Text><Prompt> </Prompt></CiscoIPPhoneText>"); Response.Flush(); %>
VVT-4011 8184_05_2003_c1
Write and Flush the BufferedCiscoIPPhoneText Title and Help_text String to the IP Phone
54
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Downloadable from
http://www.hotdispatch.com
Working Working Softkeys, Softkeys, Rocker Rocker Key, and Key, and Numeric Numeric Keypads Keypads
55
CallManager Simulator
Installs on a laptop Allows you to develop phone services without a CallManager server
Cross-Over Cable
VVT-4011 8184_05_2003_c1
56
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
HTTP POST
57
ausflag.gif
<CiscoIPPhoneImage> <LocationX>-1</LocationX> <LocationY>-1</LocationY> <Width>68</Width> <Height>45</Height> <Depth>2</Depth> <Data>0000etcC0</Data> <Title>Temporary title</Title> <Prompt>Phone Svcs Training 2002</Prompt> </CiscoIPPhoneImage>
Phone Display
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
58
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
VVT-4011 8184_05_2003_c1
59
P 3. HTT
Res
CipImage COM
1. HTTP Request
.ASP
Web Server
VVT-4011 8184_05_2003_c1
60
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Loads a JPG Image from a Physical File Saves a JPG Image to a Physical File Loads a JPG Image from a Memory Buffer Saves a JPG Image to a Memory Buffer Saves a BMP Image to a Physical File Loads a BMP Image from a Memory Buffer Saves a BMP Image to a Memory Buffer Loads a CIP Image from a Phyical File Saves a CIP Image to a Physical File Loads a CIP Image from a Memory Buffer Loads a CIP Images Data Portion from a Memory Buffer Saves a CIP Image to a Memory Buffer Saves a CIP Images Data Portion to a Memory Buffer Loads a GIF Image from a Phyical File Saves a GIF Image to a Physical File Loads a GIF Image From a Memory Buffer Loads a GIF Images Data Portion from a Memory Buffer Saves a GIF Image to a Memory Buffer Saves a GIF Images Data Portion to a Memory Buffer
61
GetTitle GetPrompt
VVT-4011 8184_05_2003_c1
62
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
CipImage Sample
snippet from stockchart.asp Sample
try { var Inet1 = new ActiveXObject("CiscoURLProxy.URLGrabber"); // Create the proxy object
var rawdata = Inet1.GetURL("http://ichart.yahoo.com/t?s=csco" , 1); // Get the gif from Yahoo... Note the "1" as the second parameter tells the component ByteArray. Its in the proxy doc... var cip = new ActiveXObject("CIPIMAGE.ImageProcessor.1"); etc cip.LoadGIFFromBuffer(rawdata); cip.RGBToPalette(); cip.ColorToGray(); cip.ReducePaletteColors(4); var rawchartdata = cip.SaveCIPDataToBuffer(); Response.Buffer = true; Response.ContentType = "text/xml"; Response.Write("<CiscoIPPhoneImage> \r\n<LocationX> -1</LocationX> \r\netc } catch // Load the byte array // Set the RGB image to the supported Palette colors // reduce the colors to grayscale // reduce the palette to 4 colors. (2- bit) // Create the cip object
VVT-4011 8184_05_2003_c1
63
Putting It Together
Example: Calences MyRx Application
Prescription locator Automatic speech recognition enabled via RTP receive channel streaming through IP phone Ability to view and print prescription location map and driving directions
VVT-4011 8184_05_2003_c1
64
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Preview:
Next Generation Softphone
JPhone Architecture Runs same firmware as the Cisco 7970 phone Supports 7940/7960 CiscoIPPhone XML primitives Internal JVM will use Java midlet technology
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.
65
Additional Resources
Developer Support Central: Helping to Build AVVID Applications
http://www.cisco.com/warp/public/570/
VVT-4011 8184_05_2003_c1
66
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Additional Resources
HotDispatch: Mindshare and Support for IP Phone Applications
VVT-4011 8184_05_2003_c1
67
68
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
Recommended Reading
Developing Cisco IP Phone Services: A Cisco AVVID Solution
ISBN: 1587050609
69
VVT-4011 8184_05_2003_c1
70
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr
VVT-4011 8184_05_2003_c1
71
Copyright 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr