Websocket API Documentation (Event)

Version 32.1 by michaely on 2015/07/14 09:42
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Information

The information on this page applies to iSymphony 3.2+.

Description

The websocket API provides realtime events about the current state of the iSymphony server. External applications can utilize this API to integrate with the iSymphony server, by reacting to events pertaining to users, and call state. In conjunction with the CRM widget, this API can also be utilized to create custom widgets for the iSymphony client interface.

On this page:

The [toc] macro is a standalone macro and it cannot be used inline. Click on this message for details.
 

 

Connecting To The Websocket

The following URL can be used to connect to the websocket event API:

ws://manager:manag3rpa55word@<hostname or ip of the iSymphony server>:58080/communication_manager/ws/event

Event Filtering

The Event API allows connections to specify which events they want to receive from the websocket, by specifying property filters. 

Information

Filters specify which events to filter in, not filter out.

The Filter Message

A message, with the following format, can be sent to the websocket, in order to set the current filters for the connection.

{
 "type" : "filter",
 "filters" : [
    {"property" : "<property name>" : "value" : "<filter value>"},
    {"property" : "<property name>" : "value" : "<filter value>"},
    ...
  ]
}

Where <property name> is the name of the property to filter, and <filter value> is the property value to filter on. Multiple property filters can be specified.

 

Information

If an event does not contain a property specified in one of the filters, the event will not be received.

Filter Message Response

When a filter message is sent, the websocket will respond with one of the following messages:

Wildcard

If you specify a value of "*" for a filter property value, the property filter will match on any value of the property.

Examples

The following filter will only allow events of type dial:

{
 "type" : "filter",
 "filters" : [
    {"property" : "type" : "value" : "dial"}
  ]
}

The following filter will only allow events of type login and logout:

{
 "type" : "filter",
 "filters" : [
    {"property" : "type" : "value" : "login"},
    {"property" : "type" : "value" : "logout"}
  ]
}

The following filter will only allow events of type login and logout, for user mikey.

{
 "type" : "filter",
 "filters" : [
    {"property" : "type" : "value" : "login"},
    {"property" : "type" : "value" : "logout"},
    {"property" : "username" : "value" : "mikey"}
  ]
}

The following filter will only allow events that reference a user:

{
 "type" : "filter",
 "filters" : [
    {"property" : "username" : "value" : "*"}
  ]
}

REST Resources

The Live API exposes several REST resources, that allow access to the current state of specific objects in the system. All current live resources are listed below. Details concerning each resource, and their actions, can be found within the individual resource documentation pages.

Resource List

Notes on Resource Documentation

Due to the interdependent nature of resources in the system, the resource path information in the documentation is split into several sections. Paths in a specific section may relate to, or require, paths specified in other sections.

  • Root Resource Paths : Specifies paths that can be used to access sets (multiple instances) of a resource, in relation to a parent resource.
  • Instance Resource Paths : Specifies paths that can be used to access a specific instance of a resource. These paths require a Root Resource Path, in most cases, but not all.
  • Sub Resource Paths : Specifies paths that provide access to the child resources, of a specific resource instance. These paths require an Instance Resource Path.
  • Action Paths: Specifies paths that are used to perform actions on a specific resource instance. These paths require an Instance Resource Path.