HTTP Requests and Header Settings

  • Cisco Unified IP Phones use HTTP to communicate to external applications
  • How HTTP client requests are handled (HTTP GET): Page 65
  • How HTTP server requests are handled (HTTP POST): Page 66
  • Any HTTP POST object is limited to 512 bytes in size. Larger objects (such as images) can only be delivered to the phone via HTTP GET. So, to push large objects to the phone, the server application must take an indirect approach. To do this, push an Execute object to the phone that contains an ExecuteItem pointing to the URL of the large object
  • The HTTP headers that are sent with any page from an HTTP server can include a Refresh setting. This setting comprises two parameters: a time in seconds and a URL. These two parameters direct the recipient to wait the time given in the seconds parameter and then get the data to which the URL points

Internal URI Features

  • Internal uniform resource identifiers (URIs) provide access to embedded phone features such as placing calls, playing audio files, and invoking built-in object features
  • The Key URI allows a programmer to send an event that a key has been pressed. The system initiates the event as if the button was physically pressed
  • Note that when buttons are pressed with this method, if the button is not present on the phone (hard button) or not available (softkey) when the URI is processed, the event is discarded
  • Verify available softkeys by using the QA web pages that the phones web server provides to indicate the active softkey set
  • URIs for Pressing Buttons on the Phone: page 47
  • URIs for Invoking Softkey Functionality: page 48
  • Table of Valid Softkey Actions for CiscoIPPhoneObject Types: page 49
  • The QueryStringParam URI allows an application developer to collect more information from the user with less interaction. When the user performs an action with a softkey, you can either append a query string parameter to the URL of the highlighted MenuItem or append the query string parameter from the MenuItem to the URL of the softkey
  • The CiscoIPPhoneMenu object includes two MenuItems with QueryStringParam URIs. If the user chooses the MenuItem(s) with the numeric keypad, the cursor moves to that entry, but nothing executes because the values are QueryStringParam URIs
  • How to add QueryStringParam URI in a CiscoIPPhoneMenu object: page 50
  • Using the QueryStringParam URI reduces the size of the XML objects that you generate by not having to repeat redundant portions of a URL in every MenuItem
  • RTP is used to send void/video
  • Init: The Init URI allows an application to initialize a feature or data with the argument that is passed with the URI
  • Dial: The Dial URI initiates a new call to a specified number
  • EditDial: The EditDial URI initiates a new call to a specified number.
    • The EditDial URI invokes when it is contained in a menu item and the menu item is highlighted
  • Play: The Play URI downloads an audio file from the TFTP server and plays through the phone speaker
    • The Play URI is a synchronous request. If the request is pushed to the phone via HTTP, the HTTP response (CiscoIPPhoneResponse object) is not returned until after the playback has completed

untitled

  • Using the Display URI, you can control how long the backlight remains on or off

Overview & Cisco IP Phone XML Objects

  • This article was written from book in the following url: Cisco Unified IP Phone Services Application Development Notes Release 6.0
  • Users access these features using the services and directories buttons or menu
  • When a menu selection is made, the Cisco Unified IP Phone acts on it by using its HTTP client to load a specific URL. The return type from this URL can be plain text or one of the CiscoIPPhone XML objects. The object loads and the user interacts with the object
  • HTML Disclaimer: Phone service developers must take into consideration that the phone is not a web browser and cannot parse HTML. Although content is delivered to the phone through HTTP messages by using a web server, keep in mind that the content is not HTML. All content comes either as plain text or packaged in proprietary XML wrappers
  • Appropriate behavior of IP Phone depends solely on the type of data that has been delivered in the page
  • The following sections provide definitions and descriptions of each CiscoIPPhone XML object:
    • CiscoIPPhoneMenu (See XML Definition page 20):
      • A menu on the phone comprises a list of text items, one per line
      • Cisco Unified IP Phones allow a maximum of 100 MenuItems. Each MenuItem includes a Name and an associated URL
      • After the user chooses a menu option, the phone generates an HTTP request for the page with the URL or executes the uniform resource identifiers (URIs) that are associated with the menu item
    • CiscoIPPhoneText (See XML Definition page 21)::
      • Displays ordinary 8-bit ASCII text on the phone display. The <Text> message must not contain any control characters, except for carriage returns, line feeds, and tabs
      • Note: Cisco Unified IP Phones support the full ISO 8859-1 (Latin 1) and Shift_JIS character sets
      • Non-XML Text: Here we  only describes the supported CiscoIPPhone XML objects. You can also deliver plain text via HTTP. Pages that are delivered as MIME type text/html behave exactly the same as XML pages of type CiscoIPPhoneText. One important difference is that you cannot include a title or prompt
    • CiscoIPPhoneInput (See XML Definition page 22)::
      • When a Cisco Unified IP Phone receives an XML object of type CiscoIPPhoneInput, it constructs an input form and displays it. The user then enters data into each input item and sends the parameters to the target URL
      • The InputItem tag delimits each item in the list. The number of InputItems must not exceed five
      • Table of InputFlags Attribute:

image

  • CiscoIPPhoneDirectory (See XML Definition page 24)::
    • See this sample:

image

  • CiscoIPPhoneImage(See XML Definition page 25):
    • The CiscoIPPhoneImage provides a bitmap display with a 133 x 65 pixel pane that is available to access services. Each pixel includes four grayscale settings. A value of three (3) displays as black, and a value of zero (0) displays as white
    • Setting the X and Y location values to (-1, -1) centers the graphic in the services pane of the phone display
    • Unified IP Phones support a maximum value of 2. A bit depth of 1 is black and white
    • If the number of pixels to be displayed does not represent an even multiple of four, pad the end of the pixel data with blank (zero value) pixels, so the data is packed correctly. The phone ignores the padded data
  • CiscoIPPhoneImageFile (See XML Definition page 30):
    • The Cisco Unified IP Phone 7970, for example, has a display area of 298×168 pixels available to the Services pane and renders images in 12-bit color
    • The CiscoIPPhoneImageFile object behaves like the CiscoIPPhoneImage object, except for the image data. Instead of using the <Data> tag to embed the image data, the <URL> tag points to the PNG image file.
  • CiscoIPPhoneGraphicMenu (See XML Definition page 30):
    • Graphic menus serve the same purpose as text menus: they allow a user to select a URL from a list. Use graphic menus in situations when the items may not be easy to display in a text list
  • CiscoIPPhoneGraphicFileMenu (See XML Definition page 32):
    • CiscoIPPhoneGraphicFileMenu = CiscoIPPhoneGraphicMenu + Touch Area

image

  • Z-Order Images for better feeling (page 32)
  • CiscoIPPhoneIconMenu (See XML Definition page 33):
    • Text menu + a black/white visual image
  • CiscoIPPhoneIconFileMenu (See XML Definition page 34):
    • Text menu + a colored visual image
  • CiscoIPPhoneStatus (See XML Definition page 36):
  • untitled

    • How to automatically adjust object to screen size (page 37)
    • CiscoIPPhoneStatusFile (See XML Definition page 39):
    • CiscoIPPhoneExecute (See XML Definition page 39):
      • Used to execute requests to phone
      • Limit the requests to three ExecuteItems: only one can be a URL and two URIs per CiscoIPPhoneExecute object, or you can send three URIs with no URL.

    untitled

    • CiscoIPPhoneResponse (See XML Definition page 41):
      • The CiscoIPPhoneResponse object items provide messages and information resulting from CiscoIPPhoneExecute
      • The Status attribute specifies a status code. Zero indicates that no error occurred during processing of the ExecuteItem. If an error occurred, the phone returns a CiscoIPPhoneError object
    • CiscoIPPhoneError (See XML Definition page 41):
      • See errors codes page 4
  • Cisco Unified IP Phones can use custom softkeys with any of the displayable CiscoIPPhone XML objects, excluding the CiscoIPPhoneStatus object which cannot control softkeys and the CiscoIPPhoneExecute object which is not displayable.
  • See Softkey XML Definition page 42
  • If any custom softkeys are defined in the XML object, then all default softkeys are removed from that object. To retain default softkey behavior, then you must explicitly define it in the XML object using a <SoftKeyItem> tag. The internal Softkey URIs can be used in the <URL> tag of <SoftKeyItem> to invoke default softkey actions from custom softkeys
  • The XML parser in Cisco Unified IP Phones does not function as a fully capable XML parser. Do not include any tags other than those defined in your XML display definitions.
  • Since the phone firmware can support multiple encodings, the XML encoding should always be set in the XML header.
    If the XML encoding header is not specified, the phone will default to the encoding specified by the current user locale
  • The encoding value specified in the XML header must match one of the encodings provided by the IP Phone in its Accept-Charset HTTP request header
  • Overview of How to Deployment IP Phone

    • IP Phone:

        An IP phone uses Voice over IP technologies allowing telephone calls to be made over an IP network such as the internet instead of the ordinary PSTN system. Calls can traverse the Internet, or a private IP Network such as that of a company. The phones use control protocols such as Session Initiation Protocol, Skinny Client Control Protocol or one of various proprietary protocols such as that used by Skype. IP phones can be simple software-based Softphones or purpose-built hardware devices that appear much like an ordinary telephone or a cordless phone. There also exist the possibility to reuse ordinary PSTN phones as IP phones, with analog telephony adapters (ATA).

        It may have many features an analog phone doesn’t support, such as e-mail-like IDs for contacts that may be easier to remember than names or phone numbers.

    • Power Over Ethernet (PoE):
      • Device that supplies IP Phones with power & internet
    • The most popular IP Phone is 7970
    • Voice/Text Paging:
      • Concept of sharing your voice with all of peers in your network
    • on of the formats that are working on IP Phone 7970G  is .war (Web Application Archive) format
    • Requirements to Application to work:

    100px-Tomcat

    • SQL Server 2005
    • JDK
    • IIS
  • Call Manager:
    • Cisco Unified Communications Manager (CUCM), formerly Cisco Unified CallManager and Cisco CallManager (CCM), is a software-based call-processing system developed by Cisco Systems.

      CUCM tracks all active VoIP network components; these include phones, gateways, conference bridges, transcoding resources, and voicemail boxes among others. CallManager often utilizes the Skinny Client Control Protocol (SCCP) as a communications protocol for signaling the hardware endpoints of the system, such as IP Phones. H.323, Media Gateway Control Protocol (MGCP) or Session Initiation Protocol (SIP) is used to pass call signaling to gateways

  • IP Phone
  • All of the previous components should be in one VLAN
    • VLAN:
      • A virtual LAN, commonly known as a VLAN, is a group of hosts with a common set of requirements that communicate as if they were attached to the Broadcast domain, regardless of their physical location. A VLAN has the same attributes as a physical LAN, but it allows for end stations to be grouped together even if they are not located on the same network switch. Network reconfiguration can be done through software instead of physically relocating devices
  • Port 8080 is used by HTTP and Web Services and port 8442 is used by SQL Server (Not sure from this info)
  • Chart that’s demonstrates architecture of 3 components together:
  • image

    • IP Phones recognizes XML only
    • Tomcat installs the .war files (placed in specified directory) automatically when it starts
    • To make an IP Phone recognizes an application you should subscribe this application in this phone configuration via Call Manager
    • Call Manager IP Address: 192.168.33.90
      • Username: administrator
      • Password: metreos1
    • Our Call Manager version is CUCM 6
    • Web Admit is a tool for configuring Call Manager settings easily
    • Call Manager Essential Parts:
    • Device –> Phone: here you can search and add new IP Phone device
      • Here also you can subscribe/unsubscribe applications (via Related links then choose subscribe)
    • Device Set –> Device Services
    • User Management: adding new user, edit users