You are on page 1of 36

Designing and Developing Advanced IP Phone Services

Session VVT-4011

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

Agenda

Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

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

Bridging Voice and Data in One App


Example: Retail Store Locator
Store Locater
Clothing item request appears phone display IP WAN/ PSTN

Queens on the IP

Manhattan Web Server

Paramus HTTP/ Input clothing item # XML Inventory lookup

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

2003, Cisco Systems, Inc. All rights reserved.

Examples of IP Phone Services Apps


http://wwwin.cisco.com/voice/evvbu/news/post_bakeoff041002.shtml
Industry
Healthcare K12 Horizontal Horizontal Hospitality Hospitality Legal/Horizontal Horizontal Healthcare Retail Finance

AVVID Partner
Calence AAC Associates First Virtual Communications Eyretel MDR Switchview Netcom Systems Dimension Data Berbee Logical Vytek CheckMate

IP Phone Service Application


Myrx: Prescription Lookup; Order Status Mobile Teacher Room Tracking; Hall Pass Processing; Homework Assignments, Alerts, Schedule Reminders, Etc Web Conferencing Solution that Seamlessly Integrates Voice, Video, Data, IM, and Streaming Communications Execrecord: Extends IP Phone Services Interface to Call Recording Solution Property Mgt System (PMS) Integration to CallManager Property Mgt System (PMS) Integration to CallManager Call Authorization and Tracking Tools Emergency Broadcast Application Pushes Voice and Text to Thousands of Phones, by Zones If Preferred Phonenet Healthcare: Integration into Medical Databases for Diag noses and Medication Management Search, Request, and Track Product Statuses by Voice or Data Dynamic Business Dashboards and Integration with Various CRM, ER P, and Other Business Solutions

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

Agenda

Introduction Phone Services Technology Overview Phone Services Programming Basics Developer Tools and Utilities

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

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
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

LCD Display Line Keys

Softkeys Keypad Rocker Key

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.

Initiating Phone Services


IP Phone CallManager Web Server
Phone Service Script

HTTP GET (Services URL)

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

2003, Cisco Systems, Inc. All rights reserved.

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

RTP Message Path


IP Phone <-> CM

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

IP Phone <-> IP Phone IP Phone <-> Web Server

RTP HTTP RTP

SCCP = Skinny Client Control Protocol


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

RTP = Real-Time Protocol


11

IP Phone Services Configuration


User Subscribed Services
2
Developer Or CallManager Administrator Copies the Web Script Files to a Web (HTTP) Server that the CallManager Will Point to for IP Phone Services Sample.asp XML Tags

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

Web Developer Creates the IP Phone Services Application

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

12

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

IP Phone Services Administrator Configuration


Adding an IP Phone Service
Added Phone Services

Admin Configures the URL Associated with the Service

Admin Can Set Optional Parameters that the User Can Configure
VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

13

Phone Services
User Configuration

MAC Address 0009B77B87F4

Phone Services Supported for this Phone Model

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

14

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

Phone Services User Configuration (Part 3)

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

15

Web Content Delivery


to the IP Phone
5. Client Browser 5. IP Phone Parses Parses the File the File and and Interprets Interprets How HowPagePage the the Shows Shows Screen on the on the Screen 1. Browser Requests aa 1. IP Phone Requests Web Page Web Page
XML/ Text

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

IP Phone Client (User) Machine

4. Web Page Sent to IP Phone to Client

Web 3. Server Runs a Script toto Perform a Script Perform a Server

Task and a Task and Dynamically Builds a Page to Return to the Client IP Phone

IP phone and web browser are both HTTP clients


Phone processes pre-defined Cisco XML objects and text to display on the Liquid Crystal Display (LCD), where the browser processes HTML

Thereforeyou can use web-based technologies to render content to the IP phone


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

16

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

IP Phone Services Example


Getting the Cisco Stock Quote
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 3. HTTP Web Server Returns the HTTP Response of XML Objects or Plain Text to the Phone 4. Phone Parses the HTTP Response Header for ContentType of Text/Xml (Note1) 5. Phone Presents Data and Options to the Use per the Server Response

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

19

Cisco IP Phone Services


Basic CiscoIPPhone XML Objects

CiscoIPPhoneMenu

CiscoIPPhoneGraphicMenu

CiscoIPPhoneInput

CiscoIPPhoneText
VVT-4011 8184_05_2003_c1

CiscoIPPhoneImage

CiscoIPPhoneDirectory

2003, Cisco Systems, Inc. All rights reserved.

20

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

Basic CiscoIPPhone XML Objects


Standard Phone Objects
<CiscoIPPhoneText/> <CiscoIPPhoneImage/> <CiscoIPPhoneDirectory/> <CiscoIPPhoneInput/> <CiscoIPPhoneMenu/> <CiscoIPPhoneGraphicMenu/> <CiscoIPPhoneIconMenu/>

Supporting Phone Objects


<SoftKeyItem/> Streaming URIs:
Where: Where: x.x.x.x x.x.x.x RTPTx://x.x.x.x:yyyy RTPTx://x.x.x.x:yyyy = Phone IP Address = Phone IP Address RTPRx://x.x.x.x:yyyy yyyy RTPRx://x.x.x.x:yyyy yyyy = Desination Port = Desination Port Provide Push Provide Push Capabilities to Capabilities to the Phone the Phone

<CiscoIPPhoneExecute/> <CiscoIPPhoneResponse/> <CiscoIPPhoneError/>

URI = Uniform Resource Indicator


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

21

CiscoIPPhone XML Object


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

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

CiscoIPPhone XML Object


<CiscoIPPhoneText/>
Description: Displays Text

<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

2003, Cisco Systems, Inc. All rights reserved.

23

CiscoIPPhone XML Object


<CiscoIPPhoneGraphicMenu/>
Description: Displays List of Menu Items as Graphics Instead of Text
<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>

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

2003, Cisco Systems, Inc. All rights reserved.

24

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

CiscoIPPhone XML Object


<CiscoIPPhoneImage/>
Description: Displays Graphics to the User

<CiscoIPPhoneImage> <Title>Image title goes here </Title> <LocationX>Position information of graphic</LocationX>

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

2003, Cisco Systems, Inc. All rights reserved.

25

CiscoIPPhone XML Object


<CiscoIPPhoneInput/>
Description: Accepts User Input

<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

2003, Cisco Systems, Inc. All rights reserved.

26

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

CiscoIPPhone XML Object


<CiscoIPPhoneInput/> (Cont.)
Input Flags Specify the Input Format from the User

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

27

CiscoIPPhone XML Object


<CiscoIPPhoneDirectory/>
Description: Access to Directory Services

<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

2003, Cisco Systems, Inc. All rights reserved.

28

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

Supporting CiscoIPPhone XML Objects


Custom SoftKeys with <SoftKeyItem/>
Custom Softkey support
Ability for users to create custom Softkeys for services screens All of the IP phone service XML elements support custom SoftKeys Added URIs for Dial, EditDial, SoftKey Can 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>
VVT-4011 8184_05_2003_c1

x8001

2003, Cisco Systems, Inc. All rights reserved.

29

Customizing Softkeys (Cont.)


<CiscoIPPhoneImage/> extended to include extra sub-elements
SubSub- Element Tag

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

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

Other Custom Softkey Items


Key URI
Phone services can signal events to an application based on key presses from the phone UI
Key URI
Key:Line1 to Key:Line34 Key:KeyPad0 to Key:KeyPad9 Key:Soft1 to Key:Soft4 Key:KeyPadStar Key:KeyPadPount Key:VolDwn Key:VolUp Key:Headset Key:Mute Key:Info Key:Messages Key:Services Key:Settings Key:NavUp Key:NavDwn
VVT-4011 8184_05_2003_c1

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

Softkey Position Order from Left to Right

31

Customizing Softkeys
Example
<SoftKeyItem> <Name>Susan</Name> <URL>Dial:35001</URL> <Position>1</Position> </SoftKeyItem> <SoftKeyItem>

Root Element URL or IP Phone Key Command

Softkey Name Softkey Location

<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

2003, Cisco Systems, Inc. All rights reserved.

32

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

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

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

33

CiscoIPPhoneIconMenu
Example
<CiscoIPPhoneIconMenu>

Root Element

<Title/> <Prompt/> <IconItem> <Index/> <Height/>

Assigned Number for Your Custom Icon

Similar to <CiscoIPPhoneImage>

<Width/> <Depth/> <Data/> <IconItem/> <MenuItem>

Similar to <CiscoIPPhoneMenu>

<Name/> <URL/> <IconIndex> <MenuItem> </CiscoIPPhoneIconMenu>

Maps to the <Index/> Setting

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

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

.ASP or Any Web Script

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

2003, Cisco Systems, Inc. All rights reserved.

35

Phone Services IDLE PULL Example


Using IDLE URL for Advertisements on the Phone
Possible Scenario : University Sells Advertisement to Pizzaland to Display on IP Phones In Student Dormitories
Late Night Studying for Final Exam

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

Envoy App from Twisted Pair

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

3. Student Can Select the Service Which Immediately Dials PizzaLand


"One Mega Pan Pizza, Please!"

IP-WAN/ PSTN

More NetPhone Pizza Stories in the News!!


http://news.cnet.com/news/0-1004-200-5148829.html
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

36

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

Pulling HTTP Content Using


IDLE URL
Like an "IDLE PULL"
Not to be confused with PUSH Events and content without end user intervention sent to the phone by HTTP GET CallManager 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 HTTP GET Web Server

.ASP or Any Web Script

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

2003, Cisco Systems, Inc. All rights reserved.

IP Phone Services
IDLE URL Configuration

IDLE URL Location

IDLE URL Timer Value


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

38

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

Pushing Content to IP Phones Using


<IPPhoneExecute/>
Commonly embedded in an HTTP POST message
<CiscoIPPhoneExecute> <ExecuteItem URL = The action you want the phone to take/> </CiscoIPPhoneExecute>

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

2003, Cisco Systems, Inc. All rights reserved.

39

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
VVT-4011 8184_05_2003_c1

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

2003, Cisco Systems, Inc. All rights reserved.

40

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

Phone PUSH Example

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:

Use for App! Use for App!

Phone IP Address

Streaming URI identifiers:


Receive RTP stream RTPRx:// x.x.x.x:xxxx Transmit RTP stream RTPTx://x.x.x.x:xxxx Stop receiving RTP stream RTPRx:Stop Stop transmit RTP stream RTPTx:Stop

Phone Port Address


If not specified, phone dynamically allocates a port (recommended) Port # returned in <IPPhoneResponse/> tag

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

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

**Source: Streaming Demo Written by EMEA IPT Team


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

45

IP Phone Services SDK


Helping Enterprises Customize Applications SDK v2.1
Utilities
LDAP search Proxy server content retriever Graphics conversion Utilities

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

IP Phone Services SDK


ImageViewer Utility

Original GIF File

GIF File Changed to Grayscale

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


VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

47

IP Phone Services SDK


CIP Image Converter
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 Usage:
C:> cip < old image filename.extension> < new image filename.extension>
where .extension = .cip, .bmp, .png, or .jpg

CIP PNG BMP JPG GIF

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

48

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

Phone Services SDK Utilities


LDAP Search COM Server Object
COM object which
Performs LDAP queries on a directory server Displays the output in IP phone services XML format
IPPhoneApp.ASP
> > tory </Title rec eDi sult hon ch Re IPP ear ry> sco L) cto <Ci itle> S Dire (XM <T . hone . se etc oIPP sc pon i </C Res

CallManager User Preferences

COM

t TTP ues 3. H Req TTP 1. H

2. LDAP Search DC Directory CallManager

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

49

LDAP Search COM Server Object Properties

Port Server SearchBase

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

2003, Cisco Systems, Inc. All rights reserved.

50

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

LDAP COM Server Object Methods


SetOutputTitle SetOutputPrompt SetSearchOption AddReturnAttr AddSortingAttr SearchAll SearchByName SearchByLastName SearchByFirstName SearchByPhoneNumber SearchbyEmail SearchByDn SearchByRdn XMLOutput
VVT-4011 8184_05_2003_c1

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

LDAP COM Server Example


<%@ Language=JavaScript %> <% Response.ContentType = "text/xml"; try Create the Object { CM Server Name var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1"); s.Server = "callmanager.cisco.com"; Default Port of CM Server s.Port = 8404; s.AuthName = "cn=Directory Manager, o=cisco.com"; Authorization Name for CM Server s.AuthPasswd = "mypassword"; CM DC Directory Password s.SearchBase = "ou=users, o=cisco.com"; s.SetOutputTitle("ActiveX Directory Search", 20); <Title/> on the IP Phone Display s.SearchAll(); Retrieve All Records in DIT Location Set in the SearchBase Response.Write(s.XMLOutput(0, 100)); (i.e.: Where ou=users and o=cisco.com) } catch(err) Output up to 100 Records (Max Number { of Supported Menu Items) Starting with the First Record (0 Based Numbering) Response.Write("Error," + err.description ); } Response.End(); Session.Abandon(); %>
VVT-4011 8184_05_2003_c1

Error Handling (TryCatch Exceptions)

End My Program and Clear My Variables from Memory


52

2003, Cisco Systems, Inc. All rights reserved.

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

IP Phone Service SDK


CiscoURLProxy
COM object which
Retrieves web documents from a proxy server for processing by the application
IPPhoneApp.ASP

2. CiscoURLProxy GetURL() Method

COM

4. HTTP Response 1. HTTP Request

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

Downloadable from

IP Phone Services Emulator

http://www.hotdispatch.com

Favorite URL List

Working Working Softkeys, Softkeys, Rocker Rocker Key, and Key, and Numeric Numeric Keypads Keypads

Debug Your Code by Viewing Your Runtime Data Values


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

56

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

Getting Phone Screenshots


ScreenshotByIP

HTTP POST

Buffered to Screenshot.gif 10.1.1.102


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

57

Creating Phone Graphics (Option 1)


SDK Utility (gif2cip.exe)
gif2cip.exe ausflag.gif ausflag.cip

Creates Text File with <CiscoIPPhoneText/>

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>

Saved as an XML Document... ausflag.xml

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

Creating Phone Graphics (Option 2)


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

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

59

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
john.gif 2. File Buffered and Translated
t> romp e> eImag mbers </P Phon ha iscoIP t> John C <C p <Prom age> .. etc IPPhoneIm co </Cis ponse

P 3. HTT

Res

CipImage COM

1. HTTP Request

.ASP

Web Server

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

60

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

Common CipImage Methods


LoadJPG SaveJPG LoadJPGFromBuffer SaveJPGToBuffer SaveBMP LoadBMPFromBuffer SaveBMPToBuffer LoadCIP SaveCIP LoadCIPFromBuffer LoadCIPDataFromBuffer SaveCIPToBuffer SaveCIPDataToBuffer LoadGIF SaveGIF LoadGIFFromBuffer LoadGIFDataFromBuffer SaveGIFToBuffer SaveGIFDataToBuffer
VVT-4011 8184_05_2003_c1

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

2003, Cisco Systems, Inc. All rights reserved.

61

Common CipImage Methods (Cont.)


Resize GetImageInfo ColorToGray RGBToPalette ReducePaletteColors SetLocation GetLocation Resizes the Image Using Exact Proportions Given Retrieves Information About the Current Image Converts from a Color Image to a Gray Scale Image Converts an RGB Image to a Palette Image Compatible with CIP Allows One to Specify the Number of Colors of the Current Image Sets the Current X and Y Location Coordinates Associated with the Image Retrieves the Current X and Y Location Coordinates Associated with the Image Retrieves the Title Associated with the Image Retrieves the Current Prompt Associated with the Image

GetTitle GetPrompt

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

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

2003, Cisco Systems, Inc. All rights reserved.

67

For More Information


Cisco IP phone applications development notes:
http://www.cisco.com/warp/public/570/avvid/voice_ip/cm_xml/cm_x mldown.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 solution


http://www.amazon.com/exec/obidos/ASIN/1587050609/qid%3D1011 114775/sr%3D8-1/104-5282867-6873568

Phone services emulator


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

IP phone services external mailing list


ipphonesvs-sdp@cisco.com
VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

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

Available on-site at the Cisco Company Store


VVT-4011 8184_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

69

Please Complete Your Evaluation Form


Session VVT-4011

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

70

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

VVT-4011 8184_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

71

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

You might also like