vvt-4011

36
Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA. Presentation_ID.scr 2 © 2003, Cisco Systems, Inc. All rights reserved. VVT-4011 8184_05_2003_c1 Designing and Developing Advanced IP Phone Services Session VVT-4011

Upload: naser-alkandery

Post on 25-Oct-2014

83 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

2© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Designing and Developing Advanced IP Phone Services

Session VVT-4011

Page 2: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

333© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Agenda

• Introduction

• Phone Services Technology Overview

• Phone Services Programming Basics

• Developer Tools and Utilities

444© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesPower 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 transportWeb servers and web scripting languages for applications development

Page 3: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

555© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

SQL

HTTP/XML

Bridging Voice and Data in One App…Example: Retail Store Locator

• Input clothing item #• Inventory lookup

• If not found, then scan for other locations automatically

• List other stores and option to immediately dial that store on a keypress

Manhattan

Brooklyn

Queens

ParamusWeb Server

• Clothing item request appears on the IP phone display

DB

IP WAN/PSTN

Store Locater

666© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Examples of IP Phone Services Apps

Property Mgt System (PMS) Integration to CallManagerMDR SwitchviewHospitality

Dynamic Business Dashboards and Integration with Various CRM, ERP, and Other Business Solutions

CheckMateFinanceSearch, Request, and Track Product Statuses by Voice or DataVytekRetail

Healthcare

Horizontal

Legal/Horizontal

Hospitality

Horizontal

Horizontal

K–12

Healthcare

IndustryIndustry

Phonenet Healthcare: Integration into Medical Databases for Diagnoses and Medication Management

Logical

Emergency Broadcast Application—Pushes Voice and Text to Thousands of Phones, by Zones If Preferred

Berbee

Call Authorization and Tracking ToolsDimension Data

Property Mgt System (PMS) Integration to CallManagerNetcom Systems

Execrecord: Extends IP Phone Services Interface to Call Recording Solution

Eyretel

Web Conferencing Solution that Seamlessly Integrates Voice, Video, Data, IM, and Streaming Communications

First Virtual Communications

Mobile Teacher Room Tracking; Hall Pass Processing; Homework Assignments, Alerts, Schedule Reminders, Etc…

AAC Associates

Myrx: Prescription Lookup; Order StatusCalence

IP Phone Service ApplicationIP Phone Service ApplicationAVVID PartnerAVVID Partner

http://wwwin.cisco.com/voice/evvbu/news/post_bakeoff041002.shtml

Page 4: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

777© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Agenda

• Introduction

• Phone Services Technology Overview

• Phone Services Programming Basics

• Developer Tools and Utilities

888© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services User Interface

• Phone services displays content on its 133x65 LCD display

• Pressing the “services" button initiates the session

• User can navigate around the services options and provide input via

Softkeys

Rocker key (to scroll down menu lists)

Keypad

ServicesButtonRocker Key

Softkeys

Keypad

Line Keys

LCD Display

Page 5: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

999© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Cisco IP Phone Planes of Operation

• Softkeys are configurable• 133x65 real estate for graphics, menu, user input, etc…• Services plan can be activated by

UserPhone (via IDLE URL timeout)Phone service application (via content push)

• Contains line appearances• Phone softkeys for hold, transfer, conference, etc…• Softkeys are not phone service

configurable

Call PlaneCall Plane

Services PlaneServices Plane

Cisco 7940 and 7960 IP Phones Operate in 2 Planes:

101010© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Initiating Phone Services

HTTP Response

HTTP GET (Services URL)

HTTP GET

HTTP Response

HTTP Response

HTTP GET

HTTP GET (Idle URL)

HTTP Response

HTTP Post

User-Initiated

Phone-Initiated

Phone Service-Initiated

IP Phone CallManager Web ServerPhone Service Script

Page 6: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

111111© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesCommunications Paths

Web-initiated Streaming Media to/from IP PhoneRTP

IP Phone ServiceHTTPIP Phone <-> Web Server

Audio Path Between IP PhonesRTPIP Phone <-> IP Phone

User Initiated IP Phone ServiceHTTP

Call ControlSCCPIP Phone <-> CM

Typical FunctionTypical FunctionProtocolProtocolMessage PathMessage Path

Web ServerCallManager

HTTP

SCCP RTP

RTP

HTTP

SCCP = Skinny Client Control Protocol RTP = Real-Time Protocol

121212© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services ConfigurationUser Subscribed Services

XML Tags

Sample.asp

Developer Or CallManager Administrator Copies the Web Script Files to a Web (HTTP) Server that the CallManager Will Point to for IP Phone Services

22

Web DeveloperCreates the IP Phone Services Application

11

User Logs into CallManager User Preferences and Configures Which Services to Be Displayed on the Phone

44

User Presses the “Services” Button, Which Sends an HTTP GET Message Calling Getservicesmenu.Asp, Located on the CallManager Where the IP Phone Is Configured

55

CallManager AdministratorAdds IP Phone Services and Makes It Available to The Users

33

Page 7: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

131313© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services Administrator Configuration

Added Phone

Services

Added Phone

Services

Adding an IP Phone ServiceAdding an IP Phone Service

Admin Configures the URL Associated with the Service

Admin Can Set Optional Parameters that the User Can Configure

141414© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone ServicesUser Configuration

MAC Address0009B77B87F4

Phone Services Supported for this Phone Model

Phone Services Supported for this Phone Model

Page 8: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

151515© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone ServicesUser Configuration (Part 3)

161616© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

1. Browser Requests a Web Page

3. Server Runs a Script to Perform a Task and Dynamically Builds a Page to Return to the Client

4. Web Page Sent to ClientClient

(User) Machine

5. Client Browser Parses the File and Interprets How the Page Shows on the Screen

Web Content Deliveryto the IP Phone

• IP phone and web browser are both HTTP clientsPhone processes pre-defined Cisco XML objects and text to display on the Liquid Crystal Display (LCD), where the browser processes HTML

• Therefore…you can use web-based technologies to render content to the IP phone

Web Server

2. Server Retrieves the File (from a Local or Remote File System) HTML/

XMLXML/ Text

4. Web Page Sent to IP Phone

5. IP Phone Parsesthe File and Interprets How the Page Shows on the Screen

IP PhoneIP Phone 3. Server Runs a Script to Perform a Task and Dynamically Builds a Page to Return to the IP Phone

1. IP Phone Requests a Web Page

Page 9: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

171717© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services ExampleGetting the Cisco Stock Quote

11

44

1. Cisco IP Phone HTTP Client Performs an “HTTP GET” for a Specified URL

2. HTTP Web Server Processes the Request and Formats the Data Returned

4. Phone Parses the HTTP Response Header for ContentType of “Text/Xml” (Note1) CallManager Points to

Content “Proxy” Web Server (Configured in IP Phone Services Menu)

3. HTTP Web Server Returns the HTTP Response of XML Objects or Plain Text to the Phone

33

Firewall

5. Phone Presents Data and Options to the Use per the Server Response

55Note1: This Is NOT a Full XML Parser; Only the Supported CiscoIPphone XML Objects Are Successfully Parsed

Proxy Web Server

Internet

22

181818© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesSimple Code Sample/Walkthrough

<%@ Language=JavaScript%>

<%Response.ContentType = "text/xml";%>

<CiscoIPPhoneText><Title>Networkers 2003 VVT-4011</Title><Text>** IP Phone Services **</Text><Prompt> </Prompt></CiscoIPPhoneText>

<%Response.End();%>

Scriptlet

Scriptlet

Page 10: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

191919© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Agenda

• Introduction

• Phone Services Technology Overview

• Phone Services Programming Basics

• Developer Tools and Utilities

202020© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Cisco IP Phone ServicesBasic CiscoIPPhone XML Objects

CiscoIPPhoneMenu CiscoIPPhoneGraphicMenu CiscoIPPhoneInput

CiscoIPPhoneImageCiscoIPPhoneText CiscoIPPhoneDirectory

Page 11: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

212121© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Basic CiscoIPPhone XML Objects

Standard Phone ObjectsStandard Phone Objects Supporting Phone ObjectsSupporting Phone Objects

<CiscoIPPhoneText/><CiscoIPPhoneText/>

<CiscoIPPhoneImage/><CiscoIPPhoneImage/>

<CiscoIPPhoneDirectory/><CiscoIPPhoneDirectory/>

<CiscoIPPhoneInput/><CiscoIPPhoneInput/>

<CiscoIPPhoneMenu/><CiscoIPPhoneMenu/>

<CiscoIPPhoneGraphicMenu/><CiscoIPPhoneGraphicMenu/>

<CiscoIPPhoneIconMenu/><CiscoIPPhoneIconMenu/>

<SoftKeyItem/><SoftKeyItem/>

Streaming URIs:Streaming URIs:RTPTx://x.x.x.x:yyyyRTPTx://x.x.x.x:yyyyRTPRx://x.x.x.x:yyyyRTPRx://x.x.x.x:yyyy

Where:x.x.x.x

= Phone IP Addressyyyy

= Desination Port

Where:x.x.x.x

= Phone IP Addressyyyy

= Desination Port

<CiscoIPPhoneExecute/><CiscoIPPhoneExecute/>

<CiscoIPPhoneResponse/><CiscoIPPhoneResponse/>

<CiscoIPPhoneError/><CiscoIPPhoneError/>

Provide Push Capabilities to the Phone

Provide Push Capabilities to the Phone

URI = Uniform Resource Indicator

222222© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object <CiscoIPPhoneMenu/>

• Supports a maximum of 100 menu items per display• Menu items could be nested, supporting 100 listed items per

“sub-menu”

Description: Displays an Itemized List

<CiscoIPPhoneMenu>

<Title>Title text goes here</Title><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>

</CiscoIPPhoneMenu>

Page 12: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

232323© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object<CiscoIPPhoneText/>

<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>

Description: Displays Text

242424© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object<CiscoIPPhoneGraphicMenu/>

<CiscoIPPhoneGraphicMenu>

<Title>Menu title goes here</Title>

<LocationX>Position information of graphic</LocationX>

<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>

<MenuItem>

<Name>The name of each menu item</Name>

<URL>The URL associated with the menu item</URL>

</MenuItem>

</CiscoIPPhoneGraphicMenu>

Note: Tools Are Available to Automate Generating the XML Graphics Tags and Content

Description: Displays List of Menu Items as Graphics Instead of Text

Page 13: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

252525© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object <CiscoIPPhoneImage/>

<CiscoIPPhoneImage>

<Title>Image title goes here</Title>

<LocationX>Position information of graphic</LocationX>

<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>

Note: Tools Are Available to Automate Generating the XML Graphics Tags and Content

Description: Displays Graphics to the User

262626© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object <CiscoIPPhoneInput/>

<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>

Description: Accepts User Input

Page 14: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

272727© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhone XML Object<CiscoIPPhoneInput/> (Cont.)

Input Flags Specify the Input Format from the User

282828© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Description: Access to Directory Services

CiscoIPPhone XML Object<CiscoIPPhoneDirectory/>

<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>

Page 15: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

292929© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Supporting CiscoIPPhone XML ObjectsCustom SoftKeys with <SoftKeyItem/>

• Custom Softkey supportAbility for users to create custom Softkeys for services screensAll of the IP phone service XML elements support custom SoftKeysAdded URIs for Dial, EditDial, SoftKeyCan only change Softkeys on the services screens; cannot change Softkey order for call plane screens

<CiscoIPPhoneImage>…etc…

<SoftKeyItem><Name>CallMe!</Name><URL>Dial:8001</URL><Position>1</Position>

</SoftKeyItem>

<CiscoIPPhoneImage>

x8001

303030© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Customizing Softkeys (Cont.)

• <CiscoIPPhoneImage/> extended to include extra sub-elements

<SoftKeyItem><Name/><URL/><Position/>

<SoftKeyItem>

Maps to Either a Location, or a Maps to Either a Location, or a PrePre--DefinedDefined Phone CommandPhone Command

Softkey Label NameSoftkey Label Name

SubSub--Element TagElement Tag

The Softkey Position Number on the The Softkey Position Number on the Phone DisplayPhone Display

Position = 1 22 33 44

Page 16: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

313131© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Other Custom Softkey ItemsKey URI

• Phone services can signal events to an application based on key presses from the phone UI

The “6” Rocker KeyKey:NavDwnThe “5” Rocker KeyKey:NavUp“Settings” ButtonKey:Settings“Services” ButtonKey:Services“Messages” ButtonKey:Messages“I” ButtonKey:InfoMute Button

Headset Key

Volume Up Key

Volume Down Key

Number Key “#”Number Key “*”

Softkey Buttons

Number Keys “0 – 9”

Line Keys

ButtonButton

Key:MuteKey:HeadsetKey:VolUpKey:VolDwnKey:KeyPadPountKey:KeyPadStar

Softkey Position Order from Left to RightKey:Soft1 to Key:Soft4

Key:KeyPad0 to Key:KeyPad9

Lines up to 34 Assume that a 7914 Phone Extender Module Is attached

Key:Line1 to Key:Line34CommentsCommentsKey URIKey URI

323232© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Customizing SoftkeysExample

<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>

Root ElementRoot ElementSoftkey NameSoftkey Name

URL or IP Phone Key CommandURL or IP Phone Key CommandSoftkey LocationSoftkey Location

Page 17: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

333333© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Supporting CiscoIPPhone XML Object<CiscoIPPhoneIconMenu/>

• <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

343434© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CiscoIPPhoneIconMenuExample

<CiscoIPPhoneIconMenu>

<Title/><Prompt/>

<IconItem>

<Index/>

<Height/>

<Width/>

<Depth/><Data/>

<IconItem/>

<MenuItem>

<Name/>

<URL/>

<IconIndex><MenuItem>

</CiscoIPPhoneIconMenu>

Maps to the Maps to the <Index/><Index/> SettingSetting

Similar to <CiscoIPPhoneMenu>

Similar to <CiscoIPPhoneImage>

Assigned Number for Assigned Number for Your Custom IconYour Custom Icon

Root ElementRoot Element

Page 18: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

353535© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesPull vs. Push

• PULL

• PUSH

When User Is Not Using the Phone (IDLE State), Phone Polls Web Server for Updates to Display to the IP Phone

WebServer

.ASPor Any Web Script

PUSH: Web Server Initiates the Message to the IP Phone with an HTTP POST Message and the Applicable XML Data Tags

WebServer

HTTP POST

HTTP GET

363636© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone Services IDLE PULL ExampleUsing IDLE URL for Advertisements on the Phone

Possible Scenario : University Sells Advertisement to Pizzaland to Display on IP Phones In Student Dormitories

2. When User Is Not Using the Phone (IDLE State), Phone Polls Web Server for Updates to the Ad Service

HTTP Poll

Late Night Studying for Final Exam…

3. Student Can Select the Service Which Immediately Dials PizzaLand

1. Student Has PC on Dormnet Connected to the IP Phone

More NetPhone Pizza Stories in the News!!http://news.cnet.com/news/0-1004-200-5148829.html

IP-WAN/PSTN

EnvoyAppfromTwistedPair

DormnetWebServer

"One Mega Pan Pizza, Please!"

Page 19: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

373737© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Pulling HTTP Content UsingIDLE URL

• Like an "IDLE PULL"Not to be confused with PUSHEvents and content without end user intervention sent to the phone byHTTP GETCallManager administrator sets an Idle URL timeout value and an Idle URL location for an IP phone

• 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

WebServer

HTTP GET

• The URL could be any backend logic that could send content to the IP phone (image, menu items, etc…) or perform backoffice operations, etc…

.ASPor Any Web Script

383838© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesIDLE URL Configuration

IDLE URL Location

IDLE URL Timer Value

Page 20: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

393939© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Pushing Content to IP Phones Using<IPPhoneExecute/>

• Commonly embedded in an HTTP POSTmessage

• The POST form will contain the XML elements you want processed by the IP phone

Form element must be XML and case-sensitive

<CiscoIPPhoneExecute><ExecuteItem URL = ”The action you want the phone to take”/>

</CiscoIPPhoneExecute>

404040© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone PUSH (Cont.)<IPPhoneResponse/>

• Every ExecuteItem will have an equivalent ResponseItem

• If Status = 0, then no error, else you get an XML element <CiscoIPPhoneError/> with the type of error encountered

• <CiscoIPPhoneError/>error types

1 = error parsing <CiscoIPPhoneExecute/> object

2 = error framing <CiscoIPPhoneResponse/>object

3 = internal file error

4 = authentication error

<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>

<CiscoIPPhoneError Number = "x"/>

Page 21: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

414141© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone PUSH Example

<HTML><HEAD></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>

10.0.0.1

POST Form

HTTP POSTURL

424242© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone ServicesStreaming 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/responseHTTP POSTStreams must be

RTP, G.711 Mu-Law, packet size = 20ms

• Streaming URI identifiers:Receive RTP stream

RTPRx:// x.x.x.x:xxxxTransmit RTP stream

RTPTx://x.x.x.x:xxxxStop receiving RTP stream RTPRx:StopStop transmit RTP stream RTPTx:Stop

RTPRx:RTPRx: Use for App!Use for App!

Use for App!Use for App!RTPTx:RTPTx:

Phone IP Address

Phone Port Address• If not specified, phone

dynamically allocates a port (recommended)

• Port # returned in <IPPhoneResponse/> tag

Page 22: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

434343© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

RTP StreamingCode 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();%>

**Source: Streaming Demo Written by EMEA IPT Team

444444© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

<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>

RTP StreamingCode 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…Code Cont…

Page 23: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

454545© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Agenda

• Introduction

• Phone Services Technology Overview

• Phone Services Programming Basics

• Developer Tools and Utilities

464646© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services SDKHelping Enterprises Customize Applications

• Utilities

LDAP search

Proxy server content retriever

Graphics conversion Utilities

• Sample codeCalendar

Stock quote

Speed dials

Graphics image converter

Measurement conversions

Weather forecast

Airline flight information

Postal information

Foreign currency exchange

World clock

• Documentation

Phone services developer guide

Documents on the included utilities

SDK v2.1

Page 24: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

474747© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services SDKImageViewer Utility

Original GIF File

GIF File Changed to Grayscale

GIF Further Reduced to 4 Shades of Gray (Supported by the IP Phone Display)

484848© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

• Windows Scripting Host (WSH) file which uses the CIPImage ActiveX library to convert images to and from the following formats:

cip

bmp

png

jpg

gif

IP Phone Services SDKCIP Image Converter

CIP

BMPPNG

JPG

C:> cip <old image filename.extension> <new image filename.extension>where .extension = .cip, .bmp, .png, or .jpg

Usage:

GIF

Page 25: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

494949© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Phone Services SDK UtilitiesLDAP Search COM Server Object

• COM object which

Performs LDAP queries on a directory server

Displays the output in IP phone services XML format

CallManager

IPPhoneApp.ASP

1. HTTP Request

DC DirectoryDC Directory

2. LDAP Search2. LDAP Search

CallManagerUser Preferences

3. HTTP Response (XML)

3. HTTP Response (XML)<CiscoIPPhoneDirectory>

<Title> Search Result </Title>

…etc..

</CiscoIPPhoneDirectory>

COM

505050© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

LDAP Search COM Server ObjectProperties

Retrieves the Number of Returned Entries in the LDAP SearchSearchCountSearchCount

Sets and Retrieves the Authorization Name that Binds the LDAP Search (Used Only If There Are Privileged Settings)

AuthNameAuthName

Sets and Retrieves the Authorization Password that Binds the LDAP Search (Used Only If There Are Privileged Settings)

AuthPasswdAuthPasswd

Sets and Retrieves the Search Base of the LDAP SearchSearchBaseSearchBase

Sets and Retrieves the Name of the LDAP ServerServerServer

Sets and Retrieves the Port Number of the LDAP Sever; Default = 389

PortPort

Page 26: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

515151© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

LDAP COM Server ObjectMethods

Retrieves Records Which Meets the Criteria of the Email Based on the Search BaseSearchbyEmailSearchbyEmail

Retrieves Records Which Meets the Criteria of the Last Name Based on the Search Base

SearchByLastNameSearchByLastName

Retrieves Records Which Meets the Criteria of the First Name Based on the Search Base

SearchByFirstNameSearchByFirstName

Retrieves Records Which Meets the Criteria of the Phone Number Based on the Search Base

SearchByPhoneNumberSearchByPhoneNumber

Retrieves Records Which Meets the Criteria of the Distinguished Name Based on the Search Base

SearchByDnSearchByDn

Retrieves Records Which Meets the Criteria of the Relative Distinguished Name Based on the Search Base

SearchByRdnSearchByRdn

Allows User to Output the Next Ten Records Beginning with the nth RecordXMLOutputXMLOutput

Allows User to Specify the Groups of the Returned Attrs, Their XML Output Tag and Their Formats in XML Output One Group by One Group

AddReturnAttrAddReturnAttr

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

AddSortingAttrAddSortingAttr

Retrieves All Records Based on the Search Base PropertySearchAllSearchAll

Retrieves Records Which Meets the Criteria of the Last Name and the First Name Based on the Search Base

SearchByNameSearchByName

Sets the Limit of Returned Records and Search Timeout ValueSetSearchOptionSetSearchOption

Sets <Prompt/> <CiscoIPPhoneDirectory/> and the Max Length of Characters Displayed

SetOutputPromptSetOutputPrompt

Sets <Title/> in <CiscoIPPhoneDirectory/> and the Max Length of Characters Displayed

SetOutputTitleSetOutputTitle

525252© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

LDAP COM Server Example<%@ Language=JavaScript %><%Response.ContentType = "text/xml";try{

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1");s.Server = "callmanager.cisco.com";s.Port = 8404;s.AuthName = "cn=Directory Manager, o=cisco.com";s.AuthPasswd = "mypassword";s.SearchBase = "ou=users, o=cisco.com";s.SetOutputTitle("ActiveX Directory Search", 20);s.SearchAll();Response.Write(s.XMLOutput(0, 100));

}catch(err){

Response.Write("Error," + err.description );}Response.End();Session.Abandon();%>

CM Server NameCM Server Name

Default Port of CM ServerDefault Port of CM Server

Create the ObjectCreate the Object

Output up to 100 Records (Max Number Output up to 100 Records (Max Number of Supported Menu Items) Starting withof Supported Menu Items) Starting withthe First Record (0 Based Numbering)the First Record (0 Based Numbering)

Authorization Name for CM ServerAuthorization Name for CM Server

CM DC Directory PasswordCM DC Directory Password

<Title/> on the IP Phone Display<Title/> on the IP Phone Display

Error Handling Error Handling (Try…Catch Exceptions)(Try…Catch Exceptions)

End My Program and Clear My Variables from MemoryEnd My Program and Clear My Variables from Memory

Retrieve All Records in DIT Location Set in the SearchBase Retrieve All Records in DIT Location Set in the SearchBase (i.e.: Where ou=users and o=cisco.com)(i.e.: Where ou=users and o=cisco.com)

Page 27: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

535353© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Internet

IP Phone Service SDK CiscoURLProxy

• COM object which

Retrieves web documents from a proxy server for processing by the application

Web Server

Proxy Server

2. CiscoURLProxyGetURL() Method

IPPhoneApp.ASP

COM

1. HTTP Request

3. Content Delivered Back to Web

Server Application via

Proxy Server

4. HTTP Response

545454© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_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";Inet1 = new ActiveXObject("CiscoURLProxy.URLGrabber");help_text += Inet1.GetURL("http://www.netjeff.com/humor/8ball.pl.cgi");Inet1 = "";

}catch (err){

//Do Nothing and help_text passes to phone....}Response.Write("<CiscoIPPhoneText><Title>www.netjeff.com</Title><Text>" + help_text + "</Text><Prompt> </Prompt></CiscoIPPhoneText>");

Response.Flush();%>

Create the ObjectCreate the Object

Gets the Results of CGI Gets the Results of CGI Script atwww.netjeff.com, Script atwww.netjeff.com, Returned as a String;Returned as a String;Assigned to Variable, Assigned to Variable, Help_textHelp_text

NOTENOTE: No CiscoURLProxy Properties Are Set;: No CiscoURLProxy Properties Are Set;Therefore Default Settings Are Used:Therefore Default Settings Are Used:•• TimeOutRequest = 120 SecondsTimeOutRequest = 120 Seconds•• ProxySettings = IE Internet Options SettingsProxySettings = IE Internet Options Settings

Object Cleared forObject Cleared forthe Next Updatethe Next Update

Write and Flush the Write and Flush the BufferedCiscoIPPhoneText BufferedCiscoIPPhoneText Title and Help_text String Title and Help_text String to the IP Phoneto the IP Phone

Page 28: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

555555© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

IP Phone Services Emulator

Favorite URL ListFavorite URL List

Working Softkeys, Rocker Key, and Numeric Keypads

Working Softkeys, Rocker Key, and Numeric Keypads

Debug Your Code by Viewing Your

Runtime Data Values

Debug Your Code by Viewing Your

Runtime Data Values

Downloadable from

http://www.hotdispatch.comhttp://www.hotdispatch.com

565656© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CallManager Simulator

• Installs on a laptop

• Allows you to develop phone services without a CallManager server

Cross-Over Cablex x

Page 29: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

575757© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Getting Phone ScreenshotsScreenshotByIP

10.1.1.102

Buffered to

Screenshot.gif

HTTP POST

585858© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Creating Phone Graphics (Option 1)SDK Utility (gif2cip.exe)

gif2cip.exe ausflag.gif ausflag.cip

<CiscoIPPhoneImage><LocationX>-1</LocationX><LocationY>-1</LocationY><Width>68</Width><Height>45</Height><Depth>2</Depth><Data>0000…etc…C0</Data><Title>Temporary title</Title><Prompt>Phone Svcs Training 2002</Prompt>

</CiscoIPPhoneImage>

…Creates Text File with <CiscoIPPhoneText/>

Saved as an XML Document...ausflag.xml

Phone Display

ausflag.gif

Page 30: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

595959© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Creating Phone Graphics (Option 2)PhotoShop Plug-in

cip.8bi ? Copy to the Photoshop Plug-ins Directory

606060© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

“john.gif”

1. HTTP Request

Creating Phone Graphics (Option 3)SDK CipImage Component Object Model Object

• COM object which translates a GIF image to CIP “on the fly” and displays the image on the IP phone

Web Server

2. File Buffered and Translated

<CiscoIPPhoneImage>

<Prompt> John Chambers </Prompt>

…etc..

</CiscoIPPhoneImage>

3. HTTP Response

.ASP

CipImageCOM

Page 31: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

616161© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Common CipImage Methods

Loads a GIF Image from a Phyical FileLoadGIFLoadGIFSaves a GIF Image to a Physical FileSaveGIFSaveGIF

Loads a GIF Image From a Memory BufferLoadGIFFromBufferLoadGIFFromBuffer

Loads a GIF Image’s Data Portion from a Memory BufferLoadGIFDataFromBufferLoadGIFDataFromBuffer

Saves a GIF Image to a Memory BufferSaveGIFToBufferSaveGIFToBuffer

Saves a GIF Image’s Data Portion to a Memory BufferSaveGIFDataToBufferSaveGIFDataToBuffer

Loads a CIP Image from a Memory BufferLoadCIPFromBufferLoadCIPFromBuffer

Saves a BMP Image to a Physical FileSaveBMPSaveBMP

Loads a BMP Image from a Memory BufferLoadBMPFromBufferLoadBMPFromBuffer

Saves a BMP Image to a Memory BufferSaveBMPToBufferSaveBMPToBuffer

Saves a CIP Image to a Memory BufferSaveCIPToBufferSaveCIPToBuffer

Saves a CIP Image’s Data Portion to a Memory BufferSaveCIPDataToBufferSaveCIPDataToBuffer

Saves a JPG Image to a Memory BufferSaveJPGToBufferSaveJPGToBuffer

Loads a CIP Image from a Phyical FileLoadCIPLoadCIP

Saves a CIP Image to a Physical FileSaveCIPSaveCIP

Loads a CIP Image’s Data Portion from a Memory BufferLoadCIPDataFromBufferLoadCIPDataFromBuffer

Loads a JPG Image from a Memory BufferLoadJPGFromBufferLoadJPGFromBufferSaves a JPG Image to a Physical FileSaveJPGSaveJPG

Loads a JPG Image from a Physical FileLoadJPGLoadJPG

626262© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Common CipImage Methods (Cont.)

Allows One to Specify the Number of Colors of the Current ImageReducePaletteColorsReducePaletteColors

Sets the Current X and Y Location Coordinates Associated with the Image

SetLocationSetLocation

Retrieves the Current X and Y Location Coordinates Associated with the Image

GetLocationGetLocation

Converts an RGB Image to a Palette Image Compatible with CIPRGBToPaletteRGBToPalette

Retrieves the Title Associated with the ImageGetTitleGetTitle

Retrieves the Current Prompt Associated with the ImageGetPromptGetPrompt

Converts from a Color Image to a Gray Scale ImageColorToGrayColorToGray

Retrieves Information About the Current ImageGetImageInfoGetImageInfo

Resizes the Image Using Exact Proportions GivenResizeResize

Page 32: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

636363© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

CipImage Samplesnippet 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"); // Create the cip object

…etc…

cip.LoadGIFFromBuffer(rawdata); // Load the byte array

cip.RGBToPalette(); // Set the RGB image to the supported Palette colors

cip.ColorToGray(); // reduce the colors to grayscale

cip.ReducePaletteColors(4); // reduce the palette to 4 colors. (2- bit)

var rawchartdata = cip.SaveCIPDataToBuffer();

Response.Buffer = true;

Response.ContentType = "text/xml";

Response.Write("<CiscoIPPhoneImage>\r\n<LocationX>-1</LocationX>\r\n…etc…

} catch

646464© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Putting It TogetherExample: Calence’s 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

Page 33: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

656565© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

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

666666© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Additional ResourcesDeveloper Support Central: Helping to Build AVVID Applications

http://www.cisco.com/warp/public/570/

Page 34: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

676767© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Additional ResourcesHotDispatch: Mindshare and Support for IP Phone Applications

686868© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

For More Information…

• Cisco IP phone applications development notes:http://www.cisco.com/warp/public/570/avvid/voice_ip/cm_xml/cm_xmldown.shtml

• Cisco CallManager administration guide: http://www.cisco.com/univercd/cc/td/doc/product/voice/c_callmg/3_2/sys_ad/3_2_1/index.htm

• Developing IP phone services: a Cisco AVVID solutionhttp://www.amazon.com/exec/obidos/ASIN/1587050609/qid%3D1011114775/sr%3D8-1/104-5282867-6873568

• Phone services emulator http://www.hotdispatch.com/cisco-ip-telephony/view-ip-requester?ID=15100214&POSTID=3238432909Allows one to test basic IP phone services applications without the CallManager or IP phone

• IP phone services external mailing [email protected]

Page 35: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

696969© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Recommended Reading

Developing Cisco IP Phone Services: A Cisco AVVID SolutionISBN: 1587050609

Available on-site at the Cisco Company Store

707070© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1

Please Complete Your Evaluation Form

Session VVT-4011

Page 36: VVT-4011

Copyright © 2003, Cisco Systems, Inc. All rights reserved. Printed in USA.Presentation_ID.scr

717171© 2003, Cisco Systems, Inc. All rights reserved.VVT-40118184_05_2003_c1