Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

IPPhoneExecute XML

Has anyone gotten this to work with "automatic" authentication? I can make it work from a browser window, as the authentication windows will popup. But I want to push data from a server, and the server must have a predefined name and password which it will pass to the phone when it does the post. I have tried several methods, but I am not an HTML/JAVA/VB expert so I m really struggling. I basically want to post from one server (the big web server) to another (the web server on the phone) without any user interaction.

New Member

Re: IPPhoneExecute XML

A simple workaround for this is assigning a new call manager user(e.g. ciscosms) to all phones, which enables a script to push data to all phones using one username/password. Of course this is no professional solution, but works for me and call manager is still running :)

For further information on using the Cisco IP Phone Tags, consult "Developing Cisco IP Phone Services" published by Cisco Press, which contains a lot of information not mentioned in the online documentation.

New Member

Re: IPPhoneExecute XML

I did create a "superuser" for accessing allof the phones, but my problem was with the actual Javascript code. I could not get the server to send the name and password to the phone. I tried using several different methods, but I am not a professional web devleoper and just can't get it to work. Below is one of my failed attempts. I even put a sniffer on the conversation, and saw that the server was not sending the authentication in the request. If you have some sample code that works could you post it or email it?"POST", "http://intercom:password@",false,"intercom","password");

xmlhttptx.setRequestHeader("Content-Type", "text/xml");

xmlhttptx.send(sendtx)"POST", "http://intercom:password@",false,"intercom","password");

xmlhttprx.setRequestHeader("Content-Type", "text/xml");


Response.ContentType = "text/xml";

Response.Buffer = true;


Response.Write("Search Results\r\n");






=============heres another attempt-=====================

objSrvHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP.4.0");

objXMLDocument = Server.CreateObject ("MSXML2.DOMDocument.4.0");

objXMLDocument.async= false;

objXMLDocument.loadXML (""); ("POST","http://intercom:password@",false);

objSrvHTTP.send (objXMLDocument);

Response.ContentType = "text/xml";

Response.Write (objSrvHTTP.responseXML.xml);

New Member

Re: IPPhoneExecute XML

I have used ColdFusion and HTML (From a web brower) and got it working. You can find them at the following place

New Member

Re: IPPhoneExecute XML

By the way, I do have the book, and it helped alot, I must be missing something big....

New Member

Re: IPPhoneExecute XML

Hi, I read somewhere (i can't remember where right now) that the format you are using is not supported yet. Have you tried sniffing the port that phone is attached to and looking at the formatted request? I will give it a try and post something if I can figure it out.

New Member

Re: IPPhoneExecute XML

Add an authenication header to your post. Check the HTTP spec and search on Basic Authentication.


http://a.b.c.d/CGI/Execute" Method="POST">

New Member

Re: IPPhoneExecute XML

Sorry, I found out the code above doesn't work. I got caught by the IE password caching bug. I forget to close all my browser windows before testing it. Uggh I hate that.... back to the drawing board.....

New Member

Re: IPPhoneExecute XML

I have sniffed the connection, and When I do a standard post from a web form, I can see the authentication. When I try to do an "automated post" from server to phone, the server does not send the authentication. I have tried several methods (see above), and based on MS documentation, it should work.... I'm not sure if its a bug in IIS, javascript, or what....


Re: IPPhoneExecute XML

this one works fine for me.. "/>

and as it was mentioned above you can create a new user and associate all your phones with it.


New Member

Re: IPPhoneExecute XML

Can anyone please tell me what can be done with the CiscoIPPhoneExecute i can only find info on the Format e.g.

It's the URL value's that i can find no information on

Can anyone help



New Member

Re: IPPhoneExecute XML

I have found info that tells me about putting a form on a webpage with a textarea called XML and then putting the XML in the area and submitting to the phone via the CGI/Execute path but everytime i do this i get a error of 1 back which is "Error Parsing CiscoIPPhoneExecute object" the XML looks fine could someone please help.

The XML is

http://user:pass@" />

Thanks in advance


New Member

Re: IPPhoneExecute XML

Can anyone guide me where am i going wrong,

below is the code for trying to run the rtp recceive service on ip phone(7960), everytime i try to run the code by cliking on the butto(submit) in browser , the browser shows : CiscoIPPhoneError 4(Authentication failure.)

Please help me out.

Thanx in advance

<%@ Language=VBScript %>

<%Option Explicit%>

http://user:pass@ip_addr_of_phone/CGI/Execute" Method="POST">

New Member

Re: IPPhoneExecute XML

The error your getting is because the Phone can not authenticate your user. The user:pass need to be a user associated with that device in the call manager administration, try creating a user just for this operation and associate it will all devices it will allow this user to access all phones otherwise you will have to change the username and password for each phone.


New Member

Re: IPPhoneExecute XML

I tried wht u suggested, but still i am getting the same error in browser:

Do u have any other suggestions.


New Member

Re: IPPhoneExecute XML

There are some e.g. on the following web site

New Member

Re: IPPhoneExecute XML

You must send the authentication in the header since that is the way a POST works. I am not sure what programming language you are using but most have some type of url method/function available. If you are a c or c++ guy you can just use sockets (that is fun). If you like java there is a URL and HTTP object running around. I just used it to build an application within a cra script that call a method to post to the phone so I know it works.

If you still need more help try posting at - - I am sure they can get you the code

New Member

Re: IPPhoneExecute XML

Update- I got it working!!! I finally gave up on IIS and switched to a Perl Script using LWP. Here is the code that works. This script will open a full-duplex conference between 2 phones. I am going to keep working on it and try to develop it into a usable application. I still need a way to find the phones IP addresses, to close the channel when the conference is done, and many other things. If anyone has any experience with perl, maybe you can exlpain to me why I have to use the %xx characters rather than the actual characters. Im off to buy a perl book.....

use LWP::UserAgent;

$uatx = LWP::UserAgent->new;

my $reqtx = HTTP::Request->new(POST => '');



$reqtx->authorization_basic('intercom', 'password');

my $restx = $uatx->request($reqtx);

print $restx->as_string;

$uarx = LWP::UserAgent->new;

my $reqrx = HTTP::Request->new(POST => '');



$reqrx->authorization_basic('intercom', 'password');

my $resrx = $uarx->request($reqrx);

print $resrx->as_string;

use LWP::UserAgent;

$uatx2 = LWP::UserAgent->new;

my $reqtx2 = HTTP::Request->new(POST => '');



$reqtx2->authorization_basic('intercom', 'password');

my $restx2 = $uatx2->request($reqtx2);

print $restx2->as_string;

$uarx2 = LWP::UserAgent->new;

my $reqrx2 = HTTP::Request->new(POST => '');



$reqrx2->authorization_basic('intercom', 'password');

my $resrx2 = $uarx2->request($reqrx2);

print $resrx2->as_string;

Re: IPPhoneExecute XML

When I tried what you're doing, I found the user still had to hit speakerphone or pickup the handset to transmit (a good thing since it prevents eavesdropping)

My problem is how to get the phone to dial extra digits after an initial dial. Is there a URI for hitting numbers on the keypad?

I'm not sure why you need the char codes. Maybe because you're calling HTTP:Request directly instead of having LWP call it behind the scenes.

Here's a snippet of the subroutine code I've been using.



sub PostToPhone


use HTTP::Request::Common qw(POST);

require LWP::UserAgent;

my($IPAddr, $Command, $FormData, $ua, $req);

$IPAddr = $_[0];

$Command = $_[1];

$FormData{'XML'} = "


$ua = LWP::UserAgent->new;

$req = POST "http://$IPAddr/CGI/Execute", [ %FormData ];

$req->authorization_basic($AuthName, $AuthPwd);


$res = $ua->request($req);


New Member

Re: IPPhoneExecute XML

I did not experience that. But you do have to run 4 post requests for each full duplex conference. You could do only the first two for a one-way announcement.

I am thinking about implementing an acceptance process. Setup the first Tx-RX pair and have the receiving phone load a web page that has an accept or reject button, if the receiver accepts the call, then I setup the other half of the conference.

Post Phone a--> transmit to phone b

Post phone b--> receive from phone a

Post Phone b--> transmit to phone a

Post phone a--> receive from phone b

New Member

Re: IPPhoneExecute XML

The reason you have to use the %xx characters is more about how web servers work rather than how Perl works. Converting non-alpha characters to hex is something browsers do transparently, but you have to do it yourself when using LWP. If you prefer, you can use the URI pm to do it for you:

use URI;

$url = "";

$xml = '' . "\n" . ''

. "\n" . '';

# Or Whatever, then

$xml = URI::Escape::uri_escape("$xml")

Even better, go get the Cisco::IPPhone module off of CPAN and let it worry about doing the crappy part for you ...


New Member

Re: IPPhoneExecute XML

You have two options; you can pass the authentication information in the header of the POST message; or you can do it when you call the URL by using the http://username:password@host convention. The former is preferable, obviously, since it doesn't show the authentication informatin in the location bar.