Few questions on displaying information out of an ASP
I am wanting to pull information out of a database and send it to a phone, later I will figure out how to accept the username variable from the phone itself but for now I am just trying to figure out how to display information on a phone...
Here is my code, I want to basically create two headings on my phone.
Heading One will display the rsinfo
Heading Two will display the rsinfo2
I have a query in my code, variables are rsinfo and rsinfo2. This ASP page works fine in a browser, it connects to my database and returns all my required info into a HTML table displayed in my web browser.
I am kind of new at this so I hope I made sense. :)
Here is the asp code...
Dim cnnDB, strQuery, strQuery2, rsInfo, rsInfo2
Set cnnDB = Server.CreateObject("ADODB.Connection")
'SQL query strings.
strQuery = "SELECT * FROM OPPS"
strQuery2 = "SELECT count(Meetings) FROM OPPS WHERE Meetings = 'Day'"
'Execute query and return a recordset.
Set rsInfo = cnnDB.Execute(strQuery)
Set rsInfo2 = cnnDB.Execute(strQuery2)
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
You'll need to be a part of the Developer Support Program to get access to it and other materials.
Another good source for creating Cisco IP Phone services is "Developing Cisco IP Phone Services: A Cisco AVVID Solution" by Cisco Press. You can find and preview this book on O'Reilly's Network Safari (http://safari.oreilly.com/). Safari offers a free 14-day trial, so you can get the full content of the book at no cost and get started right away! You'll find everything you need to develop Cisco IP Phone services in this book.
So there are some of the resources that you're going to want to follow up on if you haven't already. In answer to your question, to make your content Cisco-phone friendly, you need to set the output format to text/xml (ie Response.ContentType = "text/xml";) and instead of using HTML tags, use the Cisco XML tags (which are defined in the SDK or the book), such as the CiscoIPPhoneText tag:
Re: Few questions on displaying information out of an ASP
Thanks a bunch for the reply!
I took your advice and made some nifty little asp test file and it works, I can display information on the phone. Once I add my DB code everything still works, once I try and display my DB Query results I get an error on my phone that says:
XML Error : Parse Error
Here is my code, this works perfect in a web browser as the query runs fine.
response.ContentType = "text/xml"
sql="select count(userid) from sysdba.history where opportunityid ='OWST9a0001UU'"
response.ContentType = "text/xml"
while (not rs.EOF)
Response.ContentType = "text/xml"
This is the Title")
Response.write("Prompt Text Goes Here")
response.write("" & rs("") & "")
Response.write("Insert all of your text here")
Don't know why it wont work with my phone,
I will buy that book but I did get a good look at it before, if I remember there was little to no information about how to use the cisco phone to pull information out of a database. There has to be something I am doing wrong here. Maybe what I am trying to do is not possible?
SIP traces provide key information in troubleshooting SIP Trunks, SIP
endpoints and other SIP related issues. Even though these traces are in
clear text, these texts can be gibberish unless you understand fully
what they mean. This document attempts to br...
Please find the attached HTML document, download and open it on your PC.
This provides an easy to use form where you simply answer a few
questions and it will render the proper jabber-config.xml file for you
to copy/paste. There is built in logic to verif...
CUCM Database Replication is an area in which Cisco customers and
partners have asked for more in-depth training in being able to properly
assess a replication problem and potentially resolve an issue without
involving TAC. This document discusses the bas...