> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagnose and ask

> Explain why any call or message failed, or ask Plivo's assistant a question, from the terminal.

These work for every product, not just voice agents. `diagnose` reads the records of a call or message on your account and explains what happened; `ask` answers questions about Plivo in plain English. To read the documentation itself from the terminal, see [Read the docs from your terminal](/docs/cli/docs).

## Diagnose a call or message

Give the CLI a call or message UUID and it explains what happened: whose side failed (your server, Plivo, the carrier), the timeline, and what to do next. It reads Plivo's call and message records and carrier reports for you.

**Commands**

```bash theme={null}
plivo voice calls diagnose <call_uuid>
plivo messaging sms diagnose <message_uuid>
plivo messaging mms diagnose <message_uuid>
plivo messaging whatsapp diagnose <message_uuid>
```

**Examples**

```bash theme={null}
plivo voice calls list --limit 5
plivo voice calls diagnose 58dcee4c-969d-4a5d-a732-cf50573e8d8c
```

A typical answer for a failed inbound call:

```text theme={null}
What happened: This inbound call was terminated because Plivo could not fetch call instructions from your answer URL.
Likely cause: The answer URL https://api.example.com/plivo/answer returned 404. The call was hung up with
              cause 7011 (Error Reaching Answer URL).
Timeline: 07:48:40.600 call received · 07:48:40.630 answer URL responded 404 · 07:48:41.016 call hung up
Suggested next step: Make sure the answer URL is deployed and returns Plivo XML with HTTP 200; every inbound call will fail until it does.
```

Use `-o json` to receive the analysis as a stream of events. Answers usually take about a minute (allow 30 to 120 seconds) and are written by the AI assistant, so read them as an explanation rather than parsing them as a fixed schema; only calls and messages on your own account can be diagnosed.

## Ask a question

Ask Plivo's AI assistant a question without leaving the terminal. The assistant searches the Plivo documentation, reads the relevant pages, and streams an answer with source links.

**Command:** `plivo ask "<question>"`

**Flags**

* `-i, --interactive`: start a chat session that keeps context between turns (`/reset`, `/help`, `/exit`). Use `-o table` when input is piped.
* `-o json`: emit the answer as one JSON event per line (start, tool\_call, tool\_output, token, final), for scripts and agents.

**Examples**

```bash theme={null}
plivo ask "What hangup cause does Plivo return when the callee is busy?"
plivo ask "Do I need 10DLC registration to send SMS to US numbers?" -o json
plivo ask -i
```

<Note>
  `ask` and `diagnose` share a rate limit per account. If you see `RATE_LIMITED`, wait for the retry interval shown in the error.
</Note>

#### `plivo support`

List the support escalations raised from your account through the assistant. Requires a browser login (`plivo login`), because escalations are scoped to the person who raised them.
