Disconnected Call
# support
r
What happens if a call is interrupted during a conversation? Does the AI agent call the caller back automatically to resume the conversation? Or if the caller calls again, can the agent remember the previous conversation and continue from where it left off?
v
Vapi does not automatically call the user back after a disconnected call. However, you can enable the agent to remember and resume previous conversations if the caller calls again. To do this, save the conversation summary and caller's number at the end of each call, and when the same caller returns, load this context for the assistant:
Copy code
json
{
  "assistant": {
    "model": {
      "messages": [
        {
          "role": "system",
          "content": "You're a technical support assistant. Here's where we left off: ..."
        }
      ]
    }
  }
}
This way, the agent can pick up the conversation where it left off when the caller reconnects. Reference: [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests) Source: - [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests)
k
Vapi does not automatically call back but can be configured to store conversation context so when the caller calls again, the agent can remember and continue from where it left off..
v
I'm sorry, but I don't have any information available about how the AI agent handles interrupted calls, whether it calls the user back automatically, or if it can remember and continue the conversation if the caller calls again. If you have any other questions, feel free to ask!
r
How can we do it? Do you have any example or guide to share?
v
To enable Vapi to resume conversations after a disconnected call, save the conversation summary and caller's number at the end of each call. When the caller returns, load this context for the assistant using a system message like:
Copy code
json
{
  "assistant": {
    "model": {
      "messages": [
        {
          "role": "system",
          "content": "You're a technical support assistant. Here's where we left off: [insert previous summary here]"
        }
      ]
    }
  }
}
This lets the agent continue from where it left off. See the [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests) for more details. Source: - [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests)
r
There is something unique in the call so that the agent can recognize that this was the previous call that was disconnected
ok got it.
Thank you
k
Video tutorial

https://youtu.be/CvhonBxoJ00?si=CCamshYFd-JxxIE1â–¾

v
I don't have any specific information available about how Vapi uniquely identifies calls or how the agent can recognize that a new call is a continuation of a previously disconnected one. If you have any other questions, feel free to ask!
Yes, the agent recognizes returning callers by their phone number. To resume a previous conversation, save the caller's number and conversation summary at the end of each call. When the same number calls again, retrieve the summary and pass it to the assistant as context:
Copy code
json
{
  "assistant": {
    "model": {
      "messages": [
        {
          "role": "system",
          "content": "You're a technical support assistant. Here's where we left off: [insert previous summary here]"
        }
      ]
    }
  }
}
This lets the agent continue from where it left off for that caller. Reference: [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests) Source: - [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests)
Yes, the agent recognizes returning callers using the phone number as a unique identifier. When a call ends, save the conversation summary and the caller's number. On the next call from the same number, retrieve the summary and pass it to the assistant like this:
Copy code
json
{
  "assistant": {
    "model": {
      "messages": [
        {
          "role": "system",
          "content": "You're a technical support assistant. Here's where we left off: [insert previous summary here]"
        }
      ]
    }
  }
}
This lets the agent continue the conversation from where it left off. Reference: [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests) Source: - [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests)
To recognize and resume a previous conversation, use the caller's phone number as the unique identifier. At the end of each call, save the phone number and conversation summary. When the same number calls again, retrieve the summary and include it in the assistant's system prompt:
Copy code
json
{
  "assistant": {
    "model": {
      "messages": [
        {
          "role": "system",
          "content": "You're a technical support assistant. Here's where we left off: [insert previous summary here]"
        }
      ]
    }
  }
}
This lets the agent continue from where it left off for that caller. Reference: [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests) Source: - [Vapi inbound support example](https://docs.vapi.ai/examples/inbound-support#handle-assistant-requests)