Tuesday, April 21, 2009

Cisco IPPhoneDirectory Exit softkey functionality

See http://webmaxtor.blogspot.com/2009/04/cisco-ciscoipphonedirectory-with-next.html regarding basic XML formatting and Next / URL softkey implementation.

The problem you will find is once you start paging through multiple directories, the Exit softkey will return you to the previous directory page, rather than the phone's Services menu. To make the Exit key actually exit the service you need to use a response.expires header. Below is an example of an ASP page implementing the header and presenting the XML appropriately.

### sample starts here ###

<% Response.Expires = -1 %>

<%

response.ContentType="text/xml"
response.Write("<?xml version='1.0' encoding='ISO-8859-1'?>")

response.Write("<CiscoIPPhoneDirectory>")
response.Write("<Title>Super Directory</Title>")
response.Write("<Prompt>Super Directory</Prompt>")

response.Write("<DirectoryEntry>")
response.Write("<Name>Test Local Number</Name>")
response.Write("<Telephone>95551212</Telephone>")
response.Write("</DirectoryEntry>")

response.Write("<DirectoryEntry>")
response.Write("<Name>Other Test Number</Name>")
response.Write("<Telephone>95551000</Telephone>")
response.Write("</DirectoryEntry>")

response.Write("<SoftKeyItem>")
response.Write("<Name>Dial</Name>")
response.Write("<URL>SoftKey:Dial</URL>")
response.Write("<Position>1</Position>")
response.Write("</SoftKeyItem>")

response.Write("<SoftKeyItem>")
response.Write("<Name>EditDial</Name>")
response.Write("<URL>SoftKey:EditDial</URL>")
response.Write("<Position>2</Position>")
response.Write("</SoftKeyItem>")

response.Write("<SoftKeyItem>")
response.Write("<Name>Next Page</Name>")
response.Write("<URL>http://mywebserver/CiscoIPPhoneDirectory.asp</URL>")
response.Write("<Position>3</Position>")
response.Write("</SoftKeyItem>")

response.Write("<SoftKeyItem>")
response.Write("<Name>Exit</Name>")
response.Write("<URL>SoftKey:Exit</URL>")
response.Write("<Position>4</Position>")
response.Write("</SoftKeyItem>")

response.Write("</CiscoIPPhoneDirectory>")

%>

### sample ends here ###

1 comment:

  1. It doesn't work for me, on Cisco SPA 303 phone with the latest firmware it still behave as "previous".

    ReplyDelete