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


Subscribe to any softphone status change event.



on('ON_SOFTPHONE_STATUS_CHANGE', handler: OnSoftphoneStatusChangeHandler): void

type OnSoftphoneStatusChangeHandler = (ready: boolean, error?: string) => SyncAsyncResult


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


< Previous | Next >