Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Call

see

Call

Hierarchy

  • EventEmitter
    • Call

Index

Properties

connDuration

connDuration: number

Call connected duration in seconds (zero when call is not established).

hasMedia

hasMedia: boolean

True if the Call has active media.

isActive

isActive: boolean

True if the call has an active INVITE session and the INVITE session has not been disconnected.

totalDuration

totalDuration: number

Total call duration in seconds, including set-up time.

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

answer

  • answer(statusCode?: number, reason?: string): void
  • For incoming calls, this responds to the INVITE with an optional statusCode (defaults to 200) and optional reason phrase.

    Parameters

    • Optional statusCode: number
    • Optional reason: string

    Returns void

dtmf

  • dtmf(digits: string): void
  • Sends DTMF digits to the remote end using the RFC 2833 payload format.

    Parameters

    • digits: string

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getStatsDump

  • getStatsDump(inclMediaStats?: boolean, indent?: string): string
  • Returns formatted statistics about the call. If inclMediaStats is true, then statistics about the Call's media is included (default is true). indent is the string to use for indenting (default is two spaces).

    Parameters

    • Optional inclMediaStats: boolean
    • Optional indent: string

    Returns string

hangup

  • hangup(statusCode?: number, reason?: string): void
  • Hangs up the call with an optional statusCode (defaults to 603) and optional reason phrase. This function is different than answering the call with 3xx-6xx response (with answer()), in that this function will hangup the call regardless of the state and role of the call, while answer() only works with incoming calls on EARLY state.

    Parameters

    • Optional statusCode: number
    • Optional reason: string

    Returns void

hold

  • hold(): void

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

ref

  • ref(): void
  • Attaches the Call to the event loop.

    Returns void

reinvite

  • reinvite(): void

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

transfer

  • transfer(destination: string): void
  • Transfers the call to destination.

    Parameters

    • destination: string

    Returns void

unref

  • unref(): void
  • Detaches the Call from the event loop (default).

    Returns void

update

  • update(): void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc