cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2062
Views
0
Helpful
3
Replies

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

ShutEyeThinkin
Level 1
Level 1

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?

Thanks,

ShutEyeThinkin

3 Replies 3

msabir
Level 4
Level 4

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).

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:

http://10.145.26.77/CGI/Execute" Method="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:

http://192.168.11.54/CGI/Execute">



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

http://testUserId:testPwd@192.168.11.54/CGI/Execute">



Thanks,

ShutEye Thinkin