Events

AppEvents.CallAlerting

Event triggered when incoming call arrives.

Since each incoming call creates new session, it can be dispatched only once during session lifetime
Properties
  • call: Call

    Incoming call that triggered the event

  • callerid: String

    CallerID for current call

  • customData: String

    Optional: Custom data that was passed from client with the call

  • destination: String

    Dialed number

  • displayName: String

    Displayable name of the caller

  • fromURI: String

    CallerID with domain or SIP URI for incoming SIP call

  • headers: Object

    Custom SIP headers received with the call (ones starting with "X-")

  • name: String

    The name of the event - "Application.CallAlerting"

  • toURI: String

    Dialed SIP URI

AppEvents.HttpRequest

Event triggered when HTTP request is received by the session. HTTP requests are sent via media_session_access_url returned from StartScenarios and StartConference methods of HTTP API. Requests are used to stop scenario or pass additional data into it.

Handler of this event should return data that will be sent in HTTP response. If it is string or number, it's sent as is, otherwise it's encoded using JSON, and Content-Type of response is set to application/json
Properties
  • content: String

    HTTP request content

  • method: String

    HTTP request method

  • path: String

    HTTP path requested (without domain name)

AppEvents.Started

Event dispatched when application initialization completes

Properties
  • accessURL: String

    HTTP URL that can be used to send commands to this scenario from outer world

AppEvents.Terminated

Event triggered when session was terminated.

AppEvents.Terminating

Event triggered when session is about to terminate.