Skip to main content
POST
/
v1
/
sip
/
discover
Discover SIP Endpoint
curl --request POST \
  --url https://api.bland.ai/v1/sip/discover \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "host": "<string>",
  "port": 123,
  "transport": "<string>"
}
'
{
  "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
}

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 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.
Example Request
curl -X POST https://api.bland.ai/v1/sip/discover \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "sip.example.com"
  }'
{
  "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
}