From Bright Pattern Documentation
(Created page with "<translate> =onSoftphoneStatusChange= Subscribe to any softphone status change event. ==Request== ''Syntax'' {| class="wikitable" |on('ON_SOFTPHONE_STATUS_CHANGE', handler:...") |
(Updated via BpDeleteTranslateTags script) |
||
Line 1: | Line 1: | ||
− | + | ||
=onSoftphoneStatusChange= | =onSoftphoneStatusChange= | ||
Line 54: | Line 54: | ||
null | null | ||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 04:01, 29 May 2024
• 5.19
onSoftphoneStatusChange
Subscribe to any softphone status change event.
Request
Syntax
on('ON_SOFTPHONE_STATUS_CHANGE', handler: OnSoftphoneStatusChangeHandler): void
|
Parameters
Parameter | Parameter Values | Data Type | Optional/Required | Description |
ready | Boolean | Required | If set to true, the softphone is available; if set to false, the softphone is not available. | |
error | String | Optional | If ready is false, this shows the reason why the softphone isn't available. |
Example Request
function softphoneStateChangeCallback(ready: boolean, error?: string) {
if (error) {
console.log("Softphone error:", error);
}
console.log("Softphone available?", ready);
}
adApi.on("ON_SOFTPHONE_STATUS_CHANGE", softphoneStateChangeCallback);
Return Value
null