Cisco Support Community
Community Member

Push XML to Phone (with UserID:Password in HTTP POST)

This is the 2nd of 2 threads I am starting.

1. (previous thread) asked for guidance in associating a User with all IP Phones in order for them to obtain authentication before allowing XML to be pushed to them.

2. (this thread) asks for guidance in issuing the push to the IP Phone, regarding getting the base64 User:Password inserted into the HTTP pkt.


Thread 2:

Is there a way to use just HTML to push an XML object to an IP Phone? The XML syntax is the easy part, but getting the base64 UserID:Password to be inserted into the HTTP POST pkt isn't straightforward to me (with HTML-only). I see a few examples using javascript, VBScript, php, etc, to issue the proper HTTP POST with UserID:Password) but my working knowledge of these is limited.

I have seen the syntax: http://userID:Password@ipaddress/CGI/Execute. Is it possible to insert that into the action field of a FORM? If so, does the base64 conversion get executed?

Anyway, If HTML-only is not an option, would anyone have some working sample code that uses javascript (or VBscript), maybe inside of a .asp file?



Community Member

Re: Push XML to Phone (with UserID:Password in HTTP POST)

You can programatically do an HTTP POST or have an HTML form with a POST action (but one has to submit the form for this). For HTTP POST via code, you can use MSXML (VB) or use Apache HTTP client (Java).

Re: Push XML to Phone (with UserID:Password in HTTP POST)

If you want ASP, download the IP Phone Services SDK and look at the push2phone sample (there's also a JSP sample if you're more into Java.. it holds the same name).

And as for putting the credentials into the url in the forum.. why don't you try it?

Here's a simple html page I use to post.. it doesn't contain the authentication but you can easily add it and see if it works:" Method="POST">

Community Member

Re: Push XML to Phone (with UserID:Password in HTTP POST)

I'm still not having success using the HTML FORM way of sending authentication. I am using a sniffer. Here is what I send without authentication, and the PHONE returns "HTTP/1.1 400 Bad Request", which is to be expected, and the back-and-forth pkts look good:">

Then, here is what I send which includes the UserID:Password in the POST. The sniffer shows not much activity, if any at all:



ShutEye Thinkin

CreatePlease to create content