Telephony

Provides APIs for the app to access IP PBX telephony information.

Member Summary

Public Members

Enumeration of all possible incoming call states.

Boolean flag; true if there is an active call, false if there are no active calls.

Method Summary

Public Methods

Emits the state updates for the incoming call notification.

Public Members

public IncomingCallStates: Object source

Enumeration of all possible incoming call states.

Properties:

NameTypeAttributeDescription
IncomingCallStates.IncomingCallStateRinging number

An incoming call is being attempted.

IncomingCallStates.IncomingCallStateConnected number

The incoming call has started.

IncomingCallStates.IncomingCallStateDisconnected number

The incoming call has been disconnected.

public callInProgress: boolean source

Boolean flag; true if there is an active call, false if there are no active calls. You can bind a function to be called when this property changes: dapi.peripheralModeAudio.callInProgressChanged.connect(myHandlerFunction);

Public Methods

public incomingCallStateChanged(newState: number) source

Emits the state updates for the incoming call notification. This signal can be used to monitor incoming IP PBX call activity while connecting to the conference call. The app should abort the conference call if the user answers the incoming call. For information on the possible call states, refer to IncomingCallStates.

Params:

NameTypeAttributeDescription
newState number

The new state of an incoming call. Its value will be one of the IncomingCallStates.

Example:

function onCallStateChanged(newState)
{
    if (newState == dapi.telephony.IncomingCallStates.IncomingCallStateRinging)
        console.log("Incoming call is connecting...");
    else if (newState == dapi.telephony.IncomingCallStates.IncomingCallStateConnected)
        console.log("Incoming call connected!");
    else // newState must be dapi.telephony.IncomingCallStates.IncomingCallStateDisconnected
        console.log("Incoming call has terminated.");
}
dapi.telephony.incomingCallStateChanged.connect(onCallStateChanged);