> ## 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.

# Discover SIP Endpoint

> Auto-discover optimal SIP connection settings by probing your endpoint with DNS resolution and SIP OPTIONS.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Body

**host** `string` *required*

The hostname or IP address of your SIP endpoint.

**port** `number`

Specific port to probe. If omitted, ports 5060, 5061, and 5080 are tested.

**transport** `string`

Specific transport to test: `"udp"`, `"tcp"`, or `"tls"`. If omitted, both UDP and TCP are tested.

### Response

**discovery\_id** `string`

Unique identifier for this discovery session.

**status** `string`

Discovery status: `"running"`, `"completed"`, or `"failed"`.

**host** `string`

The host that was probed.

**resolved\_addresses** `array`

IP addresses resolved from DNS A/AAAA lookups.

**srv\_records** `array`

SRV records found for `_sip._udp`, `_sip._tcp`, `_sips._tcp`.

**attempts** `array`

Details of each probe attempt including port, transport, response time, response code, and user agent.

**recommended** `object`

Recommended connection settings: `port`, `transport`, `user_agent`, `detected_system` (e.g., "Asterisk", "FreeSWITCH", "Kamailio"), `codecs`, and `methods`.

Only one discovery can run per organization at a time. Discovery results are cached for 10 minutes.

```json Example Request theme={null}
curl -X POST https://api.bland.ai/v1/sip/discover \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "sip.example.com"
  }'
```

```json Response theme={null}
{
  "data": {
    "discovery_id": "disc_abc123",
    "status": "completed",
    "host": "sip.example.com",
    "resolved_addresses": ["203.0.113.10"],
    "srv_records": [],
    "attempts": [
      {
        "port": 5060,
        "transport": "udp",
        "response_time_ms": 45,
        "response_code": 200,
        "user_agent": "Asterisk PBX 18.0.0"
      }
    ],
    "recommended": {
      "port": 5060,
      "transport": "udp",
      "detected_system": "Asterisk",
      "codecs": ["PCMU", "PCMA", "G.722"],
      "methods": ["INVITE", "ACK", "BYE", "CANCEL", "OPTIONS"]
    },
    "started_at": "2026-03-09T12:00:00Z",
    "completed_at": "2026-03-09T12:00:05Z"
  },
  "errors": null
}
```

***

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.