Options
All
  • Public
  • Public/Protected
  • All
Menu

Main instance for establishing connection with an ETSI/DEC112 infrastructure

Hierarchy

  • Agent

Index

Constructors

constructor

Accessors

conversations

Methods

addConversationListener

  • addConversationListener(callback: (conversation: Conversation) => void): void
  • Adds a conversation listener. Callback will be notified about any new conversations.

    Parameters

    • callback: (conversation: Conversation) => void

      Callback function that is called each time a new conversation is started.

    Returns void

addStateListener

  • addStateListener(callback: (state: AgentState) => unknown): void
  • Registers a new listener for agent state changes

    Parameters

    • callback: (state: AgentState) => unknown

      Callback function that is called each time the agent's state changes

    Returns void

createConversation

dispose

  • dispose(gracePeriod?: number): Promise<void>
  • Unregisteres from the ESRP and disposes the SIP agent.
    Closes open calls, if there are any.
    This function has to be called before exiting the application.

    Parameters

    • gracePeriod: number = 2000

      Timeout for all actions done before disposing the agent in milliseconds.
      If there are still open calls, this grace period applies to each call closure.
      Grace period also applies to unregistering and disconnecting the agent.

    Returns Promise<void>

initialize

  • initialize(): Promise<Agent>
  • Initializes the agent's internals sends a REGISTER to the ESRP This has to be called before any other interaction with the library If registration fails, promise will be rejected

    Returns Promise<Agent>

setHeartbeatInterval

  • setHeartbeatInterval(interval?: number): void

updateLocation

updateVCard

  • updateVCard(vcard?: VCard): void
  • Updates the agent's vcard for subsequent messages

    Parameters

    • Optional vcard: VCard

      New vcard object (may be undefined)

    Returns void

Generated using TypeDoc