JSON SIP Data Objects

SIP data is processed and published as JSON objects on presence, activeCalls and stats channels.
The properties of the objects received on each channel are detailed here.

The ActiveCalls Object


Properties of the activeCalls object:

activeCall.state

The state property will hold one of 6 possible values, representing events in the call lifecycle.
The events, in order, are:

  • invite
  • trying
  • ringing
  • connected
  • update
  • ended

Not every event will be triggered on every call, but they will always occur in this order.
More than one object having state = ‘update’ may be emitted during a call.
Due to the asynchronous nature of the delivery system and the often very short timespans between events, call objects may be delivered out of order.
Code receiving these objects should be able to detect and discard out-of-order messages.

activeCall.status

This property is derived from the history property and holds one of 6 possible values:

The Stats Object


The stats object contains the call activity for the current day, for the number or extension contained in the number property.

The Presence Object


The presence object contains the current state of an extension.