AddMenuItem

Metreos.Native.CiscoIpPhone.AddMenuItem

Summary

AddMenuItem adds a menu item to an already-initialized Menu, IconMenu, IconFileMenu, GraphicMenu, or GraphicFileMenu XML object.

Usage

AddMenuItem is a multi-purpose action which is used in different ways based on which XML object type it is being used to augment. The reason is that a MenuItem has different meaning depending on which context, and more specifically, which XML object it is being used on. The following is a list of which action parameters are of interest based on which XML object is being augmented with AddMenuItem.:

  • Menu XML objects respect the Name and URL action parameters.
  • IconMenu XML objects respect the Name, URL, and IconIndex action parameters.
  • IconFileMenu XML objects respect the Name, URL, and IconIndex action parameters.
  • GraphicMenu XML objects respect the Name and URL action parameters.
  • GraphicFileMenu XML objects respect the Name, URL, TouchAreaX1, TouchAreaX2, TouchAreaY1, and TouchAreaY2 action parameters.

Remarks

This action does not communicate with a Cisco IP Phone; it only formats XML specific to the schema defined by the Cisco IP Phones that support Cisco IP Phone XML Services. Later in the script the XML object stored in a variable can be sent to the phone with either SendResponse or SendExecute.

Action Parameters
Parameter Name.NET TypeDefaultDescription
IconIndexSystem.UInt16An index into the list of icon items to indicate which icon should be shown next to this menu item. This field is valid only when used with a IconMenu or IconFileMenu XML object.
NameSystem.StringThe name of the menu item. This field is displayed with a menu or an icon menu XML object. With a graphic menu or graphic file menu, it is used as the title of the subsequent XML screen if the item is selected and if the subsequent screen does not specify a title. This field is valid with Menu, IconMenu, IconFileMenu, GraphicMenu, and GraphicFileMenu.
URLSystem.StringThe URL that the phone will request if this menu item is selected. This field is valid with Menu, IconMenu, IconFileMenu, IconFileMenu, GraphicMenu, and GraphicFileMenu.
Format URLSystem.BooleantrueIndicates that URL format validation should be performed on the URL specified. This may involve modifications being made to the URL.
TouchAreaX1System.Int16The left side of the touch area associated with this menu item. This field is valid only when used with a GraphicFileMenu XML object and with phones that have touch-sensitive displays (in pixels).
TouchAreaX2System.Int16The right side of the touch area associated with this menu item. This field is valid only when used with a GraphicFileMenu XML object and with phones that have touch-sensitive displays (in pixels).
TouchAreaY1System.Int16The top side of the touch area associated with this menu item. This field is valid only when used with a GraphicFileMenu XML object and with phones that have touch-sensitive displays (in pixels).
TouchAreaY2System.Int16The bottom side of the touch area associated with this menu item. This field is valid only when used with a GraphicFileMenu XML object and with phones that have touch-sensitive displays (in pixels).
Result Data
Parameter Name.NET TypeDescription
ResultDataMetreos.Types.CiscoIpPhone.CiscoIPPhoneMenuItemTypeOne must always save this result data into one of the following: a Menu, IconMenu, IconFileMenu, GraphicMenu, or GraphicFileMenu XML type variable

Branch Conditions 

Success

No description.

Failure

No description.