Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Handset Variable

The $Handset variable provides information regarding how the handset is configured the following properties are available:

Method Result Description
getHandsetProperty(key) HandsetProperty Returns the Handset Property associated with the give key.
getHandsetProperties() HashMap<String, HandsetProperty> Returns a hashmap of all handset properties associated with this handset.
getIteratorForPrefix(String keyPrefix) Iterator<String> Returns an iterator containing all of the keys which match the given prefix.
existsProperty(key) boolean Returns true if the given handset property exists.

HandsetProperty

The HandsetProperty object provides details of a property which has been associated with the handset via the Handset UI.

A HandsetProperty contains the following methods

String getKey() - the key to the property

String getValue() - the value associated with the key

String getValue2() - the value associated with the key

String getValue3() - the value associated with the key

String getValue4() - the value associated with the key

String getValue5() - the value associated with the key

String getType() - the type of the key. The supported types are 'Dial and Status' and 'Other'.

Using the property Iterator

This example shows how to program the yealink memory keys using properties.

 
#set($propIter = $Handset.getIteratorForPrefix("Button"))
#foreach ($key in $propIter)
    #set($handsetProperty = $Handset.getHandsetProperty($key))
    #set($button = $handsetProperty.getValue())
    #set($extension = $handsetProperty.getValue2())
    memorykey.${button}.line = 1
    memorykey.${button}.type = 16
    memorykey.${button}.pickup_value = $extension
    memorykey.${button}.value = $extension
#end
  • No labels