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

# Update Advanced Config

> Update advanced SIP configuration including failover, codecs, and alerts.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Body

**phone\_number** `string` *required*

The phone number to update configuration for. Must be in E.164 format.

**direction** `string` *required*

The direction to update: `"inbound"` or `"outbound"`.

**failover\_config** `object`

Failover configuration:

* `enabled` (boolean) — Enable/disable failover
* `endpoints` (array) — Failover SIP servers, each with `host`, `port`, `transport`, and `priority`
* `triggers` (array) — Conditions that trigger failover: `"unreachable"`, `"auth_failure"`, `"timeout"`
* `failback` (string) — `"auto"` or `"manual"`

**codec\_config** `object`

Codec configuration:

* `codecs` (array) — Ordered list of codec names: `"PCMU"`, `"PCMA"`, `"G.729"`, `"Opus"`, `"G.722"`
* `transcode` (boolean) — Enable transcoding between codecs

**alert\_config** `object`

Alert configuration:

* `enabled` (boolean) — Enable/disable alerts
* `thresholds` — `unreachable_minutes` (number), `failure_rate_percent` (number), `failure_rate_window_minutes` (number), `response_time_ms` (number)
* `channels` — `email` (boolean), `sms` (boolean), `webhook` (string, URL)

```json Example Request theme={null}
curl -X PATCH https://api.bland.ai/v1/sip/config \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
    "direction": "outbound",
    "failover_config": {
      "enabled": true,
      "endpoints": [
        { "host": "backup1.sip.provider.com", "port": 5061, "transport": "tls", "priority": 1 },
        { "host": "backup2.sip.provider.com", "port": 5061, "transport": "tls", "priority": 2 }
      ],
      "triggers": ["unreachable", "timeout"],
      "failback": "auto"
    },
    "codec_config": {
      "codecs": ["PCMU", "PCMA", "Opus"],
      "transcode": true
    },
    "alert_config": {
      "enabled": true,
      "thresholds": {
        "unreachable_minutes": 5,
        "failure_rate_percent": 20,
        "failure_rate_window_minutes": 30,
        "response_time_ms": 500
      },
      "channels": {
        "email": true,
        "sms": false,
        "webhook": "https://hooks.example.com/sip-alerts"
      }
    }
  }'
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


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