Class: Helper

Helper

The helper class contains methods which lets you query out information from the OzWebclient instance.

new Helper()

#HELPER Helper class
Source:

Methods

getActiveCallsOfExtension(extensionId) → {Object.<string, Session>}

Retrieves the active calls of the specified extension.
Parameters:
Name Type Description
extensionId string The ID of the extension.
Source:
Returns:
An object containing Session class instances.
Type
Object.<string, Session>

getActiveCallsOfUser(userId) → {Object.<string.Session>}

Retrieves the active calls of the specified user.
Parameters:
Name Type Description
userId string the ID of the user.
Source:
Returns:
An object containing Session class instances.
Type
Object.<string.Session>

getActiveSessionById(sessionId) → {Session|null}

Retrieves the session by the specified session ID, or null if the session does not exists.
Parameters:
Name Type Description
sessionId string The ID of the session.
Source:
Returns:
A Session class instance or null if the session does not exists.
Type
Session | null

getActiveSessionsBySessionState(sessionState) → {Object.<string, Session>}

Retrieves the sessions by the specified session state.
Parameters:
Name Type Description
sessionState SessionState The specified session state.
Source:
Returns:
An object containing session class instances.
Type
Object.<string, Session>

getCallHistoryOfExtension(extensionId, properties)

Initiates a getCallHistory request with the specified extension ID.
Parameters:
Name Type Argument Description
extensionId string The specified extension ID.
properties Object <optional>
The properties object containing filter parameters (same parameters apply as in OzWebClient.getCallHistory)
Source:
Throws:
Will throw an exception if the extension ID is not specified

getExtensionById(id) → {Extension|null}

Retrieves the extension with the specified ID, or null if the extension does not exists.
Parameters:
Name Type Description
id string The ID of the extension.
Source:
Returns:
Returns an Extension class instance or null if the extension does not exists.
Type
Extension | null

getExtensions() → {Object.<string, Extension>}

Retrieves the extensions configured in Ozeki Phone System XE.
Source:
Returns:
An object containing the retrieved extensions.
Type
Object.<string, Extension>

getExtensionsByType(extensionType) → {Object.<string, Extension>}

Retrieves the extensions whose type equals to the specified type.
Parameters:
Name Type Description
extensionType ExtensionType The extension type.
Source:
Returns:
An object containing the retrieved extensions.
Type
Object.<string, Extension>

getOutsideLineById(id) → {Extension|null}

Retrieves the outside line with the specified ID, or null if the outside line does not exists.
Parameters:
Name Type Description
id string The ID of the outside line.
Source:
Returns:
Returns an Extension class instance or null if the outside line does not exists.
Type
Extension | null

getOutsideLines() → {Object.<string, Extension>}

Retrieves the outside lines configured in Ozeki Phone System XE.
Source:
Returns:
An object containing the retrieved outside lines.
Type
Object.<string, Extension>

getOutsideLinesByType(outsideLineType) → {Object.<string, Extension>}

Retrieves the outside lines whose type equals to the specified type.
Parameters:
Name Type Description
outsideLineType OutsideLineType The outside line type.
Source:
Returns:
An object containing the retrieved outside lines.
Type
Object.<string, Extension>

getUserByExtension(extensionId) → {User|null}

Retrieves the user instance by the specified extension ID, e.g returns the user whose device list contains the specified extension. Returns null if the specified extension is not related to any users.
Parameters:
Name Type Description
extensionId string the ID of the specified extension.
Source:
Returns:
A User class instance or null if the user does not exists.
Type
User | null

getUserById(userId) → {User|null}

Retrieves the user instance by the specified user ID, or null if the user does not exists.
Parameters:
Name Type Description
userId string The ID of the user.
Source:
Returns:
A User class instance or null if the user does not exists.
Type
User | null