cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1744
Views
5
Helpful
16
Replies

Post static messages to an ip phone

tomide_ccie
Level 1
Level 1

i have a request from my client to use xml to post a static message to a set of phones. the message is " Please dial 8 to call 911 !!!. client wants message to continously run or display like a stream on phones. How do i use xml to accomplish this? any help would be appreciated.

1 Accepted Solution

Accepted Solutions

Thanks, if it helped please rate the post.

Bye

Alberto

View solution in original post

16 Replies 16

agiaccone
Level 1
Level 1

You can easily do this POSTing an xml message on the phones.

You should send the message repeatedly every let's say 5 secs, but paying attention to the Priority in the CiscoIPPhoneExecute, using 1 not to annoy users (http://www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/5_0_1/ipphsv/ip503ch2.htm#wp1033858).

Put on a webserver this textmessage.xml:

How to Dial 911

Please dial 8 to call 911 !!!

then post to the phones this :

http://webserver/textmessage.xml"/>

HTH

Alberto

How do you post the CiscoIPPhone execute command to the phone.

msabir
Level 4
Level 4

You can use Idle URL and have it activated at a very low time line -- 5 secs may be.

i was able to at least get a headway using cicoIPPhonetext but CiscoIPPhonetext only posts to the services display window and not the calling window,The doc says to use CiscoIPPhoneStatus for displays to calling window but i can't get that to work. i want the display to show up like IPMA service or something similar. any help would be appreciated.

You can use both CiscoIPPhoneStatus and CiscoIPPhoneStatusFile. The second is the simpler in my opinion.

This case applies on 7970s :

Put a 262x50 message.png image file on a webserver seen by the phones that displays the message you want.

then push to the phones this xml :

"XML=

How to Dial 91100

http://webserver/message.png"

Other phone models have other requirements for the images to diplay.

In case you want to use CiscoIPPhoneStatus, you should use the Gif2Cip.exe tool (in the IP Phone services SDK) to populate the tag. In this case image dimension is 106 x 21.

HTH

Alberto

thanks for your help so far......... seems to be getting stuck...see what i have done below:

i copied the script above

define a service in ccm

point the url to the path where the script is

subscribed the phone to the service

in the url i used the ip address, so i wont have to do ns or wins lookup

go to services button and i either get xml parse error or http 404 error.

Heres's my config:

Calling 911.....

0

0

http://ccmpub/ccmpd/message.png

IP phone service:

http://10.103.40.223/ccmpd/911B.xml

what am i doing wrong?

The error lies in the fact that you are trying to GET the the xml from the phone, but supports only pushing i.e. POSTing on the phone the instruction.

This means that you should write some code to push that message to the phones.

Here's a small example in c# :

string sXML = "XML=

Calling 911.....

0

0

http://ccmpub/ccmpd/message.png

"

byte[] bb = System.Text.ASCIIEncoding.UTF8.GetBytes("usr" + ":" + "pwd");

MSXML2.XMLHTTPClass xmlhttp = new MSXML2.XMLHTTPClass();

xmlhttp.open("POST", "http://ip_phone_ip/CGI/Execute", true, "", "");

xmlhttp.setRequestHeader("Authorization", "Basic " + Convert.ToBase64String(bb));

xmlhttp.setRequestHeader("Connection", "close");

xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

xmlhttp.send(sXML);

where usr and pwd are the credential of a user who controls the device.

Remember that there's no way for the user to remove this message if pushed this way, the only way is to send another xml to the phone that re-init the screen :

HTH

Alberto

Thanks for your help so far, i decided to use idle url but the banner stay on forever until a user presses the exit softkey, what i want is to have the page refresh itself at a specific interval....i have tried to use the refresh keyword but it does not work, see my code below:

-1

-1

125

40

2

000000000000

Refresh:3

XXX

For Emergency dial 8911

HelpDsk

Dial:XXXXXXXXXXX

1

SOC

Dial:XXXXXXXXXXX

2

Exit

SoftKey:Exit

3

what i meant by refresh is that i want the page to display for say 5 mins then go away without user intervention and come back again at the specified idle interval.

If you are open to a commercial but very attractively priced product, check out PhoneTop Messenger. If nothing more, it might help you get some ideas.

In order to make the page refresh itself you should add a Refresh header in the page you use as Idle url.

Try to add this on top of your Idle page :

<%@ Language=JavaScript %>

<%

Response.AddHeader( "Refresh",

"300; url=http://myip/blank.xml");

Response.ContentType = "text/xml";

%>

http://www.cisco.com/en/US/docs/voice_ip_comm/cuipph/all_models/xsi/6_0/english/programming/guide/xsi60htp.html#wp1034199

where http://myip/blank.xml is a blank page.

this way when the phone's idle, it gets to your message with an header that says "after 300 seconds refresh to blank.xml" i.e. delete the message from the screen.

When the phone comes back idle, everihing starts again.

HTH

Alberto

did that but am getting an XML ERROR [4] parse error, see my code below:

%@ Language=JavaScript %>

<%

Response.AddHeader( "Refresh",

"30; url=http://ccmp/ccmpd/blank.xml");

Response.ContentType = "text/xml";

%>

-1

-1

125

40

2

0000000000000000000

Refresh:3

xxx

For Emergency dial 8911

HelpDsk

Dial:xxxxxxxxxxx

1

SOC

Dial:xxxxxxxxxxx

2

Exit

SoftKey:Exit

3

be sure to have renamed your Idle url file in .asp, for example idle.asp.

This configuration worked for me :

Idle url :

http://10.10.10.10/idelUrl.asp

Idle Timer : 30 secs

in the idleUrl.asp file the refresh url occurs after 30 secs pointing at blank.asp where I put this instruction :

that means "Press the Services key" i.e. close the window.

Attached you'll find the files that worked for me.

HTH

Alberto

Alberto, you rock man. Works like a charm. just need to play with timeouts and what not.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: