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

# LiveKit SIP call adapter

> Dial through an existing outbound SIP trunk into a host-owned LiveKit room.

`createLiveKitSipCallProvider` controls a SIP participant using borrowed LiveKit server SDK ports. It is separate from [LiveKitVoiceTransport](/voice/livekit), which handles room audio.

## Prerequisites

Provision an outbound SIP trunk and a room, then create authenticated server clients in your host. Pass structural `LiveKitSipCallPort` and `LiveKitCallRoomPort` implementations to Agentium. No LiveKit SDK or credentials are loaded by the adapter itself.

```bash theme={null}
npm install @agentium/core@4.0.0
# For hosts using LiveKit's Node server clients:
npm install livekit-server-sdk
```

## Bind the route

```typescript theme={null}
import {
  createLiveKitSipCallProvider,
  type LiveKitSipCallPort,
  type LiveKitCallRoomPort,
} from "@agentium/core/telephony";

export function createRoomCalls(
  sip: LiveKitSipCallPort,
  rooms: LiveKitCallRoomPort,
  trunkId: string,
  roomName: string,
  fromNumber: string,
) {
  return createLiveKitSipCallProvider({
    routeId: "support-room-v1",
    allowedFrom: [fromNumber],
    sip, rooms, trunkId, roomName,
    timeoutMs: 15_000,
  });
}
```

Use one host-controlled route per room. Do not derive the room or trunk from a caller's dial payload. Add this provider to [OutboundCallService](/telephony/quickstart), which enforces intent ownership and authorization around every operation.

## What the adapter owns

A create request assigns a deterministic `call-…` participant identity and sets `waitUntilAnswered: false` and `hidePhoneNumber: true`. The call reference includes the room, participant identity, and SIP call ID. Reads verify the participant's SIP call identity before reporting status.

Hangup removes that SIP participant. It does not close the room or your other participants. A missing participant does not automatically become a completed call; the host needs reliable terminal evidence.

Your application owns trunk provisioning, room connection, track publication, audio conversion, callback verification, and client lifecycle. See [LiveKit outbound calls](https://docs.livekit.io/telephony/making-calls/outbound-calls/) and [media transport](/voice/livekit) for those separate connections.


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