> ## 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.

# Build with an AI coding agent

> Install the Plivo SIP trunking skill so Claude Code, Cursor or Codex know how to connect LiveKit, ElevenLabs, Retell or Vapi to phone calls, check the setup is ready, and read a call that failed.

Plivo publishes a skill for AI coding agents such as Claude Code, Cursor and Codex. Install it once, and your agent knows how to connect an AI voice platform such as LiveKit, ElevenLabs, Retell or Vapi to phone calls over SIP trunking: which objects to create and in what order, what to check before the first call, and how to read a call that failed. A skill is a set of instructions your agent loads on its own when the task matches, so you keep working the way you already do.

## Install

<Info>
  Skills ship inside the [Plivo CLI](https://github.com/plivo/plivo-cli), so install it first:

  ```bash theme={null}
  brew install plivo/tap/plivo
  plivo login
  ```

  The skill also drives Plivo through the CLI, so without it your agent falls back to raw API calls and loses the checks.
</Info>

```bash theme={null}
plivo skill install sip-trunking
```

The skill ships inside the CLI binary, so this writes it out with no network call and no other tooling.

It lands in Claude Code's skills directory by default. For another agent, name the directory:

<CodeGroup>
  ```bash Claude Code theme={null}
  plivo skill install sip-trunking
  ```

  ```bash Cursor theme={null}
  plivo skill install sip-trunking --dir ~/.cursor/skills/plivo-sip-trunking
  ```

  ```bash Codex theme={null}
  plivo skill install sip-trunking --dir ~/.codex/skills/plivo-sip-trunking
  ```
</CodeGroup>

To see every skill in your binary and whether it is installed:

```bash theme={null}
plivo skill list
```

```
SELECTOR          INSTALLS TO             STATE          WHAT IT IS
cli               plivo-cli               installed      the CLI reference
audio-streaming   plivo-audio-streaming   not installed  connect a WebSocket voice bot to calls with <Stream>
sip-trunking      plivo-sip-trunking      not installed  connect an AI voice platform over SIP trunking
voice-xml         plivo-voice-xml         installed      write and fix Plivo Voice XML
```

`plivo skill install all` writes every one of them.

### Read it before you install

The skill is a plain Markdown file. Print it and read it before it goes anywhere near your agent:

```bash theme={null}
plivo skill install sip-trunking --print | less
```

`--dry-run` shows where a file would be written without writing it.

## What is in the skill

| Section               | What it holds                                                                                                                               |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Readiness checks      | The number, the inbound trunk it is attached to, the origination URI, outbound authentication, and the steps only your platform can confirm |
| Setup in order        | Country prerequisites, number, inbound trunk and URI, attaching the number, outbound trunk and credentials, first call                      |
| Per-platform settings | The URI, port, transport and authentication method each platform expects                                                                    |
| Failure codes         | Plivo hangup causes and the platform's SIP response, mapped to who is at fault and what to change                                           |
| Transfers             | Handing a live call to a person with SIP REFER, and the rules on where it may point                                                         |
| India                 | KYC, media anchoring and consent for calls in India                                                                                         |
| Request bodies        | Ready-made JSON for every trunk, URI, credential and IP list, per platform                                                                  |

## What the agent does with it

1. **Checks readiness before writing code.** The number is rented and voice-enabled, India compliance is accepted, it is attached to an inbound trunk, the trunk is enabled, and the origination URI's host, port and transport match what your platform documents. Read-only: nothing on your account changes.
2. **Creates the objects in the right order,** with the values your platform expects, and names the steps you must do in the platform's own dashboard because Plivo cannot see them.
3. **Sets up both directions,** inbound so calls reach your agent and outbound so your agent can dial, using credentials or an IP list depending on the platform.
4. **Debugs from evidence.** It reads the Plivo call record and the platform's SIP response together, because they often disagree, and names who is at fault before suggesting a change. For example, ElevenLabs answering `404 Does not match any SIP Trunks` means the number is not imported on the platform.

## What it will not do

* It does not cover voice bots you host yourself over a WebSocket. Use [the Audio Streaming skill](/docs/voice-agents/audio-streaming/integration-guides/ai-coding-agent) for those.
* It does not cover connecting a PBX such as 3CX, FreePBX or Asterisk, and it does not cover carrier routing.
* It does not cover SMS, WhatsApp or the browser SDK.
* It changes nothing on your account while checking. Anything that spends money or changes routing is shown to you first.
* It does not invent CLI flags or SIP settings. Where the documentation does not answer a question, it says so instead of guessing.
* It cannot see inside your platform account. It asks you to confirm the steps that live there.

## Verify it is working

In the project where you installed it, ask your agent:

> Calls to my Plivo number are not reaching my ElevenLabs agent. What do I check?

You should get an ordered check of the number, the trunk it is attached to, the origination URI and its transport, then the import on the platform side, with the Plivo commands to run at each step. If you get generic SIP advice with no Plivo commands, the skill did not load.

## Keeping it current

The skill ships with the CLI, so it moves when the CLI does. Upgrade the binary, then reinstall:

```bash theme={null}
plivo upgrade
plivo skill install sip-trunking
```

`plivo skill list` marks a skill `installed (differs from bundled)` when your copy no longer matches the one in the binary, which is how you spot a stale or locally edited skill.

<Warning>
  An installed skill runs with your agent's permissions. Read the file before installing it, and treat a skill from a source you do not trust the way you would treat a shell script.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="Audio Streaming skill" href="/docs/voice-agents/audio-streaming/integration-guides/ai-coding-agent">
    For voice bots you host yourself over a WebSocket
  </Card>

  <Card title="Your first agent call" href="/docs/voice-agents/sip-trunking/getting-started/your-first-agent-call">
    The same setup done by hand, step by step
  </Card>

  <Card title="Transfer calls to humans" href="/docs/sip-trunking/concepts/sip-refer">
    SIP REFER, and where a transfer may point
  </Card>

  <Card title="Plivo CLI" href="https://github.com/plivo/plivo-cli">
    The command-line tool the skill drives
  </Card>
</CardGroup>
