Call: Events

This describes the various messages you can receive by pub/sub. Start by reading about our pub/sub API, and the Call Lifecycle.

Events

Name Description
call.new
{
  "type": "call-event",
  "name": "call.new",
  "data": {
    "call_uuid": "e92e63c0-c9f0-0133-2b9f-08002797862c",
    "company_id": "2",
    "direction": "incoming",
    "endpoint": "Reception#23",
    "endpoint_name": "Support",
    "from_number": "4522334455",
    "started_at": "2016-03-11T06:26:12Z",
    "status": "new",
    "to_number": "4571999999"
  },
  "timestamp": "2016-03-11T06:26:13Z"
}
The call has been received, and it is being routed.
call.ringing
{
  "type": "call-event",
  "name": "call.ringing",
  "data": {
    "call_uuid": "e92e63c0-c9f0-0133-2b9f-08002797862c",
    "company_id": "2",
    "endpoint": "Reception#23",
    "ringing_at": "2016-03-11T06:26:04Z",
    "status": "ringing"
  },
  "timestamp": "2016-03-11T06:26:04Z"
}
The call is ringing.
call.answer
{
  "type": "call-event",
  "name": "call.answer",
  "data": {
    "answered_at": "2016-03-11T06:26:03Z",
    "call_uuid": "e92e63c0-c9f0-0133-2b9f-08002797862c",
    "company_id": "2",
    "direction": "incoming",
    "ended_at": null,
    "endpoint": "Reception#23",
    "status": "answered"
  },
  "timestamp": "2016-03-11T06:26:03Z"
}
The call has been answered.
call.hangup
{
  "type": "call-event",
  "name": "call.hangup",
  "data": {
    "call_uuid": "e92e63c0-c9f0-0133-2b9f-08002797862c",
    "company_id": "2",
    "direction": "incoming",
    "duration": 94,
    "ended_at": "2016-03-11T06:26:09Z",
    "endpoint": "Reception#23"
  },
  "timestamp": "2016-03-11T06:26:09Z"
}
The call has ended. If the call was answered, status will not be included. Otherwise it will be either missed, voicemail or orphaned as described in the Call Lifecycle documentation.

Scenarios

As with the Call Lifecycle, the different call types have different events. The types of calls are:

  1. Incoming call directly to a mobile phone/employee.
  2. Outgoing call from a mobile phone/employee.
  3. Incoming call to a reception.

Incoming call directly to a mobile phone/employee:

States for incoming call to a mobile phone


Outgoing call from a mobile phone/employee:

States for outgoing call from a mobile phone


Incoming call to a reception:

States for incoming call to a reception