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. And see here for current known issues.

New Member

Clock fo IP Phone

Hiii,

When I installed the SDK 4.1, and I configure the idle to use the clock application, it is working fine, but the users did not need to press close softkey to start dailing. The want to start dailing as usual. For example 9 for outside dialing or any number for internal.

Is there is any code to add  it to the application to do that:

the code as follow:

<%@ Language=JavaScript %>
<%
///////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Title:    Clock
// Author:   bsedgley
// Source File(s):   clock.asp
//
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Description:
//
// Creates a large, 7-segment clock on the IP phone display - perfect for conference rooms and shared areas
// where you always want a clock handy. Meant to be used as an Idle URL Service.
//
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Requirements and Caveats:
//
// - Client: IP Phone (XML services browser)
//
// - Required COM Servers: None
//
///////////////////////////////////////////////////////////////////////////////////////////////////////

Response.ContentType = "text/xml";
Response.AddHeader("Refresh", "5;");

var today = new Date()
    var hours = today.getHours()
    var minutes = today.getMinutes()
    var greeting
    var ampm
    var font = new Array();
var temp = new Array();
var image = new Array();
var number = "0";
var Length = 132

    if (hours <= 11) {
        greeting = "Good morning!"
        ampm="a.m."
      
            if (hours == 0) {
            hours = 12
        }
    }
   
    else if (hours > 11 && hours < 18) {
        greeting = "Good afternoon!"
        ampm="p.m."

        if (hours > 12) {
            hours-=12
        }
    }
    else if (hours > 17 && hours < 21) {
        greeting = "Good evening!"
        ampm="p.m."
        hours-=12
    }
    else if (hours > 20) {
        greeting = "Good night!"
        ampm="p.m."
        hours-=12
    }

    if (minutes < 10) {
        minutes = "0" + minutes
    }
     if (hours < 10) {
        hours = " " + hours
    }
   
   
number = String(hours)+ ":" + String(minutes);

font[0] = "0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F3FFFFFFFFCF00:C0CFFFFFFFFFF303:C03FFFFFFFFFFC03:C0FFFCFFFF3FFF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:00FF00000000FF00:003C000000003C00:0000000000000000:0000000000000000:003C000000003C00:00FF00000000FF00:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FFFCFFFF3FFF03:C03FFFFFFFFFFC03:C0CFFFFFFFFFF303:00F3FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[1] = "0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:000000000000C000:000000000000F003:000000000000FC03:000000000000FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:000000000000FF00:0000000000003C00:0000000000000000:0000000000000000:0000000000003C00:000000000000FF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:000000000000FF03:000000000000FC03:000000000000F003:000000000000C000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[2] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F0FFFFFFFFCF00:00C0FFFFFFFFF303:0000FFFFFFFFFC03:0000FCFFFF3FFF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000FCFFFF3FFF00:0000FFFFFFFF3C00:00C0FFFFFFFF0300:00C0FFFFFFFF0300:003CFFFFFFFF0000:00FFFCFFFF3F0000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FFFCFFFF3F0000:C03FFFFFFFFF0000:C0CFFFFFFFFF0300:00F3FFFFFFFF0F00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000";
font[3] = "0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F0FFFFFFFFCF00:00C0FFFFFFFFF303:0000FFFFFFFFFC03:0000FCFFFF3FFF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000FCFFFF3FFF00:0000FFFFFFFF3C00:00C0FFFFFFFF0300:00C0FFFFFFFF0300:0000FFFFFFFF3C00:0000FCFFFF3FFF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000FCFFFF3FFF03:0000FFFFFFFFFC03:00C0FFFFFFFFF303:00F0FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[4] = "0000000000000000:0000000000000000:0000000000000000:0000000000000000:000300000000C000:C00F00000000F003:C03F00000000FC03:C0FF00000000FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:00FFFCFFFF3FFF00:003CFFFFFFFF3C00:00C0FFFFFFFF0300:00C0FFFFFFFF0300:0000FFFFFFFF3C00:0000FCFFFF3FFF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:000000000000FF03:000000000000FC03:000000000000F003:000000000000C000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[5] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F3FFFFFFFF0F00:C0CFFFFFFFFF0300:C03FFFFFFFFF0000:C0FFFCFFFF3F0000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:00FFFCFFFF3F0000:003CFFFFFFFF0000:00C0FFFFFFFF0300:00C0FFFFFFFF0300:0000FFFFFFFF3C00:0000FCFFFF3FFF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000FCFFFF3FFF03:0000FFFFFFFFFC03:00C0FFFFFFFFF303:00F0FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000";
font[6] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F3FFFFFFFF0F00:C0CFFFFFFFFF0300:C03FFFFFFFFF0000:C0FFFCFFFF3F0000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:C0FF030000000000:00FFFCFFFF3F0000:003CFFFFFFFF0000:00C0FFFFFFFF0300:00C0FFFFFFFF0300:003CFFFFFFFF3C00:00FFFCFFFF3FFF00:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FFFCFFFF3FFF03:C03FFFFFFFFFFC03:C0CFFFFFFFFFF303:00F3FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000";
font[7] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F0FFFFFFFFCF00:00C0FFFFFFFFF303:0000FFFFFFFFFC03:0000FCFFFF3FFF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:000000000000FF00:0000000000003C00:0000000000000000:0000000000000000:0000000000003C00:000000000000FF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:000000000000FF03:000000000000FC03:000000000000F003:000000000000C000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[8] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F3FFFFFFFFCF00:C0CFFFFFFFFFF303:C03FFFFFFFFFFC03:C0FFFCFFFF3FFF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:00FFFCFFFF3FFF00:003CFFFFFFFF3C00:00C0FFFFFFFF0300:00C0FFFFFFFF0300:003CFFFFFFFF3C00:00FFFCFFFF3FFF00:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FFFCFFFF3FFF03:C03FFFFFFFFFFC03:C0CFFFFFFFFFF303:00F3FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000";
font[9] = "0000000000000000:0000000000000000:0000000000000000:00F0FFFFFFFF0F00:00FCFFFFFFFF3F00:00F3FFFFFFFFCF00:C0CFFFFFFFFFF303:C03FFFFFFFFFFC03:C0FFFCFFFF3FFF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:C0FF030000C0FF03:00FFFCFFFF3FFF00:003CFFFFFFFF3C00:00C0FFFFFFFF0300:00C0FFFFFFFF0300:0000FFFFFFFF3C00:0000FCFFFF3FFF00:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000000000C0FF03:0000FCFFFF3FFF03:0000FFFFFFFFFC03:00C0FFFFFFFFF303:00F0FFFFFFFFCF00:00FCFFFFFFFF3F00:00F0FFFFFFFF0F00:0000000000000000:0000000000000000:0000000000000000";
font[10] = "0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000";
font[11] = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00:00:00:00:00";

for (var i = 0; i < number.length; i++)

{
    var Char = String(number.charAt(i));
  
if (Char == " " ) {
        Char = "10"
    }
    if (Char == ":" ) {
        Char = "11"
    }
     var TotalChar = TotalChar +" "+ Char;

temp = String(font[Char]).split(":");

for (var ii = 0; ii < 64; ii++)
{
  if (String(image[ii]) == "undefined")
  {
   image[ii] = "";
  }
  image[ii] = String(image[ii]) + String(temp[ii]);
}
}

%>
<CiscoIPPhoneImage>
<Depth>2</Depth>
<Width><% =  Length %></Width>
<Height>64</Height>
<LocationX>-1</LocationX>
<LocationY>-1</LocationY>
<Data><% = image.join("")%></Data>
<Prompt><% = greeting%></Prompt>

<SoftKeyItem>
<Name>Clos</Name>
<URL>SoftKey:Exit</URL>
<Position>3</Position>
</SoftKeyItem>

</CiscoIPPhoneImage>

181
Views
0
Helpful
0
Replies