# Phone & SIP Setup

Bind the client's SIP number to an assistant for inbound voice calls

> Full REST + WebSocket API reference: https://api.happ.tools/reference

Add a SIP phone number, bind it to an assistant, and the AI voice agent answers inbound calls.

<VoiceSetupDemo />

## Connect a phone [#connect-a-phone]

1. Get SIP credentials from a [supported provider](/docs/voice/providers): phone number, SIP login, SIP password, telephony URL.
2. **Phones** > **Add Phone**, fill the fields below, **Save**.
3. Bind it: select an **Assistant** in the phone settings (one phone → one assistant), **Save**.
4. Add the telephony provider integration: **Integrations** > **Add Integration** > pick the provider, enter credentials, activate.
5. Configure the assistant's voice settings, then call the number to test the greeting and a tool.

## Phone fields [#phone-fields]

| Field        | Value                                 |
| ------------ | ------------------------------------- |
| Phone Number | SIP phone number (e.g. +380501234567) |
| SIP Login    | Authentication username               |
| SIP Password | Authentication password               |
| Provider URL | SIP server address                    |
| Codec        | A-law (default) or μ-law              |
| Comment      | Optional label                        |

## Voice settings (on assistant) [#voice-settings-on-assistant]

| Setting            | Value                                       |
| ------------------ | ------------------------------------------- |
| Voice              | 30 built-in voices or ElevenLabs            |
| Audio format       | Input/output format (default PCM 8000)      |
| Eagerness          | Eager, Normal, or Patient                   |
| Turn after silence | Seconds before assistant speaks (default 7) |
| Soft timeout       | Max wait for user response; -1 = unlimited  |

See [Assistants > Voice Settings](/docs/assistants#voice-settings).

## API [#api]

```bash
POST /api/phones
X-Access-Token: happ_your_token_here
Content-Type: application/json

{
  "phoneNumber": "+380501234567",
  "sipLogin": "your-sip-login",
  "password": "your-sip-password",
  "telephonyUrl": "sip.provider.com",
  "codec": "alaw",
  "comment": "Main office line"
}
```

Bind to an assistant with `PATCH /api/phones/{phoneId}` (`{ "assistantId": "..." }`). List `GET /api/phones`, update `PATCH`, remove `DELETE /api/phones/{phoneId}`.

**API:** [api.happ.tools/reference](https://api.happ.tools/reference)

## Troubleshooting [#troubleshooting]

| Problem        | Solution                                            |
| -------------- | --------------------------------------------------- |
| No audio       | Verify SIP credentials and provider URL             |
| Choppy audio   | Check network; try the other codec (alaw vs ulaw)   |
| Slow responses | Set eagerness to Eager                              |
| No connection  | Verify the telephony provider integration is active |
| Wrong voice    | Check the voice setting in assistant configuration  |

## Next [#next]

* [Telephony providers](/docs/voice/providers) — provider list
* [Voice Assistant](/docs/voice) — overview
