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

Unanswered Question
Nov 20th, 2008

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:[email protected]/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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
msabir Thu, 11/20/2008 - 12:58

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

stephan.steiner Fri, 11/21/2008 - 02:20

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">


ShutEyeThinkin Fri, 11/21/2008 - 07:44

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:[email protected]/CGI/Execute">



Thanks,

ShutEye Thinkin

Actions

This Discussion