From Bright Pattern Documentation
Jump to: navigation, search
This page contains changes which are not marked for translation.
• 5.19

onPhoneCapabilitiesChange

Subscribe to any change of the allowed phone capabilities.

Request

Syntax

on('ON_PHONE_CAPABILITIES_CHANGE', handler: OnPhoneCapabilitiesChangeHandler): void


type OnPhoneCapabilitiesChangeHandler = (caps: PhoneCapabilities) => SyncAsyncResult


type PhoneCapabilities = {

    canDial: boolean

    canAnswer: boolean

    canHold: boolean

    canRetrieve: boolean

}

Parameters

Parameter Parameter Values Data Type Optional/Required Description
caps
canDial Boolean Required If set to true, the user can dial; if set to false, the user cannot dial.
canAnswer Boolean Required If set to true, the user can answer incoming phone calls; if set to false, the user cannot answer incoming phone calls.
canHold Boolean Required If set to true, the user can pause calls; if set to false, the user cannot pause calls.
canRetrieve Boolean Required If set to true, the user can resume calls after they have been put on hold; if set to false, the user cannot resume calls after they have been put on hold.

Example Request

function phoneCapabilitiesChangeCallback(caps: PhoneCapabilities) {

console.log("New phone capabilities:", caps);

}

adApi.on("ON_PHONE_CAPABILITIES_CHANGE", phoneCapabilitiesChangeCallback);

Return Value

null


< Previous | Next >