Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Conversation

Index

Constructors

constructor

Properties

Readonly id

id: string

A unique conversation id
according to spec, 30 characters is the longest allowed string

Readonly isTest

isTest: boolean

Readonly mapper

Accessors

created

  • get created(): undefined | Date

messages

remoteDisplayName

  • get remoteDisplayName(): undefined | string
  • This is the other communicating party's display name (if sent)

    Keep in mind that this property is only set after the first remote message was processed!

    Returns undefined | string

requestedUri

  • get requestedUri(): undefined | string
  • This is the uri that was requested by the other communicating party e.g. if ng112-js is used as PSAP, this would be the SIP address that was requested by the mobile device This address can potentially differ from what ng112-js is using to register at the SIP proxy

    Keep in mind that this property is only set after the first remote message was processed!

    Returns undefined | string

state

targetUri

  • get targetUri(): string
  • This is the target device we are communicating with -> the other communicating party e.g. if ng112-js is used as PSAP, this would be the SIP address of a mobile device

    Returns string

Methods

addMessageListener

  • addMessageListener(callback: (message: Message) => unknown): void
  • Registers a new listener for new incoming or outgoing messages

    Parameters

    • callback: (message: Message) => unknown

      Callback function that is called each time a new incoming or outgoing message is received/sent

    Returns void

addStateListener

  • addStateListener(callback: (state: StateObject) => unknown): void

handleMessageEvent

removeMessageListener

  • removeMessageListener(callback: (message: Message) => unknown): void
  • Unregisters a previously registered message listener

    Parameters

    • callback: (message: Message) => unknown

      Callback function that is called each time a new incoming or outgoing message is received/sent

    Returns void

removeStateListener

  • removeStateListener(callback: (state: StateObject) => unknown): void
  • Unregisters a previously registered conversation state listener

    Parameters

    • callback: (state: StateObject) => unknown

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

    Returns void

sendMessage

start

  • Starts the conversation

    This is basically a convenience function on top of sendMessage
    It automatically sets the correct message type "START"
    and defaults to text message "Start emergency call"

    Parameters

    Returns Message

stop

  • Ends the conversation

    This is basically a convenience function on top of sendMessage
    It automatically sets the correct message type "STOP"
    and defaults to text message "Stop emergency call"

    Parameters

    Returns Message

Static fromIncomingSipMessage

Generated using TypeDoc