Vous êtes sur la page 1sur 182

jfqbi=

eqji=q==
=

m~=o=d=
o~=OKM=
=

HTML Toolkit Programmers Reference Guide

NOTICE
The information contained in this document is believed to be accurate in all respects but is not
warranted by Mitel Networks Corporation (MITEL). The information is subject to change without
notice and should not be construed in any way as a commitment by Mitel or any of its affiliates or
subsidiaries. Mitel and its affiliates and subsidiaries assume no responsibility for any errors or
omissions in this document. Revisions of this document or new editions of it may be issued to
incorporate such changes.
No part of this document can be reproduced or transmitted in any form or by any means - electronic
or mechanical - for any purpose without written permission from Mitel Networks Corporation.

TRADEMARKS
Mitel is a registered trademark of Mitel Networks Corporation.
Other product names mentioned in this document may be trademarks of their respective companies
and are hereby acknowledged.

InGenius Software Inc., 2005-2006.


All rights reserved. INGENIUS SOFTWARE CONFIDENTIAL
Portions of these specifications are owned by and confidential information of InGenius Software Inc.
and are protected by copyright and other laws and international treaties. No part of these
specifications may be used, reproduced or distributed without the prior written permission of InGenius
Software Inc. http://www.telml.com/mitel

Mitel HTML Toolkit Programmers Reference


Release 2.0
June 2009

, Trademark of Mitel Networks Corporation


Copyright 2009, Mitel Networks Corporation
All rights reserved

ii

Table of Contents

INTRODUCTION ....................................................................................................... 1
What Has Changed in Release 2.0 ..................................................................................... 1

PROGRAMMERS API.............................................................................................. 2
Browser Request API .......................................................................................................... 3
Debugging API Tools........................................................................................................... 3
HTML App Programmers API .............................................................................................. 3
TelML Collections, Objects and Functions Overview .......................................................... 4
TelML Definition - Common Elements ................................................................................. 4
Objects ............................................................................................................................................ 4
Collections....................................................................................................................................... 5
Item.................................................................................................................................................. 5
Count()............................................................................................................................................. 5
BuildTable() ..................................................................................................................................... 5
BuildTable Variables ....................................................................................................................... 5
Example........................................................................................................................................... 6
IsSupported()................................................................................................................................... 6

Detailed Listing of TelML Collections and Objects ............................................................ 11


Application Data Collection................................................................................................ 11
IsSupported()................................................................................................................................. 11
Item() ............................................................................................................................................. 12
Count( ).......................................................................................................................................... 14
Delete().......................................................................................................................................... 15
AddItem()....................................................................................................................................... 17
QueryMemory() ............................................................................................................................. 18
QueryKey() .................................................................................................................................... 19
BuildTable( ) .................................................................................................................................. 21

Permanent Application Data Collection ............................................................................. 22


IsSupported()................................................................................................................................. 22
Item() ............................................................................................................................................. 23
Count( ).......................................................................................................................................... 25
Delete().......................................................................................................................................... 26
AddItem()....................................................................................................................................... 28
QueryMemory() ............................................................................................................................. 29
QueryKey() .................................................................................................................................... 30
BuildTable( ) .................................................................................................................................. 32

Application Data Item......................................................................................................... 33


IsSupported()................................................................................................................................. 33

iii

HTML Toolkit Programmers Reference Guide


GetValue() ..................................................................................................................................... 34
SetValue() ..................................................................................................................................... 35
GetKey() ........................................................................................................................................ 36
GetIndex() ..................................................................................................................................... 37
GetSize() ....................................................................................................................................... 38

Button Collection................................................................................................................ 39
Classification of Buttons and Keys................................................................................................ 39
Button Attributes............................................................................................................................ 39
Button Attribute: Name .................................................................................................................. 39
Button Attribute: Telephony Name ................................................................................................ 40
Button Attribute: Label................................................................................................................... 40
Button Attribute: Function.............................................................................................................. 40
Button Attribute: Function Associated Data ................................................................................. 43
Button Attribute: Programmability on the PBX .............................................................................. 43
Button Attribute: Index................................................................................................................... 43
Button Attribute: Hardware ID Code.............................................................................................. 44
Button Attribute: Associated LED Hardware ID Code................................................................... 44
Button Attribute: AutoEvent Type.................................................................................................. 44
Button Attribute: AutoEvent Associated Data ............................................................................... 44
Button Attribute: Relative Position................................................................................................. 44

Button Attribute Listings..................................................................................................... 45


Hard Key Button Attributes............................................................................................................ 45
Softkey Attributes 5330 Set........................................................................................................... 46
Programmable Key Attributes 5330 Set........................................................................................ 46
Softkey Attributes 5340 Set........................................................................................................... 50
Programmable Key Attributes 5340 Set........................................................................................ 50
IsSupported()................................................................................................................................. 56
Item() ............................................................................................................................................. 57
Count( ).......................................................................................................................................... 59
ClearAutoEvents( ) ........................................................................................................................ 60
BuildTable( ) .................................................................................................................................. 61
RelativePosition( ) ......................................................................................................................... 62
RegisterKeyGroup( ) ..................................................................................................................... 64
DeregisterKeyGroup( ) .................................................................................................................. 65
SetPressReporting( )..................................................................................................................... 66
SetReleaseReporting( )................................................................................................................. 67
GetPressReporting( ) .................................................................................................................... 68
GetReleaseReporting( ) ................................................................................................................ 69

Button Item ........................................................................................................................ 70


IsSupported()................................................................................................................................. 70
GetKeyName( ) ............................................................................................................................. 71
GetTelephonyKeyName( )............................................................................................................. 72
GetLabel( ) .................................................................................................................................... 73

iv

HTML Toolkit Programmers Reference Guide


GetFunction( ) ............................................................................................................................... 74
GetAssociatedNumber( )............................................................................................................... 75
GetIsProgrammable( )................................................................................................................... 76
GetIndex( ) .................................................................................................................................... 77
GetNumber( ) ................................................................................................................................ 78
GetAssociatedLamp( )................................................................................................................... 79
GetAutoEventType( )..................................................................................................................... 80
GetAutoEventIDKeyCode( ) .......................................................................................................... 81
Press( ) .......................................................................................................................................... 82
SetButtonFunction() ...................................................................................................................... 83
SetAutoEvent( ) Type 1 HTML AutoEvent ................................................................................. 84
SetAutoEvent( ) Type 2 Browser Keystroke Auto Event............................................................ 85
SetAutoEvent( ) Type 3 Phone Keystroke Auto Event............................................................... 87
ClearAutoEvent( ).......................................................................................................................... 88
GetRelativePosition( ) ................................................................................................................... 89
RegisterKey( ) ............................................................................................................................... 90
DeregisterKey( ) ............................................................................................................................ 91

Lamp Collection ................................................................................................................. 92


Lamp Attributes ............................................................................................................................. 92
Lamp Attribute: Name ................................................................................................................... 92
Lamp Attribute: Telephony Name ................................................................................................. 92
Lamp Attribute: State..................................................................................................................... 93
Lamp Attribute: Telephony State................................................................................................... 94
Lamp Attribute: Telephony Color .................................................................................................. 94
Lamp Attribute: Color .................................................................................................................... 94
Lamp Attribute: Index .................................................................................................................... 94
Lamp Attribute: Hardware ID Code .............................................................................................. 95
Lamp Attribute: Relative Position .................................................................................................. 95
IsSupported()................................................................................................................................. 96
Item() ............................................................................................................................................. 97
RelativePosition( ) ......................................................................................................................... 99
Count( )........................................................................................................................................ 100
BuildTable( ) ................................................................................................................................ 101

Lamp Item........................................................................................................................ 102


IsSupported()............................................................................................................................... 102
GetLampName( )......................................................................................................................... 103
GetTelephonyLampName( )........................................................................................................ 104
GetColor().................................................................................................................................... 105
SetColor() .................................................................................................................................... 106
GetState().................................................................................................................................... 107
SetState() .................................................................................................................................... 108
GetTelephonyState() ................................................................................................................... 109
GetTelephonyColor()................................................................................................................... 110

HTML Toolkit Programmers Reference Guide


GetIndex( ) .................................................................................................................................. 111
GetNumber( ) .............................................................................................................................. 112
GetRelativePosition( ) ................................................................................................................. 113

Lines Collection ............................................................................................................... 115


IsSupported()............................................................................................................................... 115
Item() ........................................................................................................................................... 116
Count()......................................................................................................................................... 117
BuildTable() ................................................................................................................................. 118

LineItem ........................................................................................................................... 119


IsSupported()............................................................................................................................... 119
GetIndex() ................................................................................................................................... 120
GetDirectoryNumber() ................................................................................................................. 121
GetDirectoryNumberURI()........................................................................................................... 122
GetIsPrime() ................................................................................................................................ 123
IsLineStateSupported() ............................................................................................................... 124
IsLineEventSupported()............................................................................................................... 125
AnswerCall()................................................................................................................................ 126
ClearCall() ................................................................................................................................... 127
DialDigits()................................................................................................................................... 128
MakeCall() ................................................................................................................................... 129

TextDisplay Collection ..................................................................................................... 130


IsSupported()............................................................................................................................... 130
Item() ........................................................................................................................................... 131
Count()......................................................................................................................................... 132
GetWidth() ................................................................................................................................... 133

Browser Object ................................................................................................................ 134


IsSupported()............................................................................................................................... 134
InjectEvent() ................................................................................................................................ 135
GetUseBuiltInControls() .............................................................................................................. 137
SetUseBuiltInControls()............................................................................................................... 137
Hide()........................................................................................................................................... 138
Close() ......................................................................................................................................... 139

Display Object.................................................................................................................. 140


IsSupported()............................................................................................................................... 140
GetWidth() ................................................................................................................................... 141
GetHeight().................................................................................................................................. 142
GetDepth()................................................................................................................................... 143
GetContrast()............................................................................................................................... 144
SetContrast() ............................................................................................................................... 145
GetContrastMax()........................................................................................................................ 146
GetBrightness() ........................................................................................................................... 147
SetBrightness()............................................................................................................................ 148

vi

HTML Toolkit Programmers Reference Guide


GetBrightnessMax() .................................................................................................................... 149
GetIdleBrightness() ..................................................................................................................... 150
SetIdleBrightness()...................................................................................................................... 151
GetTextSize() .............................................................................................................................. 152

LowLevel Object .............................................................................................................. 153


IsSupported()............................................................................................................................... 153
GetModelNumber()...................................................................................................................... 154
GetPhoneMAC().......................................................................................................................... 155
GetFirmwareVersion() ................................................................................................................. 156
GetPhoneMode()......................................................................................................................... 157
GetPhoneLanguage().................................................................................................................. 158
GetAvailableLanguageList()........................................................................................................ 159
GetPhoneIPAddress() ................................................................................................................. 160
GetTimeDateFormat() ................................................................................................................. 161
GetTimeDate()............................................................................................................................. 162

Phone Object ................................................................................................................... 163


IsSupported()............................................................................................................................... 163
GetHookswitch().......................................................................................................................... 164
GetCallInfoEnable()..................................................................................................................... 165
GetCallNotification() .................................................................................................................... 166

ICP Object ....................................................................................................................... 167


GetIPAddress()............................................................................................................................ 167
GetSWVersion() .......................................................................................................................... 168

TelML Events................................................................................................................... 169


Overview ..................................................................................................................................... 169
IsSupported()............................................................................................................................... 170
List of TelML Events.................................................................................................................... 171

List of Tables
Table 1. Button Collection Function" Attribute Values.......................................................................... 41
Table 2. 5330/5340 Hard Key Button Attributes.................................................................................. 45
Table 3. Softkey Attributes 5330 Set.................................................................................................... 46
Table 4. Lamp State Values ................................................................................................................ 93
Table 5. Telephony State Values ........................................................................................................ 94
Table 6. TelML Event List.................................................................................................................. 171

List of Figures
Figure 1. 5330 Key Names Locations ................................................................................................. 48
Figure 2. 5330 Telephony Key Name Locations ................................................................................. 49
Figure 3. 5340 Key Name Locations .................................................................................................... 54
Figure 4. 5340 Telephony Key Name Locations ................................................................................. 55

vii

HTML Toolkit Programmers Reference Guide

viii

HTML Toolkit Programmers Reference Guide

Introduction
This document provides application developers with detailed information about the APIs
available for developing HTML Applications that run on the phones.
For general information about the HTML Toolkit, please refer to the HTML Toolkit
Developers Guide.

What Has Changed in Release 2.0


The javascript window methods open, confirm, and prompt have been removed for both
Release 1.0 and Release 2.0 applications. These commands are now undefined, and will
cause a javascript error if used. Developers are encouraged to write their own replacement
versions of these functions to provide similar functionality.
The javascript window methods alert will send a log to the Mitel IPA log tool.
HTTP server authentication is not supported in Release 2.0 of the toolkit. Applications that
access servers which require HTTP authentication should be rewritten in such a way to use a
method that does not depend on HTTP authentication. The phone is capable of using https
which is a secure method of accessing servers.
Applications that use HTML forms with text entry boxes and that make use of the native
controls will no longer have access to the pop-up keyboard. Application writers will need to
adapt their applications to provide a different way to solicit user input. The existing formbased interface can be maintained, and keystrokes can be injected into the fields by using
the Browser.InjectEvent based on user keypresses.
Full support for the lines enumerated in the Lines Collection.
The following APIs have been added or extended:

RequestFullScreenBrowser( )

RequestNewPageBrowser( STRING title )

RequestGraphicalKeyBrowser( )

SpawnFullScreenInstance( )

TelML.Buttons.RelativePosition( NUMBER column, NUMBER row )

TelML.Buttons.RegisterKeyGroup( STRING groupName )

TelML.Buttons.DeregisterKeyGroup( STRING groupName )

TelML.Buttons.Item().GetRelative( )

TelML.Buttons.Item().RegisterKey( )

TelML.Buttons.Item().DeregisterKey( )

TelML.Buttons.GetPressReporting()

TelML.Buttons.SetPressReporting( BOOLEAN setting)

TelML.Buttons.GetReleaseReporting()

TelML.Buttons.SetReleaseReporting( BOOLEAN setting)TelML.Lamps.RelativePosition


( NUMBER column, NUMBER row )

TelML.Display.GetTextSize( )

HTML Toolkit Programmers Reference Guide

TelML.LowLevel.GetAvailableLanguageList( )

TelML.LowLevel.GetPhoneIPAddress( )

TelML.LowLevel.GetTimeDateFormat( )

TelML.LowLevel.GetTimeDate( )

TelML.Phone.GetCallNotification( )

TelML.Phone.GetCallInfoEnable( )

TelML.ICP.GetIPAddress( )

TelML.ICP.GetSWVersion( )

TelMLEvent.OnCallInfoEnableChanged

TelMLEvent.OnTimeDateChanged

TelMLEvent.OnTimeDateFormatChanged

TelMLEvent.OnTextSizeChanged

TelMLEvent.OnCallNotifyChanged

window.alert( STRING message)

The following APIs have been deprecated:

TelML.Browser.GetUseBuiltInControls(NUMBER number)

TelML.Browser.SetUseBuiltInControls( )

window.confirm( STRING prompt )

window.prompt( STRING prompt, STRING defaultValue)

window.open()

Programmers API
The programmer writes applications using HTML 4.01, cascading style sheets (CSS) level 1,
and JavaScript 1.5. There are many public domain descriptions for HTML and JavaScript and
the reader is encouraged to use those as references.
HTML Applications access phone functionality using a provided JavaScript API.

HTML Toolkit Programmers Reference Guide

Browser Request API


The HTML Toolkit requires applications to request a browser in order to display to the user.
If an application does not call the required browser request API before it is completely loaded,
it will be automatically terminated.
The API calls are as follows:
Application Type

Required API Call

Notes

Full Screen Application

RequestFullScreenBrowser()

Full Screen GUI Replacement

RequestFullScreenBrowser()

Screen Saver Application

RequestFullScreenBrowser()

New Page Application

RequestNewPageBrowser(title)

Graphical Key Application

RequestGraphicalKeyBrowser()

Full Screen Application launched


from within Graphical Key
Application

SpawnFullScreenInstance(url)

url is file name of HTML file in same


directory to load

Branding Application

NONE

There are no HTML files associated


with a Branding Application.

Notification Application

RequestFullScreenBrowser()

Only used when application is


invoked.

Title is displayed in the footer area


of the phone application.

Please see the Sample Applications directory from the installed tool chain for examples of
these API calls.

Debugging API Tools


During application development, it is useful to use the debugging API function to output
strings to a Windows based logging tool called IP Phone Analyzer.
To install IP Phone Analyzer, refer to the 3300 ICP Technician's Handbook.
The javascript API is:
window.alert(STRING message)
This allows the user to output a string to the IP Phone Analyzer.
Example:
window.alert("My application just sent this log message");

HTML App Programmers API


The phone functionality API available to HTML applications has been organized by using a
specification called TelML (Telephony Markup Language).

HTML Toolkit Programmers Reference Guide


The TelML API is the definition of a set of collections, objects, functions, variables and events
that are used to add telephony control functionality to a graphical page description language
such as HTML.
The TelML API is accessed using two JavaScript objects. These objects are called TelML
and TelMLEvent. These objects are made available to your application as soon as it is
launched.

TelML Collections, Objects and Functions Overview


The TelML object contains 6 collections:

ApplicationData

PermanentApplicationData

Buttons

Lines

Lamps

TextDisplay

and 5 objects :

Browser

Display

LowLevel

Phone

ICP

The collections and objects above are accessed by referencing the TelML object as follows:
TelML.ApplicationData
TelML.PermanentApplicationData
TelML.Buttons
TelML.Lines
TelML.Lamps
TelML.TextDisplay
TelML.Browser
TelML.Display
TelML.LowLevel
TelML.Phone
TelML.ICP

TelML Definition - Common Elements


Objects
The term Object is used rather loosely here to mean a bunch of related items, generally
implemented as a singleton in the overall class structure. Objects are placeholders for more
detailed items which are defined within the object itself.
Objects can contain functions and variables.

HTML Toolkit Programmers Reference Guide

Collections
Collections are used to hold multiple items such as lines, buttons, etc.
Collections have a number of common elements:

Item( NUMBER index ),

Count()

BuildTable(STRING HeaderTemplate, STRING BodyTemplate, STRING


FooterTemplate)

IsSupported(STRING itemtotest)

Item
Item returns an item in the collection. Item may have either a NUMBER or STRING as the
parameter. In the case of NUMBER, the item can be retrieved by passing the 0-based item
number in.
Passing in a STRING retrieves an item via an alpha-numeric key. This key is not case
sensitive.

Count()
Count returns the number of items in a collection. If there are 5 items in a collection, this
function will return 5, and the individual items will be accessed using Item( 0 ), Item( 1 ), Item(
2 ), Item( 3 ), Item( 4 ).

BuildTable()
A BuildTable function is provided for each collection. This is a mechanism whereby the user
can easily populate an HTML table or an HTML structure with all the elements in the
collection.
Build Table will first process the "HeaderTemplate" parameter. It will build a string consisting
of the text in the Header parameter, and will substitute any variables found in the string.
Next BuildTable automatically iterates through all the items in the collection, in the default
access order for that collection. For example, if there are 5 items in the collection, it will
iterate through items 0, 1, 2, 3, and 4 in that order. It will automatically substitute any
variables found in the BodyTemplate as it processes each row.
Finally, it will process the FooterTemplate, doing any variable substitution required, and will
concatenate this to the string.

BuildTable Variables
Variables are defined as strings of text surrounded by "%" characters.
Variables names will vary for each collection type.
Variable names are not case sensitive. "%Number%" is the same as %number%"
If a variable is used that is not defined, then "" is returned for that variable.

HTML Toolkit Programmers Reference Guide

Example
A user may want to call this function as follows:
var MyTable = TelML.Buttons.BuildTable(
"<table><tr><td>Function</td><td>AssociatedNumber</td></tr>",
"<tr><td>%Function%</td><td>%AssociatedNumber%</td></tr>",
"</table>");

IsSupported()
Each object in TelML includes an IsSupported() function. This function can be called by
passing "" as a parameter, or by passing a specific function or variable name as a parameter.
If "" is passed into this function, then it will return a comma delimited string which is
comprised of all the individual functions and variables that are supported by this
implementation of TelML. In this way, a programmer can determine which objects, functions,
and variables are supported in this implementation.
If a developer wishes to determine if a specific function, variable or object is supported then
they can pass in the objects name, and the IsSupported() function will either return the
objects name if the object is supported, or "" if the object is not supported.
The function names are compared without case sensitivity.
Pseudocode for the TelML object is shown below:
TelML
{
STRING IsSupported( STRING item )
// Collections
ApplicationDataCollection ApplicationData
PermanentApplicationDataCollection PermanentApplicationData
ButtonCollection Buttons
LineCollection Lines
LampCollection Lamps
TextDisplayCollection TextDisplay
// Objects
BrowserObject Browser
DisplayObject Display
LowLevelSettingsObject LowLevel
PhoneObject Phone
ICPObject ICP
}

Pseudocode for the collections and objects in TelML are shown below:
ApplicationDataCollection
{
STRING IsSupported( STRING item )
ApplicationDataItem Item( STRING key )
ApplicationDataItem Item( NUMBER index )
NUMBER Count()
NUMBER Delete( STRING key )

HTML Toolkit Programmers Reference Guide


NUMBER Delete( NUMBER index )
NUMBER AddItem( STRING key, STRING value )
NUMBER QueryMemory()
NUMBER QueryKey( STRING key )
NUMBER QueryKey( NUMBER index )
STRING BuildTable( STRING HeaderTemplate, STRING BodyTemplate, STRING
FooterTemplate )
}
PermanentApplicationDataCollection
{
STRING IsSupported( STRING item )
ApplicationDataItem Item( STRING key )
ApplicationDataItem Item( NUMBER index )
NUMBER Count()
NUMBER Delete( STRING key )
NUMBER Delete( NUMBER index )
NUMBER AddItem( STRING key, STRING value )
NUMBER QueryMemory()
NUMBER QueryKey( STRING key )
NUMBER QueryKey( NUMBER index )
STRING BuildTable( STRING HeaderTemplate, STRING BodyTemplate, STRING
FooterTemplate )
}
ApplicationDataItem
{
STRING IsSupported( STRING item )
STRING GetValue()
NUMBER SetValue( STRING value )
STRING GetKey()
NUMBER GetIndex()
NUMBER GetSize()
}
ButtonCollection
{
STRING IsSupported( STRING item )
ButtonItem Item( STRING name )
ButtonItem Item( NUMBER index )
NUMBER Count()
NUMBER ClearAutoEvents()
STRING BuildTable( STRING HeaderTemplate, STRING BodyTemplate, STRING
FooterTemplate )
ButtonItem RelativePosition( NUMBER column, NUMBER row )
BOOLEAN RegisterKeyGroup( STRING groupString )
BOOLEAN DeregisterKeyGroup( STRING groupString )
BOOLEAN SetPressReporting( BOOLEAN control )
BOOLEAN SetReleaseReporting( BOOLEAN control )
BOOLEAN GetPressReporting()
BOOLEAN GetReleaseReporting()}
ButtonItem
{
STRING IsSupported( STRING item )
STRING GetKeyName()
STRING GetTelephonyKeyName()
STRING GetLabel()
STRING GetFunction()
STRING GetAssociatedNumber()
BOOLEAN GetIsProgrammable()
NUMBER GetIndex()
NUMBER GetNumber()

HTML Toolkit Programmers Reference Guide


NUMBER GetAssociatedLamp()
NUMBER GetAutoEventType()
NUMBER GetAutoEventIDKeyCode()
STRING GetAutoEventIDKeyCode()
VOID Press()
NUMBER SetButtonFunction(STRING label, STRING function, STRING
associatedNumber)
NUMBER SetAutoEvent( NUMBER type, NUMBER id )
NUMBER SetAutoEvent( NUMBER type, STRING id )
NUMBER ClearAutoEvent()
OBJECT GetRelativePosition()
BOOLEAN RegisterKey()
BOOLEAN DeregisterKey()
}
LampCollection
{
STRING IsSupported( STRING item )
LampItem Item( STRING key )
LampItem Item( NUMBER index )
LampItem RelativePosition( NUMBER column, NUMBER row )
NUMBER Count()
STRING BuildTable( STRING HeaderTemplate, STRING BodyTemplate,STRING
FooterTemplate )
}
LampItem
{
STRING
STRING
STRING
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
NUMBER
OBJECT
}

IsSupported( STRING item )


GetLampName()
GetTelephonyLampName()
GetColor()
SetColor( NUMBER value )
GetState()
SetState( NUMBER state )
GetTelephonyState()
GetTelephonyColor()
GetIndex()
GetNumber()
GetRelativePosition()

LineCollection
{
STRING IsSupported( STRING item )
LineItem Item( NUMBER index )
NUMBER Count()
STRING BuildTable( STRING HeaderTemplate, STRING BodyTemplate, STRING
FooterTemplate )
}
LineItem
{
STRING IsSupported( STRING item )
NUMBER GetIndex ()
STRING GetDirectoryNumber()
STRING GetDirectoryNumberURI()
BOOLEAN GetIsPrime()
STRING IsLineStateSupported( STRING state)
STRING IsLineEventSupported( STRING event)
NUMBER AnswerCall()
NUMBER ClearCall()
NUMBER DialDigits( STRING digits )

HTML Toolkit Programmers Reference Guide


NUMBER MakeCall( STRING digits )
}
TextDisplayCollection
{
STRING IsSupported( STRING item )
STRING Item( NUMBER Index )
NUMBER Count()
NUMBER GetWidth()
}
BrowserObject
{
STRING IsSupported( STRING item )
NUMBER InjectEvent( NUMBER type, NUMBER ID_KeyCode )
NUMBER InjectEvent( NUMBER type, STRING ID_KeyCode )
NUMBER SetUseBuiltInControls( NUMBER value )
NUMBER GetUseBuiltInControls()
NUMBER Hide()
NUMBER Close()
}
DisplayObject
{
STRING IsSupported( STRING item )
NUMBER GetWidth()
NUMBER GetHeight()
NUMBER GetDepth()
NUMBER GetContrast()
NUMBER SetContrast( NUMBER value )
NUMBER GetContrastMax()
NUMBER GetBrightness()
NUMBER SetBrightness( NUMBER value )
NUMBER GetBrightnessMax()
NUMBER GetIdleBrightness()
NUMBER SetIdleBrightness( NUMBER value )
STRING GetTextSize()
}
LowLevelSettingsObject
{
STRING IsSupported( STRING item )
STRING GetModelNumber()
STRING GetPhoneMAC()
STRING GetFirmwareVersion()
STRING GetPhoneMode()
NUMBER GetPhoneLanguage()
STRING GetAvailableLanguageList()
STRING GetPhoneIPAddress()
STRING GetTimeDateFormat()
STRING GetTimeDate()
}
PhoneObject
{
STRING
NUMBER
BOOLEAN
OBJECT
}

IsSupported( STRING item )


GetHookswitch()
GetCallInfoEnabled()
GetCallNotificiation()

ICPObject
{
STRING GetIPAddress()

HTML Toolkit Programmers Reference Guide


STRING GetSWVersion()
}
Pseudocode for the TelML object is shown below:
TelMLEvent
{
STRING IsSupported( STRING item )
STRING GetSWVersion()
NUMBER ButtonIndex
BOOLEAN ButtonPressed
NUMBER ErrorID
STRING ErrorString
NUMBER Hookswitch
NUMBER LampIndex
NUMBER LampMode
NUMBER LampColor
NUMBER Language
NUMBER LineIndex
STRING ClidNumber
STRING ClidName
STRING ClidRaw
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHAMDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANDLER
EVENTHANLDER
EVENTHANDLER
EVENTHANDLER
}

10

OnButtonInformation
OnButtonPress
OnDisplayChanged
OnErrorCode
OnHookswitch
OnLampMode
OnLanguageChanged
OnTelephononyIdle
OnTelephonyNotIdle
OnConnectionCleared
OnDelivered
OnEstablished
OnOriginated
OnCallInfoEnableChanged
OnTimeDateChanged
OnTimeDateFormatChanged
OnTextSizeChanged
OnCallNotifyChanged

HTML Toolkit Programmers Reference Guide

Detailed Listing of TelML Collections and Objects


Application Data Collection
The Application Data Collection is a temporary "scratchpad" storage area where applications
can store and retrieve settings. Settings can be accessed by a key value or by an index.
There are 10K Bytes available for this data. This data is stored in the phones RAM.

IsSupported()
Definition
STRING IsSupported( STRING item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.ApplicationData.IsSupported("Item");
// returns "Item"

11

HTML Toolkit Programmers Reference Guide

Item()
Definition #1
ApplicationDataItem Item( STRING key )

Description
Retrieve an item from the Collection by searching for a key.

Arguments
Type
STRING

Name
key

Description
Key to search for in the collection.

Returns
A reference to an ApplicationDataItem is returned from the collection should a match be
found.
Undefined is returned if a match cannot be found.
Key is not case sensitive.

Notes
None

Example
// Assume: Empty Application Data Collection, Add new item
TelML.ApplicationData.AddItem("user_name","Company C.E.O.");
// userItem will contain a reference to
// ApplicationDataItem that was added with the AddItem command.
var userItem=TelML.ApplicationData.Item("user_name");

12

HTML Toolkit Programmers Reference Guide

Definition #2
ApplicationDataItem Item( NUMBER index )

Description
Retrieve an item from the Collection by index.

Arguments
Type
NUMBER

Name
index

Description
Index in the collection to retrieve.

Returns
A reference to an ApplicationDataItem is returned from the ApplicationDataCollection at
the specified index.
Undefined is returned if the index is not present.

Notes
The order in which items are retrieved is undetermined.

Example
// Assume: Empty Application Data Collection, Add new item
TelML.ApplicationData.AddItem("user_name","Company C.E.O.");
// userItem will contain reference to ApplicationDataItem that was
added with the AddItem command.
var userItem=TelML.ApplicationData.Item(0);

13

HTML Toolkit Programmers Reference Guide

Count( )
Definition
NUMBER Count()

Description
Return the number of items in the collection.

Arguments
None

Returns
The number of items.

Notes
None

Example
// Assume: Empty Application Data Collection
TelML.ApplicationData.Count();
// will return 0, as there are no items in collection

14

HTML Toolkit Programmers Reference Guide

Delete()
Definition #1
NUMBER Delete( STRING key)

Description
Delete this item from the Collection.

Arguments
Type
STRING

Name
key

Description
The key value

Returns
0 always

Notes
If an item that does not exist is deleted, no error is returned.

Example
// Assume: Empty Application Data Collection, Add new item
TelML.ApplicationData.AddItem("user_name","Company C.E.O.");
// Remove added item from collection
TelML.ApplicationData.Delete("user_name");

15

HTML Toolkit Programmers Reference Guide

Definition #2
NUMBER Delete( NUMBER index)

Description
Delete this item from the Collection.

Arguments
Type
NUMBER

Name
index

Description
The index

Returns
0 always

Notes
If an item that does not exist is deleted, no error is returned.

Example
// Assume: Empty Application Data Collection, Add new item
TelML.ApplicationData.AddItem("user_name","Company C.E.O.");
// Remove First Item in List
TelML.ApplicationData.Delete(0);

16

HTML Toolkit Programmers Reference Guide

AddItem()
Definition
NUMBER AddItem( STRING key, STRING value)

Description
Add the item to the collection.

Arguments
Type

Name

Description

STRING

key

The key of the item

STRING

value

The value

Returns
-1 if the key already exists
-2 if no room
0 if ok

Notes
If the item exists with the supplied key, this function returns 1, and does not update the
value.

Example
// Assume: Empty Application Data Collection, Add new item
TelML.ApplicationData.AddItem("user_name","Company C.E.O.");

17

HTML Toolkit Programmers Reference Guide

QueryMemory()
Definition
NUMBER QueryMemory()

Description
Returns the amount of memory, in bytes, available in the Collection.
If nothing is allocated, this will return 10240. This number will drop as resources are used.

Arguments
None

Returns
The amount of memory in bytes available in the Collection.

Notes
None

Example
// Assume: Empty Application Data Collection
TelML.ApplicationData.QueryMemory();
// Returns 10240

18

HTML Toolkit Programmers Reference Guide

QueryKey()
Definition #1
NUMBER QueryKey( STRING key )

Description
Returns 1 if the key is defined.

Arguments
Type
STRING

Name
key

Description
The key of the item

Returns
0 if the key is undefined,
non-zero (1) if the key is defined.

Notes
None

Example
// Assume: Empty Application Data Collection
TelML.ApplicationData.QueryKey("user_name");
// Returns 0, since the key "user_name" does not exist in the
collection

19

HTML Toolkit Programmers Reference Guide

Definition #2
NUMBER QueryKey( NUMBER index )

Description
Returns 1 if the index is defined.

Arguments
Type
NUMBER

Name
index

Description
The index of the item

Returns
0 if the index is undefined,
non-zero (1) if the index is defined.

Notes
None

Example
// Assume: Empty Application Data Collection
TelML.ApplicationData.QueryKey(0);
// Returns 0, since the index does not exist.

20

HTML Toolkit Programmers Reference Guide

BuildTable( )
Definition
See TelML Definition Common Elements

Description
Valid variables for the header/footer section are:

%Count%

Valid variables for the body section are:

%Value%

%Key%

%Index%

%Size%

Arguments
See TelML Definition Common Elements

Returns
See TelML Definition Common Elements

Notes
See TelML Definition Common Elements

Example
var HTMLText =TelML.ApplicationData.BuildTable( "%Count% items to
follow<br>","<br> Key = %Key%; value = %value%; index = %iNdEx%
size = %siZE%","<br>%Count% items displayed");
// HTMLText will contain HTML code of all data stored in the
// ApplicationData collection.

21

HTML Toolkit Programmers Reference Guide

Permanent Application Data Collection


The Application Data Collection is a persistent storage area where applications can store and
retrieve settings. Settings can be accessed by a key value or by an index.
This data is persistent survives reboots of the phone. It is stored per-phone (not on the ICP),
so is not transferred when a user is hot desking.
There are 10K Bytes available for this data. This data is stored in the phones FLASH
memory.

IsSupported()
Definition
STRING IsSupported( STRING item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.PermanentApplicationData.IsSupported("Item");
// returns "Item"

22

HTML Toolkit Programmers Reference Guide

Item()
Definition #1
ApplicationDataItem Item( STRING key )

Description
Retrieve an item from the Collection by searching for a key.

Arguments
Type
STRING

Name
key

Description
Key to search for in the collection.

Returns
A reference to an ApplicationDataItem is returned from the collection should a match be
found.
Undefined is returned if a match cannot be found.
Key is not case sensitive.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// userItem will contain a reference to
// ApplicationDataItem that was added with the AddItem command.
var userItem=TelML.PermanentApplicationData.Item("user_name");

23

HTML Toolkit Programmers Reference Guide

Definition #2
ApplicationDataItem Item( NUMBER index )

Description
Retrieve an item from the Collection by index.

Arguments
Type
NUMBER

Name
index

Description
Index in the collection to retrieve.

Returns
A reference to an ApplicationDataItem is returned from the Permanent
ApplicationDataCollection at the specified index.
Undefined is returned if the index is not present.

Notes
The order in which items are retrieved is undetermined.

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// userItem will contain reference to ApplicationDataItem
// that was added with the AddItem command.
var userItem=TelML.PermanentApplicationData.Item(0);

24

HTML Toolkit Programmers Reference Guide

Count( )
Definition
NUMBER Count()

Description
Return the number of items in the collection.

Arguments
None

Returns
The number of items.

Notes
None

Example
// Assume: Empty Application Data Collection
TelML.PermanentApplicationData.Count();
// will return 0, as there are no items in collection

25

HTML Toolkit Programmers Reference Guide

Delete()
Definition #1
NUMBER Delete( STRING key)

Description
Delete this item from the Collection.

Arguments
Type
STRING

Name
key

Description
The key value

Returns
0 always

Notes
If an item that does not exist is deleted, no error is returned.

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// Remove added item from collection
TelML.PermanentApplicationData.Delete("user_name");

26

HTML Toolkit Programmers Reference Guide

Definition #2
NUMBER Delete( NUMBER index)

Description
Delete this item from the Collection.

Arguments
Type
NUMBER

Name
index

Description
The index

Returns
0 always

Notes
If an item that does not exist is deleted, no error is returned.

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// Remove First Item in List
TelML.PermanentApplicationData.Delete(0);

27

HTML Toolkit Programmers Reference Guide

AddItem()
Definition
NUMBER AddItem( STRING key, STRING value)

Description
Add the item to the collection.

Arguments
Type

Name

Description

STRING

key

The key of the item

STRING

value

The value

Returns
-1 if the key already exists
-2 if no room
0 if ok.

Notes
If an item exists with the supplied key, this function returns 1, and does not update the
value.

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");

28

HTML Toolkit Programmers Reference Guide

QueryMemory()
Definition
NUMBER QueryMemory()

Description
Returns the amount of memory, in bytes, available in the Collection.
If nothing is allocated, this will return 10240. This number will drop as resources are used.

Arguments
None

Returns
The amount of memory in bytes available in the Collection.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection
TelML.PermanentApplicationData.QueryMemory();
// Returns 10240

29

HTML Toolkit Programmers Reference Guide

QueryKey()
Definition #1
NUMBER QueryKey( STRING key )

Description
Returns 1 if the key is defined.

Arguments
Type
STRING

Name
key

Description
The key of the item

Returns
0 if the key is undefined,
non-zero (1) if the key is defined.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection
TelML.PermanentApplicationData.QueryKey("user_name");
// Returns 0, since the key "user_name" does not exist in the
collection

30

HTML Toolkit Programmers Reference Guide

Definition #2
NUMBER QueryKey( NUMBER index )

Description
Returns 1 if the index is defined.

Arguments
Type
NUMBER

Name
index

Description
The index of the item

Returns
0 if the index is undefined,
non-zero (1) if the index is defined.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection
TelML.PermanentApplicationData.QueryKey(0);
// Returns 0, since the index does not exist.

31

HTML Toolkit Programmers Reference Guide

BuildTable( )
Definition
See TelML Definition Common Elements

Description
Valid variables for the header/footer section are:

%Count%

Valid variables for the body section are:

%Value%

%Key%

%Index%

%Size%

Arguments
See TelML Definition Common Elements

Returns
See TelML Definition Common Elements

Notes
See TelML Definition Common Elements

Example
var HTMLText =TelML.PermanentApplicationData.BuildTable( "%Count%
items to follow<br>","<br> Key = %Key%; value = %value%; index =
%iNdEx% size = %siZE%","<br>%Count% items displayed");
// HTMLText will contain HTML code of all data stored in the
//PermanentApplicationData collection.

32

HTML Toolkit Programmers Reference Guide

Application Data Item


These are the items in the Application Data and Permanent Application Data collections.

IsSupported()
Definition
STRING IsSupported( STRING item )

Description
Defined in TelML Definition Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
// Add new item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
TelML.PermanentApplicationData.Item(0).IsSupported("GetKey");
// returns "GetKey"

33

HTML Toolkit Programmers Reference Guide

GetValue()
Definition
STRING GetValue()

Description
Return the string value of this item in the collection.

Arguments
None

Returns
The string value of this item in the collection

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
TelML.PermanentApplicationData.Item("user_name").GetValue();
// Returns "Company C.E.O."

34

HTML Toolkit Programmers Reference Guide

SetValue()
Definition
NUMBER SetValue( STRING value )

Description
Set the value of this item.

Arguments
Type
STRING

Name

Description

value

Returns
-1 if cant set this value (out of memory),
0 if success.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
TelML.PermanentApplicationData.Item("user_name").SetValue("Company
C.F.O.");
// Changes the value associated with the key "user_name" to
"Company C.F.O."

35

HTML Toolkit Programmers Reference Guide

GetKey()
Definition
STRING GetKey()

Description
Returns the key used to access this item in the collection.

Arguments
None

Returns
Returns the key used to access this item in the collection.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// Find out the key of the first item in the list
TelML.PermanentApplicationData.Item(0).GetKey();
// Returns "user_name"

36

HTML Toolkit Programmers Reference Guide

GetIndex()
Definition
NUMBER GetIndex()

Description
Return the numeric index of this item in the collection.

Arguments
None

Returns
Return the numeric index of this item in the collection.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// Find out the key of the first item in the list
TelML.PermanentApplicationData.Item("user_name").GetIndex();
// Returns 0 (first item in list)

37

HTML Toolkit Programmers Reference Guide

GetSize()
Definition
NUMBER GetSize()

Description
Returns the size of the string value.

Arguments
None

Returns
Returns the size of the string value.

Notes
None

Example
// Assume: Empty Permanent Application Data Collection, Add new
item
TelML.PermanentApplicationData.AddItem("user_name","Company
C.E.O.");
// Find out the key of the first item in the list
TelML.PermanentApplicationData.Item("user_name").GetSize();
// Returns 14 (string length of "Company C.E.O.")

38

HTML Toolkit Programmers Reference Guide

Button Collection
The button collection enumerates all buttons and keys on the phone. There are many
methods that can be used to:

query key information, including user-set labels, and softkey prompts

simulate pressing the keys

respond to keys pressed on the phone while in the application

In order to explain the operation of the Button Collection, the available information about keys
will be presented. Subsequently, the TelML methods to access this data will be presented.

Classification of Buttons and Keys


The keys can be classified into three groups. These groups are "hard keys", "soft keys", and
"programmable keys". Hard Keys are the keys with a digit or symbol printed on the plastic
button. Soft Keys are the top 3 three keys on the left and right (5340 only) sides of the
display, which have a context sensitive prompt associated with them. Programmable keys
are those keys to the left and right of the display excluding the soft keys. The 5340 has
programmable keys on both sides of the display whereas the 5330 has programmable keys
on the left side only.
Collectively, the programmable keys and soft keys are known as SCREENKEYS. They are
named according to their placement relative to the screen and the other keys.

Button Attributes
Each key has the following attributes:

Name

Telephony Name

Label

Function

Function Associated Data

Programmability on the PBX

Index

Hardware ID Code

Associated LED Hardware ID Code

Auto Event Type

Auto Event Associated Data

Relative Position

Button Attribute: Name


For hard keys, the Name attribute is a string that describes the key based on the symbols preprinted on each key.
For soft keys and programmable keys, it is a string describing its placement relative to the
screen and the other keys. These keys have names starting at SCREENKEY1 through

39

HTML Toolkit Programmers Reference Guide


SCREENKEY11 for the keys on the left side of 5330 and 5340 displays, and from
SCREENKEY12 through SCREENKEY22 for the keys on the right side of the 5340 display.
See Figure 11 for the key naming on the 5330 set, and see Figure 13 for the key naming on
the 5340 set.

Button Attribute: Telephony Name


For hard keys, the Telephony Name attribute is the same as Name.
For programmable keys, the Telephony Name attribute is the name of the key according to
the PBX.
The PBX sees the phones as having more keys than are actually present, as they are
presented three pages in the phone application. The PBX sees the 5330 set as having 24
programmable keys and the 5340 set as having 48 programmable keys.
For the 5330 set in the phone application, the names of these keys are PK1 through PK8 for
the first page, and PK9 through PK17 for the second page, and PK18 through PK24 for a the
last page.
For the 5340 set in the phone application, the names of these keys are PK1 through PK16 for
the first page, and PK17 through PK32 for the second page, and PK33 through PK48 for a
the last page.
For soft keys, the Telephony Name attribute is SK1 through SK3 for the 5330, and SK1
through SK6 for the 5340.
See Figure 12 for the telephony names of keys on the 5330 set, and see Figure 14 for the
telephony names of keys on the 5340 set.

Button Attribute: Label


For hard keys, the Label attribute is the same as as Name.
For programmable keys, the Label attribute is the label programmed on the PBX by the user
or administrator.
For soft keys, the Label attribute is the current prompt shown on the phone application.

Button Attribute: Function


For hard keys, the Function attribute is the same as the Name attribute.
For soft keys, the Function attribute is blank, as there is no fixed function.
For programmable keys, the Function and Function Associated Data attributes
provide all the information needed to associate PBX features or phone applications with a
key.

40

HTML Toolkit Programmers Reference Guide

Listed below are the possible PBX features and phone applications that can be programmed
on buttons:
Table 1. Button Collection Function" Attribute Values
Function
SpeedCall

Function Associated Data


DN to dial

HTML Apps Programmability


Yes

AutoAnswer

Yes

Paging

Yes

Music

Yes

CallPickup

Yes

CallBack

Yes

Headset

Yes

Swap

Yes

NightAnswer

Yes

MakeBusy

Yes

Campon

Yes

Override

Yes

DoNotDisturb

Yes

Release

Yes

DirectPage

Yes

SingleFlash

Yes

DoubleFlash

Yes

MeetMeAnswer

Yes

MessageWaitingIndicator

DN to monitor

Yes

EmergencyCall

Yes

AccountCodeVerified

Yes

AccountCodeNonVerified

Yes

TagCall

Yes

Speaker

Yes

Message

Yes

Hold

Yes

TransferConference

Yes

Cancel

Yes

Redial

Yes

Superkey

Yes

PrivacyRelease

Yes

AnalogLine

Yes

Speak@Ease

Yes

41

HTML Toolkit Programmers Reference Guide

Function

Function Associated Data

HTML Apps Programmability

ACD

Yes

HotDesking

Yes

PhoneBook

Yes

CallLog

Yes

CallPark

Yes

CallParkRetrieve

Yes

GroupListen

Yes

Function

Function Associated Data

HTML Apps Programmability

Line0

DN of Line

No

Line1

DN of Line

No

Line2

DN of Line

No

Line3

DN of Line

No

Line4

DN of Line

No

PCApplication

Yes

PhoneApplication

"CallAnnounce"

No

PhoneApplication

"ThresholdAlert"

No

PhoneApplication

"CdeSpeedCall"

No

PhoneApplication

"CallForwardBusyExternal"

No

PhoneApplication

"CallForwardNoAnswerExternal"

No

PhoneApplication

"CallForwardBusyInternal"

No

PhoneApplication

"CallForwardBusyNoAnswerInterna
l"

No

PhoneApplication

"CallForwardBusy"

No

PhoneApplication

"CallForwardNoAnswer"

No

PhoneApplication

"CallForwardAlways"

No

PhoneApplication

"SpecificGroupAlert"

No

PhoneApplication

"GenericGroupAlert"

No

PhoneApplication

"DssBlf"

No

PhoneApplication

"Secretarial"

No

PhoneApplication

"UrlLine"

No

PhoneApplication

"RecordACall"

No

PhoneApplication

"MicFeature"

No

PhoneApplication

"PhoneApplicationFeature"

No

PhoneApplication

"Forwarding"

No

Overview

Yes

People

Yes

42

HTML Toolkit Programmers Reference Guide

Function

Function Associated Data

HTML Apps Programmability

Settings

Yes

ConferenceCtrl

Yes

CallForward

Yes

PhoneHelp

Yes

CLIDDetail

Yes

Phone

Yes

Message

Yes

History

Yes

AppShutter

Yes

WebBrowser

Yes

PcHelp

Yes

PcCompanion

Yes

PhoneHtmlApplication

Directory Name of HTML App

UnprogrammedEmbeddedApp

Yes
Yes

Button Attribute: Function Associated Data


For hardkeys this field is blank.
For softkeys this field is blank.
For programmable keys, see Table 1 in Button Attribute: Function to see the possible values
for this attribute.

Button Attribute: Programmability on the PBX


This attribute represents the ability to program this key on the PBX from an HTML Application
to perform one of the functions as described in Table 1 of the Button Attribute: Function
section. The value of this field does not in any way affect the handling of keystrokes in HTML
applications.
For hardkeys and softkeys, this field is No.
For programmable keys this field is Yes.

Button Attribute: Index


This attribute represents the relative location of this button in the collection.
The value of the index for a particular key may change between hardware types, and
software versions. Therefore, it is recommended that index values are not hardcoded into
applications. The index value can be obtained at run-time and used as a shorthand for
referencing the item in the collection.
As such, the mapping of index to buttons is not published in this document for this reason.

43

HTML Toolkit Programmers Reference Guide

Button Attribute: Hardware ID Code


This attribute represents the hardware ID code for this button. This value is used internally,
and is of no use to an HTML application.
Similar to the Index attribute, the value of the Hardware ID Code may change between
hardware types, and software versions. Therefore, it is recommended that Hardware ID
values are not hardcoded into applications.
As such, the mapping of Hardware ID to buttons is not published in this document for this
reason.

Button Attribute: Associated LED Hardware ID Code


This attribute represents the hardware ID code for the LED associated with this button. The
value is 1 if there is no associated LED. For values other than 1, the number is used
internally, and is of no use to an HTML application, other than the fact that an LED exists.
In order to monitor/control the LEDs, the HTML Apps can make use of the Lamps object

Button Attribute: AutoEvent Type


The autoevent type, along with the AutoEvent Associated Data is a HTML App defined value
that allows one of four actions to occur automatically when a button is pressed.

0, no action (default).

1, activate the HTML element with the ID specified in the Auto Event Associated Data by
sending the focus, select, and click methods on that HTML element.

2, send the code or ASCII character to the browser specified in the Auto Event
Associated Data attribute. See the definition of SetAutoEvent()-Type 2 Browser
Keystroke Auto Event for valid keystroke codes to send.

3, simulate as if a key (with key name or index specified in Auto Event Associated Data)
was pressed.

These attributes are not shown in any of the attribute tables because the programmer
defines them.

Button Attribute: AutoEvent Associated Data


This attribute is used along with the AutoEvent Type to automate the handling of certain keys.
These attributes are not shown in any of the attribute tables because the programmer defines
them.

Button Attribute: Relative Position


This attribute provides the location of the SCREENKEY relative to the top left key
SCREENKEY assigned to the application. This attribute is undefined for all keys other than
SCREENKEYS.
The relative position is described as a row and column. The row increases towards the
bottom of the phone. The column increases towards the right of the phone.
This attribute is shown in the Button Attribute Listings for Full Screen applications and similar
application types, and New Page applications. Relative position cannot be put into a table for
applications running as Graphical Key Applications because they are completely dependent
on the programming of the keys.

44

HTML Toolkit Programmers Reference Guide

Button Attribute Listings


The following sections show the relevant data associated with each category of keys.

Hard Key Button Attributes


The attributes relevant to hard keys for a 5330/5340 sets are shown below in a table. The
home key is only available on a 5340.
Table 2. 5330/5340 Hard Key Button Attributes
Name

Telephony
Name

Label

Function

Associated LED
Hardware ID Code
Present?

Programmabilit
y on the PBX?

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

No

Volup

Volup

Volup

Volup

No

No

Voldn

Voldn

Voldn

Voldn

No

No

Hookswitch

Hookswitch

Hookswitch

Hookswitch

No

No

Hold

Hold

Hold

Hold

No

No

Cancel

Cancel

Cancel

Cancel

No

No

Trans/Conf

Trans/Conf

Trans/Conf

Trans/Conf

No

No

Message

Message

Message

Message

Yes

No

Speaker

Speaker

Speaker

Speaker

No

No

Redial

Redial

Redial

Redial

No

No

Mute

Mute

Mute

Mute

Yes

No

Settings

Settings

Settings

Settings

No

No

Previous

Previous

Previous

Previous

No

No

Home

Home

Home

Home

No

No

Next

Next

Next

Next

No

No

45

HTML Toolkit Programmers Reference Guide

Softkey Attributes 5330 Set


Table 3. Softkey Attributes 5330 Set
Name

Telephony
Name

SCREE
NKEY1

SK1

SCREE
NKEY2

SK2

SCREE
NKEY3

SK3

Label
(description)

Function

PBX Prompt
Displayed
beside SK1

Relative
Position
(Full
Screen)
Row: 0

Relative
Position
(New Page
App)

Assoc. LED
Hardware ID
Code
Present ?

Program on
the PBX?

Undefined

Yes

No

Undefined

Yes

No

Undefined

Yes

No

Column: 0

PBX Prompt
Displayed
beside SK2

Row: 1
Column: 0

PBX Prompt
Displayed
beside SK3

Row: 2
Column: 0

Programmable Key Attributes 5330 Set


Table 4. Programmable Key Attributes 5330 Set
Name

Telephony
Name

SCREE
NKEY4

PK8

SCREE
NKEY5

PK7

SCREE
NKEY6

PK6

SCREE
NKEY7

PK5

SCREE
NKEY8

PK4

SCREE
NKEY9

PK3

SCREE
NKEY10

PK2

SCREE
NKEY11

PK1

46

Label
(description)

Function
(Assoc.
Data)

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Associated
LED
Hardware
ID Code
Present?

Program
on the
PBX?

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

No

PBX Label
Displayed
beside PK8

As config on
PBX.

Row: 3

Row: 0

Column: 0

Column: 0

PBX Label
Displayed
beside PK7

As config on
PBX.

Row: 4

Row: 1

Column: 0

Column: 0

PBX Label
Displayed
beside PK6

As config on
PBX.

Row: 5

Row: 2

Column: 0

Column: 0

PBX Label
Displayed
beside PK5

As config on
PBX.

Row: 6

Row: 3

Column: 0

Column: 0

PBX Label
Displayed
beside PK4

As config on
PBX.

Row: 7

Row: 4

Column: 0

Column: 0

PBX Label
Displayed
beside PK3

As config on
PBX.

Row: 8

Row: 5

Column: 0

Column: 0

PBX Label
Displayed
beside PK2

As config on
PBX.

Row: 9

Row: 6

Column: 0

Column: 0

PBX Label
Displayed
beside PK1

Line0
(Phone
Extension)

Row: 10

Row: 7

Column: 0

Column: 0

HTML Toolkit Programmers Reference Guide

Name

Telephony
Name

Label
(description)

Function
(Assoc.
Data)

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Associated
LED
Hardware
ID Code
Present?

Program
on the
PBX?

PK9

PBX Label
Displayed
beside PK9

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK10

PBX Label
Displayed
beside PK10

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK11

PBX Label
Displayed
beside PK11

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK12

PBX Label
Displayed
beside PK12

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK13

PBX Label
Displayed
beside PK13

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK14

PBX Label
Displayed
beside PK14

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK15

PBX Label
Displayed
beside PK15

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK16

PBX Label
Displayed
beside PK16

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK17

PBX Label
Displayed
beside PK17

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK18

PBX Label
Displayed
beside PK18

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK19

PBX Label
Displayed
beside PK19

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK20

PBX Label
Displayed
beside PK20

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK21

PBX Label
Displayed
beside PK21

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK22

PBX Label
Displayed
beside PK22

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK23

PBX Label
Displayed
beside PK23

As config
on PBX.

Undefined

Undefined

Yes

Yes

PK24

PBX Label
Displayed
beside PK24

As config
on PBX.

Undefined

Undefined

Yes

Yes

47

HTML Toolkit Programmers Reference Guide

Figure 1. 5330 Key Names Locations

48

HTML Toolkit Programmers Reference Guide

Figure 2. 5330 Telephony Key Name Locations

49

HTML Toolkit Programmers Reference Guide

Softkey Attributes 5340 Set


Table 5. Softkey Attributes 5340 Set
Name

Telephony
Name

Label
(description)

SCREE
NKEY1

SK1

PBX Prompt
Displayed
beside SK1

SCREE
NKEY2

SK2

SCREE
NKEY3

SK3

SCREE
NKEY12

SK4

SCREE
NKEY13

SK5

SCREE
NKEY14

SK6

Function

Relative
Position (Full
Screen)

Relative
Position (New
Page App)

Associated
LED
Hardware
ID Code
Present?

Progra
m on
the
PBX?

Row: 0

Undefined

Yes

No

Undefined

Yes

No

Undefined

Yes

No

Undefined

Yes

No

Undefined

Yes

No

Undefined

Yes

No

Column: 0

PBX Prompt
Displayed
beside SK2

Row: 1
Column: 0

PBX Prompt
Displayed
beside SK3

Row: 2
Column: 0

PBX Prompt
Displayed
beside SK4

Row: 0
Column: 1

PBX Prompt
Displayed
beside SK5

Row: 1
Column: 1

PBX Prompt
Displayed
beside SK6

Row: 2
Column: 1

Programmable Key Attributes 5340 Set


Table 6. Programmable Key Attributes 5340 Set
Name

Telephon
y Name

SCREE
NKEY4

PK16

SCREE
NKEY5

PK14

SCREE
NKEY6

PK12

SCREE
NKEY7

PK10

SCREE
NKEY8

PK8

50

Label
(description)

Function
(Assoc.
Data)

LED ID
Code
Present?

PBX Label
Displayed
beside PK16

As config on
PBX.

Yes

PBX Label
Displayed
beside PK14

As config on
PBX.

Yes

PBX Label
Displayed
beside PK12

As config on
PBX.

Yes

PBX Label
Displayed
beside PK10

As config on
PBX.

Yes

PBX Label
Displayed
beside PK8

As config on
PBX.

Yes

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Row: 3

Row: 0

Column: 0

Column: 0

Row: 4

Row: 1

Column: 0

Column: 0

Row: 5

Row: 2

Column: 0

Column: 0

Row: 6

Row: 3

Column: 0

Column: 0

Row: 7

Row: 4

Column: 0

Column: 0

Program
on the
PBX?
Yes

Yes

Yes

Yes

Yes

HTML Toolkit Programmers Reference Guide

Name

Telephon
y Name

SCREE
NKEY9

PK6

SCREE
NKEY10

PK4

SCREE
NKEY11

PK2

SCREE
NKEY15

PK15

SCREE
NKEY16

PK13

SCREE
NKEY17

PK11

SCREE
NKEY18

PK9

SCREE
NKEY19

PK7

SCREE
NKEY20

PK5

SCREE
NKEY21

PK3

SCREE
NKEY22

PK1

Label
(description)

Function
(Assoc.
Data)

LED ID
Code
Present?

PBX Label
Displayed
beside PK6

As config on
PBX.

Yes

PBX Label
Displayed
beside PK4

As config on
PBX.

Yes

PBX Label
Displayed
beside PK2

As config on
PBX.

Yes

PBX Label
Displayed
beside PK15

As config on
PBX.

Yes

PBX Label
Displayed
beside PK13

As config on
PBX.

Yes

PBX Label
Displayed
beside PK11

As config on
PBX.

Yes

PBX Label
Displayed
beside PK9

As config on
PBX.

Yes

PBX Label
Displayed
beside PK7

As config on
PBX.

Yes

PBX Label
Displayed
beside PK5

As config on
PBX.

Yes

PBX Label
Displayed
beside PK3

As config on
PBX.

Yes

PBX Label
Displayed
beside PK1

Line0
(Phone
Extension)

Yes

PK17

PBX Label
Displayed
beside PK17

As config on
PBX.

PK18

PBX Label
Displayed
beside PK18

PK19

PK20

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Program
on the
PBX?

Row: 8

Row: 5

Yes

Column: 0

Column: 0

Row: 9

Row: 6

Column: 0

Column: 0

Row: 10

Row: 7

Column: 0

Column: 0

Row: 3

Row: 0

Column: 1

Column: 1

Row: 4

Row: 2

Column: 1

Column: 1

Row: 5

Row: 3

Column: 1

Column: 1

Row: 6

Row: 4

Column: 1

Column: 1

Row: 7

Row: 5

Column: 1

Column: 1

Row: 8

Row: 6

Column: 1

Column: 1

Row: 9

Row: 7

Column: 1

Column: 1

Row: 10

Row: 8

Column: 1

Column: 1

Yes

Undefined

Undefined

Yes

As config on
PBX.

Yes

Undefined

Undefined

Yes

PBX Label
Displayed
beside PK19

As config on
PBX.

Yes

Undefined

Undefined

Yes

PBX Label
Displayed
beside PK20

As config on
PBX.

Yes

Undefined

Undefined

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

No

51

HTML Toolkit Programmers Reference Guide

Name

52

Telephon
y Name

Label
(description)

Function
(Assoc.
Data)

LED ID
Code
Present?

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Program
on the
PBX?

PK21

PBX Label
Displayed
beside PK21

As config on
PBX.

Yes

Undefined

Undefined

Yes

PK22

PBX Label
Displayed
beside PK22

As config on
PBX.

Yes

Undefined

Undefined

Yes

PK23

PBX Label
Displayed
beside PK23

As config on
PBX.

Yes

Undefined

Undefined

Yes

PK24

PBX Label
Displayed
beside PK24

As config on
PBX.

Yes

Undefined

Undefined

Yes

PK25

PBX Label
Displayed
beside PK25

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK26

PBX Label
Displayed
beside PK26

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK27

PBX Label
Displayed
beside PK27

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK28

PBX Label
Displayed
beside PK28

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK29

PBX Label
Displayed
beside PK29

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK30

PBX Label
Displayed
beside PK30

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK31

PBX Label
Displayed
beside PK31

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK32

PBX Label
Displayed
beside PK32

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK33

PBX Label
Displayed
beside PK34

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK35

PBX Label
Displayed
beside PK35

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK36

PBX Label
Displayed
beside PK36

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK37

PBX Label
Displayed
beside PK37

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK38

PBX Label
Displayed
beside PK38

As config
on PBX.

Yes

Undefined

Undefined

Yes

HTML Toolkit Programmers Reference Guide

Name

Telephon
y Name

Label
(description)

Function
(Assoc.
Data)

LED ID
Code
Present?

PK39

PBX Label
Displayed
beside PK39

As config
on PBX.

Yes

PK40

PBX Label
Displayed
beside PK40

As config
on PBX.

PK41

PBX Label
Displayed
beside PK41

PK42

Relative
Position
(Full
Screen)

Relative
Position
(New Page
App)

Program
on the
PBX?

Undefined

Undefined

Yes

Yes

Undefined

Undefined

Yes

As config
on PBX.

Yes

Undefined

Undefined

Yes

PBX Label
Displayed
beside
PK42

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK43

PBX Label
Displayed
beside PK43

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK44

PBX Label
Displayed
beside PK44

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK45

PBX Label
Displayed
beside PK45

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK46

PBX Label
Displayed
beside PK46

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK47

PBX Label
Displayed
beside PK47

As config
on PBX.

Yes

Undefined

Undefined

Yes

PK48

PBX Label
Displayed
beside PK48

As config
on PBX.

Yes

Undefined

Undefined

Yes

53

HTML Toolkit Programmers Reference Guide

Figure 3. 5340 Key Name Locations

54

HTML Toolkit Programmers Reference Guide

Figure 4. 5340 Telephony Key Name Locations

55

HTML Toolkit Programmers Reference Guide

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.Buttons.IsSupported("Item");
// returns "Item"

56

HTML Toolkit Programmers Reference Guide

Item()
Definition #1
ButtonItem Item(STRING Name)

Description
Retrieve an item from the Collection using the keys Name or Telephony Name.

Arguments
Type
STRING

Name
Name

Description
Name to search for in Name and Telephony Name Attributes

Returns
undefined if a match cannot be found in the Name or Telephony Name attributes of the
items in the Button Collection.
If a match is found, then a reference to a ButtonItem object is returned.

Notes
Case insensitive search is performed.

Example
var PrimeLineKey = TelML.Buttons.Item("PK1");
var BottomLeftProgrammableKey = TelML.Buttons.Item("SCREENKEY11");
// On a 5330 PrimeLineKey is the same as
BottomLeftProgrammableKey.
// On a 5340 PrimeLineKey.GetKeyName()

is "SCREENKEY22" and

// BottomLeftProgrammableKey.GetTelephonyKeyName() is "PK2".

57

HTML Toolkit Programmers Reference Guide

Definition #2
ButtonItem Item(NUMBER Index)

Description
Retrieve an item from the Collection using the Index.

Arguments
Type
NUMBER

Name
Index

Description
index of the item in the collection to be retrieved.

Returns
undefined if a button with the supplied index cannot be found in the ButtonCollection.
If a Button can be found with the supplied index, then a reference to a ButtonItem object
is returned.

Notes
The index number for a particular key should not be hardcoded into HTML apps because
it could change in future versions. This method is very useful when used in an event
hander in conjunction with TelMLEventTelMLEvent.ButtonIndex. See example below.

Example
// Establish Key Event Handler
TelMLEvent.OnButtonPress = myButtonHandler;
function myButtonHandler()
{
// pressedKeyIndex contains the index of the key pressed
var pressedKeyIndex = TelMLEvent.ButtonIndex;
// pressedKeyItem is a reference to the pressed button Item
var pressedKeyItem = TelML.Buttons.Item(pressedKeyIndex);
// pressedKeyName is the string name of the pressed button.
var pressedKeyName = pressedKeyItem.GetKeyName();
}

58

HTML Toolkit Programmers Reference Guide

Count( )
Definition
NUMBER Count()

Description
Return the number of buttons in the collection.

Arguments
None

Returns
The number of buttons.

Notes
None

Example
// returns the number of buttons in the collection
TelML.Buttons.Count();

59

HTML Toolkit Programmers Reference Guide

ClearAutoEvents( )
Definition
NUMBER ClearAutoEvents()

Description
Sets all the Auto Event Type for all keys in the collection to type 0 which results in no
action on key press.

Arguments
None

Returns
0

Notes
Each running application has its own set of AutoEvents.

Example
// Clear all the autoevents.
TelML.Buttons.ClearAutoEvents();

60

HTML Toolkit Programmers Reference Guide

BuildTable( )
Definition
See TelML Definition Common Elements

Description
Valid variables for the header/footer section are:

%Count%

%PressReporting%

%ReleaseReporting%

Valid variables for the body section are:

%KeyName%

%TelephonyKeyName%

%Label%

%Function%

%IsProgrammable%

%Index%

%Number%

%AssociatedLamp%

%AssociatatedNumber%

%AutoEventType%

%AutoEventIDKeyCode%

Arguments
See TelML Definition Common Elements

Returns
See TelML Definition Common Elements

Notes
See TelML Definition Common Elements

61

HTML Toolkit Programmers Reference Guide

Example
var HTMLText = TelML.Buttons.BuildTable("%Count% items to
follow<br>",
"<br> Keyname = %KeyName%; Label = %LABEL%; index = %iNdEx%",
"%Count% items displayed");
// HTMLText will contain HTML code to display selected information
about all of the keys.

RelativePosition( )
Definition
ButtonItem RelativePosition(NUMBER column, NUMBER row)

Description
This collection accessor is similar to the Item method. This method requires a column,
and row offset from the top left "SCREENKEY" that is available to the application. This
method is particularly useful for developing applications to run as Graphical Key
Applications and New Page Applications so that they can be location independent.
For all application types other than Graphical Key Applications and New Page
Applications, the origin position is "SCREENKEY1" the top left key.

Arguments
Column For 5330 sets, this value can only be 0 because there is only one column of
keys. For a 5340 set with the same Graphical Key application programmed against the
programmable key on the left and the right side the value 0 refers to the key on the left,
and the value 1 would refer to the key on the right. For a 5340 set with a graphical key
application programmed to a key on the right side, this value can only be 0 because there
are no more columns beyond this. All non Graphical Key applications on the 5340 can be
0 or 1.
Row The key row offset increases towards the bottom of the screen based on the top
left "SCREENKEY" available to the application. This value can be between 0 and 10.

Returns
The ButtonItem object if the specified relative position is available to the application.
Otherwise, it returns undefined.

62

HTML Toolkit Programmers Reference Guide

Notes
This method is useful to determine the amount of screen space programmed for a
graphical key application. An application can start testing from 0,0 and explore until
undefined is returned.

Example
//
// Graphical Key Application Programmed against four 5340 keys
// starting at SCREENKEY5.
//
var topLeft = TelML.Buttons.RelativePosition(0,0).GetKeyName();
// topLeft = "SCREENKEY5"
var bottomLeft = TelML.Buttons.RelativePosition(0,1).GetKeyName();
// bottomLeft = "SCREENKEY6";
var topRight = TelML.Buttons. RelativePosition (1,0).GetKeyName();
// topRight = "SCREENKEY16";
var bottomRight = TelML.Buttons.RelativePosition(1,1).GetKeyName();
// bottomRight = "SCREENKEY17";
var outOfRange = TelML.Buttons.RelativePosition(2,1);
// outOfRange = undefined.
//
// Full Screen Application
//
var topLeft = TelML.Buttons.RelativePosition(0,0).GetKeyName();
// topLeft = "SCREENKEY1";
//
// New Page Application
//
var topLeft = TelML.Buttons.RelativePosition(0,0).GetKeyName();
// topLeft = "SCREENKEY4";

63

HTML Toolkit Programmers Reference Guide

RegisterKeyGroup( )
Definition
BOOLEAN RegisterKeyGroup(STRING keyGroupName)

Description
This method registers for a group of keys such that the HTML Application will receive
TelMLEvent.OnButtonPress events when keys from the requested key group are pressed
and/or released.

Arguments
KeyGroupName can be one of:
"NoKeys" - no effect
"VolumeKeys" the up and down arrow keys / volume keys on the right side of the phone
"ControlKeys" all keys above the dialpad keys except for the volume keys
"DialPadKeys" the digit keys 0..9 and * and #
"NavigationKeys" the navigation buttons below the screen
"ScreenKeys" the keys located around the screen

Returns
True if successful in registering the keys, False otherwise.

Notes
Each application type has different rules for which keys can be registered. Please see the
appropriate section in the HTML Toolkit Developer Guide describing all of the application
types.

Example
//
// Register all of the control keys
var result = TelML.Buttons.RegisterKeyGroup("ControlKeys");
// result = true;

64

HTML Toolkit Programmers Reference Guide

DeregisterKeyGroup( )
Definition
BOOLEAN DeregisterKeyGroup(STRING keyGroupName)

Description
This method de-registers a group of keys such that HTML Application will no longer
receive TelMLEvent.OnButtonPress events when keys from the requested key group are
pressed and/or released.

Arguments
KeyGroupName can be one of :
"NoKeys" - no effect
"VolumeKeys" the up and down arrow keys / volume keys on the right side of the phone
"ControlKeys" the six keys immediately above the dialpad keys
"DialPadKeys" the digit keys 0..9 and * and #
"NavigationKeys" the three buttons below the screen
"ScreenKeys" the keys located around the screen

Returns
True if successful in de-registering the keys, False otherwise.

Notes
Each application type has different rules for which keys can be de-registered. Please see
the appropriate section in the HTML Toolkit Developer Guide describing all of the
application types. Please note that the hookswitch, the speaker key, and mic mute key
are not part of any group and need to be individually registered.

Example
//
// De-register all of the control keys
var result = TelML.Buttons.DeregisterKeyGroup("ControlKeys");
// result = true;

65

HTML Toolkit Programmers Reference Guide

SetPressReporting( )
Definition
BOOLEAN SetPressReporting(BOOLEAN control)

Description
By default, reporting of downstrokes is disabled. By default, applications will only receive
TelMLEvent.OnButtonPressed events on upstrokes. This method will control whether
downstrokes of buttons will be reported to the application. Downstrokes are reported in
the TelMLEvent.OnButtonPressed event handler by reading the member
TelMLEvent.ButtonPressed and if it is true then it will be a downstroke, otherwise it is an
upstroke.

Arguments
control

BOOLEAN

true if downstroke reporting is desired,

false if downstroke reporting is not desired (DEFAULT)

Returns
The new value of the SetPressReporting.

Notes
This method can be used to create interesting visual effects when buttons are depressed.

Example
// Turn on press and release reporting so we get both downstrokes and
upstrokes
TelML.Buttons.SetPressReporting(true);
TelML.Buttons.SetReleaseReporting(true);
// Install a simple handler
TelMLEvent.OnButtonPress = function ()
{
alert("You just "+(TelMLEvent.ButtonPressed === true ?
"pressed" : "released")+ "a button");
};

66

HTML Toolkit Programmers Reference Guide

SetReleaseReporting( )
Definition
BOOLEAN SetReleaseReporting(BOOLEAN control)

Description
By default, reporting of upstrokes is enabled. By default, applications will receive
TelMLEvent.OnButtonPressed events on upstrokes. This method will control whether
upstrokes of buttons will be reported to the application. Downstrokes are reported in the
TelMLEvent.OnButtonPressed event handler by reading the member
TelMLEvent.ButtonPressed and if it is true then it will be a downstroke, otherwise it is an
upstroke.

Arguments
control

BOOLEAN

true if upstroke reporting is desired (DEFAULT)

false if upstroke reporting is not desired (DEFAULT)

Returns
The new value of the SetReleaseReporting.

Notes
This method can be used to create interesting visual effects when keys are released.

Example
// Turn on press and release reporting so we get both downstrokes and
upstrokes
TelML.Buttons.SetPressReporting(true);
TelML.Buttons.SetReleaseReporting(true);
// Install a simple handler
TelMLEvent.OnButtonPress = function ()
{
alert("You just "+TelMLEvent.ButtonPressed === true ? "pressed"
: "released" + "a button");
};

67

HTML Toolkit Programmers Reference Guide

GetPressReporting( )
Definition
BOOLEAN GetPressReporting( )

Description
Returns true if press reporting is enabled, false otherwise. Press reporting is false by
default.

Returns
The current button press reporting setting.

Notes
None

Example
// Turn on press reporting only if it isn't set
if (TelML.Buttons.GetPressReporting() === false)
{
TelML.Buttons.SetPressReporting(true);
}

68

HTML Toolkit Programmers Reference Guide

GetReleaseReporting( )
Definition
BOOLEAN GetReleaseReporting( )

Description
Returns true if release reporting is enabled, false otherwise. Release reporting is true by
default.

Returns
The current button release reporting setting.

Notes
None

Example
// Turn on release reporting only if it isn't set
if (TelML.Buttons.GetReleaseReporting() === false)
{
TelML.Buttons.SetReleaseReporting(true);
}

69

HTML Toolkit Programmers Reference Guide

Button Item
This object contains all of the attributes for one button. These attributes were introduced in
the section on Button Attributes and will be referred to from this section.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.Buttons.Item("MESSAGE").IsSupported("GetKeyName");
// returns "GetKeyName"

70

HTML Toolkit Programmers Reference Guide

GetKeyName( )
Definition
STRING GetKeyName()

Description
Returns the Key Name for this key. See Tables 2 through 6 in the Button Attribute section
to see how the keys are named. Please note that for programmable keys on pages 2 and
3 of the phone application do not have key names because they are not physical keys.
They do have Telephony Key Names as seen by the PBX.

Arguments
None

Returns
The string containing the Key Name.

Notes
None

Example
TelML.Buttons.Item("MESSAGE").GetKeyName();
// returns "Message"

71

HTML Toolkit Programmers Reference Guide

GetTelephonyKeyName( )
Definition
STRING GetTelephonyKeyName()

Description
Returns the Telephony Key Name for this key. See Tables 2 through 6 in the Button
Attribute section to see how the keys are named.

Arguments
None

Returns
The string containing the Telephony Key Name.

Notes
None

Example
TelML.Buttons.Item("SCREENKEY1").GetTelephonyKeyName();
// returns "SK1" (for both 5330/40).

72

HTML Toolkit Programmers Reference Guide

GetLabel( )
Definition
STRING GetLabel()

Description
Returns the Label associated with this key. See Tables 2 through 6 in the Button Attribute
section to see how the keys are named.

Arguments
None

Returns
The label associated with this key.

Notes
None

Example
TelML.Buttons.Item("PK1").GetLabel();
// returns the label associated with the prime line
// usually the directory number of the phone.

73

HTML Toolkit Programmers Reference Guide

GetFunction( )
Definition
STRING GetFunction()

Description
Returns the Function associated with this key. See Tables 1 through 6 in the Button
Attribute section to see the possible return values.

Arguments
None

Returns
The function assigned to this key.

Notes
None

Example
TelML.Buttons.Item("PK1").GetFunction();
// returns "Line0".

74

HTML Toolkit Programmers Reference Guide

GetAssociatedNumber( )
Definition
STRING GetAssociatedNumber()

Description
Returns the Function Associated Data. The name of this method is a misnomer, as it
returns numbers as well as text descriptions of the functions assigned to keys. See
Tables 1 through 6 in the Button Attribute section to see the possible return values.

Arguments
None

Returns
The function associated data assigned to this key.

Notes
None

Example
TelML.Buttons.Item("PK1").GetAssociatedNumber();
// returns the directory number of the prime line.

75

HTML Toolkit Programmers Reference Guide

GetIsProgrammable( )
Definition
BOOLEAN GetIsProgrammable()

Description
Returns PBX programmability of this key from HTML applications. See Tables 2 through
6 in the Button Attribute section to see which keys are programmable.

Arguments
None

Returns
true if programmable, false if not programmable.

Notes
Just because this function returns true, doesnt mean that it can be reprogrammed by
using the SetButtonFunction method as some programming functions can only be set by
the administrator on the PBX. See table 1 for details to see HTML application
programmable functions.

Example
TelML.Buttons.Item("SK1").GetIsProgrammable();
// Returns false

76

HTML Toolkit Programmers Reference Guide

GetIndex( )
Definition
NUMBER Index()

Description
Returns the location of this ButtonItem in the collection. See Button Attribute: Index for
more information regarding this attribute.

Arguments
None

Returns
Location of ButtonItem in this collection.

Notes
None

Example
var sk1_index = TelML.Buttons.Item("SK1").GetIndex();
var screenkey1_index = TelML.Buttons.Item("screenkey1").GetIndex();
// sk1_index is equal to screenkey1_index since they refer to the
// same ButtonItem in the button collection.

77

HTML Toolkit Programmers Reference Guide

GetNumber( )
Definition
NUMBER GetNumber ()

Description
Returns the Hardware ID Code for this button. See Button Attribute: Hardware ID Code
for more details.

Arguments
None

Returns
The Hardware ID Code for the button.

Notes
These numbers are used internally and are not really of any use to an HTML Apps
programmer.

Example
TelML.Buttons.Item("SK1").GetNumber();
// return value depends on set type.

78

HTML Toolkit Programmers Reference Guide

GetAssociatedLamp( )
Definition
NUMBER GetAssociatedLamp()

Description
Returns the Hardware ID Code for the associated LED if present. If not present, it returns
1. See Button Attribute: Associated LED Hardware ID Code for more details.

Arguments
None

Returns
-1 if no associated LED, otherwise Hardware ID Code for associated LED.

Notes
This function is useful for determining if there is an LED associated with a particular key.
The Hardware ID numbers are used internally and are not of any use to an HTML Apps
programmer.

Example
TelML.Buttons.Item("Volup").GetAssociatedLamp();
// returns 1 since there is no associated lamp

79

HTML Toolkit Programmers Reference Guide

GetAutoEventType( )
Definition
NUMBER GetAutoEventType ()

Description
Returns the current action to occur when this key is pressed. See Button Attribute:
AutoEvent Type for a description of the action types.

Arguments
None

Returns
0, 1, 2 or 3.

Notes
None

Example
// Setup an autoevent on a key.
TelML.Buttons.Item("SK1").SetAutoEventType(1,"editbox");
// Verify that it was set correctly.
TelML.Buttons.Item("SK1").GetAutoEventType();
// returns "1"

80

HTML Toolkit Programmers Reference Guide

GetAutoEventIDKeyCode( )
Definition
STRING GetAutoEventIDKeyCode () for GetAutoEventType ()==1,2,3
NUMBER GetAutoEventIDKeyCode () for GetAutoEventType ()==2,3

Description
Returns the current setting of the Auto Event Associated Data. See Button Attribute:
AutoEvent Type for description of the action types.

Arguments
None

Returns
The associated data for the Auto Event.

Notes
Types 2 or 3 may return either a number or a string.

Example
// Setup an autoevent on a key.
TelML.Buttons.Item("SK1").SetAutoEventType(1,"editbox");
// Verify that it was set correctly.
TelML.Buttons.Item("SK1").GetAutoEventIDKeyCode();
// returns "editbox"

81

HTML Toolkit Programmers Reference Guide

Press( )
Definition
VOID Press()

Description
Sends this key to the phone, as if the user pressed the key. Some keys will be sent to an
internal application in the phone, and all the rest of the keys will be sent to the PBX.

Arguments
None

Returns
No value

Notes
None

Example
// Simulate pressing the Message Key
TelML.Buttons.Item("Message").Press();

82

HTML Toolkit Programmers Reference Guide

SetButtonFunction()
Definition
NUMBER SetButtonFunction(STRING Label, STRING Function, STRING
FunctionAssociatedData)

Description
Programs a key using the information provided. Please see Button Attribute: Function for
details as to which functions are programmable via this method. Some keys cannot be
reprogrammed by using this command as some features programmed on key can only be
added or removed by the Administrator of the ICP.

Arguments
Type

Name

Description

STRING

label

Text to associate with key

STRING

function

Feature name to be associated with this key

STRING

functionAssociatedData

Parameter data for feature specified

Returns
-1 error setting function
0 no error occurred

Notes
This command can load down the performance of the ICP, so use this sparingly.

Example
// Program a speed dial on PK2 for 1234 labeled as Boss
TelML.Buttons.Item("PK2").SetButtonFunction("Boss","SpeedCall","12
34");
// Returns 0, if PK2 is previously unprogrammed.

83

HTML Toolkit Programmers Reference Guide

SetAutoEvent( ) Type 1 HTML AutoEvent


Definition
NUMBER SetAutoEvent(NUMBER autoEventType = 1, STRING IdCode )

Description
Sets an AutoEvent on an HTML element with the ID name provided when this key is
pressed. See Button Attribute: AutoEvent Type for further details.

Arguments
Type

Name

Description

NUMBER

autoEventType

Hardcoded to 1 for this behavior

STRING

idCode

HTML ID name of element to act on

Returns
-1 Invalid autoEventType
0 otherwise

Notes
The IdCode provided is not verified at assignment time. Should the IdCode not be found
in the loaded HTML document at keypress time, no action will occur.

Example
TelML.Buttons.Item("SCREENKEY5").SetAutoEvent(1,"idcheckbox");
// When SCREENKEY5 is pressed, it will cause an HTML element
// with an ID name of idcheckbox to be selected, focused, and clicked.

84

HTML Toolkit Programmers Reference Guide

SetAutoEvent( ) Type 2 Browser Keystroke Auto Event


Definition
NUMBER SetAutoEvent(NUMBER autoEventType = 2, STRING asciiChar)
NUMBER SetAutoEvent(NUMBER autoEventType = 2, NUMBER code )

Description
Directs specified asciiChar or code to the web browser when this key is pressed. To be
used when the TelML.Browser.SetUseBuiltInControls(0) method is invoked to turned off
the built in keyboard to allow use of an app designer defined keyboard for using HTML
forms. See the table in the Notes section below for valid values of code.
See Button Attribute: Auto EventType for further details.

Arguments
Type

Name

Description

NUMBER

AutoEventType

Hardcoded to 2 for this behavior

STRING

AsciiChar

First character of string is sent to browser

NUMBER

Code

Numerical code to send to the browser

Returns
-1 invalid autoEventType
0 no error

Notes
The code or asciiChar provided is not verified at assignment time. Should an invalid code
or asciiChar be sent, undesirable behaviours may occur.
To determine the hexadecimal code value, refer to left column to determine the first hex
digit and then refer to top row to determine the second hex digit.

85

HTML Toolkit Programmers Reference Guide


Table 7.Valid numerical keystroke codes

BS

A
LF

TAB

CR

ESC

2 SPACE !

"

&

'

<

>

Other valid numerical keystroke codes presented with decimal and


hexadecimal representations.
PgUp

(18688)

(0x4900)

PgDn

(20736)

(0x5100)

Home

(18176)

(0x4700)

End

(20224)

(0x4f00)

UpArrw

(18432)

(0x4800)

DnArrw

(20480)

(0x5000)

LftArrw

(19200)

(0x4b00)

RtArrw

(19712)

(0x4d00)

Shift-Tab ( 3840)

(0x0f00)

*Ctl-Bksp(

127)

(0x007f)

Example
TelML.Buttons.Item("SCREENKEY5").SetAutoEvent(2,"a");
// Will send the key "a" to the browser when SCREENKEY5 key is pressed.

86

HTML Toolkit Programmers Reference Guide

SetAutoEvent( ) Type 3 Phone Keystroke Auto Event


Definition
NUMBER SetAutoEvent(NUMBER autoEventType = 3, STRING keyName)
NUMBER SetAutoEvent(NUMBER autoEventType = 3, NUMBER keyIndex )

Description
When this key is pressed, the auto event handler will access the key collection using the
Item method (using the supplied keyName or keyIndex) and invoke the Press() method
on that key. See Button Attribute: AutoEventType for further details.

Arguments
Type

Name

Description

NUMBER

AutoEventType

Hardcoded to 3 for this behavior

STRING

KeyName

Name of key to press, passed to item

NUMBER

KeyIndex

Index of key to press, passed to item

Returns
-1 invalid autoEventType
0 no error

Notes
The supplied keyName or keyIndex values not validated when calling this function.
Should the keyName or keyIndex not exist when the event occurs, a runtime error will
occur.

Example
TelML.Buttons.Item("PK1").SetAutoEvent(3,"PK1");
// Whenever the PK1 key is pressed, it will forward it to the PBX.

87

HTML Toolkit Programmers Reference Guide

ClearAutoEvent( )
Definition
NUMBER ClearAutoEvent ()

Description
Sets the Auto Event Type to type 0 which results in no action on key press. See Button
Attribute: AutoEvent Type for further details.

Arguments
None

Returns
0

Notes
None

Example
TelML.Buttons.Item("PK1").ClearAutoEvent();
// Removes any auto events that may have been on PK1.

88

HTML Toolkit Programmers Reference Guide

GetRelativePosition( )
Definition
OBJECT GetRelativePosition()

Description
This function will return an object with the relative key offsets from the top left
"SCREENKEY" in which the application is running.

Arguments
None

Returns
Undefined, if this method is called on one of the SCREENKEYS that is not available to
the running application.
An object with two properties: row and column. The row offset increases towards the
bottom, and the column offset increases towards the right.

Notes
None

Example
//
// Graphical Key Application Programmed against four 5340 keys
// starting at SCREENKEY5.
//
var topLeft = TelML.Buttons.Item("SCREENKEY5").GetRelative();
// topLeft = {row: 0, column: 0);
var bottomLeft = TelML.Buttons.Item("SCREENKEY6").GetRelative();
// bottomLeft = { column: 0, row: 1);
var topRight = TelML.Buttons.Item("SCREENKEY16").GetRelative();
// topRight = { column: 1, row: 0);
var bottomRight = TelML.Buttons.Item("SCREENKEY17").GetRelative();
// bottomRight = { column: 1, row: 1);
var outOfRange = TelML.Buttons. Item("SCREENKEY7").GetRelative();
// outOfRange = undefined.
//
// Full Screen Application
//

89

HTML Toolkit Programmers Reference Guide


var topLeft = TelML.Buttons.Item("SCREENKEY1").GetRelative();
// topLeft = {row: 0, column: 0);
//
// New Page Application
//
var topLeft = TelML.Buttons.Item("SCREENKEY4").GetRelative();
// topLeft = {row: 0, column: 0);

RegisterKey( )
Definition
BOOLEAN RegisterKey()

Description
This method registers a key such that HTML Application will receive
TelMLEvent.OnButtonPress events when it is pressed and/or released.
By registering the key, it will also be possible to control the corresponding lamp (if
applicable) by using the TelML.Lamps object.

Arguments
None

Returns
True if successful, False otherwise.

Notes
Each application type has different rules for which keys can be registered. Please see the
appropriate section describing all of the application types.

Example
var result = TelML.Buttons.Item("Message").RegisterKey();
// result = true (sample)
Message key presses will now be reported
to applications that are allowed to register this key.

90

HTML Toolkit Programmers Reference Guide

DeregisterKey( )
Definition
BOOLEAN DeregisterKey()

Description
This method de-registers a key such that HTML Application will no longer receive
TelMLEvent.OnButtonPress events when it is pressed and/or released.
By deregistering a key, it will not be possible to control the corresponding lamp (if
applicable) using the TelML.Lamps object.

Arguments
None

Returns
True if successful, False otherwise.

Notes
Each application type has different rules for which keys can be de-registered. Please see
the appropriate section describing all of the application types.

Example
var result = TelML.Buttons.Item("Message").DeregisterKey();
// result = true (sample)
Message key presses will now be reported
to applications that are allowed to register this key.

91

HTML Toolkit Programmers Reference Guide

Lamp Collection
The lamp collection enumerates all the lamps, physically present on the phone as well as
additional lamps that are located on pages 2 and 3 of the phone application. By using the
lamp collection interfaces the programmer can:

Monitor all lamps that the PBX can see.

Control visible lamps while in the HTML app, by turning them on or off, or flashing at
different speeds

In order to control a lamp associated with a key, the key must be registered implicitly because
of the type of application OR must be explictly registered by using the
TelML.Buttons.RegisterKeyGroup or TelML.Buttons.Item().RegisterKey API commands.
The ringer lamp is not controllable by TelML since it is used exclusively by the PBX.
In order to explain the operation of the Lamp Collection, the available information about
Lamps will be presented. Subsequently, the TelML methods to access this data will be
presented.

Lamp Attributes
Each Lamp has the following attributes:

Name

Telephony Name

State

Telephony State

Color

Index

Hardware ID Code

Relative Position

Lamp Attribute: Name


For lamps associated with hard keys, the Name attribute is a string that describes the key
based on the symbols pre-printed on each key.
For lamps associated with soft keys and programmable keys, it is a string describing its
placement relative to the screen and the other keys. These lamps have names starting at
SCREENKEY1 through SCREENKEY11 for the lamps on the left side of 5330 and 5340
displays, and from SCREENKEY12 through SCREENKEY22 for the lamps on the right side
of the 5340 display.
There is one lamp, not associated with a key, that is the Ringer.
See tables 2 through 6 in the Button Attributes section to see the naming of the lamps
associated with the keys. Furthermore, see Figure 11 for the names and locations on the
5330 set, and see Figure 13 for the names and locations on the 5340 set.

Lamp Attribute: Telephony Name


For lamps associated with hard keys, the Telephony Name attribute is the same as Name.

92

HTML Toolkit Programmers Reference Guide


For lamps associated with programmable keys, the Telephony Name attribute is the name
of the key according to the PBX.
The PBX sees the phones as having more lamps than are actually present, as they are
presented on three pages in the phone application. The PBX sees the 5330 set as having 24
programmable keys with lamps and the 5340 set as having 48 programmable keys with
lamps.
For the 5330 set in the phone application, the names of these lamps are PK1 through PK8 for
the first page, and PK9 through PK17 for the second page, and PK18 through PK24 for the
last page.
For the 5340 set in the phone application, the names of these lamps are PK1 through PK16
for the first page, and PK17 through PK32 for the second page, and PK33 through PK48 for
the last page.
For lamps associated with soft keys, the Telephony Name attribute is SK1 through SK3 for
the 5330, and SK1 through SK6 for the 5340.
There is one lamp, not associated with a key, that is the Ringer.
See tables 2 through 6 in the Button Attributes section to see the naming of the lamps
associated with the keys. Furthermore, see Figure 12 for the telephony names and locations
on the 5330 set, and see Figure 14 for the telephony names and locations on the 5340 set.

Lamp Attribute: State


This represents the current local control setting for the Lamps associated with a key, or the
ringer. Please be aware that the only lamps that are visible to the HTML app writer are those
LEDs that would be shown on the first page of the phone application. To see what state the
PBX has the lamp in, read the Telephony State Attribute. The possible values for this
attribute are shown in the table below:
Table 4. Lamp State Values
State

Description

off

on

Flashing: 50ms on, 50 ms off

Flashing: 100ms on, 100 ms off

Flashing: 150ms on, 150ms off

Flashing: 200ms on, 200 ms off

Flashing: 250ms on, 250 ms off

Flashing: 300ms on, 300 ms off

Flashing: 350ms on, 350 ms off

Flashing: 400ms on, 400 ms off

10

Flashing: 450ms on, 450 ms off

11

Flashing: 500ms on, 500ms off

..

21

Flashing: 1s on, 1s off

93

HTML Toolkit Programmers Reference Guide

State

Description

31

Flashing: 1.5s on, 1.5s off

41

Flashing 2s on, 2s off.

51

Flashing 2.5s on, 2.5ms off.

61

Flashing 3s on, 3s off.

62

Flashing: 3050ms on, 3050ms off

63

Flashing: 3100ms on, 3100ms off

64

Flashing: 3200ms on, 3200ms off

Lamp Attribute: Telephony State


The telephony state is the current setting of an LED as the PBX sees it. The values here are
NOT the same scheme as described in the above Lamp Attribute: State section.
The values and their expected behavior are:
Table 5. Telephony State Values
TelephonyState

Description

Off

On

flashing

Lamp Attribute: Telephony Color


The telephony color is the current setting of an LED as the PBX sees it.
1 Red
2 Green
0 anything else

Lamp Attribute: Color


The color attribute of a lamp can be set for the SCREENKEYS. The hard key indicators are
red only. The possible values are 0 for green, and 1 for red. Green is the default color.

Lamp Attribute: Index


This attribute represents the relative location of this lamp in the collection.
The value of the index for a particular lamp associated with a key may change between
hardware types, and software versions. Therefore, it is recommended that index values are

94

HTML Toolkit Programmers Reference Guide


not hardcoded into applications. The index value can be obtained at run-time and used as a
shorthand for referencing the item in the collection.
As such, the mapping of index to lamps is not published in this document for this reason.
This index number does not correspond with the associated button in the Button collection.
To find the associated button, use the Item accessor with the search parameter of either the
LampName or TelephonyLampName.

Lamp Attribute: Hardware ID Code


This attribute represents the hardware ID code for the Lamp associated with a button. This
value is used internally, and is of no use to an HTML application.
Similar to the Index attribute, the value of the Hardware ID Code may change between
hardware types, and software versions. Therefore, it is recommended that Hardware ID
values are not hardcoded into applications.
As such, the mapping of Hardware ID to lamps is not published in this document for this
reason.

Lamp Attribute: Relative Position


When running a Graphical Key Application or New Page Application, this attribute provides
the location of the lamp relative to the top left lamp assigned to the application.
The relative position is described as a row and column. The row increases towards the
bottom of the phone. The column increases towards the right of the phone.
Figure 12 for the telephony names and locations on the 5330 set and Figure 14 for the
telephony names and locations on the 5340 set.
This attribute is shown in See tables 2 through 6 in the Button Attributes section to see the
relative position for Full Screen applications and similar application types, and New Page
applications. Relative position cannot be put into a table for applications running as Graphical
Key Applications because they are completely dependent on the programming of the keys.

95

HTML Toolkit Programmers Reference Guide

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.Lamps.IsSupported("Item");
// returns "Item"

96

HTML Toolkit Programmers Reference Guide

Item()
Definition #1
LampItem Item(STRING Name)

Description
Retrieve an item from the Collection using the lamps Name or Telephony Name.

Arguments
Type
STRING

Name
Name

Description
Name to search in Name and Telephony Name

Returns
undefined if a match cannot be found in the Name or Telephony Name attributes of the
items of the LampCollection.
If a match is found, then a reference to a LampItem object is returned.

Notes
Case insensitive search is performed.

Example
var PrimeLineLamp = TelML.Lamps.Item("PK1");
var BottomLeftLamp = TelML.Lamps.Item("SCREENKEY11");
// On a 5330 PrimeLineLamp is the same as BottomLeftLamp.
// On a 5340 PrimeLineLamp.GetLampName()

is "SCREENKEY22"

// and BottomLeftLamp.GetTelephonyLampName() is "PK2".

Definition #2
LampItem Item(NUMBER Index)

Description
Retrieve an item from the Collection using the Index.

97

HTML Toolkit Programmers Reference Guide

Arguments
Type
NUMBER

Name
index

Description
Name to search in Name and Telephony Name attributes

Returns
undefined if a button of the supplied index cannot be found in the LampCollection. If a
Lamp can be found with the supplied index is found, then a reference to a ButtonItem
object is returned.

Notes
The index number for a particular key should not be hardcoded into HTML apps because
it could change in future versions.

Example
// Establish Key Event Handler
TelMLEvent.OnLampMode = myLampHandler;
function myLampHandler()
{
// changedLampIndex contains the index of the changed lamp
var changedLampIndex = TelMLEvent.LampIndex;
// changedLampItem is a reference to the changed lamp item .
var changedLampItem = TelML.Lamps.Item(changedLampIndex);
// changedLampName is the string name of the changed lamp.
var changedLampName = changedLampItem.GetKeyName();
}

98

HTML Toolkit Programmers Reference Guide

RelativePosition( )
Definition
LampItem RelativePosition(column, row)

Description
This collection accessor is similar to the Item method. This method requires a column,
and row offset from the top left "SCREENKEY" that is available to the application. This
method is particularly useful for developing applications to run as Graphical Key
Applications and New Page Applications so that they can be location independent.
For all application types other than Graphical Key Applications and New Page
Applications, the origin position is "SCREENKEY1" the top left lamp.

Arguments
Column For 5330 sets, this value can only be 0 because there is only one column of
lamps. For a 5340 set with the same Graphical Key application programmed against the
programmable key on the left and the right side the value 0 refers to the lamp on the left,
and the value 1 would refer to the lamp on the right. For a 5340 set with a graphical key
application programmed to a key on the right side this value can only be 0 because there
are no more columns beyond this. All non Graphical Key applications on the 5340 can be
0 or 1.
Row The lamp row offset increases towards the bottom of the screen based on the top
left "SCREENKEY" available to the application.

Returns
The LampItem object if the specified relative position is available to the application.
Otherwise, it returns undefined.

Notes
This method is useful to determine the amount of screen space programmed for a
Graphical Key application. An application can start testing from 0,0 and explore until
undefined is returned.

Example
//
// Graphical Key Application Programmed against four 5340 keys
// starting at SCREENKEY5.
//
var topLeft = TelML.Lamps.RelativePosition(0,0).GetLampName();
// topLeft = "SCREENKEY5"
var bottomLeft = TelML.Lamps.RelativePosition(0,1).GetLampName();
// bottomLeft = "SCREENKEY6";

99

HTML Toolkit Programmers Reference Guide


var topRight = TelML.Lamps.RelativePosition(1,0).GetLampName();
// topRight = "SCREENKEY16";
var bottomRight = TelML.Lamps.RelativePosition(1,1).GetLampName();
// bottomRight = "SCREENKEY17";
var outOfRange = TelML.Lamps.RelativePosition(2,1);
// outOfRange = undefined.
//
// Full Screen Application
//
var topLeft = TelML.Lamps.RelativePosition(0,0).GetLampName();
// topLeft = "SCREENKEY1";
//
// New Page Application
//
var topLeft = TelML.Lamps.RelativePosition(0,0).GetLampName();
// topLeft = "SCREENKEY4";

Count( )
Definition
NUMBER Count()

Description
Return the number of lamps in the collection.

Arguments
None

Returns
The number of lamps.

Notes
None

Example
// returns the number of lamps in the collection
TelML.Lamps.Count();

100

HTML Toolkit Programmers Reference Guide

BuildTable( )
Definition
See TelML Definition Common Elements

Description
Valid variables for the header/footer section are:

%Count%

Valid variables for the body section are:

%LampName%

%TelephonyLampName%

%TelephonyState%

%TelephonyColor%

%State%

%Color%

%Index%

%Number%

Arguments
See TelML Definition Common Elements

Returns
See TelML Definition Common Elements

Notes
See TelML Definition Common Elements

Example
var HTMLText = TelML.Lamps.BuildTable("%Count% items to
follow<br>",
"<br> LampName = %LampName%; Color = %COLOR%; index = %iNdEx%",
"%Count% items displayed");
// HTMLText will contain HTML code to display selected information
about all of the lamps.

101

HTML Toolkit Programmers Reference Guide

Lamp Item
IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.Lamps.Item("Message").IsSupported("GetLampName");
// returns "GetLampName"

102

HTML Toolkit Programmers Reference Guide

GetLampName( )
Definition
STRING GetLampName()

Description
Returns the Lamp Name for this lamp. See Lamp Attribute: Name to see how the keys
and associated lamps are named. Please note that for programmable keys beyond the
first page as shown in the Phone Application do not have key names because they are
not physical lamps. They do have Telephony Lamp Names as seen by the PBX.

Arguments
None

Returns
The string containing the Lamp Name.

Notes
None

Example
TelML.Lamps.Item("MESSAGE").GetLampName();
// returns "Message"

103

HTML Toolkit Programmers Reference Guide

GetTelephonyLampName( )
Definition
STRING GetTelephonyLampName()

Description
Returns the Telephony Name for this lamp. See Lamp Attribute: Telephony Name to see
how the keys and associated lamps are named.

Arguments
None

Returns
The string containing the Telephony Lamp Name.

Notes
None

Example
TelML.Lamps.Item("SCREENKEY1").GetTelephonyLampName();
// returns "SK1" for both 5330 and 5340

104

HTML Toolkit Programmers Reference Guide

GetColor()
Definition
NUMBER GetColor()

Description
Returns the locally controlled color for this lamp. See Lamp Attribute: Color for details.

Arguments
None

Returns
The current color set for this lamp. 0 is green, 1 is red.

Notes
Green is the default color. The hardkey indicators and ringer can be red only. If set to
green they will not be visible.
PK1 through PK8 are the only visible PK keys on a 5330, and PK1 through PK16 are the
only visible PK keys on a 5340.
The ringer lamp is not controllable by TelML since it is used exclusively by the PBX.
In order to control a lamp associated with a key, the key must be registered implicitly
because of the type of application OR must be explicitly registered by using the
RegisterKeyGroup or RegisterKey API commands.

Example
TelML.Lamps.Item("SCREENKEY1").GetColor();
// Returns 0, green which is the default color

105

HTML Toolkit Programmers Reference Guide

SetColor()
Definition
NUMBER SetColor(NUMBER color)

Description
Locally control the color for this lamp. See Lamp Attribute: Telephony Color for more
details.

Arguments
Type
NUMBER

Name
color

Description
New lamp color: 0-green; 1-red

Returns
If a change is required to make it the specified color, it is returned. 0 is green, 1 is red.
Otherwise:
-1 for bad color specified,
-2 for no change needed

Notes
Green is the default color. The hardkey indicators and ringer can be red only. If set to
green they will not be visible.
PK1 through PK8 are the only visible PK keys on a 5330, and PK1 through PK16 are the
only visible PK keys on a 5340.
The ringer lamp is not controllable by TelML since it is used exclusively by the PBX.
In order to control a lamp associated with a key, the key must be registered implicitly
because of the type of application OR must be explicitly registered by using the
RegisterKeyGroup or RegisterKey API commands.

Example
TelML.Lamps.Item("SCREENKEY1").SetState(2);
// Top left key is now flashing 50ms on/off in default color
(green)
TelML.Lamps.Item("SCREENKEY1").SetColor(1);
// Will return "0", and Top left key is now flashing red

106

HTML Toolkit Programmers Reference Guide

GetState()
Definition
NUMBER GetState()

Description
Returns locally controlled state of this lamp. See Lamp Attribute: State for definition of the
state value.

Arguments
None

Returns
0-64 (see Lamp Attribute: State for details)

Notes
0 is the default state.
PK1 through PK8 are the only visible PK keys on a 5330, and PK1 through PK16 are the
only visible PK keys on a 5340.
The ringer lamp is not controllable by TelML since it is used exclusively by the PBX.
In order to control a lamp associated with a key, the key must be registered implicitly
because of the type of application OR must be explicitly registered by using the
RegisterKeyGroup or RegisterKey API commands.

Example
// Assume lamp is off.
TelML.Lamps.Item("SCREENKEY1").GetState();
// Returns 0

107

HTML Toolkit Programmers Reference Guide

SetState()
Definition
NUMBER SetState(NUMBER state)

Description
Locally controls the state of this lamp. See Lamp Attribute: State for definition of the state
value.

Arguments
Type
NUMBER

Name
state

Description
New lamp state

Returns
If a change is required to make it the specified state, it is returned
Otherwise:
-1 for bad state specified,
-2 for no change needed

Notes
0 is the default state.
PK1 through PK8 are the only visible PK keys on a 5330, and PK1 through PK16 are the
only visible PK keys on a 5340.
The ringer lamp is not controllable by TelML since it is used exclusively by the PBX.
In order to control a lamp associated with a key, the key must be registered implicitly
because of the type of application OR must be explicitly registered by using the
RegisterKeyGroup or RegisterKey API commands.

Example
// Assume lamp is off.
TelML.Lamps.Item("SCREENKEY1").SetState(1);
// Returns 1, The lamp associated with SCREENKEY1 will
// turn on with the default color (green)

108

HTML Toolkit Programmers Reference Guide

GetTelephonyState()
Definition
NUMBER GetTelephonyState()

Description
Returns the PBXs view of the state of this lamp. See Lamp Attribute: Telephony State for
definition of the telephony state value.

Arguments
None

Returns
Returns the PBXs view of the state of this lamp.

Notes
None

Example
TelML.Lamps.Item("PK1").GetTelephonyState();
// Returns current lamp telephony state of the prime line key.

109

HTML Toolkit Programmers Reference Guide

GetTelephonyColor()
Definition
NUMBER GetTelephonyColor()

Description
Returns the PBXs view of the color of this lamp. See Lamp Attribute: Telephony Color for
definition of the telephony color value.

Arguments
None

Returns
Returns the PBXs view of the state of this lamp.

Notes
None

Example
TelML.Lamps.Item("PK1").GetTelephonyColor();
// Returns the current color the PBX has set for PK1.

110

HTML Toolkit Programmers Reference Guide

GetIndex( )
Definition
NUMBER Index()

Description
Returns the location of this LampItem in the collection. See Lamp Attribute: Index for
more information regarding this attribute.

Arguments
None

Returns
Location of this LampItem in the collection.

Notes
None

Example
var sk1_index = TelML.Lamps.Item("SK1").GetIndex();
var screenkey1_index = TelML.Lamps.Item("screenkey1").GetIndex();
// sk1_index is equal to screenkey1_index since they refer to
// the same LampItem in the lamp collection.

111

HTML Toolkit Programmers Reference Guide

GetNumber( )
Definition
NUMBER GetNumber ()

Description
Returns the Hardware ID Code for this Lamp. See Lamp Attribute: Hardware ID Code for
more details.

Arguments
None

Returns
The Hardware ID Code for the lamp.

Notes
These numbers are used internally and are not really of any use to an HTML Apps
programmer.

Example
TelML.Lamps.Item("SK1").GetNumber();
// Returns The Hardware ID Code for the top left lamp.

112

HTML Toolkit Programmers Reference Guide

GetRelativePosition( )
Definition
OBJECT GetRelativePosition()

Description
This function will return an object with the relative lamp offsets from the top left
"SCREENKEY" in which the application is running.

Arguments
None

Returns
Undefined, if this method is called on one of the SCREENKEYS that is not available to
the running application.
An object with two properties: row and column. The row increases towards the bottom,
and the column increases towards the right.

Notes
None

Example
//
// Graphical Key Application Programmed against four 5340 keys
// starting at SCREENKEY5.
//
var topLeft = TelML.Lamps.Item("SCREENKEY5").GetRelative();
// topLeft = {row: 0, column: 0);
var bottomLeft = TelML.Lamps.Item("SCREENKEY6").GetRelative();
// bottomLeft = { column: 0, row: 1);
var topRight = TelML.Lamps.Item("SCREENKEY16").GetRelative();
// topRight = { column: 1, row: 0);
var bottomRight = TelML.Lamps.Item("SCREENKEY17").GetRelative();
// bottomRight = { column: 1, row: 1);
var outOfRange = TelML.Lamps.Item("SCREENKEY7").GetRelative();
// outOfRange = undefined.
//
// Full Screen Application
//

113

HTML Toolkit Programmers Reference Guide

var topLeft = TelML.Lamps.Item("SCREENKEY1").GetRelative();


// topLeft = {row: 0, column: 0);
//
// New Page Application
//
var topLeft = TelML.Lamps.Item("SCREENKEY4").GetRelative();
// topLeft = {row: 0, column: 0);

114

HTML Toolkit Programmers Reference Guide

Lines Collection
The Line collection is used to discover the number of lines in the phone and iterate through
the lines. Lines are returned in order. Lines are numbered from 0 to 3 for phones operating in
MiNet mode. Lines are numbered 1 to 4 for phones operating in SIP mode. The set only
enumerates the first 4 lines into the Lines collection.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition Common Elements

Notes
None

Example
TelML.Lines.IsSupported("Item");
// returns "Item"

115

HTML Toolkit Programmers Reference Guide

Item()
Definition
LineItem Item( NUMBER index )

Description
Returns the LineItem for the corresponding index.

Arguments
Type
NUMBER

Name
index

Description
The index of the LineItem to return

For phone operating in MiNet mode:


0 - line 1
1 - line 2
2 - line 3
3 - line 4
For phone operating in SIP mode:
1 - line 1
2 - line 2
3 - line 3
4 - line 4

Returns
A reference to a LineItem if successful,
Undefined if the index does not exist.

Notes
None

Example
var myLine = TelML.Lines.Item(1);
// myLine is a reference to a LineItem for the line on index 1

116

HTML Toolkit Programmers Reference Guide

Count()
Definition
NUMBER Count( )

Description
Returns the number of lines.

Arguments
None.

Returns
The number of lines.

Notes
Only the first 4 lines are enumerated.

Example
var numberOfLines = TelML.Lines.Count();
// numberOfLines contains the number of lines enumerated

117

HTML Toolkit Programmers Reference Guide

BuildTable()
Definition
STRING BuildTable( STRING header, STRING body, STRING footer )

Description
The BuildTable function has been described in TelML Definition Common Elements.
Supported variables in each section are:
header: %count%
body: %Index%, %DirectoryNumber%, %DirectoryNumberURI%, %IsPrime%
footer: %count%

Arguments
Type

Name

Description

STRING

header

The header string

STRING

body

The body string

STRING

footer

The footer string

Returns
The string as defined in the corresponding TelML Definition Common Elements section.

Notes
None

Example
var HTMLText = TelML.Lines.BuildTable("%Count% items to
follow<br>",
"<br> DN = %DirectoryNUMBER%; Prime = %ISPRIME%;",
"%Count% items displayed");
// HTMLText will contain HTML code to display selected information
about all of the lines in the collection.

118

HTML Toolkit Programmers Reference Guide

LineItem
The LineItem is used to make and answer calls on the line. It is also used to get information
about the line such as its index, its DN, if its the prime line and the states and events
supported on the line.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition Common Elements.

Arguments
Type
STRING

Name
item

Description
The item to be queried, or blank to query all items

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.Lines.Item(2).IsSupported("");
// Returns a comma separated list of all the LineItem methods
TelML.Lines.Item(2).IsSupported("GetIndex");
// Returns "GetIndex"

119

HTML Toolkit Programmers Reference Guide

GetIndex()
Definition
NUMBER GetIndex()

Description
Returns the index number of this LineItem in the collection.

Arguments
None

Returns
Notes
None

Example
var myLineItem = TelML.Lines.Item(2);
// Store a reference to the line on index 2 for easy referencing.
myLineItem.GetIndex();
// returns 2;

120

HTML Toolkit Programmers Reference Guide

GetDirectoryNumber()
Definition
STRING GetDirectoryNumber()

Description
This function returns the directory number (i.e. the extension) of the line in a format that
can be used by MakeCall and DialDigits.

Arguments
None

Returns
The dn in a format that can be used by MakeCall and DialDigits, e.g. 1234
If the value is unknown, it will return "".

Notes
None

Example
TelML.Lines.Item(2).GetDirectoryNumber();
// returns the directory number of the line on index 2.

121

HTML Toolkit Programmers Reference Guide

GetDirectoryNumberURI()
Definition
STRING GetDirectoryNumberURI()

Description
This function returns the directory number of the line in a standard TelURI format.
Examples:
If the telephone has extension 1234 and PSTN number is 222-333-4444, the format is
Tel:+222-333-4444;ext=1234
If the telephone has extension 1234 and the PSTN number is unknown, the format is
Tel:;ext=1234
This format cannot be used by MakeCall and DialDigits.

Arguments
None

Returns
The dn in a standard TelURI format.

Notes
None

Example
TelML.Lines.Item(2).GetDirectoryNumberURI();
// returns the directory number URI of the line on index 2.

122

HTML Toolkit Programmers Reference Guide

GetIsPrime()
Definition
BOOLEAN GetIsPrime()

Description
This function returns true if this line is the prime line, and false otherwise. The prime line
is the line that is selected when the user goes off hook or presses the speaker key.

Arguments
None

Returns
true if the line is the prime line
false if the line is not the prime line

Notes
None

Example
TelML.Lines.Item(3).GetIsPrime();
// return false

123

HTML Toolkit Programmers Reference Guide

IsLineStateSupported()
Definition
STRING IsLineStateSupported( STRING lineEvent)

Description
This function returns the line states that are supported by the phone.

Arguments
Type
STRING

Name
lineState

Description
The line state to be queried, or blank to query all states

Returns
The line states supported.

Notes
For 5330 and 5340 phones, "" is returned, i.e. line states are not supported.

Example
TelML.Lines.Item(3).IsLineStateSupported("");
// returns ""
TelML.Lines.Item(3).IsLineStateSupported("Idle");
// returns ""

124

HTML Toolkit Programmers Reference Guide

IsLineEventSupported()
Definition
STRING IsLineEventSupported( STRING event )

Description
This function returns the line events that are supported by the phone. If the parameter is
blank, all line events supported by the phone are returned. If the parameter is non-blank,
the event is returned if the parameter is supported, or blank is returned.

Arguments
Type
STRING

Name
Event

Description
The line event to be queried, or blank to query all events

Returns
The line events supported by the phone:
OnConnectionCleared, OnDelivered, OnEstablished, OnOriginated.
See TelML Events section for more details about these events..

Notes
None

Example
var myEvents = TelML.Lines.Item(2).IsLineEventSupported();
// returns
"OnConnectionCleared,OnDelivered,OnEstablished,OnOriginated"

125

HTML Toolkit Programmers Reference Guide

AnswerCall()
Definition
NUMBER AnswerCall()

Description
This function attempts to answer a call on this line by sending a key press for the
corresponding line (i.e. the PK key) to the 3300 ICP.
If the phone is not in the correct state (e.g. a superkey session, or a MiXML session) the
call will not be answered, and the function will not return with an error code. It is up to the
programmer to keep track of the state of the line and the phone to ensure both are in the
correct state for this function to operate correctly.

Arguments
None

Returns
0

Notes
None

Example
TelML.Lines.Item(3).AnswerCall();
// Will answer the call on the line on index 3

126

HTML Toolkit Programmers Reference Guide

ClearCall()
Definition
NUMBER ClearCall()

Description
This function attempts to disconnect a call on this line. It sends two key press messages
to the 3300 ICP: the first to select the line (i.e. the PK key corresponding to the line), and
the second to cancel the call via the cancel key.
If the phone is not in the correct state (e.g. a superkey session, or a MiXML session) the
call will not be cleared, and the function will not return with an error code. It is up to the
programmer to keep track of the state of the line and the phone to ensure both are in the
correct state for this function to operate correctly.

Arguments
None

Returns
0

Notes
None

Example
TelML.Lines.Item(3).ClearCall();
// Will clear the call on the line on index 3.

127

HTML Toolkit Programmers Reference Guide

DialDigits()
Definition
NUMBER DialDigits( STRING digits )

Description
This function sends keypress messages to the 3300 ICP to dial the digits in the
parameter string on this line. This function assumes the line is in the correct state to dial
the digits.
This function is similar to MakeCall(), but this function does not select the line before
dialling the digits. It assumes the line has already been selected.

Arguments
Type
STRING

Name
digits

Description
The digits to dial on the line

Returns
0

Notes
None

Example
TelML.Lines.Item(2).DialDigits("1234");
// Will dial digits 1234 on the line on index 3.

128

HTML Toolkit Programmers Reference Guide

MakeCall()
Definition
NUMBER MakeCall( STRING digits )

Description
This function sends keypress messages to the 3300 ICP to select this line and dial the
digits in the parameter string. The line and phone must be in the correct state for the
function to make the call. For example, if the phone is in a superkey session, the key
press messages will be interpreted by the 3300 ICP in the context of that superkey
session and a call will not be made. Also, if the line is already on a call, this function will
just reselect the line and then send digits (DTMF tones) on that line. It is up to the
programmer to keep track of the state of the line and the phone to ensure both are in the
correct state for a call to be made.

Arguments
Type
STRING

Name
digits

Description
The digits of the party to call

Returns
0

Notes
None

Example
TelML.Lines.Item(2).MakeCall("1234");
// Makes a call on the line on index 2 by dialing 1234

129

HTML Toolkit Programmers Reference Guide

TextDisplay Collection
The TextDisplay collection gives information about the display area on the phone that is
written by the 3300 ICP.
There is a TelML event that occurs whenever this display is changed. A TelML program may
hook into this event, read the values from this object, and then show this information on the
GUI of the custom application.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied item, or "" for a comma separated list of
supported items.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.Phone.IsSupported("Item");
// returns "Item"

130

HTML Toolkit Programmers Reference Guide

Item()
Definition
STRING Item( NUMBER index )

Description
The 3300 ICP writes two lines of information on the phones display. This function returns
a string containing that line of text.

Arguments
Type
NUMBER

Name
Index

Description
The index of the 3300 display line. Index can be 0 or 1.

Returns
The 3300 ICP string at the line index provided or undefined for an invalid index.

Notes
The TelMLEvent.OnDisplayChanged event is triggered whenever the contents of the
display changes.

Example
// Code snippet to put a phone display into an HTML page

// Reads the screen and display as part of an HTML page


document.write("<div
id=display>"+TelML.TextDisplay.Item(0)+"<br>"+
TelML.TextDisplay.Item(1)</div><br>");
// Set up an event handler which will refresh the text on the HTML
page
// whenever the display changes.
TelMLEvent.OnDisplayChanged = "\
document.getElementById('display').innerHTML=\
TelML.TextDisplay.Item(0)+'<br>'+TelML.TextDisplay.Item(1); ";

131

HTML Toolkit Programmers Reference Guide

Count()
Definition
NUMBER Count()

Description
This method returns the number of display lines on the phone written to by the 3300 ICP.
This is also the number of lines that can be accessed by the item method.

Arguments
None

Returns
The number of display lines on the phone written to by the 3300 ICP.

Notes
The count is the maximum number that can be used as the index in the item method
above.

Example
numberOfLines = TelML.TextDisplay.Count();
// will be 2 for 5330/5340

132

HTML Toolkit Programmers Reference Guide

GetWidth()
Definition
NUMBER GetWidth()

Description
This method returns the width of the 3300 ICP display line on the phone in characters.

Arguments
None

Returns
The width of the 3300 ICP display line on the phone in characters.

Notes
For 5330/5340, the width is 20.

Notes
The count is the maximum number that can be used as the index in the item method
above.

Example
TelML.TextDisplay.GetWidth();
// returns 20 for 5330/5340

133

HTML Toolkit Programmers Reference Guide

Browser Object
The browser object contains information about the phone browser operational characteristics.
There are methods to inject events, control the use of built in user controls, and to close
down the browser.

IsSupported()
Definition
STRING IsSupported( STRING item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied item, or "" for a list of all supported
items.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.Browser.IsSupported("InjectEvent");
// Returns "InjectEvent"

134

HTML Toolkit Programmers Reference Guide

InjectEvent()
This method sends an event to the browser. The browser will handle the event as though the
physical event had occurred.
The event types and parameters are exactly the same that are used for the SetAutoEvent
method of the ButtonItem objects. Refer to ButtonItem object, SetAutoEvent Types 1 through
3 for all the details.
Event Type can be:
1 = Browser Click
2 = Browser Keypress
3 = Phone Keypress
The event types and parameters are exactly the same that are used for the SetAutoEvent
method of the ButtonItem objects. Refer to ButtonItem object, Method: SetAutoEvent Types
1 through 3 for details.

Definitions
NUMBER InjectEvent(NUMBER eventType, NUMBER idKeycode)
NUMBER InjectEvent(NUMBER eventType, STRING idKeycode)

Description
See above and ButtonItem Method: SetAutoEvent types 1 through 3.

Arguments
See ButtonItem Method: SetAutoEvent types 1 through 3.
Returns
-1 bad eventType
0 otherwise

Notes
None

Comprehensive Example
// This example will create an HTML form with two text elements.
// Using InjectEvent, it will select the ZIP form element and
// then enter in 90210. This is only to demonstrate how to use

135

HTML Toolkit Programmers Reference Guide


// inject event, i.e. there are much better ways to do this.
// Additionally we hook up Previous and Next to navigate through
// the field, and SCREENKEY1 is hooked up to perform a backspace/delete.
// SCREENKEY11 is hooked up to dial the operator at extension 0
// Create an HTML form with two text elements
document.write("\
<form name=ui>\
Name:<input type=text name=name id=NameBox size=10><br>\
ZIP:<input type=text name=zip id=ZIPBox size=10>\
</form>\
");
// Turn off the default user keyboard for the text elements
TelML.Browser.SetUseBuiltInControls(0);
// Select the ZIP form element
TelML.Browser.InjectEvent(1,"ZIPBox");
// Enter in the famous US zip code
TelML.Browser.InjectEvent(2,"9");
TelML.Browser.InjectEvent(2,"0");
TelML.Browser.InjectEvent(2,"2");
TelML.Browser.InjectEvent(2,"1");
TelML.Browser.InjectEvent(2,"0");
// Hook up previous and next for navigation through the field
TelML.Buttons.Item("Previous").SetAutoEvent(2,0x4b00);
TelML.Buttons.Item("Next").SetAutoEvent(2,0x4d00);
// Hook up the backspace key on SCREENKEY1
TelML.Buttons.Item("SCREENKEY1").SetAutoEvent(2,8);

// Hook up SCREENKEY11 to call the operator


// Determine key index of the zero key
var zeroKeyIndex = TelML.Buttons.Item("0" ).GetIndex();
// Link SCREENKEY to the press of the zero key
TelML.Buttons.Item("SCREENKEY11").SetAutoEvent(3,zeroKeyIndex);

136

HTML Toolkit Programmers Reference Guide

GetUseBuiltInControls()
Definition
NUMBER GetUseBuiltInControls()

Description
This method has been deprecated.

Arguments
None

Returns
0

Notes
None

Example
None.

SetUseBuiltInControls()
Definition
NUMBER SetUseBuiltInControls(NUMBER value)

Description
This method has been deprecated.

Arguments
None

Returns
0

Notes
None.

Example
None.

137

HTML Toolkit Programmers Reference Guide

Hide()
Definition
NUMBER Hide()

Description
This method is the same as the Close() method. It closes the browser and returns the
GUI of the phone back to its state before the HTML app was executed. This method
should not be used in Full Screen GUI Replacement Mode apps or New Page
Applications.
The application will no longer be running after this method is called.

Arguments
None

Returns
0

Notes
None

Example
TelML.Browser.Hide();

138

// close the HTML app

HTML Toolkit Programmers Reference Guide

Close()
Definition
NUMBER Close()

Description
This method closes the browser and returns the GUI of the phone back to its state before
the HTML app was executed. This method should not be used in Full Screen GUI
Replacement Mode apps or New Page Applications.
The application will no longer be running after this method is called.

Arguments
None

Returns
0

Notes
None

Example
TelML.Browser.Close();

// close the HTML app

139

HTML Toolkit Programmers Reference Guide

Display Object
The display object contains information about the phones display such as height, width,
depth, contrast and brightness. It also allows setting the contrast and the brightness. For
setting (and getting) brightness there are two different settings in the phone: the normal
brightness and the brightness when the phone is in screen saver/dimmer mode. This second
brightness setting is referred to as the idle brightness. The programmer does not control
when the phone is in normal or idle brightness mode (that is controlled by user activity), but
the programmer may set different levels for each of the modes so when the modes are active
the appropriate brightness is used.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied item, or "" for a list of all supported items.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.Display.IsSupported("GetWidth");
// Returns "GetWidth"

140

HTML Toolkit Programmers Reference Guide

GetWidth()
Definition
NUMBER GetWidth()

Description
This method returns the width of the phone display in pixels.

Arguments
None

Returns
160: for the 5330 and 5340 phones.

Notes
None

Example
TelML.Display.GetWidth();
// returns 160 for 5330 and 5340

141

HTML Toolkit Programmers Reference Guide

GetHeight()
Definition
NUMBER GetHeight()

Description
This method returns the height of the phone display in pixels.

Arguments
None

Returns
320: for the 5330 and 5340 phones.

Notes
None

Example
TelML.Display.GetHeight();
// Returns 320 on 5330 and 5340 sets

142

HTML Toolkit Programmers Reference Guide

GetDepth()
Definition
NUMBER GetDepth()

Description
This method returns the screen colour depth of the phone display.
Some sample depths:

2 = Black and white screens

16 = grayscale

256 = 256 colors or grayscales

65535 = full color.

Arguments
None

Returns
16

Notes
None

Example
TelML.Display.GetDepth();
// Returns 16 on 5330 and 5340 sets

143

HTML Toolkit Programmers Reference Guide

GetContrast()
Definition
NUMBER GetContrast()

Description
This method returns the contrast of the phone display. The contrast level ranges from 0 to
the value returned by GetContrastMax().

Arguments
None

Returns
The contrast level from 0 to the value returned by GetContrastMax().

Notes
None

Example
TelML.Display.GetContrast();
// Returns current contrast setting

144

HTML Toolkit Programmers Reference Guide

SetContrast()
Definition
NUMBER SetContrast(NUMBER value)

Description
This method sets the contrast of the phone display. The contrast level ranges from 0 to
the value returned by GetContrastMax. If an illegal value is used in the parameter then
the contrast is not changed.

Arguments
Type
NUMBER

Name
value

Description
The new contrast level

Returns
New value equal to the input value if input value is in allowable range
Max value if the input value is out of range

Notes
None

Example
var contrast = TelML.Display.GetContrast();
// decrease the contrast
if (contrast > 0)
{
var newContrast=TelML.Display.SetContrast(contrast-1);
}

145

HTML Toolkit Programmers Reference Guide

GetContrastMax()
Definition
NUMBER GetContrast()

Description
This method returns the maximum contrast value of the phone display.

Arguments
None

Returns
The max allowable contrast setting (19).

Notes
None

Example
var maxContrast = TelML.Display.GetContrastMax();
var contrast = TelML.Display.GetContrast();

// increase the contrast


if (contrast < maxContrast)
{
var newContrast=TelML.Display.SetContrast(contrast+1);
}

146

HTML Toolkit Programmers Reference Guide

GetBrightness()
Definition
NUMBER GetBrightness()

Description
This method returns the brightness setting of the phone display. The brightness level
ranges from 0 to the value returned by GetBrightnessMax().

Arguments
None

Returns
The current brightness setting.

Notes
None

Example
var brightness = TelML.Display.GetBrightness();

147

HTML Toolkit Programmers Reference Guide

SetBrightness()
Definition
NUMBER SetBrightness(NUMBER value)

Description
This method sets the brightness of the phone display. The brightness level ranges from 0
to the value returned by GetBrightnessMax().

Arguments
Type
NUMBER

Name
value

Description
The new brightness level

Returns
New value equal to the input value if input value is in allowable range
Max value if the input value is out of range

Notes
None

Example
var brightness = TelML.Display.GetBrightness();
// decrease the brightness
if (brightness > 0)
{
var newbrightness=TelML.Display.SetBrightness(brightness-1);
}

148

HTML Toolkit Programmers Reference Guide

GetBrightnessMax()
Definition
NUMBER GetBrightnessMax()

Description
This method returns the maximum brightness value of the phone display.

Arguments
None

Returns
The max allowable brightness setting (10).

Notes
None

Example
var maxBrightness = TelML.Display.GetBrightnessMax();
var brightness = TelML.Display.GetBrightness();
// increase the brightness
if (brightness < maxBrightness)
{
var newBrightness=TelML.Display.SetBrightness(brightness+1);
}

149

HTML Toolkit Programmers Reference Guide

GetIdleBrightness()
Definition
NUMBER GetIdleBrightness()

Description
This method returns the current idle brightness setting of the phone display.

Arguments
None

Returns
The current idle brightness.

Notes
None

Example
var idlebrightness = TelML.Display.GetIdleBrightness();

150

HTML Toolkit Programmers Reference Guide

SetIdleBrightness()
Definition
NUMBER SetIdleBrightness(NUMBER value)

Description
This method sets the idle brightness of the phone display. When the phone goes into
screen dimmer (idle) mode, this value of brightness will be used for the phones
brightness setting.

Arguments
Type
NUMBER

Name
value

Description
The new idle brightness level

Returns
New value equal to the input value if input value is in allowable range
Max value if the input value is out of range

Notes
None

Example
var idleBright = TelML.Display.GetIdleBrightness();
if (idleBright > 0)

// decrease the brightness

{
var newIdleBrightness=TelML.Display.SetIdleBrightness(idleBright1);
}

151

HTML Toolkit Programmers Reference Guide

GetTextSize()
Definition
STRING GetTextSize()

Description
This method retrieves the current setting of Text size that is controlled by the user in the
Settings Application, option Text Size.

Arguments
None.

Returns
"small" if the Settings Application Text Size option is set to Small Text
"large" if the Settings Application Text Size option is set to Large Text

Notes
Small Text has the following CSS style designation: font-family:Mitel_53xx_Small_V2
Large Text has the following CSS style designation: font-family:Mitel_53xx_Large_V2
This function is usually called during the handling of a TelMLEvent.OnTextSizeChanged
event.

Example
var textSize = TelML.Display.GetTextSize();
// textSize is "large" or "small" depending on the setting
// of the Text Size option in the Settings Application.

152

HTML Toolkit Programmers Reference Guide

LowLevel Object
The LowLevel object contains information about miscellaneous settings in the phone such as
the phone model number, MAC, mode (Minet/SIP), firmware version and current language.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied item, or "" for a comma separated list of
supported items.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.LowLevel.IsSupported("GetModelNumber");
// returns "GetModelNumber"

153

HTML Toolkit Programmers Reference Guide

GetModelNumber()
Definition
STRING GetModelNumber()

Description
This method returns the model number of the phone.

Arguments
None

Returns
5330 for phone model 5330.
5340 for phone model 5340.

Notes
None

Example
TelML.LowLevel.GetModelNumber();
// returns the model number of the phone

154

HTML Toolkit Programmers Reference Guide

GetPhoneMAC()
Definition
STRING GetPhoneMAC()

Description
This method returns the MAC address of the phone.

Arguments
None

Returns
The MAC address of the phone.

Notes
None

Example
TelML.LowLevel.GetPhoneMAC();
// returns "AA-AB-AC-AD-12-34" (sample)

155

HTML Toolkit Programmers Reference Guide

GetFirmwareVersion()
Definition
STRING GetFirmwareVersion()

Description
This method returns the firmware version of the phone.

Arguments
None

Returns
The firmware version of the phone.

Notes
None

Example
TelML.LowLevel.GetFirmwareVersion();
// returns "1.5.0.31" (sample)

156

HTML Toolkit Programmers Reference Guide

GetPhoneMode()
Definition
STRING GetPhoneMode()

Description
This method returns the mode (actually protocol) of the phone, either Minet or SIP.

Arguments
None

Returns
Minet or SIP

Notes
None

Example
TelML.LowLevel.GetPhoneMode();
// returns the protocol of the phone

157

HTML Toolkit Programmers Reference Guide

GetPhoneLanguage()
Definition
NUMBER GetPhoneLanguage()

Description
This method returns the current language of the phone.

Arguments
None

Returns
1 English
2 French
3 German
4 Spanish (Latin American)
5 Portuguese (Brazil)
6 Dutch
7 Italian
8 Romanian
9 Portugese (Portugal)
10 Spanish (EU)
11 Russian

Notes
None

Example
TelML.LowLevel.GetPhoneLanguage();
// returns the current language setting on the phone

158

HTML Toolkit Programmers Reference Guide

GetAvailableLanguageList()
Definition
STRING GetAvailableLanguageList()

Description
This method returns a comma separated list of language numbers corresponding to the
values in TelML.LowLevel.GetPhoneLanguage()

Arguments
None

Returns
Comma separated list of language numbers.
1 English
2 French
3 German
4 Spanish (Latin American)
5 Portuguese (Brazil)
6 Dutch
7 Italian
8 Romanian
9 Portugese (Portugal)
10 Spanish (EU)
11 Russian

Notes
None

Example
var languageList = TelML.LowLevel.GetAvailableLanguageList();
// languageList is assigned "1, 2, 4" (sample)

159

HTML Toolkit Programmers Reference Guide

GetPhoneIPAddress()
Definition
STRING GetPhoneIPAddress()

Description
This method returns the numerical IP address of the phone.

Arguments
None

Returns
"xxx.xxx.xxx.xxx" where xxx is a number between 0 and 255 which represents the
numerical IP address of the phone.

Notes
None

Example
var myIpAddress = TelML.LowLevel.GetPhoneIPAddress();
// myIpAddress = "192.168.0.1" (sample)

160

HTML Toolkit Programmers Reference Guide

GetTimeDateFormat()
Definition
STRING GetTimeDateFormat ()

Description
This method returns the current format being used for the date and time on the phone so
that HTML applications can be consistent with the setting on the phone.

Arguments
None

Returns
"Hh::MM dd-MN-yy" if the phone is operating on a 12 hour clock format.
"HH::MM dd-MN-yy" if the phone is operating on a 24 hour clock format.

Notes
None

Example
var myTimeFormat = TelML.LowLevel.GetTimeDateFormat();
// myIpAddress = " HH::MM dd-MN-yy " (sample 24 hour clock
format)

161

HTML Toolkit Programmers Reference Guide

GetTimeDate()
Definition
STRING GetTimeDate()

Description
This method returns the current date and time using the format currently specified for the
phone.

Arguments
None

Returns
A string containing the time and date in the format currently specified for the phone.

Notes
None

Example
var myTimeDate = TelML.LowLevel.GetTimeDate();
// myTimeDate = "11:23a 15-Jan-2011" (sample time)

162

HTML Toolkit Programmers Reference Guide

Phone Object
The Phone object gives information about the hookswitch state of the phone.

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied item, or "" for a comma separated list of
supported items.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelML.Phone.IsSupported("");
// returns "IsSupported,GetHookswitch"

163

HTML Toolkit Programmers Reference Guide

GetHookswitch()
Definition
NUMBER GetHookswitch()

Description
This method returns the state of the hookswitch.

Arguments
None

Returns
0 if offhook.
1 if onhook.

Notes
The hookswitch state does not indicate if the user is on a call. There are instances where
the hookswitch is onhook, but there is an active call, and conversely, there are instances
where the hookswitch is offhook, but there is no active call.

Example
hookSwitchState = TelML.Phone.GetHookswitch();
// returns the current hookswitch status

164

HTML Toolkit Programmers Reference Guide

GetCallInfoEnable()
Definition
BOOLEAN GetCallInfoEnabled()

Description
Inside the settings application, under the option Call Notification, there is an option called
"Display Call Info". This function returns the current setting of this option.

Arguments
None

Returns
false if not selected
true if selected

Notes
This function is meant to be used in conjunction with the
TelMLEvent.OnCallInfoEnableChanged. See example below.

Example
// Setup a handler to output a log whenever the option is changed
TelMLEvent.OnCallInfoEnableChanged = function () {
alert("Call Info now" + (TelML.Phone.GetCallInfoEnabled() ?
"enabled" : "disabled" ));
};

165

HTML Toolkit Programmers Reference Guide

GetCallNotification()
Definition
OBJECT GetCallNotification()

Description
Inside the settings application, under the option "Call Notification" there are a series of
options that allow the user to choose the call notification settings. This method is used to
determine the current settings inside this application.

Arguments
None

Returns
This method returns an OBJECT with the following properties and values
LaunchOnMakeCall

"Open the phone screen on calls made."

LaunchOnInPrimeLine

"Open the phone screen on calls to my prime line"

LaunchOnInOtherLine

"Open the phone screen on calls to my other lines"

LaunchOnInAppearance

"Open the phone screen on calls to any appearance"

Notes
This function is used in conjunction with the TelMLEvent.OnCallNotifiyChanged. See
example below.

Example
// Setup a handler to output a log whenever the option is changed
TelMLEvent.OnCallNotifyChanged = function () {
var settings = TelML.Phone.GetCallNotification();
alert("Launch on Make Call is" + settings.LaunchOnMakeCall);
alert("Prime Line Call is" + settings.LaunchOnInPrimeLine);
alert("Other Line Call is" + settings.LaunchOnInOtherLine);
alert("Appearance Call is" + settings.LaunchOnInAppearance);
};

166

HTML Toolkit Programmers Reference Guide

ICP Object
The ICP object gives information about the connected ICP.

GetIPAddress()
Definition
STRING GetIPAddress( )

Description
This function returns the numerical IP address of the connected ICP.

Arguments
None

Returns
"xxx.xxx.xxx.xxx" where xxx is a number between 0 and 255 which represents the
numerical IP address of the connected ICP.

Notes
None

Example
var switchIpAddress = TelML.ICP.GetIPAddress();
// switchIpAddress = "192.168.1.1" (sample)

167

HTML Toolkit Programmers Reference Guide

GetSWVersion()
Definition
STRING GetSWVersion()

Description
This function returns the version number of the software running on the connected ICP.

Arguments
None

Returns
The string representing the version of ICP software that is running.

Notes
None

Example
var switchSoftwareVersion = TelML.ICP.GetSWVersion();
// switchSoftwareVersion = "9.1.1.17" (sample)

168

HTML Toolkit Programmers Reference Guide

TelML Events
Overview
TelML events are accessed via the TelMLEvent object. When an event occurs the TelML
programmer can specify the JavaScript code to run or a function to call. The JavaScript code
can be a function call or a series of JavaScript statements that actually handle and process
the event. Parameters for each event are accessed through a set of variables defined in the
object.
The three usages are as follows:
1) specifying a function to call
TelMLEvent.OnDisplayChanged = HandleDisplayChange;
2) specifying an anonymous function
TelMLEvent.OnDisplayChanged =
function () {
do_stuff();
};
3) specifying a series of Javascript statements enclosed in a string.
TelMLEvent.OnDisplayChanged =
"displayChange=1;HandleDisplayChange();";

169

HTML Toolkit Programmers Reference Guide

IsSupported()
Definition
STRING IsSupported( STRING Item )

Description
Defined in TelML Definition - Common Elements.

Arguments
Type
STRING

Name
item

Description
Verify support for supplied event, or "" for a comma separated list
of supported events.

Returns
Defined in TelML Definition - Common Elements.

Notes
None

Example
TelMLEvent.IsSupported("OnButtonInformation");
// returns "OnButtonInformation"

170

HTML Toolkit Programmers Reference Guide

List of TelML Events


Table 6. TelML Event List
Event

Parameter(s)

Description

OnButtonInformation

NUMBER
ButtonIndex

The programming on the button ButtonIndex has been


changed either by TelML or by the user on the phone or
through the 3300 ICP.

OnButtonPress

NUMBER
ButtonIndex

A button (ButtonIndex) has been pressed or released.

BOOLEAN
ButtonPressed
OnDisplayChanged

OnErrorCode

The ButtonPressed indicates if it was a downstroke


(ButtonPressed == true) or an upstroke (ButtonPressed
== false).
The text display managed by the 3300 ICP or phone has
changed content. When this event occurs, the TelML
program may read the display contents using the
TextDisplayObject and update the text display region on
the phone.

NUMBER ErrorID

An error has occurred.

STRING ErrorString

ErrorID: 100 for Javascript Interpreter


ErrorString: the Javascript error message

OnHookswitch

NUMBER Hookswitch The Hookswitch has changed state.

OnLampMode

NUMBER LampIndex A lamp has changed state.


NUMBER LampMode LampIndex contains the lamp number.
NUMBER LampColor

Lampmode contains the state.


LampColor contains the color.
See the LampItem object for details.

OnLanguageChanged

NUMBER Language

The phones language has changed state.


See the LowLevel object GetPhoneLanguage for details.

OnTelephonyIdle

The state of the phone has changed to idle. There are no


longer any calls on the phone.

OnTelephonyNotIdle

The state of the phone has changed to not idle. There is


at least one call on the phone.

OnConnectionCleared

NUMBER LineIndex

A call has been terminated on the line index specified.

OnDelivered

NUMBER LineIndex

An incoming call is available on the line index specified,


with the corresponding CLID information.

STRING
CLIDNumber
STRING CLIDName
STRING CLIDRaw
OnEstablished

NUMBER LineIndex

A call has been established on the line index specified.

OnOriginated

NUMBER LineIndex

A call has been originated on the line index specified.

171

HTML Toolkit Programmers Reference Guide

Event

Parameter(s)

Description

OnCallInfoEnableChanged

None

Whenever the state of Call Info Enable is changed, this


event is triggered. The new setting can be read by using
TelML.Phone. GetCallInfoEnable().

OnTimeDateChanged

None

Whenever the TimeDate string changes, this event is


triggered. The new setting can be read by using
TelML.LowLevel.GetTimeDate()

OnTimeDateFormatChanged None

Whenever the TimeDate format used for displaying the


time and date, this event is triggered. The new setting
can be read by using TelML.LowLevel.
GetTimeDateFormat()

OnTextSizeChanged

None

Whenever the text size data is changed, this event is


triggered. The new setting can be read by using
TelML.Display.GetTextSize()

OnCallNotifyChanged

None

Whenever the call notification settings are changed, this


is called. The new settings can be read from
TelML.Phone.GetCallNotification()

LAUNCH INFORMATION
POPULATED AT STARTUP

STRING LaunchMode The parameter data is populated in the TelMLEvent


object at application launch time.
NUMBER
InvokeButtonIndex
LaunchMode can be either "StartUp" or "Invoke".

Implicit launch event.

NUMBER
StartUpPageIndex

"StartUp" LaunchMode occurs when the startup service


starts an application.
At startup service time, there may be information stored
in StartUpPageIndex OR InvokeButtonIndex.
Inside StartUpPageIndex may contain the numbers 0-2
indicating the page of the telephony application for which
the application is being started. If the information is not
known, then undefined is returned.
For graphical key applications, there may be information
inside the InvokeButtonIndex variable indicating the top
left key where the application has been started.
At "Invoke" LaunchMode, there may be information found
in the InvokeButtonIndex field if available, otherwise
undefined will be returned. The index of the key used to
invoke the application is stored in InvokeButtonIndex.

172

HTML Toolkit Programmers Reference Guide

173

Vous aimerez peut-être aussi