Overview
Bland supports inbound and outbound SIP. Point calls from your carrier or PBX at Bland to be answered by an agent, or have Bland place calls out through your SIP provider. Connections are organized as trunks. A trunk is a reusable connection to your SIP infrastructure. It holds the provider, direction, destination endpoint, and authentication. You attach phone numbers and DIDs to a trunk, and they inherit its connection settings.SIP is organization scope only. It sits under Dispatch, as the second tab of Phone numbers. Inside a single agent there is no Phone numbers item at all, so switch to All agents in the scope selector before you look for it.Nothing blocks the URL. A link to the SIP page opens from either scope; it is the sidebar that hides it.
Prerequisites
- A SIP trunk of your own, from a carrier or a PBX, with an endpoint address you can reach
- Access to your firewall, to allow-list Bland’s signaling and media IPs
- The numbers you intend to route, on your carrier rather than bought from Bland
- Creating SIP trunks via the Setup Wizard or API
- Attaching numbers and DIDs for inbound and outbound routing
- Auto-discovery of endpoint settings, connection tests, and live SIP tracing
- Number porting to bring existing numbers to Bland
- Connection endpoints, firewall allow-listing, and security requirements
- The full SIP API reference
Quick Start
[1] Open the SIP page At All agents, go to Dispatch, then Phone numbers, then the SIP tab. Each trunk has its own page with call volume, answer rate, and three tabs: Overview, Numbers, and Configure. The connection test moved to a Test connection button in the top bar, and still sends a SIP OPTIONS ping to your endpoint over TLS. [2] Create a trunk Click “Add trunk” to launch the SIP Setup Wizard. The wizard walks you through your provider, endpoint, firewall, and authentication, then leaves you with a live trunk. [3] Attach numbers and DIDs From the trunk’s Numbers tab, attach the phone numbers and DIDs that should route through it. E.164 PSTN numbers and non-E.164 SIP identities (DIDs and extensions) are both supported once a number is bound to a trunk. [4] Make an outbound call Use a number on the trunk as thefrom value in a standard /v1/calls request:
SIP Setup Wizard
The SIP Setup Wizard provides a guided, step-by-step experience for standing up a trunk. Access it by clicking “Add trunk” on the SIP tab. Every step can also be done programmatically. See the expandable API sections under each step, or jump to the full API Reference.The wizard no longer asks you to name the trunk or pick its direction. It derives a name from the provider and endpoint, and every trunk it builds carries both directions. Rename it afterwards on the trunk’s Configure tab.The API is unchanged and still takes both, so a trunk created with
POST /v1/sip/trunks can be named and pointed one way.Step 1: Provider
Enter your SIP provider’s endpoint address. The wizard includes a provider catalog with guided instructions for popular platforms:- Vonage: SIP endpoint
- Asterisk / FreePBX: Public IP or hostname
- 3CX: SIP trunk FQDN
- Cisco UCM / CUBE: Gateway address
- RingCentral: SIP endpoint
- Microsoft Teams: Requires a certified SBC (direct connection not supported)
- Other: Any standard SIP endpoint
sip:user@host:5061;transport=tls, or shorthand like tls://host. It automatically parses the host, port, and transport for you.
API
API
Validate a destination before attaching with Then set
POST /v1/sip/parse-destination:sip_endpoint on the trunk, or in the directions of your POST /v1/sip/attach request.Step 2: Discovery
Bland automatically probes your SIP endpoint to detect the optimal connection settings. The discovery engine:- Resolves DNS, A/AAAA and SRV records (
_sip._udp,_sip._tcp,_sips._tcp) - Probes SIP ports, Tests common ports over UDP, TCP, and TLS with SIP OPTIONS messages
- Analyzes responses, Detects your PBX system (Asterisk, FreeSWITCH, Kamailio, 3CX, Cisco, etc.), supported codecs, and methods
API
API
Run discovery with The
POST /v1/sip/discover. It runs the full probe and returns the result directly:recommended object in the response contains the optimal port, transport, and detected_system. One discovery can run per organization at a time; long-running sessions can also be polled with GET /v1/sip/discover/status.Step 3: Firewall
The wizard displays Bland’s connection endpoints and IP ranges that must be allow-listed in your firewall. See Connection Endpoints below for the full reference. A checkbox confirming you have updated your firewall is required before the step will advance. This step is skipped entirely for a cloud provider, because there is no firewall of yours to change. If your wizard runs four screens rather than six, that is why, and nothing has gone wrong.API
API
Retrieve your region’s IPs and ports programmatically with
GET /v1/sip/firewall-ips:Step 4: Authentication
Choose how the two sides authenticate. Two authentication modes are available:- IP-based (recommended): your server trusts Bland’s signaling and media IPs as SIP peers, and Bland trusts your endpoint by source IP. No credentials to manage. Transfers and warm transfer consult calls that Bland sends to your server connect from the media IPs, so trust all of the IPs listed under Connection Endpoints.
- Registration-based: Bland registers with your server using a username and password via SIP REGISTER. A derived password is returned that you configure in your PBX.
API
API
Set When REGISTER auth is set, the response includes
auth_mode on the trunk or in the inbound direction of POST /v1/sip/attach:register_password_for_pbx. The one-time derived password to configure in your PBX.Need a password to start from? GET /v1/sip/generate-password returns a strong, PBX-safe one at a configurable length (length 8 to 256, or strength standard/long).Step 5: Numbers
Pick the numbers to route through the trunk. These are numbers on your own carrier: a trunk carries your numbers, not numbers bought from Bland, and attaching a Bland-provisioned number here fails. You can also skip this and attach numbers later from the trunk’s Numbers tab.Step 6: Complete
Your trunk is now live. Attach more numbers from the Numbers tab, change its settings on Configure, and watch calls arrive on Overview. Reachability is the Test connection button in the top bar.API
API
Confirm the trunk and its bound numbers with
GET /v1/sip/trunks/:id, and check per-number health with GET /v1/sip/status:Trunks, Numbers, and DIDs
A trunk is the reusable connection to your SIP infrastructure. You attach numbers and DIDs to it, and they inherit the trunk’s endpoint, transport, and authentication. So you configure the connection once and reuse it across every number.Attach numbers and DIDs
Bind numbers to a trunk withPOST /v1/sip/attach. You can attach up to 100 at once.
- PSTN numbers are normalized to E.164 (e.g.
+14155550100). - DIDs and extensions: when a number is bound to a trunk (
trunk_id), non-E.164 SIP identities such as DIDs and dial-plan extensions (e.g.2001) are accepted and stored as-is. - Each number can carry an inbound and an outbound configuration independently.
configured (successful) from failed (with per-number error reasons). Outbound endpoint and authentication are inherited from the trunk, so you don’t repeat them per number.
Inbound numbers
Inbound SIP numbers behave like any other Bland inbound number. Configure their pathway, persona, voice, and other settings exactly as you would a regular inbound number. Set them up through the wizard, the trunk’s Numbers tab, orPOST /v1/sip/attach.
Inspect a call (SIP trace)
Open a trunk’s Overview tab and select a call to see the full SIP trace. Every message across every leg, as a sortable table or a ladder (PCAP) diagram. The trace shows the INVITE / 100 Trying / 180 Ringing / 200 OK / ACK flow with full headers and SDP, including transfers and new legs. Copy or export it for debugging. Call logs auto-refresh and include direction, status, SIP response code, duration, and timestamps.Advanced configuration
From a number’s configuration you can also manage:- Failover: primary, secondary, and tertiary SIP servers with automatic failover triggers (unreachable, auth failure, timeout) and failback mode (auto/manual).
- Codecs: reorder and enable/disable codecs (PCMU, PCMA, Opus, G.722, G.729) with optional transcoding.
- Alerts: thresholds for unreachable duration, failure rate, and response time, with email, SMS, and webhook channels.
PATCH /v1/sip/config.
Transferring Calls over SIP
A Transfer Call node can send the caller to a DID, an extension, or a SIP URI on your trunk instead of a phone number. On the node, turn on Allow SIP/DID targets and enter the target, for example2001 or sip:2001@pbx.example.com.
Bland resolves the target over the trunk the call arrived on. For a call that did not arrive over SIP, Bland uses your organization’s outbound trunk.
You choose how the transfer is delivered:
SIP REFER hand-off. Bland sends the
REFER on the existing dialog, so no new connection reaches your SBC and no firewall change is needed. Custom headers travel as header parameters on the Refer-To URI (sip:2001@pbx.example.com?X-Account=42). Your PBX must copy them onto the INVITE it sends to the target. If your PBX cannot do that, use a new INVITE instead.
New INVITE. Bland’s SIP infrastructure sends the INVITE to your trunk endpoint over TLS with SRTP, and your custom headers arrive as SIP headers on that INVITE. If your SBC answers with a 401 or 407 challenge, Bland responds with the outbound call credentials saved on the trunk.
Warm transfer. Bland places the consult call to your trunk the same way as a new INVITE, briefs whoever answers, then joins the caller. With Attended transfer via SIP REFER + Replaces on, Bland completes the merge by sending your PBX a REFER with Replaces, which requires a call that arrived over SIP.
Bland sends your trunk’s credentials and custom headers only to the trunk’s own host. A full SIP URI that points at a different host is dialed as written, without them.
Custom headers on transfers
Headers on a transfer come from the trunk’s outbound header mapping, set on the trunk’s Headers tab or with theheaders object in POST /v1/sip/attach. Each entry maps a call variable to a SIP header name. If the trunk has no outbound header mapping, no custom headers are sent on any transfer method.
Troubleshooting transfers
Number Porting
Bland supports number porting. Transferring phone numbers you own from another carrier to Bland. This lets you use your existing business numbers directly with Bland’s SIP infrastructure without maintaining a separate SIP provider.How Number Porting Works
Number porting is a regulated process coordinated between carriers. It typically takes 7 to 14 business days depending on the losing carrier and number type. The process follows these stages:
You can track port requests from the Port a number wizard, whose first step lists the ones currently in flight, or via the API.
There is no completed or historical view in the dashboard. The list inside the wizard shows active requests only, so a port that has finished, failed or been canceled disappears from it. The API returns the full set.
Porting via the Dashboard
Click “Port a number” on the SIP tab to launch the porting wizard. Step 1: Enter Numbers Enter the phone numbers you want to port and click “Check portability” to verify they can be transferred. The portability check verifies each number against the carrier database and returns whether the number is portable, the number type (mobile, landline, toll-free), and whether a PIN is required from the losing carrier.API
API
Check portability with Returns
GET /v1/sip/port/check:portable (boolean), number_type, and pin_required for each number.- Authorized representative: Name and email of the person authorized to port the numbers
- Service address: The address on file with the losing carrier (must match their records)
- Target port date: Earliest date for the port. The picker will not accept anything sooner than 4 days out.
- Proof of ownership: Upload a utility bill or carrier invoice (PDF or image, max 10MB) showing the account name and service address
API
API
Upload your proof of ownership document with Returns a
POST /v1/sip/port/document:document_sid to reference when initiating the port.API
API
Submit the port request with Track progress with
POST /v1/sip/port/initiate:GET /v1/sip/port or cancel with DELETE /v1/sip/port/:id.Connection Endpoints
Bland operates regional SIP edges. Connect to the endpoint closest to your infrastructure, and allow-list both its signaling and media IPs in your firewall. These IPs are static and do not change. Bland separates signaling from media, and they use different IP addresses:- Signaling (calls you send to Bland): SIP runs exclusively over TLS on TCP port 5061. There is no plaintext UDP/5060 listener. Each region has two signaling IPs (one per availability zone) behind its FQDN for high availability. Send SIP to the FQDN and it balances across both.
- Media (RTP): Audio is carried over SRTP on a separate set of media IPs per region, over UDP ports 16384 to 32768.
- Calls Bland places to you: When Bland’s SIP infrastructure originates an
INVITEtoward your SBC, for example a transfer or a warm transfer consult call, the TLS connection comes from one of the region’s media IPs, not from a signaling IP.
Connect using the full SIP URI for your region. For example
us2.sip.bland.ai:5061;transport=tls.
Firewall allow-list
For your region:- Allow outbound TLS 5061 from your SBC to the signaling IPs.
- Allow UDP 16384 to 32768 to and from the media IPs, or audio will not flow.
- Allow inbound SIP over TLS from all six IPs, signaling and media, to your SBC’s SIP TLS port, and configure all six as trusted SIP peers on the SBC. A firewall rule alone is not enough: an SBC that accepts the connection but does not recognize the source as a peer rejects the
INVITEwith403 Forbidden.
GET /v1/sip/firewall-ips.
Whitelisting is mutual: Bland allow-lists your source ranges, and you allow-list Bland’s signaling and media IPs.
Requirements and Security
Transport- SIP signaling: TLS 1.2 or higher, TCP port 5061 only. UDP and plaintext 5060 are not accepted.
- Ensure the Let’s Encrypt ISRG Root X1 CA is installed, downloadable here.
- SRTP using
AES_CM_128_HMAC_SHA1_80. - RTP over UDP ports 16384 to 32768; RTCP uses RTP port + 1.
- PCMU (G.711 μ-law), PCMA (G.711 A-law), Opus, G.722
- G.729 available via advanced configuration
- Methods:
INVITE,ACK,BYE,CANCEL,OPTIONS,REFER - DTMF: RFC 2833 (out-of-band via RTP telephone-event)
- Number format: E.164 for PSTN; DIDs and extensions supported on trunk-bound numbers
- Authentication: IP-based (default) or SIP REGISTER digest auth. On calls Bland places to you, Bland answers a
401or407digest challenge with the trunk’s outbound call credentials
API Reference
All SIP endpoints are under/v1/sip and require authentication via your API key. Per-endpoint parameter documentation is available in the API Reference tab.
Trunk Management
Numbers & Configuration
Discovery & Testing
Monitoring
Number Porting
Notes
- A trunk lets you configure the connection once and attach many numbers and DIDs to it.
- Each number can have one inbound and one outbound configuration, attached independently.
- Up to 100 numbers can be attached in a single API call.
- Trunk-bound numbers accept non-E.164 DIDs and extensions in addition to E.164 PSTN numbers.
- All requests must conform to the expected schema; invalid payloads are rejected with a
400response. - Test calls are rate-limited to 10 per 15 minutes per organization.
- Number porting typically takes 7 to 14 business days. Track status via the dashboard or API.
- Health checks probe outbound endpoints via SIP OPTIONS. Inbound-only configurations show as “unchecked” since there is no outbound endpoint to probe.
Next steps
Dispatch
Phone numbers, channels, and batches.
Conversations
Read the calls your trunk carried.
Agent builder
Build the agent that answers them.
Triggers
Start a call from an event rather than a dial.