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

# Connect Plivo

> Add a Plivo line with your main account keys; Athena creates the SIP trunk and places calls through it.

When you add a Plivo line, Athena uses your Plivo API keys to create an outbound **Zentrunk** SIP trunk for that line
and places every call through it. You don't create the trunk yourself.

## Before you start

* Your Plivo **main account** Auth ID (starts with `MA`) and Auth Token, from the Plivo console home page.
  Subaccount keys (Auth ID starting with `SA`) cannot set up SIP trunking, and Athena refuses them when you save.
* **SIP Trunking** listed in your Plivo console menu.
* The Plivo phone number you want to call from, in international format (for example `+918000000000`).

## Add the line

**1. Create the line**

Open **Telephony**, select **Add configuration**, choose **Plivo**, and enter the Auth ID and Auth Token. When you save, Athena checks with Plivo that these keys can set up SIP trunking. If they can't, the save is refused and the dialog says what to change.

**2. Add your number**

Open **Manage Phone Numbers** on the line and add the number you call from. The number must belong to the same Plivo account.

**3. Wait about one minute**

Athena creates the trunk. In the Plivo console under **SIP Trunking > Outbound trunks**, a trunk named `dograh-<line number>` appears and shows **Active**.

**4. Place a test call**

Saving proves the keys; a test call proves the line.

> [!NOTE]
>
> Don't edit or delete a `dograh-...` trunk while its line is in use. You can delete trunks that belong to lines you have deleted in Athena.

## Using the API

Create the line with `POST /api/v1/organizations/telephony-configs`, then add numbers with
`POST /api/v1/organizations/telephony-configs/{config_id}/phone-numbers`
([reference](https://docs.tryopencomputer.com/api-reference/organizations/create-phone-number.md)). A save refused because of the keys returns HTTP 422
with the fix in `detail`.

## When calls don't go out

| What you see | What to do |
| - | - |
| Save refused: "These are a Plivo subaccount's keys, which cannot set up SIP trunking" | Use the main account Auth ID (`MA...`) and Auth Token. |
| Save refused: "This Plivo account does not allow SIP trunking (Zentrunk) with these keys" | Make sure SIP Trunking is available on the Plivo account, then save again. |
| "This line has no phone number yet" | Add the number you call from to this line, then call again. |
| "Its new SIP route is still being set up. Nobody was called." | Wait one minute and call again. |
| "Its India call server is starting. Nobody was called." | Calls to Indian numbers leave from Athena's India server. Wait two minutes and call again. |
| The line shows **Calls on this line are not going out** | Open the line: the reason and the time of the last try are shown there. |

If a call still doesn't go out, send support the line's configuration ID and the time of the test call. Don't send keys.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.