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

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

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

need help with CiscoIPPhoneExecute tag

I'm trying to push this message to my phone:

**********************textMessage.asp**********************************

<% @Language = "VBScript" %>

<% Response.ContentType = "text/html" %>

<%

Response.Write("<XML>");

Response.Write("<CiscoIPPhoneText>");

Response.Write("<Title>Hello World Program</Title>");

Response.Write("<Text>This is a test of IP Phone Services. Hello World!</Text>");

Response.Write("</CiscoIPPhoneText>");

Response.Write("</XML>");

%>

*******************************************************************

Using this script:

***************************push.asp********************************

<% @Language = "VBScript" %>

<% Response.ContentType = "text/html" %>

<%

response.expires=-1

Dim objXMLReq, strRequestXML, strRequestURL

Set objXMLReq = Server.CreateObject( "Microsoft.XMLHTTP" )

strRequestXML = "<CiscoIPPhoneExecute>"

strRequestXML = strRequestXML + "<ExecuteItem Priority='0' URL='http://123.52.125.25/textMessage.asp' />"

strRequestXML = strRequestXML + "</CiscoIPPhoneExecute>"

strRequestXML = Server.UrlEncode (strRequestXML)

strRequestXML = "XML=" + strRequestXML

strRequestURL = "HTTP://10.128.13.196/CGI/Execute"

objXMLReq.open "POST", strRequestURL, false, "username", "password"

objXMLReq.send(strRequestXML)

%>

******************************************************************

The only response I get to my phone is "CGI Index 0" or "CGI Index 1" or "CGI Index 2". The first URL is my computer where I'm hosting the ASP files. The 2nd is my phone.

10 REPLIES

Re: need help with CiscoIPPhoneExecute tag

On the top script the contenttype needs to be "text/xml" vice "text/html".

On the execute script, you're missing the and I don't think you need to add "XML" to the front of the request string? Any chance you can capture the response from the executepost? It's usually not real informative, but it will tell you if its a syntax or authentication error.

Have you tried creating a simple form on your webserver and using that to post to the phone? At least you could eliminate the second script. Below is a quick example that I use (pardon the wrapping). It should ask you to authenticate when you post. Obviously, you'll want to change the IP and the default execute string. (Can you tell I've been playing with sending RTP streams to a phone?)

action="http://192.168.200.56/CGI/Execute">

Execute String To Post

size="10000">

-Chris

New Member

Re: need help with CiscoIPPhoneExecute tag

Hello Chris,

Thanks so much for you help so far!

OK, so I tried building a webpage with the form:

IP Phone Services Test

running...

http://10.128.13.196/CGI/Execute">

http://123.52.125.25/textMessage.asp'>

"

size="10000">

and after I authenticate, I get :

Re: need help with CiscoIPPhoneExecute tag

Error Number 4 means you could not be authenticated. You need to go into the User Section of Call Manager and verify that this username/password is correct and is associated with the phone. I found it easiest to create a new user called 'webservices' and associate it with all of the phones. That way I can authenticate against any phone with a single user/password.

New Member

Re: need help with CiscoIPPhoneExecute tag

I would love to get in on this. Im a little confused on the initial push.asp step.

Can you execute push.asp from a PC web browser, or do you need to create an IP phone service on your phone to execute the push.asp?

Also is there a way to send this to a broadcast address and push a message out to all phones at once?

Re: need help with CiscoIPPhoneExecute tag

Yes. Basically you do an http post to the phone to "push" instructions to the built-in webserver in the phone. This is different than creating a service that the user can access from the built-in browser in the phone. The http form sample I posted earlier would have to reside on a webserver. When the user fills in the form though, their browser does an http post to the phone, telling it to start accepting a voice stream from a particular address/port. I then use a utility called rat on my PC to stream a wav file. (Kinda funny when someones phone calls them an idiot for no apparent reason).

I haven't tried doing large numbers of phones at once yet. I doubt this would working trying to use the broadcast address as http is a connection oriented protocol and can't handle more than a single simultaneous connection.

-Chris

New Member

Re: need help with CiscoIPPhoneExecute tag

For a large number of phones you could have an asp script tied to a database (call manager SQL server) and cycle through all the registered phone objects and apply the posting to each. It's not simultaneous but it is sequential and fast.

Basically you post back to the same page cylcing through all the records until complete. Each post back to the page would contain the record to continue from.

New Member

Re: need help with CiscoIPPhoneExecute tag

I have 3 questions regarding using the Execute Tag,

1. Is there anyone of you tested Posting message to multiple IP phones? I read a mssg from somewhere which has tried using form.submit() in a loop to generate multiple posts (changing the action value in every iteration), but the submit occurs only once, (to the last phone). [The form has the attribute XML=""]. Is there another way to generate HTTP posts in a loop ?

2. I have tested using the Execute tag and it works fine when the message I posted has no space in between. However whenever a space is parsed, I got CiscoIPPhoneError #1, could I know how to solve this?

3. It works fine when only one QueryString was included like this

Same error message (CiscoIPPhoneError #1) prompted to me when one more QueryString is parsed.

.

Kindly advised.

Re: need help with CiscoIPPhoneExecute tag

Best way in my opinion is some sort of cgi script (pl, asp, etc) on the host web server.

New Member

Re: need help with CiscoIPPhoneExecute tag

Do you have an example asp or script that would do this, that you could share with us non programmers?

Tim

Tim Medley, CCNP+Voice, CCDP, CWNA

Sr. Network Architect

VoIP Group

iReadyWorld

New Member

Re: need help with CiscoIPPhoneExecute tag

hi,

i always get the response:

-

http://192.168.251.247/ASP/CallerID/display.asp" />

Data=Request Busy? what does thet mean?

356
Views
10
Helpful
10
Replies