Overview

Bland supports inbound and outbound SIP, allowing customers to direct calls from their SIP provider to Bland for handling - or to direct Bland to make contact with their SIP provider.

This guide provides:

  • SIP connection details
  • Requirements and security settings
  • Instructions for attaching, verifying, updating, and detaching SIP routes via Bland’s API
  • Schema definitions and usage patterns

Entitlement Requirement

All /sip endpoints are protected by an entitlement check.

Your organization must have the SIP entitlement enabled to use SIP features. If not, all requests to the /sip routes will return:

{
  "data": null,
  "errors": [
    {
      "error": "SIP_NOT_ENABLED",
      "message": "SIP is not enabled for this organization"
    }
  ]
}

Contact support to have SIP enabled for your Enterprise organization.


SIP Termination Details

SIP Signaling Endpoint:

You must use TCP over TLS. Bland does not accept UDP for SIP messages. We do support UDP over S/RTP for media streams. mTLS is not required at this time.

US1:

us1.sip.bland.ai:5061;transport=tls

--
EU1:

Coming Soon

--
AU1:

Coming Soon

Static IP Addresses of the SIP Signalling Server(s):

US1:

35.80.235.26
54.189.4.67
54.172.60.0
54.172.60.1
54.172.60.2
54.172.60.3
54.244.51.0
54.244.51.1
54.244.51.2
54.244.51.3

--
EU1:

Coming Soon

--
AU1:

Coming Soon

Static IP Addresses of the Media Stream Server(s):

Bland does not provide static addresses for Media Stream Servers. As part of the SDP negotiation, our SIP Signalling Servers will provide you with the location of an available Media Stream endpoint. Through this, Bland is able to confidently scale our Media Stream capabilities without the need for NAT.

Supported Codecs:

  • Currently Supported: PCMU, PCMA
  • Coming Soon: Opus, G722

Security Requirements:

  • SIP Signaling: TLS 1.2 or higher
  • RTP Media: SRTP using AES_CM_128_HMAC_SHA1_80
  • From Header FQDN: Bland will enforce validity of the FQDN provided for in your From header. If this should be the same as the signaling endpoint, or a non-valid FQDN, we may reject your request(s) in the future.

Other Configurations:

  • RTCP: Uses port RTP + 1

  • DTMF: RFC 2833 (Out-of-band via RTP payload)

  • Transport: TCP over TLS

  • Number Format: +E.164 or E.164 (both supported for origination and termination)

  • SIP Registration: Not required (Bland determines routing based on predefined configurations configurable below.)


API Reference

Attach SIP Endpoint

POST /sip/attach

Attach a SIP configuration to a phone number.

phone_number
string

The phone number to associate with the SIP configuration. Must be in E.164 format.

directions
array

An array of directions for the SIP routing. Valid values: inbound, outbound. If outbound, you must also provide a sip_endpoint.

service
string

Must be set to sip.

Example Request
curl -X POST https://api.bland.ai/v1/sip/attach \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
    "directions": [
      { "type": "inbound" },
      { 
          "type": "outbound", 
          "sip_endpoint": "sip:your.provider.com", // FQDN Only. Port must be defined here, or in options. Prefixed with `sip:`
          "options": {
              "port": 1234, // Will overwrite any port defined in your sip_endpoint.
              "transport": "tls", // Other available: tls, tcp
              "secure_media": "true", // True, False
              "sip_username": "bland", // Optional
              "sip_password": "password" // Optional
          }
      }
    ],
    "service": "sip"
  }'

Verify SIP Number (Outbound)

PUT /sip/verify

To prove that you own the number, you’ll need to perform a one-time verification.

Be ready! Once you make this request, you’ll receive a phone call to the specified phone number, from +14157234000 - which will require you to input the code returned from the below request into your keypad.

phone_number
string

The phone number to verify SIP calling from. It must be attached to your organization first before attempting to verify.

Example Request
curl -X PUT https://api.bland.ai/v1/sip/verify \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
  }'

Update SIP Direction

POST /sip/update

Update a phone number’s SIP routing direction.

phone_number
string

The phone number for which to update the direction.

updates
object

The updated direction object. Use type: outbound and provide sip_endpoint, or type: inbound.

Example Request
curl -X POST https://api.bland.ai/v1/sip/update \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
    "updates": {
      "type": "outbound",
      "sip_endpoint": "sip:your.provider.com" // Only available for outbound SIP Types.
      "options": { // Only available for outbound SIP Types.
          "port": 1234, // Will overwrite any port defined in your sip_endpoint.
          "transport": "tls", // Other available: tls, tcp
          "secure_media": "true", // True, False
          "sip_username": "bland", // Optional
          "sip_password": "password" // Optional
      }
    }
  }'

Detach SIP Endpoint

POST /sip/detach

Remove SIP configuration from a number.

phone_number
string

The phone number to detach SIP routing from.

directions
array

Direction(s) to remove. Either inbound or outbound.

service
string

Must be set to sip.

Example Request
curl -X POST https://api.bland.ai/v1/sip/detach \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+14150000000",
    "directions": [
      { "type": "inbound" }
    ],
    "service": "sip"
  }'

Making your first SIP Call (Outbound)

To use a number that was registered for SIP, in an outbound direction - all that is required is to specify this as your from number.

Note: You’ll need to ensure that you’ve verified your number ahead of time, as instructed above.

Example Request
curl -X POST https://api.bland.ai/v1/calls \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "Say hi to the nice person!",
    "from": "+12341234123", // The number above registered as a SIP Outbound number.
    "phone_number": "<the callee's phone number>"
  }'

Get SIP Config

GET /sip?phone_number={phone_number}

Returns current SIP configuration (if any) for a given phone_number.

phone_number
string

The phone number of the number to fetch SIP configuration for.

Example Request
curl -X GET 'https://api.bland.ai/v1/sip?phone_number=+1231231234' \
  -H "Authorization: Bearer <token>"

Example Response

{
  "data": {
    "inbound": { // May be null if not present.
      number: string;
      id: string;
      org_id: string;
      direction: string;
      sip_endpoint: string | null;
      created_at: Date;
      updated_at: Date;
      headers: Object | null;
      options: Object | null; // As above
      inbound_id: bigint | null;
    },
    "outbound": { // May be null if not present.
      number: string;
      id: string;
      org_id: string;
      direction: string;
      sip_endpoint: string | null;
      created_at: Date;
      updated_at: Date;
      headers: Object | null;
      options: Object | null; // As above
      inbound_id: bigint | null;
    }
  },
  "errors": null
}

Notes

  • Phone numbers can be attached independently for inbound and outbound routing via the API.
  • All requests must conform to the expected schema; invalid payloads will be rejected with a 400 response.
  • Each API response includes a success status and, if applicable, an error message to aid debugging.