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

# SIP Digest Authentication

> Secure access to your SIP endpoint using username and password authentication.

## Overview

SIP Digest Authentication is a security mechanism that verifies access to your SIP endpoint using a **username and password**.

<Info>
  This method uses a secure challenge-response mechanism, meaning the password is not sent in plain text.
</Info>

<Frame>
  <img className="block" src="https://mintcdn.com/monobot-0e0ffe36/90B0L5Hnl7m86xGy/images/telephony/authentication.png?fit=max&auto=format&n=90B0L5Hnl7m86xGy&q=85&s=f8efe22ed7813c5400a2b6b57e566638" alt="SIP Authentication" width="3022" height="1634" data-path="images/telephony/authentication.png" />
</Frame>

***

## Why It’s Needed

Digest Authentication protects your system from:

* Unauthorized access
* Fraudulent outbound calls
* Unknown SIP connections

Only systems with valid credentials can connect.

***

### How It Works

SIP Digest Authentication uses a challenge-response mechanism to securely verify credentials.

***

#### Step-by-step flow

1. Client sends initial request (without authentication)
2. Server responds with:
   * `401 Unauthorized`
   * a **nonce** (challenge value)
3. Client generates a secure response using:
   * SIP Username
   * SIP Password
   * Server-provided nonce
4. Client sends the request again with the computed response
5. Server validates the response:
   * If valid → access granted
   * If invalid → access denied

```
   Client → REGISTER → Server
Server → 401 Unauthorized + nonce → Client
Client → REGISTER (with auth response) → Server
Server → 200 OK → Client
```

***

#### Important

<Info>
  The password is never sent directly. Instead, a hashed value is calculated using the password and server challenge.
</Info>

<Note>
  Each authentication request uses a unique nonce, which prevents replay attacks.
</Note>

## Configuration

Provide the following credentials:

* **SIP Username** — unique identifier for authentication
* **SIP Password** — secure password used for verification

These credentials must match the configuration on your SIP provider or PBX.

***

## When to Use

Use SIP Digest Authentication when:

* Your SIP provider requires **credential-based authentication**
* IP Whitelisting is not available or sufficient
* You need an additional layer of security

***

## Example

```
Username: sip-user-001
Password: ********
```

***

## Best Practices

<Note>
  Use strong, unique passwords and avoid sharing credentials publicly.
</Note>

<Warning>
  Incorrect credentials will result in failed call connections.
</Warning>

<Info>
  For maximum security, combine Digest Authentication with **IP Whitelisting** when possible.
</Info>
