# Callbacks

The figure below illustrates the lifecycle of a call and shows where both callbacks and REST API calls are located or can be made.

```mermaid
sequenceDiagram
    participant a as User A
    participant sinch as Sinch Platform
    participant dev as Developer Backend
    participant b as User B
    a->>sinch: Incoming call for user B
    sinch->>dev: Incoming Call Event (ICE)
    sinch->>a: Template or filter
    dev->>sinch: SVAML response
    sinch->>b: Call user B
    b->>sinch: Call progresses
    sinch->>a: Ringing
    b->>sinch: Call is answered
    sinch->>dev: Answered Call Event (ACE)
    dev->>sinch: SVAML response
    dev->>sinch: Manage call (using Voice API)
    a->>sinch: Hangup call
    sinch->>b: Hangup call
    sinch->>dev: Disconnected Call Event (DICE)
```

The **Incoming Call Event (ICE)**, is triggered when the Sinch platform receives an incoming call. The event can trigger a REST request to your application backend. Your reply instructs the Sinch platform how to act. The response can include an object written in the **Sinch Voice Application Markup Language (SVAML)** and it can, for instance, instruct Sinch to play a number of IVRs and then connect the call to the PSTN. The **Answered Call Event (ACE)** is triggered when the call is answered and can render an additional REST call to your platform. SVAML instructions can again be provided in the response to the ACE event. Finally, the **Disconnected Call Event (DiCE)** is triggered when the call is disconnected. Between ACE and DiCE, it's legal to call the ManageCall REST API which is part of the Calling API, to instruct the call to be hung up and/or to play an Interactive Voice Response (IVR) during the conversation.