kaios-types
    Preparing search index...

    Interface Telephony

    dom.telephony.enabled

    interface Telephony {
        active: TelephonyCallGroup | TelephonyCall | null;
        calls: CallsList;
        conferenceGroup: TelephonyCallGroup;
        muted: boolean;
        oncallschanged: EventHandler;
        onincoming: EventHandler;
        onremoteheld: EventHandler;
        onremoteresumed: EventHandler;
        ready: Promise<void>;
        speakerEnabled: boolean;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dial(number: string, serviceId?: number): Promise<any>;
        dialEmergency(number: string, serviceId?: number): Promise<TelephonyCall>;
        dispatchEvent(event: Event): boolean;
        ownAudioChannel(): void;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
        sendTones(
            tones: string,
            pauseDuration?: number,
            toneDuration?: number,
            serviceId?: number,
        ): Promise<void>;
        startTone(tone: string, serviceId?: number): void;
        stopTone(serviceId?: number): void;
    }

    Hierarchy

    • EventTarget
      • Telephony
    Index

    Properties

    The currently active call or call group.

    calls: CallsList

    A list of all calls.

    conferenceGroup: TelephonyCallGroup

    The conference call group.

    muted: boolean

    Indicates whether the microphone is muted.

    oncallschanged: EventHandler

    Event handler for when the list of calls changes.

    onincoming: EventHandler

    Event handler for incoming calls.

    onremoteheld: EventHandler

    Event handler for when a call is held remotely.

    onremoteresumed: EventHandler

    Event handler for when a call is resumed remotely.

    ready: Promise<void>

    A promise that resolves when the telephony API is ready.

    speakerEnabled: boolean

    Indicates whether the speakerphone is enabled.

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Make a phone call or send the mmi code depending on the number provided.

      Parameters

      • number: string

        The number to dial.

      • OptionalserviceId: number

        The service ID to use for the call.

      Returns Promise<any>

    • Make an emergency call.

      Parameters

      • number: string

        The emergency number to dial.

      • OptionalserviceId: number

        The service ID to use for the call.

      Returns Promise<TelephonyCall>

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Request audio channel for telephony.

      Returns void

      audio-channel-telephony

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Send a series of DTMF tones.

      Parameters

      • tones: string

        The DTMF tones to send.

      • OptionalpauseDuration: number

        The duration of the pause between tones in milliseconds.

      • OptionaltoneDuration: number

        The duration of each tone in milliseconds.

      • OptionalserviceId: number

        The service ID to use for sending tones.

      Returns Promise<void>

    • Start sending a DTMF tone.

      Parameters

      • tone: string

        The DTMF tone to start.

      • OptionalserviceId: number

        The service ID to use.

      Returns void

    • Stop sending the currently playing DTMF tone.

      Parameters

      • OptionalserviceId: number

        The service ID to use.

      Returns void