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

# Bring your own carrier

> Configure a generic SIP carrier and route inbound and outbound calls over your own provider.

BYOC is a first-class Leamout connectivity model. The customer owns the carrier relationship while Leamout owns routing, durable call state, controls, events, and policy.

The BYOC product flow is:

1. Discover the built-in `generic-sip` carrier provider.
2. Create an organization carrier connection.
3. Configure encrypted outbound digest authentication.
4. Create a BYOC trunk and SIP endpoint.
5. Create BYOC numbers and assign their carrier ownership.
6. Create a voice application and bind the inbound DID.
7. Place an outbound call and verify carrier/trunk/endpoint attribution.
8. Add or remove an inbound source-IP allowlist without interrupting the runtime.
9. Rotate digest credentials without interrupting the runtime.

## Discover the generic SIP provider

```bash theme={null}
curl -sS "$LEAMOUT_API_URL/v1/carrier-providers/" \
  -H "Authorization: Bearer $LEAMOUT_TOKEN"
```

Use the provider whose `slug` is `generic-sip` and whose status is `active`.

## Create a connection

```json theme={null}
{
  "provider_id": "<generic-sip provider id>",
  "name": "Primary carrier",
  "inbound_enabled": true
}
```

## Create a BYOC trunk

```json theme={null}
{
  "type": "byoc",
  "carrier_connection_id": "<connection id>",
  "name": "Primary trunk",
  "direction": "bidirectional"
}
```

Then add one or more trunk endpoints and assign numbers to the same carrier connection.

<Note>
  A requested BYOC route does not silently fall back to managed carrier connectivity. The two connectivity modes remain separate policy choices.
</Note>
