Click here to Skip to main content
15,878,748 members
Articles / Web Development / ASP.NET

Cisco IP Phone Services

Rate me:
Please Sign up or sign in to vote.
4.10/5 (10 votes)
23 Aug 2006CPOL2 min read 201.2K   2K   32   43
A small example on how to produce content for Cisco IP Phones in ASP.NET.

Sample Image - CiscoIPPhoneServices.jpg

Introduction

The new Cisco IP Phones (7920, 7940, 7960, 7970, 7971) all support showing content located on a web server. This content needs to be formatted using the Cisco proprietary format using XML. This article will walk you through creating a small Hello World using the library I created.

Cisco SDK

If you take the time to open the SDK, you will see that if you want to create content, you basically have to write an XML file. For static content, this works pretty well, but if you want to create dynamic content using ASP.NET, a library would be useful. The library provided here is partially complete and you are welcome to send updates. The size of the screen being small, possibilities are limited but still the applications that can be developed are interesting. The SDK freely available from the Cisco website includes various examples (weather, stock, etc.) that will demonstrate the possibilities. Cisco SDK.

Using the Code

Now let's go and create our Hello World. First create an ASP.NET project and then add the DLL to your reference. Create a WebForm and delete all HTML from the ASPX file and leave only the first line (Page tag) at the top.

Your ASPX file should look like that:

ASP.NET
<%@ Page language="c#" Codebehind="hello.aspx.cs" 
          AutoEventWireup="false" Inherits="IPPhone.hello" %>

Then in the Page_Load function, write the following:

C#
Response.ContentType = "text/xml";
CiscoIPPhoneText t = new CiscoIPPhoneText("Hello World", 
                             "Hello World","Hello World");
t.AddSoftKey(new CiscoSoftKey("Hello","",1));
Response.Write(t.ToString());

Here you first need to set the Content Type to XML and then you can use the CiscoIPPhoneText object of the library. Creating a new CiscoIPPhoneText will require three parameters: Title, Prompt, and Text. Once the object is created, you can then send it to the browser with a Response.Write. Optionally, you can add a soft key using the AddSoftKey method. Note: Please refer to the SDK documentation to see where those strings will be displayed.

Testing the Code

OK, now if you open this same page in your web browser, you can see an XML file that will look like:

XML
<CiscoIPPhoneText>
<Title>Hello World</Title>
<Prompt>Hello World</Prompt>
<Text>Hello World</Text>
<SoftKeyItem>
<Name>Hello</Name>
<URL></URL>
<Position>1</Position>
</SoftKeyItem>
</CiscoIPPhoneText>

But how do we get the screenshot?

Well, unless you have a Cisco IP Phone, you will need to use an emulator; Aptigen is providing one. They have a trial version that will allow you to test your Hello World and get a screen just like the one above...

History

  • 2006-Aug-23: v0.1.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect SCIO International, LLC
Mexico Mexico
I am french although I currently live in Mexico.
I have a master in electrical and computer engineering.
I am currently working for a software company named SCIO Consulting http://www.sciodev.com where I lead projects on the Microsoft platform.

Comments and Discussions

 
AnswerRe: Where can i get the IP Phone emulator? Pin
PaulHarris6-Feb-07 13:47
PaulHarris6-Feb-07 13:47 
QuestionRe: Where can i get the IP Phone emulator? Pin
Nagarajan Arunachalam7-Sep-07 20:07
Nagarajan Arunachalam7-Sep-07 20:07 
QuestionHelp me please? Pin
tweetyq146-Nov-06 22:17
tweetyq146-Nov-06 22:17 
AnswerRe: Help me please? Pin
Guillaume Gros13-Nov-06 6:45
Guillaume Gros13-Nov-06 6:45 
QuestionError Pin
Goldfishrock19-Oct-06 22:48
Goldfishrock19-Oct-06 22:48 
AnswerRe: Error Pin
Guillaume Gros20-Oct-06 4:53
Guillaume Gros20-Oct-06 4:53 
GeneralRe: Error Pin
CatoGonzalez17-Apr-07 10:35
CatoGonzalez17-Apr-07 10:35 
GeneralRe: Error Pin
JH Foo31-Jul-07 22:05
JH Foo31-Jul-07 22:05 
You can set it in the Response object:
Response.Charset = "";
GeneralGreat work, but I wonder.. Pin
Moataz M. Medhat6-Sep-06 5:31
Moataz M. Medhat6-Sep-06 5:31 
GeneralRe: Great work, but I wonder.. [modified] Pin
Guillaume Gros20-Oct-06 4:48
Guillaume Gros20-Oct-06 4:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.