02-24-2005 01:48 PM - edited 03-13-2019 08:08 AM
New to IP telephony and CCM. My company has two brands with separate logos. Would like to alternate the idle display between the logos.
We are not using a "dynamic" web server. Just serving the straight XML file from an APACHE server. For testing, we are using these text based XML:
brand1.xml
<CiscoIPPhoneText>
<Title>Hello Company</Title>
<Text>To page speakers, press *85.</Text>
<Prompt>My Brand #1</Prompt>
</CiscoIPPhoneText>
brand2.xml
<CiscoIPPhoneText>
<Title>Hello Company</Title>
<Text>To page speakers, press *85.</Text>
<Prompt>My Brand #2</Prompt>
</CiscoIPPhoneText>
We set the idle URL to brand1.xml and it displays on the phones.
To get brand2.xml to display we have tried all sorts of versions of <html><head><meta http-equiv content="refresh" blah blah></head></html>. We tried just "refresh=5" and many other versions. None seem to work.
In fact, if we add anything before <CiscoIPPhoneText>, the url is not displayed (no error either). If the phone is already displaying the idle, pressing update causes it to display cancel. Pressing this actually cancels! (a nice feature). Of course, it is canceling because the XML is not valid on the phone.
Using telnet to retrieve the URL shows that the data is being sent just as entered (nothing additional added).
Does anyone have the secret code that I can add to make these two XML resfresh to each other?
02-25-2005 12:19 AM
Unfortunately I don't think you'll get anywhere with the static approach. You cannot mix HTML and XML code (which is what you're trying to do with the html header). What you need is to add a refresh command to the header. You can do this in static HTML code, but then the file is a HTML file and the IP phone will display it as it is (it'll do so for any file that doesn't conform to the XML stylesheet defined for the phones). So, the only way to trigger a refresh is do it programmatically while still serving XML content to the phone. Here's an ASP example:
var xml = "
+ name + ". The line with number " + dn + " is no longer a member of any huntgroup.";
Response.AddHeader("Refresh","4;url=" + baseURL);
Response.Write(xml);
And here's a JSP example:
response.setContentType("text/xml");
String url = baseURL + "?type=main";
response.setHeader("Refresh", "3; URL=" + url);
out.println("
out.println("
out.println("
out.println("");
Seeing that you use apache, PHP is probably the easiest way but I'm afraid I don't have any examples for PHP handy.
03-02-2005 02:09 PM
See if I understand what is happening...(someone straighten me out if I am wrong). The phone issues a GET to the idleURL. The server responds with some data. The data consists of an HTTP header, a blank line, and the xml data. The phone displays the xml data and looks at the header for things it understands (such as refresh).
I can telnet to my server and issue a GET to my idleURL and I see exactly what is in my xml file. So, in theory, if I add my own HTTP headers, I should be able to get a refreshing idleURL. I tested this and it appears to be true. If I get a HTML document, it has headers. If I get my cisco xml file, it does not.
So, looking at the examples it appears I should be able to add something like "Refresh: 3;URL=nextidleURL" to the file and the phone should refresh correctly to the next xml document.
So, here is the attempt...
Refresh: 3;URL=http://172.22.1.9/cisco/xml2.html
This causes the phone never to display the idleURL and IE doesn't like it much (not well formed XML).
If someone who has an auto refresh idleURL could telnet to the server and post results, I'd appreciate it.
From a command prompt (WinXP).
telnet server 80
(the screen will blank and you won't be able to see what you type)
GET idleURL
copy and paste results please!
Thanks,
Mike
03-03-2005 12:14 AM
Your assumptions on the header appear to be correct and are validated by your experiment. However, they also show what I already pointed out: the refresh command needs to be in the header. You can construct custom headers when using HTML, or using a dynamic page. You cannot add any HTML code to a static XML document, because as you found out it'll be interpreted as XML and any additional stuff you add will make the XML document invalid. So, the only theoretically possible solution I see for you assuming you're unwilling to change your idleUrl to something more suitable (what's wrong with using an ASP page and host it in the CCM? a few HTTP requests won't kill it) is to try and reconfigure your HTTP server so that it adds the additional HTTP header to each request for an XML document. HTTP servers add a whole bunch of info to the HTTP header for each request (for instance what type of webserver it is, what modules it has installed), perhaps adding your own information will be possible.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide