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

# Calls

> Initiate and manage WhatsApp voice calls with the TypeScript SDK

The SDK includes helpers for Meta’s Calling API and Kapso’s call logs.

## Initiate a call

```ts theme={null}
await client.calls.connect({
  phoneNumberId: '123',
  to: '14085551234',
  session: { sdpType: 'offer', sdp: 'v=0...' },
  bizOpaqueCallbackData: 'tracking'
});
```

## Pre-accept / Accept

```ts theme={null}
await client.calls.preAccept({
  phoneNumberId: '123',
  callId: 'wacid....',
  session: { sdpType: 'answer', sdp: 'v=0' }
});

await client.calls.accept({
  phoneNumberId: '123',
  callId: 'wacid....',
  session: { sdpType: 'answer', sdp: 'v=0' }
});
```

## Reject / Terminate

```ts theme={null}
await client.calls.reject({ phoneNumberId: '123', callId: 'wacid....' });
await client.calls.terminate({ phoneNumberId: '123', callId: 'wacid....' });
```

## Check call permission

```ts theme={null}
const perm = await client.calls.permissions.get({
  phoneNumberId: '123',
  userWaId: '15551234567'
});
```

## Call logs (Kapso)

```ts theme={null}
import { buildKapsoFields } from '@kapso/whatsapp-cloud-api';

const logs = await client.calls.list({
  phoneNumberId: '123',
  direction: 'INBOUND',
  limit: 20,
  fields: buildKapsoFields()
});
```

<Note>
  Calling is gradually rolling out in WhatsApp and may not be enabled for all numbers.
</Note>

> For a complete list of Kapso fields and presets, see [Kapso Extensions](/docs/whatsapp/typescript-sdk/kapso-extensions).
