Post static messages to an ip phone

Answered Question
Apr 14th, 2008
User Badges:

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.


Correct Answer by agiaccone about 9 years 3 months ago

Thanks, if it helped please rate the post.


Bye

Alberto

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
agiaccone Mon, 04/14/2008 - 09:00
User Badges:
  • Bronze, 100 points or more

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




tomide_ccie Mon, 04/14/2008 - 11:49
User Badges:

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

msabir Mon, 04/14/2008 - 12:25
User Badges:
  • Bronze, 100 points or more

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

tomide_ccie Mon, 04/14/2008 - 15:18
User Badges:

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.

agiaccone Mon, 04/14/2008 - 23:58
User Badges:
  • Bronze, 100 points or more

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



tomide_ccie Tue, 04/15/2008 - 06:58
User Badges:

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?


agiaccone Tue, 04/15/2008 - 08:25
User Badges:
  • Bronze, 100 points or more

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











tomide_ccie Wed, 04/16/2008 - 05:14
User Badges:

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




tomide_ccie Wed, 04/16/2008 - 05:23
User Badges:

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.

msabir Wed, 04/16/2008 - 05:31
User Badges:
  • Bronze, 100 points or more

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.

agiaccone Wed, 04/16/2008 - 05:59
User Badges:
  • Bronze, 100 points or more

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





tomide_ccie Wed, 04/16/2008 - 07:14
User Badges:

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


agiaccone Wed, 04/16/2008 - 07:53
User Badges:
  • Bronze, 100 points or more

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




Attachment: 
tomide_ccie Wed, 04/16/2008 - 09:54
User Badges:

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

Correct Answer
agiaccone Thu, 04/17/2008 - 02:12
User Badges:
  • Bronze, 100 points or more

Thanks, if it helped please rate the post.


Bye

Alberto

ROY SPIRK Tue, 09/09/2008 - 08:40
User Badges:

This information helped me too. However my customer would like to see

NewCall

Redial

Exit

As the button selection during the idle logo display. Is this possible? I have not found the softkey: command that works for the first two items.

This is what I have currently and it is not working


New Call

SoftKey:NewCall

1


Thanks.

Actions

This Discussion