Call: Lifecycle

A Call represents a full call session, starting when a caller A dials a number B, and until A is no longer talking on the phone.

That means that a single Call can contain several actual phone calls. As an example, we can imagine a reception Reception that is configured to play a welcome message and then forward the call to employee Eric:

  1. Alice dials the reception Reception.
  2. A welcome message is played to Alice.
  3. A call is made to employee Eric.
  4. Eric talks with Alice.
  5. Eric decides to forward the call to employee Frank.
  6. Frank answers the call and talks with Alice.
  7. Alice hangs up and the call ends.

This includes the following call legs:

  1. Incoming call leg from Alice
  2. Outgoing call leg to Eric
  3. Outgoing call leg to Frank

All of these are contained within a single Call. The individual call legs are represented as CallNodes.

Lifecycle

A call goes through a number of states, represented in the status property. The states a call can go through are dependent on the type of call. There are three different types:

  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

Name Description
new The incoming call has been received, and it is being routed.
ringing Ringing to the mobile phone.
answered The call has been answered. If ended_at is set, the call has ended, otherwise it is still going on.
missed The mobile phone was not answered/could not be reached/hung up.
voicemail The mobile phone was not answered, could not be reached or hung up, and the caller has left a voicemail.

Outgoing call from a mobile phone/employee:

States for outgoing call from a mobile phone

Name Description
new The outgoing call has been received, and it is being routed.
ringing Ringing to the called number.
answered The called number has answered the call. If ended_at is set, the call has ended, otherwise it is still going on.
missed The called number did not answer.

Incoming call to a reception:

States for incoming call to a reception

Name Description
new The incoming call has been received, and it is being routed.
ringing Ringing to one or more employees.
answered The call has been answered. If ended_at is set, the call has ended, otherwise it is still going on.
missed No employees answered the call.
voicemail No employees answered the call, and the caller has left a voicemail.
orphaned The caller hung up before we tried to call any employees. E.g. the caller hung up before the welcome message finished playing.