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

# Retell AI Integration

> Connect Plivo SIP trunking with Retell AI voice agents using the Plivo Console or API

Connect Plivo SIP trunking to Retell AI to enable your voice agents to make and receive phone calls through Plivo's global voice network. This guide uses Retell's [elastic SIP trunking](https://docs.retellai.com/deploy/custom-telephony) approach recommended for connecting custom telephony providers. You can configure Plivo using the [Console](https://cx.plivo.com/) or the [API](/sip-trunking/api/overview); each step in this guide includes both options.

This guide follows a single linear flow: set up both trunks in Plivo, then import your number into Retell once.

***

## Prerequisites

| Requirement        | Description                                                                          |
| ------------------ | ------------------------------------------------------------------------------------ |
| **Plivo Account**  | [Sign up](https://cx.plivo.com/signup) with SIP trunking enabled                     |
| **Phone Number**   | [Purchase a voice-enabled number](https://cx.plivo.com/phone-numbers)                |
| **Retell Account** | [Create account](https://dashboard.retellai.com/) with at least one agent configured |

If you're using the API, you also need:

* Your Plivo **Auth ID** and **Auth Token**, available on the [Plivo Console home page](https://cx.plivo.com/home). The Plivo API uses HTTP Basic authentication.
* Your Retell **API key**, available on the [API Keys page](https://dashboard.retellai.com/settings/api-keys) of the Retell dashboard. The Retell API uses Bearer authentication.

Export your credentials as environment variables to use with the code samples in this guide:

```shell theme={null}
export PLIVO_AUTH_ID="<your_auth_id>"
export PLIVO_AUTH_TOKEN="<your_auth_token>"
export RETELL_API_KEY="<your_retell_api_key>"
```

<Note>
  **Indian phone numbers:** TRAI regulations require voice AI platforms to terminate SIP traffic on servers located in India. Confirm with [Retell support](https://docs.retellai.com/) that your deployment meets this requirement before using Indian phone numbers.
</Note>

***

## How the integration works

| Direction    | Call path                                                                       | What you configure                                                                             |
| ------------ | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Inbound**  | Caller → Plivo number → Plivo inbound trunk → `sip.retellai.com` → Retell agent | Inbound trunk in Plivo pointing to Retell's SIP server                                         |
| **Outbound** | Retell agent → Plivo outbound trunk → PSTN → Callee                             | Outbound trunk in Plivo; its termination domain and credentials go into Retell's number import |

<Note>
  **Set up both trunks for a fully working number.** The outbound trunk is always required — Retell won't import a number without its termination URI, even for inbound-only use. The inbound trunk routes calls to your agent; skip the inbound trunk and phone number steps only if your agent exclusively makes outbound calls.
</Note>

***

## Set up the integration

<Steps>
  <Step title="Create an outbound trunk in Plivo" titleSize="h3">
    Set up an outbound trunk with username and password authentication in Plivo. Retell uses the trunk's **Termination SIP Domain** and these credentials to place outbound calls.

    <Tabs>
      <Tab title="Console">
        1. Sign in to the [Plivo Console](https://cx.plivo.com/).
        2. Navigate to **SIP Trunking** → [**Outbound Trunks**](https://cx.plivo.com/sip-trunking/outbound).
        3. Select **Create Trunk** and provide a descriptive name for your trunk.
        4. In the **Trunk Authentication** section → **Credential**, select **Create new credential**.
        5. Add a credential name, and a username and strong password for outbound call authentication, then select **Create credential**.
           * **Username:** 5 to 20 characters, alphanumeric only.
           * **Password:** 5 to 20 characters, using only alphanumeric characters and the special characters `~!@#$%^&*()_+`, with at least one special character.
           * Use the same username and password when you import your number into Retell.
        6. For **Authentication**, select the credential you created in the previous step.
        7. Optional: enable **Secure Trunking** to encrypt SIP signaling over TLS.
        8. Select **Create Trunk** to complete your outbound trunk configuration.

        Copy the **Termination SIP Domain** (for example, `21784177241578.zt.plivo.com`). You need it when you import your number into Retell.
      </Tab>

      <Tab title="API">
        First, create a [credential](/sip-trunking/api/credentials) with a username and strong password for outbound call authentication:

        * **Username:** 5 to 20 characters, alphanumeric only.
        * **Password:** 5 to 20 characters, using only alphanumeric characters and the special characters `~!@#$%^&*()_+`, with at least one special character.
        * Use the same username and password when you import your number into Retell.

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Zentrunk/Credential/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Content-Type: application/json' \
          -H 'Accept: application/json' \
          -d '{
            "name": "Retell outbound credential",
            "username": "<username>",
            "password": "<password>"
          }'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Zentrunk/Credential/`, {
            method: 'POST',
            headers: {
              'Authorization': authHeader,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              name: 'Retell outbound credential',
              username: '<username>',
              password: '<password>',
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]

          response = requests.post(
              f"https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/",
              auth=(auth_id, auth_token),
              json={
                  "name": "Retell outbound credential",
                  "username": "<username>",
                  "password": "<password>",
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        Copy the `credential_uuid` from the response for the next step:

        ```json theme={null}
        {
          "api_id": "<api_id>",
          "message": "Credential created successfully",
          "credential_uuid": "<credential_uuid>"
        }
        ```

        Next, create an [outbound trunk](/sip-trunking/api/trunks) using the credential. To encrypt SIP signaling over TLS, add `"secure": true` to the request:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Zentrunk/Trunk/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Content-Type: application/json' \
          -H 'Accept: application/json' \
          -d '{
            "name": "My Retell outbound trunk",
            "trunk_direction": "outbound",
            "credential_uuid": "<credential_uuid>"
          }'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Zentrunk/Trunk/`, {
            method: 'POST',
            headers: {
              'Authorization': authHeader,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              name: 'My Retell outbound trunk',
              trunk_direction: 'outbound',
              credential_uuid: '<credential_uuid>',
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]

          response = requests.post(
              f"https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/",
              auth=(auth_id, auth_token),
              json={
                  "name": "My Retell outbound trunk",
                  "trunk_direction": "outbound",
                  "credential_uuid": "<credential_uuid>",
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        Copy the `trunk_id` from the response:

        ```json theme={null}
        {
          "api_id": "<api_id>",
          "message": "Trunk created successfully.",
          "trunk_id": "<trunk_id>"
        }
        ```

        Finally, retrieve the trunk to get your **Termination SIP Domain**. It's returned in the `trunk_domain` field. For example, `21784177241578.zt.plivo.com`:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Zentrunk/Trunk/<trunk_id>/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Accept: application/json'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');
          const trunkId = '<trunk_id>';

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Zentrunk/Trunk/${trunkId}/`, {
            headers: { 'Authorization': authHeader },
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]
          trunk_id = "<trunk_id>"

          response = requests.get(
              f"https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/",
              auth=(auth_id, auth_token),
          )
          print(response.json())
          ```
        </CodeGroup>

        Copy the **Termination SIP Domain** (`trunk_domain`). You need it when you import your number into Retell.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Create an inbound trunk in Plivo" titleSize="h3">
    Create an inbound trunk that routes calls from your Plivo phone number to Retell's SIP server.

    <Tabs>
      <Tab title="Console">
        1. Navigate to **SIP Trunking** → [**Inbound Trunks**](https://cx.plivo.com/sip-trunking/inbound).
        2. Select **Create Trunk** and provide a descriptive name for your trunk.
        3. For **Primary URI**, select **Add New URI** and enter Retell's SIP server: `sip.retellai.com;transport=tcp`.
        4. For **Link Numbers**, select your phone number from the dropdown menu. Or connect your phone number in the next step.
        5. Select **Create Trunk**.
      </Tab>

      <Tab title="API">
        First, create an [origination URI](/sip-trunking/api/origination-uris) that points to Retell's SIP server:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Zentrunk/URI/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Content-Type: application/json' \
          -H 'Accept: application/json' \
          -d '{
            "name": "Retell SIP server",
            "uri": "sip.retellai.com;transport=tcp"
          }'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Zentrunk/URI/`, {
            method: 'POST',
            headers: {
              'Authorization': authHeader,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              name: 'Retell SIP server',
              uri: 'sip.retellai.com;transport=tcp',
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]

          response = requests.post(
              f"https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/",
              auth=(auth_id, auth_token),
              json={
                  "name": "Retell SIP server",
                  "uri": "sip.retellai.com;transport=tcp",
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        Copy the `uri_uuid` from the response for the next step:

        ```json theme={null}
        {
          "api_id": "<api_id>",
          "message": "Origination URI created successfully",
          "uri_uuid": "<uri_uuid>"
        }
        ```

        Next, create an [inbound trunk](/sip-trunking/api/trunks) using the origination URI as the primary URI:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Zentrunk/Trunk/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Content-Type: application/json' \
          -H 'Accept: application/json' \
          -d '{
            "name": "My Retell inbound trunk",
            "trunk_direction": "inbound",
            "primary_uri_uuid": "<uri_uuid>"
          }'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Zentrunk/Trunk/`, {
            method: 'POST',
            headers: {
              'Authorization': authHeader,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              name: 'My Retell inbound trunk',
              trunk_direction: 'inbound',
              primary_uri_uuid: '<uri_uuid>',
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]

          response = requests.post(
              f"https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/",
              auth=(auth_id, auth_token),
              json={
                  "name": "My Retell inbound trunk",
                  "trunk_direction": "inbound",
                  "primary_uri_uuid": "<uri_uuid>",
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        Copy the `trunk_id` from the response. You use it to connect your phone number in the next step:

        ```json theme={null}
        {
          "api_id": "<api_id>",
          "message": "Trunk created successfully.",
          "trunk_id": "<trunk_id>"
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Connect your phone number" titleSize="h3">
    Connect your Plivo phone number to the inbound trunk. You can skip this step if you connected your phone number when you created the inbound trunk.

    <Tabs>
      <Tab title="Console">
        1. Navigate to **Phone Numbers** → [**Purchased Numbers**](https://cx.plivo.com/phone-numbers/list).
        2. Select the phone number to connect to the trunk.
        3. For **Application Type**, select **SIP Trunk**.
        4. For **Trunk**, select the inbound trunk you created in the previous step.
        5. Select **Save changes**.
      </Tab>

      <Tab title="API">
        Assign the inbound trunk to your phone number using the [update a number](/numbers/account-phone-numbers#update-an-account-phone-number) endpoint. Set the `app_id` field to the **trunk ID** of your inbound trunk. Use your phone number in E.164 format without the leading `+`. For example, `15105550100`:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Number/15105550100/" \
          -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
          -H 'Content-Type: application/json' \
          -H 'Accept: application/json' \
          -d '{
            "app_id": "<trunk_id>"
          }'
          ```

          ```javascript Node theme={null}
          const authId = process.env.PLIVO_AUTH_ID;
          const authToken = process.env.PLIVO_AUTH_TOKEN;
          const authHeader = 'Basic ' + Buffer.from(`${authId}:${authToken}`).toString('base64');
          const phoneNumber = '15105550100';

          const response = await fetch(`https://api.plivo.com/v1/Account/${authId}/Number/${phoneNumber}/`, {
            method: 'POST',
            headers: {
              'Authorization': authHeader,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              app_id: '<trunk_id>',
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          auth_id = os.environ["PLIVO_AUTH_ID"]
          auth_token = os.environ["PLIVO_AUTH_TOKEN"]
          phone_number = "15105550100"

          response = requests.post(
              f"https://api.plivo.com/v1/Account/{auth_id}/Number/{phone_number}/",
              auth=(auth_id, auth_token),
              json={
                  "app_id": "<trunk_id>",
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        A successful response returns HTTP `202`:

        ```json theme={null}
        {
          "api_id": "<api_id>",
          "message": "changed"
        }
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Import your number into Retell" titleSize="h3">
    Import your Plivo phone number into Retell using the **Termination SIP Domain** and the credential username and password from the outbound trunk you created earlier.

    <Tabs>
      <Tab title="Dashboard">
        1. Sign in to the [Retell dashboard](https://dashboard.retellai.com/).
        2. Navigate to **Phone Numbers**, select the option to add a number, and choose **Connect to your number via SIP trunking**.
        3. Configure the import with the following values:

        | Field               | Value                                                                                                                        |
        | ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
        | Phone Number        | Your Plivo number in E.164 format. For example, `+15105550100`.                                                              |
        | Termination URI     | Your Plivo **Termination SIP Domain**. For example, `21784177241578.zt.plivo.com`. Don't enter Retell's SIP server URI here. |
        | SIP Trunk User Name | The credential username from your Plivo outbound trunk.                                                                      |
        | SIP Trunk Password  | The credential password from your Plivo outbound trunk.                                                                      |
        | Nickname (optional) | A descriptive label. For example, `Plivo support line`.                                                                      |
        | Outbound Transport  | Keep the default, **TCP**. Select **TLS** if **Secure Trunking** is enabled on your Plivo outbound trunk.                    |

        4. Select **Save**.
        5. After the number is imported, bind an **inbound agent** and an **outbound agent** to it. A number can only receive or make calls after an agent is bound in that direction.

        To learn more, see the [Retell custom telephony guide](https://docs.retellai.com/deploy/custom-telephony).
      </Tab>

      <Tab title="API">
        Import the number with Retell's [Import Phone Number API](https://docs.retellai.com/api-references/import-phone-number). You can bind inbound and outbound agents in the same request.

        Set `transport` to `TLS` if **Secure Trunking** is enabled on your Plivo outbound trunk; otherwise, use `TCP`:

        <CodeGroup>
          ```shell cURL theme={null}
          curl "https://api.retellai.com/import-phone-number" \
          -H "Authorization: Bearer $RETELL_API_KEY" \
          -H 'Content-Type: application/json' \
          -d '{
            "phone_number": "+15105550100",
            "termination_uri": "<trunk_id>.zt.plivo.com",
            "sip_trunk_auth_username": "<username>",
            "sip_trunk_auth_password": "<password>",
            "transport": "TCP",
            "nickname": "Plivo support line",
            "inbound_agents": [{ "agent_id": "<agent_id>", "weight": 1 }],
            "outbound_agents": [{ "agent_id": "<agent_id>", "weight": 1 }]
          }'
          ```

          ```javascript Node theme={null}
          const response = await fetch('https://api.retellai.com/import-phone-number', {
            method: 'POST',
            headers: {
              'Authorization': `Bearer ${process.env.RETELL_API_KEY}`,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              phone_number: '+15105550100',
              termination_uri: '<trunk_id>.zt.plivo.com',
              sip_trunk_auth_username: '<username>',
              sip_trunk_auth_password: '<password>',
              transport: 'TCP',
              nickname: 'Plivo support line',
              inbound_agents: [{ agent_id: '<agent_id>', weight: 1 }],
              outbound_agents: [{ agent_id: '<agent_id>', weight: 1 }],
            }),
          });
          console.log(await response.json());
          ```

          ```python Python theme={null}
          import os
          import requests

          response = requests.post(
              "https://api.retellai.com/import-phone-number",
              headers={"Authorization": f"Bearer {os.environ['RETELL_API_KEY']}"},
              json={
                  "phone_number": "+15105550100",
                  "termination_uri": "<trunk_id>.zt.plivo.com",
                  "sip_trunk_auth_username": "<username>",
                  "sip_trunk_auth_password": "<password>",
                  "transport": "TCP",
                  "nickname": "Plivo support line",
                  "inbound_agents": [{"agent_id": "<agent_id>", "weight": 1}],
                  "outbound_agents": [{"agent_id": "<agent_id>", "weight": 1}],
              },
          )
          print(response.json())
          ```
        </CodeGroup>

        A successful response returns HTTP `201` with the imported number details:

        ```json theme={null}
        {
          "phone_number": "+15105550100",
          "phone_number_pretty": "+1 (510) 555-0100",
          "phone_number_type": "custom",
          "nickname": "Plivo support line",
          "inbound_agents": [{ "agent_id": "<agent_id>", "weight": 1 }],
          "sip_outbound_trunk_config": {
            "termination_uri": "<trunk_id>.zt.plivo.com",
            "auth_username": "<username>",
            "transport": "TCP"
          },
          "last_modification_timestamp": 1703413636133
        }
        ```
      </Tab>
    </Tabs>

    <Info>
      **Changing trunk configuration:** Retell doesn't support editing an imported number's SIP trunk settings. To change the termination URI or credentials, delete the number in Retell and import it again.
    </Info>
  </Step>

  <Step title="Test your integration" titleSize="h3">
    **Inbound:** Call your Plivo phone number. The Retell agent bound to the number should answer the call.

    **Outbound:** Place a call from the Retell dashboard, or use Retell's [Create Phone Call API](https://docs.retellai.com/api-references/create-phone-call). Set `from_number` to your imported Plivo number:

    <CodeGroup>
      ```shell cURL theme={null}
      curl "https://api.retellai.com/v2/create-phone-call" \
      -H "Authorization: Bearer $RETELL_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
        "from_number": "+15105550100",
        "to_number": "+12135550123"
      }'
      ```

      ```javascript Node theme={null}
      const response = await fetch('https://api.retellai.com/v2/create-phone-call', {
        method: 'POST',
        headers: {
          'Authorization': `Bearer ${process.env.RETELL_API_KEY}`,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          from_number: '+15105550100',
          to_number: '+12135550123',
        }),
      });
      console.log(await response.json());
      ```

      ```python Python theme={null}
      import os
      import requests

      response = requests.post(
          "https://api.retellai.com/v2/create-phone-call",
          headers={"Authorization": f"Bearer {os.environ['RETELL_API_KEY']}"},
          json={
              "from_number": "+15105550100",
              "to_number": "+12135550123",
          },
      )
      print(response.json())
      ```
    </CodeGroup>
  </Step>
</Steps>

***

## Troubleshooting

Trunk configuration errors typically surface only when a call is placed, so test both directions after setup. If a call fails to connect, check the following common issues:

| Issue                        | Solution                                                                                                                                                                                       |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Inbound call doesn't connect | Verify the inbound trunk's primary URI is `sip.retellai.com;transport=tcp` and your phone number is connected to the inbound trunk. Confirm an inbound agent is bound to the number in Retell. |
| Outbound call fails          | Verify the termination URI in Retell matches your Plivo **Termination SIP Domain** exactly, with no spaces or `sip:` prefix. Confirm the credential username and password match.               |
| Authentication errors        | Verify credentials match exactly in both Plivo and Retell. Use the credential username, not the credential name.                                                                               |
| Calls drop or have no audio  | If **Secure Trunking** is enabled on your Plivo outbound trunk, set **Outbound Transport** to **TLS** in Retell.                                                                               |

**Debug logs:**

* Inbound issues: First check the [Plivo logs](https://cx.plivo.com/logs/sip-trunking), then check call history in the [Retell dashboard](https://dashboard.retellai.com/).
* Outbound issues: First check call history in the [Retell dashboard](https://dashboard.retellai.com/), then check the [Plivo logs](https://cx.plivo.com/logs/sip-trunking).

For error codes, see [Plivo hangup codes](/voice-agents/sip-trunking/troubleshooting/hangup-codes).

***

## Related

<CardGroup cols={2}>
  <Card title="SIP Trunking API overview" href="/sip-trunking/api/overview">
    Plivo SIP Trunking API reference.
  </Card>

  <Card title="SIP Trunking for voice agents" href="/voice-agents/sip-trunking/overview">
    Concepts and architecture for building voice agents with Plivo SIP trunking.
  </Card>

  <Card title="Retell custom telephony guide" href="https://docs.retellai.com/deploy/custom-telephony">
    Retell's guide to connecting custom telephony providers.
  </Card>

  <Card title="Retell API reference" href="https://docs.retellai.com/api-references/import-phone-number">
    Retell's Import Phone Number API documentation.
  </Card>
</CardGroup>
