Represents an interface for managing call-related operations.

Hierarchy

  • Eventing<CallEventTypes>
    • ICall

Properties

lineId: string

Fetches the identifier of the line associated with this call.

Methods

  • Fetches the unique call identifier.

    Returns string

  • Fetches the correlation identifier for this call.

    Returns string

  • Fetches the direction of the call (e.g., inbound or outbound).

    Returns CallDirection

  • Sets the call identifier.

    Parameters

    • callId: string

      The new call identifier.

    Returns void

  • Fetches the reason for disconnecting the call.

    Returns DisconnectReason

  • Disconnects the call.

    Returns void

  • Checks if the call is muted.

    Returns boolean

  • Checks if the call is connected.

    Returns boolean

  • Checks if the call is on hold.

    Returns boolean

  • Performs a hold or resume action on the call.

    Returns void

  • Mutes or unmutes the call's local audio stream.

    Parameters

    • localAudioStream: LocalMicrophoneStream

      The local audio stream to mute or unmute.

    Returns void

  • Fetches the caller information associated with the call.

    Returns DisplayInformation

  • Initiates caller ID resolution for the call. callerInfo data can be retrieved later by calling getCallerInfo method.

    Parameters

    • callerInfo: CallerIdInfo

      The caller ID information to resolve.

    Returns void

  • Dials the call using the provided local audio stream.

    Example

    const localAudioStream  = await Calling.createMicrophoneStream({audio: true});
    call.dial(localAudioStream);

    Parameters

    • localAudioStream: LocalMicrophoneStream

      The local audio stream for the call.

    Returns void

  • Sends a DTMF digit during the call.

    Example

    call.sendDigit('1');
    

    Parameters

    • tone: string

      The DTMF tone to send.

    Returns void

  • Answers the call using the provided local audio stream.

    Example

    const localAudioStream  = await Calling.createMicrophoneStream({audio: true});
    call.answer(localAudioStream);

    Parameters

    • localAudioStream: LocalMicrophoneStream

      The local audio stream for the call.

    Returns void

  • Completes a call transfer.

    Example

    // blind transfer
    call.completeTransfer('BLIND', undefined, '5998');

    // consult transfer
    call.completeTransfer('CONSULT', secondCall.getCallId(), undefined);

    Parameters

    • transferType: TransferType

      The type of transfer to perform. Eg. BLIND or CONSULT.

    • Optional transferCallId: string

      The call identifier for the transfer incase of Consult transfer (optional).

    • Optional transferTarget: string

      The target for the transfer incase of Blind transfer(optional).

    Returns void

  • Change the audio stream of the call.

    Parameters

    • newAudioStream: LocalMicrophoneStream

      The new audio stream to be used in the call.

    Returns void

  • Fetches the information related to the call's Broadworks correlationId.

    Returns undefined | string

  • Sets the Broadworks correlation information for the call.

    Parameters

    • broadworksCorrelationInfo: string

      The Broadworks correlation information.

    Returns void

  • Fetches the RTP (Real-time Transport Protocol) statistics for the call.

    Returns Promise<CallRtpStats>

Events

  • Type Parameters

    • E extends keyof CallEventTypes

    Parameters

    • event: E

      Event that is going ot be emitted.

    • Rest ...args: Parameters<CallEventTypes[E]>

      Parameters that are emitted with the event.

    Returns boolean

  • .

    Type Parameters

    • E extends keyof CallEventTypes

    Parameters

    • event: E

      Event to listen to.

    • listener: CallEventTypes[E]

      Callback for event.

    Returns ICall

  • .

    Type Parameters

    • E extends keyof CallEventTypes

    Parameters

    • event: E

      Event to remove listener on.

    • listener: CallEventTypes[E]

      Callback for event.

    Returns ICall